content
stringlengths
1
15.9M
\section{introduction} Extraordinary optical transmission (EOT) \cite{Ebbesen1} through an opaque metallic film perforated with subwavelength slits has received great interest over the past decade because of its numerous applications in optoelectronics such as mid-infrared spatial light modulators, linear signal processing or biosensing. Many theoretical and experimental works were carried out in order to understand and predict EOT and, especially, to highlight the role of surface waves \cite{Moreno,Aigouy,Haito1,Nikittin}. More recently we provided, in \cite{Kofi6}, a simple and versatile model, for this phenomenon, involving a specific mode living in an equivalent homogeneous medium and a phase correction to account for surface waves. The proposed semi-analytical model is valid from the visible to the infrared frequencies ranges. On the other hand, significant efforts have been made to create active or tunable plasmonic devices operating from THz to mid-infrared frequencies. Thanks to its extraordinary electronic and optical properties, graphene, a single layer of arranged carbon atoms has attracted much attention in the last years. This material can support both TE an TM surface plasmons and can exhibit some remarkable properties such as flexible wide band tunability that can be exploited to build new plasmonic devices. The main challenge when designing a graphene-plasmon-based device is how to efficiently excite graphene surface plasmons with a free space electromagnetic wave since there is a huge momentum mismatch between the two electromagnetic modes. Generally two strategies are used. The first one consists in patterning the graphene sheet into nano-resonators \cite{Nikittin2, Thongrattanasiri,Yan, Rodrigo, Brar, Strait, Yi, Koppens, Yan2, Fang, Fallahi, Zhao,Amin}. In this case a surface plasmon of the obtained structure which is very similar to the graphene surface plasmon is excited and an absorption rate close to $100\%$ can be reached. In particular in \cite{Amin}, the authors presented an electrically tunable hybrid graphene-gold Fano resonator which consists of a square graphene patch and a square gold frame. They showed that the destructive interference between the narrow- and broadband dipolar surface plasmons, which are induced respectively on the surfaces of the graphene patch and the gold frame, leads to the plasmonic equivalent of electromagnetically induced transparency (EIT). However patterning a graphene sheet requires sophisticated processing techniques and deteriorates its extraordinary mobility. The second strategy consists in using a continuous graphene sheet instead of undesirable patterned graphene structure \cite{Tang, Zizhuo, XZhao, Xia, Gao,Zhang}. In this approach, the graphene sheet is coupled with nano-scatterers such as nano-particles, or nano-gratings. Gao {\it et al.} proposed \cite{Gao} to use diffractive gratings to create a guided-wave resonance in the graphene film that can be directly observed from the normal incidence transmission spectra. In \cite{XZhao} Zhao {\it et al.} studied a tunable plasmon-induced-transparency effect in a grating-coupled double-layer graphene hybrid system at far-infrared frequencies. They used a diffractive grating to couple a normal incident wave and plasmonic modes living in a system of two graphene-films separated by a spacer. Zhang {\it et al.} \cite{Zhang} investigated optical field enhancements, in a wide mid-infrared band, originating from the excitation of graphene plasmons, by introducing a dielectric grating underneath a graphene monolayer. Usually, the optical response of all the grating-graphene based structures listed above is performed thanks to the finite difference time domain method (FDTD) or to the finite element method (FEM). However the features of these hybrid graphene-resonators devices is often linked to a plasmon resonance phenomenon. Therefore a modal method allowing for a full modal analysis of the couplings occurring in these plasmonic systems seems more suitable.\\ In this paper, we investigate an optical tunable plasmonic system involving two fundamental phenomena: an EOT phenomenon and a metal-insulator-graphene cavity plasmon mode excitation. We propose a semi-analytical model allowing to fully describe the spectrum behaviour of an hybrid plasmonic structure, made of a 1D periodic subwavelength slits array deposited on an insulator/graphene layers. The spectrum of the proposed hybrid system exhibits Lorentz and Fano-like resonances and also other broadband and narrow band resonances that are efficiently captured by our simplified model. In order to explain the origin of this particular behaviour, we first split the hybrid system into a couple of sub-systems. Second, thanks to a modal analysis through the polynomial modal method (PMM: one of the most efficient methods for modeling the electromagnetic properties of periodic structures) \cite{Kofi1,Kofi2,Kofi3,Kofi4}, we demonstrate that the scattering parameters of each sub-system can be computed through a concept of weak and strong couplings. Finally we provide analytical expressions of the reflection and transmission coefficients of the structure and describe the mechanisms leading to Lorentz and Fano resonances occurring in it. \section{Physical system} The hybrid structure under study is presented in Fig. (\ref{geometry}). It consists of two sub-systems. The first sub-system earlier studied in \cite{Kofi6} is a sub-wavelength periodic array of nano-slits with height $h_1=800nm$, period $d=165 nm << \lambda$ and slits-width $s=15nm$. The relative permittivity of the material filling the slits is denoted by $\varepsilon^{(s)}$ while the dispersive relative permittivity of the metal (gold) is denoted by $\varepsilon^{(m)}$ and described by the Drude-Lorentz model \cite{BB, Rakic}. See reference \cite{Kofi6} for the numerical parameters used for $\varepsilon^{(m)}$ description. This first sub-structure is deposited on a dielectric spacer (with relative permittivity $\varepsilon^{(2)}=1.54^2$ and hight $h_2=10nm$) itself deposited on a continuous graphene sheet. The monolayer graphene optical properties are modeled with an equivalent layer with thickness $\Delta$ and permittivity $\varepsilon(\omega)$ \cite{Vakil} : \begin{equation} \varepsilon(\omega)=1+i\dfrac{\sigma(\omega)}{\varepsilon_0 \omega \Delta} \end{equation} where the optical conductivity of graphene \begin{equation}\label{cond graphene} \sigma(\omega)=\sigma_{inter}+\sigma_{intra} \end{equation} includes both the interband and intraband contributions. The first term of Eq. (\ref{cond graphene}) \textsl{i.e.} the interband contribution $\sigma_{inter}$ has the form $\sigma_{inter}=\sigma_{inter}^{\prime}+i\sigma_{inter}^{\prime\prime}$, where \begin{equation} \left\{\begin{array}{l} \sigma_{inter}^{\prime}=\sigma_0 \left[1+\dfrac{1}{\pi}atan\left(\dfrac{\hbar \omega -2\mu_c}{\hbar\Gamma}\right)-\dfrac{1}{\pi} atan\left(\dfrac{\hbar\omega +2\mu_c}{\hbar\Gamma}\right)\right]\\ \sigma_{inter}^{\prime\prime}=\dfrac{\sigma_0}{2\pi}ln\left[\dfrac{2\mu_c-\hbar\omega}{2\mu_c+\hbar \omega}\right]. \end{array}\right. \end{equation} $\sigma_0=\pi e^2/2h$ is the universal conductivity of the graphene, $1/\Gamma$ is the relaxation time {{(throughout this work, we will take $\Gamma=2.10^{12}$s$^{-1}$)}} and $\mu_c$ is the Fermi level. The second term $\sigma_{intra}$ of Eq. (\ref{cond graphene}) describes a Drude model response for intraband processes: \begin{equation} \sigma_{intra}=\sigma_0\dfrac{4\mu_c}{\pi}\dfrac{1}{\hbar\Gamma-i\hbar\omega}. \end{equation} This hybrid structure is excited, from the upper medium (having relative permittivity $\varepsilon^{(0)}$) by a TM polarized plane wave (the magnetic field is parallel to the $y$ axis). The wave vector of the incident wave is denoted by $\mathbf{K_0}=k_0\left(\alpha_0\mathbf{e_x}+\beta_0\mathbf{e_y}+\gamma_0\mathbf{e_z}\right)$, where $k_0=2\pi/\lambda=\omega/c$ denotes the wavenumber, $\lambda$ being the wavelength and $c$ the light velocity in vacuum. The relative permittivity of the lower region is denoted by $\varepsilon^{(3)}$. \begin{figure \centering {\includegraphics[width=0.6\textwidth]{structure1.jpg}} \caption{\label{geometry} Sketch of hybrid structure made of a dispersive metal film perforated with a subwavelength periodic array of 1D nano-slits deposited on a dielectric spacer ended by a continuous graphene sheet.} \end{figure} We report in Figs. (\ref{spectrum_muc_1000_sp_10nm}) and (\ref{spectrum_muc_1500_sp_10nm}), the spectra of the hybrid structure for two values of the chemical potential: $\mu_c=1eV$ Fig. (\ref{spectrum_muc_1000_sp_10nm}) and $\mu_c=1.5eV$ Fig. (\ref{spectrum_muc_1500_sp_10nm}). These curves display both broadband and narrow bands resonance phenomena. It has been shown in \cite{Kofi6} that a Lorentz-like resonance corresponding to an EOT phenomenon can occur in the first sub-system \textsl{i.e.} the dispersive metal film perforated with a subwavelength periodic array of 1D nano-slits excited by a plane. In the current case, this EOT occurs around $\lambda=3.37 \mu m$ and as pointed out in \cite{Kofi6} it is related to the excitation of a particular eigenmode of the slit grating structure : the so-called lattice mode. One can easily conceive that the broadband resonance is related to the EOT phenomenon outlined later, while the narrow band resonance phenomena are due to Fabry-Perrot-like resonances of a cavity mode living in the metal/spacer/graphene gap. For example, for $\mu_c=1eV$, a first two narrow resonances are observed around $\lambda=4.17\mu m$ and $\lambda=7.3\mu m$. \begin{figure \centering \subfigure [\label{spectrum_muc_1000_sp_10nm} $\mu_c=1eV$] {\includegraphics[width=0.49\textwidth]{spectrum_muc_1000_sp_10nm.pdf}} \centering \subfigure [\label{spectrum_muc_1500_sp_10nm}$\mu_c=1.5eV$] {\includegraphics[width=0.49\textwidth]{spectrum_muc_1500_sp_10nm.pdf}} \caption{Reflection, transmission and absorption spectra of the hybrid system for $\mu_c=1eV$ (Fig. (\ref{spectrum_muc_1000_sp_10nm})) and $\mu_c=1.5eV$ (Fig. (\ref{spectrum_muc_1500_sp_10nm})). The hybrid structure exhibits both broadband and tunable narrow band resonances with respect to the chemical potential. Parameters: $\varepsilon^{1}=\varepsilon^{3}=\varepsilon^{slit}=1$, incidence angle= $0^{o}$, $h=800nm$, $d=165nm$, $a=15nm$.} \end{figure} The real parts of the magnetic field plotted in Fig. (\ref{real_Hy_muc_1000_lambda_417_10nm}) at $\lambda=4.17\mu m$ and in Fig. (\ref{real_Hy_muc_1000_lambda_730_10nm}) at $\lambda=7.30 \mu m$, for $\mu_c=1eV$, support the fact that the narrow band resonances are linked to the resonance of a cavity mode of the horizontal metal/insulator/graphene sub-system. As the effective index of this mode strongly depends on the chemical potential $\mu_c$, the resonance frequencies of this hybrid cavity mode shift with increasing $\mu_c$. Comparing the reflection spectrum of the first sub-system with that of the hybrid structure, we can interpret the latter spectral response as a weak or strong coupling between the lattice mode of the former sub-system with the cavity mode of the metal/insulator/graphene gap. We propose in the following, a simple single mode model allowing to efficiently describe, and understand the mechanism of this vertical-to-horizontal cavity modes coupling. \begin{figure \centering \subfigure [\label{real_Hy_muc_1000_lambda_417_10nm} $\lambda=4.17 \mu m$] {\includegraphics[width=0.49\textwidth]{real_Hy_muc_1000_lambda_417_10nm.pdf}} \centering \subfigure [\label{real_Hy_muc_1000_lambda_730_10nm} $\lambda=7.30 \mu m$] {\includegraphics[width=0.49\textwidth]{real_Hy_muc_1000_lambda_730_10nm.pdf}} \caption{Real part of the magnetic field $H_x(x,z)$ at $\lambda=4.17 \mu m$ (Fig. (\ref{real_Hy_muc_1000_lambda_417_10nm})) and at $\lambda=7.30 \mu m$ (Fig. (\ref{real_Hy_muc_1000_lambda_730_10nm})). Parameters: $\varepsilon^{1}=\varepsilon^{3}=\varepsilon^{slit}=1$, incidence angle= $0^{o}$, $h=800nm$, $d=165nm$, $a=15nm$.} \end{figure} \section{Modal analysis of the system} \begin{figure}[!ht] \centering {\includegraphics[width=0.7\textwidth]{structure2.jpg}} \caption{\label{structure2} Sketch of the mechanism of the coupling between cavity lattice modes of the periodic array of nano-slits and the metal/insulator/graphene gap plasmon modes. Strong and weak couplings between three modes are responsible of the resonance phenomena of the hybrid structure.} \end{figure} The sketch of vertical-to-horizontal cavity modes coupling outlined in the previous section is presented in Fig. (\ref{structure2}), where $\gamma_0^{(1)}$ denotes effective index of the periodic slits array lattice mode in the $z$-direction while $\alpha_0^{(3)}$ denotes that of the metal/insulator/graphene cavity mode in the $x$-direction. The effective indices $\alpha_0^{(1)}$ and $\alpha_0^{(2)}$ will be introduced later. Modal methods are very suitable to deal with the current problem since it is related to mode resonances. Thus, all required effective indices are computed as eigenvalues of the generic operator $\mathcal{L}^{(k)}$: \begin{equation} \label{op_TM} \mathcal{L}^{(k)}(\omega)|H^{(k)}_{q}(\omega)\rangle =(\gamma_q^{(k)}(\omega))^2 |H^{(k)}_{q}(\omega) \rangle\\ \end{equation} with \begin{equation*} \label{vap_vep} \mathcal{L}^{(k)}(x,\omega)=\left(\dfrac{c}{\omega}\right)^2 \varepsilon^{(k)}(x,\omega) \partial_x \frac{1}{\varepsilon^{(k)}(x,\omega)}\partial_x+ \varepsilon^{(k)}(x,\omega). \end{equation*} Figure \ref{structure7} illustrates the different configurations used for the computation of the required effective indices. Recall that these effective indices are computed as eigenvalues of equation (\ref{op_TM}). The first configuration ($config.1$) is used for the computation of the modes of periodic arrays of nano-slits in general and particularly for the computation of the cavity lattice mode effective index $\gamma_0^{(1)}$. The second configuration ($config.2$) is used for the computation of the plasmon mode effective index $\alpha_0^{(2)}$ while the cavity plasmon mode effective index $\alpha_0^{(3)}$ is computed thanks to the third configuration ($config.3$). Practically, the PMM is used to solve numerically the eigenvalue equation Eq. (\ref{op_TM}). For that purpose, the structure is divided into sub-intervals $I^{(k)}_x$, in the $x$-direction: $k\in\{1,2\}$ for $config.1$ while $k\in\{1,6\}$ for $config.2$ and $config.3$. \begin{figure}[!ht] \centering {\includegraphics[width=0.8\textwidth]{structure7.jpg}} \caption{\label{structure7} Configurations used for the computation of the required effective indices (eigenvalues of equations \ref{op_TM}). $config.1$ is used for the computation of the modes of periodic arrays of nano-slits in general and in particular for the computation of the cavity lattice mode effective index $\gamma_0^{(1)}$. $config.2$ is used for the computation of the effective index $\alpha_0^{(2)}$ of the plasmon mode. The gap plasmon mode effective index $\alpha_0^{(3)}$ is computed thanks to $config.3$.} \end{figure} At this stage, we split the hybrid system into two coupled sub-systems: \begin{itemize} \item a weakly coupled sub-system sketched in figures \ref{sub_system_1a} and \ref{sub_system_1b} which leads to the broadband resonances. \item a strongly coupled sub-system sketched in figures \ref{sub_system_2a} and \ref{sub_system_2b} leading to a narrow bands dispersion curves. \end{itemize} Let us now analyse each coupled sub-system and provide semi-analytical models allowing to describe them. \subsection{Weakly coupled sub-system} A semi-analytical model for the weakly coupled system has been already described in \cite{Kofi6}. This system consists of a periodic array of subwavelength nano-slits encapsulated between media with relative permittivities $\varepsilon^{(0)}$ and $\varepsilon^{(3)}$. As pointed out in \cite{Kofi6}, the electromagnetic response of the system to an incident plane wave excitation, in the static limit ($d<<\lambda$), is equivalent to that of a slab with equivalent permittivity $\varepsilon^{(1)}=\langle 1/\varepsilon^{(m,s)}(x) \rangle ^{-1}$ and height $h_1$. \begin{figure}[!ht] \centering {\includegraphics[width=0.6\textwidth]{structure3.jpg}} \caption{\label{sub_system_1a} Sketch of the weak coupling sub-system consisting of a periodic array of nano-slits encapsulated between $\varepsilon^{(0)}$ and $\varepsilon^{(3)}$ media. The lattice mode $\gamma_0^{(1)}$ is assumed to live in an $\sqrt{\varepsilon^{(1)}}$ effective homogeneous medium. Two plasmon modes $\alpha_{sp}^{(0)}$ and $\alpha_0^{(2)}$ ensure the phase matching with the plane waves in media $\varepsilon^{(0)}$ and $\varepsilon^{(3)}$.} \end{figure} \begin{figure}[!ht] \centering {\includegraphics[width=0.6\textwidth]{structure5.jpg}} \caption{\label{sub_system_1b} The sketch of $\alpha_0^{(2)}$ plasmon mode computation.} \end{figure} Its reflection and transmission coefficients $R_{12}$ and $T_{12}$ are then given by : \begin{equation}\label{reflection} R_{12}=\dfrac{r_1+\phi_1 r_2 \phi_2}{1+r_1\phi_1 r_2 \phi_2} \end{equation} and \begin{equation}\label{transmission} T_{12}=\dfrac{t_1t_2 \phi_2}{1+r_1\phi_1 r_2 \phi_2} \end{equation} where $r_{1}$, $t_{1}$ and $r_{2}$, $t_{2}$ are the Fresnel coefficients at the interfaces $\varepsilon^{(0)}/\varepsilon^{(1)}$ and $\varepsilon^{(1)}/\varepsilon^{(3)}$ under TM polarization: \begin{eqnarray} r_1=\dfrac{1-n_{01(\omega)}}{1+n_{01(\omega)}},\quad r_2=\dfrac{1-n_{13(\omega)}}{1+n_{13(\omega)}}, \\ t_1=\dfrac{2}{1+n_{01(\omega)}},\quad t_2=\dfrac{2}{1+n_{13(\omega)}}. \end{eqnarray} where \begin{equation} n_{01}(\omega)=\dfrac{\gamma_0^{(1)}(\omega)/\varepsilon^{(1)}(\omega)}{\gamma_0^{(0)}(\omega)/\varepsilon^{(0)}(\omega)}, \quad \text{ and } \quad n_{13}(\omega)=\dfrac{\gamma_0^{(3)}(\omega)/\varepsilon^{(3)}(\omega)}{\gamma_0^{(1)}(\omega)/\varepsilon^{(1)}(\omega)}, \end{equation} and \begin{eqnarray}\label{phase } \phi_1=e^{-i k_0\gamma^{(1)}_0 h_1}\phi_c^{(0)}, \quad \phi_2=e^{-i k_0\gamma^{(1)}_0 h_1}\phi_c^{(2)} \end{eqnarray} with \begin{eqnarray}\label{phase correction} \phi_c^{(0)}=e^{-i k_0\alpha_{sp}^{(0)} a^{(0)}}, \quad \phi_c^{(2)}=e^{-i k_0\alpha_{0}^{(2)} a^{(2)}}. \end{eqnarray} Phase correction terms are introduced in order to take into account the phase matching between the lattice mode with effective index $\gamma_0^{(1)}$ and the incident plane wave (see \cite{Kofi6}). In equation Eq. (\ref{phase correction}), $\alpha_{sp}^{(0)}=\sqrt{\dfrac{{\varepsilon^{(0)}\varepsilon^{(m)}}}{\varepsilon^{(0)}+\varepsilon^{(m)}}}$ is the effective index of the surface plasmon propagating along the upper interface, $a^{(1)}=\dfrac{a}{4}\sqrt{\dfrac{\varepsilon^{(0)}}{\varepsilon^{(s)}}}$ and $a^{(2)}=\dfrac{a}{4}\sqrt{\dfrac{\varepsilon^{(3)}}{\varepsilon^{(s)}}}$. We compare in Fig. (\ref{compare_reflec_12_muc_1000_sp_10nm}) the spectrum of the reflectivity $|R_{12}|^2$, with the reflectivity of the hybrid system. As expected, the $|R_{12}|^2$ curve perfectly matches the broadband resonance of the hybrid structure. The impact of the phase correction terms $\phi_c^{(0),(2)}$ on the results is not significant since the omission of these terms only induces a little shift of the $|R_{12}|^2$ curve. This is why we consider the coupling between the $\gamma_0^{(1)}$-effective index-slit-mode and the $\alpha_0^{(2)}$-effective index-plasmon-mode as a weak coupling. \begin{figure \centering \subfigure [\label{compare_reflec_12_muc_1000_sp_10nm} weakly coupled sub-system response] {\includegraphics[width=0.49\textwidth]{compare_reflec_12_muc_1000_sp_10nm.pdf}} \centering \subfigure [\label{compare_reflec_13_muc_1000_sp_10nm} strongly coupled sub-system response] {\includegraphics[width=0.49\textwidth]{compare_reflec_13_muc_1000_sp_10nm.pdf}} \caption{Comparison between the reflection spectrum of the hybrid structure and the responses of the weakly coupled sub-system (a) and the strongly coupled sub-system (b). As expected, the weakly coupled sub-system reflection spectrum $|R_{12}(\lambda)|^2$ perfectly matches the broadband resonances of the hybrid structure. On the other hand, the strongly coupled sub-system spectrum characteristic function $|S_{11}(\lambda)+S_{12}(\lambda)|^2$ perfectly matches the narrow band resonances of the hybrid structure. Parameters: $\lambda \in [2,10]\mu m$, $\varepsilon^{(1)}=\varepsilon^{(3)}=\varepsilon^{(s)}=1$, $\varepsilon^{(2)}=1.54^2$, incidence angle= $0^{o}$, $\mu_c=1eV$.} \end{figure} \subsection{Strongly coupled system} Consider now the strongly coupled system sketched in Figs. (\ref{sub_system_2a}) and (\ref{sub_system_2b}). Since the transverse geometrical parameters of the grating are smaller than the incident field wavelength $\lambda$ ($d<<\lambda$), we can introduce for the lattice mode an effective index $\alpha_0^{(1)}$ along the $x$-axis as follows: \begin{equation} \alpha_0^{(1)}=\sqrt{\varepsilon^{(1)}-\gamma_0^{(1)2}}, \end{equation} where $\alpha_0^{(1)}$ has a positive real part and a negative imaginary part. The $S$-parameters of the equivalent two ports network of Fig. (\ref{sub_system_2a}) are then given by : \begin{figure}[!ht] \centering {\includegraphics[width=0.6\textwidth]{structure4.jpg}} \caption{\label{sub_system_2a} Sketch showing the strong coupling between the gap plasmon mode $\alpha_0^{(3)}$ living in an $\sqrt{\varepsilon^{(2)}}$ homogeneous medium and $\alpha_0^{(1)}$ lattice mode in an $\sqrt{\varepsilon^{(1)}}$ effective homogeneous medium.} \end{figure} \begin{figure}[!ht] \centering {\includegraphics[width=0.6\textwidth]{structure6.jpg}} \caption{\label{sub_system_2b} The sketch of $\alpha_0^{(3)}$ plasmon mode computation.} \end{figure} \begin{equation}\label{parametre_S} \begin{bmatrix} S_{11} & S_{12}\\ S_{21} & S_{22} \end{bmatrix} \begin{bmatrix} a_1\\ a_2 \end{bmatrix} = \begin{bmatrix} b_1\\ b_2 \end{bmatrix} \end{equation} where \begin{equation}\label{Parametres2} \left\{\begin{array}{l} S_{11}(\omega)=S_{22}(\omega)=\dfrac{\left[1-n^2(\omega)\right]\left[1-\phi^2(\omega)\right]}{\left[1+n(\omega)\right]^2-\left[1-n(\omega)\right]^2 \phi^2(\omega)} \\[1em] S_{12}(\omega)=S_{21}(\omega)=\dfrac{4n(\omega)\phi(\omega)}{\left[1+n(\omega)\right]^2-\left[1-n(\omega)\right]^2 \phi^2(\omega)} \end{array}\right., \end{equation} with \begin{equation \left\{\begin{array}{l} n(\omega)=\dfrac{\alpha_0^{(3)}(\omega)/\varepsilon^{(3)}(\omega)}{\alpha_0^{(1)}(\omega)/\varepsilon^{(1)}(\omega)}\\[1em] \phi=e^{-i k_0\alpha_0^{(3)}d}. \end{array}\right., \end{equation} The dispersion relation of this system is obtained by finding the zeros of the determinant $\Delta(\omega)$ of the matrix $S(\omega)$ of equation Eq. (\ref{parametre_S}) : \begin{equation}\label{Delta} \Delta(\omega)=S_{11}(\omega)S_{22}(\omega)-S_{12}(\omega)S_{21}(\omega)= \left[S_{11}(\omega)-S_{12}(\omega)\right]\left[S_{11}(\omega)+S_{12}(\omega)\right]=0. \end{equation} Then we have two classes of solutions: \begin{equation}\label{Delta4} \left\{\begin{array}{l} S_{11}(\omega)-S_{12}(\omega)=0\\%[1em] \text{or}\\%[1em] S_{11}(\omega)+S_{12}(\omega)=0 \end{array}\right.. \end{equation} As shown Fig. (\ref{compare_reflec_13_muc_1000_sp_10nm}) the resonance frequencies defined by the class of solutions satisfying to $S_{11}(\omega)+S_{12}(\omega)=0$ match with the narrow band resonances of the hybrid structure. Let us set \begin{equation} r_{13}(\omega)=-\left(S_{11}(\omega)+S_{12}(\omega)\right). \end{equation} Coefficient $r_{13}$ corresponds to the reflection coefficient of the strongly coupled system where the output and input ports are excited by two fields of equal amplitudes $a_1=a_2$. Therefore the reflection spectrum of the whole system can take the following form : \begin{equation}\label{reflection approximation} R=\dfrac{r_1+\phi_1 r_{13}r_2 \phi_2}{1+r_1\phi_1 r_{13}r_2 \phi_2} \end{equation} and \begin{equation}\label{transmission approximation} T=\dfrac{t_1r_{13}t_2 \phi_2}{1+r_1\phi_1 r_{13} r_2 \phi_2}. \end{equation} By using the approximate model of Eqs. (\ref{reflection approximation}) and (\ref{transmission approximation}), we provide some numerical simulations (In Figs. (\ref{compare_reflec_R_muc_1000_sp_10nm}), (\ref{compare_trans_T_muc_1000_sp_10nm}), (\ref{compare_reflec_R_muc_1500_sp_10nm}) and (\ref{compare_trans_T_muc_1500_sp_10nm})) for different values of $\mu_c$. In these figures, we compare the spectra of the hybrid-structure with the reflection and transmission curves obtained from rigorous PMM computations. The chemical potential is set to $\mu_c=1eV$, in Figs. (\ref{compare_reflec_R_muc_1000_sp_10nm}) and (\ref{compare_trans_T_muc_1000_sp_10nm}), while $\mu_c=1.5eV$, in Figs. (\ref{compare_reflec_R_muc_1500_sp_10nm}) and (\ref{compare_trans_T_muc_1500_sp_10nm}). All these results fit very well the rigorous numerical simulations obtained with the PMM. Our model captures very well all resonances phenomena occurring in the hybrid system namely Lorentz and Fano resonances and thus confirms that couplings between some fundamental modes of elementary sub-structures are of fundamental importance in these phenomena. \begin{figure}[ht] \centering \subfigure [\label{compare_reflec_R_muc_1000_sp_10nm} Reflection for $\mu_c=1eV$] {\includegraphics[width=0.49\textwidth]{compare_reflec_R_muc_1000_sp_10nm.pdf}} \centering \subfigure [\label{compare_trans_T_muc_1000_sp_10nm} transmission for $\mu_c=1eV$] {\includegraphics[width=0.49\textwidth]{compare_trans_muc_1000_sp_10nm.pdf}} \subfigure [\label{compare_reflec_R_muc_1500_sp_10nm} Reflection for $\mu_c=1.5eV$] {\includegraphics[width=0.49\textwidth]{compare_reflec_R_muc_1500_sp_10nm.pdf}} \centering \subfigure [\label{compare_trans_T_muc_1500_sp_10nm} transmission for $\mu_c=1.5eV$] {\includegraphics[width=0.49\textwidth]{compare_trans_muc_1500_sp_10nm.pdf}} \caption{Comparison between the spectra of the hybrid-structure with the reflection and transmission curves obtained from the PMM for two values of the chemical potential $\mu_c$. The chemical potential is set to $\mu_c=1eV$, in Figs. (\ref{compare_reflec_R_muc_1000_sp_10nm}) and (\ref{compare_trans_T_muc_1000_sp_10nm}), while $\mu_c=1.5eV$, in Figs. (\ref{compare_reflec_R_muc_1500_sp_10nm}) and (\ref{compare_trans_T_muc_1500_sp_10nm}). All these results fit very well with the rigorous numerical simulations obtained with the PMM. Our model captures very well all resonances occurring in the hybrid system namely Lorentz and Fano ones. Parameters: $\lambda \in [2,10]\mu m$, $\varepsilon^{(1)}=\varepsilon^{(3)}=\varepsilon^{(s)}=1$, $\varepsilon^{(2)}=1.54^2$, incidence angle= $0^{o}$.} \end{figure} Armed with this model, we are now ready to deepen the explanation of the dispersion curves of Figs. (\ref{spectrum_muc_1000_sp_10nm}) and (\ref{spectrum_muc_1500_sp_10nm}). \section{Analysis of the Lorentz and Fano resonances of the system} Analysing the reflection $|R|^2$, transmission $|T|^2$ from Eqs. (\ref{reflection approximation}), (\ref{transmission approximation}), it is possible to provide justifications for the curves shapes in Figs. (\ref{spectrum_muc_1000_sp_10nm}) and (\ref{spectrum_muc_1500_sp_10nm}). From these figures, we remark that: \begin{enumerate} \item In the frequency range close to the resonance frequencies of the weak sub-system, the reflection and transmission spectra generally exhibit asymmetric Fano-like shapes while the absorption presents Lorentz-like shapes (left inserts of Figs. (\ref{spectrum_muc_1000_sp_10nm}) and (\ref{spectrum_muc_1500_sp_10nm})). \item When the resonance frequency of both strongly and weakly coupled systems match each other, it results in an exaltation of the reflection and annihilation of both transmission and absorption. This can be seen as a sort of induced reflection. \item In the frequency range far from the resonance frequencies of the weakly coupled sub-system, a Lorentz-like absorption enhancement can be observed (right inserts of Figs. (\ref{spectrum_muc_1000_sp_10nm}) and (\ref{spectrum_muc_1500_sp_10nm})). The scattering efficiency vanishes and the absorption takes its maximum value close to unity. \end{enumerate} Before commenting on the first point raised above, let us recall that, in general, the Fano resonance occurs when a narrow band resonance sub-system interferes with a continuum or a broadband resonance sub-system. The signature of this resonance in the spectrum is the presence of two closed critical points corresponding to a vanishing value of the amplitude followed or preceded by an enhancement. In the current case, the zeros of the transmission $T$, in Eq. (\ref{transmission approximation}), are the zeros of the coefficient $r_{13}$ and these frequency values are always followed or preceded by great or little transmission enhancements. Therefore the Fano resonance shape becomes obvious.\\ For the second point, let us recall the resonance condition of the first sub-system. It is obtained from the zeros of the reflection coefficient $R_{12}$, in Eq. \ref{reflection}, as soon as: \begin{eqnarray}\label{resonance1} \phi_1 r_2 \phi_3 \simeq -r_1 \text{ and } 1+r_1\phi_1 r_2 \phi_2 \neq 0 , \end{eqnarray} There is an extinction of the reflection without any annihilation of the transmission. Knowing that the resonance condition of the strongly coupled system is given by \begin{equation}\label{resonance2} r_{13}(\omega) \simeq 0, \end{equation} when the latter resonance condition Eq. (\ref{resonance2}) meets the former Eq. (\ref{resonance1}), it results \begin{equation}\label{resonance3} r_{13}\phi_1 r_2 \phi_3 \simeq 0 \end{equation} which leads to an exaltation of reflection, and an annihilation of the transmission ( see Eq. \ref{transmission approximation}) and the absorption. The spectral responses of the structure are shown to be highly tunable by changing a gate voltage applied to the graphene sheet. {{The height $h_2$ of the horizontal cavity influences the system through the effective index $\alpha_0^{(3)}$. The dispersion curves of the effective index $\alpha_0^{(3)}$ are plotted in Fig. \ref{real_alpha_3_spacer} for different values of $h_2$ while $\mu_c$ is kept constant and equal to $1eV$. It can be seen that increasing $h_2$ leads to a decrease of the real part of $\alpha_0^{(3)}$. Since the $x$ dependance of the electromagnetic field in the cavity may be approximated by $H_y(x)=A^+ exp(ik \alpha_0^{(3)}x)+A^- exp(-ik \alpha_0^{(3)}x)$, ($k=2\pi/\lambda$), for a given $d$-length cavity, the resonance wavelengths can be approximately obtained through a phase condition on the term $A^{\pm} sin(2\pi d \alpha_0^{(3)}/\lambda_r$). When $\alpha_0^{(3)}$ decreases, the resonance wavelength $\lambda_r$ brought by the strongly coupled sub-system also decreases. Consequently increasing spacer height pushes the resonance wavelengths resulting from the strongly coupling sub-system towards the visible wavelengths range. The same behavior can be observed when the height $h_2$ is kept constant while increasing the chemical potential $\mu_c$ (see figure \ref{real_alpha_3_muc}). This time it is $\mu_c$ that influences the system through the effective index of the horizontal cavity. Increasing $\mu_c$ decreases $\alpha_0^{(3)}$ and thereby leads to a decrease of the resonance wavelengths.}} \begin{figure}[h] \centering \subfigure [\label{real_alpha_3_spacer}$\mu_c=1eV$] {\includegraphics[width=0.49\textwidth]{real_alpha_3_spacer.pdf}} \centering \subfigure [\label{real_alpha_3_muc} $h_2=10 nm$] {\includegraphics[width=0.49\textwidth]{real_alpha_3_muc.pdf}} \caption{Dispersion curves of the effective index $\alpha_0^{(3)}$ for different values of $h_2$, ($\mu_c=1eV$) (Fig. (\ref{real_alpha_3_spacer})) and for different values of $\mu_c$ ($h_2=10 nm$) (Fig. (\ref{real_alpha_3_muc})). Increasing the chemical potential $\mu_c$ or the spacer width $h_2$, the real part of $\alpha_0^{(3)}$ decreases. Parameters: $\varepsilon^{2}=1.54^2$.} \end{figure} By tuning the potential $\mu_c$, one can realize the condition of Eq. (\ref{resonance3}) leading to an induced reflection phenomenon. For the last point raised, the Lorentz resonance shape of the absorption is provided by the poles of the scattering parameters of the system \textsl{i.e.} when $1+r_1\phi_1 r_{13} r_2 \phi_2 \simeq 0$ leading to weak values of both reflection and transmission. Besides, the exaltation of the absorption always occurs around frequencies where both reflection and transmission are weak and equal and these frequencies are different from the zeros of the coefficient $r_{13}$. Therefore in the frequency range far from the resonance frequency of the EOT sub-system, the hybrid structure behaves as a tunable perfect absorber. \\ {{Finally, it is worth noticing that the present model works very well for normal incidence and reasonably well for angles of incidence up to twenty degrees. For large angles of incidence, some new resonances appear in the spectra and are not captured by our model.}} \section{Conclusion} {{In conclusion, we have proposed a simple model, allowing to deepen the comprehension of the resonance phenomena involving the EOT phenomenon and a metal/insulator/graphene gap plasmon excitation. We consider a hybrid structure that consists of a 1D array of periodic subwavelength slits ended by a metal/insulator/graphene gap. For our analysis, this hybrid structure is split into two sub-systems. Each sub-system is driven by eigenmodes operating in an appropriate coupling regime. The study of the first sub-system, characterised by modes operating in a weak coupling regime, allows to understand the broadband resonance of the hybrid system. We provided an analytical expression of the reflection and transmission coefficients of this first sub-system. The behavior of the second sub-system, characterized by modes acting in a regime of strong coupling allows to understand the narrow-band nature of the hybrid system. Here, the resonance frequencies directly depend on the metal-insulator-graphene horizontal Perot Fabry cavity effective index. Since the real part of this effective index decreases by increasing the graphene sheet chemical potential, the resonance wavelengths of the system become perfectly tunable ; better yet an induced reflection phenomenon or perfect absorption can be achieved with suited values of the graphene sheet Fermi level. We proposed a spectral function allowing not only to characterize the resonance frequencies of this second sub-system, but also showed that introducing this spectral function into the reflection and transmission coefficients of the first sub-system, we obtain an analytical expression of the reflection and transmission coefficients of the global hybrid system which are successfully compared with those obtained with rigorous numerical simulations (through the PMM approach). Finally, armed with these analytical expressions, we provided a full description of the resonance phenomena occurring in the system. Our analysis in terms of simple modes couplings can be extended to study the coupling of the lattice modes with a substrate made by a non-reciprocal photonic topological materials, of particular interest for energy management and transport \cite{Doyeux} and for atomic manipulation \cite{Silveirinha}. The analysis of such complex hybrid configurations involving diffraction gratings coupled to hybrid graphene multilayer structures could also be applied to study and to estimate more complicated phenomena, like the Casimir effect \cite{Messina1} and the radiative heat transfer \cite{BZhao}.\\ }} {\bf{Funding}}\\ This work has been sponsored by the French government research program "Investissements d'Avenir" through the IDEX-ISITE initiative 16-IDEX-0001 (CAP 20-25)\\
\section{Introduction} Fast radio bursts (FRB) are luminous pulses of $\sim$ GHz radio emission with durations of less than a few milliseconds and large dispersion measures (DM), indicating an extragalactic origin (\citealt{Lorimer+07,Keane+12,Thornton+13,Spitler+14,Ravi+15,Champion+16,Petroff+16,Lawrence+17,Shannon+18,James+18}). The cosmological origin of at least one burster was confirmed by the discovery of the repeating source FRB 121102 \citep{Spitler+14,Spitler+16,Scholz+16,Law+17} and its localization \citep{Chatterjee+17} to a dwarf star-forming galaxy at redshift $z = 0.1927$ \citep{Tendulkar+17}. A second repeating source was recently discovered by the CHIME survey \citep{CHIME+19b}. A larger sample of FRBs, including new repeating sources, will be discovered over the next few years by surveys including SUPERB \citep{Keane+18}, CHIME \citep{CHIME+18}, and ASKAP \citep{Shannon+18}. The short durations of FRBs, with sub-structure down to tens of microseconds \citep{Michilli+18}, are suggestive of their central engines being stellar-mass compact objects such as pulsars \citep{Cordes&Wasserman16} or magnetars (e.g.~\citealt{Popov&Postnov13,Lyubarsky14,Kulkarni+15}), especially ones at particularly active stages in their lives \citep{Metzger+17,Beloborodov17}. However, other engine scenarios remain in contention which can in principle produce repeating bursts, such as the collision between primordial magnetic dipoles \citep{Thompson17} or "cosmic combs" produced by the interaction between a neutron star's magnetosphere and a dense outflow from a nearby AGN \citep{Zhang17,Zhang18}. The high fluxes $\sim 0.1-1$ Jy and large distances of FRBs imply enormous brightness temperatures $\gtrsim 10^{37}$ K, requiring a coherent emission process (e.g.~\citealt{Katz16,Lyutikov19}). The two most commonly discussed mechanisms are curvature radiation produced close to the surface of the neutron star (e.g.~\citealt{Kumar+17,Lu&Kumar18}) and the maser synchrotron process (e.g.~\citealt{Hoshino&Arons91,Long&Peer18}). A common variant of the latter postulates emission from an ultra-relativistic shock moving towards the observer, which propagates into an upstream medium of moderately high magnetization, $\sigma \gtrsim 10^{-3}$ \citep{Lyubarsky14,Beloborodov17}.\footnote{The shock magnetization $\sigma$ is defined as the ratio of incoming Poynting flux to particle energy flux.} Such shocks are mediated by Larmor rotation of charges entering the shock and gyrating around the ordered magnetic field. This creates the necessary population inversion in the form of an unstable ring-like particle distribution function, which relaxes by transferring energy into an outwardly propagating coherent electromagnetic wave (e.g.~\citealt{Gallant+92,hoshino_92,Amato&Arons06,Hoshino08,Sironi&Spitkovsky09,Sironi&Spitkovsky10,Iwamoto+17,Iwamoto+18,Plotnikov&Sironi19}). In the magnetar scenario, these shocks result from the transient release of energy during the earliest stages of a flare. Part of the star's magnetosphere ``snaps off'' while still relatively clean of plasma, transforming into an outgoing $\sigma \gg 1$ magnetic pulse that collides with the surrounding environment on much larger radial scales \citep{Lyubarsky14}. The magnetar-powered synchrotron maser shock model makes several predictions which are consistent with FRB observations. First, it explains the high measured linear polarization of some FRBs \citep{Ravi+16,Petroff+17,Caleb+18}, which for FRB 121102 is nearly 100\% \citep{Michilli+18,Gajjar+18}.\footnote{Although some FRBs show no detectable linear polarization, this may be the result of propagation effects in a local magnetized medium, such as Faraday rotation (which cannot be subtracted off without sufficient spectral resolution; \citealt{Michilli+18}) or Faraday conversion into circularly polarized emission \citep{Vedantham&Ravi18,Gruzinov&Levin19}.} Particle-in-cell (PIC) simulations show that a large-amplitude linearly polarized X-mode wave (the nascent FRB) is created at the shock front and propagates into the upstream medium (e.g.~\citealt{Gallant+92,Plotnikov&Sironi19}). The intrinsic polarization angle of bursts from FRB 121102 was measured to be roughly constant over $\gtrsim 7$ months of observations \citep{Michilli+18}, during which the source presumably underwent thousands of bursts. This requires a fixed direction for the magnetic field of the upstream plasma into which the FRB-producing ejecta collides. Such a fixed field structure naturally occurs in the outflow from a rotating compact object, for which the magnetic field wraps around the (approximately fixed) rotation axis. Another appealing aspect of the synchrotron maser is its high efficiency, $f_{\xi}$, for converting the kinetic energy of the ejecta into coherent electromagnetic radiation. One-dimensional PIC simulations of magnetized ultra-relativistic shocks propagating in {\it pair plasmas} find a maximum efficiency of up to several percent for an upstream magnetization $\sigma \sim 0.1$, which decreases as $f_{\xi} \propto \sigma^{-2}$ for $\sigma \gg 1$ \citep{Plotnikov&Sironi19}. This is compatible with the lower limit on the efficiency of $f_{\xi} \gtrsim 10^{-6}-10^{-7}$ for FRB 121102 in magnetar models, under the assumption that the source bursts in a (time-averaged) isotropic manner with its current luminosity function for an active lifetime of $\sim 100$ yr \citep{Nicholl+17}. Although the maser efficiency could be lower in the physical case of higher dimensions than was found in 1D PIC simulations \citep{Sironi&Spitkovsky09}, recent multi-dimensional simulations find the drop in efficiency is only a factor of $\lesssim 10$ for $\sigma\lesssim 1$ (\citealt{Iwamoto+17,Iwamoto+18}) and even less at high magnetizations $\sigma\gtrsim 1$ (Sironi et al, in prep.). The properties of the synchrotron maser in {\it electron-ion} and {\it pair-ion} plasmas are less well characterized: while one-dimensional simulations find efficient electron (and positron) maser emission \citep{Hoshino08}, in multi-dimensional studies it has been shown that efficient maser emission leads to strong heating of the incoming pairs \citep{lyubarsky_06}, which in turns suppresses the efficiency of the synchrotron maser \citep{Sironi&Spitkovsky10}. For low magnetizations ($\sigma \lesssim 1$), the spectral energy distribution (SED) of the synchrotron maser is peaked in the post-shock frame at a few times the plasma frequency of the upstream electrons $\nu_{\rm pk} \sim 3\nu_{\rm p}$, with power extending to frequencies $\gg \nu_{\rm p}$ and detailed structures due to overlapping line-like features produced by a large number of resonances \citep{Plotnikov&Sironi19}.\footnote{In electron-ion or pair-ion plasmas, the synchrotron maser emission propagating upstream has the effect of boosting the incoming electrons (and positrons) towards the shock \citep{lyubarsky_06}, so they enter the shock with bulk kinetic energy comparable to the incoming ions, which leads to maser emission peaking near the ion plasma frequency.} These features are at least qualitatively consistent with the observed complex, and sometimes narrow-band SEDs, of observed FRBs (e.g.~\citealt{Ravi+16,Law+17,Macquart+18}). Temporal-frequency evolution could be imprinted by plasma lensing effects during the propagation to Earth (e.g.~\citealt{Cordes+17,Main+18}) rather than being an intrinsic property of the bursts. Furthermore, induced scattering by the matter just upstream of the shock \citep{Lyubarsky08} could play a crucial role in shaping the observed light curve and spectrum. A key question in the shock-powered FRB scenario is the nature of the upstream medium into which the ultra-relativistic ejecta from the engine collides. Relevant here is the compact unresolved ($< 0.7$ pc) luminous persistent synchrotron radio source located coincident with the spatial position of FRB 121102 \citep{Chatterjee+17,Marcote+17}. A related clue is the enormous rotation measure of the bursts, RM $\sim 10^{5}$ rad m$^{-2}$ \citep{Michilli+18}. The persistent emission and high-RM likely originate from the same medium, showing that the FRB source is embedded in a dense magnetized plasma (e.g.~\citealt{Michilli+18,Vedantham&Ravi18}). While this environment need not be directly related to the bursting source itself (for instance if a flaring magnetar just happens to reside close to an AGN; \citealt{Eatough+13}), it could instead be a compact transient nebula powered by the FRB central engine \citep{Murase+16,Metzger+17,Beloborodov17,Waxman17}. The high RM would then indicate that the ejecta from the bursting source is predominantly of an ion-electron composition by particle number as well as mass (an electron/positron pair plasma, such as those of normal rotational-powered pulsar winds, contributes no net RM). \citet{Margalit&Metzger18} demonstrate that a single expanding and continuously-energized magnetized ion-electron nebula embedded within a young supernova remnant of age $10-40$ years is consistent with all of the properties of the persistent source of FRB 121102 (size, flux, self-absorption constraints) and the large but decreasing RM (see also \citealt{Margalit+18}). The persistent emission can be explained as synchrotron radiation from electrons heated thermally at the termination shock (of size $\sim 10^{17}$ cm) of the magnetar wind behind the expanding supernova ejecta, while the RM originates from the electrons injected earlier in the nebula's history and cooled through expansion and radiative losses to become non-relativistic. Of particular relevance to this work, the properties of the ion-electron injection are relatively tightly constrained: the time-averaged wind entering the nebula must possess a sub-relativistic velocity $v_w \sim 0.5$ c (similar to the escape speed of a neutron star) and a present-day mass injection rate of $\dot{M} \sim 10^{19}-10^{21}$ g s$^{-1}$. The high required time-averaged baryon loading of material entering the nebula contrasts with the much "cleaner" but short-lived $\lesssim 1$ ms ultra-relativistic ejection events needed to power FRBs themselves. This suggests a picture in which the bulk of the ions emerge from the star after major flares, and then subsequently serves as the upstream medium into which the next flare collides to produce the FRB, as first proposed by \citet{Beloborodov17}. One is thus led to hypothesize that FRBs, at least those from FRB 121102, result from internal shocks in the magnetar wind between two media with rather different properties. This paper develops the internal-shock scenario for FRB in light of recent particle-in-cell (PIC) simulation work on the properties of the synchrotron maser emission \citep{Plotnikov&Sironi19}. Motivated by observations of the well-studied repeating source FRB 121102, we then apply our results to address several outstanding questions, including: \begin{itemize} \item{What determines the $\sim 0.1-10$ GHz frequency range over which FRBs are detected? Does this range arise naturally from the model, or is fine-tuning of the upstream medium required?} \item{If FRBs originate from sudden reconnection events in neutron star magnetospheres, for which the light crossing time is $\lesssim 0.1$ ms, then how can bursts possess intrinsic durations up to several milliseconds ($\gtrsim 10$ times longer than would naively be guessed)?} \item{Spectral features observed during sub-bursts from FRB 121102 drift downwards in frequency over time \citep{Hessels+18}. Similar behavior was seen from the new CHIME repeating source, FRB 180814.J0422+73 \citep{CHIME+19b}. What produces this drifting? Why is it always downward? and how does it inform the nature of the shocks and upstream environment? } \item{Time-resolved observations of the bursts from FRB 121102 show a narrowly-peaked spectral energy distribution of width $\Delta \nu/\nu \sim 0.1-0.2$ \citep{Law+17}. If FRB emission arises from a relativistic shock then an intrinsically wider spectrum would imprinted by Doppler smearing across the shock front. If FRBs arise from relativistic shocks, attenuation or amplification of the intrinsic spectrum by an external medium is likely playing an important role. What is this external medium and its effect on the observed radiation?} \item{Given the efficiency of FRB emission, accounting for attenuation by the upstream medium, what energetic constraints are imposed on the central engine by the repeater FRB 121102?} \item{The burst arrival times from FRB 121102 are non-Poissonian and clustered (e.g.~\citealt{Spitler+14,Opperman+18,Katz18,Li+19}), with large "dark" phases of little or no apparent FRB activity (e.g.~\citealt{Price+18}). Does this behavior indicate true intermittency of the central engine activity, or can it result also from a time-changing external environment (e.g. as shaped by prior flares)?} \item{FRB 121102 showed an increase of $\sim 1-3$ pc cm$^{-3}$ in its DM over a 4 year baseline \citep{Hessels+18}. While an expanding ionized supernova ejecta shell can result in a time-dependent DM \citep{Connor+16,Piro16}, the predicted evolution is usually a {\it decrease} \citep{Margalit+18} unless the medium surrounding the supernova is unusually dense \citep{Yang&Zhang17,Piro&Gaensler18}. What additional mechanisms can give rise to stochastic or secular variation in DM?} \item{Any coherent maser synchrotron emission should have accompanying {\it incoherent} synchrotron radiation at much higher photon energies from electrons thermally heated at the same shock \citep{Lyubarsky14}. What are the properties of this multi-wavelength FRB afterglow?} \end{itemize} Although the magnetar scenario is appealing for several reasons, a wider range of models postulate a central engine that impulsively injects energy into a dense external environment (e.g. the gaseous environment of an AGN). This is particularly relevant given that it is not clear whether the nature and environment of FRB 121102 is generic to all repeaters or to the broader class of FRBs which have thus far been observed to burst only once \citep{Caleb+18}. This motivates developing the more general scenario of a decelerating ultra-relativistic blast wave and its time-dependent synchrotron maser emission. This interaction was first pioneered in the context of AGN jets (e.g.~\citealt{Blandford&McKee76}) and the synchrotron afterglow of gamma-ray burst (GRB) jets (e.g.~\citealt{Meszaros&Rees93,Katz94,Sari&Piran95,Sari+98}). Here we extend this analysis to FRBs, providing scaling relationships that should prove useful in modeling future events in terms independent of the central engine model. \begin{figure*} \centering \includegraphics[width=1.0\textwidth]{cartoon_v3.pdf}\\ \caption{Radial scales and physical processes surrounding a repeating FRB source as described in this paper. The central engine releases an ultra-relativistic shell of energy $E$, duration $\delta t \lesssim 1$ ms, and radial width $c \delta t$, which collides with a mildly-relativistic magnetized ion-electron shell of velocity $v_w$, baryon density $n_{\rm ext} \propto r^{-k}$, magnetization $\sigma \sim 0.1-1$ and total width $v_w \Delta T$, as released following the previous major flare a time $\Delta T$ ago. The shell decelerates through reverse and forward shocks ($\S\ref{sec:dynamics}$), the latter of which produces the observed coherent radio emission (fast radio burst) through the synchrotron maser mechanism ($\S\ref{sec:FRB}$; Fig.~\ref{fig:SED}). The upstream magnetic field $\vec{B}$ is wrapped in the toroidal direction perpendicular to the rotation axis $\Omega$ of the central engine, resulting in linear polarization of the FRB emission along the direction of $\Omega$. The radio pulse is attenuated in the ion shell by induced Compton scattering at low frequencies $\nu < \nu_{\rm max}$ ($\S\ref{sec:scattering}$; eq.~\ref{eq:numax}). As the blast wave decelerates, the decreasing Lorentz factor $\Gamma$ of the shocked gas and the reduced scattering optical depth of the upstream medium results in a downward drift of $\nu_{\rm max}$ over the duration of the observed burst (Fig.~\ref{fig:SEDevo}). The forward shock also heats electrons to ultra-relativistic temperatures, powering (incoherent) synchrotron X-ray/gamma-ray emission, similar to a gamma-ray burst afterglow ($\S\ref{sec:afterglow}$; Fig.~\ref{fig:afterglow}). On larger scales, the train of ion shells from consecutive flares merges into a wind that feeds the nebula through a termination shock. Electrons injected at the termination shock powers the persistent radio source and (after cooling) generates the large rotation measure of the bursts. Stochastic or secular variation in the burst DM can also arise from the ion shell (on timescales of $\Delta T \lesssim$ days) or from photo-ionization of the supernova ejecta by the flare X-rays (on timescales of the source age of years to decades). } \label{fig:schematic} \end{figure*} This paper is organized as follows. In $\S\ref{sec:dynamics}$ we review the dynamics of shock deceleration of an ultra-relativistic flare of ejecta by a slowly expanding upstream medium (the upstream ion wind inferred for FRB 121102). In $\S\ref{sec:FRB}$ we combine the dynamics with the result of PIC simulations to predict the time-dependent synchrotron maser emission, which we apply to the above questions, particularly motivated by observations of FRB 121102; an important ingredient in the observed emission is the role of induced scattering ($\S\ref{sec:scattering}$). In $\S\ref{sec:afterglow}$ we describe the coincident synchrotron afterglow of the flares. In $\S\ref{sec:discussion}$ we summarize our results and expand on their implications. \section{Shock Deceleration of the Flare Ejecta} \label{sec:dynamics} Consider a scenario in which a central engine suddenly injects an isotropic energy $E$ over a short duration $\delta t \lesssim 10^{-4}-10^{-3}$ s, producing a radially-expanding shell with an initial bulk Lorentz factor $\Gamma_{\rm ej} \gg 1$. This ultra-relativistic shell collides with a sub-relativistic (effectively stationary) external medium characterized by a power-law radial density profile $n_{\rm ext} \propto r^{-k}$, where $k < 3$. This section reviews how the ultra-relativistic shell transfers the energy $E$ to the surrounding medium through a time-dependent shock wave. While our description can be generalized to any central engine, in $\S\ref{sec:upstream}$ we first review order-of-magnitude estimates for the properties of the fast ejecta and external medium in the flaring magnetar scenario, as these will motivate numerical evaluation of key expressions used later. \subsection{Upstream Ion Wind in Flaring Magnetar Scenario} \label{sec:upstream} A neutron star born with a strong internal magnetic field $\gtrsim 10^{16}$ G, possibly as a result of rapid rotation at birth \citep{Duncan&Thompson92}, possesses a total reservoir of magnetic energy of $E_{B_{\star}} \gtrsim 10^{50}$ erg. The magnetic field is predicted to leak out of the star over a timescale $t_{\rm life} \sim 10-100$ yr set by ambipolar diffusion in its core \citep{Beloborodov&Li16}, similar to the inferred age of the source responsible for FRB 121102 (e.g.~\citealt{Metzger+17}). The emergence of magnetic energy is unlikely to be a steady process, but instead could occur in discrete bursts perhaps similar to the flares from significantly older and less active magnetars in our Galaxy. \newpage \citet{Opperman+18} found a mean repetition rate of 5.7$^{+3.0}_{-2.0}$ bursts per day for FRB 121102, corresponding to an average interval $\Delta T \sim 10^{4}$ s. The repetition pattern is non-Poissonian \citep{Opperman+18}, indicating that the bursts are often clustered in time such that $\Delta T$ can be substantially shorter (e.g. 6 of the 11 bursts from \citet{Spitler+16} were detected within a 10 minute period), with median intervals between flares of hundreds of seconds (see also \citealt{Katz18,Li+19} for detailed analysis). However, weighted by radiated energy, the luminosity function of FRB 121102 is dominated by the rare highest fluence bursts, which take place at a rate $\lesssim 1$ day$^{-1}$ ($\Delta T \gtrsim 10^{5}$ s; e.g.~\citealt{Nicholl+17,Law+17}). The total energy available between each strong flare is then \begin{equation} E_{\rm tot} \sim (E_{B_{\star}}/t_{\rm life})\Delta T \sim 10^{45}-10^{46}{\rm erg}. \end{equation} In our scenario, this energy is shared between at least one "clean" initial ultra-relativistic $\Gamma_{\rm ej} \gg 1$, potentially highly-magnetized $\sigma \gg 1$ pulse of energy $E$ at the beginning of the flare responsible for the powering the FRB \citep{Lyubarsky14,Beloborodov17} and a more prolonged phase of ion-loaded mass-loss which emerges with a sub-relativistic velocity $\beta_w = v_w/c \lesssim 1$ and lower magnetization $\sigma \lesssim 1$. The latter forms the upstream medium into which the clean pulse from subsequent flares collides, as well as feeds the nebula electrons to power the persistent radio source and generate its high RM \citep{Margalit&Metzger18}. While the physical mechanism, and thus the time-dependence, of the ion mass loss is theoretically uncertain, for FRB 121102 the time-averaged ion injection rate $\dot{M}$ at the present epoch is constrained to be $\sim 10^{19}-10^{21}$ g s$^{-1}$ (\citealt{Margalit&Metzger18}). The kinetic energy carried by the ion ejecta of each major flare, \begin{equation} E_w \sim (\dot{M}v_{\rm w}^{2}/2)\Delta T \sim 10^{46}\,{\rm erg}\,\,\dot{M}_{21}\Delta T_{5}\left(\frac{\beta_w}{0.5}\right)^{2}, \label{eq:Edotw} \end{equation} is therefore within the magnetar's budget, $\sim E_{\rm tot}$ \citep{Margalit&Metzger18}. Here and hereafter we employ the short-hand notation $q_x = q/10^{x}$ in cgs units, e.g. $\dot{M}_{21} = \dot{M}/(10^{21}$ g s$^{-1})$. We consider two limits for the time-dependence of the ion-electron wind. First, if the ions were to emerge from the magnetar isotropically at a strictly constant rate, then the radial density profile would be that of a steady wind, \begin{equation} n_{\rm ext} = \frac{\dot{M}}{4\pi v_w r^{2} m_p} \,\,\,\,\text{steady\,wind\,($k = 2$).} \label{eq:nwind} \end{equation} Perhaps more realistically, the ions are released in temporally-concentrated episodes following each major flare. This scenario is consistent with the high mass-loading of the ejecta inferred from the radio afterglow of the 2004 giant flare from SGR 1806-20 \citep{Gelfand+05,Taylor+05,Granot+06}. On average, the ion shell from each flare must contain sufficient mass, $\Delta M = \dot{M}\Delta T$, to produce the same time-averaged value of $\dot{M}$. At large radii, $r \gg r_{\rm s}$, where \begin{equation} r_{\rm s} \equiv v_w \Delta T \sim 1.5\times 10^{15}{\rm cm}\,\left(\frac{\beta_w}{0.5}\right) \Delta T_{5}, \label{eq:rs} \end{equation} the train of ion shells from consecutive flares will merge to form a steady-wind of density similar to equation (\ref{eq:nwind}). However, at radii $r \ll r_{\rm s}$ the external density encountered by the next ultra-relativistic shell will be much smaller than for a steady wind (eq.~\ref{eq:nwind}). While not zero, because the trans-relativistically expanding ion shell has time to spread radially due to finite dispersion in its velocity, the density power-law slope will be much shallower than $\propto r^{-2}$. Under the assumption that $n_{\rm ext}$ is radially constant for $r \ll r_{\rm s}$, the external density profile at radii $r \ll r_{\rm s}$ by the time of the next strong flare will be given by \begin{equation} n_{\rm ext}(r \ll r_{\rm s}) = \frac{3\Delta M}{4\pi m_p r_{\rm s}^{3}} \approx \frac{3\dot{M}\Delta T}{4\pi m_p r_{\rm s}^{3}}\,\,\,\,\text{discrete\,shell \,($k = 0$)}. \label{eq:ndiscrete} \end{equation} While we have chosen a constant density profile somewhat arbitrary, our qualitative conclusions to follow for similarly "flat" profiles (as compared to the steady-wind case) are robust to this detail. See Figure \ref{fig:schematic} for a schematic illustration. \subsection{Dynamics of the Shell Deceleration} The deceleration of the ejecta shell by the external medium, and its resulting radiation, occurs in two phases. During the initial phase a reverse shock crosses back through the ejecta shell and the ejecta energy is transferred to the forward shock (\citealt{Sari&Piran95}).\footnote{ If the ultra-relativistic ejecta shell is highly magnetized, the reverse shock will be weak; however, the dynamics of the forward shock, of greatest interest here as the likely site of the FRB emission (see $\S\ref{sec:FRB}$), are relatively insensitive to the dynamics of the reverse shock. } This process completes once the reverse shock passes entirely through the ejecta shell, as occurs at the deceleration radius, $r_{\rm dec}$. This phase is then followed by a self-similar deceleration of the forward shock at radii $r \gg r_{\rm dec}$ (\citealt{Blandford&McKee76}). Although this overall evolution is well documented in the GRB literature (e.g.~\citealt{Kumar&Zhang15}), we repeat it here for purposes of clarity. \subsubsection{Early and Late Deceleration Phases} Consider first the early deceleration phase ($r \ll r_{\rm dec}$). In the rest frame of the upstream medium, the ultra-relativistic shell of thickness $\Delta = c \cdot \delta t$ does not have time to expand radially as it moves outwards into the external medium. The co-moving density in the unshocked ejecta shell at radius $r$ is thus given by \begin{equation} n_{\rm ej} \simeq \frac{E}{\delta t}\frac{1}{4\pi r^{2} m_p c^{3} \Gamma_{\rm ej}^{2}}, \label{eq:nej} \end{equation} where we have assumed a cold ejecta shell dominated by its bulk kinetic energy. The ratio of the density of the ultra-relativistic ejecta shell (eq.~\ref{eq:nej}) to that of the external medium $n_{\rm ext} \propto r^{-k}$ is defined as \begin{equation} f \equiv \frac{n_{\rm ej}}{n_{\rm ext}} \propto r^{k-2}. \end{equation} When $f \gg 1/\Gamma_{\rm ej}^{2}$, as in all cases of present interest, the reverse shock is ultra-relativistic \citep{Sari&Piran95}. It crosses the ejecta shell on a timescale and by a radius given, respectively, by\footnote{The pre-factor here can vary moderately from the assumed value of 2, depending on the details of the hydrodynamical evolution (e.g.~\citealt{Sari97}). We nevertheless adopt this factor to follow common convention.} \begin{equation} \tilde{t}_{\rm dec} \approx 2\Gamma^{2}(t_{\rm dec})\delta t,\,\,\, r_{\rm dec} = c\tilde{t}_{\rm dec}, \end{equation} where a tilde denotes time in the rest-frame of the upstream medium, which we approximate as being stationary ($\beta_w \ll 1$), and $\Gamma$ is the Lorentz factor of the shocked gas. The latter obeys \citep{Sari&Piran95} \begin{equation} \Gamma (r \ll r_{\rm dec}) = \left(\frac{f\Gamma_{\rm ej}^{2}}{4}\right)^{1/4} \propto r^{\frac{(k-2)}{4}} = \left\{ \begin{array}{lr} r^{-1/2} & k = 0 \\ r^{0} & k = 2 \\ \end{array} \right. . \label{eq:RC} \end{equation} during the reverse shock crossing phase. At times $\tilde{t} \gg \tilde{t}_{\rm dec}$, or radii $r \gg r_{\rm dec}$, the forward shock evolution approaches the \citet{Blandford&McKee76} self-similar form, \begin{eqnarray} &&\Gamma (r \gg r_{\rm dec}) \nonumber \\ & =& \left(\frac{17-4k}{16\pi}\frac{E}{m_p n_{\rm ext} r^{3}c^{2}}\right)^{1/2} \propto r^{\frac{(k-3)}{2}} = \left\{ \begin{array}{lr} r^{-3/2}, & k = 0 \\ r^{-1/2}, & k = 2 \\ \end{array} \right. . \nonumber \\ \label{eq:BM} \end{eqnarray} The transition in the evolution of $\Gamma (t)$ at $r_{\rm dec}$ between that given by equations \ref{eq:RC} and \ref{eq:BM} is smooth, \begin{equation} \Gamma (r \gg r_{\rm dec}) \approx \Gamma (r_{\rm dec})\left(\frac{r}{r_{\rm dec}}\right)^{\frac{(k-3)}{2}}. \end{equation} The above relations assume adiabatic (energy conserving) evolution of the shock. This is justified because, although electrons cool efficiently through synchrotron radiation ($\S\ref{sec:afterglow}$), ions$-$which likely hold the majority of the energy$-$do not. \subsubsection{Full Time Evolution} \label{sec:evo} We now summarize various properties of the shock as a function of time $t \simeq (r/c)(1-\beta) \simeq r/(2c\Gamma^{2}$) as measured by an observer ahead of the shock, for both the early and late deceleration phases. The luminosity of the shock as seen by an observer directly ahead of the shock (within its $1/\Gamma$ cone) is given by \begin{equation} L_{\rm sh} \approx 4\pi r^{2} n_{\rm ext}\Gamma ^{4} m_p c^{3} \propto \Gamma ^{4}r^{2-k}. \label{eq:Lsh} \end{equation} First note the observed deceleration time equals the duration of central engine activity, \begin{equation} t_{\rm dec} \approx \frac{\tilde{t}_{\rm dec}}{2\Gamma ^{2}} \sim \delta t, \end{equation} a well-known result from GRBs. At earlier times $t \ll t_{\rm dec} \sim \delta t$, \begin{eqnarray} r \propto t^{\frac{2}{(4-k)}} &=& \left\{ \begin{array}{lr} t^{1/2}, & k = 0 \\ t^{1}, & k = 2 \\ \end{array} \right. , \end{eqnarray} \begin{eqnarray} \Gamma \propto t^{\frac{(k-2)}{2(4-k)}} &=& \left\{ \begin{array}{lr} t^{-1/4}, & k = 0 \\ t^{0}, & k = 2 \\ \end{array} \right. , \end{eqnarray} \begin{eqnarray} n_{\rm ext}(r) \propto t^{\frac{-2k}{(4-k)}} &=& \left\{ \begin{array}{lr} t^{0}, & k = 0 \\ t^{-2}, & k = 2 \\ \end{array} \right. , \end{eqnarray} \begin{eqnarray} L_{\rm sh} \propto n_{\rm ext}\Gamma ^{4}r^{2} \propto t^{0},\,\,\,\,\,\, k = 0, 2 \end{eqnarray} For times $t \gg t_{\rm dec} \sim \delta t$ we have \begin{eqnarray} r_{\rm sh} \propto t^{\frac{1}{(4-k)}} &=& \left\{ \begin{array}{lr} t^{1/4}, & k = 0 \\ t^{1/2}, & k = 2 \\ \end{array} \right. , \end{eqnarray} \begin{eqnarray} \Gamma \propto t^{\frac{(k-3)}{2(4-k)}} &=& \left\{ \begin{array}{lr} t^{-3/8}, & k = 0 \\ t^{-1/4}, & k = 2 \\ \end{array} \right. , \end{eqnarray} \begin{eqnarray} n_{\rm ext}(r_{\rm sh}) \propto t^{\frac{-k}{(4-k)}} &=& \left\{ \begin{array}{lr} t^{0}, & k = 0 \\ t^{-1}, & k = 2 \\ \end{array} \right. , \end{eqnarray} \begin{eqnarray} L_{\rm sh} \propto n_{\rm ext}\Gamma ^{4}r_{\rm sh}^{2} \propto t^{-1}, \,\,\,\,\,\,k = 0, 2 \label{eq:Lext} \end{eqnarray} The fluence released by the shock $\sim L_{\rm sh}t$ per decade in time is therefore relatively constant at times $t \gg \delta t$. As discussed below, these time-dependent properties give rise to time-evolving FRB emission (\S\ref{sec:FRB}) and a broad-band synchrotron afterglow (\S\ref{sec:afterglow}). \subsubsection{Numerical Values in Magnetar Model} \label{sec:numerical} Here we provide numerical estimates of relevant shock quantities at $r = r_{\rm dec}$ ($t = \delta t$), separately for the steady wind ($k = 2$; eq.~\ref{eq:nwind}) and discrete shell ($k = 0$; eq.~\ref{eq:ndiscrete}) scenarios for the upstream medium. Combined with the power-law evolution specified in \S \ref{sec:evo}, these determine their values at all times. \paragraph{Steady Wind ($k = 2$).} For a steady-wind external medium, the Lorentz factor of the shocked gas (eq.~\ref{eq:RC}) is constant during the early reverse shock-crossing phase, \begin{equation} \Gamma (r \ll r_{\rm dec}) = \left(\frac{E/\delta t}{4\dot{M}c^{2}}\beta_w\right)^{1/4} \approx 7.3 E_{43}^{1/4}\dot{M}_{21}^{-1/4} \beta_w^{1/4}\delta t_{-3}^{-1/4} , \end{equation} independent of both radius and the initial Lorentz factor $\Gamma_{\rm ej}$. The deceleration radius is then \begin{equation} r_{\rm dec} \approx 2\Gamma ^{2}c\delta t \approx 3.2\times 10^{9}{\rm cm}\, E_{43}^{1/2}\dot{M}_{21}^{-1/2} \beta_w^{1/2}\delta t_{-3}^{1/2}. \label{eq:rdecwind} \end{equation} The upstream density at the location of the shock is (eq.~\ref{eq:nwind}) \begin{equation} n_{\rm ext}(r_{\rm dec}) = \frac{\dot{M}}{4\pi r_{\rm dec}^{2} m_p v_w} \approx 6\times 10^{14}{\rm cm^{-3}} E_{43}^{-1}\dot{M}_{21}^{2}\left(\frac{\beta_w}{0.5}\right)^{-2}\delta t_{-3}^{-1}. \end{equation} The shock luminosity (eq.~\ref{eq:Lsh}) at $t \lesssim t_{\rm dec}$ is constant, \begin{eqnarray} L_{\rm sh}(r_{\rm dec}) \approx \frac{E}{4\delta t} \approx 2.5\times 10^{45}{\rm erg\,s^{-1}}E_{43}\delta t_{-3}^{-1}. \label{eq:Lshconst} \end{eqnarray} The optical depth to Thomson scattering ahead of the shock is \begin{equation} \tau_{\rm T}(r_{\rm dec}) = \frac{\dot{M}\kappa_{\rm es}}{4\pi v_w r_{\rm dec}} \approx 0.5 E_{43}^{-1/2}\dot{M}_{21}^{3/2}\left(\frac{\beta_w}{0.5}\right)^{-3/2}\delta t_{-3}^{-1/2}, \label{eq:tauTw} \end{equation} where we have taken $\kappa_{\rm es} \approx 0.2$ cm$^{2}$ g$^{-1}$ for an assumed electron/heavy ion composition. The DM ahead of the shock is given by \begin{eqnarray} {\rm DM} &=& \int \left(\frac{n_{\rm ext}}{2}\right)dr \simeq \frac{\dot{M}}{8\pi m_p v_w r_{\rm dec}} \nonumber \\ &\approx& 2\times 10^{5}\,{\rm pc\,cm^{-3}} E_{43}^{-1/2}\dot{M}_{21}^{3/2}\left(\frac{\beta_w}{0.5}\right)^{-3/2}\delta t_{-3}^{-1/2}. \label{eq:DMwind} \end{eqnarray} \paragraph{Discrete Ejecta Shell ($k = 0$).} For the case of the upstream medium being an ejecta shell from a previous flare (eq.~\ref{eq:ndiscrete}), \begin{eqnarray} \Gamma (r \ll r_{\rm dec}) &=& \left(\frac{E\beta_w}{12\dot{M} c^{2}\delta t}\right)^{1/4}\left(\frac{r}{r_{\rm s}}\right)^{-1/2} \nonumber \\ &\approx& 5.5E_{43}^{1/4}\dot{M}_{21}^{-1/4}\beta_w^{1/4}\delta t_{-3}^{-1/4}\left(\frac{r}{r_{\rm s}}\right)^{-1/2}, \end{eqnarray} where the deceleration radius \begin{equation} \frac{r_{\rm dec}}{r_{\rm s}} = 7.8\times 10^{-4}E_{43}^{1/4}\dot{M}_{21}^{-1/4}\beta_w^{-1/4}\Delta T_{5}^{-1/2}\delta t_{-3}^{1/4}, \end{equation} is a small fraction of the shell radius $r_{\rm s}$ (eq.~\ref{eq:rs}), consistent with our assumed density profile (eq.~\ref{eq:ndiscrete}). In physical units, \begin{equation} r_{\rm dec} \approx 2.3\times 10^{12}{\rm cm}\, E_{43}^{1/4}\dot{M}_{21}^{-1/4}\beta_w^{3/4}\Delta T_{5}^{1/2}\delta t_{-3}^{1/4}. \label{eq:rdecdiscrete} \end{equation} Note that, on timescales of milliseconds, the flare ejecta interacts with only a small fraction $\sim (r_{\rm dec}/r_{\rm s})^{3}$ of the shell mass. Solving for the Lorentz factor at the deceleration radius, \begin{eqnarray} \Gamma (r_{\rm dec}) \approx 196E_{43}^{1/8}\dot{M}_{21}^{-1/8}\beta_w^{3/8}\Delta T_{5}^{1/4}\delta t_{-3}^{-3/8}. \end{eqnarray} The shock luminosity is the same as in the wind case (eq.~\ref{eq:Lshconst}). The density at the deceleration radius is (eq.~\ref{eq:ndiscrete}) \begin{eqnarray} n_{\rm ext}(r_{\rm dec}) \approx 4\times 10^{3}{\rm cm^{-3}}\dot{M}_{21}\left(\frac{\beta_w}{0.5}\right)^{-3}\Delta T_{5}^{-2}. \label{eq:ndiscrete2} \end{eqnarray} The total column ahead of the shock is now dominated by the mean radius of the shell $r_{\rm s} = v_{w}\Delta T$ instead of $r_{\rm dec}$, such that the Thomson optical depth ahead of the shock is \begin{equation} \tau_{\rm T} = \frac{\dot{M}\kappa_{\rm es}}{4\pi v_w r_{\rm s}} \approx 7\times 10^{-7} \dot{M}_{21} \left(\frac{\beta_w}{0.5}\right)^{-2}\Delta T_{5}^{-1}, \label{eq:tauTdiscrete} \end{equation} independent of $r_{\rm dec}$. The local DM ahead of the shock is given by \begin{equation} {\rm DM} \simeq \frac{\dot{M}}{8\pi m_p v_w r_{\rm s}} \approx 0.36\,{\rm pc\,cm^{-3}}\dot{M}_{21} \left(\frac{\beta_w}{0.5}\right)^{-2}\Delta T_{5}^{-1}. \label{eq:DMdiscrete} \end{equation} \section{Synchrotron Maser Emission (FRB)} \label{sec:FRB} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{SED-eps-converted-to.pdf} \caption{Spectral energy distribution of FRB emission in the shock-powered synchrotron maser scenario, as calculated from PIC simulations by \citet{Plotnikov&Sironi19}, shown as a function of frequency in the rest-frame of emitting plasma, normalized to the upstream plasma frequency $\nu_{\rm p}$, which is close to the minimum cut-off frequency of the emission for low $\sigma$ (eq.~\ref{eq:numin}). Two cases are shown for different values of the upstream magnetization, $\sigma = 0.1$ (black) and $\sigma = 1$ (red). The two spectra are independently rescaled (in reality, the emission $\sigma=0.1$ is more luminous for fixed shock power than for $\sigma=1$). } \label{fig:SED} \end{figure} Analysis of PIC simulations by \citet{Plotnikov&Sironi19} shows that the synchrotron maser produces an electromagnetic wave ahead of the shock with relatively narrowly peaked spectral energy distribution (SED), centered about the peak frequency \begin{eqnarray} \nu_{\rm pk} &\approx& \frac{1}{2\pi}(3\Gamma \omega_p), \label{eq:nuFRB} \end{eqnarray} where the factor $\Gamma$ accounts for the relativistic Doppler shift from the frame of the post-shock gas into that of the observer (we neglect cosmological redshift effects) and the precise prefactor varies moderately in the range $\sigma \sim 0.1-1$ of interest. Here $\omega_p = (4\pi n_e e^{2}/m_e)^{1/2}$ is the plasma frequency of the medium ahead of the shock and $n_e$ is the electron density of the upstream medium. Figure \ref{fig:SED} shows the predicted SED from \citet{Plotnikov&Sironi19} for two values of the upstream magnetization, $\sigma = 0.1$ and $\sigma= 1$. A key feature of the SED is the presence of a cut-off at a minimum frequency, \begin{equation} \nu_{\rm min} \simeq \frac{1}{2\pi}(\Gamma \omega_p) \approx \frac{\nu_{\rm pk}}{3} \label{eq:numin} \end{equation} below which the shock front out-runs the precursor FRB \citep{Plotnikov&Sironi19}. While the lower frequency cut-off is sharp, the SED contains significant power even at frequencies $\gg \nu_{\rm pk}$ contributed by higher-order harmonics of the synchrotron maser. One caveat of applying these results in the present context is that the calculations assumed an upstream medium of electron/positron composition; for an ion-electron plasma the SED could in principle be different. Although the bulk of the energy carried away from the FRB 121102 source is inferred to be an ion-electron plasma \citep{Margalit&Metzger18}, the FRB is produced by a shock that passes through only a small fraction of this material, representing either the very tail-end of the flare ejecta or that injected intermittently between the major flares by the rotationally-powered component of the magnetar wind, which could have a different (e.g.~ electron/positron) composition than the bulk. Furthermore, it is not clear whether the maser emission from electron-ion shocks \citep{Hoshino08,Sironi&Spitkovsky10} will qualitatively differ from the electron/positron case. As we now discuss, the observed FRB emission is more likely to originate from the forward shock into the upstream wind than the reverse shock back into the ejecta. One piece of evidence comes from the nearly constant polarization angle of FRB 121102 over the course of many bursts \citep{Michilli+18}. Given the complex nature of magnetar flares, it would be surprising if the orientation of the magnetic field in the ultra-relativistic ejecta$-$to which the polarization angle of the maser emission is perpendicular$-$were similar for each flare. By contrast, the magnetic field carried by the slower ion-electron wind, which likely emerges from the magnetar surface over many rotation periods, could be more easily shaped into an orientation perpendicular to its fixed rotation axis. The electron-ion external medium is also likely to possess a lower magnetization than the cleaner flare ejecta, which also favors the forward shock because of the decreasing efficiency of the coherent emission for higher $\sigma$, especially given the strong $1/\sigma^{2}$ scaling at $\sigma\gg 1$ \citep{Plotnikov&Sironi19}. Finally, FRB emission from the reverse shock would need to pass through relativistically hot gas, which could attenuate the signal due to induced Compton scattering \citep{Lyubarsky08}. \begin{figure} \includegraphics[width=0.5\textwidth]{LFRBp3-eps-converted-to.pdf} \includegraphics[width=0.5\textwidth]{LFRB1p4-eps-converted-to.pdf} \includegraphics[width=0.5\textwidth]{LFRB8-eps-converted-to.pdf} \caption{Theoretical FRB light curves, expressed as fluence $t \cdot \int L_{\nu} d\nu$ as a function of time $t$ over the 0.2$-$0.4 GHz (top), 1.1$-$1.7 GHz (middle), and 6$-$10 GHz (bottom) spectral bands. These are calculated by combining the time-dependent FRB luminosity and peak frequency of the decelerating blast-wave (constant density external medium $k = 0$) with the predicted SED (Fig.~\ref{fig:SED}), accounting for attenuation at early times due to induced scattering according to the effective optical depth given by equation (\ref{eq:tauC3}). Different colors show models calculated for different assumptions about the magnetization of the upstream medium, $\sigma$. The parameters of the baseline model (black line) are: $E = 10^{45}$ erg; $\Delta T = 10^{5}$ s; $\delta t = 10^{-4}$ s, $\beta_w = 0.5$, $f_{\xi} = 10^{-3}$, $\dot{M}_{21} = 1$. Colors show models with the values of $\sigma$, $E$, and $\Delta T$ varied about the fiducial models as marked. } \label{fig:lightcurves} \end{figure} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{SEDevo-eps-converted-to.pdf} \caption{Spectral energy distribution of radio emission escaping from the vicinity of the shock at three snapshots in time relative to the 1.4 GHz duration $t_{\rm frb}$(1.4 GHz) for a model with $\delta t = 10^{-4}$ s, $E = 10^{44}$ erg, $\Delta T = 10^{5}$ s, $\beta_w = 0.5$, $f_{\xi} = 10^{-3}$, $\sigma = 0.1$. As the blast wave decelerates, the intrinsic frequency of the maser emission drifts downward at a rate $\nu_{\rm pk} \propto t^{-3/(8-2k)}$ (eq.~\ref{eq:nuFRBevo}) which depends on the power-law index of the upstream medium density profile, $n_{\rm ext} \propto r^{-k}$. Some radiation may escape just below this frequency (the spikes that appear at low frequencies) but as the fluence is highly uncertain, we have denoted this part of the spectrum with a dotted lines. The suppression of the SED across intermediate frequencies is the result of induced Compton scattering, as accounted for approximately by the effective optical depth $\tau_{\rm c}$ given by equation (\ref{eq:tauC3}). Most of the fluence escapes near the critical frequency, $\nu_{\rm max}$, above which $\tau_{\rm c} \lesssim 3$, which drifts downward as a more gradual power-law of time, $\nu_{\rm max} \propto t^{-(2k+7)/4(8-2k)}$ for $t \gtrsim \delta t$ (eq.~\ref{eq:numax2}). Due to the sensitive dependence of $\tau_{\rm c} \propto (d/d\nu)(L_{\nu}/\nu)$ on the spectral slope, in a more detailed treatment the spectral maximum is likely to be sharpened.} \label{fig:SEDevo} \end{figure} Assuming FRB emission originates from the forward shock, then using results from \S\ref{sec:evo}, we find that the peak frequency of the FRB pulse at the forward shock evolves during the early deceleration phase ($t \lesssim \delta t$) as \begin{eqnarray} \nu_{\rm pk} \propto n_{\rm ext}^{1/2}\Gamma \propto t^{-\frac{(k+2)}{8-2k}}= \left\{ \begin{array}{lr} t^{-1/4} & k = 0 \\ t^{-1} & k = 2 \\ \end{array} \right. , \end{eqnarray} while during the later deceleration phase ($t \gtrsim \delta t$) we have \begin{eqnarray} \nu_{\rm pk} \propto t^{-\frac{3}{8-2k}} = \left\{ \begin{array}{lr} t^{-3/8} & k = 0 \\ t^{-3/4} & k = 2 \\ \end{array} \right. . \label{eq:nuFRBevo} \end{eqnarray} Using numerical values from \S\ref{sec:numerical} for $\Gamma$ and taking $n_e \approx n_{\rm ext}/2$ for our assumed electron-heavy ion composition, we obtain (eq.~\ref{eq:nuFRB}) \begin{eqnarray} \nu_{\rm pk}(t > t_{\rm dec}) \approx \left\{ \begin{array}{lr} 0.18\,{\rm GHz}\,\,\ E_{43}^{1/8}\dot{M}_{21}^{3/8}\left(\frac{\beta_w}{0.5}\right)^{-9/8}\Delta T_{5}^{-3/4}t_{-3}^{-3/8} & k = 0 \\ 2.9\times 10^{3}\,{\rm GHz}\,\,\,E_{43}^{-1/4}\left(\frac{\beta_{w}}{0.5}\right)^{-3/4}\dot{M}_{21}^{3/4}t_{-3}^{-3/4} & k = 2 \\ \end{array} \label{eq:nuFRBevo2} \right. \nonumber \\ \end{eqnarray} The peak frequency of the maser emission, and thus intrinsic structure in the SED, will {\it decrease in time} as the ultra-relativistic ejecta decelerates. If the electromagnetic wave created by the synchrotron maser carries a fraction $f_{\xi} = 10^{-3}f_{\xi,-3}$ of the luminosity of the forward shock (eq.~\ref{eq:Lsh}), then the predicted evolution of the bolometric luminosity of the FRB at times $t \gg t_{\rm dec}$ is given (in both steady-wind and discrete shell scenarios) by \begin{eqnarray} \nu L_{\nu}|_{\nu_{\rm pk}}(t \gtrsim t_{\rm dec}) \approx f_{\xi}\frac{E}{4t} \approx 3\times 10^{42}\,{\rm erg\,s^{-1}}f_{\xi,-3}E_{43}t_{-3}^{-1} \label{eq:Lnu} \end{eqnarray} The radiative efficiency depends on the upstream magnetization, with 1D PIC simulations predicting $f_{\xi} \sim 0.03$ for $\sigma = 0.1-0.4$ and $f_{\xi} \approx 7\times 10^{-4}\sigma^{-2}$ for $\sigma \gg 1$ \citep{Plotnikov&Sironi19}. Based on the persistent emission from the nebula surrounding FRB 121102 and its effects on FRB propagation, the ion-loaded outflow need be only moderately magnetized, e.g.~$\sigma \sim 0.1-0.5$ (e.g.~\citealt{Vedantham&Ravi18,Gruzinov&Levin19}), in which case $f_{\xi} \sim 0.003-0.03$. On the other hand, multi-dimensional effects, or the presence of ions, could reduce the efficiency predicted from 1D electron/positron models by a factor of $10$ in the case of low $\sigma$ (\citealt{Iwamoto+17,Iwamoto+18}; Sironi et al., in prep). The FRB efficiency of the shock can also be suppressed if the upstream medium is relativistically hot (Babul et al., in prep). Although gamma-rays from the shock will heat the upstream medium via Compton scattering, we show in $\S\ref{sec:afterglow}$ that the temperatures achieved are generally not sufficiently high to reduce the value of $f_{\xi}$. \subsection{Induced Scattering} \label{sec:scattering} An important general constraint on the site of FRB emission comes from potential suppression of the short radio pulse due to induced large-angle scattering of radially-directed rays by electrons in the upstream medium through the Compton and Raman processes \citep{Lyubarsky08}. The effective optical depth for induced Compton scattering of an electromagnetic pulse of frequency $\nu$, luminosity $L_{\nu}$, and duration $t$ passing through a medium of electron density $n_e = n_{\rm ext}/2$ and radius $r$ from the central source is estimated by (\citealt{Lyubarsky08,Lyubarsky&Ostrovska16}) \begin{eqnarray} \tau_{\rm c} &\approx& \frac{1}{10}\left(\frac{3}{64 \pi^{2}}\frac{\sigma_T}{m_e}\frac{ct n_{\rm ext}}{r^{2}}\right)\frac{\partial}{\partial \nu}\left(\frac{L_{\nu}}{\nu}\right), \label{eq:tauC} \end{eqnarray} where the prefactor of $1/10$ is the suggested threshold for substantial attenuation by \citet{Lyubarsky08}, based on the additional time required for radiation at large angles to the primary beam to grow from its low initial background level. Equation \ref{eq:tauC} shows that scattering requires the photon spectrum of the primary beam $L_{\nu}/\nu$ to have a positive slope. Initially, this condition is satisfied by the narrowly-peaked synchrotron maser SED only below its spectral peak at $\nu \sim \nu_{\rm pk}$ (Fig.~\ref{fig:SED}). Making the approximation that $(\partial/\partial \nu)(L_{\nu}/\nu) \sim L_{\nu}/\nu^{2}$, the optical depth near $\nu_{\rm pk}$ is thus estimated (at times $t \gtrsim \delta t$) to be \begin{eqnarray} &&\tau_{\rm c}(\nu_{\rm pk}) \sim \frac{3}{640 \pi^{2}}\frac{\sigma_T}{m_e}\frac{\nu L_{\nu}|_{\nu_{\rm pk}} \cdot ct\cdot n_{\rm ext}}{\nu_{\rm pk}^{3} r^{2}} \nonumber \\ &\sim& \frac{2\pi^{2}}{405(17-4k)}\frac{m_p}{m_e}f_{\xi}t\nu_{\rm pk} \sim 5\times 10^{3}f_{\xi,-3}\left(\frac{\nu_{\rm pk}}{{\rm GHz}}\right)t_{-3} \label{eq:tauC2} \end{eqnarray} where in the second line we have used equations (\ref{eq:BM}), (\ref{eq:nuFRB}), and the fact that $\sigma_T \equiv 8\pi e^{4}/(3c^{4}m_e^{2})$. The scattering optical depth is therefore generically large near the SED peak when the latter is in the range relevant to FRB emission. Naively, then, Compton scattering appears to simply increase the effective value of the minimum cut-off frequency from $\nu_{\rm min}$ to $\nu_{\rm pk} \sim 3\nu_{\rm min}$, while at frequencies $\gg \nu_{\rm pk}$ radiation could still escape the upstream. However, this does not account for the fact that, as the beam is attenuated, {\it the peak of the SED will move to higher frequencies}, thereby increasing the range of frequencies with a positive photon slope that give rise to $\tau_{\rm c} > 0$ and will experience strong scattering. Although the details of this process are complex and beyond this scope of this paper, we can crudely estimate its effect by adopting the difference equation (\ref{eq:tauC2}) as an estimate of the effective optical depth at all frequencies up to where scattering becomes ineffective (once $\tau_{\rm c} \lesssim 3$). In other words, we take \begin{equation} \tau_{\rm c}(\nu) \sim \left(\frac{3}{640 \pi^{2}}\frac{\sigma_T}{m_e}\frac{\nu L_{\nu}|_{\nu_{\rm pk}} \cdot ct\cdot n_{\rm ext}}{\nu^{3} r^{2}}\right) \sim \tau_{\rm c}(\nu_{\rm pk})\left(\frac{\nu}{\nu_{\rm pk}}\right)^{-4}, \label{eq:tauC3} \end{equation} where in the final equality we have approximated the spectrum as $\nu L_\nu \propto \nu^{-1}$ for $\nu \gtrsim \nu_{\rm pk}$ (Fig.~\ref{fig:SED}). Equation (\ref{eq:tauC2}) shows that the optical depth decreases below a value $\tau_{\rm c}$ above the frequency \begin{equation} \frac{\nu}{\nu_{\rm pk}} \approx 6.4\left(\frac{\tau_{\rm c}}{3}\right)^{-1/4}f_{\xi,-3}^{1/4}\left(\frac{\nu_{\rm pk}}{{\rm GHz}}\right)^{1/4}t_{-3}^{1/4} \label{eq:numintau} \end{equation} Once the shock propagates to where the optical depth ahead of it is sufficiently low for radio emission to escape ($\tau_{\rm c} \lesssim 3$; see below), the observer is typically observing the SED of the maser emission (Fig.~\ref{fig:SED}) at frequencies $\sim 3-10$ times above the intrinsic (unattenuated) peak $\nu_{\rm pk}$. Using equation (\ref{eq:numintau}), the frequency peak of the {\it observed} spectrum, $\nu_{\rm max} \equiv \nu(\tau_c = 3)$, thus evolves downward in time. At times $t \lesssim \delta t$ we have \begin{eqnarray} \nu_{\rm max} \propto \nu_{\rm pk}^{5/4}t^{1/4} \propto t^{-\frac{2+7k}{4(8-2k)}} = \left\{ \begin{array}{lr} t^{-1/16} & k = 0 \\ t^{-1} & k = 2, \\ \end{array} \right. \label{eq:numax1} \end{eqnarray} while at times $t \gtrsim \delta t$ we have \begin{eqnarray} \nu_{\rm max} \propto t^{-\frac{2k+7}{4(8-2k)}} = \left\{ \begin{array}{lr} t^{-7/32} & k = 0 \\ t^{-11/16} & k = 2 \\ \end{array} \right. \label{eq:numax2} \end{eqnarray} where we have used equation (\ref{eq:nuFRBevo}). Substituting numerical values for $\nu_{\rm pk}$ from equation (\ref{eq:nuFRBevo}), \begin{eqnarray} \nu_{\rm max} \approx \left\{ \begin{array}{lr} 0.75\,\,{\rm GHz}\,\,f_{\xi,-3}^{1/4}E_{43}^{5/32}\dot{M}_{21}^{15/32}\left(\frac{\beta_w}{0.5}\right)^{-45/32}\Delta T_{5}^{-27/32}t_{-3}^{-7/32} & k = 0 \\ 1.36\times 10^{5}\,{\rm GHz}\,\,f_{\xi,-3}^{1/4}E_{43}^{-5/16}\dot{M}_{21}^{9/10}\left(\frac{\beta_w}{0.5}\right)^{-15/16}t_{-3}^{-11/16} & k = 2 \\ \end{array} \right. \label{eq:numax} \end{eqnarray} This shows that $\sim$ GHz frequency bursts of millisecond duration are a natural prediction of the discrete shell constant density ($k = 0$) scenario. As we discuss in $\S\ref{sec:observations}$, the temporally decreasing peak frequency is also consistent with the observed downward drifting frequency structure in the sub-pulses of FRB 121102 \citep{Hessels+18} and 180814.J0422+73 \citep{CHIME+19b}. Before concluding this discussion, we note an additional subtlety in calculating the effective optical depth: $\tau_{\rm c}$ depends on the burst luminosity, which is itself attenuated by scattering. In a naive picture where we treat the attenuation of the primary beam as an expoential suppression $\tau_{\rm c} \propto \nu L_{\nu} \propto e^{-\tau_{\rm c}}$, the ratio of transmitted to incident (unattenuated) luminosity, $x \equiv L_{\nu}/L_{\nu}(\tau_{\rm c} = 0)$ is determined from the solution to the implicit equation \begin{equation} \ln{ x} + x\tau_{\rm c} = 0, \label{eq:DEQ} \end{equation} where $\tau_{\rm c}$ is the optical depth (eq.~\ref{eq:tauR}) calculated using the unattenuated luminosity $L_{\nu}(\tau_{\rm c} = 0)$. An approximate solution, valid for $\tau_{\rm c} \gg 1$, is $x \approx ln(\tau_{\rm c})/\tau_{\rm c}$. As shown by the solution in Fig.~\ref{fig:suppression}, the reduction in escaping flux is substantially more gradual with increasing $\tau_{\rm c} $ than the usual exponential suppression for a luminosity-independent optical depth. While equation (\ref{eq:DEQ}) smoothly captures the correct limits $x(\tau_{\rm c} \ll 1) = 1$ and $x(\tau_{\rm c} \gg 1) \sim 1/\tau_{\rm c}$ it is conceptually incorrect in detail, as $\tau_{\rm c}$ represents the rate of photon restribution towards smaller frequencies to the escape rate rather than an exponential suppression of the flux. In addition to Compton scattering, Raman scattering by the upstream medium can also in principle suppress radio emission from the shock \citep{Lyubarsky08}. The nominal Raman scattering optical depth can be related to the Compton scattering depth (\ref{eq:tauC3}), \begin{equation} \tau_{\rm r} \approx \left(\frac{\nu}{\nu_{\rm p}}\right)\tau_{\rm c} \label{eq:tauR} \end{equation} Given that $\nu \gg \nu_{\rm p} \sim \nu_{\rm pk}/(3\Gamma)$ is a necessary condition to observe the synchrotron maser (Fig.~\ref{fig:SED}), the Raman optical depth would appear to greatly exceed the Compton scattering depth in all cases of relevance. However, due to Landau damping, Raman scattering is only effective at suppressing the observed pulse if the Debye length in the upstream plasma is sufficiently small that photons are scattered outside of the beam (eqs.~ 19, 27 of \citealt{Lyubarsky08}). As shown in \citet{Lyubarsky08}, equation (\ref{eq:tauR}) only applies if the temperature of the gas ahead of the shock is sufficiently low \begin{eqnarray} &&T_{\rm ext} \ll 320\,{\rm K} \left(\frac{n_{\rm ext}r}{t \nu^{2}} \right) \nonumber \\ &\approx& 2\times 10^{3}{\rm K}\nu_{\rm GHz}^{-2}E_{43}^{1/4}\dot{M}_{21}^{3/4}\left(\frac{\beta_w}{0.5}\right)^{-9/4}\Delta T_5^{-3/2}t_{-3}^{-3/4}, \label{eq:TextR} \end{eqnarray} where in the second equality we have used equation (\ref{eq:rdecdiscrete}), (\ref{eq:ndiscrete2}) for the discrete shell case. As shown in $\S\ref{sec:afterglow}$, the immediate upstream plasma is heated by Compton scattering from gamma-rays emitted behind the shock to $T \gtrsim 10^{6}$ K (eq.~\ref{eq:TC}). Because Raman scattering is greatly suppressed at such high temperatures, we are justified in neglecting it relative to Compton scattering. \subsection{Comparison to FRB Observations} \label{sec:observations} \begin{figure} \includegraphics[width=0.5\textwidth]{suppression-eps-converted-to.pdf} \caption{A solid line shows the solution to equation (\ref{eq:DEQ}) for the ratio of the transmitted to incident luminosity due to attenuation by induced Compton scattering, as a function of the optical depth $\tau_{\rm c}$ (eq.~\ref{eq:tauC}) calculated using the incident (unattenuated) luminosity, $L_{\nu}(\tau_{\rm c} = 0)$. Shown for comparison with a dashed line is the naive exponential $e^{-\tau_{\rm c}}$ suppression for the standard case of luminosity-independent $\tau_{\rm c}$.} \label{fig:suppression} \end{figure} The bolometric luminosity of the intrinsic (unattenuated) maser emission (eq.~\ref{eq:Lnu}) is controlled, in both steady-wind and discrete ejecta shell scenarios, by the properties of the ultra-relativistic ejecta ($E$, $\delta t$) and the shock radiative efficiency $f_{\xi}$. However, the optical depth of the upstream medium near the peak of the SED $\nu_{\rm pk}$ is generally enormous (eq.~\ref{eq:tauC2}), completely attenuating the signal. Nevertheless, as the shock moves outwards through the external medium, the value of $\tau_{\rm c}$ at a given frequency drops monotonically. The timescale and other properties of the observed radio emission are therefore generally set by the epoch at which $\tau_{\rm c}$ first reaches values $\lesssim 3$. As shown by equation (\ref{eq:numintau}), when this occurs the observer frequency obeys $\nu \gtrsim 10 \nu_{\rm pk}$, while Fig.~\ref{fig:SED} shows that only a fraction $f_{\nu} \lesssim 10^{-2}$ of the bolometric maser power is released at these high frequencies. Accounting also for the fact that the shock energy is shared over several decades in time, the {\it effective} efficiency of FRB emission in the observing band is therefore typically $\sim f_{\nu}\cdot f_{\xi} \sim 10^{-6}-10^{-5}$ for $f_{\xi} = 10^{-3}$. Reproducing observed isotropic FRB energies (e.g.~$E_{\rm iso} \sim 10^{38}-10^{40}$ ergs for FRB 121102; \citealt{Law+17}) on burst timescales of milliseconds requires flares of energy $E \gtrsim 10^{43}-10^{46}$ erg. Although the above conclusions are largely independent of the nature of the upstream ion medium, the steady-state wind scenario runs into severe problems which disfavor it. First, equation (\ref{eq:numax}) shows that the peak frequency of millisecond bursts for the fiducial values of $\dot{M}_{21} \sim 0.01-1$ and $\beta_w \sim 0.5$ needed to explain the persistent source and RM of FRB 121102 are typically several orders of magnitude too high compared to observed FRB emission. Furthermore, the local DM ahead of the shock $\sim 10^{2}-10^{5}$ pc cm$^{-3}$ (eq.~\ref{eq:DMwind}) generally exceeds the total DM of most FRBs and the residual local DM $\lesssim 55-225$ pc cm$^{-3}$ for FRB 121102 \citep{Tendulkar+17} when contributions from the Galaxy, Galactic halo, and interstellar medium are subtracted from the measured DM. Finally, the predicted rate at which the spectral peak should drift to lower frequencies, $\nu_{\rm max} \propto t^{-\beta}$, with $\beta = 0.5-1$ for $k=2$ (eqs.~\ref{eq:numax1}, \ref{eq:numax2}) is much steeper than the rate $\beta \approx 0.07-0.14$ measured for FRB 121102. In particular, \citet{Hessels+18} found that sub-bursts of duration $t \sim 0.5-1$ ms drifted downwards in frequency at the rate $d\nu_{\rm max}/dt \approx -0.2\, {\rm GHz/ms}$ through the band $1.1-1.7$ GHz. By contrast, the constant density (discrete ejecta shell) model for the upstream medium fits the observations better in several respects. First, the peak frequency of the emission (eq.~\ref{eq:numax}), \begin{eqnarray} \nu_{\rm max} \approx 0.75\,\,{\rm GHz}\,\,f_{\xi,-3}^{1/4}E_{43}^{5/32}\dot{M}_{21}^{15/32}\left(\frac{\beta_w}{0.5}\right)^{-45/32}\Delta T_{5}^{-27/32}t_{-3}^{-7/32} \nonumber \\ \approx 0.50\,\,{\rm GHz}\,\,f_{\xi,-3}^{1/4}E_{43}^{5/32}t_{-3}^{-7/32}\left(\frac{n_{\rm ext}}{10^{3}{\rm cm^{-3}}}\right)^{15/32} \label{eq:numax3} \end{eqnarray} falls naturally in the range $0.1-10$ GHz of observed FRBs for burst durations of milliseconds and fiducial parameters for the upstream medium ($\dot{M}_{21} \sim 0.01-1$; $\beta_w = 0.5$) motivated by the persistent source and RM of FRB 121102. This is true provided that the interval since the last major flare (electron-ion ejection event) obeys $\Delta T \sim 10^{5}$ s, which is indeed similar to the mean interval between the highest fluence bursts from FRB 121102 \citep{Law+17}. For the same parameters, the local contribution from the upstream shell to the dispersion measure of the burst, DM $\approx 0.1\,{\rm pc\,cm^{-3}}\dot{M}_{21} \beta_w^{-2}\Delta T_{5}^{-1}$ (eq.~\ref{eq:DMdiscrete}), are within the observational constraints on FRB 121102. A constant density model for the upstream medium also predicts that frequency structure in the SED will drift downwards in time as $\nu_{\rm max} \propto t^{-\beta}$, with $\beta \approx 0.06-0.22$, close to the range measured for FRB 121102 \citep{Hessels+18}. \citet{Hessels+18} and \citet{CHIME+19b} also find that the downward drift rate is greater at higher frequencies, which is also broadly consistent with the prediction, $d\nu_{\rm pk}/dt \propto \nu_{\rm pk}/t$, of power-law decay. \begin{figure} \includegraphics[width=0.5\textwidth]{contourp3_C-eps-converted-to.pdf} \includegraphics[width=0.5\textwidth]{contour1p4_C-eps-converted-to.pdf} \includegraphics[width=0.5\textwidth]{contour8_C-eps-converted-to.pdf} \caption{Contours of FRB fluence $E_{\rm frb} = \int \int L_{\nu}dt d\nu$ in ergs (solid black lines) and duration $t_{\rm frb} \equiv 3(E_{\rm frb}/L_{\rm max})$ in milliseconds (dashed blue lines) in the space of flare ejecta energy, $E$, and time interval since the last major flare, $\Delta T$. In calculating the latter we fix the product $\dot{M}\cdot \Delta T = 10^{26}$ g, motivated by the values $\dot{M} \sim 10^{21}$ g s$^{-1}$ \citep{Margalit&Metzger18} and $\Delta T \sim 10^{5}$ s (e.g.~\citealt{Law+17,Nicholl+17}) for FRB 121102; alternatively, the vertical axis a proxy for the density of the external medium (see right axis). Different panels show results separately in different observer band-passes: $0.2-0.4$ GHz (top), $1.1-1.7$ GHz (middle) and $6-10$ GHz (bottom). Increasing flare energy, or the time since the last ion shell ejection $\Delta T$, increases the FRB fluence and decreases the burst duration. For an otherwise similar flare, the burst duration is shorter, and the fluence greater, at higher observing frequencies.} \label{fig:contour} \end{figure} \begin{figure} \includegraphics[width=0.5\textwidth]{contourp3_C_s2-eps-converted-to.pdf} \includegraphics[width=0.5\textwidth]{contour1p4_C_s2-eps-converted-to.pdf} \includegraphics[width=0.5\textwidth]{contour8_C_s2-eps-converted-to.pdf} \caption{Same as Figure \ref{fig:contour}, but with the intrinsic SED of the maser emission calculated for an upstream magnetization $\sigma = 0.3$.} \label{fig:contour2} \end{figure} Figure \ref{fig:lightcurves} shows example light curves of the fluence $F(t) \equiv t \int L_{\nu}(t)d\nu$ in various observing bands (0.2$-$0.4 GHz, 1.1$-$1.7 GHz, 6$-$10 GHz), obtained by combining the predicted time-dependence of the burst luminosity with the predicted SED from \citet{Plotnikov&Sironi19} for different values of the magnetization $\sigma = 0.1-1$ of the upstream medium (Fig.~\ref{fig:SED}). Here $L_{\nu}$ is calculated accounting for attenuation by induced Compton scattering in the upstream medium using the estimate of the effective optical depth from equation (\ref{eq:tauC3}) combined with Fig.~\ref{fig:suppression}. Figures~\ref{fig:contour} and \ref{fig:contour2} show contours of the FRB fluence, $E_{\rm frb} \equiv \int \int L_{\nu} dt d\nu $, and duration, $t_{\rm frb}$, as a function of flare energy and $\Delta T$, calculated under the assumption that $\dot{M} \Delta T = constant$, shown separately again for luminosities calculated in the $0.2-0.4$ GHz, $1.1-1.7$ GHz and $6-10$ GHz bands. Somewhat arbitrarily, we have defined the FRB ``duration" as $t_{\rm frb} \equiv 3E_{\rm frb}/L_{\rm max}$, where $L_{\rm max}$ is the maximum of the bandpass-integrated luminosity $\int L_{\nu}d\nu$. Consistent with the above estimates, flares of isotropic energies $E \sim 10^{42}-10^{45}$ erg produce bursts with GHz fluences $E_{\rm frb} \sim 10^{36}-10^{41}$ erg and typical durations of $t_{\rm frb} \sim 0.01-10$ ms, compatible with FRB observations, for values of $\Delta T \sim 10^{5}$ s (or, equivalently, external densities $n_{\rm ext} \sim 10^{2}-10^{5}$ cm$^{-3}$). Notably, the burst duration can be considerably longer than the timescale of the central engine $\delta t = 10^{-4}$ s (e.g. light crossing time of a neutron star) because of the time for the shock to propagate to sufficiently large radii for $\tau_{\rm c} \lesssim 3$, which determines the timescale over which the measured fluence saturates. In general, the bursts have higher fluence and shorter durations at higher frequencies, at least up until the frequency at which $t_{\rm frb}$ becomes shorter than the intrinsic engine duration $\delta t$. Figure \ref{fig:SEDevo} shows snapshots of the SED, which are also calculated by suppressing the intrinsic maser spectrum (Fig.~\ref{fig:SED}) by the frequency-dependent Compton opacity (eq.~\ref{eq:tauC3}). The combined effects of induced scattering suppression at low frequency, with the fall-off of the intrinsic SED at high frequency, results in the escaping SED peaked at the frequency $\nu_{\rm max}$, which evolves to progressively lower frequency in time (eqs.~\ref{eq:numax1}, \ref{eq:numax2}).\footnote{An additional, narrower peak is observed at lower frequencies, due to radiation that escapes in the relatively low-luminosity gap between $\nu_{\rm min}$ and $\nu_{\rm max}$ (Fig.~\ref{fig:SED}); however, the details of this feature are theoretically uncertain and the suppression may be greater than estimated by equation (\ref{eq:tauC3}) due to the strong dependence of the Compton scattering optical depth on the spectral slope $\tau_{\rm c} \propto (\partial/\partial \nu)(L_{\nu}/\nu)$ (eq.~\ref{eq:tauC}).} The fine frequency structure shown in this figure at the high-frequency end should also not be over-interpreted; it results in part from the chosen time- and space-sampling of the PIC simulations (which is much shorter than the shock dynamical time over which the observed emission is produced). Detailed frequency structure will also be washed out by Doppler-broadening effects due to variations in line-of-sight velocity across the emitting shock front. The centrally-peaked SED shape (Fig.~\ref{fig:SEDevo}) we predict at high frequencies is broadly similar to those observed in FRB 121102 \citep{Law+17}; in detail, however, for bursts of millisecond duration we typically find a full-width half-max ($\Delta \nu/\nu \sim 1$) larger than those observed, $\Delta \nu/\nu \sim 0.1-0.2$. This could reflect our highly simplified model for treating the low-frequency suppression from equation (\ref{eq:tauC3}). The true degree of suppression from Compton scattering is a strong function of the derivative of the photon spectral slope (eq.~\ref{eq:tauC}) and therefore, treated more accurately, would likely create a sharper spectral peak. Effects associated with plasma propagation could also be playing a role in the observed spectral shape (e.g.~\citealt{Cordes+17}), though this would not be expected to produce a systematic decrease of the frequency structure. \section{Synchrotron Afterglow} \label{sec:afterglow} Behind the forward shock, the particle density and thermal energy density of the hot plasma are given, respectively, by \begin{equation} n_{\rm sh} \simeq 4\Gamma n_{\rm ext}; \,\,\,\, u_{\rm sh} \simeq 4\Gamma ^{2}m_p c^{2}n_{\rm ext}. \end{equation} The thermal energy per swept up particle is then given by \begin{equation} \frac{u_{\rm sh}}{n_{\rm sh}} = \Gamma m_p c^{2} \end{equation} Non-thermal electrons are not expected to be efficiently accelerated at the quasi-perpendicular magnetized relativistic shocks capable of the synchrotron maser emission \citep{Sironi&Spitkovsky09}. However, electrons may still be heated, ahead of the shock \citep{lyubarsky_06,Hoshino08} or in the shock layer \citep{Sironi&Spitkovsky10}. If they are heated to equipartition with the ions, they would achieve a mean thermal Lorentz factor (\citealt{Giannios&Spitkovsky09}) \begin{equation} \bar{\gamma} \approx \frac{1}{2}\frac{m_p}{m_e}\Gamma \gg 1. \label{eq:gammabar} \end{equation} If the magnetization of the upstream medium is $\sigma$, and this compressed field dominates over any shock-generated field, then the magnetic field in the post-shock gas is given in the $\sigma \ll 1$ limit by \begin{equation} B = \sqrt{64\pi \sigma \Gamma ^{2} m_p c^{2}n_{\rm ext}} \end{equation} The peak frequency of the thermal synchrotron emission (Lorentz-boosted to the observer frame) is thus given by (for the uniform density case, $k = 0$) \begin{equation} h\nu_{\rm syn} = \hbar\frac{eB}{m_e c}\bar{\gamma}^{2}\Gamma \propto n_{\rm ext}^{1/2}\Gamma ^{4} \propto \left\{ \begin{array}{lr} t^{-1} & t \ll t_{\rm dec} \\ t^{-3/2} & t \gg t_{\rm dec} \\ \end{array} \right. , \end{equation} where \begin{equation} h\nu_{\rm syn}(t_{\rm dec}) \approx 57\,{\rm MeV}\,\,\sigma_{-1}^{1/2}E_{43}^{1/2}\delta t_{-3}^{-3/2}, \label{eq:nusyn} \end{equation} i.e. the emission is in the gamma-ray band. The peak maser frequency (eq.~\ref{eq:nuFRB}) and synchrotron peak frequency can be related, \begin{equation} \frac{\nu_{\rm syn}}{\nu_{\rm pk}} = \left(\frac{\sigma}{9}\right)^{1/2}\left(\frac{m_p}{m_e}\right)^{5/2}\Gamma ^{3} \label{eq:nuLnu} \end{equation} Thus given $\nu \sim 10 \nu_{\rm pk} \sim$ 1 GHz for the observed FRB, the corresponding peak synchrotron emission at the same epoch is given by $h\nu_{\rm syn} \sim 6\,\,{\rm MeV}\,\,\sigma_{-1}^{1/2}(\Gamma /100)^{3}$ Hz. A simultaneous measurement of $\nu_{\rm syn}$ and $\nu_{\rm pk}$ would therefore tightly constrain the Lorentz factor of the shock. In the plasma rest-frame we see that $\nu_{\rm syn}$ (eq.~\ref{eq:nusyn}) is far below the burn-off limit (\citealt{Guilbert+83}), \begin{equation} \frac{(h\nu_{\rm syn})_{\rm max}}{\Gamma} \sim \frac{9 m_e c^{2}}{\alpha_{\rm F}} \simeq 160\,{\rm MeV}, \end{equation} above which electrons cool faster than their gyro orbit around the magnetic field, where $\alpha_{\rm F} \simeq 1/137$ is the fine-structure constant. This implies that incoherent synchrotron radiative losses are safely neglected during the synchrotron maser emission, satisfying this implicit assumption by \citet{Plotnikov&Sironi19}. Cooling of the electrons is nevertheless important on the dynamical timescale. The cooling frequency of the electrons behind the shock is given by \begin{eqnarray} h\nu_{\rm c} = \hbar \frac{eB}{m_e c}\gamma_{c}^{2}\Gamma \approx 9\,\,{\rm keV}\,\,\sigma_{-1}^{-3/2}\left(\frac{\beta_w}{0.5}\right)^{3}\dot{M}_{21}^{-1}t_{-3}^{-1/2}\Delta T_{5}^{2} \label{eq:nucool} \end{eqnarray} where $\gamma_{\rm c} =(6\pi m_e c/\sigma_{\rm T}\Gamma B^{2}t)$ \citep{Sari+98}. Because $\nu_{\rm syn} \gg \nu_{\rm c}$ the shock-heated electrons will initially be fast-cooling and thus will radiate a large fraction of the shock power. However, $\nu_{\rm syn}/\nu_{\rm c} \propto t^{-1}$, such that $\nu_{\rm syn} \lesssim \nu_{\rm c}$ after a time \begin{equation} t_{\rm c} \approx 6.4\,{\rm s}\,\,\sigma_{-1}^{2}E_{43}^{1/2}\left(\frac{\beta_w}{0.5}\right)^{-3}\dot{M}_{21}\Delta T_{5}^{-2} \end{equation} at which point \begin{equation} \nu_{\rm syn} = \nu_{\rm c} \approx 0.6\,{\rm keV}\,\sigma_{-1}^{-5/2}E_{43}^{-1/4}(\beta_{w}/0.5)^{9/2}\dot{M}_{21}^{-3/2}\Delta T_{5}^{3}. \end{equation} The predicted synchrotron spectrum at $t < t_{\rm c}$ is broad-band, with total luminosity $\nu L_{\nu} \sim L_{\rm sh}/2$ peaking at $\nu \sim h\nu_{\rm syn}$, but extending as a power-law $\nu L_{\nu} \propto \nu^{1/2}$ down to $\nu_{\rm c}$. Specifically, at times $\delta t \lesssim t \lesssim t_{\rm c}$, \begin{equation} \nu L_{\nu} \approx \left\{ \begin{array}{lr} L_{\rm pk}\left(\frac{\nu}{\nu_{\rm c}}\right)^{4/3}\left(\frac{\nu_{\rm c}}{\nu_{\rm syn}}\right)^{1/2} \propto t^{1/6} & \nu < \nu_{\rm c} \\ L_{\rm pk}\left(\frac{\nu}{\nu_{\rm syn}}\right)^{1/2} \propto t^{-1/4} & \nu_{\rm c} < \nu < \nu_{\rm syn} \\ \end{array} \right. , \label{eq:nuLnu_syn} \end{equation} where \begin{equation} L_{\rm pk}(t) \approx L_{\rm sh}(t)/2 \approx 10^{45}{\rm erg\,s^{-1}}E_{43}t_{-3}^{-1} \label{eq:Lpk} \end{equation} At times $t \gg t_{\rm c}$ the electrons are no longer fast cooling and the luminosity in all bands will decrease more rapidly with time. \begin{figure} \includegraphics[width=0.5\textwidth]{afterglow-eps-converted-to.pdf} \caption{Synchrotron afterglow calculated for $\sigma = 0.3$ and otherwise fiducial parameters $\delta t= 10^{-4}$s, $\Delta T = 10^{5}$ s, $\beta_w = 0.5$, $E_{43} = 10$, $\dot{M}_{21} = 1$.} \label{fig:afterglow} \end{figure} Figure \ref{fig:afterglow} shows $\nu L_{\nu}$ light curves for different photon energy ranges from 1 keV to 100 MeV for $\sigma = 0.1$ and other shock parameters matching our $E_{43} = 10$ model from Fig.~\ref{fig:lightcurves}. Depending on $E_{43} \sim 1-10$ needed to explain typical bursts from FRB 121102, we predict peak luminosities $L_{\gamma} \sim 10^{45}-10^{46}$ erg s$^{-1}$ in the $\sim$ MeV-GeV gamma-ray range on a timescale of $0.1-10$ ms, i.e. comparable to the FRB itself. The peak luminosity in the 1$-$10 keV X-ray band is typically achieved when $\nu_{\rm c}$ passes down through the observing band at a luminosity $L_{\rm X} \sim 10^{42}-10^{43}\,{\rm erg\,s^{-1}}$ on a somewhat longer timescale of $\sim 0.1-1$ second. Unfortunately, these luminosities are below the sensitivity of either gamma-ray or X-ray telescopes at the distance of FRB 121102. It is also not clear whether the supernova ejecta shell, which surrounds the FRB source in magnetar scenarios, is yet transparent to keV X-rays on the timescale of the radio bursts due to photoelectric absorption \citep{Margalit+18}. This is consistent with the non-detection of X-ray or gamma-ray counterparts simultaneous with detected bursts from FRB121102 or other FRBs \citep{DeLaunay+16,Scholz+17}. Prospects could be better for detecting such ``gamma-ray bursts'' from FRB sources independent of a radio trigger. Under the assumption that all FRBs originate from repeating sources with a luminosity function similar to FRB 121102, the number density of such FRB sources in the local Universe is $\sim 10^{4}$ Gpc$^{-3}$ \citep{Nicholl+17}. For the closest source at a distance of $\sim 30$ Mpc the predicted MeV gamma-ray fluence from the most powerful bursts of energy $\sim 10^{44}-10^{45}$ erg would be $\sim 10^{-8}-10^{-9}$ erg cm$^{-2}$, comparable or lower than the weakest GRB (e.g.~\citealt{vonKienlin+14}). Still, the apparent lack of repeating GRBs in long baseline gamma-ray surveys (e.g. BATSE) could be used to constrain the high energy tail of the flare distribution, particularly once the repeating fraction among the FRB population is better constrained. As the visual wavelength band is far below the peak synchrotron or cooling frequencies, optical afterglow emission does not appear to be as promising of a counterpart as that at higher energies. However, the above analysis assumes the upstream medium is an electron-ion plasma. If the upstream were of electron/positron composition (e.g. from a rotationally-powered component of the magnetar wind that occurs between magnetic flares), with a number of pairs per ion $(n_{\pm}/n_{\rm ext}) \gg 1$, then $\nu_{\rm pk}$ would be smaller than the above estimate by a factor of $\propto (n_{\pm}/n_{\rm ext})^{-2}$. Furthermore, the cooling frequency is much lower immediately after a major flare (short $\Delta T$) when the external density is higher. The best current upper limit on optical radiation simultaneous with a burst from FRB 121102 of $\nu L_{\nu} \lesssim 10^{47}$ erg s$^{-1}$ on timescales $\lesssim 70$ ms \citep{Hardy+17} unfortunately do not constrain this scenario. Future instruments such as HiPERCAM \citep{Dhillon+16} will be more sensitive by a factor of 100 and thus could place interesting limits. We emphasize that the escape of high frequency synchrotron emission is not subject to the same constraints as the FRB emission that arise from induced scattering. Flares from the same source which produce no detectable FRB emission (i.e. in periods after major flares where the density of the external medium is too high) should still in principle produce high frequency afterglow emission, assuming it is not absorbed (e.g. by the supernova ejecta shell) on larger scales. In addition to their direct signal, gamma-rays from the shock can heat the upstream medium via Compton scattering. For an incident photon spectrum $F_{\nu} \propto \nu^{-1/2}$ that peaks at frequencies $h\nu \gg m_e c^{2}$, the mean thermal energy of electrons at radius $r$ increases at the rate \begin{equation} \frac{d}{dt}\left(\frac{3}{2}kT_{\rm ext}\right) \sim \frac{\sigma_{\rm T}\nu L_{\nu}|_{h\nu \sim m_e c^{2}}}{4\pi r^{2}}. \end{equation} Assuming sufficiently early times that $h\nu_{\rm syn} \gg m_e c^{2} = 0.511$ MeV, such that $\nu L_{\nu}|_{h\nu \sim m_e c^{2}} \sim L_{\rm pk}(m_e c^2/h\nu_{\rm syn})^{1/2}$, then, over a timescale $t$, initially cold electrons ahead of the shock are heated to a temperature, \begin{eqnarray} T_{\rm ext} &\sim& \frac{\sigma_{\rm T}}{k}\frac{L_{\rm pk}t}{4\pi r^{2}}\left(\frac{m_e c^{2}}{h\nu_{\rm syn}}\right)^{1/2} \nonumber \\ &\approx& 7\times 10^{6}\,{\rm K}\,\,\,\sigma_{-1}^{-1/4}E_{43}^{1/4}\Delta T_{5}^{-1}\beta_w^{-3/2}\dot{M}_{21}t_{-3}^{1/4}, \label{eq:TC} \end{eqnarray} where we have used equations (\ref{eq:rdecdiscrete}), (\ref{eq:nusyn}), (\ref{eq:Lpk}). This high upstream temperature, while sufficient to suppress Raman scattering of the FRB pulse ($\S\ref{sec:FRB}$; eq.~\ref{eq:TextR}), is not sufficient to suppress the synchrotron maser emission (which requires relatively cold electrons $T \lesssim 0.03 (m_e c^{2}/k) \approx 2\times 10^{8}{\rm K}$ to generate the necessary population inversion; Babul et al., in prep). UV and X-ray radiation from the shock can also photo-ionize neutral gas ahead of the source, such as the ejecta shell from the supernova explosion, potentially increasing the DM of the bursts. A powerful flare of energy $\sim 10^{44}$ erg, as determined by the fluence $h\nu \lesssim 1$ keV photons (Fig~\ref{fig:afterglow}), could ionize approximately $N_{\rm flare} \sim 10^{52}$ electrons. Assume the FRB source is confined within a supernova ejecta shell of mass $M_{\rm ej}$, age $t_{\rm age}$, baryon density $n_{\rm ej} = 3M_{\rm ej}/(4\pi R_{\rm ej}^{3}m_p)$ and radius $R_{\rm ej} = v_{\rm ej}t_{\rm age}$. The inner layers of the ejecta are swept into a shell of density $4n_{\rm ej}$ by the nebula of radius $R_{\rm n} < R_{\rm ej}$. The timescale for radiative recombination within the shell is then \begin{equation} t_{\rm rec} \approx \left( 4 n_{\rm ej} \alpha \right)^{-1} \approx 30 \, {\rm yr} \, \alpha_{-11}^{-1}\left(\frac{M_{\rm ej}}{10M_{\odot}}\right)^{-1} v_{\rm ej,9}^3 t_{\rm age,9}^3 \end{equation} where $\alpha = \alpha_{-11}$ 10$^{-11}$ cm$^{3}$ s$^{-1}$ is the recombination rate. For the high ionization states of oxygen-rich material at characteristic temperatures $T \sim 10^{4}$ K of photo-ionized gas, we have $\alpha_{-11} \sim 1$, while for O$\textsc{i}$-O$\textsc{ii}$ the recombination rate is significantly lower, $\alpha_{-11} \sim 10^{-2}$. The recombination time is therefore shorter than the system age $t_{\rm rec} \lesssim t_{\rm age}$ for young sources $t_{\rm age} \lesssim 10-30$ yr such as that estimated for FRB 121102. In such a case, the number of photo-ionized electrons in steady-state is determined by the number of ionizing photons produced within the recombination time, $N_{\rm p-i} \sim N_{\rm flare} t_{\rm rec} / \Delta T$, where $\Delta T$ is the interval between major flares. The DM contributed by the photo-ionized layer is therefore given by \begin{eqnarray} &&{\rm DM}_{\rm p-i} \approx \frac{N_{\rm p-i}}{4\pi R_{\rm n}^2} \nonumber \\ &\sim& 0.2 \, {\rm pc \, cm}^{-3} \, \alpha_{-11}^{-1} \left(\frac{M_{\rm ej}}{10M_{\odot}}\right)^{-1} v_{\rm ej,9}\Delta T_{5}^{-1} t_{{\rm age},9}\left(\frac{R_{\rm n}}{R_{\rm ej}/3}\right)^{-2}. \label{eq:DMpi} \end{eqnarray} For an oxygen-dominated composition, the relevant recombination time is the average over ionization states $\alpha^{-1} = \sum_i \alpha_i^{-1} / 8 \sim 100$ as dominated by O$\textsc{i}$-O$\textsc{ii}$ with the lowest recombination coefficients ($\alpha_{-11} \sim 10^{-2}$). Although this estimate is at best accurate to an order of magnitude, we find ${\rm DM}_{\rm p-i} \sim 10\, {\rm pc \, cm}^{-3}$ for a source age $t_{\rm age} \sim 10$ yr and otherwise fiducial parameters. In cases where the magnetar flare activity is constant in time, the photo-ionized DM is predicted to grow linearly with time. This could in principle contribute to the $\sim 1-3 \, {\rm pc \, cm}^{-3}$ DM growth in DM measured for FRB 121102 over several years if secular in nature \citep{Hessels+18}. More detailed photo-ionization calculations are needed to improve these estimates, including contributions to the ionizing flux a rotationally-powered component of the magnetar wind \citep{Margalit+18}. \section{Discussion and Conclusions} \label{sec:discussion} Motivated by recent PIC simulation results \citep{Plotnikov&Sironi19}, we have explored the implications of synchrotron maser emission at magnetized relativistic shocks as a mechanism for fast radio bursts, as first described by \citet{Lyubarsky14} and \citet{Beloborodov17}. The shocks are generated by the deceleration of ultra-relativistic shell of energy, likely produced by a central compact object, by a dense external environment. One significant difference from previous work is our assumption that the external medium is a sub-relativistic electron-ion outflow, instead of an ultra-relativistic wind. This is motivated by the high injection rate of electrons needed on larger radial scales to explain the observed persistent synchrotron emission and high rotation measure of FRB 121102, assuming both properties arise from the same compact nebula \citep{Margalit&Metzger18}. Our main conclusions are summarized as follows: \begin{itemize} \item{The shock-powered synchrotron maser as an FRB emission mechanism is consistent with a number of observations, including high intrinsic linear polarization and a spectral energy distribution with complex frequency structure imprinted by high-order harmonics (Fig.~\ref{fig:SED}) and, potentially, by frequency-dependent induced Compton scattering by the upstream medium. The roughly constant polarization angle of the bursts from FRB 121102 requires an upstream ordered magnetic field with a fixed direction over many bursts. The latter is naturally expected if the magnetic field is wrapped around the fixed rotation axis of a central compact object.} \item{At early times, when the shock is at small radii, the radio pulse is attenuated by induced scattering in the upstream medium \citep{Lyubarsky08}. Raman scattering is suppressed by heating of the upstream medium by gamma-rays from the shock (eq.~\ref{eq:TC}), but Compton scattering should be operational. The observed radio emission only peaks once the shock reaches sufficiently large radii for the induced scattering optical depth $\tau_{\rm c}$ to decrease below values of order unity (Fig.~\ref{fig:suppression}). For this reason the duration of the FRB for shocks propagating into high density media (small $\Delta T$) can greatly exceed the intrinsic timescale of the central engine (Figs.~\ref{fig:contour}, \ref{fig:contour2}), e.g.~$\delta t \lesssim 10^{-4}$ s if set by the light crossing time of a neutron star magnetosphere. However, because of the relatively flat fluence curve (Fig.~\ref{fig:lightcurves}), even bursts with total durations of several milliseconds would show significant power on timescales as short as $t \sim \delta t$, consistent with the substructure in FRB 121102 down to 30$\mu$s \citep{Michilli+18}. For shocks that propagate into a lower density medium (large $\Delta T$), $\tau_{\rm c} \ll 1$ is achieved at times $\lesssim \delta t$ such that the FRB duration can even be shorter than the engine timescale. \citet{Scholz+16} notes that the intrinsic widths of the bursts from FRB 121102 of $\sim 3-9$ ms \citep{Spitler+16} are consistently longer than the single-component FRBs detected with the Parkes telescope (all widths $\lesssim 3$ ms), pointing to a key difference between the repeating and non-repeating classes (see also \citealt{Palaniswamy+18}). We hypothesize that some of the non-repeating population could originate from more powerful flare ejecta propagating into a lower density medium $n_{\rm ext}$ (e.g.~large $\Delta T$; far upper right hand corner of Figs.~\ref{fig:contour}, \ref{fig:contour2}). The medium could be that surrounding a less active magnetar (long $\Delta T$) or of an entirely different engine. } \item{Deceleration of the forward shock, combined with time-dependent attenuation of the radio emission by induced Compton scattering, causes the peak frequency and luminosity of the observed maser emission to decrease as power-laws in time, $\nu_{\rm max} \propto t^{-\beta}$ with $\beta \approx 0.06-0.22$ for $k = 0$ (eqs.~\ref{eq:numax1}, \ref{eq:numax2}). This provides a natural explanation for the downward evolution of frequency structure seen from bursts in FRB 121102 \citep{Hessels+18} and 180814.J0422+73 \citep{CHIME+19b}. Matching the observed rate of frequency drift in FRB 121102 requires an external medium with an approximately constant radial density profile ($k \approx 0$), an assumption compatible with other requirements on the burst properties such as their frequency and duration.} \item{The condition $\tau_{\rm c} \lesssim 3$ for FRB emission is first achieved when the observing frequency is typically $\sim 10$ times higher than the peak frequency of the intrinsic maser emission (eq.~\ref{eq:numintau}). This guarantees that the observer first sees the high-frequency tail of the SED, such that the effective radiative efficiency for converting flare kinetic energy into coherent radio emission $\sim 10^{-5}$ for a bolometric maser efficiency of $f_{\xi} = 10^{-3}$. The latter is the range predicted by PIC simulations \citep{Plotnikov&Sironi19} for upstream magnetizations $\sigma \sim 0.1-0.4$ in the range inferred for the nebula on larger scales around FRB 121102 \citep{Vedantham&Ravi18}. Radio bursts of isotropic energies $E_{\rm frb} \sim 10^{36}-10^{41}$ erg are produced by flares of isotropic energy $E \sim 10^{42}-10^{45}$ erg. Given the mean repetition time between the strongest FRBs with $E_{\rm frb} \sim 10^{40}$ erg ($E \sim 10^{44}-10^{45}$ erg) of $\Delta T \sim 10^{5}$ s, and an estimated source age $t_{\rm age} \lesssim 30$ yr for FRB 121102, the implied energy budget of the repeater is $\sim (t_{\rm age}/\Delta T)E \sim 10^{49}-10^{50}$ erg, compatible with the magnetic energy reservoir of a magnetar.} \item{The FRB emission probes the density profile of the upstream ion medium. For values of $\dot{M} \gtrsim 10^{19}-10^{20}$ g s$^{-1}$ (as needed to explain the persistent synchrotron nebula surrounding FRB 121102), a steady-state $\propto 1/r^{2}$ radial density profile can be ruled out. More plausibly, the upstream medium is that of a discrete shell ejected following the last major flare (e.g. as supported by the radio afterglow of the 2004 giant flare from SGR 1806-20; e.g.~\citealt{Gelfand+05,Taylor+05}). Importantly, millisecond GHz bursts compatible with observations are achieved if the interval since the last major flare is $\Delta T \sim 10^{5}$ s (eq.~\ref{eq:numax}; Figs.~\ref{fig:contour}, \ref{fig:contour2}), compatible with the rate of the most powerful bursts from FRB 121102 (\citealt{Law+17}).} \item{Given the requirement for a sufficiently large time interval $\Delta T$ since the last major flare (low external density) to explain the observed bursts FRB 121102, even a continually flaring FRB source may go through FRB-free ``dark" phases after major flares, consistent with observed long periods of FRB-free activity \citep{Price+18}. However, after $\Delta T$ becomes sufficiently large to allow FRB emission to escape, multiple weaker flares in succession could produce clustered bursts by running into the same ejecta shell. Repetition is in principle possible on timescales shorter than the dynamical timescale at the shock radius $\sim r_{\rm dec}/c \sim 10^{2}-10^{3}$ s, because each flare shocks only a small fraction of the mass of the upstream shell. } \item{The time-evolving ion ejecta shell immediately ahead of the shock could contribute stochastic variations in the local DM of the bursts (eq.~\ref{eq:DMdiscrete}) at the level of $\sim 0.01-1$ pc cm$^{-3}$ on timescales of days to months. This could contribute to observed DM increase of $\sim 1-3$ pc cm$^{-3}$ seen from FRB 121102 over a 4 year baseline \citep{Hessels+18}. Bursts that occur shortly after major flares (e.g. $\Delta T \lesssim 10^{4}$ s) could produce larger temporary DM increases, but due to attenuation by induced Compton scattering these high DM events might only be detectable at the highest radio frequencies. It is intriguing to note that the largest DM burst reported by \citep{Hessels+18} was also that detected at the highest radio frequency. In addition, X-rays from the shock can photo-ionize the neutral supernova ejecta shell on larger scales, generating a secular flattening or even rise in the DM as the shell becomes progressively more ionized on timescales of the source age (eq.~\ref{eq:DMpi}). } \item{Our main conclusions are to some extent independent of the identify of the central engine and thus could be compatible with non-magnetar models. Ultimately, the main requirement to explain FRB121102 within our model is a magnetized environment with a density in the range $n_{\rm ext} \sim 10^{2}-10^{5}$ cm$^{-3}$ (eq.~\ref{eq:numax3} and right hand axis of Figs.~\ref{fig:contour}, \ref{fig:contour2}) over characteristic radial scales $\gtrsim 10^{13}$ cm surrounding the central engine. For instance, if the engine were an accreting stellar-mass black hole, the requisite ion source for powering the nebula and supplying its high rotation measure could be an outflow from the black hole accretion disk. However, the high induced scattering depth in steady wind-type scenarios disfavors this model, unless the accretion source were itself intermittent on a timescale $\Delta T \gtrsim 10^{5}$ s. Likewise, the high required environmental densities could also be consistent with those found in AGN, e.g. if a young magnetar were embedded in the accretion disk of the supermassive black hole. This scenario would become favored if the luminosity and rotation measure of the persistent source co-located with FRB 121102 are not found to decay on timescales of a few decades, as predicted in the transient nebula picture \citep{Metzger+17}. Alternatively, if some of the non-repeating FRBs are produced by one-off energy injection events from young compact objects (e.g.~from the delayed collapse of a supramassive neutron star to a black hole; \citealt{Falcke&Rezzolla14}), and the medium surrounding the object is not cleared out by previous flares, then relevant external density would be that from the expanding supernova ejecta, \begin{equation} n_{\rm ext} \approx \frac{3M_{\rm ej}}{4\pi R_{\rm ej}^{3} m_p} \sim 10^{7}{\rm cm^{-3}}\left(\frac{t_{\rm age}}{{\rm yr}}\right)^{-3}\left(\frac{M_{\rm ej}}{M_{\odot}}\right)v_{\rm ej,9}^{-3}, \end{equation} where $M_{\rm ej}$, $v_{\rm ej}$ and $R_{\rm ej} \simeq v_{\rm ej}t_{\rm age}$ are the mass, velocity and mean radius of the ejecta at time $t_{\rm age}$ after the explosion. Depending on the ejecta mass, values $n_{\rm ext} \lesssim 10^{2}-10^{5}$ cm$^{-3}$ are thus achieved on timescales of $t_{\rm age} \sim 10-30$ yr, similar to the timescale over which the ejecta becomes transparent to GHz radio emission (e.g.~\citealt{Margalit+18}). In the case of magnetars born from the merger of binary neutron stars (e.g.~\citealt{Nicholl+17}), similar densities are achieved substantially earlier (on a timescale $\lesssim 1$ yr) due to the lower ejecta mass and higher ejecta velocities. On the other hand, an FRB would not be produced by an energy injection event into a normal interstellar medium, as the upstream magnetization would be too low for the shock to produce synchrotron maser emission (the shock would be mediated by the Weibel instability, instead of gyro motion of charged particles about the compressed upstream magnetic field). } \item{FRBs have now been detected at frequencies as high as 5 GHz \citep{Spitler+18} and 8 GHz \citep{Gajjar+18} and down to 400 MHz \citep{Boyle+18,CHIME+19c}. Our scenario produces emission across this frequency range. A given flare's SED peaks first at high frequencies and then $\nu_{\rm max}$ (eqs.~\ref{eq:numax1}, \ref{eq:numax2}) moves to lower frequencies with time (Fig.~\ref{fig:lightcurves}, bottom panel). The intrinsic width of the bursts (e.g. after accounting for scattering broadening) should be longer at lower frequencies, as results naturally from the self-similar time evolution of the blast wave deceleration (Figs.~\ref{fig:contour}, \ref{fig:contour2}). Indeed, there appears to be evidence for longer burst durations at lower frequencies from FRB121102 \citep{Gajjar+18}. At a given time, the SED is relatively narrowly peaked about $\nu_{\rm max}$ (Fig.~\ref{fig:lightcurves}, bottom panel), as results from the combination of induced scattering by the upstream medium at lower frequencies ($\tau_{\rm c} \propto \nu^{-3}$; eq.~\ref{eq:tauC}) and the drop-off of the intrinsic maser SED at high frequencies (Fig.~\ref{fig:SED}). While the width of the observed SED we predict $\Delta \nu/\nu \sim 1$ appears to exceed those measured from time-resolve spectra of FRB 121102 (\citealt{Law+17}), our treatment of the frequency-dependence of induced scattering out of the primary beam using an approximate optical depth is the weakest part of our analysis and thus additional work is required to solidify the detailed spectral predictions. As a general point, the narrow $\Delta \nu/\nu \sim 0.1$ frequency structure of the bursts from FRB 121102 {\it must} arise from the influence of an external medium in our scenario: even an intrinsically narrow SED would be broadened by the differential Doppler shift across the relativistically expanding blast wave. There is also evidence that the FRB rate at low frequencies $\nu < 700$ MHz is lower than at 1.4 GHz \citep{Karastergiou+15,Rowlinson+16,Burke-Spolaor+16,Caleb+17,Chawla+17,Sokolowski+18}. Several mechanisms can suppress low frequency emission \citep{Ravi&Loeb18}, including synchrotron self-absorption \citep{Metzger+17} by the nebula, free-free absorption by the supernova ejecta \citep{Margalit+18}}. All else being equal, our model predicts that the intrinsic FRB fluence is lower at lower frequencies (Figs.~\ref{fig:contour}, \ref{fig:contour2}), which could also contribute to the lower rate of low-frequency detections. \item{The same shock responsible for the coherent synchrotron maser emission also produces an (incoherent) synchrotron afterglow, in many ways analogous to a scaled-down version of those which accompany GRB jets (Fig.~\ref{fig:afterglow}). However, unlike normal GRB afterglows the emission is produced by {\it thermal} electrons heated at the shock rather than a power-law non-thermal distribution (e.g.~\citealt{Giannios&Spitkovsky09}) because magnetized shocks capable of synchrotron maser emission are not favorable sites of non-thermal electron acceleration (e.g.~\citealt{Sironi&Spitkovsky09}). For an electron/ion upstream medium, the signal peaks at hard gamma-ray energies on a timescale comparable or shorter to the FRB itself with longer timescale ($\sim$ seconds) emission in the X-ray band. Unfortunately, for flare energies in the range needed to explain the properties of observed FRBs, this signal is challenging to detect with current gamma-ray and X-ray satellites, even at the estimated distances of the closest repeating FRB source. Prospects are better in the visual band, but only if the upstream medium of the shock is much higher density (e.g.~in the dark phases right after major flares, which are unlikely to produce detectable FRB emission) or if the upstream medium is loaded with a large number of electron/positron pairs (e.g.~from a rotationally-powered component of the magnetar wind). } \item{Our results may have implications for the long-term evolution of FRB emission from newly-born magnetars. As magnetars age and become less active (e.g.~\citealt{Perna&Pons11,Beloborodov&Li16}), the intervals $\Delta T$ between their major flares could increase. For otherwise similar flare energies $E$, Figs.~\ref{fig:contour} and \ref{fig:contour2} show that the burst fluence will initially increase and the bursts will get shorter with increasing $\Delta T$ (decreasing external density). However, once the burst duration comes to match the engine timescale $\delta t$, the effect of a further decrease in density (larger $\Delta T$) is to decrease the observed fluence by pushing the peak of the synchrotron maser $\propto \nu_{\rm p}$ to lower frequencies relative to the observer bandpass. Thus, flaring magnetars in our model could effectively turn off as FRB sources after a certain age. Indeed, the giant flares from Galactic magnetars of age $\sim 10^{3}-10^{4}$ yr occur so infrequently (less than once per decade) that the ion shell has time to expand all the way to the nebula termination shock before the next flare \citep{Granot+06}. An FRB might still be produced in this case as the relativistic flare ejecta interacts with the nebula itself \citep{Lyubarsky14}, but its properties then become sensitive to details such as the radius and density of the nebula. } \end{itemize} \section*{Acknowledgements} We thank Andrei Beloborodov, Yuri Lyubarsky, Illya Plotnikov, and Indrek Vurm for helpful information and conversations. We thank the reviewer, Jonathan Katz, for help comments. BDM and LS acknowledge funding from the National Science Foundation (grant number 80NSSCK1104). BM is supported by NASA through the NASA Hubble Fellowship grant \#HST-HF2-51412.001-A awarded by the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., for NASA, under contract NAS5-26555.
\section{Introduction} Large optical sky surveys have served as engines of discovery throughout the history of astronomy. By cataloging large samples of astrophysical objects, these surveys provide literal and metaphorical finder charts for detailed followup observations with larger and more expensive telescopes. In the last century, among the most influential sky surveys were the Palomar Observatory Sky Surveys. Conducted with photographic plates using the wide-field Palomar 48-inch Schmidt telescope \citep{Harrington:52:P48}, the first and second sky surveys (POSS-I, \citealp{Minkowski:63:POSS-I}; POSS-II, \citealp{Reid:91:POSS-II}) mapped the Northern Hemisphere sky and enabled fifty years of discovery. A digitized version\footnote{\url{http://stdatu.stsci.edu/dss/}} \citep{Lasker:94:PlateDigitization, Djorgovski:98:DPOSS} is still widely used today. The advent of solid-state charge coupled devices (CCDs) provided a huge leap in the quantum efficiency (QE) of astronomical cameras, enabling existing telescopes to reach greater depths with shorter exposures. Contemporaneous improvements in CCD controller readout time and computer processing speed have increased data volumes while allowing data processing to keep pace. Beginning especially with the Sloan Digital Sky Survey \citep[SDSS;][]{York:00:SDSS} but also including the Optical Gravitational Lensing Experiment \citep[OGLE;][]{Udalski:92:OGLE}, the All-Sky Automated Survey \citep[ASAS;][]{Pojmanski:97:ASAS}, the Lincoln Near-Earth Asteroid Research survey \citep[LINEAR;][]{Stokes:00:LINEAR}, the Supernova Legacy Survey \citep[SNLS;][]{Astier:06:SNLSY1}, Palomar-Quest \citep{Djorgovski:08:PalomarQuest}, the Catalina Sky Survey \citep[CSS;][]{Larson:03:CSS} and associated Catalina Real-Time Transient Survey \citep[CRTS;][]{Drake:09:CRTS}, Skymapper \citep{Keller:07:SkyMapperOverview}, PanSTARRS \citep{Kaiser:10:PanSTARRSSurvey}, the Palomar Transient Factory \citep[PTF;][]{Law:09:PTFOverview}, the All-Sky Automated Survey for Supernovae \citep[ASAS-SN;][]{Shappee:14:ASASSN}, the Asteroid Terrestrial-impact Last Alert System \citep[ATLAS;][]{Tonry:18:ATLAS}, the Korea Microlensing Telescope Network \citep[KMTNet;][]{Kim:16:KMTNET}, the Dark Energy Survey \citep{DESCollaboration:05:DES,DES:16:MoreThanDE} and other surveys using the Dark Energy Camera \citep{Flaugher:15:DECam}, Hyper Suprime-Cam \citep{Miyazaki:18:HSC,Aihara:18:HSCSSP}, and the Evryscope \citep{Law:15:EvryscopeScience}, surveys exploited these new capabilities to improve a subset of depth, areal coverage, filter selection, and/or time-domain sampling. Here we present a new sky survey, the Zwicky Transient Facility (ZTF)\footnote{\url{http://ztf.caltech.edu}}. ZTF's new CCD camera for the first time fills the focal plane of the Palomar 48-inch Schmidt, providing three orders of magnitude improvement in survey speed relative to the photographic surveys, by virtue of higher QE and substantial reduction in time between exposures. If it could ignore daylight, ZTF could repeat the entire POSS survey in one day. This paper provides a general overview of the ZTF observing and data systems, describes the on-sky performance and public surveys, and presents initial results in transient, variable, and solar system science. Additional papers discuss specific ZTF aspects in greater detail: \citet{tmp_Graham:18:ZTFScience} describe the scientific objectives of ZTF. \citet{tmp_Dekany:18:ZTFObservingSystem} provide an in-depth description of the design of the observing system. \citet{tmp_Bellm:18:ZTFScheduler} discuss the ZTF surveys and scheduler. \citet{tmp_Masci:18:ZTFDataSystem} detail the ZTF data system. \citet{tmp_Patterson:18:ZTFAlertDistribution} present the alert distribution system employed by ZTF. \citet{tmp_Mahabal:18:ZTFMachineLearning} discuss several applications of machine learning used by ZTF. \citet{tmp_Tachibana:18:PS1StarGalaxy} presents a new star/galaxy classifier developed for ZTF from the PanSTARRS DR1 catalog \citep{Chambers:16:PS1,Flewelling:16:PS1db}. \citet{tmp_Kasliwal:18:GROWTHMarshal} describe a web-based interface used by the ZTF collaboration to identify, track, and follow up transients of interest. \section{Observing System} \label{sec:observing_system} The capability of a survey camera to discover astrophysical transients can be quantified by its volumetric survey speed: the spatial volume within which it can detect an object of given absolute magnitude, divided by the total time per exposure \citep{Bellm:16:Cadences}. This quantity combines limiting magnitude, field of view, and exposure and overhead times into a single metric capturing how quickly a survey can probe physical space for new events. The ZTF concept assumed reuse of the Palomar 48-inch Samuel Oschin Schmidt Telescope. The subsequent design of the ZTF observing system---the camera, telescope, and associated subsystems---then attempted to maximize the volumetric survey speed of the system within a fixed cost envelope subject to this constraint. This goal required maximizing the field of view of the camera while maintaining image quality, minimizing beam obstruction, and minimizing readout and slew overheads. The final design achieves more than an order of magnitude improvement in survey speed relative to PTF\footnote{ZTF's median overhead time is about 10.2\,s compared to 42.0\,s for PTF, which had median $R$-band limiting magnitudes of 20.7\,mag in 60\,s exposures. For a fiducial object with $M_r=-19$\,mag, then, $\dot{V}_{-19} = 3.5\times10^4$\,Mpc$^3$\,s$^{-1}$ for ZTF as built, a factor of 14.9 larger than for PTF \citep{Bellm:16:Cadences}.}. \citet{tmp_Dekany:18:ZTFObservingSystem} describes the as-built observing system in greater detail. \begin{table*} \begin{center} \caption{Specifications of the ZTF Observing System \label{tab:specs}} \begin{tabular}{ll} \hline \multicolumn{2}{c}{Telescope and Camera} \\ \hline Telescope & Palomar 48\,inch (1.2\,m) Samuel Oschin Schmidt\\ Location & 33\degr\,21\arcmin\,26\farcs35\,N, 116\degr\,51\arcmin\,32\farcs04\,W, 1700\,m \\ Camera field dimensions & $7.50^\circ$ N-S $\times$ $7.32^\circ$ E-W\\ Camera field of view & 55.0\,deg$^2$ \\ Light-sensitive area & 47.7\,deg$^2$ \\ Fill factor & 86.7\% \\ Filters & ZTF-$g$, ZTF-$r$, ZTF-$i$ \\ Filter exchange time & $\sim$110\,sec, including slew to stow\\ Image quality & $g=2.1^{\prime\prime},~r=2.0^{\prime\prime},~i=2.1^{\prime\prime}$ FWHM \\ Median Sensitivity (30\,sec, 5$\sigma$) & $m_g = 20.8,~m_r = 20.6,~m_i = 19.9$\\ & $m_g = 21.1,~m_r = 20.9,~m_i = 20.2$ (new moon)\\ \hline \multicolumn{2}{c}{CCD Array} \\ \hline Science CCDs & 16 6144$\times$6160 pixel e2v CCD231-C6 \\ Guide and Focus CCDs & 4 2k$\times$2k STA; delta doped by JPL\\ Pixels & 15\,$\mu$m\,pixel$^{-1}$\\ Plate scale & $1.01^{\prime\prime}$\,pixel$^{-1}$ \\ Chip gaps & 0.205$^\circ$ N-S, 0.140$^\circ$ E-W \\ CCD readout channels & 4 \\ Readout time & 8.2\,seconds \\ Read noise & 10.3 e- (median)\\ Gain & 5.8 e-/ADU \\ Linearity & 1.02\% +- 0.09\% (correction factor variation)\\ Saturation & 350,000 e-\\ \hline \end{tabular} \end{center} \end{table*} \subsection{CCD Mosaic} The P48 was designed to use 14-inch square photographic plates, providing a field of view of 43.56\,deg$^2$ \citep{Harrington:52:P48}. Large-format ``wafer-scale'' CCDs proved the most cost-effective means of filling this large area and had the additional advantage of minimizing losses due to chip gaps. Our goal of maximizing throughput while minimizing cost motivated our decision to survey primarily in filters near the peak quantum efficiency of standard silicon. We selected backside-illuminated standard silicon CCD231-C6 devices from e2v, Inc. The 15\,$\mu$m pixels provided critical sampling of the expected 2.0$^{\prime\prime}$ FWHM point spread function (\S \ref{sec:optics}) at a plate scale of 1.01$^{\prime\prime}$\,pixel$^{-1}$ while moderating data volume. (This pixel scale also matched that of the PTF camera.) Half of ZTF's CCDs have a single-layer anti-reflective coating, while the other half has a dual-layer coating that provides improved quantum efficiency in the $g$ and $r$ bands (Figures \ref{fig:focal_plane} \& \ref{fig:filters_qe}). \begin{figure} \includegraphics[width=\columnwidth]{ztf_fp_med.jpg} \caption{Image of the ZTF focal plane. The top and bottom rows of 6k $\times$ 6k science CCDs have a single-layer anti-reflective coating, while the middle rows have a dual-layer coating. Four 2k$\times$2k CCDs are located on the perimeter of the mosaic; one serves as a guider while the remaining three control tip, tilt, and focus. North is up and East is left. \label{fig:focal_plane}} \end{figure} \begin{figure} \includegraphics[width=\columnwidth]{QE_curves_delivered.png} \caption{On-axis filter transmission for the ZTF $g$, $r$, and $i$-band filters (blue, orange, and red lines). Grey and green points are measurements of the quantum efficiencies of the CCDs with single- and double-layer anti-reflective coatings, respectively. Shaded regions show the range of these measurements, while grey and green lines show a model of the quantum efficiency for each configuration. \label{fig:filters_qe}} \end{figure} The CCDs are nearly perfect cosmetically having only a few blocked columns. QE is uniform to a few percent on large scales. Response non-uniformity on short scales is 0.55\% at 400 nm falling linearly to 0.3\% at 650nm. Dark current is negligible in maximum exposure times contemplated (300 s). Well capacity is typically 350,000 e-, and charge transfer inefficiency is < 5ppm per pixel shift. Four 2k$\times$2k CCDs located around the perimeter of the mosaic serve as guide and focus sensors. These are STA-designed fully depleted thick CCDs that were delta-doped and multi-layer anti-reflection coated by the JPL Micro Devices Laboratory. Three are offset 1.45\,mm beyond the plane of science CCDs to allow determination of tip, tilt, and focus by computing the square root of the 2nd moment of the out-of-focus images. The fourth in-focus CCD is used for guiding. \subsection{Cryostat} Because the focus of a Schmidt telescope is located within the telescope tube itself, maximizing throughput requires minimizing the beam obstruction caused by the ZTF camera and related components. We located the readout electronics (\S \ref{sec:readout}), shutter (\S \ref{sec:shutter}), and filter exchanger (\S \ref{sec:filters}) outside the telescope tube. \begin{figure} \includegraphics[width=\linewidth]{cryostat_exploded_sm.jpg} \caption{Cutaway view of the ZTF cryostat. \label{fig:cryostat_exploded}} \end{figure} \begin{figure} \includegraphics[width=\linewidth]{vib_in_lab.jpeg} \caption{Rear view of the vacuum interface board during cryostat assembly. The vacuum gasket and connectors are visible around the perimeter. Holes in the interior provide space for the CCD flex cables as well as the control rods used during assembly. \label{fig:vib}} \end{figure} The cryostat can achieve its extraordinary compactness by a signal routing strategy based on a vacuum interface board, a printed circuit board having embedded traces and sandwiched between two O-rings that maintain vacuum (Figures \ref{fig:cryostat_exploded} \& \ref{fig:vib}). On the outer edge of the interface board, commercial off-the-shelf connectors mount flush against the side of the cryostat, behind the beam footprint of the front window. Low obscuration (22.4\% including spiders) is achieved at the Schmidt prime focus despite the mosaic having comparable diameter to other major CCD cameras: The ZTF mosaic measures 560\,mm from corner to corner, similar in size to the Dark Energy Camera (525\,mm diameter) and about half of the area of the Large Synoptic~Survey Telescope camera (640\,mm diameter). \subsection{Readout Electronics} \label{sec:readout} Each four-CCD quadrant of the mosaic is operated completely independently by a sixteen-channel CCD controller, the ``Archon'' made by Semiconductor Technology Associates (STA) with 100 MHz video processor employing digital correlated double sampling. A fifth Archon reads the three focus CCDs and guider though two channels each. All controllers share a 100 MHz master clock and trigger to support the pixel-synchronous readout required to eliminate patterns that would be caused by crosstalk from clocks on one controller to the video signal of another. The guide/focus CCDs cannot operate at the same speed, so one pixel is read for every three science pixels, to retain synchronization. True differential outputs of the science CCDs provide clock feed-through attenuation and crosstalk suppression, which in combination with clock slew rate minimization allows pixel time to be reduced to 830 ns \citep{tmp_Smith:18:SpeedNoise}. Novel concurrent parallel clocking conceals line shift overhead so that readout time is only 8.2\,sec, while delivering 10.3 electrons median read noise, well below the minimum shot noise in the sky (27 electrons). \subsection{Optics} \label{sec:optics} Maintaining PTF's moderate image quality (2.0$^{\prime\prime}$ FWHM in $r$-band) over the larger ZTF focal plane required novel optics. The focal surface of the Schmidt telescope is curved; the glass planes used in the photographic surveys conducted with P48 were physically bent on a mandrel to conform to this shape \citep{Harrington:52:P48}. For PTF, an optically powered dewar window was sufficient to provide good image quality over the flat CCD array. However, this approach alone was insufficient to correct the much larger field of view of ZTF. The final ZTF optical design consists of four optically-powered elements as well as the flat filters (\S \ref{sec:filters}). In front of the existing achromatic doublet Schmidt corrector that was installed for the Second Palomar Sky Surveys \citep{Reid:91:POSS-II}, we installed a ``trim plate'' to modify the aspheric coefficient of the Schmidt corrector at the telescope pupil by about 10\%. The trim plate was figured by the Nanjing Institute for Astronomical and Optical Technologies (NIAOT) in China, from a Corning fused silica blank. To handle the extreme field curvature of the Schmidt focus, the dewar vacuum window is a meniscus (with a conductive ITO coating on the inner surface providing resistive heating.) The CCDs themselves are mounted to a faceted cold plate, where each facet is a chord of the residual field curvature. Finally, to compensate for remaining curvature over each large science CCD, we mount $\sim$2 mm thick fused silica field flattener lenses 2 mm above each detector (Figure \ref{fig:cryostat_exploded}). Ultimately, the useful field of the view of ZTF is limited by the Schmidt telescope design. At extreme field angles part of the beam from falls beyond the edge of the telescope primary mirror, with vignetting reaching 30\% in the corners. \subsection{Shutter} \label{sec:shutter} To minimize beam obscuration within the telescope tube, we placed the shutter at the entrance pupil of the telescope. This shutter was developed through a collaboration of Deutsches Elektronen-Synchrotron (DESY) and Bonn Shutter, who successfully delivered a bi-parting shutter with 1.2-meter aperture that opens and closes within 430\,msec while imparting less than 3 grams unbalanced force to the top of the telescope with negligible impact on image stability. \subsection{Telescope} In order to optimize survey productivity as a system, and increase reliability, we invested in numerous upgrades to the Samuel Oschin Telescope. To minimize slew overheads, we upgraded both telescope drive axes as well as the dome drive system to enable faster slews. After upgrades, the (hour angle, declination, dome) drive accelerates to and decelerates from a top speed of (2.5,~3.0,~3.0)$^\circ$\,s$^{-1}$ at (0.4,~0.5,~0.5)$^\circ$\,s$^{-2}$. With these upgrades, the telescope can slew and settle between adjacent fields, separated by 7 degrees, entirely during the CCD readout time. Other upgrades \citep{tmp_Dekany:18:ZTFObservingSystem} included a new three-vane instrument spider (to reduce beam obscuration), improved baffling of the telescope tube (to reduce scattered light), facility electrical improvements and lightning protection, a new dry air system (to inhibit condensation on window and refrigerant lines), refurbishment of the wind screen, and better thermal management in the dome. \subsection{Filters and Filter Exchanger} \label{sec:filters} ZTF has a complement of three custom filters, ZTF-$g$, ZTF-$r$, and ZTF-$i$. Given the differences of the ZTF system relative to potential calibrators (SDSS, PS1, \textit{Gaia}), we did not attempt to match any existing filter bandpasses exactly. Instead, we sought to maximize the signal-to-noise ratio achieved by avoiding major lines in the Palomar sky background and to control costs on the large filters. Materion Precision Optics manufactured the $g$ and $r$ band filters and Asahi Spectra produced the $i$-band filter. Our desire to minimize beam obstruction motivated an unusual design for the filter exchanger. We store all three filters in slots in a filter cabinet mounted in an access hatch of the telescope tube. A commercial robotic arm stows in a similar position. During the filter exchange, the arm uses a set of solenoid-deactivated magnets and redundant latches on its manipulator to dock with the frame holding the desired filter in the storage cabinet, move it to the camera, and secure it there. The arm then disconnects from the filter frame and stows against the wall of the telescope tube. At present, for safety, the exchanges are only conducted when the telescope is in a quasi-horizontal stow position where none of the moving elements physically pass over the telescope primary mirror. Including the slew time to and from the stow position, the additional overhead to change filters is $\sim$100\,seconds in typical operations. Additional optimization of the arm motion profile and exchanging closer to zenith is expected to reduce this further. \subsection{Robotic Observing System} The ZTF Robotic Observing Software (ROS) is based on the Robo-AO observing system \citep{Riddle:12,tmp_Dekany:18:ZTFObservingSystem} though many of the underlying tools were retained and upgraded. ROS is based on a modular, fail-safe, multi-threaded, multi-daemon software architecture. It has been designed to be able to run continuously for an extended period, while allowing human operators to monitor the system to determine its performance, track nightly errors, and reconfigure parameters if necessary. Configuration files support engineering and science operation modes. Extensive telemetry is aggregated from all ZTF hardware and telescope control subsystems. ROS is hosted on a single supervisory computer (which also controls the guide and focus CCDs) and four Archon camera control computers, each of which is responsible for readout of one quadrant of four science CCDs. Sufficient on-site data storage exists for at least two weeks of regular observing, in the unlikely event the microwave link from Palomar (\S \ref{sec:transfer}) were to suffer an outage. \subsection{Scheduler} The ZTF scheduler determines which fields to observe and in what order. Integer Linear Programming techniques inspired by \citet{Lampoudi:15:LCOGTScheduler} maximize the volumetric survey speed using slot-based lookahead throughout the night. \citet{tmp_Bellm:18:ZTFScheduler} describes the scheduling system in detail. Due to the desire to simplify the data processing for image subtraction (\S \ref{sec:image_differencing}), all ZTF images are obtained on a fixed grid of fields with minimal dithering. The primary grid covers the entire sky with an average overlap between fields of about 0.26$^{\circ}$ in Declination and about 0.29$^{\circ}$ in Right Ascension. The fields are aligned to cover the Galactic Plane region with the fewest pointings, improving the efficiency of both Galactic and extragalactic surveys. We also took care to ensure that large local galaxies were placed effectively. A secondary grid of pointings, offset diagonally by about 5$^\circ$, fills in most of the CCD gaps and improves the fill factor within the survey footprint from 87.5\% to 99.2\% assuming no dithering. \subsection{Flat Field Illuminator} PTF constructed its flat fields from science images taken each night. In addition to preventing final reduction of the images until the end of the night \citep{Laher:14:PTFPipeline}, this scheme was negatively affected by fringing of sky lines and scattered light from the moon and other bright sources and proved to be among the factors limiting PTF's photometric precision. For ZTF, a new Flat Field Illuminator system enables stable calibration frames to be taken before the night's observing. The Flat Field Illuminator consists of a reflective screen, LED illuminators, and a baffled enclosure. It is mounted on a tower close to the P48 dome. Twenty four narrow-spectrum LEDs in each of 15 wavelengths spanning the ZTF filter bandpasses are spaced around a ring pointing towards a screen. The screen is constructed from aluminum honeycomb paneling which makes it lightweight, stiff, and flat. Many coats of Avian-D white paint provide a very uniform lambertian scattering surface. The forward baffle mounted on the telescope docks to a similar baffle surrounding the flat field system to fully enclose the path between flat field screen and detectors. The enclosure walls are heavily baffled and covered with 2\% reflective Avian-D black paint facing the screen and black flocking facing the telescope. Similar baffles have been installed along the entire length of the enclosed telescope tube at sufficiently close spacing to block all single-bounce paths between flat field screen and primary mirror. This screen provides smooth and stable illumination for removing mid- to small-scale spatial frequencies in the sensitivity pattern. The 7\% radial intensity variation at the screen integrates to <2\% flat fielding error at the focal plane. This residual error occurs on large spatial scales that are easily corrected by calibrations derived from observing the relative photometry of stars as they are moved across the field (``star-flats''). LEDs are driven by constant current sources, and their forward voltage is monitored to sense junction temperature so that temperature compensation can be applied if required. Flats are acquired separately in each LED wavelength and then combined with a relative weighting which minimizes the manifestation of CCD QE patterns in the "star-flats" which should only show mosaic-scale patterns. The principal error observed in flats is a 6\% increase close to East and West edges of the CCDs where light scatters off the frames holding the field flattener lenses. This additive background must be removed from flats since it does not represent enhanced sensitivity. Fortunately it rises rapidly close to the edge of the CCD and can be fitted with sub-percent accuracy. \section{Data System} \label{sec:data_system} The ZTF data processing system is housed at the Infrared Processing and Analysis Center (IPAC) and builds on the lessons learned processing data from PTF and iPTF \citep{Ofek:12:PTFPhotometricCal,Laher:14:PTFPipeline,Masci:17:PTFIDE}. \citet{tmp_Masci:18:ZTFDataSystem} provides a complete description of the ZTF pipelines. \subsection{Data Transfer} \label{sec:transfer} The CCD controllers sample the video signal at 100 MHz and 16 bit resolution, averaging multiple samples to produce a floating point output with about 18 bits of dynamic range. We use the \texttt{fpack} program \citep{Pence:10:Compression} to compress each quadrant and each overscan separately, allowing the compression to be optimized for the measured width of the core of the histogram in each image. In practice this noise root variance $\sigma$ is dominated by sky noise ($\geq 25$\,e$^{-}$\,s$^{-1}$\,pixel$^{-1}$). \texttt{fpack} converts the floating point data to integers applying a normalization factor $q = 2$, which results in $\sigma = 2$ for the histogram of integers. Lossless Rice compression is then applied. We apply a pseudo-random dither prior to normalization to avoid biases produced by rounding. The same dither values are subtracted after decompression (using the \texttt{funpack} program) so that the dither does not add noise. The result is that number of bits per pixel is reduced to an average of 5 during data transport at a cost of a 1\% increase in sky noise, due to quantization by the normalization step. Despite the slight increase in noise, our tests confirm that this procedure does not appreciably bias image coaddition or photometry \citep[cf.][and references therein]{PriceWhelan:10:ImageBandwidth,Pence:10:Compression}. The observing system transfers the images to IPAC via the NSF-funded High Performance Wireless Research and Education Network (HPWREN) administered by the University of California San Diego. Typical transfer times are <25\,seconds, sufficient to keep up with the fastest observing cadence (38.3\,seconds) throughout the night. \subsection{Image Processing} \label{sec:image_processing} Upon arrival, each multi-extension FITS image\footnote{\url{https://fits.gsfc.nasa.gov/}} is split into four readout quadrants per CCD and farmed out in parallel to the processing cluster. All subsequent processing is conducted independently on each CCD readout quadrant. Each image is tagged with the observing program that obtained it (public, collaboration, or Caltech), and the access permissions for all of the downstream data products are propagated accordingly. The image processing pipeline first subtracts bias frames and applies the flat field correction. The pipeline then calls the \texttt{SCAMP} package \citep{Bertin:06} to determine a World Coordinate System using \textit{Gaia} DR1 \citep{Brown:16:Gaia1} as the reference catalog. Subsequently the pipeline fits a zero point and color term to photometrically calibrate the quadrant to PanSTARRS 1 \citep{Chambers:16:PS1}. The pipeline sets appropriate mask bits for saturation, bad pixels, ghosts, and other instrumental artifacts. The pipeline produces both point-spread function (PSF) fit (DAOPHOT, \citealp{Stetson:87}) and aperture (SExtractor, \citealp{Bertin:96}) photometry catalogs from the processed direct image, and the raw and processed images and catalogs are archived (\S \ref{sec:archive}). \subsection{Reference Image Generation} Coadded reference images are required for image differencing (\S \ref{sec:image_differencing}) as well as lightcurve source association (\S \ref{sec:lightcurves}). We construct reference images for each field, filter, and quadrant combination. Typical stacks have at least 15 images. We use \textit{Swarp} \citep{Bertin:02} to map the images to a common footprint and then compute an outlier-rejected average. Reference building pipelines are triggered automatically at the end of the night. \subsection{Image Differencing} \label{sec:image_differencing} The image differencing pipeline identifies moving and changing sources. It first prepares the processed science image and reference image by matching their photometric throughputs, warps the reference image onto the science image, and matches their backgrounds at low spatial frequencies. PSF-matching, image differencing, and the creation of an accompanying match-filtered image optimized for detecting point sources on the difference are then performed using the ZOGY algorithm \citep{Zackay:16:ZOGY}. The pipeline then detects both positive and negative ``candidate'' sources at a signal-to-noise ratio greater than 5. The pipeline also measures a variety of pixel-based features for each candidate (e.g., the number of positive and negative pixels in a region around the candidate) to provide to the Real-Bogus machine learning algorithm \citep{tmp_Mahabal:18:ZTFMachineLearning}. Each candidate is loaded into a database and then packaged with other contextual information into an alert packet (\S \ref{sec:alert_stream}) for distribution. The realtime pipeline runs from raw images to transient alerts in about four minutes. \subsection{Transient Alert Stream} \label{sec:alert_stream} The ZTF alert distribution system provides near-real-time access to transient and variable events identified by the image differencing pipelines. To aid the user in filtering the full alert stream for sources of interest, the ZTF alert stream provides rich alert packets containing not only the measurement that triggered the alert, but also a wide variety of contextual information. These include a Real-Bogus score \citep{tmp_Mahabal:18:ZTFMachineLearning} assessing the probability the candidate is astrophysical, a lightcurve of previous detections (or upper limits) from the last 30 days, a summary of prior detections before the 30-day window, cross-matches to the Pan-STARRS1 catalog along with a probabilistic star-galaxy score \citep{tmp_Tachibana:18:PS1StarGalaxy}, and FITS cutouts of the science, reference, and difference images. The alert packets themselves are serialized in the open-source Apache Avro format\footnote{\url{https://avro.apache.org}}. Schemas, example packets, and complete documentation of the packet fields are available\footnote{\url{https://github.com/ZwickyTransientFacility/ztf-avro-alert}}. The alert packets are distributed using the open-source queue system Apache Kafka\footnote{\url{https://kafka.apache.org/}}. Kafka provides a distributed queue that is scalable to the alert volumes expected by LSST. \citet{tmp_Patterson:18:ZTFAlertDistribution} describes the architecture and implementation of the alert distribution system more fully. Alerts from ZTF's public survey stream in near-real time to community brokers, including the Arizona-NOAO Temporal Analysis and Response to Events System \citep[ANTARES;][]{Narayan:18:ANTARES}, ALeRCE\footnote{Automatic Learning for the Rapid Classification of Events; \url{http://alerce.science/}}, Lasair, and Las Cumbres Observatory\footnote{\url{https://mars.lco.global}} which will provide public access. While the community brokers come online, we are also providing a bulk nightly release of public alerts\footnote{\url{https://ztf.uw.edu/alerts/public/}}. \subsection{Solar System Processing} Solar System Processing is divided between searches for streaked Near-Earth Objects and point-like moving objects. Both are detected in the difference image processing. Streaked objects are identified by a dedicated pipeline originally developed for PTF \citep{Waszczak2017}. Point-like moving object candidates are identified at the end of the night by the ZTF Moving-Object Discovery Engine (ZMODE). ZMODE attempts to link tracklets from the last three observing nights and then fit orbits to them. High-quality objects are forwarded to human scanners for vetting and then reported to the Minor Planet Center. \subsection{Direct Imaging Lightcurves} \label{sec:lightcurves} For archival studies of variable stars and AGN in uncrowded fields, lightcurves built from direct (un-subtracted) images provide a higher-fidelity data product because they avoid the subtraction artifacts and additional noise produced by difference imaging. We build lightcurves every few months from the calibrated PSF photometry catalogs produced from the unsubtracted epochal images (\S \ref{sec:image_processing}). Starting from the catalogs built from the deep reference images, we associate the sources in each epochal PSF photometry catalog with the nearest source in the reference catalog. The resulting lightcurves are stored in HDF5 ``matchfiles'' on a field, quadrant basis\footnote{This choice eases processing but means that photometry from the same source can appear in multiple files if observations are taken in the secondary pointing grid or if a source is near the readout quadrant boundary.}. To further improve the photometric precision, we solve for a small per-epoch shift in the absolute calibration zeropoint by minimizing the scatter of non-varying stars \citep{Ofek:11:RelativePhotometry}, achieving better than 10\,mmag repeatability for bright, unsaturated sources. Additionally, we store a variety of timeseries features \citep[cf.][]{Richards:11:MLClassifier} computed on the lightcurve to aid in identification of variable sources. \subsection{Archive and Data Releases} \label{sec:archive} The Infrared Science Archive (IRSA) at IPAC provides archival access to ZTF images, catalogs, lightcurves, and archived alert packets\footnote{See \url{http://irsa.ipac.caltech.edu/Missions/ztf.html}. PTF and iPTF data are publicly available through a comparable interface, \url{http://irsa.ipac.caltech.edu/Missions/ptf.html}}. Both interactive web-based and programmatic queries are supported. The first release of data products (other than alerts) from the public surveys is planned for one year after the start of the survey, in the second quarter of 2019\footnote{Note that members of the ZTF collaboration are not allowed to access archived data from the public surveys prior to the data release.}. \section{On-Sky Performance} \label{sec:performance} ZTF achieved first light in October 2017. Commissioning activities continued through March 2018 and combined technical activities to verify the performance of the observing and data systems with science validation experiments. Formal survey operations began on March 20, 2018, although routine operations of the filter exchanger and guide and focus CCDs occurred only in April and June 2018 respectively. Figure \ref{fig:fwhm} shows the delivered image quality for all three ZTF filters. Median image quality for the subset of observations above airmass 1.2 was 2.1$^{\prime\prime}$ FWHM in $g$-band, 2.0$^{\prime\prime}$ FWHM in $r$-band, and 2.1$^{\prime\prime}$ FWHM in $i$-band. \begin{figure} \includegraphics[width=\columnwidth]{fwhm_by_filter.png} \caption{Normalized histogram of point-source full-width at half-maximum (FWHM) for all images in $g$ (blue), $r$ (orange), and $i$ (red) bands during June 2018. \label{fig:fwhm}} \end{figure} Figure \ref{fig:limiting_mag_hist} shows the limiting magnitudes obtained in all three filters over one lunation. Median five-sigma model limiting magnitudes are 20.8\,mag in $g$-band, 20.6\,mag in $r$-band, and 19.9 in $i$-band. Restricting to $\pm$3\,days around new moon, the dark-time median limiting magnitudes are 21.1\,mag in $g$-band, 20.9\,mag in $r$-band, and 20.2 in $i$-band. \begin{figure*} \includegraphics[width=\textwidth]{limiting_mag_by_filter.png} \caption{Left: Histogram of five-sigma limiting magnitudes in 30 second exposures for $g$ (blue), $r$ (orange), and $i$ (red) bands over one lunation. Right: Limiting magnitudes for observations obtained within $\pm$3\,days of new moon. \label{fig:limiting_mag_hist}} \end{figure*} \section{Survey Strategy} \label{sec:survey_strategy} ZTF divides its observing time between three high-level programs: public surveys (40\%), ZTF collaboration surveys (40\%), and Caltech surveys (20\%). Each program in turn divides its time between multiple sub-surveys. All of the available surveys are interleaved simultaneously by the survey scheduler \citep{tmp_Bellm:18:ZTFScheduler}, which optimizes each night's schedule for volumetric survey speed while maintaining balance among the programs. Private surveys are not allowed to use the observation history of the public surveys in the scheduling process. In addition to performing the regularly scheduled surveys, the scheduler can perform Target of Opportunity (TOO) observations in response to external triggers. Each image is taken for one and only one owner in order to simplify access to derived data products (images, catalogs, lightcurve points, alerts). As the public surveys cover the entire available sky, some ``duplicate'' observations are unavoidable. Here we give an overview of the public surveys; a detailed discussion of the surveys and on-sky scheduler performance will appear in \citet{tmp_Bellm:18:ZTFScheduler}. \citet{tmp_Graham:18:ZTFScience} provides an overview of some of the expected scientific returns. During its public time, ZTF is conducting the two surveys of broad scientific utility that we proposed to the NSF Mid-Scale Innovations Program (MSIP): a Northern Sky Survey and a Galactic Plane Survey. Motivated by the LSST baseline cadence \citep[e.g.,][]{ivezic2008lsst}, the Northern Sky Survey is a three-day cadence survey of all fields with centers north of $\delta = -31^\circ$, except those in the Galactic Plane Survey\footnote{As of this writing, limits of the Telescope Control System exclude observations north of $\delta = 80^\circ$.}. The Galactic Plane Survey is a nightly survey of all visible fields in the region $|b| < 7^\circ$, $\delta > -31^\circ$. For both surveys, each night a field is observed, it is visited twice, once in $g$-band and once in $r$-band, with at least 30\,minutes separation between the two visits \citep[cf.][]{Miller:17:ColorMeIntrigued}. We expect to run these public surveys for at least the first eighteen months of the ZTF survey. We will attempt to obtain low-resolution spectra for all likely extragalactic transients brighter than 18.5\,mag using the SED Machine \citep{Blagorodnova:18:SEDM} on the Palomar 60-inch and will publicly report these classifications \citep{Fremling:18:BTS}. \section{First Results} \label{sec:first_results} ZTF will enable new discoveries of many classes of astrophysical objects, including explosive extragalactic transients, optical counterparts of multi-wavelength and multi-messenger phenomena, variable stars, Tidal Disruption Events, Active Galactic Nuclei, and solar system objects. \citet{tmp_Graham:18:ZTFScience} presents ZTF's science goals in detail. In this section we present initial results in these areas from the early ZTF survey. \subsection{Transient Science} During commissioning of the alerts system, we searched the incoming alerts for astrophysical transients, both providing feedback for the machine learning by marking ``bogus'' sources, and flagging potential supernovae for follow-up. Transient alerts were filtered and vetted via the GROWTH marshal system \citep{tmp_Kasliwal:18:GROWTHMarshal} and using a machine-learning based classifier \citep{tmp_Mahabal:18:ZTFMachineLearning}. In two months of commissioning data, we classified a total of 38 supernovae. Of these, 15 were only discovered by ZTF, while another 13 were first discovered by ZTF and later picked up by other surveys. The relatively modest yield is expected due to the limited set of reference images available, the need to maintain high thresholds while training the Real/Bogus system, and poor winter weather. All classified supernovae from commissioning data have been made public on the Transient Name Server (see \citealp{Kulkarni:18:ATel11266} and \citealp{Lunnan:18:ATel11567} for details). The classification spectra are available on WISeREP \citep{yg12}. As an illustrative example from the commissioning data, we present ZTF18aaayemw (SN\,2018yt), one of the first objects found, and one not identified by any other surveys. ZTF18aaayemw was discovered as a rising transient on 2018-02-07.26 (UT). Because this object was discovered so early in the survey, flux is also seen in the reference image that was built from data taken over the previous nights, so we cannot constrain the explosion date exactly. The light curve is shown in the left panel of Figure~\ref{fig:snspec}. An initial spectrum taken with the Nordic Optical Telescope on 2018-02-14 shows a featureless, blue continuum indicating a blackbody temperature of $\sim12,000$~K; narrow emission lines from the host galaxy sets the redshift at $z=0.0512$. We continued to follow ZTF18aaayemw, and the sequence of spectra obtained is shown in the right panel of Figure~\ref{fig:snspec}. The spectrum remained blue and featureless for at least two weeks after discovery; spectra taken a month later show broad H$\alpha$ emission, classifying ZTF18aaayemw as a SN~II. Details of the data collection and reduction are found in Appendix~\ref{sec:SNdetails}. The early spectral evolution of ZTF18aaayemw is similar to that of other SNe~II such as SN~IIb iPTF13ast \citep{galyam14} and SN~IIn iPTF11iqb \citep{smith15}, which also did not show broad features until later than 15~days post-explosion. These two supernovae also showed flash spectroscopy features (i.e., features from the stellar envelope or circumstellar material ionized by the supernova shock breakout), which we do not observe in ZTF18aaayemw. This could be because no such features were present, or because they have faded by our earliest spectrum at $>7$~days. In the compilation of \citet{khazov16}, only 1/13 SNe~II where the first spectrum was taken 7-9 days after explosion showed flash features, while 3/13 showed blue, featureless continua like we see in ZTF18aaayemw. \begin{figure*} \begin{center} \begin{tabular}{cc} \includegraphics[width=3.5in]{ZTF18aaayemw_lc.pdf} & \includegraphics[width=3.5in]{ZTF18aaayemw_spec.pdf} \end{tabular} \caption{Left: Light curve of ZTF18aaayemw. The rise is well captured in ZTF data. 20 days after discovery, the supernova is still detectable in the UV. The spectroscopic epochs are marked along the bottom axis. Right: Sequence of spectra of ZTF18aaayemw. The spectrum stays featureless and blue for at least the first $\sim 20$~days, before finally developing broad H$\alpha$ classifying ZTF18aaayemw as a SN~II. \label{fig:snspec}} \end{center} \end{figure*} \subsection{Target of Opportunity and Multi-Messenger Science} We performed Target-of-Opportunity (ToO) follow-up observations in response to IceCube-171106A \citep{IceCube:17:GCN22105}, a neutrino of likely astrophysical origin with an estimated energy in excess of 1 PeV. The neutrino was detected by the IceCube Neutrino Observatory, and was distributed as part of the IceCube Realtime Program \citep{Aartsen:17:IceCube}. It was well-localized, with a sub-degree angular resolution, and was followed-up by ZTF with single-pointing observations. With ZTF's large field-of-view, such events will typically be covered by observations in a single field. Though the field was observed in this commissioning phase multiple times over a period of days, comparisons to reference images did not reveal any optical counterpart. Nonetheless, this example illustrates the potential of the ZTF ToO program to undertake multi-messenger observations of neutrino and gravitational-wave events. ZTF also observed the localization region of the short gamma-ray burst GRB180523A (trigger 548793993) detected by \textit{Fermi}-GBM. ZTF obtained a series of $r$ and $g$-band images covering 2900 square degrees beginning at 3:51 UT on 2018 May 24 (9.1 hours after the burst trigger time), corresponding to approximately 70\% of the probability enclosed in the localization region. Images in $r$ and $g$ bands were again taken the following night. More than 100 high-significance transient and variable candidates were identified by our pipeline in this area, all of which had previous detections with ZTF in the days and weeks prior to the GRB trigger time. No viable optical counterparts were thus identified. The median 5 sigma upper limit for an isolated point source in our images was $r > 20.3$\, and $g > 20.6$\,mag. \subsection{Variable Science} During commissioning we also validated ZTF's utility for studying variable stars using direct (non-difference) imaging. \subsubsection{Variability of Be Stars} A fraction of Be stars are known to exhibit photometric variability due to the non-radial pulsation, ejected material, stellar winds, or instability of the decretion disk \citep[see review in][and references therein]{2013A&ARv..21...69R}. A variety of kinds of variability with different time scales have been reported, including outbursts, long-term variation, and periodic variations \citep{1997A&A...318..548O, 1998A&A...335..565H, Labadie2016}. Using the ZTF commissioning data, we explored the variability on timescales of days to months of 83 Be star candidates in open clusters selected from \citet{Yu2018}. In our preliminary examination of these data, we found that less than $\sim10\%$ of our Be star candidates show qualitative variability. Figure~\ref{fig:Be} gives one example of a Be star candidate that exhibits variability (upper panel) and another one that does not (lower panel). We expect that a longer time baseline as well as further refinements of the lightcurve pipeline will provide valuable constraints on the variability of Be stars (such as variable fraction, amplitude of variation, outburst activity, and so on). \begin{figure} \includegraphics[width=3.5in]{Yu2018_Be.pdf} \caption{ZTF light curves of two Be star candidates selected from \citet{Yu2018} in $g$ (filled blue triangles) and $r$ (open red circles) bands. The magnitudes are based on the PSF photometry but have not had relative photometry corrections applied \citep[see][]{tmp_Masci:18:ZTFDataSystem}, leading to larger observed scatter on a handful of nights. \label{fig:Be}} \end{figure} \subsubsection{RR Lyrae} The homogeneous $gri$-band light curves for RR Lyrae provided by the ZTF are also a useful tool to investigate their pulsational properties. For example, the period-color and amplitude-color relations of RR Lyrae can be used to probe the interaction of photosphere with the hydrogen ionization front in these type of pulsating stars \citep[e.g.,][and references therein]{2017ApJ...834..160N}. To check the light curve quality for large-amplitude variable stars such as RR Lyrae, we constructed the light curves of known RR Lyrae in one ZTF field based on the ZTF commissioning data. Figure~\ref{fig:RRab} shows the saw-tooth shape light curves for one bright and one faint RR Lyrae located in the selected ZTF field, demonstrating the expected light curve quality when ZTF is in full science operation. The finding of faint ($\sim20.5$~mag), and hence distant, RR Lyrae will be useful for the study of the Galactic halo \citep[e.g.,][and references therein]{Cohen2017}. \begin{figure} \includegraphics[width=3.5in]{ZTF_RRab.pdf} \caption{ZTF $r$-band light curves for two known RR Lyrae based on PSF photometry but without relative photometric correction \citep[see][]{tmp_Masci:18:ZTFDataSystem}. The pulsation periods $P$ are taken from literature and not derived from the ZTF light curves. \label{fig:RRab}} \end{figure} \subsection{Small Bodies in the Solar System} Small solar system bodies encompass comets and asteroids, Trojans, Centaurs, near-Earth objects (NEOs), and trans-Neptunian objects. ZTF will provide extensive observations of thousands of small bodies, allowing long-duration measurements of their positions, motions and brightnesses as a function of time. Below we discuss the potential science return from the ZTF observations of solar system objects, and highlight four examples of early results from the first months of operation. \subsubsection{Near Earth Objects} The NEO search activity of ZTF comprises two components: detection of point-like NEOs, and detection of natural fast-moving objects that are moving more than a few degrees per day and hence appear as streaks. The ZTF Data System \citep{tmp_Masci:18:ZTFDataSystem} scans all ZTF difference images for these two types of objects and releases candidate detections in near real-time. Screening of new detections and submission to the Minor Planet Center (MPC) has been done on a best effort basis since February 2018 for those fields for which good reference images exist. On a clear night with cadence and fields suitable for asteroid detection, ZTF can produce $\sim100,000$ detections of $\sim25,000$ asteroids. By 2018 May 4, after three months of operation, ZTF had submitted $\sim600,000$ measurements to the MPC and been assigned designations for about 320 new objects. The new discoveries include seven Near-Earth Asteroids (Table~\ref{tbl:ztf-nea}), of which one (2018 CL) is a Potentially Hazardous Asteroid---an object with a minimum orbit intersection distance with Earth of less than 0.05\,A.U. and $M_H < 22$. Five of these seven new NEOs were detected by the dedicated streak-detection pipeline \citep{Waszczak2017}. Current efforts are aimed towards optimizing this pipeline for better rejection of false positives as we better characterize the new camera and detectors, and using citizen science through Zooniverse to increase the size of the training sample \citep[for details, see][]{tmp_Mahabal:18:ZTFMachineLearning}. Efficient new algorithms are also under development \citep{tmp_Nir:18:StreakDetection}. \begin{table*} \begin{center} \caption{Near-Earth Asteroids discovered by ZTF as of 2018 April 30.\label{tbl:ztf-nea}} \begin{tabular}{ccccc} \tableline\tableline Designation & Date of discovery & Orbit type & Discovery engine & Reference \\ \tableline 2018 CL & 2018 Feb 5 & Aten & Streak & \citet{MPECC23, Ye18} \\ 2018 CP$_2$ & 2018 Feb 9 & Apollo & Point-source & \citet{MPECC73} \\ 2018 CZ$_2$ & 2018 Feb 9 & Apollo & Point-source & \citet{MPECC88} \\ 2018 GN$_1$ & 2018 Apr 10 & Apollo & Streak & \citet{MPECG56} \\ 2018 GE$_2$ & 2018 Apr 10 & Apollo & Streak & \citet{MPECG73} \\ 2018 HL$_1$ & 2018 Apr 21 & Apollo & Streak & \citet{MPECH70} \\ 2018 HX$_1$ & 2018 Apr 23 & Apollo & Streak & \citet{MPECH80} \\ \tableline \end{tabular} \end{center} \end{table*} \subsubsection{Asteroid Light Curves} Asteroid light curves obtained from high-cadence observations can secure the measurements of their rotation periods and, moreover, facilitate the discovery of super-fast rotating asteroids \citep[cf.][and references therein]{chang2017}. Wide-field facilities such as ZTF are particularly powerful for this type of science because of the efficiency of collecting numerous light curves within a short period of time \citep[e.g.,][]{Masiero2009, Polishook2009, Dermawan2011, Polishook2012, Chang2014, Chang2015, Chang2016, Waszczak2015}. To demonstrate the ability of the ZTF for this task, we conducted a pilot campaign on December 15, 2017, in which we repeatedly scanned between two ZTF fields on the ecliptic plane at opposition for $\sim3$ hours using a cadence of 90 seconds. More than 2600 asteroid light curves with 10 or more detections were extracted by matching the source detections against the ephemerides obtained from the {\it JPL/HORIZONS} system with a search radius of 2\arcsec. To find the rotation periods of asteroids, we fitted all the light curves using a second-order Fourier series \citep{Harris1989}. Due to the short observation time span, we were only able to detect periods of $< 3$ hour. In Figure \ref{asteroid}a we show the ZTF lightcurve for asteroid (11014) Svatopluk folded to the derived rotation period of 2.25 hr. However, most relatively bright asteroids show a clear light curve covering an incomplete rotation (Figure \ref{asteroid}b). For faint asteroids ($\gtrsim 19.5$ mag), we were not able to conclusively identify any rotation periods (e.g., Figure \ref{asteroid}c), likely due to larger uncertainties masking the variability, and the short time span of observations. In this pilot campaign, we did not find any super-fast rotating asteroids. \begin{figure*} \plotone{ztf_svc} \caption{ZTF $r$-band light curves of asteroid (11014) Svatopluk, (34771) 2001 QO$_{252}$, and (182312) 2001 OT$_{59}$.} \label{asteroid} \end{figure*} \subsubsection{Activity of Comets and Centaurs} By covering the entire Northern sky approximately every three days (Sec.~\ref{sec:survey_strategy}), ZTF acquires serendipitous observations of a large number of comets and centaurs. Through ZTF's high cadence and sensitivity, it is well suited to monitor the activity development of comets and to look for temporal variability, including both secular changes and rotational modulation of the activity, as well as transient events such as outbursts. We identified comets and Centaurs in the ZTF data by comparing the telescope's observing logs to the ephemeris positions of all comets with predicted brightness $V<22$~mag. This brightness limit is below ZTF's detection limit, but it is used not only because comet brightness predictions are notoriously poor, but also because an outburst could make a normally faint comet detectable. As of 24 April 2018, we estimate that ZTF had made 15000 observations of 186 comets brighter than 22~mag, and 3300 observations of 41 comets brighter than 18~mag. ZTF imaging of C/2016~R2 (PanSTARRS) acquired between November 11, 2017 and February 19, 2018 is presented in Fig.~\ref{comet}. The images show the comet before perihelion, approaching the Sun from 3.2 to 2.7\,AU. At such heliocentric distances, water sublimation rates are low, yet the comet had an impressive ion tail spanning over $0.5^\circ$. This emission is fluorescence by CO$^+$ ions within the $g$ band \citep{Cochran2018}. No other volatiles have been detected and this comet appears to have an extremely high chemical abundance of CO \citep{Cochran2018}, suggesting that CO sublimation drives the activity of this comet. Changes in the morphology of the ion tail reflect temporal variations in the comet's activity and in the local solar wind conditions \citep[cf.][]{Jones2018}. ZTF monitoring will allow us to follow the comet's activity evolution until it falls below V > 21, anticipated around 8\,AU from the Sun (JPL/Horizons). \begin{figure*} \begin{center} \includegraphics[width=0.75\textwidth]{Ech_figure.pdf} \caption{ZTF observations of the outburst of comet Echeclus. The top panel shows the 1.5 arcmin FOV images of Echeclus, oriented North up and East to the left, on 12 Nov. 2017, 16 Nov. 2017, 04 Dec. 2017, 10 Dec. 2017, 15 Dec. 2017, 20 Dec. 2017, 27 Dec. 2017, 30 Dec. 2017, 31 Dec. 2017, 01 Jan. 2018, 02 Jan. 2018, and 06 Jan. 2018 (UT dates) left to right. The plot shows results from aperture photometry (7 arcsecond radius aperture) from the Echeclus data spanning dates between 12 November, 2017 through 16 January, 2018. We converted these to the equivalent Af$\rho$ values (a proxy for dust production) in log-cm units for the corresponding dates. The magenta dashed line indicates the derived Af$\rho$ value for a magnitude value corresponding to a bare nucleus. The images were primarily taken in the ZTF $r$-band, while those taken on the 12-16 Nov. 2017, or on or after 27 Dec. 2017 were ZTF $g$-band images.} \label{Echec} \end{center} \end{figure*} The first outburst observed by ZTF was seen when the Centaur Echeclus (q=5.8 AU, e=0.46, i=$4.3^\circ$) exhibited an increase in activity at 7.3 AU from the Sun. The outburst, originally discovered by Brian Skiff at Lowell Observatory, occurred on 7 December 2017 UT, and was first observed by ZTF on 10~December. It produced a dust coma with peak Af$\rho$ \citep[a proxy for dust production;][]{AHearn1984} of $20,000 \pm 2500$~cm (Fig.~\ref{Echec}), similar to previously observed outbursts of this object \citep{Bauer2008}. Assuming a dust ejection velocity near 50~m/s for $\sim 1\mu$m grain radii, we find a dust production rate $\sim$300~kg/s \citep[cf.][]{Bauer2008}. The August/September 2016 outburst produced brightening that lasted just over a month, while the late 2017 outburst also lasted roughly 30 days, as shown in the ZTF data. \begin{figure*} \gridline{\fig{c2016r2-panel-a-nov2017.pdf}{0.5\textwidth}{(a)} \fig{c2016r2-panel-b-dec2017.pdf}{0.5\textwidth}{(b)}} \gridline{\fig{c2016r2-panel-c-jan2018.pdf}{0.5\textwidth}{(c)} \fig{c2016r2-panel-d-feb2018.pdf}{0.5\textwidth}{(d)}} \caption{ZTF images of comet C/2016 R2 (PanSTARRS) in the $g$-band. Four epochs from the commissioning phase are shown: (a) 2017 Nov 11; (b) 2017 Dec 23; (c) 2018 Jan 13; and (d) 2018 Feb 19. The field of view is $37\arcmin\times21\arcmin$ and the projected sunward vector is along the x-axis. The images are logarithmically scaled, except near the background where they are linearly scaled, in order to enhance details in the tail. } \label{comet} \end{figure*} \section{Summary} ZTF will survey the Northern Hemisphere sky hundreds of times in three bands, with observations taken on timescales from minutes to years. We expect the resulting datasets to enable discovery of young supernovae and rare relativistic transients; construction of systematic samples of Tidal Disruption Events, Active Galactic Nuclei, and variable stars; and detailed measurements of a variety of solar system objects. Thanks to ZTF's moderate depth, ZTF discoveries will be readily amenable to follow-up observations with 1--5\,m-class telescopes. \citet{tmp_Graham:18:ZTFScience} provides a more thorough overview of the ZTF science case. With the P48 focal plane now filled with CCDs, future sky surveys with the P48 will require substantial effort to achieve further performance improvements relative to ZTF, although further gains in angular resolution, wavelength coverage, and/or time sampling may be contemplated. Instead, most third-generation sky surveys will look to naturally scalable networks of small and medium telescopes distributed geographically, following the example of ASAS-SN, Las Cumbres Observatory, ATLAS, KMTNet, and BlackGEM. The alternative model is large new monolithic facilities purpose-built for time-domain observations, with LSST serving as the exemplar. Indeed, while the survey characteristics are quite different, ZTF will serve as a useful precursor for LSST. ZTF will stream one million time-domain detections nightly using a prototype of the LSST alert distribution system, providing several years of community experience ahead of LSST's flood of ten million nightly alerts. Because of its larger field of view, ZTF obtains on average about four times more observations of any area of the sky than LSST, and these visits are split among a smaller set of filters. The resulting finer time-sampling will enable earlier discovery of transients and better classification of events based on their lightcurves. Moreover, ZTF's smaller aperture means that all of the ZTF-discovered events are accessible for spectroscopic followup with moderate-aperture telescopes. In fact, ZTF's discovery rate of transients brighter than 21$^\textrm{st}$ magnitude is greater than LSST's \citep{Bellm:16:Cadences}. ZTF should thus provide large samples of bright transients and variables that will be crucial for interpreting LSST's deeper and more challenging survey. \acknowledgments Based on observations obtained with the Samuel Oschin Telescope 48-inch and the 60-inch Telescope at the Palomar Observatory as part of the Zwicky Transient Facility project. Major funding has been provided by the U.S.\ National Science Foundation under Grant No.\ AST-1440341 and by the ZTF partner institutions: the California Institute of Technology, the Oskar Klein Centre, the Weizmann Institute of Science, the University of Maryland, the University of Washington, Deutsches Elektronen-Synchrotron, the University of Wisconsin-Milwaukee, and the TANGO Program of the University System of Taiwan. This work is partly based on observations made with the Nordic Optical Telescope, operated by the Nordic Optical Telescope Scientific Association at the Observatorio del Roque de los Muchachos, La Palma, Spain, of the Instituto de Astrofisica de Canarias. The data presented here were obtained in part with ALFOSC, which is provided by the Instituto de Astrofisica de Andalucia (IAA) under a joint agreement with the University of Copenhagen and NOTSA. This work is partly based on observations made with DOLoRes@TNG. J.~Bauer, T.~Farnham, and M.~Kelley gratefully acknowledge the NASA/University of Maryland/MPC Augmentation through the NASA Planetary Data System Cooperative Agreement NNX16AB16A. E.\ Bellm, B.\ Bolin, A.\ Connolly, V.~Z.\ Golkhou, D.\ Huppenkothen, Z.\ Ivezi\'{c}, L.\ Jones, M.\ Juric, and M.\ Patterson acknowledge support from the University of Washington College of Arts and Sciences, Department of Astronomy, and the DIRAC Institute. University of Washington's DIRAC Institute is supported through generous gifts from the Charles and Lisa Simonyi Fund for Arts and Sciences, and the Washington Research Foundation. M.~Juric and A.~Connolly acknowledge the support of the Washington Research Foundation Data Science Term Chair fund, and the UW Provost's Initiative in Data-Intensive Discovery. E.\ Bellm, A.\ Connolly, Z.\ Ivezi\'{c}, L.\ Jones, M.\ Juric, and M.\ Patterson acknowledge support from the Large Synoptic Survey Telescope, which is supported in part by the National Science Foundation through Cooperative Agreement 1258333 managed by the Association of Universities for Research in Astronomy (AURA), and the Department of Energy under Contract No. DE-AC02-76SF00515 with the SLAC National Accelerator Laboratory. Additional LSST funding comes from private donations, grants to universities, and in-kind support from LSSTC Institutional Members. E.~Bellm is supported in part by the NSF AAG grant 1812779 and grant \#2018-0908 from the Heising-Simons Foundation. B.T. Bolin acknowledges funding for the Asteroid Institute program provided by B612 Foundation, W.K. Bowes Jr. Foundation, P. Rawls Family Fund and two anonymous donors in addition to general support from the B612 Founding Circle. M. Bulla acknowledges support from the Swedish Research Council (Vetenskapsr\aa det) and the Swedish National Space Board. C.-K.~Chang, W.-H.~Ip, C.-D.~Lee, Z.-Y.~Lin, C.-C.~Ngeow and P.-C.~Yu thank the funding from Ministry of Science and Technology (Taiwan) under grant 104-2923-M-008-004-MY5, 104-2112-M-008-014-MY3, 105-2112-M-008-002-MY3, 106-2811-M-008-081 and 106-2112-M-008-007. A.\ Gal-Yam is supported by the EU via ERC grant No. 725161, the Quantum Universe I-Core program, the ISF, the BSF Transformative program and by a Kimmel award. S.~Gezari is supported in part by NSF CAREER grant 1454816 and NSF AAG grant 1616566. D.~A.~Goldstein acknowledges support from Hubble Fellowship grant HST-HF2-51408.001-A. Support for Program number HST-HF2-51408.001-A is provided by NASA through a grant from the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Incorporated, under NASA contract NAS5-26555. M.~M.\ Kasliwal and Q.-Z.\ Ye acknowledge support by the GROWTH (Global Relay of Observatories Watching Transients Happen) project funded by the National Science Foundation PIRE (Partnership in International Research and Education) program under Grant No 1545949. A.~A.\ Mahabal acknowledges support from the following grants: NSF AST-1749235, NSF-1640818 and NASA 16-ADAP16-0232. A.~A.\ Miller is funded by the Large Synoptic Survey Telescope Corporation in support of the Data Science Fellowship Program. E.~Ofek is grateful for support by a grant from the Israeli Ministry of Science, ISF, Minerva, BSF, BSF transformative program, and the I-CORE Program of the Planning and Budgeting Committee and The Israel Science Foundation (grant No 1829/12). M.~Rigault is supported by the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement no.\ 759194 - USNAC). J.~Sollerman acknowledges support from the Knut and Alice Wallenberg Foundation. M.~T.\ Soumagnac acknowledges support by a grant from IMOS/ISA, the Ilan Ramon fellowship from the Israel Ministry of Science and Technology and the Benoziyo center for Astrophysics at the Weizmann Institute of Science. Part of this research was carried out at the Jet Propulsion Laboratory, California Institute of Technology, under a contract with the National Aeronautics and Space Administration. \facilities{PO:1.2m, PO:1.5m, ARC, DCT, NOT}
\section{Introduction} The purpose of this article is to extend my work on smooth Fr\'{e}chet globalizations of Harish-Chandra modules to include parameters. In \cite{BerKro} it is asserted that their work carries that goal out. This may be so, but non-linear groups do not appear in \cite{BerKro} (e.g. the metaplectic group). In this paper a different tactic is taken to this problem. We approach it from the perspective of the excellent thesis of Vincent van der Noort who studies the question: Given an analytic family of Harish-Chandra modules, how does the corresponding family of CW completions depend on the parameter? The CW completion was first realized in terms of imbedding into parabolically induced representations. This paper considers another class of Harish-Chandra modules that were first studied in a special case in \cite{HOW}. For lack of a name they were called J--modules. These Harish-Chandra modules are constructed using a free subalgebra of the center of the enveloping algebra generated by the split rank number of independent elements that was first studied in \cite{HOW}. This algebra is denoted $\mathbf{D}$ in this paper. In the category of Harish-Chandra modules with $\mathbf{D}$ action by a fixed character the J--modules in the category are projective. Furthermore, every Harish-Chandra module has a resolution by J--modules. Much of the paper, involves analyzing the CW globalizations of families of J--modules using a key results of van der Noort, which also play an important role in other aspects of the paper. For the sake of completeness a complete proof of these results is included. In van der Noort's thesis the parametrization studied were holomorphic and results were proved about holomorphic dependence of CW globalizations. He essentially solved the problem in the case when the parameter space is one complex dimension modulo the possible necessity to go to a branched covering. In this paper I prove that if the dependence of the Harish-Chandra modules in the parameters is real analytic then the dependence of the CW completion is continuous (Corollary \ref{main2}). The final two sections of the paper give a proof of the meromorphic continuation of $C^{\infty}$ Eisenstein series using the continuation of $K$--finite Eisenstein series in Langlands \cite{FuncEisen}, Chapter 7. This is done by reducing the problem to a general result on the holomorphic dependence of the extensions of what we call linear functionals of locally uniform moderate growth on families of parabolically induced Harish-Chandra modules. Except for the use of Van der Noort's result and some notation this part of the paper (sections 11 and 12) can be read independently of the rest of the paper. \section{The subalgebra \textbf{D} of $Z(\mathfrak{g)}$} Let $G$ be a real reductive group of inner type. That is, if $\mathfrak{g =Lie(G)$, $\mathfrak{g}_{\mathbb{C}}=\mathfrak{g}\otimes\mathbb{C}$ then $Ad(G)$ is contained in the identity component of $Aut(\mathfrak{g _{\mathbb{C}}).$Let $K$ be a maximal compact subgroup of $G$ and let $\theta$ denote the corresponding Cartan involution of $G$ (and of $\mathfrak{g}$). on Set $\mathfrak{k}=Lie(K)$ and $\mathfrak{p}=\{X\in\mathfrak{g}|\theta X=-X\}$ let $p$ be the projection of $\mathfrak{g}_{\mathbb{C}}$ onto $\mathfrak{p _{\mathbb{C}}$ corresponding to $\mathfrak{g}_{\mathbb{C}}=\mathfrak{k _{\mathbb{C}}\oplus\mathfrak{p}_{\mathbb{C}}$. Fix a symmetric $Ad(G) --invariant bilinear form, $B$, on $\mathfrak{g}$ such that $B_{|\mathfrak{k }$ is negative definite and $B_{|\mathfrak{p}}$ is positive definite Extend $p$ to a homomorphism of $S(\mathfrak{g}_{\mathbb{C}})$ onto $S(\mathfrak{p _{\mathbb{C}})$. Then $p$ is the projection corresponding t \[ S(\mathfrak{g}_{\mathbb{C}})=S(\mathfrak{p}_{\mathbb{C}})\oplus S(\mathfrak{g _{\mathbb{C}})\mathfrak{k}_{\mathbb{C}}. \] In \cite{HOW} we found homogeneous elements $w_{1},...,w_{l}$ of $S(\mathfrak{g}_{\mathbb{C}})^{G}$ with $w_{1}=\sum v_{i}^{2}$ \ with $\{v_{1},...,v_{n}\}$ and orthonormal basis of $\mathfrak{g}_{\mathbb{C}}$ with respect $B.$ Satisfying the following properties 1. $p(w_{1}),...,p(w_{l})$ are algebraically independent. 2. There exists a finite dimensional homogeneous subspace $E$ of $S(\mathfrak{p}_{\mathbb{C}})^{K}$ such that the map $\mathbb{C[ p(w_{1}),...,p(w_{l})]\otimes E\rightarrow S(\mathfrak{p}_{\mathbb{C}})^{K}$ given by multiplication is an isomorphism. If $\mathfrak{g}_{\mathbb{C}}$ contains no simple ideals of type E one can take $E=\mathbb{C}1.$ If $\mathfrak{g}$ is split over $\mathbb{R}$ then $\mathbb{C}[w_{1},...,w_{l}]=S(\mathfrak{g}_{\mathbb{C}})^{G}$. Let $\mathcal{H}$ denote the space of harmonic elements of $S(\mathfrak{p _{\mathbb{C}})$, that is, the orthogonal complement to the ideal $S(\mathfrak{p}_{\mathbb{C}})\left( S(\mathfrak{p}_{\mathbb{C} )\mathfrak{p}\right) ^{K}$ in $S(\mathfrak{p}_{\mathbb{C}})$ relative to the Hermitian extension of inner product $B_{|\mathfrak{p}}$. Then the Kostant-Rallis theorem (\cite{KosRal}) implies that the ma \[ \mathcal{H}\otimes S(\mathfrak{p}_{\mathbb{C}})^{K}\rightarrow S(\mathfrak{p _{\mathbb{C}}) \] given by multiplication is a linear bijection. This and 2. easily imply \begin{lemma} The map \[ \mathcal{H}\otimes E\otimes\mathbb{C}[w_{1},...,w_{l}]\otimes S(\mathfrak{k _{\mathbb{C}})\rightarrow S(\mathfrak{g}_{\mathbb{C}}) \] given by multiplication is a linear bijection. \end{lemma} Let $\mathfrak{a}$ be a maximal abelian subspace of $\mathfrak{p}$ and let \[ W=\{s\in GL(\mathfrak{a})|s=Ad(k)_{|\mathfrak{a}},k\in K\}. \] Let $H\in\mathfrak{a}$ be such that $\mathfrak{a}=\{X\in\mathfrak{p |[H,X]=0\}$. If $\lambda\in\mathbb{R}$ then set $\mathfrak{g}^{\lambda =\{X\in\mathfrak{g}|[H,X]=\lambda X\}$. Set $\mathfrak{n=\oplus}_{\lambda >0}\mathfrak{g}_{\lambda}$ and $\mathfrak{\bar{n}=\theta n=\oplus}_{\lambda >0}\mathfrak{g}_{-\lambda}$. The \[ \mathfrak{p}=p(\mathfrak{n)\oplus a \] and $p(\mathfrak{n})$ is the orthogonal complement to $\mathfrak{a}$ in $\mathfrak{p}$ relative to $B$. Let $q$ be the projection of $\mathfrak{p}$ onto $\mathfrak{a}$ corresponding to this decomposition. Then the Chevalley restriction theorem implies that \[ q:S(\mathfrak{p})^{K}\rightarrow S(\mathfrak{a})^{W \] is an isomorphism of algebras. Also, as above, if $H$ is the orthogonal complement to $\left( S(\mathfrak{a)a}\right) ^{W}S(\mathfrak{a)}$ in $S(\mathfrak{a)}$. Then the ma \[ S(\mathfrak{a})^{W}\otimes H\rightarrow S(\mathfrak{a}) \] given by multiplication is a linear bijection. Putting these observations together the ma \[ S(\mathfrak{n)\otimes}S(\mathfrak{a})^{W}\otimes H\otimes S(\mathfrak{k )\rightarrow S(\mathfrak{g}) \] given by multiplication is a linear bijection. We also note that the ma \[ \mathbb{C[}w_{1},...,w_{l}]\otimes E\rightarrow S(\mathfrak{a})^{W \] given b \[ w\otimes e\mapsto q(p(w))q(e) \] is a linear bijection. This in turn implies \begin{lemma} The ma \[ S(\mathfrak{n)\otimes}\mathbb{C[}w_{1},...,w_{l}]\otimes E\otimes H\otimes S(\mathfrak{k})\rightarrow S(\mathfrak{g}) \] given by multiplication is a linear bijection. \end{lemma} Let $\mathrm{symm}$ denote the symmetrization map from $S(\mathfrak{g _{\mathbb{C}})$ to $U(\mathfrak{g}_{\mathbb{C}})$ then $\mathrm{symm}$ is a linear bijection and $\mathrm{symm}\circ Ad(g)=Ad(g)\circ\mathrm{symm}$. Let $Z(\mathfrak{g}_{\mathbb{C}})=U(\mathfrak{g}_{\mathbb{C}})^{G}$ denote the center of $U(\mathfrak{g}_{\mathbb{C}})$. Set $z_{i}=\mathrm{symm}(w_{i}) $ and \[ \mathbf{D}=\mathbb{C}[z_{1},...,z_{l}]. \] Note that if $S_{j}(\mathfrak{g}_{\mathbb{C}})=\sum_{k\leq j}S^{j (\mathfrak{g}_{\mathbb{C}})$ and if $U^{j}(\mathfrak{g}_{\mathbb{C}})\subset U^{j+1}(\mathfrak{g}_{\mathbb{C}})$ is the standard filtration of $U(\mathfrak{g}_{\mathbb{C}})$ then \[ \mathrm{symm}(S_{j}(\mathfrak{g}_{\mathbb{C}}))=U^{j}(\mathfrak{g _{\mathbb{C}}). \] The above and standard arguments (\cite{HOW} Theorem 2.5 and Lemma 5.2) imply \begin{theorem} \label{decompositions}Let the notation be as above. Then 1. The map \[ \mathcal{H}\otimes E\otimes\mathbf{D}\otimes U(\mathfrak{k}_{\mathbb{C })\rightarrow U(\mathfrak{g}_{\mathbb{C}}) \] given b \[ h\otimes e\otimes D\otimes k\mapsto\mathrm{symm}(h)\mathrm{symm}(e)Dk \] is a linear bijection. 2. The ma \[ U(\mathfrak{n}_{\mathbb{C}})\otimes E\otimes H\otimes\mathbf{D\otimes U(}\mathfrak{k}_{\mathbb{C}})\rightarrow U(\mathfrak{g}_{\mathbb{C}}) \] given b \[ n\otimes e\otimes h\otimes D\otimes k\mapsto n\mathrm{symm}(e)\mathrm{symm (h)Dk \] is a linear bijection. \end{theorem} \section{A class of admissible finitely generated $(\mathfrak{g},K)$--modules} Retain the notation in the preceding section. Note that Theorem \ref{decompositions} implies that the subalgebra $\mathbf{D}U(\mathfrak{k _{\mathbb{C}})$of $U(\mathfrak{g}_{\mathbb{C}})$ is isomorphic with the tensor product algebra $\mathbf{D}\otimes U(\mathfrak{k}_{\mathbb{C}})$ and that $U(\mathfrak{g}_{\mathbb{C}})$ is free as a right $\mathbf{D}U(\mathfrak{k _{\mathbb{C}})$ under multiplication. If $R$ is a $\mathbf{D}U(\mathfrak{k _{\mathbb{C}})$--module then form \[ J(R)=U(\mathfrak{g}_{\mathbb{C}})\otimes_{\mathbf{D}U(\mathfrak{k _{\mathbb{C}})}R. \] Denote by $H(\mathfrak{g},K)$ the Harish--Chandra category of admissible finitely generated $(\mathfrak{g},K)$--modules. Let $R$ be a finite dimensional continuous $K$--module that is also a $\mathbf{D}$--module and the actions commute then $K$ acts on $J(R)$ as follows \[ k\cdot\left( g\otimes r\right) =Ad(k)g\otimes kr,k\in K,g\in U(\mathfrak{g _{\mathbb{C}}),r\in R. \] Then as a $K$--module \[ J(R)\cong\mathcal{H}\otimes E\otimes R \] with $K$ acting trivially on $E$. Note that $J(R)\in H(\mathfrak{g},K)$ since the multiplicities of $K$--types in $\mathcal{H}$ are finite and $J(R)$ is clearly finitely generated as a $U(\mathfrak{g}_{\mathbb{C}})$--module. Let $W(\mathbf{D,}K)$ be the category of finite dimensional $(\mathbf{D ,K)$--modules with $K$ acting continuously and the action of $\mathbf{D}$ and $K$ commute. \begin{lemma} $R\rightarrow J(R)$ defines an exact faithful functor from the category $W(K,\mathbf{D})$ to $H(\mathfrak{g},K)$. \end{lemma} \begin{proof} This follows since $U(\mathfrak{g}_{\mathbb{C}})$ is free as a module for $\mathbf{D}U(\mathfrak{k}_{\mathbb{C}})$ under right multiplication. \end{proof} As usual, denote the set of equivalence classes of irreducible, finite dimensional, continuous representations of $K$ by $\hat{K}$. If $V\in H(\mathfrak{g},K)$ set $V(\gamma)$ equal to the sum of all irreducible $K$--subrepresentations of $V$ in the class of $\gamma$. Then $V(\gamma)$ is invariant under the action of $Z(\mathfrak{g}_{\mathbb{C}})$ hence under the action of $\mathbf{D}$. If $V\in H(\mathfrak{g},K)$ there is a finite subset $F\subset\hat{K}$ such that \[ U(\mathfrak{g}_{\mathbb{C}})\sum_{\gamma\in F}V(\gamma). \] Set $R=\sum_{\gamma\in F}V(\gamma)\in W(\mathbf{D,}K)$ and one has the canonical $(\mathfrak{g},K)$--module surjection $J(R)\rightarrow V$ given by $g\otimes r\mapsto gr.$ A submodule of an element of $H(\mathfrak{g},K)$ is in $H(\mathfrak{g},K)$ so \begin{proposition} If $V\in H(\mathfrak{g},K)$ then there exists a sequence of elements $R_{j}\in W(\mathfrak{g},K)$ and an exact sequence in $H(\mathfrak{g},K)\in\in \[ ...\rightarrow J(R_{k})\rightarrow....\rightarrow J(R_{2})\rightarrow J(R_{1})\rightarrow J(R_{0})\rightarrow V\rightarrow0. \] \end{proposition} Notice that this exact sequence us a free resolution of $V$ as a $U(\mathfrak{n})$--module. Let $\beta:\mathbf{D}\rightarrow\mathbb{C}$ be an algebra homomorphism. Let $H(\mathfrak{g},K)_{\beta}$ be the full subcategory of $H(\mathfrak{g},K)$ consisting of modules $V$ such that if $z\in\mathbf{D}$ then it acts by $\beta(z)I$. The next result is an aside that will not be used in the rest of this paper and is a simple consequence of the definition of projective object. \begin{lemma} Let $F$ be a finite dimensional $K$--module and let $\mathbf{D}$ act on $F$ by $\beta(z)I$ yielding an object $R\in W(K,\mathbf{D})$. Then $J(R)$ is projective in $H(\mathfrak{g},K)_{\beta}$. \end{lemma} \section{The objects in $W(K,\mathbf{D)}$} If $R\in W(K,\mathbf{D)}$ then $R$ has an isotypic decomposition $R=\oplus_{\gamma\in\hat{K}}R(\gamma)$. Only a finite number of the $R(\gamma)\neq0$. If $D\in\mathbf{D\ }$then $DR(\gamma)\subset R(\gamma)$ for all $\gamma\in\hat{K}$. If $\chi:\mathbf{D}\rightarrow\mathbb{C}$ is an algebra homomorphism then we set $R_{\chi}=\{v\in R|(D-\chi(D))^{k}v=0,$for some $k>0\}$ \ Then setting $ch(\mathbf{D})$ equal to the set of all algebra homomorphisms of $\mathbf{D}$ to $\mathbb{C}$ we have the decompositio \[ R=\bigoplus_{\gamma\in\hat{K},\chi\in ch(\mathbf{D})}R_{\chi}(\gamma). \] Fix a $K$--module $(\tau_{\gamma},F_{\gamma})\in\gamma$. Then $R_{\chi (\gamma)$ is isomorphic with \[ \mathrm{Hom}_{K}(V_{\gamma},R_{\chi})\otimes F_{\gamma \] with $K$ acting on $F_{\gamma}$ and $\mathbf{D}$ acting on $\mathrm{Hom _{K}(V_{\gamma},R)$. If $R$ is an irreducible object in $W(K,\mathbf{D)}$ then Schur's lemma implies that $\mathbf{D}$ acts by a single homomorphism to $\mathbb{C}$ and $R$ is irreducible as a $K$--module. Set $V_{\chi,}$ equal to the module with $\mathbf{D}$ acting by $\chi$ and $K$ acting by an element of $\gamma$. We next analyze the homomorphisms $\chi$. Let $\chi$ be such a homomorphism then $\chi(z_{i})=\lambda_{i}\in\mathbb{C}$. Thus one simple parametrization is by $(\lambda_{1}....,\lambda_{l})\in\mathbb{C}^{l}$. We use the notation $\beta_{\lambda}$ for the homomorphism such that $\beta_{\lambda (z_{i})=\lambda_{i}$. An alternate parametrization is through the Harish-Chandra homomorphism. Recall the exact sequence (c.f. \cite{RRG1-11}, Theorem 3.6.6 \ \begin{array} [c]{ccccccccc} & & & & & \mathbf{\gamma} & & & \\ 0 & \rightarrow & (U(\mathfrak{g}_{\mathbb{C}})\mathfrak{k}_{\mathbb{C}})^{K} & \rightarrow & U(\mathfrak{g}_{\mathbb{C}})^{K} & \rightarrow & U(\mathfrak{a}_{\mathbb{C}})^{W} & \rightarrow & 0. \end{array} \] It is standard that the linear map $\mathbf{\gamma}\circ\mathrm{symm :S(\mathfrak{p}_{\mathbb{C}})^{K}\rightarrow U(\mathfrak{a}_{\mathbb{C}})^{W}$ is a linear bijection. This and the definition of $\mathbf{D}$ imply that $U(\mathfrak{a}_{\mathbb{C}})^{W}$ is finitely generated as a $\mathbf{\gamma }(\mathbf{D})$--module. \ This in turn implies that $U(\mathfrak{a _{\mathbb{C}})$ is finitely generated as a $\mathbf{\gamma}(\mathbf{D )$--module. Thus we have a morphism $\varphi:\mathfrak{a}_{\mathbb{C}}^{\ast }\rightarrow\mathbb{C}^{l}$ such that $\mathbf{\gamma}(\mathbf{D})(\nu)$ is the homomorphism $z_{i}\mapsto\varphi_{i}(\nu)$. Hence $\mathbf{\gamma }(\mathbf{D})(\nu)=\beta_{\varphi(\nu)}$ for $\nu\in\mathfrak{a}_{\mathbb{C }^{\ast}$. Set $\chi_{\nu|_{\mathbf{D}}}=\beta_{\varphi(\nu)} $. \begin{definition} Let $X$ be a complex or real analytic manifold. An analytic family in $W(K,\mathbf{D)}$ based on $X$ is a pair $(\mu,V)$ of a a finite dimensional continuous $K$--module,$V$, and a $\mu:X\times\mathbf{D}\rightarrow \mathrm{End}(V)$ such that $D\mapsto\mu(x,D)$ is a representation of $\mathbf{D}$ on $V$ and $x\mapsto\mu(x,D)$ is analytic for all $D\in \mathbf{D}$. \end{definition} \section{Analytic families of $J$--modules} Throughout this section analytic will mean complex analytic in the context of a complex analytic manifold and real analytic in the contest of a real analytic manifold. Theorem \ref{decompositions} implies \begin{corollary} \label{covar}Let $R\in W(K,\mathbf{D})$ then \[ J(R)/\mathfrak{n}^{k+1}J(R)\cong U(\mathfrak{n)/}\mathfrak{n}^{k+1 U(\mathfrak{n})\otimes E\otimes H\otimes R_{|M \] as an $(\mathfrak{n},M)$-module with $\mathfrak{n}$ and $M$ acting trivially on $E\otimes H$ and $\mathfrak{n}$ acting trivially on $R$. \end{corollary} Let $(\mu,V)$ be an analytic family of objects in $W(K,\mathbf{D)}$ based on $X$. Let $V_{x},x\in X$ be the object in $W(K,\mathbf{D)}$ with $K$ acting by its action on $V$ and $\mathbf{D}$ action by $\mu_{x}=\mu(x,\cdot)$.$.$ \begin{theorem} \label{dependence}Notation as above. Let $\sigma_{k,x}$ be the action of $\mathfrak{a}$ on \[ U(\mathfrak{n)/}\mathfrak{n}^{k+1}U(\mathfrak{n})\otimes E\otimes H\otimes V_{x|M \] under the identification \[ J(V_{x})/\mathfrak{n}^{k+1}J(V_{x})\cong U(\mathfrak{n)/}\mathfrak{n ^{k+1}U(\mathfrak{n})\otimes E\otimes H\otimes V_{x|M}. \] If $u\in U(\mathfrak{g}_{\mathbb{C}})$ then the map $x\rightarrow\sigma _{k,x}(u)$ is an analytic map. \end{theorem} \begin{proof} Theorem \ref{decompositions} implies that if $X_{1},...,X_{m}$ is a basis of $\mathfrak{n}$, $Y_{1},...,Y_{n}$ is a basis of $\mathfrak{k}$ and $h_{1},...,h_{r}$ is a basis for $\mathrm{symm}(E)\mathrm{symm}(H)$ then if $I,J,L$ are multi-indices of size $m,n,l$ respectively the \[ X^{J}z^{L}h_{i}Y^{L \] is a basis of $U(\mathfrak{g}_{\mathbb{C}})$. Here, as usual, $X^{J =X_{1}^{j_{1}}\cdots X_{m}^{j_{m}}$, ... This implies that if $u\in U(\mathfrak{g}_{\mathbb{C}})$ then \[ uX^{J}z^{L}h_{i}Y^{J}=\sum a_{I_{1}L_{1}i_{1}J_{1},ILiJ}(u)X^{J_{1}}z^{L_{1 }h_{i_{1}}Y^{J_{1}}. \] This implies that if we take a basis $v_{1},...,v_{d}$ of $V$ then the elements $X^{J}h_{i}\otimes v_{j}$ form a basis of $J(V_{x})$. Thus if $u\in U(\mathfrak{g}_{\mathbb{C}})$ then \[ uX^{J}h_{i}\otimes v_{j}=\sum a_{I_{1}L_{1}i_{1}J_{1},I,0i0}(u)X^{J_{1 }z^{L_{1}}h_{i_{1}}Y^{J_{1}}\otimes v_{j}= \ \[ \sum a_{I_{1}L_{1}i_{1}J_{1},I0i0}(u)X^{J_{1}}h_{i_{1}}\otimes\mu_{x (z^{L_{1}})Y^{J_{1}}v_{j}= \] The theorem follows from this formula. \end{proof} If $X$ is a complex manifold or a real analytic manifold and $V$ is a vector space over $\mathbb{C}$ then a map $\phi:X\rightarrow V$ is said to be holomorphic, real analytic or continuous if for each $x\in X$ there exists a open neighborhood, $U$, \ of $X$ such that if $Z=\mathrm{Span}_{\mathbb{C }\{\phi(x)|x\in U\}$ then $\dim Z<\infty$ and $\phi:U\rightarrow Z$ is holomorphic,real analytic or continuous respectively. \begin{definition} Let $X$ be a complex or real analytic manifold. Then an holomorphic,analytic or continuous family of admissible $(\mathfrak{g},K)$--modules based on $X$ is a pair, $(\mu,V)$, of an admissible $(\mathfrak{k},K)$--module, $V$, and \[ \mu:X\times U(\mathfrak{g})\rightarrow\mathrm{End}(V) \] such that $x\mapsto\mu(x,y)v$ is holomorphic (resp. analytic, resp. continuous) for all $y\in U(\mathfrak{g})$, $v\in V$ and if we set $\mu _{x}(y)=\mu(x,y)$ for $y\in U(\mathfrak{g})$ then $(\mu_{x},V)$ is an admissible finitely $(\mathfrak{g},K)$--module. It will be called a family of objects in $H\mathcal{(}\mathfrak{g},K)$ if each $(\mu_{x},V)$ is finitely generated. \end{definition} \begin{theorem} \label{J-family}Let $X$ be an analytic or complex manifold. Let $(\lambda,R) $ be an family of objects in $W(K,\mathbf{D})$ based on $X$ and define $R_{x}\in W(K,\mathbf{D})$ to be the module with action $\lambda(x,\cdot)$. Let \[ V=\mathcal{H}\otimes E\otimes R \] $(K$ act by the tensor product action with its action on $E$ trivial) and let $T_{x}:V\rightarrow J(R_{x})$ be given by $T_{x}(h\otimes e\otimes r)=\alpha_{x}(\mathrm{symm}(h)e)(1\otimes r)$\ with $\alpha_{x}$ the action of $U(U(\mathfrak{g}_{\mathbb{C}})$ on $J(R_{x})$. If $\lambda(x,y)=T_{x ^{-1}\alpha_{x}(y)T_{x}$ then $(\lambda,V)$ is an analytic family of objects in $H(\mathfrak{g},K)$ based on $X$. \end{theorem} \begin{proof} We argue as in the proof of Theorem \ref{dependence}. Let $\left\{ h_{i}\right\} $ be a basis of $\mathcal{H}$ such that for each $i$ there exists $\gamma\in\hat{K}$ such that $h_{i}\in\mathcal{H(\gamma)}$, let $e_{j} $ be a basis of $E$, let $r_{m}$ be a basis of $R$ and let $Y_{1},...,Y_{n}$ be a basis of $\mathfrak{k}$. Then if $y\in U(\mathfrak{g}_{\mathbb{C}})$ \[ y\mathrm{symm}(h_{i})e_{j}z^{L}Y^{J}=\sum_{i_{1},j_{1},J_{1},L_{1} b_{i_{1}j_{1}L_{1}J_{1},ijLK}(y)\mathrm{symm}(h_{i_{1}})e_{j_{1}}z^{J_{1 }Y^{K_{1}}. \] Thu \[ T_{x}^{-1}\alpha_{x}(y)T_{x}(h_{i}\otimes e_{j}\otimes r_{k})=\sum b_{i_{1}j_{1}L_{1}J_{1},ij00}(y)h_{i_{1}}\otimes e_{j_{1}}\otimes\lambda _{x}(z^{L_{1}})Y^{J_{1}}r_{k}. \] The theorem follows. \end{proof} Next we define another type of analytic family. Let $A$ and $N$ be the connected subgroups of $G$ with $Lie(A)=\mathfrak{a}$ and $Lie(N)=\mathfrak{n $. Let $M$ be the centralizer of $\mathfrak{a}$ in $K$. Set $Q=MAN$ then $Q$ is a minimal parabolic subgroup of $G$. \begin{definition} An analytic family of finite dimensional $Q$--modules based on the manifold (real or complex analytic) $X$ is a pair $(\sigma,S)$ with $S$ a finite dimensional continuous $M$--module and a real analytic map $\sigma:X\times Q\rightarrow GL(S)$ such that $x\mapsto\sigma(x,q)$ is holomorphic and $\sigma(x,\cdot)=\sigma_{x}$ is a representation of $Q$. \end{definition} Let $(\sigma,S)$ be a continuous representation of $Q$. Set $I^{\infty (\sigma_{|M})$ equal to the space of all smooth $f:K\rightarrow S$ satisfying $f(mk)=\sigma(m)f(k)$. Define and action $\pi_{\sigma}$ of $G$ on $I^{\infty }(\sigma_{|M})$ as follows: if $f\in I^{\infty}(\sigma_{|M}) $ then extend $f$ to $G$ by $f_{\sigma}(qk)=\sigma(q)f(k)$, then, since $K\cap Q=M$ and $QK=G$, $f_{\sigma}$ is $C^{\infty}$ on $G$ set $\pi_{\sigma}(g)f(k)=f_{\sigma}(kg)$. Also se \[ \pi_{\sigma}(Y)f(k)=\frac{d}{dt}f_{\sigma}(k\exp tY)_{|t=0 \] for $Y\in\mathfrak{g}$ and $k\in K,f\in I^{\infty}(\sigma_{|M})$. Let $I(\sigma_{M})$ be the space of all right $K$ finite elements of $I^{\infty }(\sigma_{|M})$ Put and $M$--invariant inner product, $\left\langle ...,...\right\rangle $ on $S$. If $f,h\in I^{\infty}(\sigma_{|M})$ then set \[ (f,h)=\int_{K}\left\langle f(k),h(k)\right\rangle dk \] with $dk$ normalized invariant measure on $K$. The following is standard. \begin{proposition} Let $(\sigma,S)$ be an analytic family of finite dimensional representations of $Q$ based on the complex or real analytic manifold $X$. Set $\lambda (x,y)=\pi_{\sigma_{x}}(y)$ for $x\in X,y\in U(\mathfrak{g}_{\mathbb{C}})$. If $\mu$ is the common value of $\sigma_{x}|_{M}$, then $(\lambda,I(\mu))$ is an analytic family of objects in $H(\mathfrak{g},K)$ based on $X$. \end{proposition} \begin{proof} It is standard that \[ x,g\mapsto(\pi_{\sigma_{x}}(g)f,h) \] is real analytic and holomorphic in $x$ for $f,g\in I(\mu)$. \end{proof} \begin{definition} If $(\lambda,V)$ and $(\mu,W)$ are analytic families of objects in $H(\mathfrak{g},K)$ based on the manifold $X$ then a homomorphism of the analytic (resp. continuous) family $(\lambda,V)$ to $(\mu,W)$ is a map \[ T:X\rightarrow\mathrm{Hom}_{\mathbb{C}}(V,W) \] such that 1. $x\mapsto T(x)v$ is an analytic map of $X$ to $W$ for all $v\in V.$ 2. $T(x)\in\mathrm{Hom}_{H(\mathfrak{g},K)}(V_{x},W_{x})$ with $V_{x =(\lambda_{x},V),W_{x}=(\mu_{x},W)$. \end{definition} If $R\in W(K,\mathbf{D})$ the space $J(R)/\mathfrak{n}^{s+1}J(R)$ has a natural structure of an $M$ module and an $\mathfrak{n}+\mathfrak{a}$ module. Since $\dim J(R)/\mathfrak{n}^{s+1}J(R)<\infty$ and $AN$ is a simply connected Lie group $J(R)/\mathfrak{n}^{s+1}J(R)$ has a natural structure of a finite dimensional continuous $Q$--module with action $\sigma_{s,R}$. Let $p_{s}$ denote the natural surjectio \[ p_{s}:J(R)\rightarrow J(R)/\mathfrak{n}^{s+1}J(R). \] If $k\in K$, $v\in J(R)$, define $S_{s,R}(v)(k)=p_{s,R}(kv)$, then $S_{s,R}(v)\in I(\sigma_{s,R}|_{M})$ and it is easily seen that $S_{s,R \in\mathrm{Hom}_{H(\mathfrak{g},K)}(J(R),(\pi_{\sigma_{s,R}},I(\sigma _{s,R}|_{M}))$. Combining the above results we have \begin{theorem} \label{J-morph}Let $(\mu,R)$ be an analytic (resp. continuous) family in $W(K,\mathbf{D})$ based on the manifold $X$. Let $(\lambda,V)$ be the analytic family (as in Theorem \ref{J-family}) corresponding to $x\rightarrow J((\mu_{x},R))$. Then recalling that $V=\mathcal{H\otimes}E\otimes R$ define $T_{s}(x)(h\otimes e\otimes r)=S_{s},_{R_{x}}(\mathrm{symm}(h)e\otimes r).$ Then $T_{s}$ defines a homomorphism of the analytic family $(\lambda,V)$ to $(\xi,I(\sigma_{s,R_{x},}|_{M}))$ \ with $\xi(x,y)=\pi_{\sigma_{s,R_{x}}}(y)$ and $\sigma_{s,R_{x}}$ is defined as in Theorem \ref{dependence}. \end{theorem} We will use the notation $J(R)$ for the analytic family associated with $x\rightarrow J((\mu_{x},R))$. \section{Some results of Vincent van der Noort} Throughout this section $Z$ will denote a connected real or complex analytic manifold. We will use the terminology analytic to mean complex analytic or real analytic depending on the context. We continue the notation of the previous sections. In particular $G$ is a real reductive group of inner type. We denote (as is usual) the standard filtration of $U(\mathfrak{g)}$, by \[ ...\subset U^{j}(\mathfrak{g)}\subset U^{j+1}(\mathfrak{g)\subset... \] Let $V$ be an admissible $(Lie(K),K)$ module. We note that if $E\subset V$ is a finite dimensional $K$--invariant subspace of $V$ then there exists a finite subset $F_{j,E}\subset\hat{K}$ such that \[ U^{j}(\mathfrak{g})\otimes E\cong\sum_{\gamma\in F_{j,E}}m_{\gamma,j V_{\gamma}. \] If $v\in V$ we denote by $E_{v}$ the span of $Kv$ in $V$. The purpose of this section is to prove a theorem of van der Noort which first appeared in his thesis \cite{VanderNoort}. Our argument follows his original line with a few simplifications. We include the details only because he is not expected to publish it. In his thesis he emphasized the holomorphic case. Fix a maximal torus, $T$, of $M$ then $Lie(T)\oplus\mathfrak{a}$ is a Cartan subalgebra of $\mathfrak{g}$. Set $\mathfrak{h}$ equal to its complexification. We parametrize the homomorphisms of $Z(\mathfrak{g})$ to $\mathbb{C}$ by $\chi_{\Lambda}$ for $\Lambda\in\mathfrak{h}^{\ast}$using the Harish--Chandra parametrization. Endow $\hat{M}$ with the discrete topology. Then we note that if $C$ is a compact subset of $\hat{M}\times\mathfrak{a _{\mathbb{C}}^{\ast}$ then there exist a finite number of elements $\xi _{1},...,\xi_{r}\in\hat{M}$ and compact subsets , $D_{j}$, of $\mathfrak{a _{\mathbb{C}}^{\ast}$ such tha \[ C=\cup_{j=1}^{r}\xi_{j}\times D_{j}\text{. \] If $\xi\in\hat{M}$ and $\nu\in\mathfrak{a}_{\mathbb{C}}^{\ast}$ then set $\sigma_{\xi,\nu}(man)=\xi(m)a^{\nu+\rho}$ ($\rho(H)=\frac{1}{2 tr(adH_{|Lie(N)})$)$,$ $H\in\mathfrak{a}$), $a^{\nu}=\exp(\nu(H))$ $a=\exp (H)$, $\xi$ is taken to be a representative of the class $\xi$. $H^{\xi,\nu}$ is $I(\sigma_{\xi.\nu})$ which equals as a $K$--module $H^{\xi}=Ind_{M ^{K}(\xi$\thinspace$)$. If $f\in H^{\xi}$ set $f_{\nu}(nak)=a^{\nu+\rho }f(k),n\in N,a\in A,k\in K$. $A_{\bar{P}}(\nu)$ is the corresponding Kunze-Stein intertwining operator (c.f. \cite{HarHomSP}, 8.10.18. p.241). \begin{proposition} \label{indfinite}Let $\xi\in\widehat{M}$ and let $\Omega\subset\mathfrak{a _{\mathbb{C}}^{\ast}$ be open with compact closure. Then there exists $F\subset\widehat{K}$ such that $\pi_{\xi,\nu}(U(\mathfrak{g}))\left( \sum_{\gamma\in F}H^{\xi}(\gamma)\right) =H^{\xi}$ for all $\nu\in\Omega$. \end{proposition} The proof of this result will use the following lemma. \begin{lemma} If $\nu_{o}\in\mathfrak{a}_{\mathbb{C}}^{\ast}$ then there exists an open neighborhood of $\nu_{o}$, $U_{\nu_{o}}$, and a finite subset $F=F_{\nu_{o}}$ of $\widehat{K}$ such that $\pi_{\xi,\nu}(U(\mathfrak{g}))\left( \sum _{\gamma\in F}H^{\xi}(\gamma)\right) =H^{\xi}$ for all $\nu\in U_{\nu_{o}}$. \end{lemma} \begin{proof} If $\gamma\in\hat{K}$ fix $W_{\gamma}\in\gamma$. If $\operatorname{Re (\nu,\alpha)>0$ for all $\alpha\in\Phi^{+}$ and if $\gamma\in\widehat{K}$ and $A_{\overline{P}}(\nu)H^{\xi}(\gamma)\neq0$ then $\pi_{\xi,\nu}(U(\mathfrak{g ))\left( H^{\xi}(\gamma)\right) =H^{\xi}$(c.f. \cite{RRG1-11}, Theorem 5.4.1 (1)). Fix such a $\gamma_{\nu}$ (which always exists since the operator $A_{\overline{P}}(\nu)\neq0$), take $F_{\nu}=\{\gamma_{\nu}\}$ and $U_{\nu}$ an open neighborhood of $\nu$ such that $A_{\overline{P}}(\mu)H^{\xi (\gamma_{\nu})\neq0$ for $\mu\in U$. Let $\nu\in\mathfrak{a}_{\mathbb{C }^{\ast}$ be arbitrary. There exists a positive integer, $k$, such that $\operatorname{Re}(\nu+k\rho,\alpha)>0$ for all $\alpha\in\Phi^{+}$ and such that $k\rho$ is the highest weight of a finite dimensional spherical representation, $V^{k\rho},$ of $G$ relative to $\mathfrak{a}$. The lowest weight of $V^{k\rho}$ relative to $\mathfrak{a}$ is $-k\rho$ and $M$ acts trivially on that weight space thus $H_{K}^{\xi,\nu+k\rho}\otimes V^{k\rho}$ has $H_{K}^{\xi,\nu}$ as a quotient representation (see \cite{HarHomSP ,8.5.14,15). Take $F_{\nu}$ to be the set of $K$--types that occur in both $W_{\gamma_{\nu+k\rho}}\otimes V^{k\rho}$ and $H^{\xi}$ and $U_{\nu =U_{\nu+k\rho}-k\rho$. \end{proof} We now prove the proposition. By the lemma above for each $\nu\in \overline{\Omega}$ there exists $F_{\nu}$ and $U_{\nu}$ as in the statement of the lemma. The $U_{\nu}$ form an open covering of $\overline{\Omega}$ which is assumed to be compact. Thus there exist a finite number $\nu_{1},...,\nu _{r}\in\overline{\Omega}$ such that \[ \overline{\Omega}\subset\cup_{i=1}^{r}U_{\nu_{i}}\text{. \] Take $F=\cup_{i-1}^{r}F_{\nu_{i}}.$ This proves the proposition. \begin{lemma} Let $\chi_{\xi},_{\nu}$ denote the infinitesimal character of $\pi_{\xi,\nu}$. If $C$ is a compact subset of $\mathfrak{h}_{K}^{\ast}$ then \[ \{(\xi,\nu)\in\{\hat{M}\times\mathfrak{a}_{\mathbb{C}}^{\ast}|\chi_{\xi ,_{\nu}=\chi_{\Lambda},\Lambda\in C\} \] is compact. \end{lemma} \begin{proof} Fix a system of positive roots for $(M^{0},T)$ ($M^{0}$ the identity component of $M$). If $\lambda_{\xi}$ is the highest weight of $\xi$ relative to this system of positive roots and if $\rho_{M}$ is the half sum of these positive roots then $\chi_{\xi},_{\nu}=\chi_{\Lambda}$ with $\Lambda=\lambda_{\xi +\rho_{M}+\nu$. This implies the lemma. \end{proof} \begin{lemma} \label{VanNort-Finite}Let $(\pi,V)$ be an analytic family of admissible $(\mathfrak{g},K)$ modules based on $Z$. Assume that $z_{0}\in Z$ is such that $(\pi_{z_{o}},V)$ is finitely generated. If $T$ is an element of $Z(\mathfrak{g})$ there exist analytic functions $a_{0},...,a_{n-1}$ on $Z$ such that if $z\in Z$ and $\mu$ is an eigenvalue of $\pi_{z}(T)$ then $\mu$ is a root in $x$ of \[ f(z,x)=x^{n}+\sum_{j=0}^{n-1}a_{j}(z)x^{j}. \] \end{lemma} \begin{proof} Let $F$ be a finite number of elements of $\hat{K}$ such that $\pi_{z_{0 }(U(\mathfrak{g}))\sum_{\gamma\in F}V(\gamma)=V$. Let $L=$ $\sum_{\gamma\in F}V(\gamma)$. Then we define the $a_{j}$ the by the formula \[ f(z,x)=\det\left( xI-\pi_{z}(T\right) _{|L})=x^{n}+\sum_{j=0}^{n-1 a_{j}(z)x^{j}. \] The Cayley-Hamilton theorem implies that $h(z)=T^{n}+\sum_{j=0}^{n-1 a_{j}(z)T^{j}\in Z(\mathfrak{g})$ vanishes on $L$. Let $\gamma\in\hat{K}$ then there exist $x_{1},...,x_{r}\in U(\mathfrak{g})$ and $v_{1},...,v_{r}\in L$ such that $\{\pi_{z_{0}}(x_{i})v_{i}\}_{i=1}^{r}$ is a basis of $V(\gamma)$. Let $P_{\gamma}$ be the projection onto the $\gamma$--isotypic component of $V$. Thu \[ (P_{\gamma}\pi_{z}(x_{1})v_{1})\wedge(P_{\gamma}\pi_{z}(x_{2})v_{2 )\wedge\cdots\wedge(P_{\gamma}\pi_{z}(x_{r})v_{r})\in\wedge^{r}V(\gamma) \] (a one dimensional space) is non--zero for $z=z_{0}$. This implies that there exists an open neighborhood, $U$, of $z_{0}$ in $\Omega$ such that \[ P_{\gamma}\pi_{z}(x_{1})v_{1},P_{\gamma}\pi_{z}(x_{2})v_{2},...,P_{\gamma \pi_{z}(x_{r})v_{r \] is a basis of $V(\gamma)$ for $z\in U$. That \[ h(z)P_{\gamma}\pi_{z}(x_{i})v_{i}=P_{\gamma}\pi_{z}(x_{i})h(z)v_{i}=0 \] implies that $h(z)V(\gamma)=0$ for $z\in U$. The connectedness of $Z$ implies that $h(z)V(\gamma)=0$ for $z\in Z$. Thus $h(z)=0$ for all $z\in Z$. This proves the Lemma. \end{proof} If $V$ is a $(\mathfrak{g},K)$--module then set $ch(V)$ equal to the set of $\Lambda\in\mathfrak{h}^{\ast}$ such that there exists $v\in V$ with $Tv=\chi_{\Lambda}(T)v$ for all $T\in Z(\mathfrak{g})$. \begin{corollary} \label{compactness}Keep the notation and assumptions of the previous lemma, If $\omega\subset Z$ is compact then there exists a compact subset $C$ of $\mathfrak{h}^{\ast}$ such that $ch(\pi_{z},V)\subset C$ for all $z\in\omega$. \end{corollary} \begin{proof} Let $T_{1},...,T_{m}$ be a generating set for $Z(\mathfrak{g})$ and let $f_{j}(z,x)$ be the function in the previous lemma corresponding to $T_{j}$. Then \[ f_{j}(z,x)=x^{n_{j}}+\sum_{i=0}^{n_{j}-1}a_{j,i}(z)x^{j \] with $a_{j,i}$ analytic in on $Z$. If $\chi_{\Lambda}\in ch(\pi_{z},V)$ the \[ \left\vert \chi_{\Lambda}(Z_{j})\right\vert \leq\max_{0\leq i<n_{j} |a_{j,i}(z)|+1 \] (c.f. \cite{RRG1-11},7.A.1.3). If $C\subset Z$ is compact then there exists a constant $r<\infty$ such that $|a_{j,i}(z)|\leq r$ for all $i,j$ and $z\in C$. This implies the corollary. \end{proof} \begin{theorem} \label{loc-finite}Let $(\pi,V)$ be an analytic family of admissible $(\mathfrak{g},K)$ modules based on $Z$. Assume that there exists $z_{0}\in Z$ such that $(\pi_{z_{0}},V)$ is finitely generated. If $\omega$ is a compact subset of $Z$ then there exists $S_{\omega}\subset\hat{K}$ a finite subset such that if $y\in\omega$ the \[ \pi_{y}(U(\mathfrak{g))}\left( \sum_{\gamma\in S_{\omega}}V(\gamma)\right) =V\text{. \] \end{theorem} \begin{proof} Let $C$ as in the above corollary for $\omega$. Let \[ X=\{(\xi,\nu)\in\hat{M}\times\mathfrak{a}_{\mathbb{C}}^{\ast}|\chi_{\xi ,_{\nu}=\chi_{\Lambda},\Lambda\in C\}. \] $X$ is compact so there exist $\xi_{1},...,\xi_{r}\in\hat{M}$ and $D_{1},...,D_{r}$, compact subsets of $\mathfrak{a}_{\mathbb{C}}^{\ast}$, such that $X=\cup_{j}\xi_{j}\times D_{j}$. Let $S_{j}\subset\hat{K}$ be the finite set corresponding to $\xi_{j}\times D_{j}$ in Proposition \ref{indfinite}. Set $S_{\omega}=\cup S_{j}$. Let $L_{1}\subset L_{2}\subset...\subset L_{j \subset...$ be an exhaustion of the $K$--types of $V$ with each $L_{j}$ finite. We will use the notation \thinspace$V_{y}$ for the $(\mathfrak{g},K)$--module $(\pi_{y},V)$. Let $y\in C$. Set $W_{j}=\pi_{y}(U(\mathfrak{g))}\left( \sum_{\gamma\in L_{j}}V(\gamma)\right) $ then $W_{j}\subset W_{j+1}$ and $\cup W_{j}=V$. Each $W_{j}$ is finitely generated and admissible, hence of finite length. Therefore $V_{y}$ has a finite composition series \[ 0=V_{y}^{0}\subset V_{y}^{1}\subset...\subset V_{y}^{N \] or a countably infinite composition serie \[ 0=V_{y}^{0}\subset V_{y}^{1}\subset...\subset V_{y}^{n}\subset V_{y ^{n+1}\subset... \] with $V_{y}^{i}/V_{y}^{i-1}$ irreducible. Thus by the dual form of the subrepresentation theorem there exists for each $i,\xi_{i}\in\hat{M}$ and $\nu_{i}\in\mathfrak{a}_{\mathbb{C}}^{\ast}$ so that $V_{y}^{i}/V_{y}^{i}$ is a quotient of $(\pi_{\xi_{i},\nu_{i}},H^{\xi_{i},\nu_{i}})$. Observe that $(\xi_{i},\nu_{i})\in X$. Thus $V_{y}^{i}/V_{y}^{i-1}(\gamma_{i})\neq0$ for some $\gamma_{i}\in S_{\omega}$. Let $M$ be a quotient module of $V_{y}$. Then $M=V_{y}/U$ with $U$ a submodule of $V_{y}$. There must be an $i$ such that $V_{y}^{i}/\left( V_{y}^{i-1}\cap U\right) \neq0$. Let $i$ be minimal subject to this condition. Then $V_{y}^{i-1}\subset U$. Thus $V_{y}^{i /V_{y}^{i-1}$ is a submodule of $M$. Hence $M(\gamma)\neq0$ for some $\gamma\in S_{\omega}$. This implies that \[ \pi_{y}(U(\mathfrak{g))}\left( \sum_{\gamma\in S_{\omega}}V(\gamma)\right) =V\text{. \] Indeed, \[ \left( V_{y}/\pi_{y}(U(\mathfrak{g))}\left( \sum_{\gamma\in S_{\omega }V(\gamma)\right) \right) (\gamma)=0,\gamma\in S_{\omega}. \] \end{proof} \begin{corollary} \label{finitegen}(To the proof) Let $(\pi,V)$ be an analytic family of finitely generated admissible $(\mathfrak{g},K)$ modules based on $Z$ . Let $\omega$ be open in $Z$ with compact closure. Let for each $z\in\omega$, $U_{z}$ be a $(\mathfrak{g},K)$--submodule of $V_{z}$. Then there exists a finite subset $F_{\omega}\subset\hat{K}$ such that \[ \pi_{z}(U(\mathfrak{g}))\left( \sum_{\gamma\in F_{\omega}}U_{z (\gamma)\right) =U_{z}. \] \end{corollary} \begin{proof} In the proof of the theorem above all that was used was that the set of possible infinitesimal characters is compact. \end{proof} \section{Imbeddings of families of $J$--modules} Let $X$ be a connected real or complex analytic manifold and let $(\mu,R)$ be an analytic family of objects in $W(K,\mathbf{D})$ based on $X.$ The purpose of this section is to prove \begin{theorem} \label{Imbedding}Let the representation of $Q$, $\sigma_{k,x}$, on \[ W_{k}=U(\mathfrak{n)/}\mathfrak{n}^{k+1}U(\mathfrak{n})\otimes E\otimes H\otimes R_{|M \] be as in Theorem \ref{dependence} and let $T_{k}(x)$ be the analytic family as in Theorem \ref{J-morph}. If $\omega$ is a compact subset of $X$ then there exists $k_{\omega}$ such that if $x\in\omega$ then $T_{k}(x)$ is injective. \end{theorem} This is a slight extension of a result in \cite{HOW}. Given $k$ then $(\sigma_{k,x},W_{k})$ as a composition series $W_{k,x}=W_{k,x}^{1}\supset W_{k,x}^{2}\supset...\supset W_{k,x}^{r}\supset W_{k,x}^{r+1}=\{0\}$ and each $W_{k,x}^{i}/W_{k,x}^{i+1}$ is isomorphic with the representation $(\lambda_{j,\nu_{j}},H_{\lambda_{j}})$ with $(\lambda_{j},H_{j})$ an irreducible representation of $M$ and $\nu_{j}\in\mathfrak{a}_{\mathbb{C }^{\ast}$ and $\lambda_{j,\nu}(man)=a^{\nu+\rho}\lambda_{j}(m)$ with $m\in M,a\in A$ and $n\in N$. Also note that there is a natural $Q$--module exact sequenc \[ 0\rightarrow\mathfrak{n}^{k+2}U(\mathfrak{n)/n}^{k+1}U(\mathfrak{n})\otimes E\otimes H\otimes R_{|M}\rightarrow W_{k+1,x}\rightarrow W_{k,x}\rightarrow0. \] We may assume that the composition series is consistent with this exact sequence. This implies that the $\nu_{j}$ that appear in $W_{k}/W_{k+1}$ are of the form $\mu+\alpha_{1}+...+\alpha_{k}$ with $\alpha_{i}$ a restricted positive root (i.e. a weight of $\mathfrak{a}$ on $\mathfrak{n}$). Now consider the corresponding exact sequence of $(\mathfrak{g},K)$--modules \[ \overset{}{(\ast)}0\rightarrow I(\eta_{k,x})\rightarrow I(\sigma _{k+1,x})\rightarrow I(\sigma_{k,x})\rightarrow0. \] The $(\mathfrak{g},K)$--modules $I(\sigma_{\nu})$ with $\sigma$ an irreducible representation of $M$ with Harish-Chandra parameter $\Lambda_{\sigma}$ (for $Lie(M)_{\mathbb{C}}$) and $\nu\in\mathfrak{a}_{\mathbb{C}}^{\ast}$ have infinitesimal character with Harish-Chandra parameter $\Lambda_{\sigma}+\nu$. We are finally ready to prove the theorem. Let $C_{\omega}$ be the compact set $\cup_{x\in\omega}ch(J(R_{x}))$. Let $C_{\omega}=\cup_{j=1}^{k_{\omega}}\Lambda_{i}+D_{i}$ with $D_{i}$ compact in $\mathfrak{a}_{\mathbb{C}}^{\ast}$. \ Assume that the result is false for $\omega$. Then for each $j$ there exists $k\geq j$ and $x$ such that $\ker T_{k}(x)\neq0$ but $\ker T_{k+1}=0$. Label the Harish -Chandra parameters that appear in $I(\sigma_{o,x})$, $\Lambda_{1}+\nu_{1},...,\Lambda_{s}+\nu_{s}$ with $\Lambda_{i}\in Lie(T)^{\ast}$ and $\nu_{i}\in\mathfrak{a}_{\mathbb{C }^{\ast}$ (recall that we have fixed a maximal torus of $M$). The above observations imply that $ch(J(R_{x})$ contains an element of the form $\Lambda+\nu_{i_{k}}+\beta_{k}$ with $\beta_{k}$ a sum of $k$ positive roots, $\Lambda\in Lie(T)^{\ast}$ and $1\leq i_{k}\leq s$. We now have our contradiction $\nu_{i_{k}}+\beta_{k}\in\cup D_{i}$ which is compact. But the set of $\nu_{i_{k}}+\beta_{k} $ is unbounded. \section{Families of Hilbert and Fr\'{e}chet representations} \begin{definition} Let $X$ be metric space. A continuous family of Hilbert representations based on $X$ of $G$ is a pair $(\pi,H)$ of a Hilbert space $H$ and $\pi:X\times G\rightarrow H$ strongly continuous such that if $\pi_{x}(g)=\pi(x,g)$ then $(\pi_{x},H)$ is a strongly continuous representation of $G$. The family will be called admissible if $\pi_{x|K}$ is independent of $x\in X$ and $\dim H(\gamma)<\infty$ for each $\gamma\in\hat{K}$. \end{definition} \begin{lemma} Let $(\pi,H)$ be a continuous family of admissible Hilbert representations of $G$ based on the connected real or complex analytic manifold $X$ and denote by $d\pi_{x}$the action of $\mathfrak{g}$ on $H_{K}^{\infty}$ (the $K$--finite $C^{\infty}$--vectors). Then $(d\pi,H_{K})$ is a continuous family of admissible $(\mathfrak{g},K)$--modules based on $X$. \end{lemma} \begin{proof} If $\gamma\in\hat{K}$ then $C_{c}^{\infty}(\gamma;G)$ denotes the space of all $f\in C_{c}^{\infty}(G)$ such that \[ \int_{K}\chi_{\gamma}(k)f(k^{-1}g)dk=f(g),g\in G \] with $\chi_{\gamma}$ the character of $\gamma$. Then \[ H(\gamma)=\pi_{x}(C_{c}^{\infty}(\gamma;G))H. \] We also note that if $Y\in\mathfrak{g},f\in C_{c}^{\infty}(\gamma;G)$ and $v\in H$ then \[ d\pi_{x}(Y)\pi_{x}(f)v=\pi_{x}(Yf)v \] with $Yf$ the usual action of $Y\in\mathfrak{g}$ on $C^{\infty}(G)$ as a left invariant vector field. Thus, if $v\in H_{K}$ and $y\in U(\mathfrak{g _{\mathbb{C}})$ then the ma \[ x\longmapsto d\pi_{x}(y)v \] is continuous. \end{proof} The following lemma is Lemma 1.1.3 in \cite{RRG1-11} taking into account dependence on parameters. The proof is essentially the same taking into account the dependence on parameters and using the local compactness of $X.$ \begin{lemma} Let $X$ be a locally compact metric space and let $H$ be a Hilbert space. Assume that for each $x\in X$, $\pi_{x}:G\rightarrow GL(H)$ (bounded invertible operators such that 1) If $\omega\subset X$ and $\Omega\subset G$ are compact subsets of $X$ and of $G$ respectively then there exists a constant $C_{\omega,\Omega}$ such that $\left\Vert \pi_{x}(g)\right\Vert \leq C_{\omega,\Omega}$ for $x\in\omega ,g\in\Omega.$ 2) The map $x,g\rightarrow\left\langle \pi_{x}(g)v,w\right\rangle $ is continuous for all $v,w\in H$. Then $(\pi,H)$ is a continuous family of representations of $G$ based on $X$ and conversely if $(\pi,H)$ is a continuous family of Hilbert representations then 1) and 2) \ are satisfied. \end{lemma} An immediate corollary is \begin{corollary} \label{Conj-dual}Let $(\pi,H)$ be an admissible, continuous family of Hilbert representations of $G$ based on the locally compact metric space $X$. Set for each $x\in X$, $\hat{\pi}_{x}(g)=\pi_{x}(g^{-1})^{\ast}$ then $(\hat{\pi},H)$ is a continuous, admissible family of Hilbert representations of of $G$ based on $X$. \end{corollary} Let $\left\Vert g\right\Vert $ be a norm on $G,$ that is a continuous function from \thinspace$G$ to $\mathbb{R}_{>0}$ (the positive real numbers) such that 1. $\left\Vert k_{1}gk_{2}\right\Vert =\left\Vert g\right\Vert ,k_{1},k_{2}\in K,g\in G$, 2. $\left\Vert xy\right\Vert \leq\left\Vert x\right\Vert \left\Vert y\right\Vert ,x,y\in G$, 3. The sets $\left\Vert g\right\Vert \leq r<\infty$ are compact. 4. If $X\in\mathfrak{p}$ then if $t\geq0$ then $\log\left\Vert \exp tX\right\Vert =t\log\left\Vert \exp X\right\Vert .$ If $(\sigma,V)$ is a finite dimensional representation of $G$ with compact kernel and if $\left\langle ...,...\right\rangle $ is an inner product on $V$ that is $K$--invariant then if $\left\Vert \sigma(g)\right\Vert $is the operator norm of $\sigma(g)$ then $\left\Vert g\right\Vert =\left\Vert \sigma(g)\right\Vert $ is a norm on $G$. Taking the representation on $V\oplus V$ given b \[ \left[ \begin{array} [c]{cc \sigma(g) & \\ & \sigma(g^{-1})^{\ast \end{array} \right] \] then we may (and will) assume in addition 5. $\left\Vert g\right\Vert =\left\Vert g^{-1}\right\Vert $. Note that 5. implies that $\left\Vert g\right\Vert \geq1$. Using the same proof as Lemma 2.A.2.1 in \cite{RRG1-11}(which we give for the sake of completeness) one can prove \begin{lemma} \label{loc-umod-growth}If $(\pi,H)$ is a continuous family of Hilbert representations modeled on $X$ and if $\omega$ is a compact subset of $x$ then there exists constants $C_{\omega},r_{\omega}$ such tha \[ \left\Vert \pi_{x}(g)\right\Vert \leq C_{\omega}\left\Vert g\right\Vert ^{r_{\omega}}. \] \end{lemma} \begin{proof} Let $B_{1}=\{g\in G|\left\Vert g\right\Vert \leq1\}$. Then if $v\in H$ and $(x,g)\in\omega\times B_{1}$ then $\sup\left\Vert \pi_{x}(g)v\right\Vert <\infty$ by strong continuity. The principle of uniform boundedness (c.f. \cite{ReedSimon},III.9,p.81)\ implies that there exists a constant, $R$, such that $\left\Vert \pi_{x}(g)\right\Vert \leq R$ for $(x,g)\in\omega\times B_{1}$. Let $r=\log R$. In particular if $k\in K$ then $\left\Vert \pi _{x}(kg)\right\Vert \leq\left\Vert \pi_{x}(k)\right\Vert \left\Vert \pi _{x}(g)\right\Vert \leq R\left\Vert \pi_{x}(g)\right\Vert $. Also, \[ \left\Vert \pi_{x}(g)\right\Vert =\left\Vert \pi_{x}(k^{-1})\pi_{x (kg)\right\Vert \leq R\left\Vert \pi_{x}(kg)\right\Vert . \] Thus for all $k\in K,g\in G \[ R^{-1}\left\Vert \pi_{x}(g)\right\Vert \leq\left\Vert \pi_{x}(kg)\right\Vert \leq R\left\Vert \pi_{x}(g)\right\Vert . \] Let $X\in\mathfrak{p}$, $X\neq0$ and let $j$ be such that \[ j<\log\left\Vert \exp X\right\Vert \leq j+1 \] the \[ \log\left\Vert \pi_{x}(\exp X)\right\Vert \leq\log\left\Vert \pi_{x (\exp(\frac{X}{j+1})\right\Vert ^{j+1}\leq r(j+1)\leq r+r\log\left\Vert \exp X\right\Vert . \] Thu \[ \left\Vert \pi_{x}\left( \exp X\right) \right\Vert \leq R\left\Vert \exp X\right\Vert ^{r},X\in\mathfrak{p. \] If $g\in G$ then $g=k\exp X$ with $k\in K$ and $X\in\mathfrak{p}$ s \[ \left\Vert \pi_{x}(g)\right\Vert =\left\Vert \pi_{x}(k\exp X)\right\Vert \leq R^{2}\left\Vert \exp X\right\Vert ^{r}=R^{2}\left\Vert g\right\Vert ^{r}. \] Take $C_{\omega}=R^{2}$ and $r_{\omega}=r$. \end{proof} We define $\mathcal{S}(G)$ to be the space of all $f\in C^{\infty}(G)$ such that of $x\in U(\mathfrak{g}_{\mathbb{C}})$ (thought of as a left invariant differential operator) and $r>0$ the \[ p_{r,x}(f)=\sup_{g\in G}\left\vert xf(g)\right\vert \left\Vert g\right\Vert ^{r}<\infty. \] $\mathcal{S}(G)$ is a Fr\'{e}chet (using the semi-norms $p_{r,x}$) algebra (under convolution) of functions on $G.$ Lemma 2.A.2.4 in \cite{RRG1-11} implies that there exists $d>0$ such tha \[ \int_{G}\frac{dg}{\left\Vert g\right\Vert ^{d}}<\infty. \] This implies that $\mathcal{S}(G)$ acts on any Banach representation, $(\pi,V)$ of $G$ vi \[ \pi(f)=\int_{G}f(g)\pi(g)dg. \] Recall that a pair $(\pi,V)$ of a Fr\'{e}chet space, $V$, and a representation of $G$, $\pi$, on $V$ is called a smooth Fr\'{e}chet representation of moderate growth if the map $g\longmapsto\pi(g)v$ is $C^{\infty}$ and if $p$ is a continuous seminorm on $V$ then there exists a continuous seminorm $q$ on $V$ and $r$ such tha \[ p(\pi(g)v)\leq\left\Vert g\right\Vert ^{r}q(v)\text{. \] This implies that a smooth Fr\'{e}chet representation of moderate growth is an $\mathcal{S}(G)$--module. A smooth Fr\'{e}chet representation of moderate growth is defined to be admissible if the $(\mathfrak{g},K)$--module $V_{K}$ is admissible. It is said to be of Harish-Chandra class if $V_{K}$ is admissible and finitely generated. Let $\mathcal{HF}(G)$ be the category of smooth Fr\'{e}chet representations of moderate growth in the Harish-Chandra class. The CW theorem \begin{theorem} The functor $V\rightarrow V_{F}$ from $\mathcal{HF}(G)$ to $H\mathcal{( \mathfrak{g},K)$ is an isomorphism of categories. \end{theorem} We will prove this as a consequence of the usual statement of the theorem is (see \cite{RRG1-11} Theorem 11.6.7 (2)) \begin{theorem} If $(\pi_{i},V_{i})\in\mathcal{HF}(G)$, for $i=1,2$ and if $T\in \mathrm{Hom}_{H\mathcal{(}\mathfrak{g},K)}(\left( V_{1}\right) _{K},\left( V_{2}\right) _{K})$ then $T$ extends to a continuous element of $\mathrm{Hom}_{\mathcal{FH(}G)}(V_{1},V_{2})$ with closed image that is a topological summand. \end{theorem} If $V_{1},V_{2}\in\mathcal{HF}(G)$ have the property that $\left( V_{1}\right) _{K}=\left( V_{2}\right) _{K}=V$ then one has \[ V_{i}\subset\prod_{\gamma\in\hat{K}}V(\gamma),i=1,2. \] As the formal sums that converge relative to the continuous seminorms endowing the topology on $V_{1}$ and $V_{2}$ respectively. The identity map on $V$ induces an isomorphism of $V_{1}$ and $V_{2}$. But this is given by the identity map on $\prod_{\gamma\in\hat{K}}V(\gamma)$. Hence $V_{1}=V_{2}$. This implies the isomorphism of categories. The inverse functor can be seen as follows. Let $V\in$ $H\mathcal{( \mathfrak{g},K)$ and let $(\pi,H)$ be a Hilbert representation of $G$ such that $(d\pi,H_{K})$ is equivalent to $V$. Let $T\in\mathrm{Hom}_{H\mathcal{( \mathfrak{g},K)}(V,H_{K})$ give the isomorphism. Let $\left\langle ...,...\right\rangle $ the Hilbert space structure on $H$ and let $\left( v,w\right) =\left\langle Tv,Tw\right\rangle $. If $x\in U(\mathfrak{g)}$ set $p_{x}(v)=\sqrt{(xv,xv)}$and \[ \overline{V}=\{\{v_{\gamma}\}\in\prod_{\gamma\in\hat{K}}V(\gamma)|\sum _{\gamma\in\hat{K}}p_{x}(v_{\gamma})^{2}<\infty\}. \] Then $T$ extends to an isomorphism of $\bar{V}$ onto $H^{\infty}$. Thus defining $\mu(g)=T^{-1}\pi(g)T$ on $\bar{V}$ we have $(\mu,\bar{V )\in\mathcal{HF}(G)$ and $\bar{V}_{K}=V$. The uniqueness implies that $V\rightarrow\bar{V}$ defines the inverse functor. Another corollary of the CW theorem is (see \cite{HOW} Theorem 11.8.2) \begin{theorem} If $(\pi,V)\in\mathcal{HF}(G)$ and if $v\in V$ then $\pi(\mathcal{S}(G))v$ is closed in $V$ and a topological summand. \end{theorem} \begin{corollary} If $(\pi,H)$ is a Hilbert representation of $G$ such that $H_{K}^{\infty}\in H\mathcal{(}\mathfrak{g},K)$ and if $H_{K}$ is generated by the subspace $U$ then $\pi(\mathcal{S}(G))U=H^{\infty}$. \end{corollary} \begin{definition} A continuous family of objects in $\mathcal{HF}(G)$ based on the metric space $X$ is a pair $(\pi,V)$ of a Fr\'{e}chet space $V$ and a continuous map \[ \pi:X\times G\rightarrow\mathrm{End}(V) \] (here $\mathrm{End}(V)$ is the algebra of continuous operators on $V$ with the strong topology) such that such that for each $x\in X$, if $\pi_{x (g)=\pi(x,g)$ then $(\pi_{x},V)\in\mathcal{HF}(G)$. We will say that the family has local uniform moderate growth if for each $\omega$ a compact subset of $X$ and each continuous seminorm on $V,p,$there exists a continuous seminorm $q_{\omega}$ on $V$ and $r_{\omega}$ such that if $v\in V $ then \[ p(\pi_{x}(g)v)\leq q_{\omega}(v)\left\Vert g\right\Vert ^{r_{\omega}}. \] \end{definition} \begin{definition} \label{holomorphicfam}A holomorphic family of objects in $\mathcal{HF}(G)$ based on the complex manifold $X$ is a continuous family $(\pi,V)$ such that the map $x\longmapsto\pi_{x}(g)v$ is holomorphic from $X$ to $V$ for all $g\in G$,$v\in V$. \end{definition} \begin{lemma} \label{Cont-diff}If $(\pi,H)$ is a continuous family of Hilbert representations based on the metric space $X$ such that the representations $(d\pi_{x},H_{K}^{\infty})\in H\mathcal{(}\mathfrak{g},K)$ and the $K-C^{\infty}$vectors are the $G-C^{\infty}$ vectors then $(\pi,H^{\infty})$ is a continuous family of of objects in $\mathcal{HF}(G)$ based on the metric space $X$ that is of local uniform moderate growth. \end{lemma} \begin{proof} We note that if $f\in\mathcal{S}(G)$ and $v\in H$ then the map $x\longmapsto \pi_{x}(f)v$ is continuous from $X$ into $H^{\infty}$. Also $\pi_{x}(h)\pi _{x}(f)v=\pi_{x}(L(h)f)v$ with $L(h)f(g)=f(h^{-1}g)$. The last assertion follows from Lemma \ref{loc-umod-growth}. \end{proof} For want of a better place to put it we include the following simple Lemma in this section. \begin{lemma} \label{orthhbases}Let $(\tau,V)$ be a finite dimensional continuous representation of $K$ and let $X$ be a locally compact metric space (resp. an analytic manifold). If $u\in X$ let $\left\langle ...,...\right\rangle _{u}$ be an inner product on $V$ such that $\tau(k)$ acts unitarily with respect to $\left\langle ...,...\right\rangle _{u}$ for $k\in K$ and such that the map $u\longmapsto\left\langle v,w\right\rangle _{u}$ is continuous (resp. real analytic) for all $v,w\in V$. Then there exists, for each $u$ and an ordered orthonormal basis of $V,$ $e_{1}(u),...,e_{n}(u)$ such that the map $u\longmapsto e_{i}(u)$ is continuous (resp. real analytic) and the matrix of $\tau(k)$ with respect to $e_{1}(u),...,e_{n}(u)$ is independent of $u$. Furthermore, if $X$ is compact and contractible and $(\sigma.W)$ is a finite dimensional continuous representation of $K$ and $u\longmapsto B(u)\in \mathrm{Hom}_{K}(V,W)$ is continuous and surjective for $u\in X$ then $e_{1}(u),...,e_{r}(u)$ with $r=\dim V-\dim W$ can be taken in $\ker B(u)$. \end{lemma} \begin{proof} Fix an inner product, $(...,...)$, on $V$ such that $\tau$ is unitary. Then there exists a positive definite Hermitian operator (with respect to $\left( ...,...\right) $), $A(u)$ such that $\left\langle v,w\right\rangle _{u}=(A(u)v,w),v,w\in V$. Then $A(u)$ is continuous (resp. real analytic) in $u$. Now, \[ \left\langle v,w\right\rangle _{u}=\left\langle \tau(k)v,\tau(k)w\right\rangle _{u}=(A(u)\tau(k)v,\tau(k)w)=(\tau(k)^{-1}A(u)\tau(k),v,w\in V,k\in K. \] So \[ \tau(k)^{-1}A(u)\tau(k)=A(u),u\in X,k\in K. \] Set $S(u)=A(u)^{\frac{1}{2}}$ then $\left\langle v,w\right\rangle _{u}=(S(u)v,S(u)w)$. Thus if $T(u)=S(u)^{-\frac{1}{2}}$ then $\tau (k)T(u)=T(u)\tau(k),k\in K,u\longmapsto T(u)$ is continuous (resp. real analytic) and \[ \left\langle T(u)v,T(u)w\right\rangle _{u}=\left( v,w\right) ,v,w\in V. \] Let $e_{1},...,e_{n}$ be an (ordered) orthonormal basis of $V$ with respect to $(...,...)$ then $e_{1}(u)=T(u)e_{1},...,e_{n}(u)=T(u)e_{n}$ is an orthonormal basis of $V$ with respect to $\left\langle ...,...\right\rangle _{u}$ .If $\tau(k)e_{i}=\sum k_{ji}e_{j}$ the \[ \tau(k)e_{i}(u)=\tau(k)T(u)e_{i}=T(u)\tau(k)e_{i}=\sum k_{ji}T(u)e_{j}. \] To prove the second assertion note that $u\rightarrow\ker B(u)$ is a $K$--vector bundle over $X$. Since $X$ compact and contractible the bundle is a trivial $K$--vector bundle (\cite{Atiya},Lemma 1.6.4). Thus there is a representation $(\mu,Z)$ of $K$ and $u\longmapsto L(u)\in Hom_{K}(Z,V)$ continuous such that $L(u)Z=\ker B(u)$ and $L(u)$ is injective. Notice that $B(u):\ker B(u)^{\perp}\rightarrow W$ is a $K$--module isomorphism. Now pull back the inner product $\left\langle _{...,...}\right\rangle _{u}$ to $Z$ using $L(u)$ getting a $K$--invariant inner product, $(...,,,,)_{u}$, on $Z$ and push the inner product to $W$ getting \ a $K$--invariant inner product $(...,...)_{u}^{1}$ on $W$ Now apply the first part of the lemma to get an orthonormal basis $f_{1}(u),...,f_{r}(u)$ of $Z$ with respect to $(...,...)_{u}$ and an orthonormal basis $f_{r+1}(u),...,f_{n}(u)$ ($n=\dim V$) with respect to $(...,...)_{u}^{1}$ such that the matrices of the action of $K$ with respect to each of these bases is constant. Take $e_{i (u)=L(u)f_{i}(u)$ for $i=1,...,r$ and $e_{i}(u)=\left( B(u)_{|_{\ker B(u)^{\perp}}}\right) ^{-1}f_{i}(u)$ for $i=r+1,...,n$. \end{proof} \section{Continuous globalization of families of $J$--modules} We maintain the notation of the previous sections. Let $Z$ be a connected analytic manifold and let $(\mu,L)$ be an analytic family of of objects in $W(K,\mathbf{D})$ based on $Z$. \begin{theorem} \label{globalize-J}Let $U\subset Z$ be open with compact closure. There exists a continuous family $(\pi,H)$ of Hilbert representations of $G$ based on $U$ such that the continuous family of $(\mathfrak{g},K)$--modules $(d\pi ,H_{K}^{\infty})$ is isomorphic with the analytic family $z\mapsto J(L_{z})$ of objects in $H\mathcal{(}\mathfrak{g},K)$ based on on $U$ (thought of as a continuous family). Furthermore, the $K-C^{\infty}$ vectors of $(\pi_{u},H)$ are the $G-C^{\infty}$ vectors for every $u\in U.$ \end{theorem} \begin{proof} Let $\gamma\in\hat{K}$ then Theorem \ref{decompositions} 2.implies \[ \dim J(L_{z})(\gamma)=\dim E\dim\gamma\dim\mathrm{Hom}_{K}(V_{\gamma },\mathcal{H}\otimes L). \] for every $z\in Z$. In particular it is independent of $z$. Theorem \ref{Imbedding} implies that there exists $k$ and for each $u\in U$ the map \[ T_{k,L_{u}}:J(L_{u})\rightarrow I(\sigma_{k,L_{u}}) \] is injective. Note that the space of $K$--finite vectors in $I(\sigma _{k,L_{u}})$ is the $K$--finite induced representation $Ind_{M}^{K (\sigma_{k,L_{|M}})$ and hence independent of $u$. Let \thinspace $(H_{1},\left\langle ...,...\right\rangle )$ be the Hilbert space completion of $Ind_{M}^{K}(\sigma_{k,L_{|M}})$ corresponding to unitary induction from $M$ to $K$. This gives an analytic family of Hilbert representations of $G$, $\mu_{z}$. For each $\gamma\in\hat{K}$ the family of linear operators $T_{k,L_{u}|J(L_{u})(\gamma)}\in\mathrm{Hom}_{K}(J(L_{u})(\gamma ),I(\sigma_{k,L_{u}})(\gamma))$ is analytic in $u\in U$ (see Theorem \ref{J-morph}) and injective. On $\left( E\otimes\mathcal{H\otimes}L\right) (\gamma)$ put for each $u\in U$ the inner product $\left\langle ...,...\right\rangle _{u}=T_{k,L_{u}}^{\ast}\left\langle ...,...\right\rangle $. Then $\pi(k)$ acts unitarily with respect to $\left\langle ...,...\right\rangle _{u}$ for $u\in U$ and $u\longmapsto\left\langle ...,...\right\rangle _{u}$ is real analytic. Let $e_{1}^{\gamma (u),...,e_{r_{\gamma}}^{\gamma}(u)$ be as in Lemma \ref{orthhbases}. Then $u\longmapsto e_{i}^{\gamma}(u)$ is analytic. Put $f_{i}^{\gamma }(u)=T_{k,L_{u}}e_{i}^{\gamma}(u)$ and set $P(u)_{\gamma}(v)=\sum\left\langle v,f_{i}^{\gamma}(u)\right\rangle f_{i}^{\gamma}(u)$ then $u\longmapsto P(u)_{\gamma}$ is an analytic map of $U$ into the manifold of orthogonal projection operators of rank $m_{\gamma}$ on $H_{1}(\gamma)$. Set \ref{globalize-J \[ P(u)=\sum_{\gamma\in\hat{K}}P(u)_{\gamma}. \] Then $P(u)H_{1}$ is the closure in the Hilbert space $H_{1}$ of $T_{k,L_{u }(J(L_{u}))$. Observing that the $K$--finite vectors in $(\mu_{u},H_{1})$ are contained in the analytic vectors implies that $P(u)H_{1}$ is invariant under $\mu_{u}(G)$. Note $u\mapsto P(u)$ is continuous in the strong operator topology from $U$ to the bounded operators on $H_{1define}$ . This is proved by the following standard calculus style argument. Let $v\in H_{1}$ be a unit vector and $u_{o}\in U$. We can expand $v=\sum v_{\gamma}$ in $H_{1}$ with $v_{\gamma}\in H(\gamma)$ and let $\varepsilon>0$ be given then there exists $F\subset\hat{K}$ a finite set such that $\left\Vert \sum_{\gamma\notin F}v_{\gamma}\right\Vert <\frac{\varepsilon}{4}$. Also $P(u)_{F}=\sum _{\gamma\in F}P(u)_{\gamma}$ is analytic in $u$ thus there exists a neighborhood $U_{1}$ of $z_{o}$ in $U$ such that $\left\Vert \left( P(u)_{F}-P(u_{o})_{F}\right) v\right\Vert <\frac{\varepsilon}{2}$.for $u\in U_{1}$. Noting that $\left\Vert P(u)\right\Vert =1$ we have $\left\Vert \left( P(u)-P(u_{o})\right) v\right\Vert \leq\left\Vert \left( P(u)_{F}-P(u_{o})_{F}\right) v\right\Vert +\left\Vert \left( P(u)-P(u_{o )\right) \sum_{\gamma\notin F}v_{\gamma}\right\Vert < \[ \left\Vert \left( P(u)_{F}-P(u_{o})_{F}\right) v\right\Vert +\frac {\varepsilon}{2}<\varepsilon. \] For each $u\in U$ put the inner product $\left\langle ...,...\right\rangle _{\upsilon}=T_{u,L_{o}}^{\ast}\left\langle ...,...\right\rangle $ on $E\otimes\mathcal{H\otimes}L$. Pull back the action of $G$ on $P(u)H_{1}$ to the Hilbert space completion, $H_{u}$ of $E\otimes\mathcal{H\otimes}L$ with respect to $\left\langle ...,...\right\rangle _{\upsilon}$ to get the representation $\eta_{u}$ of $G$ such that $d\eta_{u}$ is equivalent with $J(L_{u})$. Note that $\{e_{j}(u)\}$ is an orthonormal basis of $H_{u}$ for all $u\in Z$. If $v,u\in Z$ define $T(v,u):H_{u}\rightarrow P(v)H_{1}$ by $T(v,u)e_{j}(u)=e_{j}(v)$. Then $T(u,v)$ is a unitary $K$--isomorphism with inverse $T(v,u)$. Fix $u_{o}\in U$, set $H=H_{u_{o}}$ and set $\pi _{u}(g)=T(u,u_{o})\eta_{u}(g)_{|}T(u_{o},u).$ Then $(\pi,H)$ is the desired continuous family. The last assertion follows from the fact that the $K-C^{\infty}$ vectors of $(\mu_{u},H_{1})$ are the $G-C^{\infty}$ vectors. \end{proof} The technique in the proof of the Theorem above involving the bases $\{e_{j}^{\gamma}(u)\}$ will be used several times in the next section. \section{Continuous globalization of families of objects in $H(\mathfrak{g ,K)$} \begin{theorem} \label{hilb-main}Let $(\pi,V)$ be an analytic family of objects in $H(\mathfrak{g},K)$ based on the analytic manifold $X$. Let $\ x_{o}\in X$ then there exists, $U$, an open neighborhood of $x_{o}$ in $X$ and a continuous family of Hilbert representations $(\mu_{U},H_{U})$ such that the family $(d\mu_{U},\left( H_{U}\right) _{K}^{\infty})$ is isomorphic with $(\pi_{|U},V)$(as a continuous family). Furthermore, the $K-C^{\infty}$ vectors of $\mu_{U,x}$ are the $G-C^{\infty}$ vectors. \end{theorem} \begin{proof} Let $U_{1}$ be an open neighborhood of $x_{o}$ in $X$ with compact closure. Then Theorem \ref{loc-finite} implies that there exists $F_{U_{1}}^{0 \subset\hat{K}$ a finite subset such that $\pi_{x}(U(\mathfrak{g}_{\mathbb{C }))\sum_{\gamma\in F_{U}^{0}}V(\gamma)=V.$Let $R^{0}=\sum_{\gamma\in F_{U }V(\gamma)$. $R^{0}$ is invariant under the action $\pi_{x}(\mathbf{D)}$ for all $x\in X$. This implies that $(\left( \pi_{|U}\right) |_{\mathbf{D },R^{0})$ defines an analytic family of objects in $W(K,\mathbf{D})$ based on $U_{1}$. Let $J(R^{0})$ be the corresponding $J$--family. Then we have the surjective analytic homomorphism of familie \ \begin{array} [c]{ccccc} & T_{0} & & & \\ J(R^{0}) & \rightarrow & V_{|U} & \rightarrow & 0 \end{array} \] with $T_{0}(x)$ mapping $J(R_{x}^{0})$ onto $V$ for all $x\in U_{1}$. Let $\mu_{x}^{0}$ be the action of $U(\mathfrak{g}_{\mathbb{C}})$ on the space $J(R^{0})$ (which we regard to be the fixed $K$--representation $\mathcal{H \otimes E\otimes R^{0}$) the Corollary \ref{finitegen} implies that there exists a finite subset $F_{U}^{1}\subset\hat{K}$ such that \[ \ker T_{0}(x)=\mu_{x}(U(\mathfrak{g}_{\mathbb{C}}))\sum_{\gamma\in F_{U}^{1 }\ker T_{0}(x)|_{J(R^{0})(\gamma)}. \] If $\gamma\in\hat{K}$ then \[ \dim\ker T_{0}(x)|_{J(R^{0})(\gamma)}=\dim J^{0}(R)(\gamma)-\dim V(\gamma) \] for $x\in U_{1}.$ Let $(\sigma,(H^{0},(...,...)))$ be the continuous family of Hilbert representations based on $U_{1}$ corresponding to $J(R^{0})$ as in Theorem \ref{globalize-J}. Let $U$ be an open neighborhood of $x_{o}$ contained in $U$ such that $\overline{U}$ is contractible. Let $\gamma\in \hat{K}$ if $x\in\overline{U}$ let $e_{1}^{\gamma}(x),...,e_{n_{\gamma} ^{y}(x)$ and orthonormal basis of $\left( \mathcal{H}\otimes E\otimes R^{0}\right) (\gamma)$ with respect to the pull back of $(...,...)$ to $\left( \mathcal{H}\otimes E\otimes R^{0}\right) (\gamma)$ such that $x\mapsto e_{i}^{\gamma}(x)$ is continuous on $U$ and $e_{1}^{\gamma }(x),...,e_{r_{\gamma}}^{\gamma}(x)$ is an orthonormal basis of $\ker T_{1}(x)|_{\left( \mathcal{H}\otimes E\otimes R^{0}\right) (\gamma)}$ and the matrix of $k\in K$ withe respect to the $e_{i}^{\gamma}(x)$ is independent of $x$ (see the second part of Lemma \ref{orthhbases}) for $x\in U$. Define \[ f_{i}^{\gamma}(x)=T_{0}(x)(e_{r_{\gamma}+i}^{\gamma}(x)),i=1,...,\dim V(\gamma)\text{. \] Let if $x\in U$ let $\left\langle ...,...\right\rangle _{x}$ be the inner product on $V$ such that $\{f_{i}^{\gamma}(x)\}_{\gamma,i}$ is an orthonormal basis of $V$. Define $H_{x}$ to be the Hilbert space completion of $V$ with respect to $\left\langle ...,...\right\rangle _{x}$. Let $H_{x}^{0}$ be the closure of $\ker T_{0}(x)$ in $H$. then since $\ker T_{x}(x)$ is a $(\mathfrak{g},K)$ invariant subspace of the analytic vectors $H_{x}$ is $\sigma(G)$--invariant (c.f. \cite{RRG1-11} Proposition 1.6.6). The argument using the $e_{i}^{\gamma}$ in the proof of Theorem \ref{globalize-J} one proves that $(\sigma_{x|H_{x}^{0}},H_{x}^{0})$ defines a continuous family of Hilbert representations based on $U$. Also the space of $K$--finite vectors of $H^{0}/H_{x}^{0}$ is isomorphic with $(\pi_{x},V)$. Let $\mu_{x}$ be the quotient representation on $H^{0}/H_{x}^{0}$. Note that $\,$the quotient map on $J(R^{0})/\ker T_{0}(x)$ corresponding to $T_{0}(x),S(x),$ extends to a unitary map of $H^{0}/H_{x}^{0}$ onto $H_{x}$ by the definition of $\left\langle ...,...\right\rangle _{x}$. Set $\eta_{x}(g)=S(x)\mu _{x}(g)S(x)^{-1}$ for $x\in U$. Finally, if $x,y\in U$ then define $L(x,y):H_{y}\rightarrow H_{x}$ by \[ L(x,y)f_{i}^{\gamma}(y)=f_{i}^{\gamma}(x) \] for all $i,\gamma$. Then $x,y\rightarrow L(x,y)$ is unitary, strongly continuos and $L(x,y)^{-1}=L(y,x)$. Set $H=H_{x_{o}}$ and $\nu_{x (g)=L(x,x_{o})\eta_{x}(g)L(x_{o},x$) \ then $(\nu,H)$ is the desired continuous family of Hilbert representations based on $U$. \end{proof} We include the following corollary however as noted at the end of the section it is not necessary to prove the main results that follow. \begin{corollary} Let $X$ be a connected analytic manifold and let $(\pi,V)$ be an analytic family of objects in $H(\mathfrak{g},K)$ based on $X$ such that $\dim V=\infty$ then there exists a continuous family of Hilbert representations $(\lambda,H)$ such that the family $(d\lambda,\left( H\right) _{K}^{\infty })$ is isomorphic with $(\pi,V)$(as a continuous family). Furthermore, the $K-C^{\infty}$ vectors of $\mu_{U,x}$ are the $G-C^{\infty}$ vectors. \end{corollary} \begin{proof} The previous theorem implies that there exists an open covering $\{U_{\alpha }\}$ of $X$ \ such that for each $\alpha$ there exists a continuous family of Hilbert representations $(\mu_{U_{\alpha}},H_{U_{\alpha}})$ such that $(d\mu_{U_{\alpha}},(H_{U_{\alpha}})_{K}^{\infty})$ is continuously isomorphic with $(\pi|_{U},V)$. For each $\alpha,\beta$ the definition of the Hilbert spaces $H_{U_{\alpha}}$ implies that one has $g_{U_{\beta},U_{\alpha }(x):H_{U_{\alpha}}\rightarrow H_{U_{\beta}}$ a unitary isomorphism depending strongly continuously on $x\in U_{\alpha}\cap U_{\beta}$. \ This defines a Hilbert vector bundle over $X$. Kuiper's Theorem implies that all Hilbert bundles with infinite dimensional fibers are trivial (\cite{Boss-Bleek}, p.67). Thus there exists a fixed Hilbert space, $H$, and for each $\alpha$ and each $x\in U_{\alpha},h_{\alpha}(x):H_{U_{\alpha}}\rightarrow H$ a unitary isomorphism that depends strongly continuously on $x$ such that $g_{U_{\beta },U_{\alpha}}(x)=h_{\beta}(x)^{-1}h_{\alpha}(x)$. Define $\lambda_{x (g)=h_{U}(x)\mu_{x}(g)h_{U}(x)^{-1}$. \end{proof} This and Lemma \ref{Cont-diff} imply our main results \begin{theorem} \label{main}There exists a continuous family $(\lambda,Z)$ of objects in $\mathcal{HF}(G)$ based on $X$ of local uniform moderate growth that globalizes the family $(\pi,V)$. \end{theorem} This can be interpreted in the following way: \begin{corollary} \label{main2}Let $T$ be the inverse functor to the $K$--finite functor $\mathcal{HF}(G)\rightarrow H(\mathfrak{g},K)$ and let $(\pi,V)$ is an analytic family of objects in $H(\mathfrak{g},K)$ based on the connected analytic manifold $X$ such that $\dim V=\infty$. If $T((\pi_{x},V))=(\lambda _{x},\overline{V_{x}})$ then 1. For all $x,y\in X,\overline{V_{x}}=\overline{V_{y}}$ as subspaces of $\prod_{\gamma\in\hat{K}}V(\gamma)$. Set $\overline{V}$ equal to the common value. 2. The map $x,g,v\longmapsto\lambda_{x}(g)v$ is continuous from $X\times G\times\overline{V}$ to $\bar{V}$, linear in $v$ and $C^{\infty}$ in $g$. \end{corollary} With this interpretation it is clear that this result follows from the local version of the Hilbert globalization (that is the first theorem in this section). \section{The dual functor} We now consider a dual functor. Let $(\pi,V)\in\mathcal{HF}(G)$ let $\lambda\in V^{\prime}$ (the continuous dual). If $v\in V_{K}$ then the following assertions are true 1. There exists $f_{\lambda,v}$ a real analytic function on $G$ such that $f_{\lambda,v}(1)=\lambda(v)$. 2. If $R_{g}$ denotes the right regular action of $g\in G$ on $C(G)$ then $R_{k}f_{\lambda,v}=f_{\lambda,kv}$ for $k\in K$. If $x\in U(\mathfrak{g})$ is thought of as a left invariant differential operator then $xf_{\lambda ,v}=f_{\lambda,xv}$. 3. There exists $d$ depending only on $\lambda$ and $C_{v}>0$ such that $\left\vert f_{\lambda,v}(g)\right\vert \leq C_{v}\left\Vert g\right\Vert ^{d} $ We note that conditions 1. and 2 uniquely specify $f_{\lambda,v}=\lambda (\pi(g)v)$ which satisfies 3. If $Z$ is an object of $H(\mathfrak{g},K)$ then denote by $Z_{\operatorname{mod}}^{\ast}$ set of $\lambda$ in the algebraic dual, $Z^{\ast}$, \ of $Z$ such that if $v\in Z$ then there exists a real analytic function $f_{\lambda,v}$ satisfying 1.,2. and 3. A variant of the CW theorem proved in \cite{RRG1-11}Theorem 11.6.6, Corollary 11.6.3 is \begin{theorem} \label{CW-dual}Let $Z\in H(\mathfrak{g},K)$ then if $V\in\mathcal{HF}(G)$ and if $V_{K}=Z$ then $V_{|Z}^{\prime}=Z_{\operatorname{mod}}^{\ast}.$ \end{theorem} The purpose of this section is to prove a version of this theorem depending on parameters for parabolic induced representations. Before we state our result we will need some definitions and a lemma that will be critical to the proof of the main result of the section. Let $P=MAN$ be a real parabolic subgroup with given $K$ standard Langlands decomposition. Set $M_{K}=M\cap K$. Let $(\sigma,H_{\sigma})$ be an admissible, finitely generated Hilbert representation of $M$ with Hilbertspace structure $\left\langle ...,...\right\rangle _{\sigma}$. Let $A=A_{1}A_{2}$ set $M_{1}=MA_{1}$ and let $\mu$ be a unitary character of $A_{1}.$ Then $\sigma_{1}(ma)=\mu(a)\sigma(m)$ defines a unitary representation of $M_{1}$ on $H_{\sigma}$. Let $I_{\sigma}^{\infty}$ be the $C^{\infty}$ induced representation of $\left( \sigma_{|K_{M}},H_{\sigma}^{\infty}\right) $ \ from $K_{M}$ to $K$. Let $\mathfrak{a}_{2}=Lie(A_{2})$ and let $\nu \in\left( \mathfrak{a}_{2}\right) _{\mathbb{C}}^{\ast}$. If $f\in I_{\sigma }^{\infty}$ then se \[ f_{\nu}(na_{2}m_{1}k)=a_{2}^{\rho}\sigma_{1}(m)f(k),a_{2}\in A_{2},n\in N,m\in M_{1},k\in K. \] since the ambiguity in this expression is in $M_{K}$ this defines a smooth function from $G$ to $H_{\sigma}$. As usual, defin \[ \left( \pi_{\nu}(g)f\right) (k)=f_{\nu}(kg)\text{. \] Then $(\pi_{\nu},I_{\sigma}^{\infty})$ defines a family of smooth Fr\'{e}chet representations of moderate growth. Set $I_{\sigma}=\left( I_{\sigma ^{\infty}\right) _{K}.$ If $f_{1},f_{2}\in I_{\sigma}^{\infty}$ define \[ \left\langle f_{1},f_{2}\right\rangle =\int_{K}\left\langle f_{1 (k),f_{2}(k)\right\rangle _{\sigma}dk. \] Let $\left\Vert ...\right\Vert $ be the corresponding norm on $I_{\sigma }^{\infty}$ \ and let $H$ be the Hilbert space completion of $I_{\sigma }^{\infty}$. In ??? se showed that if $X$ is a compact subset of $\left( \mathfrak{a}_{2}\right) _{\mathbb{C}}^{\ast}$ Then there exist $C_{X}$ and $r_{X}$ such that$\left\Vert \pi_{x}(g)\right\Vert \leq C_{X}\left\Vert g\right\Vert ^{r_{X}}.$ Let $d_{o}$ be such tha \[ \int_{G}\left\Vert g\right\Vert ^{-d_{o}}dg<\infty. \] Fix $U$ open in $\left( \mathfrak{a}_{2}\right) _{\mathbb{C}}^{\ast}$ with compact closure and set $r_{U}=r_{\bar{U}}$. Let $W$ be a finite dimenional, $K$ and $Z(\mathfrak{g}$\thinspace$)$ invariant subspace such that \[ d\pi_{\nu}(U(\mathfrak{g}))W=I_{\sigma \] for all $\nu\in\bar{U}$. Let $f_{1},...,f_{d}$ be an orthonormal basis of $W$ with resepect to $\left\langle ...,...\right\rangle $ (Theorem \ref{loc-finite}). If $\nu\in\bar{U}$ define a new inner product on $H$ by \[ \left\langle u,w\right\rangle _{\nu,s}=\sum_{i}\int_{G}\left\langle \pi_{\nu }(g)f_{i},w\right\rangle \left\langle u,\pi_{\nu}(g)f_{i}\right\rangle \left\Vert g\right\Vert ^{-2s-d_{o}}dg. \] \begin{lemma} \label{keylemma}Fix $\nu_{o}$ in $\bar{U}$ then there exists $\xi>0$ such that if $\nu\in\bar{U}$ and $s>r_{U}+\xi$ then there exists $L>0$ such that if $u\in I_{\sigma}^{\infty} \[ \left\Vert u\right\Vert _{\nu_{o},s}\leq L\left\Vert u\right\Vert _{\nu,s-\xi }. \] \end{lemma} \begin{proof} First note that \[ \left\Vert u\right\Vert _{\nu_{o},s}^{2}=\sum_{i}\int_{G}\left\vert \left\langle \pi_{\nu}(g)f_{i},u\right\rangle \right\vert ^{2}\left\Vert g\right\Vert ^{-2s-d_{o}}dg. \] No \[ \left\langle \pi_{\nu_{o}}(g)f_{i},u\right\rangle =\int_{K}\left\langle \left( f_{i}\right) _{\nu_{o}}(kg),u(k)\right\rangle _{\sigma}dk. \ \[ =\int_{K}a(kg)^{\nu-\nu_{o}}\left\langle \left( f_{i}\right) _{\nu }(kg),u(k)\right\rangle _{\sigma}dk. \] Thu \[ \left\vert \left\langle \pi_{\nu_{o}}(g)f_{i},u\right\rangle \right\vert ^{2}\leq\left( \int_{K}a(kg)^{2\operatorname{Re}(\nu-\nu_{o})}dk\right) \left\vert \left\langle \pi_{\nu}(g)f_{i},u\right\rangle \right\vert ^{2}. \] Since $\bar{U}$ is compact there exists a constant $\xi$ and $L>0$ such that \[ \int_{K}a(kg)^{2\operatorname{Re}(\nu-\nu_{o})}dk\leq L\left\Vert g\right\Vert ^{2\xi},\nu\in\bar{U}. \] Thu \[ \left\Vert u\right\Vert _{\nu_{o},s}^{2}\leq L\sum_{i}\int_{G}\left\vert \left\langle \pi_{\nu}(g)f_{i},u\right\rangle \right\vert ^{2}\left\Vert g\right\Vert ^{-2s+2\xi-d_{o}}dg=L\left\Vert u\right\Vert _{\nu,s-\xi}^{2}. \] \end{proof} If $(\mu,Z)$ is a holomorphic family of objects in $H(\mathfrak{g},K)$ based on the complex manifold $X$ then a correspondence $x\longmapsto\lambda_{x}\in Z^{\ast}$ will be called Holomorphic if $x\mapsto\lambda_{x}(v)$ is holomorphic for all $v\in Z$. A holomorphic correspondence $x\mapsto \lambda_{x}$ with $\lambda_{x}\in\left( Z_{x}\right) _{\operatorname{mod }^{\ast}$ is said to be of local uniform moderate growth if for each compact subset $\omega\subset X$ there exists $d_{\omega}$ such that if $x\in\omega$ and $v\in Z$ the \[ \left\vert f_{\lambda_{x},v}(g)\right\vert \leq C_{v}\left\Vert g\right\Vert ^{d_{\omega} \] for $v\in Z,x\in X,g\in G$. \begin{theorem} \label{holextension}Keep the notation above. Let for $\nu\rightarrow \lambda_{\nu}\in\left( I_{\sigma}\right) _{\operatorname{mod}}^{\ast}$ be holomorphic on an open subset $W\subset$ $\left( \mathfrak{a}_{2}\right) _{\mathbb{C}}^{\ast}$ \ and of local uniform moderate growth. Then for each $\nu$, $\lambda_{\nu}$ extends to an element of $\left( I_{\sigma}^{\infty }\right) ^{\prime}$ and the ma \[ \left( \mathfrak{a}_{2}\right) _{\mathbb{C}}^{\ast}\rightarrow\left( I_{\sigma}^{\infty}\right) ^{\prime \] given by $\nu$ maps to the continuous extension of $\lambda_{\nu}$ is weakly holomorphic. \end{theorem} The proof follows the method of the proof of Proposition 11.6.2 in \cite{RRG1-11} to prove a continuous version of the theorem. The holomorphic version will be derived from the continuous version. Let $\nu_{o}\in\left( \mathfrak{a}_{2}\right) _{\mathbb{C}}^{\ast}$ $\ $and let $U\subset W$ be an open neighborhood of $\nu_{o}$ with compact closure in $\left( \mathfrak{a _{2}\right) _{\mathbb{C}}^{\ast}$ then as above there exists $B_{U},s_{U}$ such tha \[ \left\Vert \pi_{\nu}(g)\right\Vert \leq B_{U}\left\Vert g\right\Vert ^{r_{U }. \] Also since the family $\lambda_{\nu}$ is of local uniform moderate growth there exists for each $u\in A_{u}$ such that \[ \overset{}{(\ast)}\left\vert f_{\lambda_{\nu},u}(g)\right\vert \leq A_{u}\left\Vert g\right\Vert ^{m \] for $x\in U$. Set $s\geq\max\left\{ r_{U},m\right\} .$As above, let $f_{1},...,f_{n}$ be an orthonormal basis of a $K$ and $Z(\mathfrak{g )$--invariant subspace of $W$ in $H_{K}$ such that $I_{\sigma}=d\pi_{\nu }\left( U(\mathfrak{g})\right) W$ for $\nu\in U$ (Theorem \ref{loc-finite}). If $v,w\in H$ we have as above \[ \left\langle v,w\right\rangle _{\nu,s}=\sum_{i=1}^{n}\int_{G}\left\langle \pi_{\nu}(g)f_{i},w\right\rangle \left\langle v,\pi_{\nu}(g)f_{i}\right\rangle \left\Vert g\right\Vert ^{-2s-d_{o}}dg. \] This integral converges uniformly in $x\in U$ since there exists $C>0$ such that \[ \left\vert \left\langle \mu_{x}(g)v_{i},w\right\rangle \left\langle v,\mu _{x}(g)v_{i}\right\rangle \right\vert \leq L_{s}\left\Vert g\right\Vert ^{2s}\left\Vert v\right\Vert \left\Vert w\right\Vert \] which also implie \[ \left\Vert v\right\Vert _{\nu,s}^{2}\leq M_{s}\left\Vert v\right\Vert ^{2}. \] Set $H_{\nu,s}$ equal to the Hilbert space completion of $H$ with respect to $\left\langle ...,...\right\rangle _{\nu,s}$ for $x\in U$. Noting that relative to $\left\langle ...,...\right\rangle _{\nu,s}$ the action of $K$ is unitary, so the action of $K$ on $H$ extends to $H_{\nu,s}$. Let $\hat{\pi }_{\nu}(g)=\pi_{\nu}(g^{-1})^{\ast}$ with respect to $\left\langle ...,...\right\rangle $. If $\sigma$ is unitary and if $Lie(A_{1})\subset \ker\rho$ then $\hat{\pi}_{\nu}=\pi_{-\bar{\nu}}$. Also note tha \[ \left\Vert \hat{\pi}_{\nu}(h)u\right\Vert _{\nu,s}^{2}=\sum_{i=1}^{n}\in _{G}\left\vert \left\langle \pi_{\nu}(g)f_{i},\hat{\pi}_{\nu}(h)u\right\rangle \right\vert ^{2}\left\Vert g\right\Vert ^{-2s-d_{o}}dg= \ \[ \sum_{i=1}^{n}\int_{G}\left\vert \left\langle \pi_{\nu}(h^{-1}g)v_{i ,v\right\rangle \right\vert ^{2}\left\Vert g\right\Vert ^{-2s-d_{o} dg=\sum_{i=1}^{n}\int_{G}\left\vert \left\langle \pi_{\nu}(g)v_{i ,v\right\rangle \right\vert ^{2}\left\Vert hg\right\Vert ^{-2s-d_{o}}dg. \] If $h,g\in G$ \[ \left\Vert g\right\Vert =\left\Vert h^{-1}hg\right\Vert \leq\left\Vert h^{-1}\right\Vert \left\Vert hg\right\Vert =\left\Vert h\right\Vert \left\Vert hg\right\Vert \] so \[ \left\Vert hg\right\Vert \geq\left\Vert h\right\Vert ^{-1}\left\Vert g\right\Vert . \] Hence $\left\Vert hg\right\Vert ^{-2s-d_{o}}\leq\left\Vert h\right\Vert ^{2s+d_{o}}\left\Vert g\right\Vert ^{-2s-d_{o}}$. Thu \[ \left\Vert \hat{\pi}_{\nu}(h)v\right\Vert _{1,x}^{2}\leq\left\Vert h\right\Vert ^{2s+d_{o}}\left\Vert v\right\Vert _{1,x}^{2}. \] Using this, it is easily seen that for each $x\in U$, $\hat{\pi}_{\nu}(h)$ extends to a strongly continuous representation of $G$ on $H_{\nu,s}$. I. The $K-C^{\infty}$ vectors of $(\hat{\pi}_{\nu,s},H_{\nu,s})$ are the same as the $G-C^{\infty}$ vectors. To prove this assertion note that if $C$ is the Casimir operator of $G$ corresponding to the invariant form $B$ (see the beginning of section 2). Also set $C_{K}$ equal to the Casimir operator of $K$ corresponding to $B_{|\mathfrak{k}}.$Set $\Delta=C-2C_{K}$. Then elliptic regularity implies that the $C^{\infty}$ vectors of $G$ in $H_{1,x}$ are the completion of $V_{K}=H_{K}=\left( H_{1}\right) _{K}$ with respect to the seminorms $p_{k,x}(v)=\left\Vert d\hat{\pi}_{\nu}(h)(\Delta^{k})v\right\Vert _{1,x}$. One has \[ \Delta^{k}=\sum_{j=0}^{k}(-2)^{j}\binom{k}{j}C^{k-j}C_{K}^{j}. \] If $v\in V$ then \[ \left\Vert d\hat{\mu}_{x}(C)v\right\Vert _{1,x}^{2}=\sum_{i=1}^{n}\in _{G}|\left\langle f_{i},\hat{\pi}_{\nu}(g)d\hat{\pi}_{\nu}((C)v\right\rangle |^{2}\left\Vert g\right\Vert ^{-2s-d_{o}}dg= \ \[ \sum_{i=1}^{n}\int_{G}|\left\langle d\mu_{x}(C)f_{i},\hat{\pi}_{\nu }(h)(g)v\right\rangle |^{2}\left\Vert g\right\Vert ^{-2s-d_{o}}dg. \] Now $d\pi_{\nu}(C)f_{i}=\sum a_{ji}(\nu)f_{j}$ hence $\left\langle d\pi_{\nu }(C)f_{i},\hat{\pi}_{\nu}(g)v\right\rangle =\sum a_{ji}(x)\left\langle f_{j},\widehat{\pi}_{\nu}(g)v\right\rangle .$Hence setting $A=\max_{ij},_{x\in U}\{|a_{ij}(x)|\}$ \[ |\left\langle d\pi_{\nu}(C)f_{i},\widehat{\pi}_{\nu}(g)v\right\rangle |=|\sum_{j}a_{ji}\left\langle f_{j},\widehat{\pi}_{\nu}(g)v\right\rangle |\leq A\sum_{j}\left\vert \left\langle f_{j},\widehat{\pi}_{\nu}(g)v\right\rangle \right\vert \] s \[ \sum_{i}|\left\langle d\pi_{\nu}(C)f_{i},\widehat{\pi}_{\nu}(g)v\right\rangle |^{2}\leq A^{2}\left( \sum_{j}\left\vert \left\langle f_{j},\widehat{\pi }_{\nu}(g)v\right\rangle \right\vert \right) ^{2}\leq \ \[ nA^{2}\sum_{i}|\left\langle v_{i},\widehat{\pi}_{\nu}(g)v\right\rangle |^{2}. \] Thu \[ \left\Vert d\hat{\pi}_{\nu}(C)v\right\Vert _{\nu,s}\leq\sqrt{n}A\left\Vert v\right\Vert _{1,x}. \] Set $B=\sqrt{n}A.$The \[ \left\Vert d\hat{\pi}_{\nu}\left( \Delta^{k}\right) v\right\Vert _{\nu ,s}=\left\Vert \sum_{j=0}^{k}(-2)^{j}\binom{k}{j}d\hat{\pi}_{\nu}\left( C^{k-j}\right) C_{K}^{j}v\right\Vert _{1,x}\leq \ \[ \sum_{j=0}^{k}(2)^{j}\binom{k}{j}B^{k-j}\left\Vert C_{K}^{j}v\right\Vert _{1,x}\leq\sum_{j=0}^{k}(2)^{j}\binom{k}{j}B^{k-j}\left\Vert (1+C_{K )^{j}v\right\Vert _{1,x \] The $K-C^{\infty}$ vectors are the completion of $I_{\sigma}$ using the seminorms $q_{k,x}(v)=\left\Vert (I+C_{K})^{k}v\right\Vert _{1,x}$. This proves I. Set $\mu_{1,x}(g)$ equal to the adjoint of $\hat{\mu}_{x}(g^{-1})$ with respect to $\left\langle ...,...\right\rangle _{1,x}$. Then the space $K$--finite vectors of $\mu_{1,x}$ is $\left( H_{1,x}\right) _{K =H_{K}=V_{K}$ and the corresponding $(\mathfrak{g},K)$--module is the conjugate dual to $V_{K}$ and $d\hat{\mu}_{x}$ which is the same as the action of $d\mu_{x}$. The CW theorem implies that the space of $C^{\infty}$--vectors of $\mu_{1,x}$ is $V$. In particular, if $u\in H_{1,x}$ then the functional $v\longmapsto\left\langle v,u\right\rangle _{1,x}$ is a continuous functional on $V$. Note that if $\mu\in I_{\sigma}^{\ast}$ then for each $\gamma\in\hat{K}$ there exists $w_{\gamma}\in I_{\sigma}(\gamma)$ such that $\mu(v)=\left\langle v,w_{\gamma}\right\rangle $ for $v\in V(\gamma)$. Let $E\gamma$ denote the projection of $V_{K}$ to $V(\gamma)$ corresponding to the direct sum decomposition $V_{K}=\oplus_{\gamma\in\hat{K}}V(\gamma)$. Set $\tau_{\gamma }(\mu)=w_{\gamma}$. $\mu_{\gamma}=\mu\circ E_{\gamma}$. If $v\in I_{\sigma}$ and if $\gamma\in\hat{K}$ and if $\chi_{\gamma}$ is the character of $\gamma$ and $d(\gamma)$ is the dimension of $\gamma$ and i \[ f_{\lambda_{\nu},u,\gamma}(g)=d(\gamma)\int_{K}\chi_{\gamma}(k)f_{\lambda _{x},u}(k^{-1}g)dk \] then 1. and 2. above imply \[ f_{\lambda_{\nu},u,\gamma}(1)=d(\gamma)\int_{K}\chi_{\gamma}(k)f_{\lambda _{x},u}(k^{-1})dk=\lambda_{x}(E_{\gamma}u). \] Also 2. implies that \[ xf_{\lambda_{x}u,\gamma}=f_{\lambda_{\nu},d\pi_{\nu}(u)u,\gamma ,R(k)f_{\lambda_{x},u,\gamma}=f_{\lambda_{x},\pi(k)u,\gamma},u\in U(\mathfrak{g}),k\in K. \] Thus \[ f_{\lambda_{\nu},u,\gamma}=f_{(\lambda_{\nu})_{\gamma},u}. \] Also \[ f_{\left( \lambda_{x}\right) _{\gamma},v}(g)=\left\langle \mu_{x (g)v,\tau_{\gamma}(\lambda_{x})\right\rangle . \] We will now show that the series $\sum\left\Vert \tau_{\gamma}(\lambda_{\nu })\right\Vert _{\nu,s}^{2}$ converges uniformly in $x\in U$. Indeed, the Schur orthogonality relations and the $K$ bi-invariance of the \ norm on $G$ imply that if $v\in V_{K}$ then $(\ast)$ above implies that there exists a constant, $C_{u}$, depending only on $u$ such that for all $x\in U$ \[ \infty>C_{u}\geq\int_{G}|f_{\lambda_{\nu},u}(g)|^{2}\left\Vert g\right\Vert ^{-2s-d_{o}}dg=\sum_{\gamma\in\widehat{K}}\int_{G}|f_{\left( \lambda_{\nu }\right) _{\gamma},u}(g)|^{2}\left\Vert g\right\Vert ^{-2s-d_{o}}dg. \] Henc \[ \infty>\sum C_{f_{i}}>\sum_{i=1}^{n}\sum_{\gamma\in\widehat{K}}\in _{G}|f_{\left( \lambda_{\nu}\right) _{\gamma},f_{i}}(g)|^{2}\left\Vert g\right\Vert ^{-2s-d_{o}}dg= \ \[ \sum_{i=1}^{n}\sum_{\gamma\in\widehat{K}}\int_{G}|\left\langle \pi_{\nu }(g)f_{i},\tau_{\gamma}(\lambda_{\nu})\right\rangle |^{2}\left\Vert g\right\Vert ^{-2s-d_{o}}dg= \ \[ \sum\left\Vert \tau_{\gamma}(\lambda_{x})\right\Vert _{\nu,s}^{2}. \] II. There exist constants $B_{s}$ and $k_{s}$ such that \[ \left\Vert u\right\Vert \leq B\left\Vert (1+C_{K})^{k}u\right\Vert _{\nu _{o},s},u\in I_{\sigma}^{\infty}. \] for each $s\geq s_{U}$. To prove this assertion we note that $I_{\sigma}^{\infty}$ is the space of $K$--$C^{\infty}$ ($=G-C^{\infty}$) vectors for $\hat{\pi}_{\sigma}$ acting on $H$ and every $H_{\nu,s}$ with $\nu\in U$ and $s\geq s_{U}$. Indeed, this is a poinwise theorem that was proved in \cite{RRG1-11} (3),pp. 90-91(in line 7 of p.91 there is a misprint the power of $\left\vert t\right\vert $ the formula on that line should be $1$ not $2$). This implies that the underlying $(\mathfrak{g},K)$ module of each of the $(\hat{\pi},H_{\nu,s})$ is $(d\hat{\pi}_{\nu},I_{\sigma})$. Hence the Casselmann-Wallach globalization of $(d\hat{\pi}_{\nu},I_{\sigma})$ is $(\hat{\pi},H_{\nu,s}^{\infty})$. Sicne it is also $(\hat{\pi},H^{\infty})$, $\left\Vert ...\right\Vert $is a continuous norm on $H_{\nu,s}^{\infty}$ for each $s\geq s_{U}$. This completes the proof of II. III. Let $\xi$ be as in the previous lemma. Assume that $s-\xi\geq\max\left\{ r_{U},m\right\} $. Then there exists $M_{U}$ and $k_{U}$ such tha \[ \left\Vert u\right\Vert \leq M_{U}\left\Vert (1+C_{K})^{k_{U}}u\right\Vert _{\nu,s-\xi},u\in I_{\sigma}^{\infty}. \] This follows from Lemma \ref{keylemma}. Which says that if $u\in I_{\sigma }^{\infty} \[ \left\Vert u\right\Vert _{\nu_{o},s}\leq L\left\Vert u\right\Vert _{\nu,s-\xi }. \] Thus \[ \left\Vert u\right\Vert \leq LM_{U}\left\Vert (1+C_{K})^{k}u\right\Vert _{\nu,s-\xi}. \] Finally we have provedt IV. The extension of $\lambda_{\nu}$ to $I_{\sigma}^{\infty}$ for $\nu\in W$ depends weakly continuously on $\nu$ (that is, if $u\in I_{\sigma}^{\infty}$ then $\nu\longmapsto\lambda_{\nu}(u)$ is continuous). Indeed, II let $\nu_{o}\in W$ and let $U$ be as above, an open neighborhood of $\nu_{o}$ in $W$ with compact closure then Lemma \ref{keylemma} implies that the series \[ (1+C_{K})^{-k_{U}}\tau_{\gamma}(\lambda_{\nu}) \] converges in $H$ uniformly in $\nu\in U$.. We now complete the proof of the theorem. Let $\nu_{o}\in W$ and let $\nu _{1},...,\nu_{m}$ be a basis of $\left( \mathfrak{a}_{2}\right) _{\mathbb{C}}^{\ast}$ such $W$ contains $\nu_{o}+\overline{D}$ with $\overline{D}$ the \ closure of the polydisk $D=\{\sum z_{i}\nu_{i ||z_{i}|<1,i=1,...,m\}.$ It is enough to prove the holomorphy assertion on $D$. If $\nu\in D,$ $\nu-\nu_{o}=\sum x_{i}(\nu)\nu_{i}$. Define $\xi_{\nu}$ for $\nu\in D$ b \[ \xi_{\nu}(u)=\frac{1}{\left( 2\pi i\right) ^{m}}\int_{S^{1}\times S^{1}\times\cdots\times S^{1}}\frac{\lambda_{\nu}(u)dz_{1}\cdots dz_{m} {\prod_{j=1}^{m}z_{j}-x_{j}(\nu)}. \] This integral defines a holomorphic function of $\nu$ on $\nu_{o}+D$ for each $u\in I_{\sigma}^{\infty}$. \ If $u\in I_{\sigma}$ then $\xi_{\nu (u)=\lambda_{\nu}(u).$ Thus $\xi_{\nu}=\lambda_{\nu}$ on $I_{\sigma}^{\infty}$. \section{Application to $C^{\infty}$ Eisenstein series} This section will involve terminology that would take us too far afield to explain completely. Also, only those that would be bored with the explanations would be interested in the results. For details in what is omitted we suggest Langlands \cite{EisenL}. Let $G$ be a real reductive group of inner type. Let $\Gamma$ be a discrete subgroup of $G$ such that $\Gamma\backslash G$ has finite volume. The results of this section will be true for the class of $G$ and $\Gamma$ described in Chapter 1 of Langlands \cite{FuncEisen}. However, we will only consider the subclass of $G=\mathbf{G}_{\mathbb{R}}$ the real points of an algebraic group, $\mathbf{G}$, defined over $\mathbb{Q}$ satisfying one more condition which we will describe later in this paragraph. and $\Gamma$ a subgroup that is of finite index in the points of a $\mathbb{Z}$--form of $\mathbf{G}_{\mathbb{Q}}$ (the $\mathbb{Q}$--points), i.e. an arithmetic subgroup. A cuspidal parabolic subgroup of $G$ is the normalizer $P$ of a parabolic subgroup $\mathbf{P}$ of $\mathbf{G}$ defined over $\mathbb{Q}$. Then $P$ has a $\mathbb{Q}$--Langlands decomposition $P=MAN$ with $N$ the unipotent radical of $P$ and $M$ the intersection of the kernels of $\chi^{2}$ with $\chi:M_{P}\rightarrow\mathbb{R}^{\times}$ a character defined over $\mathbb{Q}$ and $M_{P}$ is a Levi-factor of $P$ that is defined over $\mathbb{Q}$. The other condition is that the \textquotedblleft$A \textquotedblright\ in the Langlands decomposition of $G$ is trivial. Then $\Gamma\cap P\subset MN$ and identifying $M$ with $MN/N$ then $\Gamma _{M}=\left( \Gamma\cap P\right) /\left( \Gamma\cap N\right) $ is an arithmetic subgroup of $M$. Throughout this section $P$ will be a fixed Let $V$ be space of $C^{\infty}$ vectors of a closed, $M$--invariant, irreducible subspace of $L^{2}(\Gamma _{M}\backslash M)$. Let $\sigma$ denote the right regular action of $M$ on $V $. Let $K$ be a maximal compact subgroup of $G$ such that $M\cap K$ is maximal compact in $M$. We consider the smooth representation $(\pi_{\nu ,I_{V}^{\infty})$ where $\nu\in\mathfrak{a}_{\mathbb{C}}^{\ast}$, $\mathfrak{a}=Lie(A)$ and $I_{V}^{\infty}$ is the space of all $C^{\infty}$ functions from $K$ to $V$ such that $f(mk)=\sigma(m)f(k)$ for $m\in K\cap M$ and $k\in K$. If $f\in I_{V}^{\infty}$ define $f_{\nu}(nmak)=a^{\nu+\rho }\sigma(m)f(k)$ for $n\in N,m\in M,a\in A,k\in K$ and $\rho(h)=\frac{1 {2}tr(ad(h)_{|Lie(N)})$ for $h\in\mathfrak{a}$. \ Then since the ambiguity in the expression of an element $g\in G$ as $g=namk,n\in N,a\in A,m\in M,k\in K$ is in $M\cap K$. $f_{\nu}$ is a $C^{\infty}$ map of $G$ to $V$. We define $\pi_{\nu}(g)f(k)=f_{\nu}(kg)$. Endow $I_{V}^{\infty}$ with the $C^{\infty}$ topology so $I_{V}^{\infty}$ is a Fr\'{e}chet space. Note that if we set $\pi(\nu,g)=\pi_{\nu}(g)$ then $(\pi,I_{K}^{\infty})$ is a holomorphic family of objects in $\mathcal{HF}(G)$ based on $\mathfrak{a}_{\mathbb{C}}^{\ast}$. If $f\in I_{V}^{\infty}$ set $\mathbf{f}_{\nu}(nmak)=a^{\nu+\rho}f(k)(m)$ for $n\in N,m\in M,a\in A,k\in K$. Then $\mathbf{f}_{\nu}\in C^{\infty}(\left( \Gamma\cap P\right) \backslash G)$. Conside \[ E(P,f,\nu)(g)=\sum_{\gamma\in\left( \Gamma\cap P\right) \backslash\Gamma }\mathbf{f}_{\nu}(\gamma g). \] This series converges absolutely and uniformly in compacta in the set of all $\nu\in\mathfrak{a}_{\mathbb{C}}^{\ast}$ with Re$\nu(\check{\alpha )>\rho(\check{\alpha})$ for all roots $\alpha$ of $A$ acting on $Lie(N)$. Langlands has shown that if $f$ is in $\left( I_{V}^{\infty}\right) _{K}$ then this series has a meromorphic continuation to all $\nu\in\mathfrak{a _{\mathbb{C}}^{\ast}$. In this section a proof will be given that the meromorphic continuation is true for all $f\in I_{V}^{\infty}$. Note in the set above where the series converges $E(P,f,\nu)$ is an automorphic function. Here, a smooth function, $\varphi,$ on $\Gamma\backslash G$ is called an automorphic function if 1. $\varphi$ is $Z(\mathfrak{g})$--finite and 2. There exists $d$ such that if $u\in U(\mathfrak{g})$ looked upon as a left invariant differential operator then $\left\vert u\varphi(g)\right\vert \leq C_{u}\left\Vert g\right\Vert ^{d}$ for all $g\in G$. Usually the condition that $\varphi$ is right $K$--finite is also included in the definition. \begin{lemma} If $g\in G,f\in I_{V}^{\infty}$ then in the range of convergence \[ E(P,\pi_{\nu}(g)f,\nu)=\pi_{\Gamma}(g)E(P,f,\nu). \] Here $\pi_{\Gamma}$ is the right regular representation of $G$ on $\Gamma\backslash G$. \end{lemma} \begin{proof} This follows from \[ \mathbf{f}_{\nu}(g)=f_{\nu}(g)(e) \] with $e$ the identity element of $G$ hence of $M$. \end{proof} If $f\in\left( I_{V}^{\infty}\right) _{K}$ and $\nu_{o}\in\mathfrak{a _{\mathbb{C}}^{\ast}$ then there exists an open neighborhood of $\nu_{o}$, $U $, in $\mathfrak{a}_{\mathbb{C}}^{\ast}$ and $\alpha$ a non-zero holomorphic function on $U$ such that $\nu\mapsto\alpha(\nu)E(P,f,\nu)(g)$ is holomorphic. Let $\mathcal{S}(f,\nu_{o})$ be the set of pairs $(U,\alpha)$ with $U$ in $\mathfrak{a}_{\mathbb{C}}^{\ast}$ and $\alpha$ a non-zero holomorphic function on $U$ such that \[ \nu\mapsto\alpha(\nu)E(P,f,\nu)(g) \] is holomorphic on $U$. If $W$ is an open subset of $\mathfrak{a}_{\mathbb{C }^{\ast}$ with compact closure then there exists a finite subset $F_{W \subset\hat{K}$ such that \[ d\pi_{\nu}(U(\mathfrak{g}_{\mathbb{C}}))\left( \sum_{\gamma\in F_{W} I_{V}^{\infty}(\gamma)\right) =\left( I_{V}^{\infty}\right) _{K \] for $\nu\in W$ (Theorem \ref{loc-finite}). Let $f_{1},...,f_{m}$ be a basis of $\sum_{\gamma\in F_{W}}I_{V}^{\infty}(\gamma)$ then if $\nu_{o}\in W$ and $(U_{i},\alpha_{i})\in\mathcal{S}(f_{i},\nu_{o})$ then if $\beta=\alpha _{1}\cdots\alpha_{m}$, $Z=U_{1}\cap\cdots\cap U_{m}\cap W$ then $\nu \mapsto\beta(\nu)E(P,f,\nu)(g)$ is holomorphic in $\nu\in Z$ for all $g\in G$ and $f\in\left( I_{V}^{\infty}\right) _{K}$. \begin{proposition} Let $Z$ be open in $\mathfrak{a}_{\mathbb{C}}^{\ast}$ with compact closure such that there exists $\beta$ holomorphic on $Z$ and continuous in the closure of $\ Z$ such that $\nu\mapsto\beta(\nu)E(P,f,\nu)(g)$ is holomorphic on $Z$ for all $g\in G$ and $f\in\left( I_{V}^{\infty}\right) _{K}.$ Then there exists $d_{Z}$ such tha \[ \left\vert \beta(\nu)E(P,f,\nu)(g)\right\vert \leq C_{f}\left\Vert g\right\Vert ^{d_{Z}},f\in\left( I_{V}^{\infty}\right) _{K},g\in G. \] \end{proposition} \begin{proof} Lemma 5.1 in \cite{FuncEisen} implies that if the constant terms of $\beta (\nu)E(P,f,\nu)$ relative to $\mathbb{Q}$--rank one parabolic subgroups $P_{i}$ containing $P$ have exponents $a^{\mu_{i,j}(\nu)}$ and if \[ a^{\operatorname{Re}\mu_{ij}(\nu)}\leq C\left\Vert a\right\Vert ^{d_{ij} \] then \[ \left\vert \beta(\nu)E(P,f,\nu)(g)\right\vert \leq C_{1}\left\Vert g\right\Vert ^{\max_{ij}d_{ij}+1 \] for $g\in G$ ($1$ added to the exponent is to dominate the logarithmic term in Langlands' inequality). On the other hand, the main observation in \cite{Const-term} implies that the $\mu_{ij}$ are restrictions of exponents of the $(\mathfrak{g},K)$--module $(\pi_{\nu},\left( I_{V}^{\infty}\right) _{K}) $. This implies that $\left\Vert \mu_{ij}(\nu)\right\Vert $ is bounded by the maximum of the norms of the Harish-Chandra parameters of $(\pi_{\nu },\left( I_{V}^{\infty}\right) _{K})$ (here the norms are with respect to the Hermitian extension of the inner product $-B(X,\theta Y)$ on $\mathfrak{g}$). Thus since the closure of $Z$ is compact there exists $s$ such that $a^{\operatorname{Re}\mu_{ij}(\nu)}\leq C\left\Vert a\right\Vert ^{s}$ for $\nu\in Z$. Take $d_{Z}=s+1$. \end{proof} We are now ready to prove \begin{theorem} If $f\in I_{V}^{\infty}$ then $E(P,f,\nu)(g)$ has a meromorphic continuation to $\mathfrak{a}_{\mathbb{C}}^{\ast}$. \end{theorem} \begin{proof} Let $\nu_{o}\in\mathfrak{a}_{\mathbb{C}}^{\ast}$ and let $Z$ be an open neighborhood of $\nu_{o}$ with compact closure such that there exists $\beta$ and $d_{Z}$ as above. If $f\in\left( I_{V}^{\infty}\right) _{K}$ define $\lambda_{\nu}(f)=\beta(\nu)E(P,f,\nu)(e)$. Then $\lambda_{v}\in\left( I_{V}^{\infty}\right) _{K}^{\ast}$ and if we set $f_{\lambda_{v},f (g)=\beta(\nu)E(P,f,\nu)(g)$ then the above lemma shows that $\nu \rightarrow\lambda_{\nu}$ is of uniform moderate growth on $Z$ hence satisfies the hypotheses of Theorem \ref{holextension} which implies that the extension of $\lambda_{\nu}$ to $I_{V}^{\infty}$ is weakly holomorphic in $\nu$. Since $\nu_{o}$ is arbitrary in $\mathfrak{a}_{\mathbb{C}}^{\ast}$ this completes the proof. \end{proof}
\section{Introduction}% \label{Sec:Intro} Learning is an intrinsic human ability. We learn both from our own experience and from our peers. However, learning is not just about improving performance or assimilating new knowledge. It is also about analyzing new situations, understanding different perspectives, using knowledge to find commonalities between distinct situations, discussing, and even become competent at solving conflicts. Social learning, whereby we learn with and from our peers, teachers, parents and others, plays a fundamental role in most of these broad forms of learning \cite{piaget2013play}. It is not surprising then that the educational environment stimulates social collaboration between peers during learning. Collaborative learning has been associated with improving attitudes towards school, fostering achievement, developing thinking skills, promoting interpersonal and intergroup relations \cite{blumenfeld1996learning}. However, as technology evolves, so do learning paradigms. Currently, technology offers novel learning tools that complement the classical learning paradigms. Massive open online courses (MOOCs) \cite{li2014watching} and intelligent tutoring systems (ITS) \cite{nwana1990overview} are just two illustrative examples of new learning tools that are available through technology. Another change in the teaching and learning paradigm comes from serious games \cite{ritterfeld2009book}. Serious games are designed for a purpose other than pure entertainment. They have been around since at least the 1950s, and their applications in education are well-documented \cite{degloria2014serious}\footnote{Interestingly, research suggests that while serious games may be more effective in terms of learning, they are not always more motivating than conventional instruction methods \cite{wouters2013meta}.}. Collaborative serious games, in particular, combine the advantages of serious games with social learning, and some studies have suggested that they support learners in articulating the knowledge that would otherwise have remained intuitive \cite{van2011learning}. Although some researchers questioned the effectiveness of collaborative serious games, research in this area is still scarce and often ambiguous \cite{wouters2013meta}. In this paper, we describe the use of a {\em robotic tutor in the context of a collaborative serious game}. In particular, the research described herein seeks to combine the positive aspects of intelligent and peer tutoring, such as personalization and adaptation to the learner, with collaborative serious games, such as social learning and gamification. This offers a new role for robots as technological tools in education. Previous studies have explored the use of artificial robotic tutors and peers in both classroom environments \cite{kanda2004interactive,tanaka2007socialization, miyake2012robot} and as entertainment partners \cite{michalowski2007dancing}. However, such use is often limited to one-robot-one-user interactions, which significantly limits the social component of learning. By adopting a collaborative serious game as the interaction domain, we move from such typical one-robot-one-user interaction to a much richer scenario that involves one robot and two users, thus, a group interaction. In addition, some studies have investigated the effect of long-term interactions between children and robots regarding the quality of the relationship \cite{westlund2018measuring}, and other variables \cite{leite2013social}; however, few studies have looked at the impact of long-term interactions and their effects on learning gains, which is also a contribution of this paper. Our ambitious application scenario poses several technological challenges, particularly in endowing the robot with a behavior that is both socially plausible and able to successfully accomplish the pedagogical goals of the activity. Our robotic tutor must be both socially competent and successful in teaching. It should also be able to perceive the difficulties faced by the students, not only from their explicit behavior but more importantly from their implicit behavior. It should be able to understand their individual affective state and the ``emotional climate'' between them to intervene in a way that is adequate. In other words, a robot should be able to {\em empathize} with the human users, individually and as a group. A recent survey discussed the importance of empathy for an artificial agent (robot or virtual) that interacts with humans \cite{paiva2017empathy}. In the context of education, the empathy of the teacher towards the students was also shown to impact the learning process and outcomes \cite{feshbach2009empathy}. In a meta-analysis conducted by \citeN{cornelius2007learner}, empathy was one of the variables that if present in teachers is associated with positive students outcomes. In a subsequent meta-analysis conducted by \citeN{roorda2011influence}, empathy was included as one of the variables in the teacher-student's relationship that is associated with their engagement and achievements in school. This demonstrates the importance of empathy in tutor-student relationships and how it influences students' educational outcomes. However, few studies have measured this impact on learning outcomes. This paper describes an autonomous and empathic robot tutor that interacts with multiple learners via collaborative serious game and investigates the impact, both immediate and long-term, of the robot on the student's learning performance. Two field studies were performed, leading to a deeper understanding of empathy in learning and the long-term effects of having an autonomous robot in school for educational purposes. \subsection{Contributions} The work presented herein was developed in the context of the {{EMOTE}}{} project\footnote{{EMOTE project: \url{http://www.emote-project.eu}}, which stands for EMbOdied Perceptive Tutors for Empathy-based learning project.}. We investigated the use of an {\em autonomous and empathic robot tutor for} \emph{collaborative group learning}. We explored the impact of a robot interacting and teaching groups of students in their classroom in relation to learning gains. The contributions of this paper include the following: \begin{enumerate} \item We conducted a short-term evaluation study to investigate the immediate impact of the empathic robot in fostering collaborative learning. \item We conducted a long-term term study to investigate the long-term impact of the empathic robot in terms of learning. \item We deployed an autonomous robot in the context of real-world classrooms for group learning. \end{enumerate} The road-map of this work starts with section \ref{ch:state_art} presenting the state of the art regarding robots in education, groups of humans and robots, and empathy in social robots; section \ref{ch:collaborative_learning_activity} details on the collaborative learning activity, including the learning goals and the game-play dynamics; section \ref{ch:robot_tutor_behavior} refers to the development of the educational and social behaviors for the robotic tutor; section \ref{ch:method} explains the study method, hypothesis, measures, and materials used; section \ref{ch:short_term_study} describes the short-term study and Section \ref{ch:long_term_study} the long-term study; section \ref{ch:conclusion} presents the general discussion and conclusion, including limitations and future work. \subsection{Our previous work} This paper focuses on the evaluation of the robotics system with respect to learning gains in students. The details of the design and implementation of the robot are not a main contribution of this paper and can be found in previous publications. In particular, the robot behaviors and the development of the empathy module of the autonomous robot are detailed in \citeN{alves2015ec} and are summarized in section \ref{Subsec:EC} of this paper. The development of the collaborative \ac{AI} that sustains the robot's game-playing and pedagogical decision-making abilities is detailed in \citeN{sequeira2015ai} and is overviewed here in section~\ref{Subsec:GameAI}. The educational dialogue dimensions for collaborative learning designed for the robot are detailed in \citeN{alves2014towards} and summarized in section \ref{Subsec:Hybrid}. Finally, the design, development, and validation of the ``Restricted-perception Wizard-of-Oz'' methodology, which allowed the successful development of the social and educational behaviors of the autonomous robot, are detailed in \citeN{sequeira2016method}, and we summarized the main steps in section~\ref{Subsec:Restricted-woz}\footnote{The source code of all the robot's components is publicly-available and can be retrieved at: \url{https://github.com/emote-project/Scenario2}. Further details on each component can be found in the ``Downloads / Components'' and ``Publications / Deliverables'' sections of the project's website at: \url{http://www.emote-project.eu/}.}. \section{State of the art} \label{ch:state_art} The experiences we have during our childhood shape to some extent the way we think, grow, feel, and behave. It is thus important to surround children with nurturing and safe learning environments. The way children learn, however, is being transformed with new technologies for education, such as computers and tablets, that are enhanced with serious games \cite{savage1990conceptual} or computer-supported learning activities, to foster learning acquisitions. Robots in particular hold promise to facilitate learning outcomes and promote enjoyment during learning \cite{kennedy2015comparing}. Recent events, such as the R4L (or Robots 4 Learning) series of workshops\footnote{The workshops and special issue can be found in \url{https://r4l.epfl.ch/}.} are an example of the interest that this area is capturing in research and the potential that robots have in education. In this paper, we present research that advances the state of the art in the area of social and empathic robots for education, in particular for collaborative group learning scenarios. Thus, we now provide an overview of these areas to contextualize the contributions of the paper. \subsection{Robots in education} Educational robots are a subset of educational technologies in which robots are used as platforms or tools for students' learning, usually in subjects such as maths, problem solving, chemistry, etc. The use of robots as a medium to learn and understand curricular subjects started in the 60s with Papert's work in which he introduced the concept of ``robots as manipulatives'' (or physical objects) that are specifically designed to foster learning \cite{papert1980mindstorms}. An example is the LEGO Mindstorms\textregistered, which are used to teach STEAM-related curricular topics, providing a new tool for education \cite{hendler2000robots, khine2017robotics}. Furthermore, as robot technology matures, robots can be used as social actors in a classroom as a way to deliver educational content, instruct, foster discussion, challenge, scaffold, and support the learning of children in a social-intelligent manner. In fact, reviews on the applicability and potential of robots in education shows that robots are being developed for children across different learning domains \cite{mubin2013review, belpaeme2018social}. Despite the potential of robots in learning, a systematic review has shown that to have an impact on learning gains, they need to be skilfully used by teachers to attend to the students' needs. Otherwise, learning gains are not visible \cite{spolaor2017robotics}. There is investment in the field of \ac{HRI} to develop robots that are used for learning. Pioneering research by \citeN{kanda2004interactive} features ROBOVIE, a robot for teaching English to Japanese children in an elementary school context. This was one of the first field studies in educational \ac{HRI}, conducted over a period of 18 consecutive days in a school. The results showed that children who exhibited a lot of interest during the starting phase had a significantly elevated English score, and the robot indeed acted as a motivational factor for learning in these cases. In South Korea, the IROBI robot was also endowed with didactic content to support young children with learning English as a second language \cite{han2008comparative}. The robot was placed in a class with very young children over a long period of time. In the same application domain, the EU H2020 L2TOR project\footnote{L2TOR project: {\protect\url{http://www.l2tor.eu/}}.} aims to study if robots can be used as tutors to support teaching preschool children a second language \cite{kennedy2016social}. A review of the applicability of robots for second language acquisition was performed by \citeN{chang2010exploring} in which they have characterized the existing robots used and the instructional media explored for this type of task. Other projects with robots for children have dedicated attention to the investigation of robots as tools for learning and supporting positive interactions, such as the Socially Assistive Robotics, an NSF Expedition in Computing project\footnote{Socially Assistive Robotics, an NSF Expedition in Computing project: {\protect\url{https://robotshelpingkids.yale.edu/}}.}. Robots have also been used to support handwriting abilities using the paradigm of ``learning-by-teaching'' \cite{frager1970learning} in which children act as tutors of the robot, providing it with feedback for a better writing performance. This paradigm is known to benefit children's self-esteem, provide practice with hand-writing without noticing, and provide engagement in a so-called ``prot\'{e}g\'{e} effect'', which is a sense of responsibility over the robot's performance (since they are instructed to be the robot's teachers) \cite{chase2009teachable}. For example, \citeN{tanaka2012children} conducted a 6-day field trial with young students and a robot in school, and the results showed that a robot can help children efficiently learn new English verbs, when children give instructions to the robot. Additionally, projects such as the Co-writer project\footnote{Co-writer project: \protect\url{http://chili.epfl.ch/cowriter}.}, have studied the role of students as teachers of the robot. A study in the scope of the Co-writer project was conducted in school in which a group of children gathered around the NAO robot to provide feedback on its mistakes as the robot improved according to children's feedback \cite{lemaignan2016learning}. While providing feedback to the robot, children are put into small groups who are responsible for teaching the robot to write better. In a study in which the NAO robot acted as a student that needed to learn how to write and the children served as teachers who helped it write better, results showed high levels of commitment and engagement from children embracing this task \cite{hood2015children}. This demonstrated the promising results of using this educational system. Another study investigated interpersonal distancing of children both towards a human adult or a robot facilitator within a collaborative activity \cite{chandra2015can}. The scenario involved two children performing a collaborative learning activity following a learning-by-teaching approach, which included writing a word/letter on a tactile tablet. The study showed that children felt more responsible and provided more corrective feedback when the robot was present than when a human mediator was present (replacing the robot). This suggests that the role a robot can play can have an impact in the type of interactions that emerge, particularly corrective feedback. Beyond the typical curricular activities, social robots are also being used for social and emotional learning. The research by \citeN{jimenez2014effect} described a study in which the behavior of a robot prompts constructive interaction with a learner when compared with two students learning the same task. The types of prompts and interactions built into the robot as it learns together with the children lead to better performance of the robotic condition. Another study focused on fostering children to develop a growing mindset as part of social and emotional training \cite{park2017growing}. Therefore, in a scenario featuring a child playing puzzle games with a robot, a fully autonomous robot was built with the capability to exhibit ``behaviors suggestive of it having either a growth mindset or a neutral mindset'' \cite{park2017growing}. The results of a study that compared two types of robots in the same scenario have shown that children who played with a growth mindset robot self-reported having a stronger growth mindset and tried harder during the task. In a long-term study, \citeN{serholt2018breakdowns} investigated interaction breakdowns between children and a robot in a learning task. In this individual learning scenario, breakdowns in the interaction were associated with ``the robot's inability to evoke initial engagement and identify misunderstandings, confusing scaffolding, lack of consistency and fairness, and controller problems.'' In another long-term study in which a robot acted as an agent for learning, \citeN{jones2018adaptive} concluded that if a robot provides personalized and adapted scaffolding to students based on their learning, they can better regulate their own learning \cite{jones2017know}. Furthermore, in a study of two consecutive weeks in a school, a peer-robot that exhibited behavioural personalization was found to have a positive influence on learning when interacting with children, compared to a robot that exhibited non-personalization. Personalization of the robot was defined in terms of non-verbal behaviour, linguistic content, and performance alignment. Specifically, the results from this study showed that children exhibited significantly increased learning only in the novel learning task in the personalized condition \cite{baxter2017robot}. Although these three scenarios present themselves as extremely rich and challenging for social learning, especially because a robot was deployed in school for long-term educational gains, they were built for one-robot-one-student interactions. This paper goes beyond the current state of the art by exploring collaboration in a group context using a robot designed to support learning. In addition, we evaluated the learning gains, an aspect rarely measured in studies that use robots for education. In fact, usually studies evaluate other variables, such as likability and engagement between children and robots. \subsection{Groups of humans and robots} As mentioned, the majority of the application scenarios developed thus far to study humans and robots are designed for one-on-one interactions in which one robot interacts with one person. Even in scenarios in which the robot is placed in a classroom with many children, the type of interactions often designed consider one-on-one interactions, e.g., \citeN{belpaeme2018guidelines}. For this study, we were interested in scenarios using groups of two or three students who can learn together with the support of a social robot. According to \citeN{du2016impact}, dyads and triads are considered groups, with dyads being considered the smallest type of a group if they share common and dependent elements. In the case of our research, dyads of students share the same learning context as part of the group. Groups in \ac{HRI} can be studied according to different perspectives, such as (1) groups of humans interacting with one robot, (2) groups of robots interacting with one human, or (3) groups of humans interacting with groups of robots. In addition to workshops organized regarding this topic \cite{jung2017robots}, relevant studies have been conducted. For example, a study by \citeN{fraune2015rabble} showed that different number of robots (namely, a single robot or a group of robots) and the type of robots (anthropomorphic, zoomorphic, or mechanomorphic), determine the attitudes, emotions, and stereotypes that people hold when interacting with them, with anthropomorphic robots in groups being one of the preferred choices. In a field study at a university, \citeN{fraune2015three} studied how participants respond when robots (individually and in groups) enter their common space. The results showed that although participants reported enjoying interacting with both individual and robots in groups, they interacted more with groups of robots. In addition to this, the characteristics of social robots can affect the interactions. For example, entitative groups of robots (robots designed to look and act similar to each other, such as those that have a similar appearance and a shared goal) compared to single robots, were evaluated more negatively \cite{fraune2017threatening}. In a another study, the frequency for which robots acted as moderators affected the social and task-related features, namely group cohesion and task performance, in multi-party interactions \cite{short2017robot}. These studies show that a robot's behavior in a group should be carefully designed as their behavior and appearance influence interactions. Nonetheless, the perception of robots in groups not only depends on the robots' behaviors but is also influenced by the characteristics of the people. A study conducted by \citeN{correia2018choose} showed that when people only observe robots (before any direct interaction with them), they tend to choose robots that exhibit relationship behaviors (e.g., robots that foster a group climate) over competitive robots (e.g., robots that are more focused in succeeding and wining). However, after a direct interaction, the results seem to change, with participants who were competitive preferring a more competitive robot, and participants who were not as competitive preferring robots with relationship-driven characteristics. This study reflects that membership preferences between groups of humans and groups of robots goes beyond robot's characteristics, extending to the characteristics of each person. In another study regarding group membership, \citeN{sembroski2017he} found that in-group and out-group perception between humans and robots can lead to more conformist behaviors from people, depending on the request type and level of authority. A different study investigated a robot's potential to shape trust in groups of humans, concluding that the robot that exhibited vulnerable behavior (in comparison with a neutral robot) promoted more group engagement and social signs of trust, with people providing more support in times of failure \cite{strohkorb2018ripple}. Furthermore, a study dedicated to the investigation of non-verbal behavior between a robot and multiple people concluded that the gaze of the robot influences people's perception of the motion of the robot and that, in turn, affects the perception of the robot's gaze \cite{vazquez2017towards}. Additionally, when incorporating robots in unstructured social environments, such as in shopping malls or crowded city streets, it is important for the robot to exhibit adequate motion for collision avoidance to navigate fluently between groups of people \cite{mavrogiannis2018social}. Therefore, considering mutual dependency between the behavior of robots and the behavior of the humans is important when designing and evaluating robotic systems aimed to be social in group contexts. In relation to educational contexts and groups, \citeN{strohkorb2015classification} used interactive role-playing to help children improve their emotional intelligence skills. By focusing on finding ways to analyze non-verbal and verbal behavior to detect if a child was high or low in social dominance, the scenario featured groups of children, and the robot helped them in their social relations. Despite being a group scenario, the collaborative nature of the task was not the focus of the work. In fact, according to \citeN{dillenbourg1999you}, collaborative learning pertains to a situation in which particular forms of interaction among people are expected to occur that trigger learning. In robots applied to education, social robots can play roles, such as of a peer (learning together with a group of students); a tutor (teaching a group of students); a facilitator/mediator (mediating the learning interactions and interventions and helping the group to follow productive learning); a supervisor (supervising the work being done by students and providing feedback); or even a friend (supporting the students emotionally) \cite{zaga2015effect, alves2016role, broadbent2018could}. This demonstrates the richness of interactions that can be explored in the educational domain when using robots to foster learning. Although there is a wide variety of work in \ac{HRI} exploring robots as tutors in a classroom context, thus far, the type of activity and interactions established with robots have been fundamentally individual interactions. \subsection{Empathy in social robots} Empathy is an essential ingredient for any successful relationship. When attempting to define empathy, we come across various definitions. Empathy has been related to affective responses towards others (affective empathy) and a cognitive understanding of the emotional state of others (cognitive empathy). \citeN{hoffman2001empathy} brought attention to the processes that underlie empathic responses, defining empathy as the psychological process that leads to feelings that are congruent to the other person's situation more than to one's own. From a more behavioral perspective, \citeN{davis2018empathy} associated empathy with the responses of someone to the experiences of another person. Holistically, \citeN{preston2002empathy} considered empathy as a concept that relates sympathy and emotional contagion. The expression of empathy is foundational with respect to interpersonal relationships and with our ability to communicate. Indeed, it is what connects us emotionally and intellectually. In an educational context, there is a general understanding from teachers that empathy promotes positive interactions, a more supportive classroom climate, and enhances student-centered practices \cite{mcallister2002role}. In a meta-analysis conducted by \citeN{cornelius2007learner}, empathy was one of the variables associated with positive students outcomes when present in teachers. When robots are placed as collaborative partners within a group, features such as their ability to communicate and relate become relevant. Interactions with robots that are more open-ended and involve a high degree of collaboration that must be natural and engaging; thus, empathy needs to be addressed and modeled in those robots \cite{paiva2017empathy}. Recent research has been devoted to the implementation of empathy in robots in diverse application areas, such as in health care with socially assistive robotics \cite{tapus2007emulating}. In these cases, robots are perceived as having more empathy if they provided appropriate answers during a dialogue \cite{riek2010my}. In this line of research, robots that display accurate empathic behaviors enable the perception of a closer relationship with a human \cite{cramer2010effects}. Additionally, robots with empathy were perceived as being friendlier during an entertaining scenario \cite{leite2013influence}. Empathy also plays a role in child-robot interactions. In a study conducted by \citeN{leite2014empathic}, they explored whether a robot with empathic capabilities can influence the perception that children have towards the robot, specifically social presence, engagement and support. Indeed, in a chess game scenario, the robot that displayed empathic behaviors was perceived positively by the children, and the perceived levels of social presence, engagement and support were stable and high during a long-term interaction \cite{leite2014empathic}. This research was important for the study of robots with empathy and children in real-world settings. In a broader view of empathy in robots, \citeN{paiva2018towards} dedicated a book chapter on the creation of more humane machines in which successful interactions between humans and robots is associated with robots that are endowed with emotional processing and responses. Our research goes beyond the current state of the art as it considers how a robot can model empathy in a group setting in a collaborative learning activity. \section{Collaborative Learning about Sustainable Development} \label{ch:collaborative_learning_activity} A well designed scenario for collaborative learning increases the probability that some positive interactions occur, thus leading to learning experiences \cite{dillenbourg1999you}. The design of the scenario for collaborative learning is of utmost importance since the interactions between the members are crucial. As stated before, thus far social robots have been used extensively in domains in which the robot is able to establish one-on-one interactions with the learner, thus supporting problem solving, personalization, feedback and scaffolding. However, in collaborative learning, other elements come into play, such as perspective taking and understanding the consequences of actions. For the scenario in our studies, we used a collaborative multi-player game targeting issues of sustainable energy consumption. This game, which we shall refer to as {{M-Enercities}}{} (for Multi-player Enercities), corresponds to a multi-player, collaborative version of the original game {{Enercities}}{} \cite{knol2011enercities} (see an image of the game's interface in Fig.~\ref{Fig:enercities}). \subsection{Learning goals} The game was adjusted to the current schools' curriculum and was easily integrated into the school activities, allowing for 3 children to play the game, two children and a teacher, or two children and a robot (see Fig~\ref{Fig:scenario} for an overview of the group learning setting). The group of three work together to build a sustainable city, thus learning about sustainable development. This game is in line with Constructivism's basic idea that knowledge and meaning are built during social interaction and cooperation \cite{steffe1995constructivism}. As a collaborative group learning activity, {{M-Enercities}}{} motivates players to discuss and decide together how to build a sustainable city, providing exactly the type of social interaction dynamic to foster communication and cooperation as means to learn about sustainability. In fact, according to scholars, sustainable education is all about having meaningful discussions in which multiple perspectives and trade-offs are exchanged by expressing personal values \cite{fior2010children, antle2014}. In light of how sustainable education should be taught, the {{M-Enercities}}{} game supports learning goals related with factual knowledge about sustainable development, raised awareness for trade-offs and multiple perspectives concerning sustainability, and the role of personal values. These learning goals are elaborated in Table~\ref{tab:measure1}. \begin{table} \caption{Learning goals supported by the collaborative group learning game, {{M-Enercities}}{}.} \label{tab:measure1} \renewcommand{\arraystretch}{2} \begin{tabular}{ L{70pt} L{300pt} } \hline \textbf{Learning goal 1} & \emph{Factual knowledge} about different energy sources\\ \textbf{Learning goal 2} & Raise awareness about \emph{trade-offs} and the existence of multiple and possibly conflicting \emph{perspectives} in relation to sustainable development\\ \textbf{Learning goal 3} & Raise awareness of \emph{personal values} in relation to sustainable development\\ \hline \end{tabular} \end{table} \subsection{Game-play} The game is structured in levels that players need to master to continue their city. For example, to proceed to the second level in the game, players must make the population of the city grow to a certain amount by building residential areas. However, at the same time, if the city runs out of non-renewable resources, players may get into trouble because the city is not sustainable. Additionally, the game-play is based on a turn-taking dynamic where, at each each turn, one player decides what to do and the rest of the group assists in this decision process, discussing how they would like to build their city. In order for them to decide, they have to take into consideration the city indicators and how their actions influence the sustainability of the city. Each decision can have positive and negative effects on the ``environment'', ``economy'' and citizens' ``well-being'', which is indicated by a score for each of these factors. Players can choose among a set of actions that advances the game: \begin{figure*}[!tb] \centering \begin{subfigure}{0.45\columnwidth} \centering \includegraphics[width=\columnwidth]{enercities} \caption{}\label{Fig:enercities} \end{subfigure}\hspace{20pt}% \begin{subfigure}{0.48\columnwidth} \centering \includegraphics[width=\columnwidth]{scenario} \caption{}\label{Fig:scenario} \end{subfigure} \caption{Learning activity used in this study: \subref{Fig:enercities} a screenshot of the {{M-Enercities}}{} game used in the study, which is a multi-player, turn-based, collaborative version of the {{Enercities}}{} game about sustainable development; \subref{Fig:scenario} the learning space shows the interaction of either two students with a robotic tutor or three students playing the {{M-Enercities}}{} game over an interactive touch-table.} \label{Fig:activity} \end{figure*} \begin{description} \item[Making a construction --] Players can build a construction, such as a park, a market, or an industry. The different constructions influence the city indicators differently. Thus, a park positively affects the environmental indicator of the city, an industry positively influences the economy, and a market positively influences the well-being of the citizens. However, at the same time, these constructions can have negative effects on other indicators. Players can also invest in the city's energy by building energy supplying constructions (e.g., windmills) or increase the city's size and thereby the population by constructing more residential areas. \item[Performing an upgrade --] Players can invest in making an upgrade on previously created constructions. They can, e.g., add a recycling facility in an already built industry to upgrade it and improve the environment without wasting additional resources. Depending on the upgrade performed, it can influence different indicators. \item[Applying a policy --] Players can implement new policies in their city, such as implementing an energy education program. Policies are applied in the city-major building as a way to represent how the real world functions. \item[Skipping a turn --] Players can choose to skip a turn for the constructions and policies to come into full effect. When skipping a turn, constructions, upgrades, and policies present in the city augment their effect, e.g., if the players have chosen to build an industry to increase the economy of the city, the city will be richer when more turns have passed. Consider turns passing as time passing (or as a time indicator). Therefore, the more the players skip turns, more benefits over previous constructions, upgrades, or policies will occur. \end{description} To support turn-taking and to make every member of the group participate, there are virtual buttons located at different sides of the table, allowing players to perform different actions in turns. Since each decision can have both positive and negative effects, players must be aware of the trade-offs and the impossibility of creating a perfect city without any sacrifices. After reaching a group decision, the player closer to each button presses it, making a game action on their city. \section{Robotic tutor} \label{ch:robot_tutor_behavior} To fulfill its role as an autonomous empathic tutor in the collaborative {{M-Enercities}}{} game, the behavior of our robot can be seen at two distinct levels: an \emph{activity-related} level and an \emph{social interactive} level. Activity-related behaviors concern the decisions of the robot in the pedagogical activity itself. In our case, it involves all game actions for {{M-Enercities}}{} and the necessary game-play adaptation mechanisms. The social interactive behaviors involve all verbal and non-verbal expressive behaviors of the robot during interactions with the group of students, such as the dialogue management and physical animations. Both types of behaviors are selected based on information about the state of the game and contextual information about the physical environment provided by different audio-visual capture devices. Given the intended empathic nature of the robot, its behavior also depends on the individual and collective affective state of the students. This section overviews the design and implementation of the behavioral components of the robot, including task-specific behaviors, empathic behaviors, adaptation to the students, and behaviors driven by the learning goals. \subsection{Architecture overview} \label{Subsec:Architecture} \begin{figure}[!tb] \centering \includegraphics[width=0.95\textwidth]{architecture} \caption{The overall robot system architecture implemented to autonomously control the robotic tutor during the interaction with the students in our studies. Light-blue arrows denote the robot's actions, dotted orange lines represent communication between the system and the {{M-Enercities}}{} game application.} \label{fig:architecture} \end{figure} The overall architecture supporting the robot used in our studies is depicted in Fig.~\ref{fig:architecture}. The system comprises the following main modules\footnote{Technical details about each component can be found at \href{http://www.emote-project.eu/components}{www.emote-project.eu/components}.}: \begin{description} % \item[Perception --] Module responsible for processing all information from the robot's environment, including information on the student's emotional state, social behavior and actions performed during the learning activity. It comprises three main components: the \emph{User Awareness} component processes the students' state and actions; the \emph{User Actions} component manages the students' {{M-Enercities}}{} game input, providing the robot with the necessary task-related context for the interaction; finally, an \emph{Emotional Climate} component is responsible for detecting group-level emotional state. % \item[Memory --] This module keeps track of past events, and is subdivided in \emph{recent} and \emph{past event} memories. \emph{Recent Event Memory} stores the recent actions of the students in the game, collected directly from the User Actions perception component. Long term interaction, however, requires the robot to track information from previous sessions. For this reason, the information stored in the recent memory is moved to the \emph{Past Event Memory} at the end of each session. % \item[Task Management --] This module manages the execution of the learning activity itself, e.g., starting and ending the activity and specifying which students are interacting. % \item[Student Modeling --] This module is responsible for collecting information regarding the student's performance during the game session, using it to track possible changes in the learning and emotional state of students. Such information is used by the robot in later sessions to address specific learning challenges. % \item[Rapport --] This module regulates the robot's rapport during the interaction with the students. E.g., it adjusts the robot's speech volume to the student's to ensure a smooth communication; it shifts the robot's gaze towards the active speaker to provide a more natural interaction; it interrupts the robot's speech when a student is speaking; and performs back-channeling behaviors after the users' responses. % \item[Game \ac{AI} --] This module manages all the robot's actions in the {{M-Enercities}}{} game. It uses the student's past actions (retrieved from Memory) to learn the strategies being used by them during the activity, and generates possible actions according to the current state of the game. % \item[Hybrid Behavior Controller --] This is the core module controlling the robot's social interaction behavior. It decides which actions the robot should play in the {{M-Enercities}}{} game (informed by the Game \ac{AI}) and also how to structure the dialogue with the students (informed by the Emotional Climate and the other modules). % \end{description} While some of the aforementioned modules are standard in \ac{HRI} domains, some are specific to our scenario, namely in what refers to the interaction with multiple students. Below, we discuss in greater detail the methodological and technological considerations that drove the design of such components. \subsection{Designing the interaction behaviors of the robot}% \label{Subsec:Restricted-woz} As an empathic tutor, the robot should be able to play the game and to interact in a social and empathic manner with the students, raising awareness for personal values when considering sustainability. The robot should do so by setting a good example when choosing its game actions, explaining the reason behind each play in light of its ``personal values'', namely, achieving a balanced development of the city. We note that, in the context of our scenario, no personal values are wrong or right, and the students are not expected to adopt the robot's personal values. Instead, it is simply a means to open up the discussion and raise awareness of others' perspectives, as active participation is a sign of learning in sustainable development education \cite{lave1991situated}. Thefeore, to design the social behavior of the robot, we adopted the restricted-perception \ac{WoZ} methodology detailed in \citeN{sequeira2016method}, which can be summarized in the following steps: \begin{enumerate} % \item We gathered data from mock-up sessions where two students collaboratively interacted with a school teacher playing {{M-Enercities}}{}. The goal was to gain insight in common pedagogical and empathic strategies used by real teachers in our learning activity. % \item Data collected during the mock-ups was used to build the modules responsible for the perception, basic game behavior, and interaction behavior of the robot. % \item We conducted Restricted-Perception \ac{WoZ} studies, in which experts remotely-controlled the robot during the interaction with students in the {{M-Enercities}}{} game. Unlike the standard \ac{WoZ} paradigm in \ac{HRI}, when applying a Restricted-Perception \ac{WoZ} method, the experts controlling the robot have access only to processed observations from the interaction, similar to those which will drive the robot's autonomous behavior. This means that the decision-making of the wizard will be limited to the same perceptions that the autonomous robot will have over the interaction. This paradigm allows the operator to focus on the relevant aspects of the robot's social interaction. % \item Using the data collected during the Restricted-Perception \ac{WoZ} studies, we created the Hybrid Behavior Controller. The controller was built from two key elements: \emph{interaction strategy rules}, in which we encoded expert domain knowledge, e.g., explicit behavior patterns observed during the mock-up sessions and \ac{WoZ} studies; and a \emph{mapping function}, which identifies more complex behavior patterns discovered from the data using a \ac{ML} approach. \end{enumerate} \subsection{Implementing the interaction behaviors of the robot} Although this section describes work that is not a direct contribution of this paper, it is crucial to understand the design and implementation decisions that were taken regarding the behavior of the autonomous robotic tutor used in the studies reported here. In particular, we discuss the core modules that support the robot's social and empathic interaction with multiple students in the context of our learning activity (see Fig.~\ref{fig:architecture}). \subsubsection{Emotional Climate} \label{Subsec:EC} In order for the robot to interact with a group of students in an empathic and emotionally-intelligent way, it is fundamental that it is able to {\em detect} and {\em recognize the emotional state of the group}. Emotional climate is a central element in social group interactions between humans and has been studied in many group contexts. We consider emotional climate to be the valence state of a group-level emotion at a given time. Following the discussion in \citeN{alves2015ec}, in our scenario, the behavioral and emotional state of the students at any given time changes the emotional climate of the group at that time. This means that a positive emotional can be detected from the students expressing positive facial expressions, demonstrating joint attention in the educational task by looking at the table where the interaction takes place, etc. Conversely, a negative emotional is detected whenever students look away from the task and seem distracted or bored, etc. Emotional climate influences the behavior of the robotic tutor by changing the content and the way that certain utterances are performed. For example, if students are taking more time than the usual to decide what to do and a negative emotional climate valence is detected (e.g., boredom), the robot intervenes to maintain engagement by saying: \emph{``what should we do now?''} On the other hand, if a positive emotional climate valence is detected (e.g., engagement), the robot may say: \emph{``we are playing well''} as a positive reinforncement. These constitute examples of empathic behaviors designed for the robot. \subsubsection{Game \ac{AI}} \label{Subsec:GameAI} The Game \ac{AI} module is detailed in \citeN{sequeira2015ai} and ensures that the robot tutor is not only able to play the game competently, but also discusses the impact of each action performed by the group in the construction of a sustainable city. The robot's game-play promotes collaboration within the group and comprises a \emph{game-playing} and a \emph{social} component. The \emph{game playing component} (planner) is designed to accommodate a specific educational strategy, e.g., if the goal is to achieve a ``balanced'' strategy, it favors actions leading to game states where all scores (environment, economy and well-being) are as high and even as possible. It also detects game situations with the potential to provide interesting pedagogical opportunities, e.g., when the level of natural resources is low it suggests game actions that spend fewer resources. The \emph{social component} uses information about recent plays to build a model of the students' game strategies. It allows the robot to intervene during and after the players' actions in the game, e.g., the robot is able to suggest more suitable alternative plays in certain situations and explain the desired effect of such decisions over the city's development. Such game-play model also allow the robot to adapt its own strategy so to follow the perceived group strategy, a fundamental aspect of its game behavior due to the collaborative nature of the activity. For example, if the students are playing in an environmentally-aware fashion, the robot's strategy will also be more environment-friendly. \begin{minipage}{\linewidth} \begin{lstlisting}[caption=Example of a robot behavior.,label=List:BehaviorExample] Category: Strategy Sub-category: Wellbeing Behavior: { <gaze> game-ui <animate> sadness <animate> slow-eye-blink <speech> "Our population is not very happy." <glance> subject-1 <speech> "This worries me." <glance> subject-2 <speech> "What can we do?" <gaze> game-ui } \end{lstlisting} \end{minipage} \subsubsection{Student Modeling} The Student Modeling component in Fig.~\ref{fig:architecture} follows the discussion in \citeN{jones2015empathic}. It provides \emph{task and domain knowledge}, i.e., information both on the learning activity and on the knowledge and skills that the student is expected to acquire. The Student Modeling uses the information from the User Action module to update a high-level description of each student. Such description includes the student's task performance and estimated domain knowledge. Both are stored in the Memory module to be used in a pedagogical manner during the interaction, e.g., the robot can show its support with respect to the users' difficulties, and by summarizing the main results achieved at the end of each learning session. In the long-term study, the students' performance is especially useful to revisit specific tasks within {{M-Enercities}}{} that were completed or not, as well as information about how they were completed. This allows the tutor to ``recall'' previous sessions, highlighting learning gains and discussing specific challenges that the students went through. It also allows the tutor to provide the group with hints on how to address such challenges, thereby adapting to their learning needs. \subsubsection{Hybrid Behavior Controller} \label{Subsec:Hybrid} The interaction behaviors of the robot are governed by the Hybrid Behavior Controller module, whose design and implementation details can be found in \citeN{sequeira2016method}. The controller comprises a set of \emph{interaction strategy rules} and a \emph{mapping function}. The input of the controller is a set of \emph{perceptual features}, namely: facial features, encoding the students' expressive information; auditory features, identifying the active speaker and detecting a set of keywords spoken by the students that are relevant for the learning task; and game-related features, providing information about critical moments of the game, such as when a level changes or some resource of the city becomes scarce. All features are automatically extracted and encoded from raw data captured from microphones, cameras and other sensing devices strategically positioned in the environment. The output of the controller module is a \emph{social interaction behavior}, including all the animations, gaze functions and utterances spoken by the robot during the interaction with the students. The design of the behaviors, as discussed in \citeN{alves2014towards}, was inspired by observed teacher-students interactions during the aforementioned mock-up sessions. In addition to the dialog of the robot, each interaction behavior encodes the non-verbal behavior of the robot that was also inspired in the way real teachers and the students interacted, e.g, by shifting the robot's gaze between the game and the players in order to drive their focus of attention towards relevant aspects of the task. An example of a full behavior definition is specified in Listing~\ref{List:BehaviorExample}, designed to address a situation where the well-being of the city's population in {{M-Enercities}}{} was low\footnote{The list of encoded behaviors can be retrieved from ``Publications / Deliverables'' sections of the project's website at: \url{http://www.emote-project.eu/}.}. The Hybrid Behavior Controller is then comprised of: \begin{figure}[!tb] \centering \includegraphics[width=\textwidth]{ml-based-module} \caption{A depiction of the \ac{ML} procedure involved in creating the robot controller's \emph{Mapping Function}. Adapted from \citeN{sequeira2016method}.} \label{fig:learningMF} \end{figure} \begin{description} % \item [Interaction Strategy Rules --] Correspond to manually-encoded \emph{behavior rules} in the form \texttt{If}-perceptual state-\texttt{Then}-interaction behavior. The idea is that when the features have the values as specified in the rule's \texttt{If} statement, the rule becomes active, which in turn automatically triggers the associated interaction behavior of the robot. A set of rules was defined to encode domain knowledge that is relevant to improve the students' comprehension of the task and to understand their learning progress. Some rules were inspired by pedagogical strategies observed in teachers during the mock-up sessions. We also performed informal interviews with the teachers in order to understand their reasoning process and gather information about interaction dynamics and common strategies used during the several interaction studies. This lead to the design of rules such that whenever the game starts, the robot gives a short tutorial explaining the game rules, and after the game ends a rule is triggered that ``wraps-up'' by summarizing the main achievements and analyzing the group's performance. Other rules encode interaction-management functions, such as announcing the next player or other game-related information. The rationale was that the behaviors in these rules occurred at well-defined moments and in a consistent manner, hence we do not need to learn interaction strategies for such cases. % \item [Mapping Function --] In order to endow the robot with a more robust behavioral repertoire, the hand-designed strategy rules were complemented by interaction strategies discovered using a \ac{ML} technique. In particular, we used \ac{ML} to identify behavioral patterns that are less common and, therefore, harder to explicitly identify by the experts or through observation and annotation. An important aspect of the Restricted-Perception \ac{WoZ} method is that the behavior data from the operator is dependent on the same perceptual features that will drive the behavior of the robot during autonomous interaction \cite{sequeira2016method}. For this reason, such data is particularly amenable to a \ac{ML} analysis. We used the data from these studies to train a classifier that maps perceived situations to the robot's actions, i.e., a model of \emph{which} behaviors should be triggered and \emph{when} to trigger them. The procedure is illustrated in Fig.~\ref{fig:learningMF}. It starts with a \emph{Data Preparation} phase involving the transformation of the collected demonstrations into a data-set of state features-behavior pairs, which are referred to as training instances. The \emph{Training} phase learns a mapping function encoding the observed interaction strategies from the given data-set.% % \footnote{We note that the interaction controller module is agnostic to the \ac{ML} algorithm that is used to learn the Mapping Function. In that regard, standard \ac{ML} classification algorithms may be suitable to learn interaction strategies based on the collected \ac{WoZ} data.} % Specifically, we used a technique based on an associative metric within frequent-pattern mining that is detailed in \citeN{sequeira2010fpm} and in \citeN{sequeira2013assoc}. As illustrated in Fig.~\ref{fig:learningMF}, for each wizard behavior sampled from the log file, the corresponding ``Behavior'' tree is updated according to the perceptual features that were active at that time. This indicates that states where those perceptions are active are an example of \emph{when} to execute the behavior. For all other behaviors, the corresponding ``Not Behavior'' trees are updated, indicating that the features are an example of \emph{when not} to execute them. By the end of training, each ``(Not) Behavior'' tree stores patterns that indicate the perceptual states on which the corresponding behavior should (not) be executed. After having learned the mapping function, the system can choose an appropriate interaction behavior at run-time upon request, given the robot's perceptual state. We note that while the Rules module covers the question regarding when and when not to execute some behavior (the rules were handcrafted to ensure this), the \ac{ML} module had to be designed such that behaviors are not automatically-triggered incorrectly and at the wrong times, which could potentially ``break'' the interaction flow between the robot and the students. % \end{description} \section{Method} \label{ch:method} This section presents the design of the method to meet the proposed goal of this work. \subsection{Hypothesis} \label{Sub:Hypothesis} A few points can be highlighted to frame our studies: teachers with empathy competencies are associated with positive students' outcomes; collaborative learning environments can be more beneficial, depending on the educational topic that is being taught; social robots have been used for children in educational applications, with positive impact on students' engagement during learning. Therefore, we have formulated the following study hypothesis:\\ \noindent% \textbf{Hypothesis 1 -- In a collaborative group learning environment an empathic robot improves students' learning outcomes.} We have performed a between-subjects design study in which an empathic robotic tutor interacts with groups of children in a school classroom, performing a collaborative activity about sustainable development. This was a short-term study in which groups of children performed one session with the robot, distributed randomly across one of the three study conditions: (1) two children learn with an empathic robot, (2) two children learn with a non-empathic robot (3) three children learn without the presence of a robot. We hypothesize that students will have higher learning achievements in the condition in which they perform the learning activity with the empathic robot.\\ \noindent% \textbf{Hypothesis 2 -- In a collaborative learning environment groups of children learn over time with an empathic robot.} This hypothesis concerns a deeper understanding about empathy in robots, as it concerns a long-term study. Thus, we have performed a within-subjects design study in which groups of students interacted with the empathic robot over a period of two months (4 sessions, 1 session every other week), and have evaluated their learning outcomes. The learning content in our research is related with sustainable development curricula, a domain of knowledge that requires group discussions and understanding of others people's opinions and perspectives in order to make sustainable decisions. We hypothesize that learning gains will increase over time. \subsection{Ethical considerations} We developed a robotic tutor that forms a social bond with lower-secondary students in order to promote learning in a personalized way. As \citeN{fridin2014kindergarten} and \citeN{serholt2017case} describe, this entails ethical concerns specially related to long-term interactions. These ethical concerns include attachment to the robot, deception about the robot's abilities, and robot autonomy and authority. Regarding the attachment to the robot, it was explained to all children that participated in the study exactly how long the robotic tutor will be present in their school and when it will be removed, similar to introducing a temporary teacher. We have explained to children the robot's workings and answered any questions about it to avoid deception over the robot's abilities. In relation to the robot's authority, as children are aware of the balance between expertise and authority \cite{alves2016students}, we explained that while the robot is trying to help them to accomplish learning tasks it will not be responsible for grading and does not have the authority to keep them engaged in the task. Moreover, all participants provided written informed consent from their caregivers prior to participation and assented to participate in the study when asked before the starting of each session. The guidelines of the Declaration of Helsinki and the standards of the American Psychological Association were followed. \subsection{Measures} \label{ch:measures} \begin{table} \caption{Learning goals supported by the robotic tutor and by the {{M-Enercities}}{} game, matched with the measurement media used to evaluate sustainable development learning outcomes.} \label{tab:measure2} \renewcommand{\arraystretch}{1.5} \begin{tabular}{ L{110pt} L{180pt} L{60pt} } \textbf{Learning goals in sustainable education} & \textbf{Measurement media} & \textbf{Section}\\\toprule Factual knowledge & Multiple-choice questionnaire & Section~\ref{ch:factual_knowledge}\\ Trade-offs and multiple perspectives & Writing assessments: (1) trade-offs were measured according to the number of options considered to solve a sustainable problem; (2) multiple perspectives were measured according to the number of arguments. & Section~\ref{ch:tradeoffs_perpectives}\\ Personal values & Behavioral analysis about: (1) Scores comments, (2) In-depth discussions (3) Meaningful conversations & Section~\ref{ch:personal_values}\\ \bottomrule \end{tabular} \end{table} We have designed, developed, and evaluated two different assessment media to measure learning goals in sustainable development education. The two assessement media used were \emph{writing assignments} and \emph{behavioral analysis}. Their full description is described below and sumarized in Table~\ref{tab:measure2}\footnote{All writing assignments used in the work are made available online on Deliverable 7.2 of the {{EMOTE}}{} project at \url{http://www.emote-project.eu/publications/deliverables}.}. \subsubsection{Factual knowledge measure} \label{ch:factual_knowledge} A multiple-choice questionnaire was designed as a measure of Factual Knowledge about energy sources. The questions were designed according to the knowledge available in the {{M-Enercities}}{} game by a researcher of the {{EMOTE}}{} project who was also a teacher in school. The multiple-choice questionnaire about sustainability was piloted to determine whether the difficulty level in the pre- and post-tests assignments was appropriate, which would mean no statistical difference between pre- and post-tests scores. The pilot test was performed with $48$ children from grades 4 and 5 (the same age-group as the target students from our main study) and the difficulty level was evaluated based on the percentage of correct answers to each question. Results from the pilot test showed no significant difference between pre-test (\emph{M} = 5.0, SD = 0.16) and the post-test (\emph{M} = 4.9, SD = 0.16), \emph{p} > 0.05, therefore showing a similar level of difficulty. Both pre- and post-tests comprised 12 items each (24 items in total). \subsubsection{Trade-offs and multiple perspectives measure} \label{ch:tradeoffs_perpectives} To test students' ability to understand that there are many different perspectives to debate sustainable development, we created a writing exercise that reflects a sustainable problem in which different stances can be taken. Students were instructed to provide two types of answers: (1) chose one or more solutions to solve the problem, as a measure of Trade-offs; (2) argue for the chosen solution(s) as a measure of Multiple Perspectives. We piloted the exercises with the same $48$ children. Two researchers coded the data and the reliability score (Cohen's kappa) for the number of perspectives mentioned in the argument was .86, denoting a strong agreement between coders. Results from the pilot study indicated no significant differences between the pre- (N = 23, \emph{M} = 0.70, SD = 0.93) and post-test (N = 25, \emph{M} = 0.52, SD = 0.77) sustainable problems, enabling their use as a measure for the study. \subsubsection{Personal values} \label{ch:personal_values} Learning about sustainability is not a straightforward process. According to \citeN{fior2010children}, sustainable development education is not primarily about changing attitudes, instead \emph{``environmental learning in the presence of complexity, uncertainty, risk and necessity} [they argue] \emph{must be accepting of multiple perspectives supportive of meta-learning across perspectives, and detached from the making of decisions in its (and learners') own immediate context''} \cite{fior2010children}. Thus, instead of changing attitudes and behaviors, the learning measures were designed to capture children's awareness of different perspectives and the ever-present trade-offs around sustainability. Furthermore, according to \citeN{antle2014}, sustainability curricula for elementary schools \emph{``often focus on key concepts such as balancing conservation and consumption''} \cite[p. 37]{antle2014}, while ignoring the important role that children's personal values have in learning. They argue that sustainability education for elementary school-aged children should be modeled according to the Emergent Dialogue Model, especially in the area of digital media games such as Youtupia \cite{antle2013youtopia}. The core idea of the Emergent Dialogue Model is that children should be invited to participate in \emph{personally meaningful dialogues} during the game play. In the case of our study, we have used an autonomous robot that interacts with children as a way to foster meaningful dialogues about sustainable development during the game-play of the {{M-Enercities}}. Thus, Personal Values were measured by analyzing the video recording collected during the study for behavioral analysis. Using the dedicated software ELAN v4.8.1 \cite{wittenburg2006elan}, each study session was coded for behavioral analysis using the video recordings of the participants while performing the collaborative group learning activity. We have based our coding scheme on the one created by \citeN{antle2013youtopia}, for the analysis of the Emergent Dialogue Model. We were interested in the analysis of the verbal behavior of the participants during the learning activity to be able to gain insights into their meaningful participation in discussions of personal values as a way to measure learning outcomes. The coding scheme used was the following: \begin{itemize} \item \textbf{Scores comment --} Discussion or comments about the game scores. This category relates to children's comments or observations of the impact of their game actions on the game scores. It is related with an increase or decrease of the scores on any game parameters. An inclusion example would be: \emph{``We are running out of money''}.\\ % \item \textbf{In-depth discussions --} Includes events in which one or more children talk about decisions on what resources and developments to use. An in-depth event involves a sense of the world or individual values, which differs from simple preferences. It must also involve reasoning using those values, typically around trade-offs between human and natural needs. As such, statements like \emph{``I think we should have houses not trees''} is a preference and was not coded. However, statements such as \emph{``No, let's build houses instead of apartments because they use less lumber, and we can make more trees into nature reserves.''} was coded as in-depth discussion because it involves values in the context of reasoning about trade-offs related with sustainability.\\ \item \textbf{Meaningful conversations --} Includes verbal and/or physical disagreement with another's action(s), or utterances related to the sustainability domain. Meaningful conversations require an objection or stance on an issue, and therefore presenting available options or suggestions is not considered. Meaningful conversations may result in resolution, abandonment (unresolved) or unilateral decision-making. Inclusion example: \emph{``I disagree, without industry you cannot progress.''} \end{itemize} \begin{figure}[!tb] \centering \includegraphics[width=0.70\textwidth]{emote-eval-study} \caption{Two students playing the {{M-Enercities}}{} with our autonomous robot in a school classroom.} \label{fig:robot-interaction} \end{figure} \subsection{Materials} The list of materials used in the set-up of both the short-term and long-term studies is listed below. Consider also Fig. \ref{fig:robot-interaction} for a picture of the real set-up. \begin{enumerate} \item NAO torso robot from Aldebaran Robotics; \item Large interactive multi-touch table running the {{M-Enercities}}{}; \item Four video cameras for a full interaction recoding; \item Two lavaliere microphones for voice pitch recognition (no voice recognition was used; additional details can be found in Section \ref{Subsec:Architecture}); \item Voice recorder for behavioral analysis. \end{enumerate} \section{Short-term study} \label{ch:short_term_study} An experimental study was conducted to evaluate the impact of a robot with empathy competencies on students sustainability education outcomes in a collaborative group learning environment. This relates with our Hypothesis~$1$, detailed in Section~\ref{Sub:Hypothesis}. To achieve the proposed goal, the study was designed considering three experimental conditions:\\ \begin{itemize} \item\textbf{Condition $1$} -- Two children interacted with a robotic tutor with empathy competencies while playing the {{M-Enercities}}{} game.\\ \item\textbf{Condition $2$} -- Two children interacted with a robotic tutor without empathy competencies while playing the {{M-Enercities}}{} game.\\ \item \textbf{Condition $3$} -- Three children played the {{M-Enercities}}{} game without the presence of a robotic tutor. \end{itemize} \subsection{Empathic vs. non-empathic robot: impact on behavior} In order to create Conditions~$1$ and $2$, featuring the robot with and without empathic competencies, we have made a choice about which modules should be activated/deactivated. We refer to Section \ref{Subsec:Architecture} for the technical architecture overview of the robotic system. Table~\ref{tab:non-empathic} details which modules from the overall system architecture, depicted in Fig.~\ref{fig:architecture}, are fully or partially (de)activated in each version of the robotic tutor. Despite some modules being deactivated or partially activated when comparing the versions of the robot, it is crucial to note that during the learning activity, the percentage of interventions by the robot toward the students was similar. This was ensured as the behaviors of the robot were designed and developed to be balanced between conditions. In practice, this means that the robot talks and gestures the same amount of time in both empathic and non-empathic versions. Additionally, basic idle behavior, animations, and speech capabilities remain intact; the non-empathic robot will, however, appear less aware of the students. \begin{table}[!tb] \centering \caption{Overview of activation of all the modules in the empathic and non-empathic version of the robotic tutor.}% \label{tab:non-empathic} \begin{tabular}{lll} \multirow{2}{*}{\bf Module} & \multicolumn{2}{c}{\bf Activated} \\ & \bf{Empathic} & \bf{Non-Empathic} \\ \toprule \emph{Rapport} & Yes & Partially \\ \emph{Game-\ac{AI}} & Yes & Yes \\ \emph{Emotional Climate} & Yes & No \\ \emph{Past Event Memory} & Yes & No \\ \emph{Recent Event Memory} & Yes & Yes \\ \emph{Hybrid Behavior Controller} & Yes & Partially \\ \emph{Sustainable learning dialogue} & Yes & Yes \\ \bottomrule \end{tabular} \end{table} As we can see from Table~\ref{tab:non-empathic}, the \emph{Past Event Memory module} is deactivated in the non-empathic condition, which means that the robot is unable to recall previous learning sessions and summarize activities that occurred therein. The rationale is that using memory of other people's past experiences is a way to simulate how they feel in situations similar to those which they are currently facing, which consequently leads to empathic behavior \cite{ciaramelli2013individualized}. Notwithstanding, the robot has the \emph{Recent Event Memory module} activated in both conditions, which means it remembers the performance of students \emph{during} each learning session in both versions. The \emph{Emotional Climate module} is also deactivated in the non-empathic condition. This module is responsible for perceiving the emotional state of the group of students during the learning activity, an inherent perception for performing empathic behaviors. With this module deactivated in the non-empathic condition, the robot provides more generic suggestions for students during the game that are not related with emotional perceptions. Nonetheless, the \emph{Sustainable Learning Dialogue module} is activated in both empathic and non-empathic conditions and is responsible for ensuring that the robot performs similar dialogues about sustainable learning in both of the study conditions. The \emph{Rapport module} is partially deactivated in the non-empathic condition, meaning that some contingent behaviors are still activated, but not all of them. An example that can illustrate the impact on the behavior of the robot concerns gaze, an important social signal \cite{emery2000eyes}. In the empathic condition, the robot moves his eye-gaze to the student currently speaking by accurately locating the student using the sound coming from the microphone (each student is using a microphone, as can be seen in Fig. \ref{fig:robot-interaction}, in order for the robot to accurately follow the student, however, no speech recognition system is used). In the non-empathic condition, the robot still looks at the student who is speaking, but uses predefined coordinates of the students' locations in front of the table. This means that subtle changes in the students' locations, especially of their faces, are not tracked by the robot, resulting in a less context-aware and contingency behavior towards the students. However, it is important to note that this does not translate a random gaze behavior \cite{park2017telling}, but a less precise gaze orientation that does not lead to drastic effects on the perception of the robot between conditions. Another feature of the Rapport module that is deactivated in the non-empathic condition concerns the voice volume and pitch of the robot not being adjusted to the perceived volume and pitch of the students' voices, contrarily to what occurs in the empathic condition. As these adjustments are related with empathy behaviors \cite{imel2014association}, the characteristics of the robot's voice are kept constant in the non-empathic version. As for the \emph{Hybrid Behavior Controller module}, only the Interaction Strategy Rules are active for the non-empathic version, which means that there are no behaviors being triggered by the Mapping Function. Although this part of the controller does not necessarily lead to empathic behavior, we note that it is the result of applying a \ac{ML} algorithm aimed at discovering more subtle interaction strategies used by the wizard in the Restricted-Perception \ac{WoZ}, which cannot be hand-crafted and put in the Interaction Strategy Rules list. Notwithstanding, this does not mean that the robot will intervene inappropriately and/or at the wrong times, as all behavior is still controlled by manually encoded rules. Thus, the robot was kept as a knowledgeable and informative interlocutor in all study conditions, as previous studies have shown that children can easily distinguish between reliable robots as information sources \cite{breazeal2016young}. Overall, the deactivated modules concern perceptions of the cognitive and emotional states of the students. Notwithstanding, the social and pedagogical behaviors are similar in both study conditions, with the robot having similar frequency of interventions. This ensured the social and intelligent tutoring autonomous behavior of the robot. \subsection{Sample} A total of $63$ children ($M=13.74$, $\mathrm{SD}=0.73$, $25$ female) participated in this study. Participants were grouped by their school teachers according to groups of students they knew worked well together in a learning context, and were randomly assigned across study conditions. Therefore, $22$ participants interacted with the empathic robotic tutor, in a total of $11$ learning sessions consisting each of $2$ children and $1$ robot; $20$ participants interacted with a non-empathic robotic tutor, in a total of $10$ learning sessions consisting each of $2$ children and $1$ robot; $21$ participants were allocated in the condition with no robot, in a total of $7$ learning sessions consisting of $3$ children. Two researchers were responsible for the study in the school: a psychologist that interacted with the participants and acted as a leading researcher, and a computer scientist that was responsible for the technical equipment. \subsection{Procedure} \label{ch:procedure_st} Each group of students arrived to the designated classroom where the study took place. The leading researcher provided an explanation about the study they would undergo. Participants were invited to fill-in the pre-tests about sustainability explained in section~\ref{ch:measures}. After completing the pre-tests, participants were introduced to the robotic tutor (in case of conditions $1$ and $2$) and to the {{M-Enercities}}{} game, while they performed an initial trial round of the game to have a hands-on experience with the activity. When the trial round of the game was over, the researcher left the room, leaving the participants performing the learning activity with the robot (in case of conditions 1 and 2) or by themselves (in case of condition 3). Although the students were left alone in the classroom performing the learning activity, they had permanent indirect supervision by both researchers. This was ensured since the classroom had a large window to an external room, which allowed to monitor the progress and at the same time providing privacy to their learning process. Furthermore, this set-up enabled participants to reach out to the researcher to ask for help, e.g., if technical problems with the learning activity or with the robot occurred. Finally, when the learning activity was over, the researcher entered the room and closed the learning activity application, thus ending the activity. Participants were able to say goodbye to the robot and afterwards were invited to fill-in the post-tests about sustainability knowledge. At the end, some time was given to discuss their experience during the study, providing an open space for children to ask questions or share thoughts. Each session had a duration of $1$ hour, in which $30$ minutes were allocated to the activity of playing the {{M-Enercities}}{} game, and the remaining $30$ minutes were dedicated to pre- and post-tests. \subsection{Results} We present the learning gains for the different measures used about sustainable education. \subsubsection{Factual knowledge} We compared the results from the pre- and post-tests across the $3$ study conditions to compare the learning outcomes in the participants' factual knowledge about sustainable learning. According to the Mixed-ANOVA test, there was no significant difference between the study conditions for learning outcomes on factual knowledge about sustainable education, $F\left(2,59\right)=0.586$, $p=0.560$. The means for the pre-test result were the following: $M=9.29$, $\mathrm{SD}=1.42$; $M=9.20$, $\mathrm{SD}=1.06$; $M=9.33$, $\mathrm{SD}=1.02$, corresponding to the interaction with the empathic robot, non-empathic robot, and no-robot conditions, respectively. While the means for the post-tests were the following: $M=7.90$, $\mathrm{SD}=1.67$; $M=8.30$, $\mathrm{SD}=1.46$; $M=8.38$, $\mathrm{SD}=1.24$, corresponding to the interaction with the empathic robot, non-empathic robot, and no-robot conditions, respectively. \subsubsection{Trade-offs and multiple perspectives} The assessment of participants' understanding of trade-offs and perspectives was performed, as illustrated in Table ~\ref{tab:measure2}. \paragraph*{Trade-offs (or number of solutions)} We ran a Mixed-ANOVA test to analyze if there were differences in the number of solutions chosen by the participants across the $3$ study conditions to solve the sustainable exercise problems. We took into account their performance in the pre-test compared to their performance in the post-test and the condition they were allocated in. Results showed no significant differences across conditions when comparing the results from the pre- and post-tests, $F\left(2,60\right)=1.726, \emph{p}=0.187$. \paragraph*{Multiple perspectives (or number of arguments)} The number of arguments mentioned by the participants to justify their solutions was the measure for the multiple perspectives in solving a sustainable problem. Results show that the number of arguments did not change significantly, $F\left(2,493\right)=0.925$, $p=0.402$, when participants learned with the empathic robotic tutor compared to the other study conditions ($M=1.05$, $\mathrm{SD}=0.19$; $M=1.00$, $\mathrm{SD}=0.20$, for pre- and post-tests, respectively). \subsubsection{Personal values} We performed verbal behavior analysis across the $3$ study conditions to measure personal values, considering \textit{scores comment}, \textit{in-depth discussions}, and \textit{meaningful conversations} (see coding scheme in Section~\ref{ch:personal_values} for more details). When running a Chi-squared test, we can see that there is a statistically significant association between the conditions of the study and how children exchanged personal values about sustainability, $\chi^{2}\left(4\right)=9.375$, $p=0.05$, with the strength of the relationship with Cram\'{e}r's V being $\phi_{c}=0.109$ revealing a medium effect. We performed a post-hoc test to analyze contingency tables to understand in which study conditions personal values exchanges were statistically significant \cite{beasley1995multiple}. \paragraph*{Scores comment} We found that in the empathic robotic tutor condition participants commented on scores statistically less comparing to the other study conditions, $p=0.01$. Thus, participants commented less on the scores when in the condition with the empathic robotic tutor ($64.52\%$), compared to the condition with the non-empathic robotic tutor ($77.97\%$) and with the no-robot condition ($75.00\%$), as illustrated in Fig.~\ref{Fig:scores_short}. The abovementioned results are significant for $p=0.016$, according to the procedure of residual analysis. \paragraph*{In-depth discussions} No significant result was found for in-depth discussions between study conditions, \emph{p} > 0.05. \paragraph*{Meaningful conversations} By using the adjusted standardized residuals method of analysis \cite{garcia2003cellwise}, we discovered significant differences in meaningful conversations between study conditions. Therefore, when children learned with the empathic robotic tutor more meaningful conversations emerged ($25.16\%$, $p=0.013$), followed by the no-robot condition ($18.33\%$, $p=0.012$), and the least meaningful discussion occurred when children learned with the non-empathic robotic tutor ($11.86\%$, $p=0.016$) (see Fig.~\ref{Fig:meaningful_short}). \begin{figure*}[!tb] \centering \begin{subfigure}{0.48\columnwidth} \centering \includegraphics[width=\columnwidth]{scores_short} \caption{Score comments}\label{Fig:scores_short} \end{subfigure}\hspace{5pt}% \begin{subfigure}{0.48\columnwidth} \centering \includegraphics[width=\columnwidth]{meaningful_short} \caption{Meaningful conversations}\label{Fig:meaningful_short} \end{subfigure} \caption{Results for comments and meaningful conversations about sustainable development during the short-term learning activity across the 3 study conditions. Results are presented in frequencies and significant results are represented with the symbol $*$, $p<0.05$.} \label{Fig:st_results2} \end{figure*} \subsection{Discussion} This section discusses the results regarding the learning gains across the $3$ study conditions for this short-term study in a school classroom.\\ \noindent% {\bf Children learned to have meaningful conversations about sustainability and worried less about scores when learning with an empathic robot.} \noindent% Because sustainable development education is about engaging in deep discussions that consider the existence of \emph{``complexity, uncertainty, risk and necessity''} to solve sustainability-related problems \cite{fior2010children}, the results showed that this was successfully accomplished when children learned with a robot with empathy competencies. However, when children interacted with a robot without empathy or without a robot at all, they seemed to be more concerned about passing levels (the traditional way of playing any game), instead of engaging in dialogue about sustainable education. We emphasize that the tutoring behaviors for the empathic robot vs. the non-empathic conditions were the same, i.e., the sustainable learning dialogue that the robots had was similar in both study conditions. This makes the result particularly important since it shows that empathic competencies in a robot impacted the way children engaged in the learning process, partially supporting our first study hypothesis. In fact, engaging in meaningful conversations implies that children share their personal values by objecting or taking a stance that generates discussion about sustainability while playing the game. The empathic robotic tutor fostered and motivated the children to engage in this type of dialogue as a way to increase their knowledge about sustainable education. Future studies should include more in depth analysis of educational interactions, specifically related with the emergence of educational dialogues (e.g., if it is facilitated by the robot or instigated by children themselves).\\ \noindent% {\bf No other impact on sustainable development learning was found.} \noinden Results from the multiple-choice questionnaire on factual knowledge about sustainability did not present significant results. Additionally, the writing exercise in which children were invited to choose solutions to solve a problem related to sustainable development and to argue about their options for solving it, also did not show significant results. The results might be a reflection of the short-term interaction with the robot. In fact, learning takes time \cite{fisher1981teaching}, especially when we consider sustainable education, a challenging curricular topic to teach that is complex to learn \cite{moore2005barriers}. The short-term interaction that students had with the {{M-Enercities}}{} game, which was their learning environment, can also help explain the lack of learning gains. Indeed, {{M-Enercities}}{} enables students to explore the virtual world of the game in an unrestricted way. By providing freedom to open game menus that seem interesting to them according to the game action they want to perform, this can result in students not opening all of the game menus; thus, they may be exposed to only part of the overall knowledge that the game can offer. Therefore, due to the short-term nature of the interaction with the learning environment and with the robotic tutor, children would benefit for more extended period of interaction to be exposed to more learning content. This aspect will be explored in the long-term study described in section \ref{ch:long_term_study}. \section{Long-term study} \label{ch:long_term_study} A descriptive long-term study was conducted in order to investigate the learning outcomes of students that learned in groups with an empathic robotic tutor over an extended period of time in school. To achieve our goal, we have deployed a robot with empathy capabilities for 2 consecutive months in a school setting (4 sessions, 1 session every other week), to teach small groups of students about sustainable education using {{M-Enercities}}{} as the collaborative learning environment. To sustain the achievements of children within these weeks, the robotic tutor would recall leanings and difficulties of previous sessions upon starting each learning session, thus ensuring reflection over previous acquisitions. This study related wit hypothesis number $2$, explained in section \ref{Sub:Hypothesis}. \subsection{Sample} A total of 20 children ($M=13.78$, $\mathrm{SD}=0.65$, $9$ female) participated in the study. Due to technical problems, one session was excluded and the final sample resulted in $18$ children. The results presented for this study exclude the session with technical problems. \subsection{Procedure} Although this was a different study, the procedure is similar to the one present in section~\ref{ch:procedure_st}. We present in this section the variations in the procedure. Thus, participants filled-in tests about sustainable education at three time periods: (1) \emph{baseline}, to measure their initial knowledge on sustainable development before interacting with the robot and with the learning environment; (2) at the \emph{end of the first collaborative session}, to measure learning achievements after one interaction with the robotic tutor, which is typical for many studies in the \ac{HRI} field; (3) at the \emph{end of the 2-month period}, to be able to compare learning achievements and understand the learning curve after a long-term interaction with the empathic robotic tutor. Learning sessions were performed once every other week, therefore, two sessions per month in a total of four sessions in two consecutive months. Each session lasted about $30$ minutes with the first and last sessions taking longer as the assessments of sustainable education were applied in these sessions. The session dynamics were organized with the school teachers in order to minimize disturbances in the usual daily activities that children are involved in while in school. \begin{figure*}[!tb] \centering \begin{subfigure}{0.4\columnwidth} \centering \includegraphics[width=\columnwidth]{facts} \caption{}\label{Fig:facts} \end{subfigure}\hspace{20pt} \begin{subfigure}{0.4\columnwidth} \centering \includegraphics[width=\columnwidth]{gameplay} \caption{}\label{Fig:logs} \end{subfigure} \caption{Results of the long-term study: \subref{Fig:facts} factual knowledge achievements; \subref{Fig:facts} actions performed by students in the learning environment across the $4$ learning sessions with the empathic robotic tutor. Results revealed to be significant for the upgrades and skip turns' actions.} \label{Fig:long-term} \end{figure*} \subsection{Results} In this Section we present the results for the long-term study with a robot with empathy in a classroom environment in school. \subsubsection{Factual knowledge} The factual knowledge learning about sustainability was analyzed using the Friedman's test, and students' achievements in sustainability education showed a statistically significant difference over time, $\chi^2\left(2\right)=15.464$, $p<0.001$ with a Kendall W of $.43$ indicating a moderate effect \cite{tomczak2014need}. Post hoc analysis with Wilcoxon signed-rank tests was conducted with a Bonferroni correction applied, revealing a significance difference when comparing the baseline ($M=9.00$, $\mathrm{SD}=1.41$) to the short-term learning results ($M=6.89$, $\mathrm{SD}=1.28$), $Z=-3.344$, $p=0.001$, $r=-0.56$; and when comparing the baseline with the long-term learning results ($M=7.28$, $\mathrm{SD}=1.23$), $Z=-3.084$, $p=0.002$, $r=-0.51$. No other statistical significant result was found, $p>0.05$. From Fig.~\ref{Fig:facts}, we can see that participants' knowledge about sustainability topics started high, and after interacting with the robot in the pedagogical activity it decreased, albeit with a slightly increase in the long-term, possibly showing a tendency to return to the baseline. This result possibly translates normative results in children's learning, in which they question previously-accommodated knowledge about the topics. \subsubsection{Trade-offs and multiple perspectives} Similar to the analysis performed for the short-term evaluation, we evaluated the trade-offs and multiple perspectives about sustainability according to the \emph{number of solutions} proposed to solve a given sustainable dilemma, and the \emph{number of arguments} considered to justify their solutions. We explain the results below. \paragraph*{Trade-offs (or number of solutions)} We analyzed the number of solutions that participants considered possible to solve the given environmental problem. Participants considered more options over time, however this increase was not significant, $\chi^2\left(2\right)=1.125$, $p>0.05$. \paragraph*{Multiple perspectives (or number of arguments)} Although there was a slight increase in the number of perspectives considered by participants, Friedman's test showed that this was not statistically significant, $\chi^2\left(2\right)=3.375$, $p>0.05$. \subsubsection{Personal values} A Repeated Measures ANOVA with a Greenhouse-Geisser correction determined that mean personal values did not differ significantly between the first and the last learning session with the empathic robotic tutor, $F\left(1,1.756\right)=3.530, \emph{p}=0.061$. Since personal values were measured using behavioral analysis of the $4$ learning sessions, we have no baseline result (baseline considers assessments conducted prior to the starting of the intervention). \begin{figure}[!tb] \centering \includegraphics[width=0.7\columnwidth]{memo} \caption{Example of a MemoLine filled out by one of the children and adapted for the context of the present study. Children were asked to use pencils with different colors to express how hard/easy it was for them to (1) play the game (red color signals ``I did not understand what I should do in the game'' and green signals ``I understood what I should do in the game''), (2) and how much the robotic tutor was useful for them in understanding how to play the game (purple signals ``The robotic tutor did not help me understand the game'' and yellow signals ``The robotic tutor helped me understand how to play the game''). The MemoLine should be read in timeline manner. Therefore, the line in the center signals the middle point of the sessions in order to situate children in their assessment. The left side of the line concerns Sessions~1 and 2 and the left side concerns the Sessions~3 and 4.} \label{Fig:memo} \end{figure} \subsubsection{Game-play} The behavior (or actions) of the participants during game-play also served as a measure for analyzing sustainability learning. By using the game logs we were able to extract what actions children performed during the game, representing where they invested and the dynamics of their game-play. The exact McNemar's test showed that participants' actions related with applying policies, $p=1.00$, and performing constructions, $p=0.125$, did not differ statistically between the first and the last session. However, participants performed statistically significantly more constructions' upgrades from the first to the last session, $p<0.001$, as they also skipped more turns (representing passage of time in the game as a way to enjoy from the city resources), $p<0.001$ (see Figure~\ref{Fig:logs}). This means that the proportion of upgrades and skipped turns was higher in the the last session compared with the first learning session. In order to better understand the changes in game-play behavior, we analyzed how helpful the robot was towards a better understanding of how to play {{M-Enercities}}{}. For this, we have used MemoLine, a retrospect evaluation method dedicated to children that asks them to recall previous experiences with a given product or application \cite{vissers2013memoline}. See Fig. ~\ref{Fig:memo} for an example of a MemoLine filled in by a participant. A MemoLine was given to all participants at the end of the long-term study. According to its developers, MemoLine should be evaluated by making comparisons of the areas colored by children in a timeline perspective, in order to extract patterns of use. Our results indicated consistency in responses, as most MemoLines showed that children were slightly confused by the game and did not find the robotic tutor particularly helpful during the initial session. However, as time passed, they have perceived more help from the robotic tutor, and could better understand the game itself revealing a mastery in game-play. This result is representative of the overall sample of the study, since 18 children out of 20 filled the MemoLine in the same way. Taken together, participants' change in the behaviors of the game seem to be in line with their better understanding of the game dynamics, an understanding that was guided by the interaction with the robotic tutor. More importantly, understanding the game requires mastering concepts of sustainable education, which can explain the changes in game-play. \subsection{Discussion} This Section presets the discussion of the learning gains across a long-term study of $4$ sessions distributed over a period of $2$ consecutive months in school.\\ \noindent% {\bf No learning gains were found after children interacted with the empathic robotic tutor for long periods of time.} \noinden The overall results from the long-term study seems to show that although some variations in the learning outcomes of students occurred, those differences were not deemed significant after repeated educational interactions with the empathic robotic tutor. Although research about null results in learning gains with technology use are still scarce, a meta-analysis conducted by \citeN{wouters2013meta} studied factors that impacted learning gains when students used serious games for learning. The authors concluded that more learning occurred if: (1) learning sessions were complemented with other instruction methods, (2) when multiple training sessions were involved, (3) and if learned worked in groups \cite{wouters2013meta}. Althought our study involved multiple learning sessions and occurred in a group educational context, the learning sessions with the robotic tutor were not supplemented with other instruction methods. This deserves further investigation to understand the role of robots in learning contexts and their long-term effects on students' learning gains. Similarly, \citeN{hew2007integrating} discussed factors related with successful technology integration in schools, such as the reconsideration of assessment metrics. The authors refer that \textit{``because curriculum and assessment are closely intertwined, there is a need to either completely reconsider the assessment approaches when technology is integrated into the school curriculum, or consider more carefully how the use of technology can meet the demands of standards-based accountability''}. This suggests that metrics used to measure students' learning gains that account for technology inclusion (e.g., robots) require further investigation to meet curricular goals. In the case of our study, despite the support provided to students, both from the robot and stimulated by the {{M-Enercities}}{}, it did not impacted in a measurable way students' learning in sustainability education present in formal school curriculum. Another explanation for the lack of learning progress is provided by \citeN{gerber2001teacher} and concerns the lack of clearly defined roles of educational aids that can hinder learning gains due to an undefined presence in school. A result presented in a previous publication related with our learning scenario, showed that students assigned the role of a classmate to the robot although being explicitly instructed they would be learning with a robotic tutor \cite{alves2016role}. Therefore, we can be a facing a need to develop precise design guidelines to develop specific roles for robots in the educational sector whose goal is to increase learning outcomes. In addition to this, more research is needed when designing and including robots for education. For example, studies have been showing that the mere physical presence of a robot can lead to learning gains \cite{leyzberg2012physical, kennedy2015robot}, however the variables that affect learning gains are not established yet. Furthermore, the design of robots for education should be tailored to the time required to learn certain curricular concepts, and we hypothesize that sustainable learning can be a case in which more learning time is required. The null results from our long-term study seem to indicate that long-term \ac{HRI} installations for education require more investigation and may even require a change in the interaction design between the robot and children. Our work introduced this discussion highlighting the need for a better understanding of long-term deployment of social robots amonst the educational sector.\\ \noindent% {\bf Game-play behavior changes over time due to a better understating of the game guided by the robotic tutor.} \noinden The way children played the game about sustainable education changed over time and this change seems to be related with the interaction with the robotic tutor. Indeed, there was a statistically significant result found in the game-play behavior of children during the long-term study. Children's actions in the game showed that, over time, they have performed more upgrades to their city they have performed more skip turns (representing the passage of time in the game, such as days passing by). By performing upgrades, the city can become more sustainable, and by skipping some turns the players allow the structures and upgrades they have chosen to implement, to get their full effect before advancing to the next level. This behaviour thus seems to indicate a more thoughtful design of the city, which matches with Antle's design principles for sustainability games \cite{antle2014}. These changes in game play are not trivial, as children needed to move away from the traditional competitiveness of passing levels (a so-called traditional mind set of a game-play), to become concerned about spending less money and taking more advantages of the resources from previous constructions. This seems to show that the change in game-play behavior goes hand in hand with the perceived easiness to understand and play the the game, guided by the interactions with the robotic tutor. \section{General discussion and conclusions} \label{ch:conclusion} In this paper, we presented a novel educational scenario for social robots, in which a group of children interacts with an autonomous robot in a serious collaborative game. The goal of the interaction was to infer learning outcomes with regards to environmental sustainability and the associated trade-offs involved when designing a city. We conducted a short-term study that addressed the effects of the empathic robot and a long-term study that addressed the long-term deployment of the robot in school. The short-term study compared three conditions: empathic robot, non-empathic robot and no robot. The results showed no significant results in the majority of learning outcomes; however, there was an increase in meaningful conversations with the empathic robotic tutor, which is a stated goal for collaborative learning scenarios targeting sustainability. During the long-term study, the empathic robot was deployed for $2$ months in school. Results showed no significant change in learning gains over time. Additionally, a change in game-play behaviors related to the game was observed, in which children perform more game actions towards sustainability over the sessions. The lack in learning progress may be due to several aspects, such as the quality of the interaction, the role of robots in school, and group dynamics. This reflects the need to conduct additional research in group interactions between humans and robots for educational purposes. Summarizing, the highlights of our research are: \begin{enumerate} \item We designed, developed, and evaluated a robot tutor for education that autonomously interacted with students in a real-world environment of a school for $2$ months. \item We contribute to the field of group interaction studies between humans and robots by framing the educational context as a collaborative group learning scenario. \item We concluded that an autonomous robot with empathy (compared with a robot without empathy or learning without a robot) fosters meaningful discussions about sustainability between students, which is a learning outcome in sustainability education. \item We concluded that long-term educational interactions with an empathic robot did not impacted in a significant way learning gains, although there was a change in game-actions to achieve more sustainability during game-play. \end{enumerate} \subsection{Limitations and future work} Empathy is a complex construct that is highly dependent on the content of what people say to each other. Our empathic robot was able to perform contingent behaviors that translate empathy by receiving limited input from the children, but had no access to their verbal discussions. For effective empathic robotic tutors to operate in group learning environments, they should be able to understand what children say and accordingly personalize their empathic responses. To this end, developments in speech recognition for children are needed to build better empathic interactions. We also did not observe as many learning gains as expected, highlighting the importance of conducting more research in collaborative group learning environments with robots. Aspects such as the time duration for a learning gain to occur need to be considered when deploying a robot in a school setting. Additional qualitative research is also needed to understand the factors that favor learning gains and the factors that can hinder it. Regarding the wider use of robotic tutors in learning, there is already a large body of research investigating robots for second language acquisition, handwriting skills, and even the understanding of other complex curricular topics, such as chemistry and wind formations. Although this reflects positive and promising directions for \ac{HRI} for education, more educational scenarios need to be considered to understand how robots can be used for best impact on learning. This work has provided a corpus of reflection for future research, leading to questions, such as ``which variables lead to learning gains when using a robot for collaborative group education?'' and ``what is the role that a robot can have in school that fosters learning gains?'' With this work, we have begun to explore the potential for robots in group learning, bringing attention to empathy as an important competence for a robot to have when interacting with students. \section*{Acknowledgements} This work was partially supported by national funds through Funda\c{c}\~{a}o para a Ci\^{e}ncia e a Tecnologia (FCT) with reference UID/CEC/50021/2013, through the project AMIGOS grant n. PTDC/EEISII/7174/2014, the Carnegie Mellon Portugal Program and its Information and Communications Technologies Institute, under project CMUP-ERI/HCI/0051/2013, and by the EU-FP7 project EMOTE under grant agreement no. 317923. P. Alves-Oliveira acknowledges a FCT PhD grant ref. SFRH/BD/110223/2015. We show our gratitude to the teachers, students, and school-staff from Escola Quinta do Marqu\^{e}s (Oeiras, Portugal) for their involvement in the studies. We also thank Daniel Silva for collaborating in the coding of the verbal behavioral. The authors are solely responsible for the content of this publication. It does not represent the opinion of the European Commission (EC), and the EC is not responsible for any use that might be made of data appearing therein. \bibliographystyle{ACM-Reference-Format}
\section{Our Proposed Model} \label{sec:model} This section describes our proposed neural model. The model assumes a typical NMT architecture in which the model is asked to predict one word at a time, as described in the previous section. \subsection{Model Overview} Our model is essentially an attentional encoder-decoder system, except with two encoders: one for code/text data and one for AST data. In the spirit of maintaining simplicity where possible, we used embedding and recurrent layers of equal size for the encoders. We concatenate the output of attention mechanisms for each encoder as depicted here: \begin{figure}[!h] \centering \vspace{-0.35cm} \includegraphics[width=0.30\textwidth]{figures/model_arch.png} \vspace{-0.25cm} \label{fig:model_arch} \end{figure} Precedent for combining different data sources comes heavily from image captioning~\cite{chen2015abc, yang2016stacked, johnson2016densecap, mao2014deep} (e.g. merging convolution image output with a list of tags). One aim in this paper is to demonstrate how a similar concept is beneficial for code summarization, in contrast to the usual seq2seq application to SE data in which all information is put into one sequence. We also hope to sow fertile ground for several areas of future work in creating unique processing techniques for each data type -- treating software's text and structure differently has a long tradition~\cite{marcus2003recovering}. \subsection{Model Details} To encourage reproducibility and for clarity, we explain our model as a walkthrough of our actual Keras implementation. The following starts at line 29 in {\small\texttt{models/ast\_attendgru\_xtra.py}}; all code is available for download from our online appendix (Section~\ref{sec:reproducibility}). \vspace{-0.1cm} {\small \begin{verbatim} txt_input = Input(shape=(self.txtlen,)) com_input = Input(shape=(self.comlen,)) ast_input = Input(shape=(self.astlen,)) \end{verbatim}} \vspace{-0.1cm} First, above, are three input layers corresponding to the code/text sequence, the comment sequence, and the flattened AST sequence. We chose the sequence lengths as a balance between model size and coverage of the dataset. The sequence sizes of 100 for code/text and AST, and 13 words for comment, each cover at least 80\% of the training set. Shorter sequences are padded with zeros, and longer sequences are truncated. \vspace{-0.1cm} {\small \begin{verbatim} ee = Embedding(output_dim=self.embdims, input_dim=self.txtvocabsize)(txt_input) se = Embedding(output_dim=self.embdims, input_dim=self.astvocabsize)(ast_input) \end{verbatim}} \vspace{-0.1cm} We start with a fairly common encoding structure, including embedding layers for each of our encoded input types (code/text and AST). The embedding will output a shape of {\small \texttt{(batch\_size, txtvocabsize, embdims)}}. What this means is that for every batch, each word in the sequence has one vector of length {\small \texttt{embdims}}. For example, (200, 100, 100) means that for each of 200 examples in a batch, there are 100 words and each word is represented by a 100 length embedding vector. We found two separate embeddings to have better performance than a unified embedding space. \vspace{-0.1cm} {\small \begin{verbatim} ast_enc = CuDNNGRU(self.rnndims, return_state=True, return_sequences=False) astout, sa = ast_enc(se) \end{verbatim}} \vspace{-0.1cm} Next is a GRU layer with {\small \texttt{rnndims}} units (we found 256 to provide good results without oversizing the model) to serve as the AST encoding. We used a CuDNNGRU to increase training speed, not for prediction performance. The {\small \texttt{return\_state}} flag is necessary so that we get the final hidden state of the AST encoder. The {\small \texttt{return\_sequences}} flag is necessary because we want the state \emph{at every cell} instead just the final state. We need the state at every cell for the attention mechanism later. \vspace{-0.1cm} {\small \begin{verbatim} txt_enc = CuDNNGRU(self.rnndims, return_state=True, return_sequences=True) txtout, st = enc(ee, initial_state=sa) \end{verbatim}} \vspace{-0.1cm} The code/text encoder operates in nearly the same way as the AST encoder, except that we start the code/text GRU with the final state of the AST GRU. The effect is similar to if we had simply concatenated the inputs, except that 1) we keep separate embedding spaces, 2) we allow for attention to focus on each input differently rather than across input types, 3) we ensure that one input is not truncated by an excessively long sequence of the other input type, and 4) we ``keep the door open'' for further processing e.g. via convolution layers that would benefit one input type but not the other. As we show in our evaluation, this is an important point for future work. Tensor {\small \texttt{txtout}} would normally have shape {\small \texttt{(batch\_size, rnndims)}}, an {\small \texttt{rnndims}}-length vector representation of every input in the batch. However, since we have {\small \texttt{return\_sequences}} enabled, {\small \texttt{encout}} has the shape {\small \texttt{(batch\_size, datvocabsize, rnndims)}}, which is the {\small \texttt{rnndims}}-length vector at every time-step. That is, the {\small \texttt{rnndims}}-length vector at every word in the sequence. So we see the status of the output vector as it changes with each word in the sequence. We also have {\small \texttt{return\_state}} enabled, which just means that we get {\small \texttt{st}}, the {\small \texttt{rnndims}} vector from the last cell. This is a GRU, so this {\small \texttt{st}} is the same as the output vector, but we get it here anyway for convenience, to use as the initial state in the decoder. \vspace{-0.1cm} {\small \begin{verbatim} de = Embedding(output_dim=self.embdims, input_dim=self.comvocabsize)(com_input) dec = CuDNNGRU(self.rnndims, return_sequences=True) decout = dec(de, initial_state=st) \end{verbatim}} \vspace{-0.2cm} The decoder is as described in many papers on NMT: a dedicated embedding space followed by a recurrent layer. We start the decoder with the final state of the code/text RNN. \vspace{-0.2cm} {\small \begin{verbatim} txt_attn = dot([decout, txtout], axes=[2, 2]) txt_attn = Activation('softmax')(txt_attn) \end{verbatim}} \vspace{-0.2cm} The next step is the code/text attention mechanism, with a design similar to that described by Luong~\emph{et al.}~\cite{luong2015effective}. First, we take the dot product of the decoder and code/text encoder output. The output shape of {\small \texttt{decout}} is, e.g., {\small \texttt{(batch\_size, 13, 256)}} and {\small \texttt{txtout}} is {\small \texttt{(batch\_size, 100, 256)}}. The axis 2 of {\small \texttt{decout}} is 256 long. The axis 2 of {\small \texttt{txtout}} is also 256 long. So by computing the dot product along axis 2 in both, we get a tensor of shape {\small \texttt{(batch\_size, 13, 100)}}. For one example in the batch, we get {\small \texttt{decout}} of (13, 256) and {\small \texttt{txtout}} (256, 100). \vspace{-0.2cm} \begin{table}[h!] \begin{tabular}{p{2.1cm}lp{2.1cm}lp{2.1cm}} ~~~~decout (axis 2) & & ~~~~txtout (axis 2) & & ~~~~~~txt\_attn \\ \begin{tabular}{p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}} & 1 & 2 & .. & 256 \\ 1 & \multicolumn{4}{l}{$v1 \longrightarrow$ } \\ 2 & \multicolumn{4}{l}{$v2 \longrightarrow$ } \\ .. & & & & \\ 13 & & & & \end{tabular} & * & \begin{tabular}{p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}} & 1 & 2 & .. & 100 \\ 1 & $v3$ & $v4$ & & \\ 2 & $\downarrow$ & $\downarrow$ & & \\ .. & & & & \\ 256 & & & & \end{tabular} & = & \begin{tabular}{p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}} & 1 & 2 & .. & 100 \\ 1 & a & b & & \\ 2 & c & d & & \\ .. & & & & \\ 13 & & & & \end{tabular} \\ \end{tabular} \end{table} \vspace{-0.3cm} Where {\small \texttt{a}} is the dot product of vectors {\small \texttt{v1}} and {\small \texttt{v3}}, and {\small \texttt{b}} is the dot product of {\small \texttt{v1}} and {\small \texttt{v4}}, etc. The result is that each of the 13 positions in the decoder sequence is now represented by a 100-length vector. Each value in the 100-length vector reflects the similarity between the element in the decoder sequence and the element in the encoder sequence. I.e. {\small \texttt{b}} above reflects how similar element 1 in the decoder sequence is similar to element 2 in the code/text encoder sequence. The 100-length vector for each of the 13 input positions reflects how much that a given input position is similar (should ``pay attention to'') a position in the output. Then we apply a softmax to each of the 13 (100-length) vectors. The effect is to exaggerate the ``most similar'' things, so that ``more attention'' will be paid to the more-similar input vectors -- the network learns during training to make them more similar. Note that the dot product here is not normalized, so it is not necessarily equivalent to cosine similarity. \vspace{-0.2cm} {\small \begin{verbatim} txt_context=dot([txt_attn, txtout],axes=[2, 1]) \end{verbatim}} \vspace{-0.2cm} Next, we make use of the attention vectors by using them to create the context vectors for the code/text input. To do that, we scale the encoder vectors by the attention vectors. This is how we ``pay attention'' to particular areas of input for specific outputs. The above line of code takes {\small \texttt{txt\_attn}}, with shape {\small \texttt{(batch\_size, 13, 100)}}, and computes the dot product with txtout {\small \texttt{(batch\_size, 100, 256)}}. Recall that the encoder has {\small \texttt{txtvocabsize}}; 100 elements since it takes a sequence of 100 words. Axis 1 of this tensor means ``for each element of the input sequence.'' The multiplication, for each sample in the batch, is: \vspace{-0.2cm} \begin{table}[h!] \begin{tabular}{p{2.1cm}lp{2.1cm}lp{2.1cm}} ~~~~txt\_attn (axis 2) & & ~~~~txtout (axis 1) & & ~~~~~txt\_context \\ \begin{tabular}{p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}} & 1 & 2 & .. & 100 \\ 1 & \multicolumn{4}{l}{$v1 \longrightarrow$ } \\ 2 & \multicolumn{4}{l}{$v2 \longrightarrow$ } \\ .. & & & & \\ 13 & & & & \end{tabular} & * & \begin{tabular}{p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}} & 1 & 2 & .. & 256 \\ 1 & $v3$ & $v4$ & & \\ 2 & $\downarrow$ & $\downarrow$ & & \\ .. & & & & \\ 100 & & & & \end{tabular} & = & \begin{tabular}{p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}p{0.00cm}} & 1 & 2 & .. & 256 \\ 1 & a & b & & \\ 2 & c & d & & \\ .. & & & & \\ 13 & & & & \end{tabular} \\ \end{tabular} \end{table} \vspace{-0.3cm} The result is a context \emph{matrix} that has one context vector for each element in the output sequence. This is different than the vanilla sequence to sequence approach, which has only one context vector used for every output. Each output sequence location has its own context vector. This vector is created from the most attended-to part of the encoder sequence. \vspace{-0.1cm} {\small \begin{verbatim} ast_attn = dot([astout, encout], axes=[2, 2]) ast_attn = Activation('softmax')(ast_attn) ast_context = dot([ast_attn, txtout], axes=[2, 1]) \end{verbatim}} \vspace{-0.1cm} We perform the same attention operations to the AST encoding as we do for the code/text encoding. \vspace{-0.1cm} {\small \begin{verbatim} context = concatenate( [txt_context, ast_context, decout]) \end{verbatim}} \vspace{-0.1cm} But, we still need to combine the code/text and AST context with the decoder sequence information. This is important because we send each word one at a time, as noted in the previous section. The model gets to look at the previous words in the sentence in addition to the words in the encoder sequences. It does not have the burden of predicting the entire output sequence all at once. Technically, what we have here are two context matrices with shape {\small \texttt{(batch\_size, 13, 256)}} and a {\small \texttt{decout}} with shape {\small \texttt{(batch\_size, 13, 256)}}. The default axis is -1, which means the last part of the shape (the 256 one in this case). This creates a tensor of shape {\small \texttt{(batch\_size, 13, 768)}}: one 768-length vector for each of the 13 input elements instead of three 256-length vectors. \vspace{-0.1cm} {\small \begin{verbatim} out = TimeDistributed(Dense(self.rnndims, activation="relu"))(context) \end{verbatim}} \vspace{-0.1cm} We are nearing the point of predicting a next word. A TimeDistributed layer provides one dense layer per vector in the context matrix. The result is one {\small \texttt{rnndims}}-length vector for every element in the decoder sequence. For example, one 256-length vector for each of the 13 positions in the decoder sequence. Essentially, this creates one predictor for each of the 13 decoder positions. \vspace{-0.1cm} {\small \begin{verbatim} out = Flatten()(out) out = Dense(self.comvocabsize, activation="softmax")(out) \end{verbatim}} \vspace{-0.1cm} However, we are trying to output a single word, the next word in the sequence. Ultimately we need a single output vector of length {\small \texttt{comsvocabsize}}. So we first flatten the (13, 256) matrix into a single (3328) vector, then we use a dense output layer of length {\small \texttt{comsvocabsize}}, and apply softmax. \vspace{-0.1cm} {\small \begin{verbatim} model = Model(inputs=[txt_input, com_input, ast_input], outputs=out) \end{verbatim}} \vspace{-0.1cm} The result is a model with code/text, AST, and comment sequence inputs, and a predicted next word in the comment sequence as output. \vspace{-0.2cm} \subsection{Hardware Details} The hardware on which we implemented, trained, and tested our model included one Xeon E5-1650v4 CPU, 64gb RAM, and two Quadro P5000 GPUs. It was necessary to train on GPUs with 16gb VRAM due to the large size of our model. \section{Background and Related Work} \label{sec:background} This section covers the supporting technologies behind our work, plus related work in source code summarization. \subsection{Source Code Summarization} Related work in source code summarization can be broadly classified as either AI/data-driven or heuristic/template-driven. \subsubsection{Data-driven} Among data-driven techniques, recent work by Hu~\emph{et al.}~\cite{hu2018deep} is the most-closely related to this paper. That work proposes to use the AST to annotate the words in the source code, and then use the annotated representation as input to a seq2seq neural model. The model itself is an off-the-shelf encoder-decoder; the main advancement is the AST-annotated representation called Structure-based Traversal (SBT). SBT is essentially a technique for flattening the AST and ensuring that words in the code are associated with their AST node type. For example, the code {\small\texttt{request.remove(id)}} becomes: \vspace{-0.2cm} {\small \begin{verbatim} ( MethodInvocation ( SimpleName_request ) SimpleName_request ( SimpleName_remove ) SimpleName_remove ( SimpleName_id ) SimpleName_id ) MethodInvocation \end{verbatim} } \vspace{-0.2cm} The intent is that the words ``request'', ``remove'', and ``id'' be associated with the context in which they appear. In this case, a MethodInvocation node. The SBT representation forms an important baseline for comparison in our experiments in later sections. A casual reader will note that SBT was shown in that paper to obtain remarkable performance of 38 BLEU, but we caution that this is not directly comparable to the results in our experiments. The reason is that in \cite{hu2018deep}, the dataset was split by function, so the training, validation, and test sets contain random selections of functions in the entire dataset. In contrast, we split by \emph{project}. In \cite{hu2018deep}, functions from the same project can be in both the training and test sets. In our experiments, all methods from a project are either training, validation, or test. In addition, we performed other preprocessing such as auto-generated code removal (see Section~\ref{sec:corpus}), to avoid situations where identical methods appear in both training and test sets. Taken together, we expect that the nominal performance scores for all approaches will be far lower in our experiments. Other related AI/data approaches in generating summaries of subroutines includes 1) work by Hu~\emph{et al.}~\cite{hu2018summarizing} focusing on creating summaries from sequences of API calls, and 2) CODE-NN by Iyer~\emph{et al.}~\cite{iyer2016summarizing} which, similar to \cite{hu2018deep}, creates a custom word representation of code which it then feeds to an off-the-shelf seq2seq model. There is also related work outside the task of subroutine summaries. Jiang~\emph{et al.}~\cite{jiang2017automatically} and Loyola~\emph{et al.}~\cite{loyola2017neural} generate descriptions of code changes (i.e. commit messages). Allamanis~\emph{et al.}~\cite{allamanis2016convolutional} predict a name for a subroutine from the body of a subroutine. Oda~\emph{et al.}~\cite{oda2015learning} create pseudocode from source code by adapting statistical machine translation. Yin~\emph{et al.}~\cite{yin2018mining}, Movshovitz~\emph{et al.}~\cite{movshovitz2013natural}, and Allamanis~\emph{et al.}~\cite{allamanis2015bimodal} target comments of short snippets of code, a task facilitated by public datasets~\cite{barone2017parallel}. Gu~\emph{et al.}~\cite{gu2018deep} have demonstrated using a neural model for source code search, another task growing in popularity and facilitated by public datasets~\cite{yao2018staqc}. Of note is that the attentional encoder-decoder seq2seq model originally described by Bahdanau~\emph{et al.}~\cite{bahdanau2014neural} is at the core of many of these papers, as it provides strong baseline performance even for many software engineering tasks. \subsubsection{Heuristic/Template-based} Haiduc~\emph{et al.}~\cite{haiduc2010supporting, haiduc2010use} is often cited as the first attempt to create text summaries of code, and indeed is the first to introduce the term ``source code summarization.'' These early approaches create extractive summaries by calculating the top-\emph{n} keywords with metrics such as TF/IDF. Shortly thereafter, work by Sridhara~\emph{et al.}~\cite{sridhara2010towards, sridhara2011automatically} adapted SWUM~\cite{hill2009automatically} (a technique for finding parts of speech of words in code) to create short summary phrases for source code using templates. Another template-based solution by McBurney~\emph{et al.}~\cite{mcburney2016automatic} also used SWUM, but summarized a subroutine's context (defined as the functions that call or are called by a method) in addition to the method context. Rodeghero~\emph{et al.}~\cite{rodeghero2015eye} made further improvements to content extraction for heuristic and template solutions by modifying the heuristics to mimic how human programmers read code with their eyes. As in other research areas related to natural language generation~\cite{sutskever2011generating}, data-driven techniques have largely supplanted template-based techniques due to a much higher degree of flexibility and reduced human effort in template creation. We direct readers to a comprehensive survey by Nazar~\emph{et al.}~\cite{nazar2016summarizing} \subsection{Neural Machine Translation} The workhorse of most Neural Machine Translation (NMT) systems is the attentional encoder-decoder architecture~\cite{luong2015effective}. This architecture originated in work by Bahdanau~\emph{et al.}~\cite{bahdanau2014neural} and is explained in great detail by a plethora of very highly-regarded sources~\cite{sutskever2014sequence, lecun2015deep, goodfellow2016deep, vaswani2017attention, johnson2017google}. In this section, we cover only the concepts necessary to understand our approach at a high level. In an encoder-decoder architecture, there are a minimum of two recurrent neural networks (RNNs). The first, called the encoder, converts an arbitrary-length sequence into a single vector representation of a specified length. The second, called the decoder, converts the vector representation given by the encoder into another arbitrary-length sequence. The sequence inputted to the encoder is one language e.g. English, and the sequence from the decoder is another language e.g. French. Encoder-decoder architectures learn to predict sentences one word at a time -- the decoder generally does not try to predict a whole sentence at once. The way this usually works is that during training, instead of sending the network: \vspace{-0.1cm} {\small \begin{verbatim} [ cat on the table ] => [ chat sur la table ] \end{verbatim} } \vspace{-0.1cm} The network receives 1) the whole input sequence, 2) a sequence of output words so far, plus 3) the correct next word: \vspace{-0.1cm} {\small \begin{verbatim} [ cat on the table ] => [ chat 0 0 0 ] + [ sur ] [ cat on the table ] => [ chat sur 0 0 ] + [ la ] [ cat on the table ] => [ chat sur la 0 ] + [ table ] \end{verbatim} } \vspace{-0.1cm} During inference, the trained model is given an input sequence, which is used to predict the first word in the output sentence. Then the input sentence is sent to the model again, along with the first prediction. The decoder outputs a prediction for the second word in the sentence, and so on, until the decoder predicts an end-of-sentence token. The problem with this strategy is that the encoder is burdened with creating a vector representation suitable for prediction at every output step. In reality, some words in the input sentence will be more important than others for a particular output. E.g., `on' for `sur'. This is the motivation for ``attentional'' encoder-decoder networks~\cite{bahdanau2014neural}. Essentially what happens is that instead of a single vector representation of the input sentence, an attention mechanism is placed between the encoder and decoder. That attention mechanism receives the encoder's state at every time step -- in the example above, four vectors for each of the four positions in the sentence. The attention mechanism, in essence, selects which vector from the encoder to use, so that different decoder predictions receive input from different positions in the input sequence. Our work builds on the attentional encoder-decoder strategy in key ways that we describe in the next section. \section{Corpus Preparation} \label{sec:corpus} We prepared a large corpus of Java methods from the Sourcerer repository provided by Lopes~\emph{et al.}~\cite{Lopes+Bajracharya+Ossher+Baldi:2010}. The repository contains over 51 million Java methods from over 50000 projects. We considered updating the repository with new downloads from GitHub, but we found that the Sourcerer dataset was quite thorough, leading to a large amount of overlap with newer projects that could not be eliminated (due to name changes, code cloning, etc.). This overlap could lead to major validity problems for our experiments (e.g., if testing samples were inadvertently placed in the training set). We decided to use the Sourcerer projects exclusively. Significant preparation was necessary to make the repository a suitable dataset for applications of NMT, and we view this preparation as an important contribution of this paper to the research field (unlike in the NMT research area, there are relatively few curated datasets for code summarization). After downloading the archives, we used a toolkit provided by McMillan~\emph{et al.}~\cite{mcmillan2011portfolio} to extract the Java methods and organize them into a SQL database. Then we filtered for methods that were preceded by JavaDoc comments (indicated by {\small $/**$}). We used only comments intended as JavaDocs, because there is an assumption that the first sentence in the comment will be a summary of the method's behavior~\cite{kramer1999api}. Then we extracted the first sentence by looking for the first period, or the first newline if no period was present. Next we used the {\small \texttt{langdetect}} library to remove comments not in English. About 4m methods remained after these steps. A potential problem was auto-generated code. Auto-generated code is a problem because both the code and comments created by auto-generators tend to be very similar. If nearly-identical code is in the training and testing sets, the model will learn these cases easily, which could simultaneously reduce performance on the ``real'' examples while falsely inflating performance metrics such as BLEU, since the metrics would reward the model for correctly identifying the duplicate cases. Happily, the solution is fairly simple: we remove any methods from files that include phrases such as ``generated by'' suggested by Shimonaka~\emph{et al.}~\cite{shimonaka2016identifying}. This filter is quite aggressive, as it reduced the dataset size to around 2m methods, and on manual inspection we found no cases of auto-generated code. In fact, a majority of the filtered methods were exact duplicates (around 100k unique examples out of {\small$\sim$}2m removed methods). But because comments to auto-generated code are often still meaningful, we added one copy of each of the 100k unique examples back into the dataset, and ensured that they were in the training set only (so we did not attempt to test against auto-generated comments). The result is a dataset of around 2.1m methods. Our other preprocessing steps followed the practice of many software engineering papers. We split the code and comments on camel case and underscore, removed non-alpha characters, and set to lower case. We did not perform stemming. We then split the dataset \emph{by project} into training, validation, and test sets. By ``by project'' we mean that we randomly divided the projects into the three groups: 90\% of projects into training, 5\% into validation, and 5\% into testing. Then all the methods from a project went into the group assigned to its project. A side effect is that since projects have different numbers of methods, 91\% of methods are in training, 4.8\% in validation, and 4.2\% in testing. But this slight variation is necessary to maintain a realistic situation. As mentioned in Section~\ref{sec:background}, we respectfully believe that not splitting by project and not removing auto-generated code are mistakes made by a vast majority of previous NMT applications to code summarization, and artificially inflates the reported scores (for example, SBT is reported to have 38 BLEU, versus 14 BLEU with the same technique in our evaluation). To obtain the ASTs, we first used {\small \texttt{srcml}}~\cite{collard2011lightweight} to extract an XML representation of each method. Then we built a tool to convert the XML representation into the flattened SBT representation, to generate SBT-formatted output described by Hu~\emph{et al.}~\cite{hu2018deep}. Finally, we created our own modification of SBT in which all the code structure remained intact, but in which we replaced all words (except official Java API class names) in the code to a special $<$OTHER$>$ token. We call this SBT-AO for SBT AST only. We use this modification to simulate the case when only an AST can be extracted. From this corpus of Java methods, we create two datasets: \begin{itemize} \item The \textbf{standard dataset} contains three elements for each Java method: 1) the pre-processed Java source code for the method, 2) the pre-processed comment, and 3) the SBT-AO representation of the Java code. \vspace{0.1cm} \item The \textbf{challenge dataset} contains two elements for each method: 1) the pre-processed comment, and 2) the SBT-AO representation of the Java code. \end{itemize} Technically, we also have a third dataset containing the default SBT representation (with code words) and the pre-processed comment, which we use for experiments to compare our approach to the baselines. However, the standard and challenge datasets are our focus in this paper, intended to compare the case when internal documentation is available, and the much more difficult case with only an AST. \section{Ensemble Decoding and Future Work} \label{sec:ensemble} As a hint toward future work, we test a combination of the {\small \texttt{attendgru}} and {\small \texttt{ast-attendgru}} models using ensemble decoding. The combination itself is straightforward: we compute an element-wise mean of the output vector of each model (the same trained models used in our evaluation). The training and test procedure does not change, except that during prediction, we use the maximum value of the combined output vector, rather than just one output vector from one model. This is the same ensemble decoding procedure implemented by OpenNMT~\cite{OpenNMTWebsite}, and is one of the most common of several options described by literature on multi-source NMT~\cite{garmash2016ensemble}. Since we are combining output vectors, the models ``work together'' during prediction of every word -- it is not just choosing one model or another for the whole sentence. The idea is that one model may assign similar weights in the output vector to two or more words, in cases where it performs less well. And another model that performs better in that situation may assign more weight to a single word. In our system, the hope is that {\small \texttt{attendgru}} will contribute more when code/text words are clear, but {\small \texttt{ast-attendgru}} will contribute more when they are unclear. The ensemble decoding procedure improves performance to 20.9 BLEU, from 19.6 for {\small \texttt{ast-attendgru}} and 19.4 for {\small \texttt{attendgru}}. This is more than a full BLEU point improvement, which is quite significant for a relatively simple procedure. This result points us to future work including more advanced ensemble decoding (e.g. predicting when to use one model or another), optimizations to the network (e.g. dropout, parameter tuning), and, critically, using different data processing techniques on each type of input. \section{Conclusion} \label{sec:conclusion} We have presented a neural model for generating natural language descriptions of subroutines. We implement our model and evaluate it over a large dataset of Java methods. We demonstrate that our model {\small \texttt{ast-attendgru}}, in terms of BLEU score, outperforms baselines from SE literature and is slightly ahead of a strong off-the-shelf approach from NLP literature. We also demonstrate that and ensemble of our approach and the off-the-shelf NLP approach outperforms all other tested configurations. We provide a walkthrough example to provide insight into how the models work -- we conclude that the default NMT system works well in situations where good internal documentation is provided, but less well when it is not provided, and that {\small \texttt{ast-attendgru}} assists in these cases. We demonstrate how {\small \texttt{ast-attendgru}} can produce coherent predictions even with zero internal documentation. \section{Evaluation} \label{sec:eval} This section covers our evaluation, comparing our approach to baselines over the standard and challenge datasets. \subsection{Research Questions} Our research objective is to determine the performance difference between our approach and competitive baseline approaches in two situations that we explore through these Research Questions (RQs): \begin{description} \item[RQ$_{1}$] What is the difference in performance between our approach and competitive approaches in the ``standard'' situation, assuming internal documentation? \vspace{0.05cm} \item[RQ$_{2}$] What is performance of our approach in the ``challenge'' situation, assuming an AST only? \end{description} The rationale for these RQs was largely covered in the Introduction and Background sections. Essentially, existing applications of NMT for the problem of code summarization almost entirely rely on the programmer writing meaningful internal documentation such as identifier names. As we will show, this assumption makes the problem ``easy'' for seq2seq NMT models, since many methods have internal documentation that is very similar to the summary comment (a phenomenon also observed by Tan~\emph{et al.}~\cite{6200082} and Louis~\emph{et al.}~\cite{Louis2018DeepLT}). We ask RQ$_1$ in order to study the performance of our approach under this assumption. In contrast, we ask RQ$_2$ because the assumption of internal documentation is often not valid. Very often, only the bytecode is available, or programmers neglect to write good internal documentation, or code has even been obfuscated deliberately. In these cases, it is usually still possible to extract an AST for a method, even if it contains no meaningful words. In principle, the structure of a program is all that is necessary to understand it, since ultimately that is what defines the behavior of the program. In practice, it is very difficult to connect structure directly to high-level concepts described in summaries. We seek to quantify a baseline performance level with our approach (since, to our knowledge, no published approach functions in this situation). \subsection{Baselines} To answer RQ$_1$ (the standard experiment), we compare our approach to three baselines. One baseline (which we call {\small \textbf{\texttt{attendgru}}}) is a generic attentional encoder-decoder model, to represent an application of a strong off-the-shelf approach from the NLP research area. Note that there are a huge variety of NMT systems described in the NLP literature, but that a vast majority have an attentional encoder-decoder model at their heart (see Section~\ref{sec:background}). To maintain an ``apples to apples'' comparison, the baseline is identical to the ``code/text'' encoder in our approach (the decoder is identical as well). In essence, the baseline is the same as our proposed approach, except without the AST encoder and associated concatenation. While we could have chosen any number of approaches from NLP literature, it is very difficult to say up front which will perform best for code summarization, and we needed to ensure minimal differences to maximize validity of our results. If, for example, we had used an architecture with an LSTM instead of a GRU in the encoder, we would have no way of knowing if the difference between our approach and the baseline were due to the AST information we added, or due to using an LSTM instead of a GRU. A second baseline is the {\small \textbf{\texttt{SBT}}} approach presented by Hu~\emph{et al.}~\cite{hu2018deep}. This approach was presented at ICPC'18, and (at the time of writing) represents the latest publication about source code summarization in a software engineering venue. That paper used an LSTM-based encoder-decoder architecture based on a popular guide for building seq2seq NMT systems, but used their SBT representation of code instead of the source code only. For our baseline, we use their SBT representation, but use the same GRU-based encoder-decoder from our NLP baseline, also to ensure an ``apples to apples'' comparison. Since the model architecture is the same, we can safely attribute performance differences to the input format (e.g., SBT vs. code-only). A third baseline is {\small \textbf{\texttt{codenn}}}, presented by Iyer~\emph{et al.}~\cite{iyer2016summarizing}. Given the complexity of the approach, we used their publicly-available implementation. The original paper describes only applications to SQL and C\#, but we noticed that their C\# parser extracted common code features that are also available in Java. We made small modifications to the C\# parser so that it would function equivalently for Java. We call our approach {\small \textbf{\texttt{ast-attendgru}}} in our experiments. We used a greedy search algorithm for inference for all approaches, rather than beam search, to minimize the number of experimental variables and computation cost. \subsection{Methodology} Our methodology to answer both RQs is identical, and follows best practice established throughout the literature on NMT (see Section~\ref{sec:background}): for RQ$_1$, we train our approach and each baseline with the training set from the standard dataset for a total of 10 epochs. Then, for each approach, we computed performance metrics for the model after each epoch against the validation set. (In all cases, validation performance began to degrade after five or six epochs.) Next we chose the model after the epoch with the highest validation performance, and computed performance metrics for this model against the testing set. These testing results are the results we report in this paper. Our methodology to answer RQ$_2$ differs only in that we trained and tested using the challenge dataset. We report the performance metric BLEU~\cite{papineni2002bleu}, also in keeping with standard practice in NMT. BLEU is a measure of the text similarity between predicted summaries and reference summaries. We report a composite BLEU score in addition to BLEU$_1$ through BLEU$_4$ (BLEU$_n$ is a measure of the similarity of $n$-length subsequences, versus entire summary sentences). Technically speaking, we used {\small \texttt{nltk.translate.bleu\_score}}~\cite{NLTKWebsite} in our implementation. \subsection{Threats to Validity} The primary threats to validity to this evaluation include: 1) Our dataset. We use a very large dataset with millions of Java methods in order to maximize the generalizability of our results, but the possibility remains that we would obtain different results with a different dataset. And, 2) we did not perform cross-validation. We attempt to mitigate this risk by using random samples to split the training/validation/testing sets, a different split could result in different performance. This risk is common among NMT experiments due to very high training computation costs (4+ hours per epoch). \section{Introduction} A ``summary'' of source code is a brief natural language description of that section of source code~\cite{mcburney2016automatic}. One of the most common targets for summarization are the subroutines in a program; for example, the one-sentence descriptions of Java methods widely used in automatically-formatted documentation e.g. JavaDocs~\cite{kramer1999api}. These descriptions are useful because they help programmers understand the role that the subroutine plays in a program -- empirical studies have repeatedly shown that understanding the role of the subroutines in a program is a crucial step to understanding the program's behavior overall~\cite{von1995program, letovsky1987cognitive, cornelissen2009systematic, maletic2001supporting}. Even a short summary of a subroutine e.g. ``returns the player's hitpoint count'' can tell a programmer a lot about that subroutine and the program as a whole. A holy grail of software engineering research has long been to generate these summaries automatically. Forward~\emph{et al.} pointed out in 2002 that ``software professionals value technologies that improve automation of the documentation process,'' and ``that documentation tools should seek to better extract knowledge from core resources'', such as source code~\cite{forward2002relevance}. However, the state-of-the-practice has barely changed since that time for tool support for automated documentation generation. Tools such as JavaDoc~\cite{kramer1999api} and Doxygen~\cite{DoxygenWebsite} automate the format and presentation of documentation, but still leave programmers with the most labor-intensive effort of writing the text and examples. Research into generation of natural language descriptions of code has come to be known as ``source code summarization''~\cite{eddy2013evaluating}, with significant effort focused on generation of summaries of subroutines: For several years, significant progress was made based on content selection and sentence templates~\cite{hill2009automatically, haiduc2010use, sridhara2010towards, rastkar2011generating, mcburney2016automatic, moreno2013automatic} or even somewhat-idiosyncratic solutions such as mimicking human eye movements~\cite{rodeghero2015eye}. However, as in many research areas and as chronicled in a recent survey by Allamanis~\emph{et al.}~\cite{allamanis2017survey}, these techniques have largely given way to AI based on big data input. The inspiration for a vast majority of efforts into AI-based code summarization originates in neural machine translation (NMT) from the natural language processing research community. An NMT system converts one natural language into another. It is typically thought of in terms of sequence to sequence (seq2seq) learning, in which an e.g. English sentence is one sequence and is converted into a equivalent target sequence representing a e.g. French sentence. In software engineering research, machine translation can be considered as a metaphor for source code summarization: the words and tokens in the body of a subroutine are one sequence, while the desired natural language summary is the target sequence. This application of NMT to code summarization has shown strong benefits in a variety of applications~\cite{oda2015learning, allamanis2016convolutional, iyer2016summarizing, jiang2017automatically, yin2018mining, hu2018deep}. However, an Achilles' heel to nearly all source code summarization techniques is a reliance on programmers having written high quality internal documentation in the form of identifier names or comments. In order to generate a meaningful summary, meaningful words must be observed in the body of the subroutine. In traditional NMT, this is accepted because a natural language input sentence will definitely have words related to the output target sentence. But in software, the words in code are not actually related to the behavior of that code. A subroutine's behavior is dictated by the structure of programming language keywords and tokens that define control flow, data flow, etc. These differences between code and natural language are a barrier to improving performance in several AI applications to software engineering, as Hellendoorn~\emph{et al.}~\cite{hellendoorn2017deep} pointed out, to some controversy, at FSE'17. In this paper, we present a neural model for summarizing subroutines. Our model combines two types of information about source code: 1) a word representation treating code as text, and 2) an abstract syntax tree (AST) representation. A distinguishing factor of our model compared to earlier approaches is that we treat both representations separately. Previous techniques have shown promise by annotating a word representation with AST information~\cite{hu2018deep}, but ultimately the annotated representation is sent as a single sequence through a standard seq2seq model. In contrast, our model accepts two inputs, one for the word representation and one for the AST. The advantage is that we are able to treat each input with differently, which increases the flexibility of our approach, as we will show in this paper. In essense, the neural model we propose involves two uni-directional gated recurrent unit (GRU) layers: one to process the words from source code, and one to process the AST. We modify the SBT AST flattening procedure by Hu~\emph{et al.}~\cite{hu2018deep} to represent the AST. We then use an attention mechanism to attend words in the output summary sentence to words in the code word representation, and a separate attention mechanism to attend the summary words to parts of the AST. We concatenate the vectors from each attention mechanism to create a context vector. Finally, we predict the summary one word at a time from the context vector, following what is typical in seq2seq models. We evaluate our technique in two stages. First, we collect over 51m Java methods from the Sourcerer repository~\cite{Lopes+Bajracharya+Ossher+Baldi:2010}, and preprocess them to form a dataset of around 2.1m methods with suitable JavaDoc summary comments. We divide the dataset into training/validation/testing sets and perform a set of tests comparing results from our model to three competitive baselines. We call this the \textbf{standard experiment}, because it conforms to common practice in both SE and NLP venues. Second, to evaluate the limits of our model in a scenario without words from source code, we repeat the standard experiment using only the AST for each Java method -- in this study, we assume no code words are available, as in obfuscated code, poorly-written code, or situations in which there is only bytecode (from which an AST can be extracted but code words are likely to have been removed during compilation). This ``no code words'' experiment simulates a situation unique to the SE domain and, as we will show, is far more difficult than the standard application of NMT in which a programmer provides useful keywords. We call this the \textbf{challenge experiment}. Our results, in a nutshell, are: 1) In the standard experiment, our model and the competitive NLP baseline provide comparable performance but with orthogonal predictions, implying that they are good candidates for ensemble decoding. An ensemble provides state-of-the-art performance of 20.9 BLEU (an 8\% improvement over the nearest baseline). 2) In the challenge experiment, our model achieves 9.5 BLEU, versus 0 for any baseline. This is a significant step forward in source code summarization, since it requires zero meaningful code words. We release all data, code, and implementation via our online appendix (see Section~\ref{sec:reproducibility}). \section{Reproducibility} \label{sec:reproducibility} Our dataset, code, models, and results are available via: \url{https://bit.ly/2MLSxFg} \section*{Acknowledgment} {\small This work is supported in part by the NSF CCF-1452959, CCF-1717607, and CNS-1510329 grants. Any opinions, findings, and conclusions expressed herein are the authors and do not necessarily reflect those of the sponsors} \bibliographystyle{IEEEtran} \section{Problem and Overview} We target the problem of source code summarization of subroutines -- automatic generation of natural language descriptions of subroutines. Specifically, we target summarization of Java methods, with the objective of creating method summaries like those used in JavaDocs. While we limit the scope of the experiments in this paper to a large Java dataset, in principle the techniques described in this paper are applicable to any programming language that has subroutines, from which an AST can be computed, and from which text e.g. identifier names can be extracted. Our scoping of our target problem is consistent with the problem definition in many papers on code summarization~\cite{hu2018deep, mcburney2016automatic, rastkar2011generating, sridhara2010towards, richardson2017code2text}. A solution to this problem would have many practical applications. The primary practical application would be in automatic documentation generation, to help programmers write documentation more quickly, as well as understand code that has not been documented. Of the 51m Java methods we found in the Sourcerer dataset, only about 10\% have any sort of method summary, and only about 4\% contain summaries that met basic quality filters we define in Section~\ref{sec:corpus}. In our view, it seems likely that more than 4\% ``should'' be documented well, and an automatic summary generator would help improve the amount of code that could be documented. But more generally, our goal for this paper is to also contribute to an ongoing academic debate about how to represent source code to solve software engineering problems using AI. As mentioned, there is reasonable doubt~\cite{hellendoorn2017deep} that neural-based techniques are even appropriate for software engineering data; a recent workshop at AAAI'18~\cite{NL4SEAAAI:2018} focused heavily on this debate. Given the long history of AI use to solve SE problems~\cite{xie2018intelligent}, our sincere hope for this paper is to provide insight into ways to build neural models of SE data, even for researchers outside of the specific task of code summarization. We have made significant efforts to keep our data and techniques public and reproducible (see Section~\ref{sec:reproducibility}) to help these other researchers as much as possible. An overview of this paper is below. In the next section we cover background and related technologies. Then, we introduce our proposed neural model. We then describe how we obtained and processed the Java datasets we use. We conduct the standard and challenge experiments on the same set of Java methods. Finally, we spend significant space on examples and discussion. We feel an in-depth look at examples where the model worked and did not will provide key insights for improving or adapting the model in the future. \begin{figure}[!b] \centering \vspace{-0.5cm} \includegraphics[width=0.30\textwidth]{figures/funcom_overview.png} \vspace{-0.1cm} \label{fig:overview} \end{figure} \section{Evaluation Results} \label{sec:results} This section discusses our evaluation results and observations. After answering our research questions, we explore examples to give an insight into how the network functions and why it works. Note that we use these observations to build an ensemble method at the end of this paper. \setcounter{figure}{0} \begin{figure}[b!] \centering \vspace{-0.6cm} \includegraphics[width=0.35\textwidth]{figures/bleu-regular.png} \vspace{0.0cm} {\small \begin{tabular}{p{2cm}|p{0.5cm}p{0.5cm}p{0.5cm}p{0.5cm}p{0.5cm}|p{1cm}} model & B & B1 & B2 & B3 & B4 & dataset \\ \hline ast-attendgru & 19.6 & 39.3 & 22.2 & 14.9 & 11.4 & \multirow{4}{*}{standard} \\ attendgru & 19.4 & 39.0 & 22.0 & 14.8 & 11.3 & \\ sbt & 14.0 & 31.8 & 16.0 & 10.1 & 7.5 & \\ codenn & 9.95 & 21.2 & 9.7 & 7.6 & 6.3 & \\ \hline ast-attendgru & 9.47 & 25.7 & 11.0 & 6.1 & 4.7 & challenge \end{tabular} } \caption{{\small Below are BLEU1-4 scores and the composite BLEU score for each approach and dataset. Above, the chart depicts the composite scores only. We observe that attendgru and ast-attendgru perform equally in terms of BLEU score on the standard set, though we improve it with an ensemble decoder in Section~\ref{sec:ensemble}.}} \label{fig:resultsoverview} \vspace{-0.5cm} \end{figure} \subsection{RQ$_1$: Standard Experiment} We found in the standard experiment that {\small \texttt{ast-attendgru}} and {\small \texttt{attendgru}} obtain roughly equal performance in terms of BLEU score, but provide orthogonal results, as we will explain in this section and the example in subsection \emph{C}. In terms of BLEU score, {\small \texttt{ast-attendgru}} and {\small \texttt{attendgru}} are roughly equal in performance: 19.6 BLEU vs 19.4 BLEU. {\small \texttt{SBT}} is lower, at about 14 BLEU, and {\small \texttt{codenn}} is about 10 BLEU. Figure~\ref{fig:resultsoverview} includes a table with the full BLEU results for each result (and additional data in our online appendix). For {\small \texttt{SBT}}, the results conflicted with our expectations based on the presenting paper~\cite{hu2018deep}, in which {\small \texttt{SBT}} outperformed a standard seq2seq model like {\small \texttt{attendgru}}. We see two possible explanations: First, even though our seq2seq baseline implementation represents a standard approach, there are a few architectural differences from the paper by Hu~\emph{et al.}~\cite{hu2018deep}, such as different embedding vector sizes. While we did not observe major changes in the results from these architectural differences in our own pilot studies, it is possible that ``one's mileage may vary'' depending on the dataset. Second, as we note in Sections~\ref{sec:background} and~\ref{sec:corpus}, the previous study did not split by project, so methods in the same project will be in the training and test set. The very high reported BLEU scores in~\cite{hu2018deep} could be explained by overloaded methods with very similar structure -- {\small \texttt{SBT}} would detect a function in the test set with a very similar AST to an overloaded method in the same project in the training set. The improvement by all approaches over {\small \texttt{codenn}} matches expectations from previous experiments. The {\small \texttt{codenn}} approach was intended as a versatile technique for both code search and summarization, and was a relatively early attempt at applying NMT to the code summarization problem. In addition, it was designed for C\# and SQL datasets; we adapted it to Java as described in the previous section. A key observation of the standard experiment is that {\small \texttt{ast-attendgru}} and {\small \texttt{attendgru}} provide \textbf{orthogonal} predictions -- there is a set of methods in which one performs better, and a different set in which the other has higher performance. While {\small \texttt{ast-attendgru}} is slightly ahead of {\small \texttt{attendgru}}, we do not view a 0.2 BLEU difference a major improvement in and of itself. Normally we would expect an approach to outperform a different approach by some margin across a majority of the examples (i.e. non-orthogonal performance), and this is indeed what we observe when comparing {\small \texttt{ast-attendgru}} to {\small \texttt{SBT}}, as shown on the left below (around 60k methods in which {\small \texttt{ast-attendgru}} performed better, vs. 20k for {\small \texttt{SBT}}): \begin{figure}[h!] \vspace{-0.4cm} \centering \includegraphics[width=0.49\textwidth]{figures/bleu-better.png} \vspace{-0.8cm} \end{figure} But what we observe for {\small \texttt{ast-attendgru}} and {\small \texttt{attendgru}} is that there are two sets of roughly 33k methods in the 91k test set in which one or another approach has higher performance (above, right). In other words, among the predictions in which there was a difference between the approaches, {\small \texttt{ast-attendgru}} and gives better predictions (in terms of BLEU score) for about half, while {\small \texttt{attendgru}} performs better on about half. Orthogonal performance makes these two approaches a good candidate for ensemble prediction, which we further explain in subsection \emph{C} and Section~\ref{sec:ensemble}. \setcounter{figure}{2} \begin{figure*}[b!] \vspace{-0.5cm} \centering \includegraphics[width=\textwidth]{figures/49111725_dot-2_astattendgru.png} \vspace{-0.6cm} \caption{Heatmap of the attention layer in {\small \texttt{ast-attendgru}} for the AST input for Example 1. The x-axis is the summary input and the y-axis is the AST (SBT-AO) input. High activation (more yellow) indicates more attention paid to e.g. position 48 of the AST input.} \label{fig:astattend} \end{figure*} \subsection{RQ$_2$: Challenge Experiment} We obtain a BLEU score of about 9.5 for {\small \texttt{ast-attendgru}} in the challenge experiment. Note that the only difference between the standard and challenge experiments is that we trained and tested using the AST only, in the form of the SBT-AO representation fed to {\small \texttt{ast-attendgru}}. Technically, there are other configurations that would produce the same result, such as using SBT-AO as input to {\small \texttt{attendgru}} instead of the source code. Any of these configurations would meet our objective with this experiment of establishing performance for the scenario when only an AST is available. \subsection{Explanation and Example} Merely reporting BLEU scores leaves an open question as to what the scores mean in practice. Consider these two examples from the standard and challenge experiments (method IDs align with our downloadable dataset for reproducibility). We chose the following examples for illustrative purposes, and as an aid for explanation. While relatively short, we feel that these methods provide a useful insight into how the models operate. For a more in depth analysis, a human evaluation would be required, which is beyond the scope of this paper. Example 1 is one of the cases where {\small \texttt{ast-attendgru}} succeeds when {\small \texttt{attendgru}} fails. To understand why, recall that, in our model as with a majority of NMT systems, the system predicts a sentence one word at a time. For each word, the model receives information about the method (the code/text plus the AST for models that use it), along with each word that has been predicted so far. \vspace{-0.2cm} \begin{figure}[h!] \textbf{Example 1}, Method ID 49111725: {\small \begin{verbatim} public Config tokenUrl(String tokenUrl) { this.tokenUrl = tokenUrl; return this; } \end{verbatim} \vspace{-0.1cm} \begin{tabular}{llm{5.5cm}} \emph{reference} & & sets the token url \\ \hline ast-attendgru & & sets the token url \\ \cline{3-3} attendgru & \multirow{1}{*}{stan.} & returns the url of the token \\ \cline{3-3} sbt & & sets the $<$UNK$>$ \\ \cline{1-3} ast-attendgru & chal. & sets the value of the $<$UNK$>$ property \\ \hline \end{tabular} \vspace{0.5cm} \emph{Tokenized code/text input:} $<$s$>$ public config token url string token url this token url token url return this $<$/s$>$ \begingroup \linespread{1.5}% \selectfont \emph{SBT-AO input:} \textcolor{Fuchsia}{( unit ( function ( specifier ) specifier\_OTHER ( type ( name ) name\_OTHER ) type ( name ) name\_OTHER} \textcolor{Emerald}{( parameter\_list ( parameter ( decl ( type ( name ) name\_String ) type ( name ) name\_OTHER ) decl ) parameter ) parameter\_list} ( block ( \textcolor{Orange}{expr\_stmt} ( expr ( name ( name ) name\_OTHER ( operator ) operator\_OTHER ( name ) name\_OTHER ) name ( operator ) operator\_OTHER ( name ) name\_OTHER ) expr ) \textcolor{BrickRed}{expr\_stmt} ( return ( expr ( name ) name\_OTHER ) expr ) return ) block ) function ) unit \endgroup \vspace{0.3cm} \setcounter{figure}{1} \centering \begin{subfigure}[b]{0.40\linewidth} \includegraphics[width=\textwidth]{figures/49111725_activation-1_attendgru.png} ~~~~~~~~~(a) {\small \texttt{attendgru}} \end{subfigure} ~ \begin{subfigure}[b]{0.20\textwidth} \includegraphics[width=\textwidth]{figures/49111725_activation-1_astattendgru.png} ~~~~~~(b) {\small \texttt{ast-attendgru}} \end{subfigure} \vspace{-0.1cm} \caption{{\small Heatmaps of the attention layer in (a) {\small \texttt{attendgru}} and (b) {\small \texttt{ast-attendgru}} for the code/text input for Example 1. The x-axis is the 13 positions in the summary input. The y-axis is the 100 positions in the code input. Images are truncated to code input length.}} \label{fig:codeattend} } \end{figure} \noindent So to predict ``token'', {\small \texttt{ast-attendgru}} would receive the code/text, the AST, and the phrase ``sets the''.In contrast, {\small \texttt{attendgru}} only receives the code/text and ``sets the''. To predict the first word, ``sets'', {\small \texttt{attendgru}} only knows that it is the start of the sentence (indicated by a start-of-sentence $<$s$>$ token), and the code/text input. To help make the prediction {\small \texttt{attendgru}} is equipped with an attention layer learned during training to attend to certain parts of the input. That layer is depicted in Figure~\ref{fig:codeattend}(a). Note that there is high activation (bright yellow) in position (14, 1), indicating significant attention paid to location 14 in the code/text input: this is the word return. What has happened is that, during training, the model saw many examples of getter methods that were only a few lines and ended with a return. In many cases, the model could rely on very explicit method names, such as {\small \texttt{getPlayerScore}} (method ID 38221679). {\small \texttt{attendgru}} performed remarkably well in these cases, as the situation is quite like natural language -- it learns to align words in the input vocabulary to words in the target vocabulary, and where they belong in a sentence. However, in cases such as Example 1 where the method name does not clearly state what the method should do (the name {\small \texttt{tokenUrl}} is not obviously a setter), {\small \texttt{attendgru}} struggles to choose the right words, even if, as in Example 1, it correctly identifies the subject of the action (``url of the token''). \vspace{-0.05cm} These situations are where the AST is beneficial. The code/text activation layer for {\small \texttt{ast-attendgru}} attends heavily to the start of sentence token (note column 0 in Figure~\ref{fig:codeattend}(b)), which, since $<$s$>$ is the start of every sentence, probably acts like a ``not sure'' signal. But the model also has the AST input. Figure~\ref{fig:astattend} shows the AST attention layer of {\small \texttt{ast-attendgru}} when trying to predict the first word. There are four areas of interest that help elucidate how the model processes the structure of the model, denoted A through D in the figure, and color-coded to the corresponding areas in the AST input. First, area A, is the portion of the method signature prior to the parameter. Recall that our AST representation is structure only, so almost all methods will start the same way. So as expected, the attention in area A is largely formless. The heatmap shows much more definition in area B. It is the parameter list, and the model has likely learned that short methods with parameter lists tend to be setters. The model activates very heavily at locations C and D, which are the start and end of the expr\_stmt AST node. A very common situation in the training set is that a short method with a parameter and an assignment is a setter. The model has learned this and chose ``sets'' as the first word. All of the models with AST input correctly chose ``sets''. {\small \texttt{SBT}} found that the method is a setter, but could not determine what was being set -- we attribute this behavior to the fact that the SBT representation blends the code/text and structural information into a single input, which creates a challenge for the model to learn orthogonal types of information in the same vector space (which work in other areas e.g. image captioning implies is not advisable~\cite{vinyals2015show}). While there is not space in this paper to explore fully, we note that even {\small \texttt{ast-attendgru}} during the challenge experiment correctly characterized the method as setting the value of a property, generating an unknown token when it could not determine which property. In fact, {\small \texttt{ast-attendgru}} correctly predicted the first word of the summary (which is usually a verb) 33\% of the time during the challenge experiment, compared to 52\% of the time in the standard experiment. Briefly consider Example 2: \vspace{-0.3cm} \begin{figure}[h!] \textbf{Example 2}, Method ID 40490666: \vspace{-0.25cm} {\small \begin{verbatim} public void disconnect() { try { socket.flush(); socket.close(); connected = false; notifyDisconnect(); } catch (IOException ex) { ex.printStackTrace(); } } \end{verbatim} \begin{tabular}{llm{5.5cm}} \emph{reference} & & closes the socket for reconnection \\ \hline ast-attendgru & & disconnect from the server \\ \cline{3-3} attendgru & \multirow{1}{*}{stan.} & disconnects from the server \\ \cline{3-3} sbt & & disconnect from the server \\ \cline{1-3} ast-attendgru & chal. & closes the connection \\ \hline \end{tabular} } \end{figure} \vspace{-0.3cm} All approaches performed well for this method, but for different reasons. {\small \texttt{attendgru}} linked the method name to the verb ``disconnects''. {\small \texttt{SBT}} relied more on later features such as the call to notifyDisconnect(). Most interestingly, {\small \texttt{ast-attendgru}} performed best in the challenge experiment. In exploring this result, we found a few methods with a similar AST (IDs 146827, 22838818, 28418561, 5785101). All of these had a few lines in a try block followed by a short catch block, and 2-3 method calls and assignments to null or false in the try. These methods had summaries like ``close the communication with the gps device'', ``stops the timer'', and ``disconnect from the current client'' -- all these methods deal with close and cleanup behavior. The model probably learned this during training, and chose similar words for the summary. In answering RQ$_1$, we found that {\small \texttt{attendgru}} and {\small \texttt{ast-attendgru}} performed better on different sets of methods. While we are hesitant to overinterpret single examples, the examples in this section are consistent with numerous others in the dataset (we provide a script for randomly sampling examples called rand\_samples\_preds.py in our online appendix for interested readers). The examples are also consistent with the interpretation that the off-the-shelf NMT system ({\small \texttt{attendgru}}) performs quite well in cases where the summaries are clear from the method signature, and in these cases the AST may be superfluous. But, the model benefits from the AST in cases when words in the code/text input are not sufficient or clear.
\section{Introduction} Modeling unordered, non-\emph{i.i.d.}\xspace data is an important problem in machine learning and data science. Collections of data objects with complicated intrinsic relationships are ubiquitous.\blfootnote{\textsuperscript{\rm $\dagger$}Equal contribution}\footnote{This paper is an updated version of preliminary work detailed in \cite{bender2019permutation}} These collections include sets of 3d points sampled from the surface of complicated shapes like human organs, sets of images shared within the same web page, or point cloud LiDAR data observed by driverless cars. In any of these cases, the collections of data objects do not possess any inherent ordering of their elements. Thus, any generative model which takes these data as input should not depend on the order in which the elements are presented \emph{and} must be flexible enough to capture the dependencies between co-occurring elements. The unorderedness of these kinds of collections is captured probabilistically by the notion of \emph{exchangeability}. Formally, a set of points $\{x_j\}_{j=1}^n \subset \mathbb{R}^d$ with cardinality $n$, dimension $d$, and probability density $p(\cdot)$ is called exchangeable if \begin{align}\label{eq:exchangeable} p(x_1, ..., x_n) = p(x_{\pi_1}, ..., x_{\pi_n}) \end{align} for every permutation $\pi$. In practice $\{x_j\}_{j=1}^n$ often represent 2d or 3d spatial points (see \reffig{fig:setsofsets_graphic}) in which case we refer to the set as a point cloud. In other settings, the points of interest may be more complex like images represented as very high-dimensional vectors. As a simple example, one may trivially generate a set of exchangeable points by drawing them \emph{i.i.d.}\xspace from some distribution. More commonly, elements within an exchangeable set share information with one another, providing structure. Despite the abundance of such data, the bulk of existing approaches either ignore the relation between points (\emph{i.i.d.}\xspace methods) or model dependencies in a manner that depends on inherent orderings (sequential methods) \cite{rezatofighi2017deepsetnet,you2018graphrnn}. In order to accurately learn the structure of a set whilst preserving the exchangeability of its likelihood, one cannot rely solely on either approach. In this work, we focus on the task of tractable, non-\emph{i.i.d.}\xspace density estimation for exchangeable sets. We explore both low cardinality sets of high dimension (10-20 points with many hundreds of dimensions each, e.g.~collections of images) and high cardinality sets of low dimension (hundreds of points with 2-7 dimensions each, e.g.~point clouds). We develop a generative model suitable for exchangeable sets in either regime, called FlowScan\xspace, which does not rely on \emph{i.i.d.}\xspace assumptions and is provably exchangeable. Contrary to intuition, we show that one can preserve exchangeability while scanning over the data in a sorted manner. \emph{FlowScan\xspace is the first method to achieve a tractable, non-\emph{i.i.d.}\xspace, exchangeable likelihood by leveraging traditional (e.g.~sequential), non-exchangeable density estimators.} \begin{figure}[t] \centering \includegraphics[scale=0.4]{figures/samples/set_of_sets_graphic_NIPS2019_final.png} \caption{A training dataset of sets. Each instance $\mathcal{X}_i$ is a set of points $\mathcal{X}_i = \{x_{i,j}\in \mathbb{R}^d\}_{j=1}^{n_i}$ ($d=2$ shown). We estimate $p(\mathcal{X}_i)$, from which we can sample distinct sets.} \label{fig:setsofsets_graphic} \end{figure} \textbf{Main Contributions.} 1) We show that transforming points with an equivariant change of variables allows for modeling sets in a different space. 2) We introduce a scanning-based technique for modeling exchangeable data, relating the underlying exchangeable likelihood to that of the sorted covariates. 3) We demonstrate how traditional density estimators may be used for the task of principled and feasible exchangeable density estimation via a scanning-based approach. 4) We show empirically that FlowScan\xspace achieves the state-of-the-art for density estimation tasks in both synthetic and real-world point cloud and image set datasets. \section{Motivation and Challenges} We motivate our problem with a simple, yet common, set generative process that requires a \emph{non}-\emph{i.i.d.}\xspace, exchangeable density estimator. Consider the following generative process for a set: 1) generate \emph{latent} ``parameters'' $\phi \sim p_\Phi(\cdot)$ and then 2) generate a set $\mathcal{X} \sim p(\cdot \mid \phi)$. Here $p(\cdot \mid \phi)$ may be as simple as a Gaussian model (where $\phi$ is the mean and covariance parameters) or as complex as a nonparametric model (where $\phi$ may be infinite-dimensional). This simple set generative process requires a \emph{non}-\emph{i.i.d.}\xspace approach, even for the case when the ground truth conditional set likelihood, $p(\mathcal{X} \mid \phi)$, is \emph{conditionally} \emph{i.i.d.}\xspace. We show this by first noting that with \emph{conditionally} \emph{i.i.d.}\xspace ${p(\mathcal{X} \mid \phi)} = {\prod_{j=1}^n p(x_j \mid \phi)}$, the complete set likelihood is: \begin{align} p(\mathcal{X}) = \int p_\Phi(\phi) \prod_{j=1}^n p(x_j \mid \phi) \,\mathrm{d} \phi. \label{eq:gen_proc_sets} \end{align} (Note, that \refeq{eq:gen_proc_sets} is in the same vein as De Finetti's theorem \cite{bernardo2009bayesian}.) One can show dependency (\emph{non}-\emph{i.i.d.}\xspace) with the conditional likelihood of a single point $x_k$ given a disjoint subset $S \subset \mathcal{X} \setminus \{x_k\}$: $ p(x_k \mid S) = {\int p_\Phi(\phi \mid S)\, p(x_k \mid S ,\phi) \, \mathrm{d} \phi} = {\int p_\Phi(\phi \mid S)\, p(x_k \mid \phi) \, \mathrm{d} \phi} \neq {\int p_\Phi(\phi)\, p(x_k \mid \phi) \, \mathrm{d} \phi} = p(x_k). $ That is, the conditional likelihood $p(x_k \mid S)$ depends on other points in $\mathcal{X}$ via the posterior $p_\Phi(\phi \mid S)$, which accounts for what $\phi$ was likely to have generated $S$. As a consequence, the complete generative process \eqref{eq:gen_proc_sets} is \emph{not marginally} \emph{i.i.d.}\xspace, notwithstanding the \emph{conditional} \emph{i.i.d.}\xspace ${p(\mathcal{X} \mid \phi)}$. Thus, any model built on an \emph{i.i.d.}\xspace assumption may be severely biased. The generative process in Eq. \eqref{eq:gen_proc_sets} is especially applicable for surface point cloud data. For such sets, $\mathcal{X}_i$, points are drawn \emph{i.i.d.}\xspace from (conditioned on) the surface of a shape with (\emph{unknown}) parameters $\phi_i$ (e.g.~object class, length, orientation, noise, etc.), resulting in the dataset $\mathcal{D} = \{ \mathcal{X}_i \sim {p(\cdot\mid \phi_i)} \}_{i=1}^N$ of $N$ sets. As shown above, modeling such point cloud set data requires a \emph{non}-\emph{i.i.d.}\xspace approach even though points may be drawn independently given the surface parameters. FlowScan\xspace will not only yield an exchangeable, \emph{non}-\emph{i.i.d.}\xspace generative model, but will also directly model elements in sets without latent parameters. In effect, FlowScan\xspace will automatically marginalize out dependence on latent parameters of a given set, and is thus capable of handling complicated $p(\cdot\mid \phi)$. Broadly, the primary challenge in direct exchangeable density estimation is designing a flexible, invariant architecture which yields a valid likelihood. As explained above, using an \emph{i.i.d.}\xspace assumption to enforce this property will severely hamper the performance of a model. To avoid this simplification, techniques often shoehorn invariances to observed orderings by feeding randomly permuted data into sequential models \cite{rezatofighi2017deepsetnet,you2018graphrnn}. Such approaches attempt to average out the likelihood of the model over all permutations: \begin{align} \label{eq:permavg} p(\mathcal{X}) = \frac{1}{n!} \sum_{\pi} p_s(x_{\pi_1}, \ldots, x_{\pi_n}), \end{align} where $p_s$ is some sequential model. Of course, the observation of all potential orderings for even a modest collection of points is infeasible. Furthermore, there are often no guarantees that the sequential model $p_\mathrm{seq}$ will learn to ignore orderings, especially for unseen test data \cite{vinyals2015order}. Given that an \emph{i.i.d.}\xspace assumption is not robust and averaging over all permutations is infeasible, what operation should be used to ensure permutation invariance of the architecture? Instead of attempting to wash out the effect of order in an architecture as in \refeq{eq:permavg}, we propose to enforce invariance by adopting a prespecified ordering and scanning over elements in this order. As will be discussed in the Methods section, the benefit of estimating a likelihood over sorted data is that it frees us from the restriction of exchangeability. Given the sorted data, we can apply any number of traditional density estimators. However, such an approach presents its own challenges: \begin{itemize}[leftmargin=*] \item \textbf{Determining a suitable way to scan through an exchangeable sequence.} That is, one must map the set $\mathcal{X} = \{x_j\}_{j=1}^n$ to a sequence $\mathcal{X} \mapsto (x_{[1]}, \ldots, x_{[n]})$ where $x_{[j]}$ denotes the $j$'th point in the sorted order. \item \textbf{Relating the likelihood of the scanned sequence to likelihood of the exchangeable set.} Modeling the exchangeable likelihood through a scanned likelihood is not immediately obvious; \emph{a simple equality of the two does not hold}, $p(\mathcal{X}) \neq p(x_{[1]}, \ldots, x_{[n]})$. \item \textbf{Scanning in a space that is beneficial for modeling.} The native input space may not be best suited for modeling or scanning, hence it would be constructive to transform the exchangeable input prior to the scan. \item \textbf{Developing an architecture that exploits the structure gained in the scan.} The scanning operation will introduce sequential correlations among elements which need to be modeled successfully. \end{itemize} Next, we develop the FlowScan\xspace model while addressing each of these challenges. \section{Methods} FlowScan\xspace consists of three components: 1) a sequence of equivariant flow transformations ($\hat{q}_e$), \emph{to map the data to a space that is easier to model}; 2) a sort with correction factor \emph{to allow for the use of non-exchangeable density estimators}; 3) a density estimator ($\hat{p}_s$) (e.g.~an autoregressive model which may utilize sequential flow transformations, $\hat{q}_c$), \emph{to estimate the likelihood while accounting for correlations induced by sorting} (see \reffig{fig:scan_model}). In this section, we motivate each piece of the architecture and detail how they combine to yield a highly flexible, exchangeable density estimator. \begin{figure*}[t] \centering \includegraphics[scale=0.6]{figures/scan_model.pdf} \caption{Illustration of our proposed method. First, input sets are scanned (in a possibly transformed space). After, the scanned covariates are modeled (possibly in a autoregressive fashion, as shown).} \label{fig:scan_model} \end{figure*} \subsection{Equivariant Flow Transformations} FlowScan\xspace first utilizes a sequence of equivariant flow transformations. So-called ``flow models'' rely on the change of variables formula to build highly effective models for traditional non-exchangeable generative tasks (like image modeling) \cite{kingma2018glow}. Using the change of variables formula, flow models approximate the likelihood of a $d$-dimensional distribution over real-valued covariates $x = (x^{(1)}, ..., x^{(d)}) \in \mathbb{R}^d$, by applying an invertible (flow) transformation $\hat{q}(x)$ to an estimated base distribution $\hat{f}$: \begin{align} \hat{p}(x^{(1)}, ..., x^{(d)}) = \bigg|\mbox{det}\frac{\mathrm{d} \hat{q}}{\mathrm{d} x}\bigg| \hat{f}(\hat{q}(x)), \label{eq:TAN} \end{align} where $|\mbox{det}\frac{\mathrm{d} \hat{q}}{\mathrm{d} x}|$ is the Jacobian of the transformation $\hat{q}$. Often, the base distribution is a standard Gaussian. However, \cite{oliva2018transformation} recently showed that performance may be improved with a more flexible base distribution on transformed covariates such as an autoreggressive density \cite{pmlr-v37-germain15,pmlr-v32-gregor14,pmlr-v15-larochelle11a,JMLR:uria,NIPS2013_uria}. There are a myriad of possible invertible transformations, $\hat{q}$, that one may apply to inputs $\mathbf{x} \in \mathbb{R}^{n \times d}$ in order to model elements in a more expressive space. However, in our case one must take care to preserve exchangeability of the inputs when transforming the data. For example, a simple affine change of variables will be sensitive to the order in which the elements of $\mathbf{x}$ were observed, resulting in a space which is no longer exchangeable. One can circumvent this problem by requiring that any transformation, $\hat{q}$, used is \emph{equivariant}. That is, for all permutation operators, $\Gamma$, we have that $ \hat{q}(\Gamma \mathbf{x}) = \Gamma \hat{q}(\mathbf{x}) $. Proposition \ref{prop:eq_trans} states that equivariance of the transformations in conjunction with invariance of the base distribution is enough to ensure that exchangeability is preserved, \emph{allowing one to model set data in a transformed space}. The proof is straightforward and relegated to the Appendix. \setcounter{section}{1} \setcounter{theorem}{1} \begin{prop}\label{prop:eq_trans} Let $\hat{q}: \mathbb{R}^{n \times d} \mapsto \mathbb{R}^{n \times d}$ be a \emph{permutation equivariant}, invertible transformation and the base distribution, $\hat{f}$, be exchangeable. Then the likelihood, $\hat{p}(\mathbf{x}) = \big| \emph{det} \frac{\mathrm{d} \hat{q}}{\mathrm{d} \mathbf{x}}\big| \hat{f}(\hat{q}(\mathbf{x}))$, is exchangeable. \end{prop} Given an invertible transformation, $q: \mathbb{R}^d \rightarrow \mathbb{R}^d$, one may construct a simple permutation equivariant transformation by applying it to each point in a set independently: $(x_1, ..., x_n) \mapsto (q(x_1), ..., q(x_n))$. However, it is possible to engineer equivariant transformations which utilize information from other points in the set while still preserving equivariance. Proposition \ref{prop:eq_trans} shows that FlowScan\xspace is compatible with any combination of these transformations. \paragraph{Set-Coupling} Among others, we propose a novel set-level scaling and shifting coupling transformation \cite{DBLP:journals/corr/DinhSB16}. For $d$-dimensional points, the coupling transformation scales and shifts one subset, $S \subset \{1, \ldots, d\}$ of the $d$ covariates given then rest, $S^c$ as (letting superscripts index point dimensions): \begin{align} \xind{S} &\mapsto \exp\left(f\left(\xind{S^c}\right)\right) \cdot \xind{S} + g\left(\xind{S^c}\right) \notag \\ \xind{S^c} &\mapsto \xind{S^c} \label{eq:nvp_coup}, \end{align} for learned functions $f, g: \mathbb{R}^{|S^c|} \mapsto \mathbb{R}^{|S|}$. We propose a set-coupling transformation as follows: \begin{align} &\resizebox{0.95\columnwidth}{!}{$\pind{x_i}{S} \mapsto \exp \left( f \left(\varphi(\pind{\mathbf{x}}{S^c}), \pind{x_i}{ S^c}\right)\right) \cdot \pind{x_i}{S} + g\left(\varphi(\pind{\mathbf{x}}{S^c}), \pind{x_i}{S^c}\right)$} \notag \\ &\pind{x_i}{S^c} \mapsto \,\pind{x_i}{S^c}, \end{align} where $\pind{\mathbf{x}}{S^c} \in \mathbb{R}^{n \times |S^c|}$ is the set of unchanged covariates, $\varphi(\pind{\mathbf{x}}{S^c})\in \mathbb{R}^r$ are learnable permutation invariant features (using an architecture like \cite{zaheer2017deep}), and $f, g: \mathbb{R}^{r+|S^c|} \rightarrow \mathbb{R}^{|S|}$ are learned functions. The embedding $\varphi$ is responsible for capturing the set-level information from other covariates. This is then combined with each point $\pind{x_i}{S^c}$ to yield shifts and scales with both point- and set-level dependence (see~\reffig{fig:setnvp_graphic}). The log-determinant and inverse are detailed in the Appendix along with several other examples of flexible, equivariant transformations. \begin{figure}[h!] \centering \includegraphics[width=0.98\linewidth]{figures/graphics/all_together_crop_2.png} \caption{An illustration of how set-coupling transformations act on a set. The first plot shows the input data to be transformed. In the subsequent plots, the set is transformed in an invertible, equivariant fashion by stacking set-coupling transformations. Iteratively transforming dimensions of a set in this way yields a set with simpler structure that may be modeled more easily, as shown in the last plot.} \label{fig:setnvp_graphic} \end{figure} \subsection{Invariance Through Sorting}\label{sec:scan_invariance} After applying a series of equivariant flow transformations, FlowScan\xspace performs a sort operation and corrects the likelihood with a factor of $1/n!$. Sorting in a prespecified fashion ensures that different permutations of the input map to the same output. In this section, we prove that this yields an analytically correct likelihood and comment on the advantages of such an approach. Specifically, we show that the exchangeable (unordered) likelihood of a set of $n$ points $p_e(x_1, \ldots x_n)$ (where $x_j \in \mathbb{R}^d$) can be written in terms of the non-exchangeable (ordered) likelihood of the points in a sorted order $p_s(x_{[1]}, \ldots, x_{[n]})$ as stated in Prop.~\ref{prop:exch_lkhd_vs_sort_lkhd} below. \begin{prop}\label{prop:exch_lkhd_vs_sort_lkhd} Let $p_e$ be an exchangeable likelihood which is continuous and non-degenerate (e.g.~$\forall j\in\{1, \ldots, d\}$ $\Pr[x^{(j)}_1 \neq x^{(j)}_2 \neq \ldots \neq x^{(j)}_n] = 1$). Then, \begin{align} p_e(x_1, \ldots x_n) = \frac{1}{n!} p_s(x_{[1]}, \ldots, x_{[n]}), \label{eq:sort_like} \end{align} where $x_{[j]}$ is the $j$th point in the sorted order. \begin{proof} We derive \refeq{eq:sort_like} from a variant of the change of variables formula \cite{casella2002statistical}. It states that if we have a partition of our input space, $\{\mathcal{A}_j\}_{j=1}^M$, such that a transformation of variables $q$ is invertible in each partition $\mathcal{A}_j$ with inverse $q^{-1}_j$, then we may write the likelihood $f$ of $z = q(u)$ in terms of the likelihood $p$ of the input data $u$ as: \begin{align} f(z) = \sum_{j=1}^M \Abs{\det \frac{\mathrm{d} q^{-1}_j}{\mathrm{d} z}} p(q^{-1}_j(z)) \label{eq:changevars}. \end{align} For the moment, suppose that the points $\{x_j\}_{j=1}^n$ are sorted according to the first dimension. That is, $x_{[1]}, \ldots, x_{[n]}$ in \refeq{eq:sort_like} are such that $x_{[1]}^{(1)} < \ldots < x_{[n]}^{(1)}$. The act of sorting these points amounts to a transformation of variables $s: \mathbb{R}^{n \times d} \mapsto \mathbb{R}^{n \times d}$, $s(x_1, \ldots, x_n) = (x_{[1]}, \ldots, x_{[n]})$. The transformation $s$ is one-to-one on the partitions of the input space $\mathbb{R}^{n \times d}$ defined by the relative order of points. In other words, we may partition the input space according to the permutation that would sort the data: $\mathcal{A}_{\pi} = \{\mathbf{x} \in \mathbb{R}^{n \times d} \mid x_{\pi_1}^{(1)} < x_{\pi_2}^{(1)} < \ldots < x_{\pi_n}^{(1)} \}$. We may invert $s$ in $\mathcal{A}_{\pi}$ via the inverse permutation matrix of $\pi$, $\Gamma^{-1}_\pi$. Letting $\Pi$ be the set of all permutations, \refeq{eq:changevars} yields: \begin{align} p_s(s(\mathbf{x})) \overset{*}{=} \sum_{\pi \in \Pi} \Abs{\Gamma^{-1}_\pi} p_e(\Gamma^{-1}_\pi s(\mathbf{x})) \overset{**}{=} n!\, p_e(\mathbf{x}), \end{align} where (*) follows from \refeq{eq:changevars} and (**) follows from the exchangeability of $p_e$. Thus, we may compute the exchangeable likelihood $p_e(\mathbf{x})$ using the likelihood of the sorted points, as in \refeq{eq:sort_like}. Trivially, similar arguments also hold when sorting according to a dimension other than the first. Furthermore, it is possible to sort according any appropriately transformed space of $x_j$, rather than any native dimension itself (as this is equivalent to applying a transformation, sorting, and inverting said transformation). \end{proof} \end{prop} Consequently, the exchangeable likelihood may be estimated via an approximation of the scanned covariates: $p_e(\mathbf{x}) \approx \frac{1}{n!}\, \hat{p}_s(s(\mathbf{x}))$. Since the density of sorted scan is not exchangeable, we may estimate $\hat{p}_s$ using traditional density estimation techniques. \emph{This gives a principled approach to reduce the problem of exchangeable likelihood estimation to a flat vector (or sequence) likelihood estimation task.} \subsection{Autoregressive Scan Likelihood} After performing equivariant flow transformations and sorting, FlowScan\xspace applies a non-exchangeable density estimator to model the transformed and sorted data. Let $z = s(\hat{q}(\mathbf{x})) \in \mathbb{R}^{n \times d}$ be the sorted covariates. Since $z$ is not exchangeable, one can apply any traditional likelihood estimator on its covariates, e.g.~one may treat $z$ as a vector and model $\hat{p}_s(\mathrm{vec}(z))$ using a flat density estimator. However, flattening in this way suffers from several disadvantages. First, it is inflexible to varying cardinalities. Furthermore, the total number of covariates, $nd$, may be large for sets with large cardinality or dimensionality. Finally, a general flat model loses the context that covariates are from multiple points in some shared set. To address these challenges, we use an autoregressive likelihood: \begin{align} \hat{p}(z_k) = \prod_{k=1}^n \hat{p}(z_k \mid h_{<k}), \label{eq:autoreg_fs} \end{align} where $\hat{p}(z_k \mid h_{<k})$ is itself a $d$-dimensional density estimator (such as \refeq{eq:TAN}) conditioned on a recurrent state $h_{<k} = h(z_1, \ldots, z_{k-1})$. This proposed approach is capable of sharing parameters across the $n$ $d$-dimensional likelihoods and is more amenable to large, possibly varying, cardinalities. \paragraph{Correspondence Flow Transformations} In much the same way that nearby pixels are correlated in image space, nearby points will be correlated in a scan space. Thus, we also propose a coupling \cite{Dinh2014NICENI} invertible transformation to transform adjacent points, exploiting existing correlations among points as follows. We note that it is straightforward to use a sequential coupling transformation to shift and scale points $z_i$ as in \refeq{eq:nvp_coup}, but based on inputting a recurrent output $h_{<i}$ to $f$ and $g$ functions. In addition, it is also possible to split individual points for coupling as follows. First, split the scanned points $z = s(\hat{q}(\mathbf{x})) = (z_1, \ldots, z_n)$ into two groups depending on the parity (even/odd) of their respective index. Second, transform each even point, with a scale and shift based on the corresponding odd point. That is for pairs of points $(z_{2j}, z_{2j+1})$ we perform the following transformation: $(z_{2j}, z_{2j+1}) \mapsto \left(s(z_{2j+1}) z_{2j} + m(z_{2j+1}),\, z_{2j+1}\right)$, where $s: \mathbb{R}^d \mapsto \mathbb{R}^d, m: \mathbb{R}^d \mapsto \mathbb{R}^d$ are scale and shifting functions, respectively, parameterized by a learnable fully connected network. This correspondence coupling transformation $z \mapsto z^\prime$ is easily invertible and has analytical Jacobian determinant $\big|\mbox{det}\frac{\mathrm{d} z^\prime}{\mathrm{d} z}\big| = \prod_{j=0}^{n/2-1} |s(z_{2j+1})|$. Several of these transformations may be stacked before the autoregressive likelihood by alternating between shifting and scaling even points based on odd and vice-versa odd points based on even. We shall also make use of a similar splitting scheme to split sets of images into 3d tensors that are fed into 3d convolution networks for shifting and scaling. \subsection{Complete FlowScan\xspace Architecture} Since the scanned likelihood in \refeq{eq:sort_like} yields an exchangeable likelihood, one may use as the base likelihood following a permutation equivariant transformation as in Prop.~\ref{prop:eq_trans}. This enables us to apply the sorting step after performing any number of equivariant transformations and improve the flexibility of the model as a result. As no generality is lost, we choose to sort on the first dimension in our experiments detailed below. Combining the three components detailed above, we arrive at the complete FlowScan\xspace architecture: a sequence of equivariant flow transformations, a sort with correction factor, and an autoregressive scan likelihood. The estimated exchangeable likelihood that results is: \begin{align} \hat{p}_\mathrm{fs}(\mathbf{x}) = \frac{1}{n!}\, \bigg|\mbox{det}\frac{\mathrm{d} \hat{q}_\mathrm{e}}{\mathrm{d} x}\bigg| \hat{p}_s(s(\hat{q}_\mathrm{e}(\mathbf{x}))), \label{eq:flowscan} \end{align} where $\hat{q}_\mathrm{e}$ and $\hat{p}_s$ are the estimated (via maximum likelihood) equivariant flow transformation and sorted flow scan covariate likelihood, respectively. When correspondence flow transformations are included after the sort operation, we obtain an estimated exchangeable likelihood: \begin{align} \hat{p}_\mathrm{fs}(\mathbf{x}) = \frac{1}{n!} \bigg|\mbox{det}\frac{\mathrm{d} \hat{q}_\mathrm{e}}{\mathrm{d} x}\bigg| \bigg|\mbox{det}\frac{\mathrm{d} \hat{q}_\mathrm{c}}{\mathrm{d} x}\bigg| \prod_{k=1}^n \hat{p}(\mathbf{z}_{k} \mid h(\mathbf{z}_{<k})), \label{eq:flowscan_ultimate} \end{align} where $\mathbf{z}$ is the resulting covariates from corresponding coupling transforming the flow scanned covariates. In both cases, FlowScan\xspace gives a valid, provably exchangeable density estimate relying neither on variational lower bounds of the likelihood nor averaging over all possible permutations of the inputs. Furthermore, FlowScan\xspace is easily adapted to input sets with varying cardinalities, as is commonly observed in practice. In the Experiments section, we demonstrate empirically that FlowScan\xspace is highly flexible and capable of modeling sets of both points clouds and images. \section{Related Work} Unlike the recent surge in flexible density estimation for flat vectors with deep architectures \cite{Dinh2014NICENI,DBLP:journals/corr/DinhSB16,kingma2018glow,pmlr-v15-larochelle11a,NIPS2013_uria,JMLR:uria,pmlr-v32-gregor14,pmlr-v37-germain15,oliva2018transformation}, exchangeable treatments of data in ML have been limited with some notable exceptions. Some recent work \cite{lee2018set,qi2017pointnet,zaheer2017deep} has explored neural architectures for constructing a permutation invariant set embeddings. They featurize input sets exchangeably in a way that is useful for (typically supervised) downstream tasks; \emph{but the embeddings themselves will not result in valid likelihoods}. In other work, Generative Adversarial Networks (GAN) have been explored as a means of sampling point clouds \cite{zaheer2018pcgan}. However, none of these methods provide a valid exchangeable likelihood estimate as is our focus. A recently proposed model for exchangeable data, BRUNO \cite{korshunova2018bruno}, preserves exchangeability by performing independent point-wise changes of variables, a simple equivariant linear transformation, and an \emph{i.i.d.}\xspace base exchangeable process in the latent space. The Neural Statistician (NS\xspace) \cite{iclr:edwards} estimates a permutation invariant code produced by an exchangeable VAE. That is, the Neural Statistician uses an encoder, called a statistics network, on the entire exchangeable set to get an approximate posterior on the latent code. Given the success of a point cloud autoencoder with a DeepSet network as the statistics network in \cite{oliva2018transformation}, we consider this architecture for the variational Neural Statistician which is an especially strong baseline, representing the state-of-the-art likelihood method for point cloud data. \section{Experiments}\label{sec:experiments} In this section, we compare the performance of FlowScan\xspace to that of BRUNO\xspace and NS\xspace in a variety of exchangeable point cloud and image modeling tasks. In each experiment, our goal is to estimate an exchangeable likelihood $p(\mathbf{x})$ for $\mathbf{x} \in \mathbb{R}^{n \times d}$ which models the inputs well. As is standard in density estimation tasks, we measure the success of the model via the estimated likelihood of a held out test set for each experiment. For readability, we report the estimated per point log likelihoods (PPLL): $\frac{1}{n} \log\, \hat{p}(\mathbf{x})$. As NS\xspace does not yield a likelihood, we report its estimated variational lower bound on the PPLL. Results for each datasets can be found in \reftab{table:loglikes}. As a qualitative assessment of each model's performance, we also include samples generated by each trained model. Those which are not reported in the main text can be found in the Appendix. Unless stated explicitly, the figures included are \emph{not reconstructions}, but completely synthetic point clouds or images generated by each model. Further implementation details can be found in the Appendix and code will be made available at \texttt{https://github.com/lupalab/flowscan}. \begin{table}[b!] \centering \footnotesize \begin{tabular}{c c c c c} \specialrule{.1em}{.05em}{.05em} Dataset & BRUNO\xspace & NS\xspace & FlowScan\xspace \\ \specialrule{.1em}{.05em}{.05em} \texttt{Synthetic} & -2.28 & -1.07 & \textbf{0.14}\\ \hline \texttt{Airplanes} & 2.71 & 4.09 & \textbf{4.81} \\ \texttt{Chairs} & 0.75 & 2.02 & \textbf{2.58} \\ \texttt{ModelNet10} & 0.49 & 2.12 & \textbf{3.01} \\ \texttt{ModelNet10a} & 1.20 & 2.82 & \textbf{3.58} \\ \hline \texttt{Caudate} & 1.29 & 4.49 & \textbf{4.87} \\ \texttt{Thalamus} & -0.815 & 2.69 & \textbf{3.12} \\ \hline \texttt{SpatialMNIST} & -5.68 & -5.37 & \textbf{-5.26}\\ \specialrule{.1em}{.05em}{.05em} \end{tabular} \caption{Per-point log-likelihood (PPLL) of the test set for all point cloud experiments. Higher PPLL indicates better modeling of the test set.} \label{table:loglikes} \end{table} \subsection{Shuffled Synthetic Sequential Data}\label{sec:synth_data_section} We begin with a synthetic point cloud experiment to test FlowScan\xspace's ability to learn a known, ground truth likelihood. To allow for complex interactions between points, we study a common scenario that leads to exchangeable data: sequential data with time marginalized out. In other words, we suppose that all time-points $x_j \in \mathbb{R}^d$ of a sequence $(x_1, \ldots, x_n)$ are put into an unordered set $\{x_1, \ldots, x_n\}$. Effectively, this yields observations of sequences in matrices that are randomly shuffled from the sequential order. Hence, exchangeable instances are $\mathbf{x} = \Gamma_\pi \mathbf{x}_s$, for permutations $\Gamma_\pi \in \mathbb{R}^{n \times n}$ (drawn uniformly at random) and sequential data $\mathbf{x}_s = (x_1, \ldots, x_n) \in \mathbb{R}^{n \times d}$ (drawn via a sequential likelihood $p_\mathrm{seq}$). Here we consider a synthetic ground truth sequential model $p_\mathrm{seq}$ where the likelihood of an instance is computed by marginalizing out the permutation: $p(\mathbf{x}) = \sum_{\pi^\prime} \Pr(\pi = \pi^\prime)\, p_\mathrm{seq}(\Gamma^{-1}_{\pi^\prime} \mathbf{x}) = \frac{1}{n!} \sum_{\pi} p_\mathrm{seq}(\Gamma_{\pi}\mathbf{x})$. To obtain interesting non-linear dependencies we consider a sinusoidal sequence (see Fig.~\ref{fig:synthetic_samples} and Appendix for details). To allow for computing the ground truth likelihood in a timely manner, we consider $n=8$, leading to a large number, $8! = 40320$, of summands in the likelihood of the data. \begin{figure}[h] \centering \includegraphics[height=22mm]{figures/samples/synthetic_8/input_8_sets.png} \includegraphics[height=22mm]{figures/samples/synthetic_8/fs_sets.png} \caption{Left: true samples; markers and colors indicate instances and sequential order. Right: FlowScan\xspace samples.} \label{fig:synthetic_samples} \end{figure} Table \ref{table:loglikes} illustrates the per point log likelihood (PPLL) estimates across the synthetic sets using BRUNO\xspace, the NS\xspace, and FlowScan\xspace. The FlowScan\xspace model outperforms the other methods, achieving nearly the same PPLL as the ground truth ($0.23$) despite not averaging over all $n!$ permutations. For further comparison, we also trained a sequential model on the randomly permuted instances (and marginalizing out the permutation as in \refeq{eq:permavg}). However, randomly permuting the input sequence proved to be ineffective and resulted in low test PPLLs (with severe overfitting). \subsection{ModelNet}\label{sec:modelnet} \begin{figure}[t] \centering \begin{subfigure}[t]{.33\linewidth} \begin{minipage}{\linewidth} \centering \includegraphics[height=16mm]{figures/samples/planes/fs/plane_1_2_crop.pdf} \includegraphics[height=16mm]{figures/samples/planes/fs/plane_8_crop.pdf} \\ \includegraphics[height=16mm]{figures/samples/planes/fs/plane_7_crop.pdf} \includegraphics[height=16mm]{figures/samples/planes/fs/plane_6_crop.pdf} \end{minipage} \caption{FlowScan\xspace} \end{subfigure} \begin{subfigure}[t]{.33\linewidth} \begin{minipage}{\linewidth} \centering \includegraphics[height=16mm]{figures/samples/planes/SingleSortVAE/sample_1} \includegraphics[height=16mm]{figures/samples/planes/SingleSortVAE/sample_2} \\ \includegraphics[height=16mm]{figures/samples/planes/SingleSortVAE/sample_3} \includegraphics[height=16mm]{figures/samples/planes/SingleSortVAE/sample_4} \end{minipage} \caption{NS\xspace} \end{subfigure} \begin{subfigure}[t]{.32\linewidth} \begin{minipage}{\linewidth} \centering \includegraphics[height=16mm]{figures/samples/planes/BRUNO/sample_1} \includegraphics[height=16mm]{figures/samples/planes/BRUNO/sample_3} \\ \includegraphics[height=16mm]{figures/samples/planes/BRUNO/sample_5} \includegraphics[height=16mm]{figures/samples/planes/BRUNO/sample_4} \end{minipage} \caption{BRUNO} \end{subfigure} \caption{Synthetic plane samples from trained models} \label{fig:plane} \end{figure} \begin{figure}[t] \centering \includegraphics[height=18mm]{figures/samples/modelnet10/fs/modelnet10_1_crop} \includegraphics[height=16mm]{figures/samples/modelnet10/fs/modelnet10_8_crop} \includegraphics[height=18mm]{figures/samples/modelnet10/fs/modelnet10_3_crop} \includegraphics[height=18mm]{figures/samples/modelnet10/fs/modelnet10_4_crop} \caption{FlowScan\xspace \texttt{ModelNet10} samples} \label{fig:modelnet10_samples} \end{figure} Next, we illustrate the efficacy of our model on real world point cloud data. We consider object classes from the ModelNet dataset \cite{wu20153d}, which contains CAD models of common real world objects. Point clouds were created by randomly sampling 512 points from the surface of each object. All point cloud sets are modeled in an unsupervised fashion. That is, we estimate $p(\mathbf{x})$, where $\mathbf{x} \in \mathbb{R}^{512 \times 3}$. Models are compared on the following datasets comprised of different subsets of point cloud classes: \texttt{airplanes}, \texttt{chairs}, \texttt{ModelNet10}, and \texttt{ModelNet10a}. \texttt{ModelNet10} is the standard subset \cite{wu20153d} consisting of \emph{bathtub}, \emph{bed}, \emph{chair}, \emph{desk}, \emph{dresser}, \emph{monitor}, \emph{night stand}, \emph{sofa}, \emph{table}, and \emph{toilet} classes. Since \texttt{ModelNet10} is composed largely of furniture-like objects, we also select a more diverse, ten-class subset that we will refer to as \texttt{ModelNet10a}, containing \emph{airplane}, \emph{bed}, \emph{car}, \emph{chair}, \emph{guitar}, \emph{lamp}, \emph{laptop}, \emph{plant}, \emph{stairs}, and \emph{table} classes. Results can be found in Tab.~\ref{table:loglikes} and four samples from FlowScan\xspace are included in Fig.~\ref{fig:modelnet10_samples}. For each of the four datasets tested, we find that FlowScan\xspace achieves the highest average test log-likelihood. Qualitatively, we also observe superior samples from the FlowScan\xspace model as can be seen in Fig.~\ref{fig:plane} and in the Appendix. In addition to training on these ModelNet datasets, we also performed an ablation study (see the Appendix) where we see that our full architecture yields the best performance over alternatives. \subsection{Brain Data}\label{sec:brain} \begin{figure}[b] \begin{subfigure}{0.48\linewidth} \centering \includegraphics[height=18mm]{figures/samples/caudate/fs/sample_3.pdf} \includegraphics[height=18mm]{figures/samples/caudate/fs/sample_4.pdf} \caption{\texttt{Caudate}} \end{subfigure} \begin{subfigure}{0.48\linewidth} \centering \includegraphics[height=18mm]{figures/samples/thalamus/fs/sample_3} \includegraphics[height=18mm]{figures/samples/thalamus/fs/sample_4} \caption{\texttt{Thalamus}} \end{subfigure} \caption{FlowScan\xspace \texttt{Caudate} and \texttt{Thalamus} samples} \label{fig:caud_thal_samples} \end{figure} We test FlowScan\xspace's performance on a medical imaging task in a higher dimensional setting using samples of the Caudate and Thalamus \cite{nature2017Early}. Each set contains 512 randomly sampled 7d points. The first three dimensions contain the Cartesian coordinates of the surface boundary (as in ModelNet). The next two dimensions represent the normal direction at the boundary in terms of angles. The final two dimensions represent the local curvature (expressed as shape index and curvedness \cite{koenderink1990Solid}). Table \ref{table:loglikes} enumerates the PPLL for both datasets across all three methods. Comparing samples from FlowScan\xspace (see \reffig{fig:caud_thal_samples}) to that of NS\xspace and BRUNO\xspace (included in the Appendix) we see that FlowScan\xspace better captures the geometric features of the data than NS\xspace. Overall, superior PPLLs and samples suggest that FlowScan\xspace seamlessly incorporates the additional geometric information to model point clouds more accurately than baseline methods. \subsection{Spatial MNIST} For a direct comparison to NS\xspace, we also trained our model on the \texttt{SpatialMNIST} dataset, used by \cite{iclr:edwards}. Each set consists of 50 points sampled uniformly at random from active pixels of a single \texttt{MNIST} \cite{lecun1998gradient} image with uniform noise added to ensure non-degeneracy. The dataset that results consists of 2-dimensional point clouds each representing a digit from 0 to 9. PPLLs for each model can be found in \reftab{table:loglikes} and a random selection of samples from each can be found in \reffig{fig:spatialmnist_samples}. Both the (unconditioned) likelihoods and the samples indicate that FlowScan\xspace gives superior performance in this task. \begin{figure} \centering \begin{subfigure}{\linewidth} \centering \includegraphics{./figures/pdf/spatialMnist_fs.pdf} \caption{FlowScan\xspace} \end{subfigure} \begin{subfigure}{\linewidth} \centering \includegraphics{./figures/pdf/spatialMnist_ns.pdf} \caption{NS\xspace} \end{subfigure} \begin{subfigure}{\linewidth} \centering \includegraphics{./figures/pdf/spatialMnist_bruno.pdf} \caption{BRUNO\xspace} \end{subfigure} \caption{\texttt{SpatialMNIST} samples from each model.} \label{fig:spatialmnist_samples} \end{figure} \subsection{MNIST} Finally, we show that FlowScan\xspace exhibits superior likelihoodsand samples in a high-dimensional, low-cardinality setting. Following \cite{korshunova2018bruno}, sets are composed of 20 random images corresponding to the \emph{same digit class} from the \texttt{MNIST} dataset. After training, PPLLs are evaluated on held out test sets constructed from unseen images. Our baseline is BRUNO\xspace, which achieves a PPLL of $-643.6$. BRUNO\xspace's unconditional samples (\reffig{fig:mnist_bruno}) often contain elements from different digits, indicating a lack of intra-set dependency in the resulting model. We improve upon BRUNO\xspace by first adding convolution-based Set-Coupling transformations (but keeping the \emph{i.i.d.}\xspace base likelihood), which achieves a PPLL of $-634.8$. Still, sample sets (\reffig{fig:mnist_sc}) show mixed digit classes. Finally, we consider a full FlowScan\xspace model that adds a sort, scan, and 3d convolution-based correspondence coupling transformations, which achieves the best PPLL of $-621.7$. Furthermore, FlowScan\xspace samples consistently contain the same digit class (\reffig{fig:mnist_fs}), showing that we are able to fully model the intra-set dependencies of elements. \begin{figure}[t] \centering \begin{subfigure}{\linewidth} \centering \includegraphics[height=4mm]{figures/samples/mnist/fs/1.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/fs/2.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/fs/3.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/fs/4.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/fs/5.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/fs/6.png} \\ \caption{FlowScan\xspace \label{fig:mnist_fs}} \end{subfigure} % % \begin{subfigure}{\linewidth} \centering \includegraphics[height=4mm]{figures/samples/mnist/setnvp/1.png}\\ \includegraphics[height=4mm]{figures/samples/mnist/setnvp/2.png}\\ \includegraphics[height=4mm]{figures/samples/mnist/setnvp/3.png}\\ \includegraphics[height=4mm]{figures/samples/mnist/setnvp/4.png}\\ \includegraphics[height=4mm]{figures/samples/mnist/setnvp/5.png}\\ \includegraphics[height=4mm]{figures/samples/mnist/setnvp/6.png}\\ \caption{Set-Coupling \label{fig:mnist_sc}} \end{subfigure} % % \begin{subfigure}{\linewidth} \centering \includegraphics[height=4mm]{figures/samples/mnist/bruno/1.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/bruno/2.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/bruno/3.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/bruno/4.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/bruno/5.png} \\ \includegraphics[height=4mm]{figures/samples/mnist/bruno/6.png} \\ \caption{BRUNO\xspace \label{fig:mnist_bruno}} \end{subfigure} \caption{Single digit set samples from FlowScan\xspace, Set-Coupling, and BRUNO\xspace trained on \texttt{MNIST}. Each row corresponds to a single set of 20 images generated by one model. } \label{fig:mnist_samples} \end{figure} \section{Conclusion} In this work, we introduced FlowScan\xspace for estimating exchangeable densities. This is a difficult task, where models were previously limited to either exchangeable base likelihoods \cite{korshunova2018bruno}, or conditionally \emph{i.i.d.}\xspace restrictions with variational approximations of the likelihood \cite{iclr:edwards}. We explored how to map inputs to a space that is easier to model whilst preserving exchangeability via equivariant flow transformations. Among others, we proposed the Set-Coupling transformation which extends existing pointwise coupling transformations \cite{Dinh2014NICENI} to sets. Additionally, we demonstrated how to apply non-exchangeable density estimators to this task via sorting and scanning. This is the first tractable approach to achieve this, avoiding averaging over any permutations of the data while unlocking a much larger class of base likelihoods for exchangeable density estimation. Finally, we argued for the use of an autoregressive base likelihood with sequential transformations to exploit the sequential structure gained in the sort and scan. Combining equivariant flow transformations, sorting and scanning, and an autoregressive likelihood, we arrived at FlowScan\xspace. We showed empirically that FlowScan\xspace's ability to model intradependencies within sets surpassed that of other state-of-the-art methods in both high-cardinality, low-dimensionality and low-cardinality, high-dimensionality settings. Quantitatively FlowScan\xspace's likelihoods were a substantial improvement (see \reftab{table:loglikes}). Furthermore, there was a clear qualitative improvement in samples from FlowScan\xspace. \section*{Acknowledgements} The authors would like to thank NIH grant HDO55741 for the use of the subcortical data set and Mahmoud Mostapha for preprocessing the data. Kevin O'Connor would also like to acknowledge the support of NIH grant T32 LM12420. \bibliographystyle{aaai}
\section{Introduction} Red supergiants (RSGs) represent a critical phase in massive stellar evolution. They are He-fusing evolved descendants of 10-25$M_{\odot}$ main sequence stars, the end result of a nearly horizontal evolution across the Hertzsprung-Russell (H-R) diagram as their blue H-fusing predecessors leave the main sequence and cross the ``yellow void". They are the largest (in physical size) and coldest ($\sim$3500-4500 K) members of the massive star population, representing a significant extreme in their evolution. These cool temperatures place them at the Hayashi limit for hydrostatic equilibrium \citep{hayashi1961}. Effective temperature ($T_{\rm eff}$) is, along with bolometric luminosity ($M_{\rm bol}$), one of the two key physical properties needed to place a star on the Hertzsprung-Russell (H-R) diagram, and it is the most critical physical property that must be determined for RSGs. At these cool temperatures, the bolometric corrections for standard $UBVRI$ photometry are large (1-4 mag) and strongly dependent on $T_{\rm eff}$ (e.g. \citealt{massey2003, levesque2005}); as a result, accurately calculating the luminosity of a RSG requires a robust determination of the star's $T_{\rm eff}$. The scarcity of nearby RSGs has limited the use of interferometric data in ascertaining an accurate $T_{\rm eff}$ scale (see, for example, \citealt{dyck1996}). Alternatively, scales in the past have been determined by broad-band colors of RSGs with known diameters (\citealt{lee1970, johnson1964, johnson1966}) or by bolometric corrections derived from IR measurements under the assumption of a blackbody continuum (Flower 1975, 1977). However these methods are also limited because of the effects of line blanketing, which make color indices such as $B-V$ highly sensitive to surface gravity (log $g$). More recently, \cite{levesque2005, levesque2006} used the MARCS stellar atmosphere models to fit the strengths of the $T_{\rm eff}$-sensitive TiO bands for K-type and M-type stars in the Milky Way and Magellanic Clouds, creating a $T_{\rm eff}$ scale significantly warmer than previous works (\citealt{humphreys1984, massey2003}) and one that shows good agreement with the predictions of stellar evolutionary tracks (including the metallicity dependence of the Hayashi limit). \cite{davies2013} determined warmer $T_{\rm eff}$ values for RSGs using broad SED fitting across the optical and near-IR. However, these results do not reproduce the correlation between spectral type and $T_{\rm eff}$ in RSGs or the metallicity dependence of RSG $T_{\rm eff}$s (see, for example, \citealt{levesque2006, tabernero2018}), and the work notes that 3D models (as opposed to the 1D MARCS models) are required to properly account for wavelength-dependent in the extended atmospheres of RSGs that would otherwise lead to determining a warmer $T_{\rm eff}$ at longer wavelengths. Several recent papers have also examined the potential utility of atomic lines in these cool stars' spectra for determining $T_{\rm eff}$ and other physical properties. \cite{dorda2016b} compared the widths of several atomic lines (including Fe I and Ti I features and the Ca II triplet lines at 8498\AA, 8542\AA, and 8662\AA, hereafter CaT) observed in the spectra of a large sample of cool supergiants (CSGs, ranging from G0 to M7 in spectral type and thus encompassing the late-type yellow supergiant population as well as RSGs) in the Large and Small Magellanic Clouds; they found that the strength of the Ti I lines was strongly correlated with $T_{\rm eff}$ (though no similar correlation was seen for Fe I or CaT). This result was further supported by \cite{dorda2016a}, which successfully used a principal component analysis based on spectral features in the CaT region (the same region covered by the Gaia Radial Velocity Spectrograph) to automatically differentiate CSGs from other bright late-type stars. This is potentially a very exciting result, offering the possibility of determining $T_{\rm eff}$ for RSGs from data with relatively limited wavelength coverage (as opposed to existing methods which require optical+IR photometry or spectrophotometry with wide optical wavelength coverage). \cite{tabernero2018} studied the $T_{\rm eff}$ scale of CSGs in different metallicity environments; while their method adopted atomic line fitting as a means of determining $T_{\rm eff}$ they found a warmer and shallower scale than \cite{levesque2006}, with only a weak correlation in the LMC and no correlation in the SMC. However, the utility of using atomic line features for determining $T_{\rm eff}$ in RSGs is still unclear. While the correlation between Ti I and spectral type presented in \cite{dorda2016b} is quite robust at earlier types (G and early K), the correlation is much weaker for the M-type stars in their sample, which represent a significant fraction of the RSG population. The potential dependence of these features on other physical properties is also a complicating factor. For example, recent observations of RSG $J$-band spectra in nearby galaxies have revealed that, while atomic absorption features such as Ti I, Fe I, and Si I are not strongly sensitive to $T_{\rm eff}$, they serve as excellent probes of metallicity (e.g. \citealt{davies2010,davies2015}; \citealt{gazak2015}; \citealt{patrick2015,patrick2016,patrick2017}). The CaT is widely cited as a potential tracer of luminosity class in cool stars due to its sensitivity to log $g$ effects (e.g. \citealt{cenarro2001a, cenarro2001b} and references therein), and is also sensitive to metallicity (e.g. \citealt{armandroff1991, sakari2016}). Non-LTE effects in the atmospheres of these stars can also impact the equivalent widths (EWs) of some lines; \cite{jennings2016} found that the H$\alpha$ absorption feature in cool stars is also effective as a luminosity class diagnostic, a consequence of the density-dependent overpopulation of the metastable 2s level and an effect that becomes stronger in the non-LTE conditions present in supergiant atmospheres. The \cite{jennings2016} study of the CaT feature indicated that while the feature in early M-type stars had a clear relationship with luminosity class, as supported by the literature, this relationship also broke down in late-type (beyond M3-3.5) supergiants. Previous work on the CaT has studied its effectiveness as a diagnostic for several physical parameters such as luminosity, log $g$, metallicity, and $T_{\rm eff}$. The CaT is a near-IR feature and therefore is subject to contamination from multiple strong stellar features such as higher-order Paschen lines and the TiO absorption band at 8433\AA. \cite{ginestat1994} studied the relationship between the EW of absorption features between 8380--8780 {\AA} and spectral type, finding a positive correlation between CaT and luminosity for A to M type stars that was initially weak but began to increase for later types beginning at G0. Ginestat also proposed that the weak Ca I, Ti I, and Fe I lines of the {\it giants} in their study may be due to low metallicity. \cite{e.mb1990}, hereafter EM\&B, used synthetic stellar atmosphere models from \cite{gustasson1975} to generate synthetic CaT lines in order to examine their variation with $T_{\rm eff}$, log $g$, and metallicity ([M/H]). EM\&B found the CaT to be primarily dependent on [M/H] and log $g$. Their study indicates that the CaT is sensitive to metallicity for stars with [M/H] $>$ -2.0 and sensitive to log $g$ for giants with [M/H] $>$ -1.0. EM\&B also found that the relationship between CaT and temperature is only present in low log $g$ populations, making it applicable to giants and supergiants rather than dwarf stars, and becomes more pronounced as metallicity increases. This is in agreement with the results of \cite{smith1990} but it should be noted that their work was restricted to stars between 4000 and 5500 K. When compared against $T_{\rm eff}$, EM\&B found only a weak relationship between the CaT triplet and $T_{\rm eff}$, which they attributed to the increasing intensity of the 8433\AA\ TiO feature at cool temperatures. The increasing strength of this TiO band can lead to a decrease in the local continuum and a subsequent apparent weakening of the CaT (as noted by \citealt{ginestat1994}, who used a local continuum definition for measuring the CaT in stars later than M2 in order to account for this effect); however, this particular TiO band is only prominent in the spectra of RSGs with relatively late spectral types ($\sim$M4-M5, e.g. \citealt{levesque2005, levesque2017}), an effect in agreement with the evolution of the CaT seen in \cite{jennings2016}. \cite{mallik1996} analyzed the CaT features of 146 stars spanning from F7 to M4 to determine the dependence of CaT on luminosity, $T_{\rm eff}$, and metallicity. They found a non-linear relationship for luminosity that became more pronounced with increased metallicity, and that was more apparent in supergiants than in dwarfs, but did not find a relationship between CaT and $T_{\rm eff}$ across the full sample. Mallik also found that at low log $g$ (0.0 to 2.0), the EW of the CaT in supergiants and giants decreased as log $g$ increased. This correlation - which is counter to the typical expectation that lines will get stronger at higher log $g$ due to increased collisional effects - has been explained as a continuum effect. An increase in the continuous absorption coefficient at higher log $g$ (due to an increased electron density in stars where H$^-$ is the dominant source of continuum opacity) leads to a lower apparent continuum level and subsequent weaker measurements of EW for the CaT. \cite{cenarro2001a} presented a new stellar library of the near-IR spectral region based on 706 stars with 2750 K $< T_{\rm eff} < $ 38400 K, 0.0 $<$ log $g$ $<$ 5.12, and metallicities of $-3.45 <$ [Fe/H] $< +0.60$. Based on these data they offer a newly defined index for measuring the strength of the CaT features, the ``CaT*" index, developed with careful treatments of previously noted effects such as continuum definition and Paschen line contamination. Collectively, the utility of the CaT feature has been extensively studied, but conclusions about its use as a diagnostic of log $g$, luminosity, and $T_{\rm eff}$ are conflicting and further complicated by the differing sample sizes and parameter spaces of previous works, with most samples of stars spanning from dwarfs to supergiants and covering a broad range of spectral types. In this work we specifically consider the utility of atomic absorption line features as potential $T_{\rm eff}$ diagnostics in the uniquely cool and low-density environments of M-type RSGs. We present a study examining the strengths of Ca, Ti, and Fe absorption features in the spectra of M-type RSGs. Using echelle spectra of 25 Milky Way RSGs, 16 Large Magellanic Cloud RSGs, and 17 Small Magellanic Cloud RSGs along with a series of RSG model atmosphere spectra (Section 2), we present the EWs of a large sample of atomic lines, including features of Fe I, Ti I, Ca I, and the CaT, and compare these EWs to the $T_{\rm eff}$ determinations of Levesque et al.\ (2005; Section 3). We find a strong positive and statistically significant correlation between CaT and $T_{\rm eff}$ for Milky Way RSGs, but no similar correlation in the Magellanic Cloud samples, and no relationship between the Ti I and Fe I features and $T_{\rm eff}$ as a function of metallicity (Section 4). We discuss the implications of these results for understanding the physical properties of RSGs as well as potential future work in this area (Section 5). \begin{figure*}[ht!] \center \includegraphics[width=\textwidth] {figure1new.pdf} \caption{ Example normalized spectra of the Ca II 8498\AA\ (left), 8542\AA\ (center), and 8662\AA\ (right) absorption triplet features for three Milky Way RSGs in our sample, spanning a 200 K range in $T_{\rm eff}$. The spectra are shown in black, while the ``pseudocontinuua" - defined by the continuum points listed in Table 2 and described in \S3.1 - used for fitting the lines and determining their equivalent widths are illustrated as dashed red lines.} \end{figure*} \section{Samples and Observations} The RSG echelle spectra used in these analyses were originally observed as part of a spectroscopic search for potential Thorne-\.Zytkow objects in the Milky Way and Magellanic Clouds \citep{levesque2014}. The sample of 25 Milky Way stars was selected from the coldest RSGs identified in \cite{levesque2005}; all have spectral types of K5-M0I or later. The spectra were observed using the Astrophysics Research Consortium Echelle Spectrograph (ARCES; \citealt{wang2003}) on the Apache Point Observatory 3.5-m telescope on 2011 February 11 and 12 (UT). The observations were taken using the default 1.6 arcsec $\times$ 3.2 arcsec slit, along with quartz lamps and ThAr lamps after each individual exposure to achieve precise flat-field and wavelength caliberations for each star. The spectra were reduced using standard IRAF\footnote{IRAF is distributed by NOAO, which is operated by AURA, Inc., under cooperative agreement with the NSF.} echelle routines, and each star's spectrum was corrected for radial velocity (RV) effects using the wavelengths of the CaT triplet. Examples of our spectra and the CaT triplet are shown in Figure 1. Our Magellanic Cloud sample was drawn from late-type RSGs identified in \cite{levesque2006} and supplemented by additional stars with broadband colors consistent with RSGs (for a complete discussion see \citealt{levesque2014}). These stars were observed with the Magellan Inamori Kyocera Echelle (MIKE; \citealt{bernstein2003}) on the Magellan 6.5-m at Las Campanas Observatory during 2011 September 13–15. The spectra were taken using the 0.7 arcsec × 5 arcsec slit with 2×2 binning, ‘slow’ readout, and the standard grating settings, and internal flats and ThAr lamps were observed for flat-fielding and wavelength calibration purposes. These data were reduced using a combination of standard IRAF echelle routines and the {\texttt{ mtools}} package. The Thorne-Zytkow object candidate HV2112 is not included in our sample. The physical properties of the observed stars in our sample that we adopt for our analyses - including $T_{\rm eff}$, log $g$, and $M_{\rm bol}$ - are drawn from \cite{levesque2005, levesque2006}, and are based on fitting observed spectrophotometry of the RSGs with MARCS stellar atmosphere models and determining the best-fit model based on the strengths of the TiO absorption bands and the overall fit of the SED. This $T_{\rm eff}$ scale was chosen as it represents physical properties for RSGs determined based on the optical regime and optical absorption features, an appropriate choice for comparison with the optical atomic line features used in this work as it samples the same physical region of the RSG atmosphere (recalling these stars' extended geometries and wavelength-dependent optical depths, as discussed above). These $T_{\rm eff}$ scales also show good agreement with stellar evolutionary models (including those that treat both single and binary evolution; \citealt{levesque2018} and the effects of metallicity. For a complete list of the stars in our sample and their adopted physical properties, see Table 1. \cite{tabernero2018} recently published a new $T_{\rm eff}$ scale for CSGs in the LMC and SMC; however, this scale is based on atomic line fitting and the assumption we wish to test here, namely that these lines $T_{\rm eff}$-sensitive. For late K- and M-type RSGs the \cite{tabernero2018} scale is slightly warmer than the \cite{levesque2006} scales as well as shallower (a weaker dependence on spectral type), but without knowing the dependence of the individual atomic features on $T_{\rm eff}$ in this very cool regime it is unclear whether this disagreement is due to a difference in method or a consequence of the lines' behavior (for further discussion see \S4.) In addition to our sample of observed RSG spectra we also consider synthetic spectra produced by the MARCS stellar atmosphere models (e.g. \citealt{gustasson2008}). The spectra were generated for solar-metallicity 15M$_{\odot}$ RSGs and adopt a spherical atmosphere geometry, a microturbulence parameter of 5 km s$^{-1}$, and log $g=-0.5,0.0,0.5,1.0$. The $T_{\rm eff}$ of the models used in this work range from 3400-4000K in 100K increments. It should be noted that we restrict our use of the MARCS models to $T_{\rm eff} \le$ 4000 K, and do the same for our observed sample (one LMC star from the original \citealt{levesque2014} sample, LMC 169754, was cut from this work due to its relatively high $T_{\rm eff}$ of 4100 K). This was done specifically to restrict our study of atomic line $T_{\rm eff}$ diagnostics to the collision-dominated regime of cool star atmospheres (at $T_{\rm eff} \gtrsim 4000 K$ the effects of photoionization increasingly dominate the abundance of neutral Fe and Ti) and a regime where non-LTE effects are minimal; for further discussion see Section 4. \section{Analyses} \subsection{Atomic Lines and Equivalent Widths} We measured the EWs of absorption line features of Fe I, Ti I, Ca I, and Ca II in each of our spectra, using the line profile fitting function contained in the {\texttt splot} task in IRAF's {\texttt kpnoslit} package to determine the best-fit Voigt profile. The Ca features include Ca I 6572\AA\ and the CaT, while the Fe I and Ti I absorption features measured are the same as those used in \cite{dorda2016b}. Upper and lower wavelength bounds were set by identifying the closest local maxima in the surrounding region of the spectrum to define a local continuum which could then be used to measure integrated line strengths; where possible the upper and lower bounds were selected to match the analyses of (\citealt{dorda2016b}; see Table 2). These local continuua were defined consistently across all of the stars in a given host galaxy, although slight variations in the local continuum definition were necessary between the three host galaxies in the case of the CaT lines. The full set of absorption lines and their measured EWs are given in tables 3-5 for Ca, Fe, and Ti features respectively, and in Table 6 for the MARCS models. \subsection{Correlation Coefficients} We used the {\texttt matplotlib} Pylab software from SciPy to plot the measured EW data against the $T_{\rm eff}$, $M_{\rm bol}$, and log $g$ of each star as determined by \cite{levesque2005, levesque2006}, with EW as the dependent variable and the stellar parameters as the independent variable. For each variable pair we also calculated the Pearson's $r$ correlation coefficient and associated $p$-value for the sample, along with both linear (A$x$+B) and second-degree polynomial (A$x^2$+B$x$+C) functions of best fit. Given our small sample sizes (ranging from 16 to 25 stars in a given host galaxy, which we treat separately due to metallicity effects) we adopt a conservative significance threshold of $p < 0.01$, rather than the more typical $p < 0.05$, to decrease our likelihood of incorrectly rejecting the null hypothesis. The Pearson correlation coefficients and best-fit function coefficients are summarized in Table 7. A similar analysis was also done for the MARCS stellar atmosphere model spectra, with the results summarized in Table 8. Below we consider each spectral feature and its potential diagnostic utility: {\bf CaT}: In our Milky Way sample, the equivalent width of the CaT feature (Figure 2) shows a strong and statistically significant positive correlation with $T_{\rm eff}$, with Pearson's r=0.755 and $p$=0.00001. This is in good agreement with the MARCS stellar atmosphere models at Milky Way metallicity (Figure 8), which predict robust positive correlations between CaT and $T_{\rm eff}$ across the full range of supergiant surface gravities (e.g., Pearson's r=0.869 and $p$=0.0023 for the log $g=0.0$ models). However, no similar correlation is seen in the LMC and SMC samples, despite the LMC- and SMC-metallicity MARCS models also predicting strong positive correlations at all supergiant surface gravities (Figures 9 and 10). In the Milky Way the CaT equivalent width is positively correlated with log $g$ and M$_{\rm bol}$. No correlation is seen in the LMC data; however, the SMC sample shows a positive correlation between the CaT equivalent width and M$_{\rm bol}$. {\bf Ca I}: The MARCS models predict a correlation between the equivalent width of the Ca I 6572.0 line and $T_{\rm eff}$ for all but the lowest surface gravities and highest metallicities (e.g., the log $g=-0.5$ models at Milky Way metallicity and the log $g=-0.5$ and log $g=0.0$ models at LMC metallicity). However, this is not borne out by our observations (Figure 3); the LMC and SMC samples show no significant correlation between Ca I and $T_{\rm eff}$, while the Milky Way sample shows a moderately strong positive correlation ($r$=0.500) with a borderline $p$=0.01. It is also worth noting that the MARCS models predict a positive correlation between Ca I and $T_{\rm eff}$ at Milky Way metallicity, but a negative correlation at the lower LMC and SMC metallicities, with the Ca I line getting weaker at higher $T_{\rm eff}$. {\bf Ti I/Fe I Ratio}: None of the observed data revealed significant correlations between the Ti I 8518.1/Fe I 8514.1 ratio (Figure 4) and RSG physical properties. By contract, the MARCS models predict significant negative correlations between this ratio and T$_{\rm eff}$ for all log $g$ values at Milky Way metallicity, while the LMC and SMC metallicity models show significant negative correlations at particular values of log $g$ (log $g=0.0$ in the LMC and log $g=-0.5$, 0.0, and 1.0 in the SMC). {\bf Ti I Sum}: None of the observed samples - at Milky Way, LMC, or SMC metallicity - show any evidence for statistically significant correlations between the sum of the Ti I line (Figure 5) equivalent widths and any RSG physical properties. The Milky Way metallicity MARCS models predict no statistically significant correlation between Ti I EW and $T_{\rm eff}$. However, in the LMC the Ti I sum showed a strong positive correlation with $T_{\rm eff}$ for the log $g=0.0$ models only (r=0.997, $p$=0.00186), and the SMC models showed a strong negative correlation with $T_{\rm eff}$ at log $g=-0.5$ (r=$-$0.933, $p$=0.00071) and a strong positive correlation at log $g=0.5$ (r=0.879, $p$=0.00404). {\bf Fe I Sum}: Our observed Milky Way and SMC samples show no correlation between the sum of the Fe I line (Figure 6) equivalent widths and any RSG physical properties; however, the LMC sample shows evidence of a positive correlation between the Fe I sum and T$_{\rm eff}$. Both of these results are also at odds with the predictions of the MARCS models, which only predict a significant positive correlation between Fe I and T$_{\rm eff}$ for Milky Way supergiants with log $g=1.0$ (r=0.965, $p$=0.0001) and a significant {\it negative} correlation between Fe I and T$_{\rm eff}$ for SMC supergiants with log $g=0.5$ and 1.0 (r=$-$0.972, $p$=0.00005 and r=$-$0.975, $p$=0.00004, respectively). {\bf Ca II 3-D Plots}: The CaT equivalent width showed the most promise in our observed data as an atomic line diagnostic of T$_{\rm eff}$; however, this feature is also well-known as a potential diagnostic of log $g$ and luminosity, calling the degeneracy of its T$_{\rm eff}$ correlation into question. To further examine this we created 3D plots for our observed data from all three host galaxies with $T_{\rm eff}$, Log $g$, and Ca II EW (see Figure 7) as the respective x, y, and z axes. \footnote{The base code to make the 3D plots can be found at \texttt{https://gist.github.com/amroamroamro/1db8d69b4b65e8bc66a6}} These data were then fitted with linear and quadratic planes of best fit. The full suite of correlation coefficients for the data in the 3D plots is given in Table 9, and equations for the linear and quadratic best fits are given in Table 10. The linear plane best fit equation is $Z = Ax + By + C$, while the quadratic plane fit is $Z = Ax + By + Cxy + Dx^{2} + Ey^{2} + F$. \section{Discussion and Future Work} In light of the small sample sizes used in this work (25 stars in the Milky Way sample, 16 in the LMC, and 17 in the SMC) we are cautious about over-interpreting the statistical results drawn from our data. However, it is still interesting to examine areas where our observations and model results agree or diverge from each other and from past work, and to consider potential physical explanations for why this may be and the implications for future work. Our observed spectra show a strong positive correlation ($r=0.755$, $p=0.00001$) between CaT and $T_{\rm eff}$ for MW RSGs, in agreement with the predictions of the MARCS stellar atmosphere models. However, it is difficult to discern whether this is primarily a consequence of $T_{\rm eff}$ or log $g$ effects on the CaT absorption features and surrounding continuum. In the MW there is a significant correlation ($r=0.549$, $p=0.0082$) between $T_{\rm eff}$ and log $g$, with cooler stars having lower surface gravities (an unsurprising consequence of the effect that a decreasing $T_{\rm eff}$ and constant or increasing $M_{\rm bol}$ will have on the stellar radii), and both log $g$ and $M_{\rm bol}$ are positively correlated with the CaT sum (see Table 9). Figure 7 compares the CaT equivalent width, $T_{\rm eff}$, and log $g$ of our Milky Way stars in 3-D space, along with the best quadratic plane fit to the sample, but - as also noted by previous work - it is unclear which physical property is primarily responsible for driving the evolution of CaT in RSG spectra. We also do {\it not} see any correlation between CaT and $T_{\rm eff}$ in either the LMC or SMC observations. While this suggests that metallicity may also play a role in the evolution of the CaT with stellar properties (in agreement with previous work that found a metallicity dependence in the CaT equivalent width for supergiants (e.g. \citealt{armandroff1991, ginestat1994, mallik1996}) this is at odds with the predictions of the MARCS models, which predict a strong correlation between CaT and $T_{\rm eff}$ at all of the model metallicities. The models do, however, predict an expected overall decrease in the strength of the CaT with metallicity. Figures 7-9 compare the MARCS models and observed data, highlighting the decrease in EW with metallicity as well as comparing the EWs predicted by the models to those observed in the data. Note that Dorda et al.\ (2016b) also directly compare LMC- and SMC-metallicity MARCS model equivalent widths to $T_{\rm eff}$ (though their data span a broader $T_{\rm eff}$ range of 3300-4500 K to better encompass the warmer F-, G-, and K-type supergiants in their observed sample) and find similar results. Our observed data also blend a range of surface gravities that sample the lower end of RSG surface gravities (the mean log $g$ of the MW, LMC, and SMC samples is 0.15, $-$0.275, AND $-$0.247 respectively) while the models with different log $g$ are considered separately. If we combine the results from the MARCS models across {\it all} surface gravities, the correlations between CaT and $T_{\rm eff}$ get weaker in the Milky Way (r=0.467, $p$=0.007) and LMC (r=0.712, $p$=0.0004), while the SMC data fails to satisfy our $p<0.01$ significance threshold (r=0.356, $p$=0.046). Considering these results, it is possible that decreased metallicity combined with a mix of surface gravities in our observed samples could contribute to the lack of statistically robust correlation between CaT and $T_{\rm eff}$ in the LMC and SMC data. Quadratic best fits to the CaT EW, $T_{\rm eff}$ and log $g$ data in 3D space show a stronger relationship between the three parameters for the lowest $T_{\rm eff}$ and log $g$ values. The CaT EW is consistently high at high log $g$ values ($\geq0.6$) for all values of $T_{\rm eff}$, but decreases nearly linearly with log $g$ at low $T_{\rm eff}$. Above $T_{\rm eff}$ $\geq$ 3750 K, the relationship between EW and log $g$ becomes more complex. By comparison, both the LMC and SMC quadratic best fits in 3D show a ``concave" shape, with the evolution of CaT as a function of log $g$ and $T_{\rm eff}$ that is hard to quantify and not well-fit by a linear relation (for example, both high $T_{\rm eff}$ + low log $g$ and low $T_{\rm eff}$ + high log $g$ correspond to CaT EW minimums. The relationships are simplified (but also more poorly fit) in linear plane best fits to the data, given in Table 10. In this case the MW and LMC results broadly align with predictions from \cite{ginestat1994} asserting that the intensity of the CaT is correlated with log $g$, but the SMC does not, suggesting a more complex relationship for this sample. \cite{e.mb1990} concluded that at high metallicity Ca II was inversely related to log $g$; as the SMC has the lowest metallicity of our sample it suggests that this difference could in part be attributable to changes in this relationship as a function of metallicity. The \cite{dorda2016b} sample consisted of early G to M3 stars, with a small sample of later-type M stars, as it was thought that the TiO band would significantly erode the continuum in the latest M type stars stars and make reliable EW measurements difficult beginning at a spectral type of M0. However, as found both by \cite{ginestat1994} and this work, the stronger TiO band at later spectral types (corresponding to cool $T_{\rm eff}$, e.g. \citealt{levesque2005, tabernero2018}) reliably corresponds to a decrease in the local continuum, and a subsequent apparent weakening of the CaT, in agreement with the evolution of the CaT seen at warmer $T_{\rm eff}$. This effect therefore improves rather than weakens the utility of the CaT as a $T_{\rm eff}$ diagnostic. For a direct comparison between the models results and the MW, LMC, and SMC results see Figures 8-10. Moving beyond the CaT feature, it is interesting to note that there is no correlation in any of our observed data between Ca I or the Ti/Fe ratio and any RSG physical properties, at odds with what the models predict. Beyond that, most of the observed {\it and} model samples predict no correlation between the sum of the Ti I or Fe I absorption features and the physical properties of RSGs, with a few noted exceptions. For example, the observed LMC spectra show a positive correlation between the Fe I sum and $T_{\rm eff}$. However, this is at odds with the predictions of the MARCS stellar evolution models, which only predict correlations between Fe I and $T_{\rm eff}$ for the highest log $g$ models (notably higher than the average log $g$ of our observed RSGs), and is almost certainly a consequence of small number statistics in our 16-star LMC sample. Still, since \cite{dorda2016b} predict a strong correlation between Ti I and Fe I and spectral type for cool supergiants - which we would expend to extend to a correlation between these features and $T_{\rm eff}$ and be observable even in a small sample - it is worth considering some of the physical phenomena that may impact the formation and evolution of these lines in RSG spectra. Our MARCS model results do not highlight Ti I and Fe I as robust diagnostic lines for M-type RSGs; however, these models also assume LTE. How might non-LTE conditions affect these predictions? \cite{bergemann2012} studied individual RSGs to determine the impact of non-LTE on Ti I and Fe I spectral features. They found that the significance of non-LTE corrections was dependent on $T_{\rm eff}$, metallicity, and log $g$, noting that for both Ti I and Fe I, non-LTE corrections in order to align results with observations were lower, or near zero, at lower temperatures - 3400 K $\geq$ $T_{\rm eff}$ $\leq$ 3800 K. At higher temperatures, the formation of Fe I lines remains largely unaffected by non-LTE, while the Ti I line does show some variation, with Ti I EWs underestimated by LTE as compared to non-LTE models. However, for M-type RSGs non-LTE effects on these lines do not play a significant role and as such cannot be considered a variable for the disagreements between the observed data and the models. As these are all neutral lines, it is also worth considering the excitation potential of these features. Both \cite{dorda2016b} and our models predict a relationship between Fe I and $T_{\rm eff}$ and between Ti I and $T_{\rm eff}$, with \cite{dorda2016b} arguing that this is due to their low excitation potentials (6.82 eV for Ti I, 7.87 eV for Fe I), thus rendering the neutral abundances of these elements particularly sensitive to $T_{\rm eff}$. However, while this reasoning is robust for warmer stars it breaks down for M-type RSGs. At these low temperatures ($\lesssim$4000 K) photoionization is no longer the primary means of producing Ti II and Fe II, and instead collision becomes the dominant means of excitation (for more discussion see \citealt{bergemann2012}). This decouples the Ti I/Ti II and Fe I/Fe II fractions from $T_{\rm eff}$ in the cool and low-density atmospheres of RSGs. Taken as a whole, the Ti I and Fe I absorption features are not effective diagnostics of $T_{\rm eff}$ for the coolest RSGs (a result in agreement with Dorda et al.\ (2016b)'s figures 7 and 8, which shower a weak correlation between these features and spectral type for the M0-M3 stars in their sample). The Ca I absorption feature remains a puzzle. The MARCS models predict a positive correlation between Ca I EW and $T_{\rm eff}$ at Milky Way metallicity, but a {\it negative} correlation for SMC metallicities and the higher surface gravity LMC models. The latter is what would naively be expected based simply on the evolution of the CaT absorption feature: as the Ca II abundance (and the CaT EW increases), we would expect a corresponding decrease in the Ca I abundance and EW. It is unclear why this is predicted at lower metallicities (and higher surface gravities) but not at solar metallicity. It is possible that at higher metallicities the Ca I abundance is high enough to saturate, resulting in a non-linear evolution of the Ca I absorption feature at higher metallicities. As in the case of Ti and Fe, the relative contributions from photoionization and collisional excitation could also play a role. Finally, none of these expected correlations appear in our observed data, suggesting that additional effects (including the impact of non-LTE) could further complicate the formation and evolution of the Ca I with $T_{\rm eff}$. While these results are based on only a small sample of M-type RSGs, it is nevertheless important to consider whether these or other atomic lines can be used to directly infer the stars' physical properties. To take just one example, spectra from {\it Gaia} span only a narrow wavelength range ($\sim$8450-8750\AA), but this critical regime includes the CaT absorption feature as well as all of the Ti I absorption lines and 7 of the Fe I absorption lines included in this work. Identifying - or excluding - useful $T_{\rm eff}$ diagnostics in this wavelength regime represents a potentially powerful tool for leveraging the wealth of potential RSG data available in current and future {\it Gaia} data releases (which extends throughout the Milky Way and to the Large and Small Magellanic Clouds), and may make it possible to greatly improve the accuracy of the physical properties determined for these stars. \acknowledgements We would like to thank Trevor Dorn-Wallenstein, Philip Massey, and George Wallerstein for useful discussions regarding this research, as well as the staff of Apache Point Observatory and Las Campanas Observatory for their support in acquiring the observed spectra used in this work. These efforts were supported in part by a fellowship from the Alfred P. Sloan Foundation. \software{IPython \citep{PER-GRA:2007}, SciPy \citep{jones_scipy_2001}, NumPy \citep{van2011numpy}, IRAF \citep{tody1986, tody1993}, Matplotlib \citep{Hunter2007} }. \startlongtable \begin{deluxetable*}{lccccc} \tablewidth{0pt} \tablecolumns{6} \tablecaption{Sample Stars} \tablehead{ \colhead{Star} & \colhead{Spectral Type} & \colhead{T$\rm_{eff}$} & \colhead{log $g$} & \colhead{M$\rm_{bol}$} & \colhead{OB Assoc.} } \startdata MW & & & & & \\ \hline BD+59 38 & M2 I & 3650 & 0.1 & -7.17 & Cas OB4 \\ BD+56 595 & M1 I & 3800 & 0.4 & -6.31 & Per OB1-D \\ BD+57 647 & M2 I & 3650 & 0.0 & -7.51 & Per OB1-D? \\ BD+59 274 & M1 I & 3750 & 0.4 & -6.14 & Cas OB8/NGC581 \\ BD+59 372 & K5-M0 I & 3825 & 0.6 & -5.77 & Per OB1-A \\ BD+60 335 & M4 I & 3525 & 0.1 & -7.05 & Cas OB8/NGC663 \\ BD+60 2613 & M3 I & 3600 & -0.7/-0.4 & -9.64/8.57 & Cas OB5 \\ BD+60 2634 & M3 I & 3600 & -0.1 & -7.73 & Cas OB5 \\ Case 23 & M3 I & 3600 & 0.3 & -6.28 & Cas OB7 \\ Case 80 & M3 I & 3600 & 0.1 & -7.00 & Cas OB2 \\ Case 81 & M2 I & 3700 & 0.1 & -7.19 & Cas OB2 \\ HD 14469 & M3-4 I & 3575 & -0.1 & -7.64 & Per OB1-D \\ HD 14488 & M4 I & 3550 & -0.3 & -8.15 & Per OB1-D/NGC884 \\ HD 23475 & M2.5 II & 3625 & --- & --- & --- \\ HD 35601 & M1.5 I & 3700 & 0.2 & -6.81 & Aur OB1 \\ HD 36389 & M2 I & 3650 & --- & --- & --- \\ HD 37536 & M2 I & 3700 & 0.1 & -7.33 & Aur OB1 \\ HD 42475 & M1 I & 3700 & -0.1 & -7.76 & Gem OB1 \\ HD 42543 & M0 I & 3800 & 0.0 & -7.55 & Gem OB1 \\ HD 44537 & M0 I & 3750 & --- & --- & --- \\ HD 219978 & M1 I & 3750 & 0.4 & -6.44 & Cep OB3 \\ HD 236697 & M1.5 I & 3700 & 0.4 & -6.25 & NGC 457 \\ HD 236871 & M2 I & 3625 & 0.2 & -6.80 & Cas OB8 \\ HD 236915 & M2 I & 3650 & 0.3 & -6.40 & Per OB1-A \\ W Per & M4.5 I & 3550 & 0.1 & -7.09 & Per OB1-D? \\ \hline LMC & & & & & \\ \hline LMC 064048 & M2.5 I & 3500 & -0.2 & -7.81 & \nodata\\ LMC 109106 & M2.5 I & 3550 & -0.2 & -7.89 & \nodata \\ LMC 116895 & M0 I & 3750 & -0.2 & -8.10 & \nodata \\ LMC 141430 & M1 I & 3700 & -0.3 & -8.55 &\nodata \\ LMC 142202 & M1.5 I & 3650 & -0.3 & -8.36 & \nodata \\ LMC 146126 & K5 I & 3875 & -0.2 & -8.62 & \nodata \\ LMC 061753 & M2 I & 3600 & 0.0 & -7.80 & \nodata \\ LMC 170452 & M2.5 I & 3550 & -0.5 & -8.67 & \nodata \\ WOH S274 & M1.5 I & 3650 & 0.0 & -8.24 & \nodata \\ HV 12802 & M1 I & 3700 & -0.5 & -8.28 & \nodata \\ LMC 170079 & M2 I & 3625 & -0.5 & -8.80 & \nodata \\ LMC 054365 & M2.5 I & 3525 & -0.2 & -7.88 & \nodata \\ LMC 068125 & M4 I & 3475 & -0.3 & -8.21 & \nodata \\ LMC 135720 & M4.5 I & 3425 & -0.4 & -8.38 & \nodata \\ LMC 174714 & M1.5 I & 3625 & -0.3 & -8.39 & \nodata \\ LMC 175746 & M3 I & 3500 & -0.3 & -8.35 & \nodata \\ \hline SMC & & & & & \\ \hline SMC 005092 & M2 I & 3475 & -0.4 & -8.48 &\nodata \\ SMC 008930 & M0 I & 3625 & -0.3 & -8.38 & \nodata \\ SMC 018136 & M0 I & 3575 & -0.4 & -8.76 & \nodata \\ SMC 020133 & M0 I & 3625 & -0.3 & -8.39 & \nodata \\ SMC 025879 & M0 I & 3700 & -0.3 & -8.44 & \nodata \\ SMC 050840 & M1 I & 3625 & -0.2 & -8.12 & \nodata \\ SMC 060447 & K2 I & 3900 & 0.1 & -7.37 &\nodata \\ SMC 069886 & M2 I & 3750 & -0.3 & -8.76 & \nodata \\ SMC 078282 & M3 I & 3600 & -0.5 & -9.23 & \nodata \\ SMC 055275 & M2 I & 3650 & 0.0 & -7.88 & \nodata \\ SMC 056389 & M2 I & 3675 & -0.5 & -8.56 & \nodata \\ J00534794-7202095 & M3 I & 3575 & -0.5 & -8.77 & \nodata \\ SMC 011709 & K5-M0 I & 3725 & -0.1 & -7.93 & \nodata \\ SMC 046497 & K5-M0 I & 3700 & -0.2 & -8.30 & \nodata \\ SMC 049478 & K5-M0 I & 3700 & -0.3 & -8.49 & \nodata \\ SMC 052334 & K5-M0 I & 3675 & 0.0 & -7.82 & \nodata \\ SMC 056732 & K5-M0 I & 3725 & 0.0 & -7.66 & \nodata \\ \enddata \end{deluxetable*} \begin{deluxetable*}{cccccccc} \tablewidth{0pt} \tablecolumns{8} \tablecaption{Measured Absorption Features and Upper and Lower Bounds for Local Continuum} \tablehead{ \colhead{Wavelength (\AA)} & \colhead{Chem. Species} & \colhead{Min. (MW)} & \colhead{Max. (MW)} & \colhead{Min. (LMC)} & \colhead{Max. (LMC)} & \colhead{Min. (SMC)} & \colhead{Max. (SMC)} } \startdata 6572.0 & Ca I & 6571.0 & 6572.35 & 6572.35 & 6573.48 & 6571.91 & 6573.43 \\ 8498.0 & Ca II & 8492.40 & 8503.55 & 8494.5 & 8501.00 & 8495.00 & 8501.50 \\ 8514.1 & Fe I & 8513.40 & 8514.80 & 8513.28 & 8514.97 & 8513.19 & 8514.64 \\ 8518.1 & Ti I & 8516.60 & 8520.25 & 8517.40 & 8518.96 & 8517.68 & 8619.03 \\ 8542.0 & Ca II & 8533.35 & 8551.50 & 8533.5 & 8547.20 & 8533.75 & 8547.40 \\ 8582.0 & Fe I & 8581.73 & 8583.40 & 8581.274 & 8583.745 & 8581.24 & 8583.60 \\ 8611.0 & Fe I & 8609.95 & 8611.45 & 8611.085 & 8612.740 & 8611.03 & 8612.30 \\ 8662.0 & Ca II & 8653.00 & 8669.50 & 8655.30 & 8666.50 & 8655.50 & 8666.50 \\ 8679.4 & Fe I & 8679.2 & 8680.3 & 8678.0 & 8679.4 & 8678.6 & 8679.4 \\ 8683.0 & Ti I & 8681.3 & 8684.7 & 8681.6 & 8683.7 & \nodata & \nodata \\ 8688.5 & Fe I & 8687.0 & 8689.3 & 8687.6 & 8689.5 & 8685.6 & 8690.7 \\ 8692.0 & Ti I & 8690.4 & 8693.0 & \nodata & \nodata & \nodata & \nodata \\ 8710.2 & Fe I & 8709.8 & 8710.4 & 8709.9 & 8711.2 & 8709.9 & 8711.7 \\ 8712.8 & Fe I & 8711.0 & 8713.5 & 8711.6 & 8713.8 & 8712.0 & 8715.4 \\ 8730.5 & Ti I & 8728.2 & 8730.5 & \nodata & \nodata & \nodata & \nodata \\ 8757.0 & Fe I & 8754.8 & 8759.6 & 8756.3 & 8757.9 & 8756.5 & 8758.8 \\ 8793.2 & Fe I & 8791.4 & 8795.5 & 8792.6 & 8794.2 & 8792.4 & 8794.2 \\ 8805.0 & Fe I & 8802.6 & 8805.7 & 8804.0 & 8805.8 & 8804.0 & 8805.9 \\ 8824.0 & Fe I & 8823.0 & 8825.3 & 8823.2 & 8825.6 & 8823.4 & 8825.7 \\ 8838.0 & Fe I & 8837.7 & 8838.6 & 8836.7 & 8840.3 & 8837.3 & 8840.6 \\ \enddata \end{deluxetable*} \startlongtable \begin{deluxetable*}{lcccc} \tablewidth{0pt} \tablecolumns{5} \tablecaption{Ca I and CaT Equivalent Widths} \tablehead{ \colhead{Star} & \colhead{6572} & \colhead{8498} & \colhead{8542} & \colhead{8662} } \startdata Milky Way & & & & \\ \hline BD+59 38 & 0.311 & 2.14 & 3.61 & 3.30 \\ BD+56 595 & 0.38 & 2.50 & 5.00 & 4.11 \\ BD+57 647 & 0.388 & 2.19 & 4.61 & 3.79 \\ BD+59 274 & 0.363 & 2.36 & 4.79 & 4.25 \\ BD+59 372 & 0.350 & 2.37 & 5.01 & 3.96 \\ BD+60 335 & 0.378 & 2.28 & 4.11 & 3.40 \\ BD+60 2613 & 0.304 & 1.92 & 2.35 & 2.59 \\ BD+60 2634 & 0.314 & 2.08 & 2.59 & 3.16 \\ Case 23 & 0.356 & 2.31 & 3.63 & 3.76 \\ Case 80 & 0.359 & 2.26 & 3.84 & 3.69 \\ Case 81 & 0.373 & 2.38 & 4.48 & 4.00 \\ HD 14469 & 0.347 & 2.28 & 3.67 & 3.32 \\ HD 14488 & 0.295 & 2.07 & 1.76 & 2.34 \\ HD 23475 & 0.370 & 2.25 & 4.25 & 3.42 \\ HD 35601 & 0.381 & 2.36 & 4.48 & 3.81 \\ HD36309 & 0.395 & 2.47 & 3.83 & 3.69 \\ HD 37536 & 0.369 & 2.30 & 4.17 & 3.55 \\ HD 42475 & 0.343 & 2.40 & 4.64 & 3.87 \\ HD 42543 & 0.379 & 2.23 & 5.21 & 3.74 \\ HD 44537 & 0.402 & 2.85 & 5.08 & 4.49 \\ HD 219978 & 0.376 & 2.37 & 5.29 & 4.23 \\ HD 236697 & 0.380 & 2.48 & 5.23 & 4.18 \\ HD 236871 & 0.368 & 2.10 & 4.57 & 3.74 \\ HD 236915 & 0.370 & 2.33 & 4.56 & 3.81 \\ W Per & 0.291 & 2.13 & 2.95 & 2.85 \\ \hline LMC & & & & \\ \hline LMC 064048 & 0.377 & 2.367 & 4.611 & 3.619 \\ LMC 109106 & 0.4133 & 2.59 & 4.72 & 4.50 \\ LMC 116895 & 0.425 & 2.59 & 4.92 & 4.40 \\ LMC 141430 & 0.383 & 2.21 & 3.64 & 3.21 \\ LMC 142202 & 0.381 & 2.44 & 4.23 & 4.01 \\ LMC 146126 & 0.389 & 2.40 & 3.95 & 3.63 \\ LMC 061753 & 0.338 & 1.83 & 4.02 & 3.07 \\ LMC 170452 & 0.285 & 2.03 & 2.93 & 3.27 \\ WOH S274 & 0.430 & 2.38 & 3.73 & 3.71 \\ HV 12802 & 0.397 & 2.24 & 3.11 & 3.30 \\ LMC 170079 & 0.366 & 2.32 & 3.61 & 3.50 \\ LMC 054365 & 0.410 & 2.42 & 4.65 & 4.03 \\ LMC 068125 & 0.368 & 2.21 & 3.23 & 3.22 \\ LMC 135720 & 0.300 & 1.99 & 2.41 & 2.50 \\ LMC 174714 & 0.430 & 2.07 & 3.50 & 3.11 \\ LMC 175746 & 0.347 & 2.27 & 3.60 & 3.55 \\ \hline SMC & & & & \\ \hline SMC 005092 & 0.385 & 1.53 & 2.75 & 2.79 \\ SMC 008930 & 0.353 & 1.92 & 3.76 & 3.62 \\ SMC 018136 & 0.360 & 2.27 & 4.16 & 3.38 \\ SMC 020133 & 0.334 & 1.89 & 3.81 & 3.29 \\ SMC 025879 & 0.312 & 2.06 & 4.04 & 3.71 \\ SMC 050840 & 0.365 & 2.11 & 4.32 & 3.56 \\ SMC 060447 & 0.36 & 2.01 & 4.37 & 3.54 \\ SMC 069886 & 0.343 & 1.44 & 2.30 & 2.78 \\ SMC 078282 & 0.305 & 1.51 & 2.85 & 3.17 \\ SMC 055275 & 0.355 & 1.93 & 4.00 & 3.088 \\ SMC 056389 & 0.334 & 1.92 & 3.42 & 3.15 \\ J00534794-7202095 & 0.322 & 1.87 & 3.25 & 3.23 \\ SMC 011709 & 0.355 & 2.08 & 4.21 & 3.72 \\ SMC 046497 & 0.352 & 1.97 & 3.86 & 3.31 \\ SMC 049478 & 0.352 & 1.96 & 3.87 & 3.04 \\ SMC 052334 & 0.346 & 1.98 & 4.28 & 3.51 \\ SMC 056732 & 0.343 & 1.97 & 4.31 & 3.41 \\ \enddata \end{deluxetable*} \startlongtable \begin{deluxetable*}{lcccccccccccc} \tablewidth{0pt} \tablecolumns{13} \tablecaption{Fe I Equivalent Widths} \tablehead{ \colhead{Star} & \colhead{8514.1} & \colhead{8582.0} & \colhead{8611.0} & \colhead{8679.4} & \colhead{8688.5} & \colhead{8710.2} & \colhead{8712.8} & \colhead{8757.0} & \colhead{8793.2} & \colhead{8805.0} & \colhead{8824.0} & \colhead{8838.0} } \startdata Milky Way & & & & & & & & & & & & \\ \hline BD+59 38 & 0.319 & 0.148 & 0.100 & 0.034 & 0.453 & 0.025 & 0.470 & 0.443 & 0.325 & 0.282 & 0.477 & 0.052 \\ BD+56 595 & 0.299 & 0.192 & 0.146 & 0.051 & 0.444 & 0.030 & 0.493 & 0.454 & 0.343 & 0.267 & 0.424 & 0.069 \\ BD+57 647 & 0.320 & 0.171 & 0.119 & 0.039 & 0.488 & 0.022 & 0.471 & 0.516 & 0.399 & 0.243 & 0.476 & 0.052 \\ BD+59 274 & 0.306 & 0.171 & 0.132 & 0.057 & 0.408 & 0.029 & 0.406 & 0.388 & 0.299 & 0.241 & 0.373 & 0.060 \\ BD+59 372 & 0.306 & 0.185 & 0.140 & 0.061 & 0.413 & 0.031 & 0.409 & 0.454 & 0.308 & 0.212 & 0.380 & 0.064 \\ BD+60 335 & 0.264 & 0.158 & 0.108 & 0.038 & 0.401 & 0.025 & 0.449 & 0.454 & 0.303 & 0.259 & 0.455 & 0.065 \\ BD+60 2613 & 0.251 & 0.262 & 0.235 & 0.087 & 0.508 & 0.017 & 0.379 & 0.498 & 0.357 & 0.279 & 0.439 & 0.066 \\ BD+60 2634 & 0.236 & 0.169 & 0.092 & 0.038 & 0.492 & 0.029 & 0.411 & 0.391 & 0.301 & 0.224 & 0.391 & 0.031 \\ Case 23 & 0.305 & 0.160 & 0.119 & 0.046 & 0.498 & 0.033 & 0.450 & 0.425 & 0.331 & 0.266 & 0.426 & 0.045 \\ Case 80 & 0.297 & 0.211 & 0.118 & 0.050 & 0.496 & 0.029 & 0.480 & 0.400 & 0.292 & 0.241 & 0.385 & 0.047 \\ Case 81 & 0.330 & 0.186 & 0.152 & 0.053 & 0.563 & 0.033 & 0.489 & 0.457 & 0.333 & 0.271 & 0.423 & 0.047 \\ HD 14469 & 0.251 & 0.155 & 0.103 & 0.047 & 0.603 & 0.033 & 0.415 & 0.484 & 0.296 & 0.281 & 0.468 & 0.048 \\ HD 14488 & 0.238 & 0.144 & 0.069 & 0.034 & 0.453 & 0.023 & 0.091 & 0.452 & 0.246 & 0.243 & 0.460 & 0.049 \\ HD 23475 & 0.317 & 0.191 & 0.155 & 0.068 & 0.361 & 0.027 & 0.339 & 0.353 & 0.242 & 0.247 & 0.434 & 0.067 \\ HD 35601 & 0.319 & 0.179 & 0.179 & 0.042 & 0.459 & 0.035 & 0.502 & 0.450 & 0.294 & 0.284 & 0.418 & 0.030 \\ HD 36389 & 0.301 & 0.194 & 0.128 & 0.050 & 0.411 & 0.035 & 0.546 & 0.466 & 0.266 & 0.279 & 0.433 & 0.047 \\ HD 37536 & 0.288 & 0.194 & 0.124 & 0.040 & 0.390 & 0.027 & 0.456 & 0.457 & 0.278 & 0.287 & 0.342 & 0.033 \\ HD 42475 & 0.253 & 0.192 & 0.096 & 0.031 & 0.602 & 0.018 & 0.535 & 0.546 & 0.353 & 0.302 & 0.463 & 0.040 \\ HD 42543 & 0.275 & 0.182 & 0.114 & 0.026 & 0.579 & 0.029 & 0.463 & 0.542 & 0.379 & 0.338 & 0.472 & 0.052 \\ HD 44537 & 0.294 & 0.208 & 0.150 & 0.038 & 0.541 & 0.034 & 0.470 & 0.590 & 0.414 & 0.372 & 0.460 & 0.044 \\ HD 219978 & 0.312 & 0.188 & 0.155 & 0.061 & 0.496 & 0.038 & 0.484 & 0.442 & 0.287 & 0.270 & 0.417 & 0.077 \\ HD 236697 & 0.305 & 0.224 & 0.138 & 0.062 & 0.482 & 0.031 & 0.441 & 0.402 & 0.277 & 0.233 & 0.412 & 0.083 \\ HD 236871 & 0.303 & 0.167 & 0.124 & 0.046 & 0.518 & 0.033 & 0.476 & 0.415 & 0.351 & 0.260 & 0.435 & 0.065 \\ HD 236915 & 0.302 & 0.207 & 0.117 & 0.059 & 0.496 & 0.024 & 0.423 & 0.379 & 0.235 & 0.225 & 0.393 & 0.077 \\ W Per & 0.243 & 0.167 & 0.079 & 0.021 & 0.706 & 0.012 & 0.398 & 0.562 & 0.270 & 0.306 & 0.459 & 0.061 \\ \hline LMC & & & & & & & & & & & & \\ \hline LMC 064048 & 0.323 & 0.204 & 0.266 & 0.047 & 0.655 & 0.182 & 0.248 & 0.288 & 0.292 & 0.554 & 0.605 & 0.964 \\ LMC 109106 & 0.356 & 0.243 & 0.328 & 0.065 & 0.712 & 0.150 & 0.290 & 0.333 & 0.310 & 0.343 & 0.690 & 0.738 \\ LMC 116895 & 0.320 & 0.213 & 0.353 & 0.064 & 0.747 & 0.187 & 0.333 & 0.515 & 0.336 & 0.684 & 0.784 & 1.031 \\ LMC 141430 & 0.275 & 0.359 & 0.309 & 0.045 & 0.706 & 0.167 & 0.323 & 0.513 & 0.335& 0.597 & 0.720 & 0.799 \\ LMC 142202 & 0.324 & 0.407 & 0.334 & 0.036 & 0.751 & 0.133 & 0.377 & 0.499 & 0.371 & 0.621 & 0.730 & 0.779 \\ LMC 146126 & 1.103 & 0.446 & 0.501 & 0.026 & 1.100 & 0.170 & 0.4139 & 0.609 & 0.475 & 0.803 & 1.001 & 0.763 \\ LMC 061753 & 0.897 & 0.368 & 0.361 & 0.085 & 0.974 & 0.283 & 0.400 & 0.566 & 0.449 & 0.746 & 1.438 & 0.725 \\ LMC 170452 & 0.226 & 0.340 & 0.349 & 0.067 & 1.017 & 0.129 & 0.425 & 0.351 & 0.247 & 0.562 & 0.714 & 0.650 \\ WOH S274 & 0.314 & 0.455 & 0.386 & 0.067 & 1.153 & 0.141 & 0.491 & 0.480 & 0.271 & 0.667 & 0.832 & 0.689 \\ HV 12802 & 0.618 & 0.401 & 0.400 & 0.055 & 1.119 & 0.146 & 0.459 & 0.468 & 0.259 & 0.668 & 0.880 & 0.700 \\ LMC 170079 & 0.290 & 0.366 & 0.253 & 0.054 & 0.675 & 0.161 & 0.239 & 0.296 & 0.298 & 0.591 & 0.682 & 0.680 \\ LMC 054365 & 0.333 & 0.452 & 0.323 & 0.058 & 0.728 & 0.153 & 0.236 & 0.478 & 0.311 & 0.636 & 0.709 & 0.767 \\ LMC 068125 & 0.290 & 0.289 & 0.227 & 0.048 & 0.597 & 0.136 & 0.198 & 0.251 & 0.242 & 0.467 & 0.539 & 0.644 \\ LMC 135720 & 0.252 & 0.218 & 0.190 & 0.035 & 0.600 & 0.092 & 0.154 & 0.222 & 0.162 & 0.476 & 0.633 & 0.701 \\ LMC 174714 & 0.865 & 0.382 & 0.405 & 0.036 & 1.205 & 0.153 & 0.423 & 0.491 & 0.438 & 0.720 & 0.938 & 0.815 \\ LMC 175746 & 0.312 & 0.446 & 0.279 & 0.052 & 0.379 & 0.156 & 0.278 & 0.292 & 0.289 & 0.565 & 0.683 & 0.727 \\ \hline SMC & & & & & & & & & & & & \\ \hline SMC 005092 & 0.255 & 0.332 & 0.374 & 0.038 & 1.056 & 0.149 & 0.417 & 0.376 & 0.246 & 0.319 & 0.718 & 0.717 \\ SMC 008930 & 0.329 & 0.238 & 0.357 & 0.047 & 0.725 & 0.157 & 0.454 & 0.319 & 0.225 & 0.300 & 0.687 & 0.626 \\ SMC 018136 & 0.332 & 0.439 & 0.387 & 0.039 & 0.694 & 0.139 & 0.257 & 0.325 & 0.212 & 0.297 & 0.760 & 0.586 \\ SMC 020133 & 0.227 & 0.397 & 0.369 & 0.038 & 0.616 & 0.116 & 0.385 & 0.326 & 0.241 & 0.277 & 0.738 & 0.510 \\ SMC 025879 & 0.286 & 0.336 & 0.357 & 0.035 & 0.663 & 0.168 & 0.294 & 0.327 & 0.229 & 0.277 & 0.694 & 0.631 \\ SMC 050840 & 0.328 & 0.251 & 0.328 & 0.032 & 0.666 & 0.119 & 0.247 & 0.304 & 0.199 & 0.288 & 0.743 & 0.522 \\ SMC 060447 & 0.317 & 0.258 & 0.324 & 0.056 & 0.628 & 0.124 & 0.263 & 0.303 & 0.214 & 0.249 & 0.699 & 0.652 \\ SMC 069886 & 0.190 & 0.094 & 0.263 & 0.061 & 0.459 & 0.183 & 0.104 & 0.298 & 0.176 & 0.283 & 0.649 & 0.539 \\ SMC 078282 & 0.343 & 0.215 & 0.292 & 0.059 & 0.583 & 0.103 & 0.176 & 0.275 & 0.176 & 0.255 & 0.617 & 0.477 \\ SMC 055275 & 0.229 & 0.254 & 0.333 & 0.044 & 0.656 & 0.145 & 0.191 & 0.361 & 0.235 & 0.291 & 0.634 & 0.691 \\ SMC 056389 & 0.318 & 0.396 & 0.376 & 0.055 & 0.731 & 0.124 & 0.450 & 0.349 & 0.257 & 0.313 & 0.780 & 0.571 \\ J00534794-7202095 & 0.301 & 0.193 & 0.341 & 0.040 & 0.665 & 0.137 & 0.451 & 0.325 & 0.217 & 0.256 & 0.697 & 0.547 \\ SMC 011709 & 0.309 & 0.263 & 0.345 & 0.046 & 0.704 & 0.133 & 0.476 & 0.309 & 0.264 & 0.372 & 0.722 & 0.563 \\ SMC 046497 & 0.295 & 0.237 & 0.313 & 0.025 & 0.643 & 0.122 & 0.337 & 0.304 & 0.222 & 0.284 & 0.820 & 0.508 \\ SMC 049478 & 0.246 & 0.371 & 0.386 & 0.040 & 1.032 & 0.117 & 0.385 & 0.499 & 0.205 & 0.306 & 0.813 & 0.590 \\ SMC 052334 & 0.290 & 0.354 & 0.344 & 0.044 & 0.660 & 0.121 & 0.364 & 0.327 & 0.217 & 0.285 & 0.747 & 0.504 \\ SMC 056732 & 0.327 & 0.222 & 0.310 & 0.038 & 0.617 & 0.115 & 0.253 & 0.284 & 0.197 & 0.271 & 0.796 & 0.614 \enddata \end{deluxetable*}{} \startlongtable \begin{deluxetable*}{lccccc} \tablewidth{0pt} \tablecolumns{6} \tablecaption{Ti I Equivalent Widths} \tablehead{ \colhead{Star} & \colhead{8518.1} & \colhead{8683.0} & \colhead{8692.0} & \colhead{8730.5} & \colhead{8734.5} } \startdata Milky Way & & & & & \\ \hline BD+59 38 & 0.422 & 0.497 & 0.261 & 0.170 & 0.345 \\ BD+56 595 & 0.412 & 0.430 & 0.277 & 0.202 & 0.305 \\ BD+57 647 & 0.511 & 0.582 & 0.292 & 0.205 & 0.305 \\ BD+59 274 & 0.473 & 0.434 & 0.253 & 0.189 & 0.285 \\ BD+59 372 & 0.463 & 0.422 & 0.226 & 0.179 & 0.274 \\ BD+60 335 & 0.459 & 0.536 & 0.238 & 0.181 & 0.348 \\ BD+60 2613 & 0.367 & 0.531 & 0.198 & 0.123 & 0.278 \\ BD+60 2634 & 0.374 & 0.701 & 0.287 & 0.160 & 0.340 \\ Case 23 & 0.480 & 0.453 & 0.211 & 0.184 & 0.348 \\ Case 80 & 0.459 & 0.426 & 0.215 & 0.181 & 0.319 \\ Case 81 & 0.523 & 0.443 & 0.268 & 0.205 & 0.314 \\ HD 14469 & 0.395 & 0.532 & 0.239 & 0.199 & 0.274 \\ HD 14488 & 0.279 & 0.443 & 0.202 & 0.136 & 0.333 \\ HD 23475 & 0.447 & 0.420 & 0.247 & 0.173 & 0.291 \\ HD 35601 & 0.508 & 0.444 & 0.201 & 0.199 & 0.317 \\ HD 36389 & 0.528 & 0.493 & 0.233 & 0.209 & 0.346 \\ HD 37536 & 0.484 & 0.437 & 0.185 & 0.177 & 0.326 \\ HD 42475 & 0.474 & 0.524 & 0.220 & 0.148 & 0.273 \\ HD 42543 & 0.536 & 0.567 & 0.225 & 0.208 & 0.328 \\ HD 44537 & 0.543 & 0.549 & 0.293 & 0.212 & 0.288 \\ HD 219978 & 0.491 & 0.465 & 0.256 & 0.192 & 0.298 \\ HD 236697 & 0.480 & 0.481 & 0.201 & 0.178 & 0.312 \\ HD 236871 & 0.458 & 0.523 & 0.257 & 0.204 & 0.335 \\ HD 236915 & 0.453 & 0.487 & 0.279 & 0.190 & 0.311 \\ W Per & 0.412 & 0.653 & 0.296 & 0.187 & 0.362 \\ \hline LMC & & & & & \\ \hline LMC 064048 & 0.261 & 0.319 & 0.346 & 0.105 & 0.274 \\ LMC 109106 & 0.284 & 0.339 & 0.374 & 0.143 & 0.283 \\ LMC 116895 & 0.267 & 0.342 & 0.437 & 0.164 & 0.273 \\ LMC 141430 & 0.232 & 0.280 & 0.348 & 0.095 & 0.247 \\ LMC 142202 & 0.200 & 0.335 & 0.4308 & 0.118 & 0.254 \\ LMC 146126 & 0.055 & 0.446 & 0.168 & 0.134 & 0.055 \\ LMC 061753 & 0.373 & 0.342 & 0.247 & 0.100 & 0.132 \\ LMC 170452 & 0.153 & 0.400 & 0.292 & 0.171 & 0.296 \\ WOH S274 & 0.231 & 0.346 & 0.359 & 0.191 & 0.279 \\ HV 12802 & 0.291 & 0.306 & 0.334 & 0.176 & 0.227 \\ LMC 170079 & 0.229 & 0.368 & 0.367 & 0.120 & 0.295 \\ LMC 054365 & 0.277 & 0.331 & 0.344 & 0.129 & 0.308 \\ LMC 068125 & 0.252 & 0.322 & 0.344 & 0.117 & 0.303 \\ LMC 135720 & 0.190 & 0.386 & 0.463 & 0.092 & 0.275 \\ LMC 174714 & 0.339 & 0.394 & 0.439 & 0.106 & 0.265 \\ LMC 175746 & 0.236 & 0.369 & 0.378 & 0.148 & 0.304 \\ \hline SMC & & & & & \\ \hline SMC 005092 & 0.297 & 0.348 & 0.296 & 0.017 & 0.222 \\ SMC 008930 & 0.206 & 0.279 & 0.222 & 0.071 & 0.196 \\ SMC 018136 & 0.222 & 0.286 & 0.402 & 0.112 & 0.264 \\ SMC 020133 & 0.193 & 0.225 & 0.293 & 0.074 & 0.194 \\ SMC 025879 & 0.173 & 0.276 & 0.199 & 0.040 & 0.164 \\ SMC 050840 & 0.222 & 0.259 & 0.345 & 0.078 & 0.272 \\ SMC 060447 & 0.216 & 0.216 & 0.288 & 0.015 & 0.233 \\ SMC 069886 & 0.118 & 0.201 & 0.381 & 0.020 & 0.217 \\ SMC 078282 & 0.245 & 0.288 & 0.338 & 0.011 & 0.263 \\ SMC 055275 & 0.223 & 0.234 & 0.205 & 0.016 & 0.191 \\ SMC 056389 & 0.179 & 0.259 & 0.238 & 0.039 & 0.169 \\ J00534794-7202095 & 0.192 & 0.296 & 0.263 & 0.014 & 0.210 \\ SMC 011709 & 0.211 & 0.265 & 0.267 & 0.076 & 0.187 \\ SMC 046497 & 0.193 & 0.250 & 0.284 & 0.013 & 0.212 \\ SMC 049478 & 0.195 & 0.229 & 0.327 & 0.091 & 0.213 \\ SMC 052334 & 0.203 & 0.260 & 0.289 & 0.065 & 0.218 \\ SMC 056732 & 0.223 & 0.249 & 0.329 & 0.014 & 0.228 \enddata \end{deluxetable*}{} \startlongtable \begin{deluxetable*}{llcccccccc} \tablewidth{0pt} \tablecolumns{9} \tablecaption{MARCS Model Equivalent Widths} \tablehead{ \colhead{log $g$} &\colhead{Feature} & \colhead{3300 K} & \colhead{3400 K} & \colhead{3500 K} & \colhead{3600 K} & \colhead{3700 K} & \colhead{3800 K} & \colhead{3900 K} & \colhead{4000 K} } \startdata Milky Way & & & & & & & & \\ \hline $-$0.5 & Ca II Sum & 9.99 & 10.93 & 11.7 & 12.0 & 12.4 & 12.7 & 13.0 & 13.0 \\ & Ca I 6575.5 & 0.703 & 0.871 & 1.14 & 1.26 & 1.30 & 1.33 & 1.34 & 1.32 \\ & Ti I 8520.0 & 0.536 & 0.615 & 0.635 & 0.631 & 0.614 & 0.575 & 0.536 & 0.490 \\ & Ti I Sum & 2.02 & 2.23 & 2.39 & 2.50 & 2.54 & 2.60 & 2.57 & 2.47 \\ & Fe I 8516.5 & 0.716 & 0.818 & 0.880 & 0.920 & 0.946 & 0.962 & 0.970 & 0.967 \\ & Fe I Sum & 7.27 & 8.14 & 8.49 & 8.97 & 9.23 & 9.70 & 9.61 & 9.36 \\ \hline 0.0 & Ca II Sum & 9.95 & 11.07 & 12.36 & 13.57 & 13.99 & 14.62 & 14.93 & 15.68 \\ & Ca I 6575.5 & 0.678 & 0.807 & 1.07 & 1.19 & 1.25 & 1.28 & 1.31 & 1.32 \\ & Ti I 8520.0 & 0.457 & 0.533 & 0.561 & 0.563 & 0.516 & 0.526 & 0.492 & 0.451 \\ & Ti I Sum & 1.73 & 1.95 & 2.13 & 2.24 & 2.27 & 2.33 & 2.35 & 2.28 \\ & Fe I 8516.5 & 0.647 & 0.760 & 0.828 & 0.871 & 0.900 & 0.919 & 0.928 & 0.928 \\ &Fe I Sum & 6.49 & 7.40 & 7.77 & 8.15 & 8.44 & 8.73 & 8.80 & 8.87 \\ \hline 0.5 & Ca II Sum & 6.85 & 7.43 & 7.97 & 8.45 & 8.79 & 9.11 & 9.29 & 9.81 \\ & Ca I 6575.5 & 0.650 & 0.694 & 0.953 & 1.10 & 1.19 & 1.27 & 1.31 & 1.30 \\ & Ti 8520.0 & 0.386 & 0.457 & 0.488 & 0.496 & 0.473 & 0.473 & 0.443 & 0.411 \\ & Ti I Sum & 1.44 & 1.63 & 1.74 & 2.51 & 2.90 & 3.08 & 3.24 & 1.98 \\ & Fe I 8516.5 & 0.580 & 0.693 & 0.762 & 0.810 & 0.844 & 0.865 & 0.879 & 0.886 \\ & Fe I Sum & 5.64 & 6.23 & 6.76 & 7.28 & 7.70 & 7.92 & 7.99 & 7.94 \\ \hline 1.0 & Ca II Sum & 6.62 & 7.19 & 7.71 & 8.22 & 8.73 & 9.09 & 9.44 & 9.528 \\ & Ca I 6575.5 & 0.622 & 0.683 & 0.828 & 1.04 & 1.14 & 1.20 & 1.24 & 1.24 \\ & Ti 8520.0 & 0.324 & 0.389 & 0.421 & 0.432 & 0.434 & 0.419 & 0.401 & 0.370 \\ & Ti I Sum & 1.40 & 1.57 & 1.80 & 1.97 & 2.11 & 2.21 & 2.29 & 2.29 \\ & Fe I 8516.5 & 0.523 & 0.620 & 0.690 & 0.741 & 0.777 & 0.812 & 0.822 & 0.832 \\ & Fe I Sum & 3.96 & 4.43 & 4.70 & 4.96 & 5.20 & 5.37 & 5.46 & 5.50 \\ \hline LMC & & & & & & & & \\ \hline $-$ 0.5 & Ca II Sum &7.48 &8.28 &9.75 &10.36 &10.84 &11.19 &11.48 &11.50 \\ & Ca I 6575.5 &0.134 &0.145 &0.079 &0.130 &0.150 &0.170 &0.178 &0.182 \\ & Ti I 8520.0 &0.414 &0.349 &0.322 &0.269 &0.250 &0.231 &0.207 &0.183 \\ & Ti I Sum &2.279 &2.08 &2.005 &2.12 &2.19 &2.26 &2.29 &2.29 \\ & Fe I 8516.5 &0.854 &0.662 &0.569 &0.572 &0.582 &0.584 &0.587 &0.569 \\ & Fe I Sum &3.898 &3.26 &3.346 &3.386 &3.556 &3.664 &3.68 &3.67 \\ \hline 0.0 & Ca II Sum &6.81 &7.90 &8.44 &8.91 &9.41 &9.89 &10.23 &10.54 \\ & Ca I 6575.5 &0.657 &0.454 &0.442 &0.309 &0.269 &0.329 &0.316 &0.291 \\ & Ti I 8520.0 &0.394 &0.317 &0.282 &0.265 &0.255 &0.203 &0.182 &0.152 \\ & Ti I Sum &1.83 &1.71 &1.66 &1.71 &1.76 &1.75 &1.77 &1.74 \\ & Fe I 8516.5 &3.67 &3.60 &3.53 &3.72 &3.94 &4.016 &4.37 &3.96 \\ & Fe I Sum &3.67 &3.60 &3.53 &3.72 &3.94 &4.016 &4.37 &3.96 \\ \hline 0.5 & Ca II Sum &6.21 &6.63 &6.45 &7.90 &9.50 &10.14 &10.28 &10.71 \\ & Ca I 6575.5 &0.689 &0.570 &0.389 &0.254 &0.294 &0.254 &0.240 &0.219 \\ & Ti I 8520.0 &0.352 &0.289 &0.246 &0.223 &0.185 &0.168 &0.152 &0.131 \\ & Ti I Sum &2.22 &2.00 &1.89 &1.85 &1.88 &1.95 &1.99 &2.01 \\ & Fe I 8516.5 &0.845 &0.680 &0.556 &0.523 &0.538 &0.546 &0.547 &0.537 \\ & Fe I Sum &3.53 &3.44 &3.32 &3.24 &3.51 &3.56 &3.66 &3.03 \\ \hline 1.0 & Ca II Sum &5.50 &5.95 &6.28 &6.64 &7.25 &7.61 &7.89 &8.02 \\ & Ca I 6575.5 &0.096 &0.113 &0.109 &0.096 &0.080 &0.043 &0.052 &0.044 \\ & Ti I 8520.0 &0.363 &0.288 &0.224 &0.194 &0.166 &0.133 &0.131 &0.115 \\ & Ti I Sum &2.28 &1.96 &1.77 &1.77 &1.80 &1.80 &1.83 &1.83 \\ & Fe I 8516.5 &0.827 &0.661 &0.556 &0.512 &0.488 &0.472 &0.484 &0.491 \\ & Fe I Sum &3.35 &3.04 &2.88 &2.82 &2.81 &2.87 &2.86 &2.91 \\ \hline SMC & & & & & & & & \\ \hline $-$0.5 & Ca II Sum &10.84 &11.88 &12.75 &13.58 &14.11 &14.26 &14.29 &14.38 \\ & Ca I 6575.5 &0.131 &0.112 &0.091 &0.077 &0.060 &0.046 &0.034 &0.025 \\ & Ti I 8520.0 &0.299 &0.243 &0.209 &0.185 &0.164 &0.138 &0.109 &0.087 \\ & Ti I Sum &1.99 &1.97 &1.96 &1.86 &1.88 &1.88 &1.81 &1.72 \\ & Fe I 8516.5 &0.646 &0.534 &0.495 &0.508 &0.512 &0.516 &0.502 &0.488 \\ & Fe I Sum &3.26 &3.21 &3.24 &3.28 &3.42 &3.37 &3.38 &3.24 \\ \hline 0.0 & Ca II Sum &9.13 &9.68 &10.15 &10.86 &11.27 &11.6 &11.67 &11.9 \\ & Ca I 6575.5 &0.122 &0.100 &0.087 &0.029 &0.054 &0.044 &0.031 &0.026 \\ & Ti I 8520.0 &0.272 &0.225 &0.175 &0.150 &0.124 &0.105 &0.0878 &0.0792 \\ & Ti I Sum &1.35 &1.45 &1.39 &1.38 &1.37 &1.37 &1.33 &1.27 \\ & Fe I 8516.5 &0.843 &0.660 &0.562 &0.524 &0.544 &0.549 &0.553 &0.537 \\ & Fe I Sum &3.58 &3.49 &3.46 &3.58 &3.53 &3.69 &3.75 &3.75 \\ \hline 0.5 & Ca II Sum &7.35 &7.85 &8.34 &8.70 &9.12 &9.33 &9.53 &9.77 \\ & Ca I 6575.5 &0.115 &0.115 &0.053 &0.067 &0.054 &0.039 &0.020 &0.024 \\ & Ti I 8520.0 &0.261 &0.208 &0.157 &0.129 &0.114 &0.089 &0.0724 &0.0613 \\ & Ti I Sum &1.85 &1.72 &1.66 &1.63 &1.66 &1.63 &1.61 &1.55 \\ & Fe I 8516.5 &0.1561 &0.091 &0.0452 &0.0205 &0.0267 &0.0359 &0.0329 &0.0469\\ & Fe I Sum &2.33 &2.34 &2.20 &2.17 &2.16 &2.11 &2.07 &2.01 \\ \hline 1.0 & Ca II Sum &6.46 &6.36 &6.89 &7.31 &7.59 &7.86 &7.87 &8.05 \\ & Ca I 6575.5 &0.096 &0.113 &0.109 &0.096 &0.080 &0.043 &0.052 &0.044 \\ & Ti I 8520.0 &0.233 &0.176 &0.149 &0.122 &0.103 &0.0797 &0.0608 &0.0537 \\ & Ti I Sum &1.51 &1.47 &1.58 &1.51 &1.49 &1.43 &1.35 &1.27 \\ & Fe I 8516.5 &0.587 &0.514 &0.453 &0.427 &0.419 &0.427 &0.432 &0.425 \\ & Fe I Sum &2.84 &2.72 &2.73 &2.62 &2.59 &2.55 &2.52 &2.39 \enddata \end{deluxetable*}{} \startlongtable \begin{deluxetable*}{lccccccc} \tablewidth{0pt} \tabletypesize{\footnotesize} \tablecolumns{8} \tablecaption{Correlation and Best-Fit Coefficients - Observations} \tablehead{ \colhead{EW} & \colhead{R1:} & \colhead{P1:} & \colhead{Linear} & \colhead{Linear} & \colhead{Quadratic} & \colhead{Quadratic} & \colhead{Quadratic} \\ \colhead{} & \colhead{$T_{\rm eff}$ vs EW} & \colhead{$T_{\rm eff}$ vs EW} & \colhead{$A \times 10^{-3}$} & \colhead{B} & \colhead{$A \times 10^{-4}$} & \colhead{$B \times 10^{-2}$} & \colhead{C} } \startdata Milky Way & & & & & & & \\ \hline Ca II Sum & 0.755 & 0.00001 & 14.2 & -41.99 & -3.6 & 28.11 & -532.2 \\ Ca I 6572.0 & 0.500 & 0.01 & 0.019 & -0.3407 & -0.09979 & 0.75 & -13.81 \\ Ti I Sum & -0.0115 & 0.9 & -0.02 & -1.755 & 0.0083 & -0.0063 & 2.874 \\ Ti I/Fe I Ratio & 0.232 & 0.3 & 0.0005 & -0.1956 & -0.00271 & 24.76 & -385.29 \\ Fe I Sum & 0.234 & 0.261 & 0.8 & 0.1800 & -0.1071 & 7.953 & -144.4 \\ \hline LMC & & & & & & & \\ \hline CaT Sum & 0.320 & 0.3 & 370 & -3.76 & -1.57 & 11.8 & -211.6 \\ Ca I 6572.0 & 0.455 & 0.08 & 0.20 & -0.246 & -0.0691 & 0.520 & -9.39 \\ Ti I Sum & -0.508 & 0.04 & -0.70 & 3.86 & -0.00048 & 0.034 & -60.09 \\ Ti I/Fe I Ratio & -0.594 & 0.05 & -1.2 & 4.927 & -0.377 & 2.63 & -44.98 \\ Fe I Sum & 0.712 & 0.002 & 2.00 & -19.98 & -0.691 & 5.73 & -111.42 \\ \hline SMC & & & & & & & \\ \hline CaT Sum & 0.344 & 0.2 & 4.0 & -5.63 & -0.1446 & 1.105 & -0.0202 \\ Ca I 6572.0 & -0.0847 & 0.7 & -0.02 & 0.412 & 0.06027 & -0.0446 & 8.5192 \\ Ti I Sum & -0.490 & 0.05 & -0.6 & 3.35 & 0.2461 & -0.1876 & 36.75 \\ Ti I/Fe I Ratio & -0.465 & 0.06 & -0.8 & 3.52 & 0.4702 & -0.354 & 67.33 \\ Fe I Sum & -0.3054 & 0.2 & -1.4 & 9.56 & 0.5332 & -0.407 & 81.91 \enddata \end{deluxetable*} \startlongtable \begin{deluxetable*}{lcccccccc} \tablewidth{0pt} \tabletypesize{\footnotesize} \tablecolumns{9} \tablecaption{Correlation and Best-Fit Coefficients - MARCS Models} \tablehead{ \colhead{log $g$} & \colhead{EW} & \colhead{R1:} & \colhead{P1:} & \colhead{Linear} & \colhead{Linear} & \colhead{Quadratic} & \colhead{Quadratic} & \colhead{Quadratic} \\ \colhead{} & \colhead{} & \colhead{$T_{\rm eff}$ vs EW} & \colhead{$T_{\rm eff}$ vs EW} & \colhead{$A \times 10^{-2}$} & \colhead{B} & \colhead{$A \times 10^{-4}$} & \colhead{B} & \colhead{C} } \startdata Milky Way & & & & & & & & \\ \hline $-$0.5 & CaT Sum & 0.937 & 0.0002 & 0.34 & -0.5974 & -0.04081 & -0.03412 & -57.97 \\ & Ca I 6575.5 & 0.780 & 0.0131 & 0.05918 & -1.0271 & -0.01515 & 0.01985 & -22.32 \\ - & Ti I Sum & 0.0301 & 0.939 & 0.002432 & 2.2700 & -0.02727 & 0.02053 & -36.07 \\ - & Ti I/Fe I Ratio & -0.979 & 0.000004 & -0.04 & 2.2208 & -0.000323 & 0.00199 & -2.29 \\ - & Fe I Sum & 0.518 & 0.153 & 0.1361 & 3.7286 & -0.07506 & 0.05782 & -101.88 \\ \hline 0.0 & CaT Sum & 0.869 & 0.0023 & 0.67 & -7.875 & -0.1269 & 0.1022 & -186.3 \\ - & Ca I 6575.5 & 0.834 & 0.0052 & 0.06 & 1.275 & -0.01383 & 0.01105 & -20.7247 \\ - & Ti I Sum & 0.347 & 0.3598 & 0.03 & 1.198 & -0.02288 & 0.01746 & -30.97 \\ - & Ti I/Fe I Ratio & -0.980 & 0.000004 & -0.04 & 2.0135 & -0.002211 & 0.001278 & -1.0956 \\ - & Fe I Sum & 0.604 & 0.0850 & 0.0016 & 224.74 & -0.06842 & 0.05302 & -93.95 \\ \hline 0.5 & CaT Sum & 0.926 & 0.0003 & 0.3 & -2.664 & -0.03986 & 0.033005 & -58.70 \\ - & Ca I 6575.5 & 0.874 & 0.0048 & 0.07 & -1.541 & -0.0149 & 0.01908 & -22.48 \\ - & Ti I Sum & 0.409 & 0.275 & 0.08988 & -1.0564 & 0.05430 & 0.04175 & -77.40 \\ - & Ti I/Fe I Ratio & -0.974 & 0.001 & -0.0004 & 1.913 & - & - & - \\ - & Fe I Sum & 0.785 & 0.0203 & 0.204 & -0.4100 & -0.06111 & 0.0481 & -86.33 \\ \hline 1.0 & CaT Sum & 0.818 & 0.0071 & 0.27 & -1.7245 & -0.06196 & 0.04931 & -88.34 \\ - & Ca I 6575.5 & 0.888 & 0.0014 & 0.07236 & -1.6663 & -0.01196 & 0.009721 & -18.48 \\ - & Ti I Sum & 0.779 & 0.0134 & 0.08 & -1.0700 & -0.02192 & 0.01731 & -31.89 \\ - & Ti I/Fe I Ratio & -0.970 & 0.00007 & -0.027 & 1.52 & -0.00031 & 0.00199 & -2.59 \\ - & Fe I Sum & 0.965 & 0.0001 & 0.216 & -2.95 & -0.0092 & 0.0234 & -41.65 \\ \hline LMC & & & & & & & & \\ \hline $-$0.5 & CaT Sum &0.945 &0.00039 &58.3 &-11.16 &-0.00096 &0.076 &-138 \\ & Ca I 6575.5 &0.694 &0.0561 &1.000 &-0.2009 &0.0000231 &-0.00159 &2.867 \\ & Ti I Sum &0.526 &0.1805 &2.4 &1.325 &0.00012 &-0.0086 &17.46 \\ & Ti I/Fe I Ratio &0.357 &0.386 &0.00003 &90.65 &-0.000000989 &0.000748 &-0.4062 \\ & Fe I Sum &0.222 &0.5962 &1.900 &2.851 &0.00025 &-0.0179 &35.68 \\ 0.0 & CaT Sum &0.983 &0.00001 &50.70 &-9.479 &-0.000419 &0.0357 &-65.17 \\ & Ca I 6575.5 &-0.8156 &0.01358 &-4.3 &-0.8156 &0.0001309 &-0.00989 &19.33 \\ & Ti I Sum &0.997 &0.00186 &0.000004 &1.74 &0.000000554 &-0.00405 &9.097 \\ & Ti I/Fe I Ratio &-0.843 &0.0086 &-3.00 &1.51 &-0.000847 &0.00589 &-9.73 \\ & Fe I Sum &0.604 &0.079 &0.01784 &0.0009 &0.5647 &0.00000254 &-0.000957 \\ 0.5 & CaT Sum &0.926 &0.00013 &74.30 &-18.65 &-0.00000842 &0.0136 &29.83 \\ & Ca I 6575.5 &-0.8847 &0.00356 &-6.300 &2.666 &0.0000149 &-0.0115 &22.43 \\ & Ti I Sum &-0.3407 &0.409 &-1.6 &2.562 &0.00002027 &-0.0149 &2946 \\ & Ti I/Fe I Ratio &0.409 &0.3142 &-0.00005 &1.133 &0.0000000678 &-0.00106 &2.729 \\ & Fe I Sum &0.672 &0.0680 &5.8 &1.40 &0.000295 &-0.0210 &40.60 \\ 1.0 & CaT Sum &0.9917 &0.000001 &38.05 &-6.991 &-0.00001579 &0.0153 &-27.95 \\ & Ca I 6575.5 &-0.887 &0.0033 &-1.1 &0.463 &-0.00000115 &-1.066 & - \\ & Ti I Sum &-0.625 &0.0974 &-4.1 &3.386 &0.0000227 &-0.0170 &33.52 \\ & Ti I/Fe I Ratio &-0.453 &0.259 &-0.3 &1.119 &-0.00000012 &0.000059 &0.955 \\ & Fe I Sum &-0.663 &0.0731 &-4.9 &4.719 &0.0000257 &-0.0192 &38.77 \\ \hline SMC & & & & & & & & \\ \hline $-$0.5 & CaT Sum &0.927 &0.00093 &0.498 &-4.926 &-0.0999 &0.0779 &-137.46 \\ & Ca I 6575.5 &-0.994 &0.000001 &-0.015 &0.630 &0.000824 &-0.000754 &1.723 \\ & Ti I Sum &-0.933 &0.00071 &-0.034 &3.113 &-0.000319 &0.00199 &-1.107 \\ & Ti I/Fe I Ratio & -0.912 & 0.00158 & -0.043 & 2.266 & 0.000659 & -0.00524 & 11.00 \\ & Fe I Sum &0.458 &0.255 &0.015 &2.765 &-0.000736 &0.00552 &-7.00 \\ 0.0 & CaT Sum &0.974 &0.00004 &0.406 &-4.0513 &0.000436 &0.0359 &-61.862 \\ & Ca I 6575.5 &-0.892 &0.00287 &-0.0130 &0.000216 &-0.00170 &3.415 & - \\ & Ti I Sum &-0.7132 &0.0469 &-0.015 &1.919 &-0.000526 &0.00367 &-5.054 \\ & Ti I/Fe I Ratio & -0.970 & 0.000071 & -0.0304 & 1.357 & -0.000169 & 0.000930 & -0.886 \\ & Fe I Sum &0.799 &0.01732 &0.0370 &2.257 &0.000926 &-0.00639 &14.543 \\ 0.5 & CaT Sum &0.983 &0.00001 &0.342 &-3.720 &-0.0288 &0.244 &-41.93 \\ & Ca I 6575.5 &-0.9244 &0.00102 &-0.000104 &0.569 &0.000133 &-0.00115 &2.343 \\ & Ti I Sum &0.879 &0.00404 &-3.300 &2.852 &0.000477 &-0.00381 &9.185 \\ & Ti I/Fe I Ratio &0.391 &0.330 &0.0964 &-23.157 &0.906 &0.670 &-1225.411 \\ & Fe I Sum &-0.972 &0.00005 &-4.600 &3.862 &0.000107 &-0.00120 &5.277 \\ 1.0 & CaT Sum &0.967 &0.00009 &0.260 &-2.204 &-0.000179 &0.0157 &-25.924 \\ & Ca I 6575.5 &-0.887 &0.0033 &-0.011 &0.463 &-0.000115 &0.00753 &-1.0659 \\ & Ti I Sum &-0.806 &0.0157 &-0.033 &2.653 &-0.000157 &0.00739 &-11.375 \\ & Ti I/Fe I Ratio &-0.993 &0.000001 &-0.0402 &1.725 &-0.0000362 &-0.000138 &1.244 \\ & Fe I Sum &-0.975 &0.00004 &-0.050 &4.662 &0.00000121 &-0.000648 &4.284 \\ \enddata \end{deluxetable*} \startlongtable \begin{deluxetable*}{cccccc} \tablewidth{0pt} \tabletypesize{\footnotesize} \tablecolumns{6} \tablecaption{3D CaT Correlation Coefficients } \tablehead{ \colhead{Galaxy} & \colhead{EW} & \colhead{R2:} & \colhead{P2:} & \colhead{R3:} & \colhead{P3:} \\ \colhead{} & \colhead{} & \colhead{EW v. $Log_{\rm g}$} & \colhead{EW v. $Log_{\rm g}$} & \colhead{EW v. $M_{\rm bol}$} & \colhead{EW v. $M_{\rm bol}$} } \startdata MW & CaT Sum & 0.665 & 0.00030 & 0.721 & 0.0002 \\ MW & Ca I 6572.0 & 0.558 & 0.0070 & 0.526 & 0.0119 \\ MW & Ti I Sum & 0.162 & 0.472 & 0.1593 & 0.4789 \\ MW & Fe I Sum & -0.0700 & 0.757 & -0.079 & 0.727 \\ LMC & CaT Sum & 0.443 & 0.0856 & 0.4471 & 0.0825 \\ LMC & Ca I 6572.0 & 0.427 & 0.104 & 0.296 & 0.266 \\ LMC & Ti I Sum & -0.149 & 0.5808 & 0.209 & 0.438 \\ LMC & Fe I Sum & 0.398 & 0.127 & 0.018 & 0.948 \\ SMC & CaT Sum & 0.5564 & 0.0204 & 0.631 & 0.0066 \\ SMC & Ca I 6572.0 & 0.3601 & 0.156 & 0.436 & 0.0799 \\ SMC & Ti I Sum & -0.2147 & 0.4079 & -0.239 & 0.356 \\ SMC & Fe I Sum & 0.0866 & 0.7411 & 0.0866 & 0.741 \\ \enddata \end{deluxetable*} \startlongtable \begin{deluxetable*}{ccccccccccc} \tablewidth{0pt} \tabletypesize{\footnotesize} \tablecolumns{11} \tablecaption{CaT 3D Best Fits} \tablehead{ \colhead{Galaxy} & \colhead{EW} & \colhead{Linear} & \colhead{Linear} & \colhead{Linear} & \colhead{Quad} & \colhead{Quad} & \colhead{Quad} & \colhead{Quad} & \colhead{Quad} & \colhead{Quad} \\ \colhead{} & \colhead{} & \colhead{$A \times 10^{-2}$} & \colhead{B} & \colhead{C} & \colhead{A} & \colhead{B} & \colhead{C} & \colhead{D} & \colhead{$E \times 10^{-4}$} & \colhead{F} } \startdata MW & CaT Sum & 0.8 & 2.927 & 20.46 & -23.21 & 0.0358 & -8.26 & 0.0027 & -0.0869 & -0.0741 \\ LMC & CaT Sum & 6572.0 & 0.308 & 3.50 & -0.580 & -219.29 & 0.128 & 73.02 & -0.022 & -0.180 \\ SMC & CaT Sum & -0.02246 & 3.1687 & 10.5622 & -1485.5 & 0.7967 & -303.03 & 0.08187 & -10.6 & -11.340 \\ \enddata \end{deluxetable*} \begin{figure*} \includegraphics[width=.3\textwidth] {figure2a.pdf} \includegraphics[width=.3\textwidth] {figure2b.pdf} \includegraphics[width=.3\textwidth] {figure2c.pdf} \includegraphics[width=.3\textwidth] {figure2d.pdf} \includegraphics[width=.3\textwidth] {figure2e.pdf} \includegraphics[width=.3\textwidth] {figure2f.pdf} \includegraphics[width=.3\textwidth] {figure2g.pdf} \includegraphics[width=.3\textwidth] {figure2h.pdf} \includegraphics[width=.3\textwidth] {figure2i.pdf} \caption{CaT EWs (points) measured in our MW (left), LMC (center), and SMC (bottom) samples, compared to the stars' $T_{\rm eff}$ (left), log $g$ (center), and $M_{\rm bol}$ (right). For each dataset we have plotted linear and quadratic best fits (solid lines). Systematic error bars for our EW measurements (this work) and errors on the stars' physical properties as given in \protect\cite{levesque2005} are indicated by crosses (left).} \end{figure*} \begin{figure*} \includegraphics[width=.3\textwidth] {figure3a.pdf} \includegraphics[width=.3\textwidth] {figure3b.pdf} \includegraphics[width=.3\textwidth] {figure3c.pdf} \includegraphics[width=.3\textwidth] {figure3d.pdf} \includegraphics[width=.3\textwidth] {figure3e.pdf} \includegraphics[width=.3\textwidth] {figure3f.pdf} \includegraphics[width=.3\textwidth] {figure3g.pdf} \includegraphics[width=.3\textwidth] {figure3h.pdf} \includegraphics[width=.3\textwidth] {figure3i.pdf} \caption{As in Figure 2, but for the Ca I 6572\AA\ absorption feature.} \end{figure*} \begin{figure*} \includegraphics[width=.3\textwidth] {figure4a.pdf} \includegraphics[width=.3\textwidth] {figure4b.pdf} \includegraphics[width=.3\textwidth] {figure4c.pdf} \includegraphics[width=.3\textwidth] {figure4d.pdf} \includegraphics[width=.3\textwidth] {figure4e.pdf} \includegraphics[width=.3\textwidth] {figure4f.pdf} \includegraphics[width=.3\textwidth] {figure4g.pdf} \includegraphics[width=.3\textwidth] {figure4h.pdf} \includegraphics[width=.3\textwidth] {figure4i.pdf} \caption{As in Figure 2, but for the ratio of the Ti I 8518\AA/Fe II 8514\AA\ absorption features.} \end{figure*} \begin{figure*} \includegraphics[width=.3\textwidth] {figure5a.pdf} \includegraphics[width=.3\textwidth] {figure5b.pdf} \includegraphics[width=.3\textwidth] {figure5c.pdf} \includegraphics[width=.3\textwidth] {figure5d.pdf} \includegraphics[width=.3\textwidth] {figure5e.pdf} \includegraphics[width=.3\textwidth] {figure5f.pdf} \includegraphics[width=.3\textwidth] {figure5g.pdf} \includegraphics[width=.3\textwidth] {figure5h.pdf} \includegraphics[width=.3\textwidth] {figure5i.pdf} \caption{As in Figure 2, but for the sum of the Ti I absorption features.} \end{figure*} \begin{figure*} \includegraphics[width=.3\textwidth] {figure6a.pdf} \includegraphics[width=.3\textwidth] {figure6b.pdf} \includegraphics[width=.3\textwidth] {figure6c.pdf} \includegraphics[width=.3\textwidth] {figure6d.pdf} \includegraphics[width=.3\textwidth] {figure6e.pdf} \includegraphics[width=.3\textwidth] {figure6f.pdf} \includegraphics[width=.3\textwidth] {figure6g.pdf} \includegraphics[width=.3\textwidth] {figure6h.pdf} \includegraphics[width=.3\textwidth] {figure6i.pdf} \caption{As in Figure 2, but for the sum of the Fe I absorption features.} \end{figure*} \begin{figure*} \centering \includegraphics[width=.75\textwidth] {figure7a.pdf} \includegraphics[width=.75\textwidth] {figure7b.pdf} \includegraphics[width=.75\textwidth] {figure7c.pdf} \caption{3D comparison of $T_{\rm eff}$ vs. CaT EW vs. log $g$ for our MW (top), LMC (center), and SMC (bottom) data, with the best quadratic plane fit illustrated by the blue grid. Darkness of the points indicates ``closeness" to the viewer.} \end{figure*} \begin{figure*} \begin{center} \includegraphics[width=.49\textwidth] {figure8a.pdf} \includegraphics[width=.49\textwidth] {figure8b.pdf} \includegraphics[width=.32\textwidth] {figure8c.pdf} \includegraphics[width=.32\textwidth] {figure8d.pdf} \includegraphics[width=.32\textwidth] {figure8e.pdf} \caption{Comparing EW vs. $T_{\rm eff}$ as measured from the Milky Way MARCS stellar atmosphere models for the CaT (top left), Ca I (top right), Ti I/Fe I ratio (bottom left), Ti I sum (bottom center), and Fe I sum (bottom right). Colors indicate the four different values of log $g$ available in the MARCS models: $-0.5$ (red), 0.0 (blue), 0.5 (real), and 1.0 (green). Our observed data are also plotted for comparison in black. Best linear and quadratic fits are indicated by solid lines.} \end{center} \end{figure*} \begin{figure*} \begin{center} \includegraphics[width=.49\textwidth] {figure9a.pdf} \includegraphics[width=.49\textwidth] {figure9b.pdf} \includegraphics[width=.32\textwidth] {figure9c.pdf} \includegraphics[width=.32\textwidth] {figure9d.pdf} \includegraphics[width=.32\textwidth] {figure9e.pdf} \caption{As in Figure 8, but for LMC models and data.} \end{center} \end{figure*} \begin{figure*} \begin{center} \includegraphics[width=.49\textwidth] {figure10a.pdf} \includegraphics[width=.49\textwidth] {figure10b.pdf} \includegraphics[width=.32\textwidth] {figure10c.pdf} \includegraphics[width=.32\textwidth] {figure10d.pdf} \includegraphics[width=.32\textwidth] {figure10e.pdf} \caption{As in Figure 8, but for SMC models and data.} \end{center} \end{figure*}
\section{Introduction}\label{sec:intro} The so called frog model on $\Zd$ is driven by moving particles on the sites of the $\Zd$-lattice. Each site $x\in\Zd$ is assigned an initial number $\eta(x)$ of particles, where $\{\eta(x)\}_{x\in\Zd}$ are independent and identically distributed. We write $\nu$ for the product measure defined by this initial particle distribution. Each particle is then independently equipped with a discrete time simple symmetric random walk, denoted for particle $j=1,\ldots,\eta(x)$ at the site $x$ by $(S^{x,j}_n)_{n\in\N}$ and encoded by jumps rather than sites. A particle starts moving from its initial location and the associated random walk then specifies the movement of the particle in each time step. The set of all these random walks is denoted by $S=\{(S^{x,j}_n)_{n\in\N}:x\in\Zd,j=1,\ldots,\eta(x)\}$. At time 0, the particles at the origin are activated, while all other particles are sleeping. When a particle is activated, it starts moving according to its associated random walk so that, in each time step, it moves to a uniformly chosen neighboring site. When a site is visited by an active particle, any sleeping particles at the site are activated and start moving. If the origin is non-empty, this means that the set of activated particles grows to infinity. The model has previously been studied e.g.\ with respect to transience/recurrence \cite{telcs}, the shape of the set of visited sites \cite{frogs_shape, frogs_shape_random} and extinction/survival for a version of the model including death of active particles \cite{phase_transition}. Here we introduce a two-type version of the model, where an active particle can be of either of two types. We study the possibility for the types to activate infinitely many particles and investigate in particular the event of coexistence, which is said to occur if both types activate infinitely many particles. Similar questions have been studied for other competition models on $\Zd$, for instance the so-called Richardson model where a site becomes type $i$ infected ($i=1,2$) at a rate proportional to the number of nearest neighbor sites of type $i$. In our model however, the type is associated with the moving particles rather than the sites. \subsection{Definition of the model}\label{sec:definition} To define the model, first assign an initial number of particles per site according to the product measure $\nu$ and equip each particle with a random walk from the set $S$, as described above. At time 0, the particles at the origin are activated and assigned type 1, while the particles at another site $z\in\Zd$ are activated and assigned type 2. All other particles are sleeping and do not yet have a type. The activated particles then move according to their associated random walks in $S$. A type $i$ particle makes a jump in a given time step independently with probability $p_i$ and stays at its present location with probability $1-p_i$. When a particle leaves its location after a geometrically distributed number of time steps, it jumps to the next location in its associated random walk. We say that a site is \emph{discovered} when it is first hit by an active particle. It is said to be \emph{discovered by type $i$} if the first particle(s) that hits it is of type $i$. Note that a site can be discovered by both types -- this happens if particles of both types arrive at the site in the same time step. If there are sleeping particles at the discovered site, these are activated and assigned the same type as the active particle(s) that discovered the site. If the site is discovered by both types, we fix an arbitrary rule for deciding the type(s) of its particles. We may e.g.\ toss a coin (fair or biased), assign the type(s) based on the number of particles of each type that discover the site, or deterministically always decide in favor of a given type. All our results hold for any tie-breaker rule; see however Section \ref{sec:open} for a discussion on potential effects. Once it has been activated and assigned a type, a particle remains active and keeps its type forever. Formally, we construct the process as follows. Let $(x,j)$ denote particle $j$ at the site $x\in\Zd$ and let $(L^{x,j}_{n,k})_{n,k\in\N}$ be a family of independent and identically distributed (i.i.d.) random variables associated with the particle $(x,j)$, where $L^{x,j}_{n,k}$ is uniform on $[0,1]$. Write $L=\{(L^{x,j}_{n,k})_{n,k\in\N}:x\in\Zd,j=1,\ldots,\eta(x)\}$. These variables control the delays of the particles compared to their associated random walks: Assume that a particle $(x,j)$ has made $n$ jumps since it was activated, and that the particle arrived at its current location $S^{x,j}_n$ at time $t$. Its next move (to $S^{x,j}_{n+1}$) occurs at time $t+k$ if and only if $L^{x,j}_{n,m}>p$ for all $m<k$ and $L^{x,j}_{n,k}\leq p$. The randomness in the process is hence summarized by $\Pi=(\nu,S,L)$. The rule for breaking ties may incorporate additional randomness, which we omit in the notation since it will not play a role for our arguments. Write $\PP_{\0,z}$ for the probability measure of the process started at time 0 with the particles at the origin $\0$ type 1 and the particles at $z$ type 2. Before proceeding, we note that $(\nu,S,L)$ can be used to formally construct a one-type process based on lazy random walks with probability $p$ of jumping in each time step. Both for the one-type process and the two-type process, the construction provides a coupling of the processes for different values of $p$ and $(p_1,p_2)$, respectively, where the set of discovered sites increases with $p$ in the one-type process and the set of sites discovered by type 1 (2) increases with $p_1$ ($p_2$) in the two-type process if $p_2$ ($p_1$) is kept fixed. By symmetry, we may assume that $p_2\leq p_1$ in the two-type process. \subsection{Results}\label{sec:results} It follows from the results in \cite{telcs} that the time until any given site is discovered is finite almost surely. All particles will hence eventually be activated. Our first result is that both types have a strictly positive probability of outcompeting the other type, in the sense that it activates infinitely many particles, while the other type activates only finitely many. If the initial particle distribution allows for empty sites, this is trivial -- since the starting site of either type may then be empty thereby preventing the type from growing at all -- but we show that it is true also conditioning on a non-zero number of particles on both starting sites. Intuitively, the winning type then manages to capture all particles in an area that surrounds all particles of the other type and that is thick enough to prevent the surrounded type from traversing it. The event that infinitely many particles are activated by type $i$ is denoted by $G_i$ and $G_i^c$ denotes its complement. \begin{prop}\label{pr:both_can_win} For any initial distribution $\nu$, any $p_1,p_2\in(0,1]$ and any $z\in\Zd$, conditional on $\eta(\0)\geq 1$ and $\eta(z)\geq 1$, we have that $\PP_{\0,z}(G_1\cap G^c_2)>0$ and $\PP_{\0,z}(G^c_1\cap G_2)>0$. \end{prop} Next we turn to the event $G_1\cap G_2$ that both types activate infinitely many sites. This corresponds to a power balance between the types in the sense that none of them manages to outcompete the other. We first show that whether this event has positive probability or not does not depend on the choice of the starting site $z$ for type 2 when $p_1\in(0,1)$. We may hence assume that type 2 starts at the site $\1=(1,0,\dots,0)\in\Zd$ next to the origin. We expect this to be true also when $p_1=1$, but the proof is based on a coupling argument that requires that particles can stay put in a given time step. It turns out however that a slight modification of the argument gives a weaker version when $p_1=1$; see Lemma \ref{le:odd_z}. This will be used to establish our main result when $p_1=p_2=1$. \begin{prop}\label{pr:initial} For any initial distribution $\nu$ and any $p_1,p_2\in(0,1)$, we have for any $z\in\Zd$ that $\PP_{\0,z}(G_1\cap G_2)>0$ if and only if $\PP_{\0,\1}(G_1\cap G_2)>0$. \end{prop} Our main result is that coexistence has a strictly positive probability when $p_1=p_2$. We are convinced that this is true for any initial distribution, but the possibility of having empty sites causes some technical problems that we are only able to handle when the expected initial number of particles per site is finite. \begin{theorem}\label{th:coex} Assume that either $\eta(x)\geq 1$ almost surely or $\E[\eta(x)]<\infty$. Then $\PP_{\0,\1}(G_1\cap G_2)>0$ if $p_1=p_2\in(0,1]$. \end{theorem} In other competition models on $\Zd$, the typical picture is that two species can coexist if and only if they are identical in the sense that they grow according to the same dynamics with the same parameter values. One might guess that the situation is similar here so that coexistence is not possible when $p_1\neq p_2$ and the types can hence coexist if and only if $p_1=p_2$. However, we do not think this is true. In particular, we think that, when the initial distribution has a very heavy tail, then the types can coexist for all values of $p_1$ and $p_2$. We comment further on this in Section \ref{sec:open}. An important ingredient in the proof of all our results is the shape theorem for the one-type frog model. This was established in \cite{frogs_shape} starting with one particle per site and generalized in \cite{frogs_shape_random} to arbitrary initial distributions. Both versions concern the one-type model based on non-lazy random walks, but we will need the result also for a lazy version of the process, where the particles move according to lazy random walks with a probability $p\in(0,1]$ of jumping in each time step. This follows from the same proof as in \cite{frogs_shape,frogs_shape_random}; see the appendix. To formulate the theorem, let $\xi_n(p)$ denote the set of discovered sites in a one-type process started from the origin where all particles move according to lazy random walks that have probability $p$ of moving in each time step. Formally, we use the family $L$ introduced above to control the delays of the random walks in $S$ to obtain the movements of the particles. Write $\bar{\xi}_n(p)=\{x+(1/2,1/2]^d:x\in\xi_n(p)\}$. \begin{theorem}[General shape theorem]\label{th:shape} For any $\nu$ and $p\in(0,1]$, there exists a non-empty convex set $\cA=\cA(\nu,p)$ such that, conditional on $\eta(\0)\geq 1$ and for any $\vep\in(0,1)$, almost surely $$ (1-\vep)\cA\subset\frac{\bar{\xi}_n(p)}{n}\subset(1+\vep)\cA $$ for large $n$. \end{theorem} Characterizing the shape $\cA$ largely remains an open problem. However a few things can be said about how the shape depends on the initial distribution $\nu$ and the parameter $p$. By construction of the process, we have that $\xi_n(p)\subseteq\xi_n(p')$ for $p\leq p'$ and thereby $\cA(\nu,p)\subseteq\cA(\nu,p')$ for any $\nu$. For $x\in\RR^d$, let $\|x\|_1$ denote the $L_1$-norm of $x$ and let $\cD=\{x\in\RR^d:\|x\|_1\leq 1\}$. Due to the discrete nature of the model, the shape cannot exceed $\cD$, that is, $\cA(\nu,p)\subseteq\cD$ for any $\nu$ and $p$. In \cite{frogs_shape_random}, it is shown that, if $\nu$ is such that the initial number of particles $\eta(x)$ per site $x$ has a heavy tail, then $\cA(\nu,1)=\cD$. A minor modification of that proof shows that the conclusion remains valid also for $p<1$; see the appendix for a brief outline. Intuitively, if there are very many particles per site then, with overwhelming probability, one particle will jump to each neighbor in a given step even if the probability of jumping per particle is small. \begin{theorem}\label{th:diamond} Assume that $\nu$ satisfies $\PP(\eta(x)\geq n)\geq (\log n)^{-\delta}$ for some positive $\delta<d$ and all $n$ large enough. Then $\cA(\nu,p)=\cD$ for any fixed $p\in(0,1]$. \end{theorem} We describe possible implications of this result for the possibility of coexistence in Section \ref{sec:open} below, where we have collected open problems and suggestions for further work. Section \ref{sec:related} contains references to previous work on competition on $\Zd$. Proposition \ref{pr:both_can_win} and \ref{pr:initial} are then proved in Section \ref{sec:prop_both} and Section \ref{sec:prop_initial}, respectively, and Theorem \ref{th:coex} is proved in Section \ref{sec:th_proof}. Finally, some details on how Theorem \ref{th:shape} and Theorem \ref{th:diamond} are derived using their counterparts for $p=1$ are given in the appendix. \subsection{Open problems}\label{sec:open} Here we describe some open problems for the model, and some modifications of the model that might be worth further study. \noindent \textbf{Coexistence and the shape.} A natural question is if Theorem \ref{th:coex} has a counterpart for $p_2<p_1$ saying that coexistence is then impossible. We do not think that this is the case. Instead, we expect that two types can coexist if and only if their one-type shapes coincide, that is, if $\nu$ and $(p_1,p_2)$ are such that $\cA(\nu,p_1)=\cA(\nu,p_2)$. According to Theorem \ref{th:diamond}, for any $p_1,p_2\in(0,1]$, a process with $p=p_1$ and one with $p=p_2$ both give the same maximal shape $\cD$ when $\nu$ has a sufficiently heavy tail, indicating that type 1 can then coexist with a strictly weaker type 2 if our intuition is correct. To establish our intuition, one would have to show that, if the type 1 shape is strictly larger than the type 2 shape and type 1 activates infinitely many particles, then type 1 will sooner or later use its larger speed to surround type 2. To do this, one might try to generalize arguments used for first passage percolation; see e.g.\ \cite{cont_comp,HP2}. They are however incomplete in the sense that they cannot rule out the possibility of type 1 surviving in a weak sense, that is, growing unboundedly but occupying only a vanishing fraction of the active sites. For a given initial distribution $\nu$, how is the shape affected by $p$? This is of independent interest, but would also be worth studying in view of its potential relevance for the possibility of coexistence. As pointed out above, we have $\cA(\nu,p)\subseteq\cA(\nu,p')\subseteq \cD$ for $p\leq p'$. Are there conditions on $\nu$ that guarantee that $\cA(\nu,p)$ is strictly smaller than $\cA(\nu,p')$ for all $p<p'$? According to Theorem \ref{th:diamond}, the $p$-shape and the $p'$-shape coincide when $\nu$ is heavy-tailed since the asymptotic growth rate in both cases is maximal. Are there cases when $\cA(\nu,p')$ is strictly smaller than $\cD$, and we still have $\cA(\nu,p)=\cA(\nu,p')$ for $p<p'$ sufficiently close to $p'$? \noindent \textbf{The tie-breaker.} All our results apply for any tie-breaking rule. An unfair tie-breaker can hence not ruin the possibility of coexistence when $p_1=p_2$. One can still ask if an unfair tie-breaker can make coexistence possible in a situation where it is not possible with a fair tie-breaker (by giving an advantage to the weaker type). We think that the answer is no. However the tie-breaker could potentially influence the geometry of the sets of sites discovered by the respective types and the properties of the boundaries between them. \noindent \textbf{Collective laziness.} An alternative way of modeling the delays is to toss one single coin in each time step deciding if the type 1 particles move or not, that is, with probability $p_1$ all type 1 particles move and with probability $1-p_1$ they all stay where they are. Similarly, one single coin toss determines if the type 2 particles move or not. The intuition behind our conjecture that coexistence is possible if and only if the one-type shapes coincide is fairly general and apply also to this version of the model. One might hence guess that it is qualitatively similar to our model, where the delays of the particles are independent. Note however that, with collective laziness the one-type shape theorem follows immediately from the version without laziness from a simple time-scaling argument and we obtain in this case that $\cA(\nu,p_2)=\frac{p_2}{p_1}\cA(\nu,p_1)$ for all $\nu$, so that type 2 gives rise to a strictly smaller shape when $p_2<p_1$. If indeed coexistence is possible if and only if the one-type shapes coincide for both versions of the model, then there will be choices for $(p_1,p_2)$ for which the types can coexist with independent laziness but not with collective laziness. \noindent \textbf{Continuous time.} The frog model is traditionally studied in discrete time, but it could of course also be defined in continuous time by letting the particles move according to independent simple random walks in continuous time. This has been done in \cite{combustion}, where a shape theorem is proved for the one particle per site initial configuration $\eta(x)\equiv 1$. A two-type version of such a model would be obtained by letting type 1 particles jump with rate 1 and type 2 particles with rate $\beta<1$. It would have the advantage that no tie-breaker is needed, since particles will almost surely not jump simultaneously. For $\eta(x)\equiv 1$ we conjecture that coexistence is possible if and only if $\beta=1$. For other initial distributions, one would first have to establish a shape theorem. In contrast to the discrete case, this might require conditions on the initial distribution. Could the growth be superlinear in time if $\eta(x)$ has a very heavy tail? For $\nu$ that do give rise to a bounded shape, it follows by time-scaling that the shape at rate $\beta<1$ is strictly smaller than the rate 1 shape and we therefore conjecture that coexistence is possible if and only if $\beta=1$. \subsection{Related work}\label{sec:related} Competition models on $\Zd$ have been an active research area the last decades. A two-type version of the Richardson model was introduced in \cite{HP1}, with two types competing to invade the sites of the $\Zd$-lattice. The growth is driven by exponential passage times on the edges with potentially different intensities for the types, and the conjecture is that the types can grow to occupy infinitely many sites simultaneously if and only if they spread with the same intensity. The if-direction was proved in \cite{HP1} for $d=2$ and independently in \cite{GM_coex} and \cite{Hoff_coex} for $d\geq 2$. The only-if direction is not proved, but partial results can be found in \cite{GM_invisible,HP2}. A variation of the two-type Richardson model, where a site that has at least two neighbors of a given type is immediately occupied by that type, is studied in \cite{urns}. Another variation was recently introduced in \cite{VA}. A type 1 process there starts from the origin and each time it reaches a new site, with some probability instead a type 2 process starts at this site. We also mention the multi-type contact process, introduced in \cite{Neu} and further studied e.g.\ in \cite{MV, MPV}. There sites can recover and become susceptible again, and the focus is on properties of stationary measures. In the above models, the type is associated with the sites. The frog model however is driven by moving particles, and the type in our two-type version is associated with the particles. A model that is related to the frog model is obtained by letting all particles move, that is, there are no sleeping particles but all particles start moving according to independent random walks at time 0. This model is technically considerably more challenging to analyze and has been studied e.g.\ in \cite{KS_05,KS_08}. A competition version was studied in \cite{RW_competition}. There the two types both move at rate 1, type 1 starting from a single site and type 2 from some infinite set of sites $S$, and a particle changes type if a particle of the other type jumps onto it. The main result is a condition on the set $S$ that determines when type 1 has a chance of surviving. In this context we also mention \cite{KS_03}. The model studied there is not a competition model, but also deals with the evolution of two interacting types. \section{Proof of Proposition \ref{pr:both_can_win}}\label{sec:prop_both} In this section we prove Proposition \ref{pr:both_can_win}. A key observation is that a given particle will almost surely discover only finitely many sites, implying that it will activate finitely many other particles. This follows from the fact that the distance of a random walk from its starting point after $n$ steps scales like $\sqrt{n}$, while the set of discovered sites in the frog model grows linearly in $n$ according to the shape theorem. The proposition follows from this in combination with coupling arguments. Consider a (possibly lazy) simple symmetric random walk $S_n$ on $\Zd$, starting at the origin. It is well known that the distance to the origin scales like $\sqrt{n}$. Let $\cD_r=\{x\in\RR^d:\;\lVert x\rVert_1\leq r\}$. The following result quantifies the probabilities of moderate deviations for the walk. \begin{lemma}\label{le:SRW} For any $\varepsilon\in(0,1/2)$, there exists a constant $\gamma>0$ such that, for all $n$: \begin{equation}\label{eq:SRW} \PP(S_n\in\cD_{n^{1-\varepsilon}})\geq 1-\exp\{-\gamma n^{1-2\varepsilon}\}. \end{equation} \end{lemma} \begin{proof} For a one-dimensional walk, it is proved in \cite{moderate} that $\PP(S_n\not\in \cD_{cn^{1-\varepsilon}})\leq \exp\{-\gamma n^{1-2\varepsilon}\}$ for $\varepsilon\in(0,1/2)$, all $c>0$ and some $\gamma>0$. This immediately gives the bound for $d=1$. For $d\geq 2$, the probability of a given jump being along the $x_k$-direction ($k=1,\ldots,d$) is $1/d$. The displacement in a given direction can hence be controlled by the one-dimensional bound, and by a union bound we obtain \eqref{eq:SRW} for the $d$-dimensional walk with $\cD_{n^{1-\varepsilon}}$ replaced by a cube with side length $2cn^{1-\varepsilon}$ centered at the origin. The desired bound follows from this by choosing $c$ small such that this cube is contained in $\cD_{n^{1-\varepsilon}}$. \end{proof} We now combine this with the shape theorem to conclude that any given particle discovers only finitely many sites. \begin{lemma}\label{le:finite} For any initial distribution, the number of sites discovered by a given particle in the one-type or two-type frog model is almost surely finite. \end{lemma} \begin{proof} We show the statement for the origin particles in a one-type model, and then explain how this gives the general statement. Consider one of the initially activated particles at the origin in a one-type model. By Lemma \ref{le:SRW} and the Borel-Cantelli lemma, the position of the particle will almost surely be contained in $\cD_{n^{3/4}}$ for large $n$. However, by Theorem \ref{th:shape}, the one-type process grows linearly in $n$, and gives rise to a deterministic shape $\cA$ on the scale $n^{-1}$. The shape $\cA$ is non-empty and convex, implying that $\cA\supset \cD_\delta$ for some small $\delta>0$. Hence almost surely $\cD_{n\delta/2}\subset \xi_n$ for large $n$. It follows that the origin particle will almost surely not discover any new sites for large $n$. The number of sites discovered by a particle with initial location $x\neq \0$ in the one-type process is dominated by the number of sites discovered by a particle from $x$ in a one-type process started with only the particles at $x$ activated. This gives the statement for any given particle in the one-type process. In the two-type process, the number of sites discovered by a given particle with initial location $x$ is dominated by the number of sites discovered by a particle from $x$ in a one-type process (constructed based on the same vector $\Pi$) started with only the particles at $x$ activated and where the $x$-particles move according to trajectories with the larger jump probability $p_1$ while all other particles use the smaller jump probability $p_2$. It follows from the same argument as above that this number is almost surely finite. \end{proof} \begin{remark}\label{rem1} As noted in the proof, the same argument yields the same conclusion for a given particle also in a slightly modified one-type process where a finite number of particles move according to random walks with jump probability $p_1$ while the rest of the particles move according to random walks with jump probability $p_2<p_1$. \end{remark} \begin{proof}[Proof of Proposition \ref{pr:both_can_win}] We prove that $\PP_{\0,z}(G_1^c\cap G_2)>0$, that is, the (possibly) weaker type 2 has a strictly positive probability of winning. That $\PP_{\0,z}(G_1\cap G_2^c)>0$ is proved similarly. We first treat the case when $p_1<1$ so that both types are lazy, and then describe how the argument can be generalized to the case when $p_1$ (and possibly also $p_2$) is equal to 1. Consider a modified one-type process started with the particles at $\0$ and $z$ active at time 0, and where the particles starting at $\0$ move according to random walks with jump probability $p_1$, while all other particles (including those activated by the particles at $\0$) move according to random walks with jump probability $p_2$. The process is generated using the random objects in the vector $\Pi=(\nu,S,L)$, as described in Section \ref{sec:definition}. We let $\Pi^{\sss \rm{one}}_n$ denote the state of this process after $n$ steps, including the location and origin of all particles. By Remark \ref{rem1}, the particles at $\0$ discover an almost surely finite number of sites in the above one-type process. With $N$ denoting the last time in the process a particle starting at the origin discovers a new site, we can hence pick $m$ such that $\PP(N\leq m)\geq 1/2$. Note that the set of discovered sites after $m$ steps is contained in $\cD_m=\{x\in\RR^d:\|x\|_1\leq m\}$ and write $v_m$ for the number of sites in $\cD_m$. Now consider a two-type process started with the particles at $\0$ and $z$ active of type 1 and type 2, respectively. We will define coupled random walks $\hat{S}$ and delay variables $\hat{L}$ with the same distribution as $S$ and $L$ such that, if the two-type process is generated by $\hat{\Pi}=(\nu,\hat{S},\hat{L})$, then with positive probability the only particles that become activated by type 1 are those at $\0$. Essentially, the idea is to let the $\0$-particles stay put while type 2 progresses beyond the set of discovered sites in $\Pi^{\sss \rm{one}}_m$, preventing type 1 from discovering new sites if the $\0$-particles do not do so in the one-type process. To this end, the delay variables for the $\0$-particles before their first jump are generated independently for $k=1,\ldots,2v_m+m$, that is, for all $i=1,\ldots,\eta(x)$, we let $$ \hat{L}_{0,k}^{\0,i}=\left\{ \begin{array}{ll} \tilde{L}_{0,k}^{\0,i} & k=1,\ldots,2v_m+m;\\ L_{0,k-2v_m-m}^{\0,i} & k>2v_m+m, \end{array} \right. $$ where $\{\tilde{L}_{0,k}^{\0,i}\}$ are i.i.d.\ uniform on $[0,1]$ and independent of $\{L_{0,k}^{\0,i}\}$. Furthermore, the variables controlling whether or not a given particle at $z$, say $(z,1)$, will jump in the time step after its $j$th jump are generated independently for $j=0,\ldots,2v_m-1$, that is, $$ \hat{L}_{j,k}^{z,1}=\left\{ \begin{array}{ll} \tilde{L}_{j,k}^{z,1} & j=0,\ldots,2v_m-1 \mbox{ and }k=1;\\ L_{j,k}^{z,1} & \mbox{otherwise}, \end{array} \right. $$ where $\{\tilde{L}_{j,k}^{z,1}\}$ are independent of $\{L_{j,k}^{z,1}\}$ with the same distribution. Also the jumps $j=1,\ldots,2v_m$ for the particle $(z,1)$ are generated by an independent random walk, that is, $$ \hat{S}_j^{z,1}=\left\{ \begin{array}{ll} \tilde{S}_j^{z,1} & j=1,\ldots,2v_m;\\ S_{j-2v_m}^{z,1} & j>2v_m, \end{array} \right. $$ where $(\tilde{S}_j^{z,1})$ is independent of $(S_j^{z,1})$. All other particles move according to the same random walk trajectories as in $S$ and use the variables in $L$ to control their jumps. Note that $\hat{\Pi}$ has the same distribution as $\Pi$. We now define two events that will guarantee that, if $N\leq m$, then type 2 wins in the two-type process based on $\hat{\Pi}$. First let $\hat{A}_0$ denote the event that the type 1 particles at the origin stay put in the first $2v_m+m$ time steps. Hence, on $\hat{A}_0$, the only particles that are type 1 at time $2v_m+m$ in the process are those at $\0$. As for type 2, let $\hat{A}_z$ denote the event that, in the time interval $[1,2v_m]$, the type 2 particle $(z,1)$ jumps between the sites in $\cD_m$, making one jump in each time step, in such a way that all sites in $\cD_m$ are visited at least once and at time $2v_m$ the particle $(z,1)$ returns to $z$. The particles in $\cD_m$ that are then activated by type 2 immediately start moving according to the same dynamics as in $\Pi$. Any other type 2 particles at $z$ and the particles activated by them develop in the same way as in $\Pi$. This means that all discovered sites in $\Pi^{\sss \rm{one}}_m$ are discovered at time $2v_m$ in the two-type process, and all sites except $\0$ are discovered by type 2. Finally, in the time interval $[2v_m+1,2v_m+m)$, the growth of type 2 continues based on the same random objects as in $\Pi$. To summarize, on the event $\hat{A}_0\cap \hat{A}_z$, all particles that were activated in $\Pi^{\sss \rm{one}}_m$ are activated at time $2v_m+m$ in the two-type process based on $\hat{\Pi}$. Furthermore, all particles except those at $\0$ are activated by type 2 and have gotten at least as far along their random walk trajectories as in $\Pi^{\sss \rm{one}}_m$. Now assume that $N\leq m$, that is, the $\0$-particles do not discover any new sites after time $m$ in the modified one-type process. Then, when the $\0$-particles start moving according to the same random walks as in $\Pi$ at time $2v_m+m$ in the two-type process, they will not discover any new sites. Hence $$ \PP_{\0,z}(G_1^c\cap G_2)\geq \PP_{\0,z}(\hat{A}_0\cap\hat{A}_z|N\leq m)\PP_{\0,z}(N\leq m). $$ The events $\hat{A}_0$ and $\hat{A}_z$ are defined in terms of finitely many random objects that are independent of the objects in $\Pi$, implying that $\PP(\hat{A}_0\cap \hat{A}_z|N\leq m)=\PP(\hat{A}_0\cap \hat{A}_z)>0$. Furthermore $\PP(N\leq m)\geq 1/2$ by the choice of $m$. We conclude that $\PP_{\0,z}(G_1^c\cap G_2)>0$, as desired. When $p_1=1$, so that type 1 (and possibly also type 2) is not lazy and thereby can not stay put, the argument is modified as follows. Pick a neighboring site of the origin, say $\1$, and assume without loss of generality that $z\neq \1$ and that $z$ is not a neighbor of $\1$. Extend the definition of $N$ to include also any particles at $\1$ so that no particle from $\0$ or $\1$ discovers a new site after time $N$ in the one-type process. Then let the type 1 particles from $\0$ jump back and forth between $\0$ and $\1$ while type 2 progresses as described above. Any particles at $\1$ that are activated by type 1 jump back and forth between $\1$ and $\0$. This is achieved by modifying the random walks associated with the particles at $\0$ and $\1$ in the beginning of the time course. We then arrive at a configuration where type 2 has progressed beyond its state at time $m$ in the one-type process and where the type 1 particles from $\0$ and $\1$ are thereby prevented from discovering any new sites if they do not do so in the one-type process. \end{proof} \section{Proof of Proposition \ref{pr:initial}}\label{sec:prop_initial} We proceed with proving that the choice of the starting site $z$ for type 2 is irrelevant for the possibility of mutual infinite growth for $p_1,p_2\in(0,1)$. \begin{proof} To verify the claim, we will use a technique commonly referred to as ``sticky coupling'': Two copies of the process, started from different sites, evolve side by side until they enter the same state. From that time point on, the same random variables are used to generate the further evolution of both copies, preventing them from separating thereafter. In contrast to the standard argument of this kind, in our case the two copies will not evolve independently until they meet, but the second copy will be gradually aligned with the first one until they finally reach the same state. The first copy will be started from sites where we know that coexistence is possible, and the second copy from sites where we wish to show that coexistence is possible. First assume that $\PP_{\0,z}(G_1\cap G_2)>0$. In the first copy, type 1 then starts from $\0$ and type 2 from $z$. Fix a shortest path $\Gamma$ from $\mathbf{0}$ to $z$ and label its sites according to the following rule: a site $v\in\Gamma$ is assigned label $i$ ($i=1,2$) if $\eta(v)>0$ and its particles are activated by type $i$, and label $0$ if $\eta(v)=0$; see Figure \ref{fig:gamma}. Let $c(\Gamma)\in\{0,1,2\}^{\Gamma}$ be the (random) string of labels and let $M$ denote the time when all sites on $\Gamma$ have been discovered. \begin{figure} \centering \includegraphics[scale=1.2]{paths} \caption{Initially non-empty sites that are discovered by type 1 and type 2, respectively, are labeled 1 (blue) and 2 (red), and initially empty sites are labeled 0 (white). \label{fig:gamma}} \end{figure} Since $\{0,1,2\}^{\Gamma}$ is finite and $M$ is finite almost surely, our assumption implies that, for some $\gamma\in\{0,1,2\}^{\Gamma}$ and $m\in\N$ sufficiently large, the event \[C_{\gamma,m}:=G_1\cap G_2 \cap \{M\leq m\}\cap\{c(\Gamma)=\gamma\}\] has positive probability. Let $y$ be the first site on $\mathbf{0}\stackrel{\Gamma}{\longrightarrow} z$ with label 2 (in $\gamma$) and $x$ its predecessor. We now define a second copy of the competition process, with type 1 started in $x$ and type 2 started in $y$. Conditioned on $C_{\gamma,m}$, the second copy will reach the same state as the first copy in finite time with positive probability. To guarantee that there is a non-zero number of particles at $x$, we first change the initial configuration slightly by interchanging the number of particles at $\mathbf{0}$ and $x$. The process then starts with one type 1 particle traversing $\Gamma$ from $x$ to $\mathbf{0}$ and back. Next, one particle of each type, starting from $x$ and $y$, respectively, move along $\Gamma$ towards $z$ according to the following rule: The particle of type $i$ moves forward if either it is trailing or the label of the next site (attributed by $\gamma$) is in $\{0,i\}$, otherwise the type $i$ particle moves backwards. In this way, once the type 2 particle reaches $z$, all sites on $\Gamma$ have been activated by the type prescribed in $\gamma$. Finally, both particles return along $\Gamma$ to their initial position and the (type 1) particles placed at $\mathbf{0}$ and $x$ switch places. During all this time, no other activated particle than the ones specified moves. Note that the location of the particles now exactly corresponds to the starting configuration $\{\eta(v)\}_{v\in\Zd}$ of the first copy, however, all sites on $\Gamma$ have been activated. At this point, each particle in the second copy is paired up one-to-one with a particle in the first copy, in such a way that the current position of the former and the initial position of the latter coincide. To couple the copies, we proceed as follows: All particles in the second copy mimic the moves of their twin in the first copy and, until the twin gets activated, the particles on $\Gamma\setminus\{\mathbf{0},z\}$ stay put by being lazy. Once all sites on $\Gamma$ are activated in the second copy, both copies are in the exact same state and further evolve identically. Since we manipulated only finitely many sites, particles and moves in the second copy, the coupling shows that $\PP_{\mathbf{0},z}(C_{\gamma,m})>0$ implies $\PP_{x,y}(G_1\cap G_2)>0$ and hence $\PP_{\mathbf{0},\mathbf{1}}(G_1\cap G_2)>0$ by rotation and translation invariance. Now assume that $\PP_{\0,\1}(G_1\cap G_2)>0$. To show that $\PP_{\0,z}(G_1\cap G_2)>0$, we proceed in a similar fashion: In the first copy, type 1 is now started from $\mathbf{0}$ and type 2 from $\mathbf{1}$. For $n\in\N$, let $M_n$ denote the time when all sites in $\cD_n\cap \Zd$ have been discovered. Furthermore, for $v\in\Zd$, let $c(v)\in\{0,1,2\}$ denote the label attributed to $v$ according to the same rule as above, that is, $c(v)=0$ if $\eta(v)=0$ and $c(v)=i$ ($i=1,2$) if particles at $v$ are activated by type $i$. Since $\PP_{\0,\1}(G_1\cap G_2)>0$, for fixed $z$ the probability that $\cD_n$ contains at least $\lVert z\rVert_1$ sites with label 2 tends to $1$ as $n\to\infty$. Hence, as in the first part, we can choose first $n\geq\lVert z\rVert_1$, then $m$ big enough, such that for some $\lambda\in \{\text{0,1,2}\}^{\cD_n}$ and a collection of sites $\{y_1,\dots,y_{\lVert z\rVert_1}\}\subseteq\cD_n$, the event \[C_{\lambda,m}:=G_1\cap G_2 \cap \big\{M_n\leq m\big\}\cap\big\{c(\cD_n)=\lambda\big\}\cap\Bigg(\bigcap_{k=1}^{\lVert z\rVert_1}\{c(y_k)=2\}\Bigg)\] has positive probability. Now consider a second copy started with type 1 in $\mathbf{0}$ and type 2 in $z$. In order to pair it up with the first copy (started with type 1 in $\0$ and type 2 in $\1$), we would first like a type 2 particle from $z$ to activate the site $\mathbf{1}$. This however, potentially causes incorrect labels on its way, which forces us to make some extra effort: Fix a shortest path $\Gamma:\ \mathbf{1}\to z$ and observe that $\Gamma\subseteq\cD_n$. Set $x_1=z$ and let $\{x_2,\dots,x_k\}$ be the sites on $\Gamma\setminus\{z\}$ that have label 1 in $\lambda$. Again, we alter the initial placement of particles in the second copy, this time by interchanging the numbers of particles initially placed at sites $x_i$ and $y_i$, for all $1\leq i\leq k$. We now let the second copy evolve as follows: First one type 2 particle moves from $z$ to $\mathbf{0}$ via $\Gamma$ and the edge $\langle \mathbf{0},\mathbf{1}\rangle$. This type 2 particle then explores all sites of $\cD_n$ together with a type 1 particle from $\0$ in such a way that every site $v\in\cD_n\cap \Zd$ that has label $i$ in $\lambda$ is activated by the type $i$ particle, with the exception of the sites $y_1,\dots, y_k$, which are activated by the type 1 particle instead. All other activated particles (besides the pair activating $\cD_n$) idle by being lazy. Once all sites in $\cD_n$ have been discovered, the activating pair moves back to their initial positions. Furthermore, all (type 2) particles now placed at $x_i$ move to $y_i$ and all (type 1) particles placed at $y_i$ move to $x_i$, $1\leq i\leq k$, no particle ever leaving $\cD_n$. In this way, we have once more established a specified activation pattern (here $\lambda$) which occurs with positive probability in the first copy, given coexistence of both types, and moved all particles activated in the second copy to correspond to the initial configuration of the first copy. Now we couple the copies as before: Activated particles in the second copy idle until their twin in the first copy gets activated and then mimic its moves. Conditioned on $C_{\lambda,m}$ for the first copy, after a finite time the two copies are in the exact same state, verifying that $\PP_{\0,z}(G_1\cap G_2)>0$. \end{proof} The above argument does not immediately extend to the case with $p_1=1$, since the particles can then not stay put. However, it turns out that the argument for one of the implications can be modified slightly so that it partially extends to the case with non-lazy particles. This will be important in obtaining Theorem \ref{th:coex} for $p_1=p_2=1$. \begin{lemma}\label{le:odd_z} Assume that either (i) $p_2<p_1=1$ or (ii) $p_1=p_2=1$ and $\|z\|_1$ is odd. Then $\PP_{\0,z}(G_1\cap G_2)>0$ implies that $\PP_{\0,\1}(G_1\cap G_2)>0$ for any initial distribution $\nu$. \end{lemma} \begin{proof} We simply have to carefully go through the argument used in the proof of the first part of Proposition 1.2 and note that it generalizes to the case of non-lazy particles. The major problem arising is that particles of a non-lazy type cannot be forced to stay put. We will therefore assign to every site $v\in\Gamma$ a neighboring site $v'\in\Gamma$ and let non-lazy particles which in the evolution of the second copy are supposed to idle at $v$ instead jump back and forth between $v$ and $v'$: For a site $v$ on $\mathbf{0}\stackrel{\Gamma}{\longrightarrow} x$ we choose $v'$ to be its successor, and for $v$ on $y\stackrel{\Gamma}{\longrightarrow} z$ its predecessor. This way, we can still establish the prescribed activation pattern $\gamma$ on $\Gamma$ as above, since no site will be activated by particles jumping back and forth. In the phase after $\Gamma$ has been activated and the copies are gradually coupled, a parity issue might arise in the above construction: Until its twin (initially placed at $v\in\Gamma$) in the first copy gets activated, the corresponding non-lazy particle in the second copy moves between $v$ and $v'$. For the coupling to work, all non-lazy particles jumping back and forth in the second copy have to be in their associated position $v$ once the twin gets activated at $v$ in the first copy. It is crucial to observe that, given our construction of the second copy, this is the case if and only if the $L_1$-distance between the two starting sites of a non-lazy type in the first and second copy, respectively, is even, owing to the fact that all particles of a non-lazy type at an odd (even) time will be at odd (even) $L_1$-distance to the site this type started from. This settles the case in which only type 1 is non-lazy $(p_2<p_1=1)$ and $\lVert x\rVert_1$ is even. If $\lVert x\rVert_1$ is odd, we can fix the parity issue by starting the second copy instead with $\eta(\mathbf{0})$ active type 1 particles in $y$ and $\eta(y)$ active type 2 particles in $x$, which all move across the edge $\langle x,y\rangle$ in the first time step. Then we proceed as described above to conclude that $\PP_{y,x}(G_1\cap G_2)>0$, which again implies the claim by rotation and translation invariance. In the case of two non-lazy types $(p_1=p_2=1)$, it is crucial for our construction that $\lVert z\rVert_1$ is odd, so that either $\lVert x\rVert_1$ being even or switching starting positions $x$ and $y$ in the second copy guarantees that for both types, the starting positions in the first and second copy share parity. \end{proof} \section{Proof of Theorem \ref{th:coex}}\label{sec:th_proof} In this section we prove Theorem \ref{th:coex}. The same argument was used in \cite{GM_coex} by Garet and Marchand to prove coexistence in the two-type Richardson model, and it has later been used in \cite{cont_coex} to prove an analogous result for a continuum model. It is also described in \cite[Section 4]{pleasures}. Here we combine it with Lemma \ref{le:finite}. Before proceeding with the proof, we define the passage time $T(x,y)$ between two sites $x,y\in\Zd$ to be the time when the site $y$ is discovered in a one-type process started with the particles at $x$ active at time 0. Note that $T(x,y)=\infty$ if there are no particles at $x$, that is, if $\eta(x)=0$. It is not hard to see that these times are subadditive in the sense that \begin{equation}\label{eq:subad} T(x,y)\leq T(x,w)+T(w,y)\mbox{ for all }x,y,w\in\Zd. \end{equation} This is crucial in the proof of the shape theorem. Write $\n=(n,0,\ldots,0)$. Specifically, as shown in \cite{frogs_shape,frogs_shape_random}, it follows from subadditive ergodic theory that there exists a constant $\mu>0$ such that, conditional on $\eta(\0)\geq 1$, \begin{eqnarray}\label{eq:mu} \frac{T(\0,\n)}{n}\to \mu \mbox{ a.s. and in }L_1. \end{eqnarray} In order to handle initial distributions with empty sites, we will have to control the effect on $T(0,y)$ of conditioning on the presence of particles at some third site $x$. To this end we will need that, with large probability, the set of discovered sites in a one-type process contains some linearly growing ball, as stated in the below lemma. This is proved in a slightly more general formulation for non-lazy random walks in \cite[Lemma 2.5]{frogs_shape_random}. We give the general formulation and a brief explanation of why the result applies also to a lazy process in the appendix. \begin{lemma}\label{le:liten_boll} Consider the one-type frog model with initial distribution $\nu$ and $p\in(0,1]$. There exist constants $\tau\in(0,1)$ and $\alpha,\beta>0$ such that, conditional on $\eta(0)\geq 1$ and for all $n$: \begin{equation} \PP\big(\bar{\xi}_n\supseteq \cD_{\tau n}\big)\geq 1- \alpha\,\exp(-n^\beta). \end{equation} \end{lemma} Now consider passage times based on $(\nu,S,L)$ and, for $x_1,\ldots ,x_k\in\Zd$, write $\E^{x_1,\ldots,x_k}$ for expectation conditional on $\eta(x_j)\geq 1$ for $j=1,\ldots,k$. \begin{lemma}\label{le:non_zero} Consider the one-type frog model with $\PP(\eta(w)=0)>0$ but $\E[\eta(w)]<\infty$. For any $x,y\in\Zd$ we have that $\E^{\0,x}[T(\0,y)]\geq \E^{\0}[T(\0,y)]-C$, where $C$ is a positive constant that does not depend on neither $x$ nor $y$. \end{lemma} \begin{proof} Let $\E^{\0,\neg x}$ denote expectation conditional on $\eta(\0)\geq 1$ and $\eta(x)=0$. We show that $$ \E^{\0,\neg x}[T(0,y)]\leq \E^{\0,x}[T(\0,y)]+C', $$ where $C'$ does not depend on neither $x$ nor $y$. Since $\E^{\0}[T(\0,y)]$ is a convex combination of $\E^{\0,x}[T(\0,y)]$ and $\E^{\0,\neg x}[T(\0,y)]$ this gives the desired bound. We hence want to quantify the delay in a process without particles at $x$ compared to a process with particles at $x$. Note that this delay is bounded from above by the time when all sites that are discovered by particles originating from a non-empty $x$ have been discovered in a process without particles at $x$. This time, in turn, is stochastically dominated by the time when all sites that are discovered by the origin particles in a process started from the origin with a non-zero number of particles have been discovered in another copy of the process started with one single particle at the origin. Write $U$ for this time. Consider the particles initially located at the origin and write $V$ for the last time when one of them discovers a new site. Recall from Lemma \ref{le:SRW} that $S_n$ denotes a random walk and let $\tau$ be as in Lemma \ref{le:liten_boll}. For $v$ big enough, we then have that $$ \PP(V\geq v|\eta(0)=k)\leq k\PP(S_n\not\in\cD_{n^{1-\varepsilon}}\mbox{ for some }n\geq v)+\PP(\xi_n\not\supseteq \cD_{\tau n}\mbox{ for some }n\geq v). $$ It follows from Lemma \ref{le:SRW} and Lemma \ref{le:liten_boll}, respectively, that the probabilities on the right hand side are summable in $v$. Hence $\E[V|\eta(0)=k]\leq kC_1+C_2$ for some constants $C_1,C_2<\infty$ and, since $\E[\eta(0)]<\infty$, we conclude that $\E[V]<\infty$. Now consider the second copy of the process started with only one particle at the origin and the related time $U$ defined above. Write $\tilde{\xi}_n$ for the set of discovered sites at time $n$ in a process with initial distribution $\PP(\tilde{\eta}(w)=1)=\PP(\eta(w)\geq 1)=1-\PP(\tilde{\eta}(w)=0)$ and let $\tau$ be as in Lemma \ref{le:liten_boll} for such a distribution. Then $$ \PP(U\geq u)\leq \PP(V\geq \tau u)+\PP(\tilde{\xi}_u\not\supseteq\cD_{\tau u}). $$ That the probabilities on the right hand side are summable in $u$ follows from $\E[V]<\infty$ and Lemma \ref{le:liten_boll}, respectively. Hence $\E[U]<\infty$, as desired. \end{proof} We are now ready to prove Theorem \ref{th:coex}. \begin{proof}[Proof of Theorem \ref{th:coex}] Consider a two-type process started with the particles at the origin type 1 and the particles at $\n$ type 2, where $n$ will be specified below. By Proposition \ref{pr:initial} (if $p_1=p_2<1$) and Lemma \ref{le:odd_z} (if $p_1=p_2=1$), it suffices to show that coexistence has a positive probability in this process. Assume for contradiction that $\PP_{\0,\n}(G_1\cap G_2)=0$. Then one of the types must have at least probability 1/2 of being the winner and we may without loss of generality assume that $G_1^c\cap G_2$ has probability at least 1/2 (note that, if the tie-breaker is fair, both types have probability exactly 1/2 of winning). The idea is to show that the passage time from $\n$ to $-\m$ is substantially larger than the passage time from $\0$ to $-\m$ for some large $m$. On the other hand, if type 2 is the winner, we obtain an estimate that contradicts this, since the passage time from $\n$ to $-\m$ must then be shorter than the passage time from $\0$ to $-\m$ for large $m$. Consider passage times based on $(\nu,S,L)$ and fix $\vep>0$. We first treat the case when the initial distribution allows for empty sites. For $x_1,\ldots ,x_k\in\Zd$, write $\PP^{x_1,\ldots,x_k}$ and $\E^{x_1,\ldots,x_k}$ for probability and expectation, respectively, conditional on $\eta(x_j)\geq 1$ for $j=1,\ldots,k$. By \eqref{eq:mu}, for $C$ as in Lemma \ref{le:non_zero}, we can pick $n>\frac{2C}{\mu\vep}$ large enough such that \begin{equation}\label{eq:ncond} \E^\0[T(\n,\0)]\leq(1+\vep)n\mu\quad \mbox{and}\quad \PP^\0(T(\n,\0)<(1-\vep)n\mu)<\vep. \end{equation} It is straightforward to check that, for any event $B$ with $\PP^\0(B)\geq \alpha$, the inequalities in \eqref{eq:ncond} implies that \begin{equation}\label{eq:cond_exp} \E^\0\left[T(\n,\0)|B^c\right]\leq \left(1+\frac{3\vep}{1-\alpha}\right)n\mu. \end{equation} We now claim that \begin{equation}\label{eq:lower_bd} \E^{\0,\n}[T(\n,-\m)-T(\0,-\m)]\geq (1-\vep)n\mu \end{equation} for arbitrarily large $m$. To see this, note that, for any integer $k$, trivially $$ \E^\0[T(\0,k\n)]=\E^\0[T(0,\n)]+\E^\0[T(0,2\n)-T(\0,\n)]+\ldots+\E^\0[T(\0,k\n)-T(\0,(k-1)\n)]. $$ Since $\E^\0[T(\0,k\n)]/k\to n\mu$ as $k\to\infty$, it follows that $\E^\0[T(\0,(k+1)\n)-T(\0,k\n)]\geq (1-\vep/2)n\mu$ for arbitrarily large $k$. Taking $\m=k\n$ and using invariance, we obtain that $$ \E^\0[T(\0,(k+1)\n)-T(\0,k\n)]=\E^\n[T(\n,-\m)]-\E^\0[T(\0,-\m)]. $$ The latter expectation is trivially bounded from below by $\E^{\0,\n}[T(\0,-\m)]$ since conditioning on the presence of additional particles can only decrease passage times. For the former expectation, if the expected initial number of particles per site is finite, then we have by Lemma \ref{le:non_zero} and the choice of $n$ that $\E^\n[T(\n,-\m)]\leq \E^{\0,\n}[T(\n,-\m)] + n\mu\varepsilon/2$ and can conclude that \eqref{eq:lower_bd} holds for arbitrarily large $m$. Now consider the symmetric two-type process. As described above, we are working under the assumption that $\PP_{\0,\n}^{\0,\n}(G_1^c\cap G_2)\geq 1/2$. By Lemma \ref{le:finite}, if type 1 activates only finitely many particles, then the number of sites discovered by type 1 is also almost surely finite. Hence $$ \lim_{m\to\infty}\PP^{\0,\n}(T(\n,-\m)\leq T(\0,-\m))\geq \lim_{m\to\infty}\PP^{\0,\n}_{\0,\n}(-\m \mbox{ is discovered only by type 2})\geq 1/2. $$ Now let $B=\{T(\n,-\m)\leq T(\0,-\m)\}$ and pick $m$ large such that \eqref{eq:lower_bd} holds and such that $\PP^{\0,\n}(B)\geq 1/4$. We then obtain that \begin{eqnarray*} \E^{\0,\n}[T(\n,-\m)-T(\0,-\m)] & \leq & \E^{\0,\n}[T(\n,-\m)-T(\0,-\m)|B^c]\PP^{\0,\n}(B^c)\\ & \leq & \frac{3}{4}\E^{\0,\n}[T(\n,-\m)-T(\0,-\m)|B^c]. \end{eqnarray*} By subadditivity, we have that $T(\n,-\m)-T(\0,-\m)\leq T(\n,\0)$, and \eqref{eq:cond_exp} hence yields that $$ \E^{\0,\n}[T(\n,-\m)-T(\0,-\m)]\leq \frac{3}{4}(1+4\vep)n\mu. $$ If $\vep$ is small, this contradicts \eqref{eq:lower_bd}, and we conclude that $\PP_{\0,\n}(G_1\cap G_2)>0$, as desired. For initial distributions without empty sites we note that the conditioning on some sites being non-empty is throughout superfluous and the proof then goes through without the comparison of $\E^\n[T(\n,-\m)]$ and $\E^{\0,\n}[T(\n,-\m)]$ provided by Lemma \ref{le:non_zero}, that required $\E[\eta(w)]<\infty$. \end{proof}
\section{Introduction} In information theory, the main tasks to perform are the transmission, codification, and compression of information \cite{shannon1948mathematical}. Incorporating quantum phenomena, such as quantum superposition and quantum entanglement, into classical information theory gives rise to a new paradigm known as quantum Shannon theory \cite{nielsen2002quantum}. In this paradigm, each figure of merit can be enhanced: the capacity to transmit information in a channel is increased \cite{holevo1998capacity}, the security to share a message is improved \cite{bennett2014quantum} and the storing and compressing of information is optimized \cite{schumacher1995quantum}. In all these enhancements, only the carriers and the channels of information are considered as quantum entities. On the other hand, connections between channels are still classical, that is, quantum channels are connected setting a definite causal order in space or time. However, principles of quantum mechanics and specifically the quantum superposition principle can be applied to the connections of channels \cite{Chiribella2013}, i.e. the trajectories either in space \cite{abbott2018communication} or time \cite{chiribella2018indefinite}. Recently, it has been theoretically \cite{ebler2018enhanced} and experimentally \cite{goswami2018communicating,guo2018experimental} shown that two completely depolarizing channels can surprisingly transmit classical information when combined under an indefinite causal order (i.e., when the order of application of the two channels is not one after another instead of a quantum superposition of the two possibilities). In this paper, we tackle the general situation of an arbitrary number $N$ of channels with arbitrary parameters associated to the control and depolarizing strength. As $N$ is greater than two, the number of different causal orders increases as $N!$ The indefiniteness of causal order has been recently theoretically proposed as a novel resource for applications to quantum information theory \cite{chiribella2012perfect,Araujo2014} and quantum communication \cite{salek2018quantum,guerin2016exponential}. Initially, indefinite causal orders have been studied and implemented using two parties with the proposal of a quantum switch by Chiribella et al. \cite{Chiribella2013} followed by experimental demonstrations \cite{guo2018experimental,procopio2015experimental, goswami2018indefinite,wei2018experimental,rubino2017experimental} The quantum switch is an example of quantum control where a switch can, like its classical counterpart, routes a target system to undergo through two operators in series following one causal order ($1$ then $2$) or the other ($2$ then $1$). But this quantum switch can also trigger a whole new quantum trajectory where the ordering of the two operators is indefinite. Efforts to describe the quantum switch in a multipartite scenario of more than two quantum operations have recently started \cite{wechs2018definition,oreshkov2016causal} with an application to reduce the number of queries for quantum computation\cite{Araujo2014}. \begin{figure} [h!] \vspace*{13pt} \scalebox{.35}{\includegraphics{2-switch2.jpg}} \vspace*{13pt} \caption{\label{Figura1} {Concept of the quantum 2-switch.} $\N{i}={\mathcal N}_{q_i}^D$ is a depolarizing channel applied to the quantum state $\rho$, where $1-q_i$ is the strength of the depolarization. For two channels, depending on the control system $\rho_c$, there are 2! possibilities to combine the channels with definite causal order: (a) if $\rho_c$ is in the state $\left| 1 \right>\left< 1 \right|$, the causal order will be $\N{2}\circ\N{1}$, i.e. $\N{1}$ is before $\N{2}$; (b) on the other hand, if $\rho_c$ is on the state $\left| 2 \right>\left< 2 \right|$, the causal order will be $\N{1}\circ\N{2}$; (c) however, placing $\rho_c$ in a superposition of its states (i.e. $\rho_c=\left| + \right>\left< + \right|$, where $\left| + \right>_c= \frac{1}{\sqrt{2}}(\left| 1 \right> + \left| 2 \right> )$) results in the indefinite causal order of $\N{1}$ and $\N{2}$ to become indefinite. In this situation we said that the quantum channels are in a superposition of causal orders. This device is called a quantum 2-switch \cite{Chiribella2013} whose input and output are $\rho\otimes\rho_c$ and ${\mathcal S}(\N{1},\N{2})(\rho\otimes\rho_c)$ respectively. } \end{figure} Specifically, in a quantum $N$-switch used in a second-quantized Shannon theory context \cite{chiribella2018second}, the order of application of $N$ channels $\N{j}$ on a target system $\rho$ is coherently controlled by a control system $\rho_c$. The state of $\rho_c$ encodes for the temporal combination of the $N$ channels applied to $\rho$. There are $N!$ different possibilities of definite causal orders using each channel once and only once, as sketched in Figures \ref{Figura1} and \ref{Figura2} for $N=2$ and $N=3$ respectively. In those figures, when the wiring passes through the channel, there is a single channel use, i.e. the target system passes once through one physical channel \cite{procopio2015experimental}. We discard all wirings with multiple use of the same channel and missing channels \cite{abbott2018communication}. For each causal order of channels, the overall operator is \begin{equation} \N{\pi} := \pi(\N{1}\circ\dots\circ\N{N}) \label{CausalProduct} \end{equation} where $\pi$ is a permutation element of the symmetric group $ S_N=\{ \pi_k | k \in \{1,2,\ldots,N!\} \}$, and $k$ is associated to a specific definite causal order (equivalent to a single element of $S_N$) to combine the $N$ channels where each channel is used once and only once. In a quantum $N$-switch, the control state $\rho_c$ in the state $\left| 1 \right>\left< 1 \right|$ for instance fixes the order of application of the channels to be $\N{\text{Id}}=\N{1} \circ\N{2}\circ\cdots\circ\N{N}$. Whereas, choosing $\rho_c=\left| k \right>\left< k \right|$, $k\leq N!$ would assign another ordering $\N{\pi_k}=\N{\pi_k(1)}\circ\N{\pi_k(2)}\circ\cdots\circ\N{\pi_k(N)}$ (defined by the effect of the permutation element $\pi_k\in S_N$ on the order of channels). The key to accessing indefinite causal order of the channels is thus to put $\rho_c$ in a superposition of the $\left| k \right>\left< k \right|$ states (e.g. $\rho_c=\left| + \right>\left< + \right|$ where $\left| + \right>\equiv \frac{1}{\sqrt{N!}}\sum\left| k \right>$). \begin{figure*} [h!] \vspace*{13pt} \scalebox{.3}{\includegraphics{3-switch2.jpg}} \vspace*{13pt} \caption{\label{Figura2} \footnotesize Concept of the quantum 3-switch. For three channels, depending on $\rho_c$, we have 3! possibilities to combine the channels in a definite causal order: (a) $\rho_c=\left| 1 \right>\left< 1 \right|$ encodes a causal order $\N{1}\circ\N{2}\circ\N{3}$, i.e. $\N{3}$ is applied first to $\rho$; (b) $\rho_c = \left| 2 \right>\left< 2 \right|$ encodes $\N{1}\circ\N{3}\circ\N{2}$; (c) $\rho_c = \left| 3 \right>\left< 3 \right|$ encodes $\N{2}\circ\N{1}\circ\N{3}$; (d) $\rho_c = \left| 4 \right>\left< 4 \right|$ encodes $\N{2}\circ\N{3}\circ\N{1}$; (e) $\rho_c = \left| 5 \right>\left< 5 \right|$ encodes $\N{3}\circ\N{1}\circ\N{2}$; (f) $\rho_c = \left| 6 \right>\left< 6 \right|$ encodes $\N{3}\circ\N{2}\circ\N{1}$; (g) finally, if $\rho_c=\left| + \right>\left< + \right|$, where $\left| + \right>= \frac{1}{\sqrt{6}}\sum_{k=1}^6 \left| k \right>$ we shall have a superposition of six different causal orders. This is an indefinite causal order called quantum 3-switch whose input and output are $\rho\otimes\rho_c$ and ${\mathcal S}(\N{1},\N{2},\N{3})(\rho\otimes\rho_c)$ respectively. Notice that for each superposition with $m$ different causal orders, there are $\binom{N!}{m}$ (with $m=1,2,\ldots,6$ ) possible combinations of causal orders to build such superposition with $N=3$ channels, where $\binom{n}{r}= \frac{n!}{r!(n-r)!}$ is the binomial coefficient. The input and output of each channel are fixed. The arrows along the wire just indicate that the target system enters in or exits from the channel.} \end{figure*} The paper is organized as follows. Section \ref{framework} is devoted to the general theoretical framework for the investigation of the transmission of classical information over $N$ noisy channels with arbitrary degree of depolarization, i.e. arbitrary level of noise. Section~\ref{framework} also gives the channels representation in terms of Kraus operators performed from those operators for a single depolarizing channel. In Section \ref{results}, following the previous formalism, we explicitly analyze the case $N=2$, generalizing the outcomes in the literature \cite{ebler2018enhanced} to any degree of depolarization and level of coherent control. Similarly, the case $N=3$ is developed in the same section. Finally, conclusions and perspectives are given in Section \ref{concl}. \section{Transmission over multiple channels in quantum superposition of causal order } \label{framework} \noindent In the current development, the sender prepares the target system in the state $\rho$, where the information to transmit is encoded. A control system $\rho_c$ is associated to the target system to coherently control the causal order for the application of $N$ quantum communication channels. We relate the basis for the quantum state $\rho_c$ mapping their elements on those of the symmetric group of permutations $S_N: \frac1{N!} \sum_{k,k'} \vert k\rangle\langle k'\vert$. Then, the sender introduces as input $\rho\otimes\rho_c$ to a network of $N$ partially depolarizing channels $\N{i}=\mathcal N_{q_i}^D,1\leq i\leq N$ applied in series (i.e. the output of one channel becomes the input of the next channel). Throughout this work the $N$ depolarizing channels $\N{1}$, $\N{2}, \ldots$, $\N{N}$ can have different depolarization strengths $1-q_j$, (thus, ${\mathcal N}_{q_j}^D$ is sometimes used for $\N{j}$ to improve the readability). After the network, the receiver gets the output state ${\mathcal S}({\mathcal N}_1,{\mathcal N}_2,\ldots,{\mathcal N}_{N})(\rho\otimes\rho_c)$, where ${\cal S}$ is the quantum $N$-switch channel. No information is encoded by the sender into the control system controlling the way information is transmitted. Eventually, the receiver retrieves the information decoded in $\rho$. Communication quantum channels in a network are mathematically described with completely positive trace preserving maps (CPTP). Here, we adopt the Kraus decomposition \cite{nielsen2002quantum} $\N(\rho)=\sum_{i} K_{i} \rho K_{i}^{\dagger}$ to describe the action of a total depolarizing channel ${\mathcal N}$ on the quantum state $\rho$ ($i \in\{1,2,\ldots,d\}$): $\N{\rho} = {\tr} [\rho] \frac{\mathbb{I}}{d}$. The set of $d^2$ non-unique and generally non-unitary Kraus operators $\{K_{i}\}$ satisfies the completeness condition $\sum_{i=1}^{d^2} K_{i} K_{i}^{\dagger}=\mathbb{I}$. Thus, to describe the action of the $j$-th partially depolarizing channel $\N{j}$ on a $d$-dimensional quantum system $\rho$, we write as in \cite{ebler2018enhanced} \begin{align} \label{depch2} \N{q_j}^D(\rho) &= q_j \rho + (1-q_j) {\tr} [\rho] \frac{\mathbb{I}_t}{d}= q_j\rho + \frac{1-q_j}{d^2} \sum_{i_j=1}^{d^2} U_{i_j}^{j} \rho U_{i_j}^{j\dagger}\nonumber \\ & = \frac{1-q_j}{d^2}\sum_{i_j=0}^{d^2} U_{i_j}^{j} \rho U_{i_j}^{j\dagger} \end{align} \noindent where each $\N{j}=\N{q_j}^D$ is thus decomposed on an orthonormal basis $\{U_{i_j}^j\}|_{i_j=1}^{d^2}$. Then, we define $K_{i_j}^{j} = \frac{\sqrt{1-q_j}}{d} U_{i_j}^{j}$ for $i_j \ne 0$, where the added non-unitary operator $U_0^j= \frac{d \sqrt{q_j}}{\sqrt{1-q_j}} \mathbb{I}_t$, for $i_j=0$. Besides $\N{j}$ has no noise when $q_j=1$. On the other hand, $\N{j}$ is completely depolarizing when $q_j=0$. The results reported in \cite{ebler2018enhanced,abbott2018communication} are mainly related to two completely depolarizing ($q_1=q_2=0$) channels $\N{1}$ and $\N{2}$, despite the generalization is outlined. Below we extend the results from \cite{ebler2018enhanced} to the case of a quantum switch with $N$ channels ${\mathcal N}_{j}$ with arbitrary individual depolarization strengths $q_j$. \subsection{The formalism for a quantum $N$-switch channel ${\mathcal S}(\N{1},\N{2},\ldots,\N{N})$ } We define the control state $\rho_c$ as $\rho_c=\left| \psi_c \right>\left< \psi_c \right| = \sum_{k,k'=1}^{N!} \sqrt{P_k P_{k'}} \left| k \right>\left< k' \right|$ where $P_k$ is the probability to apply the causal order $k$ (corresponding to the permutation $\pi_k$ as it was previously stated) to the channels such that $\sum_{k=1}^{N!} P_k=1$. The action of the quantum $N$-switch channel ${\mathcal S}(\N{1},\N{2},\ldots,\N{N})$ can be expressed through generalized Kraus operators $W_{i_1 i_2\ldots i_N}$ for the full quantum channel resulting from the switching of $N$ channels as \begin{equation}\label{Krausg} \mathcal S(\N{1},\N{2},\ldots,\N{N}) \left( \rho \otimes \rho_c \right) = \sum_{\{i_j\}|_{j=1}^N} W_{\mathbf{i}}\left( \rho \otimes \rho_c \right.) W_{\mathbf{i}}^\dagger \end{equation} \noindent where $ W_{\mathbf{i}} := W_{i_1 i_2\ldots i_N}= \sum_{k=1}^{N!} K_{\pi_k} \otimes \left| k \right>\left< k \right|$ and $K_{\pi_k}$ has been defined similarly to equation~(\ref{CausalProduct}) : $ K_{\pi_k} := \pi_k( K_{i_1}^{1}\cdots K_{i_N}^{N})$ where $\pi_k$ acts on the index $j$, and the sum over $\{i_j\}|_{j=1}^N$ means all $i_j$ associated to each channel $\N{j}$ vary from $0$ to $d^2$. We verify (see Appendix~\ref{AppA}) that these generalized Kraus operators satisfy the completeness property $\sum_{\{i_j\}|_{j=1}^N} W_{\mathbf{i}} W_{\mathbf{i}}^\dagger= \mathbb{I}_t \otimes \mathbb{I}_c $, where identity operators in the target and control systems spaces are denoted $\mathbb{I}_t$ and $\mathbb{I}_c$, respectively. This check of completeness suggests how the $i_j$ indices allow the systematic reordering of the sums by isolating and grouping the $i_j=0$ cases. To distinguish those terms, we introduce the number $z$ of indices $i_j$ equal to zero. The sums over the indices $i_j$ can then be rearranged as \begin{equation}\label{sumABz} \sum_{\{i_j\}|_{j=1}^N} \rightarrow \sum_{z=0}^N \hspace{1ex}\sum_{A_z\in {\bf A}_z^N} \sum_{b\in B_z}, \end{equation} where $A_z$ is the set of $z$ indices equal to zero ($i_a=0$, $\forall a \in A_z$) and $B_z$ is the complementary set of indices in $\{1,2\ldots,N\}$ : $i_b \neq 0$, $i_b\in \{1,2,\ldots,d^2\}$ for all $b \in B_z$. Then, $U_{\pi_k} U_{\pi_k}^\dagger=d^{2z} h_{A_z}\mathbb{I}_t$, where $h_{A_z}=\prod_{a\in A_z} \frac{q_a}{1-q_a}$ and $h_{A_0}=1$. Introducing the Kraus operators $W_{\mathbf{i}}$ into $\mathcal S(\N{1},\N{2},\ldots,\N{N})$, equation (\ref{Krausg}) can be written as a sum of $N+1$ matrices ${\cal S}_z$ whose $N! \times N!$ elements are matrices of dimension $d \times d $ involving exactly $z$ factors $U_{i_j}$ equal to the identity operator. The overall dimension ${\cal S}_z$ is thus $d N!\times d N!$ \begin{equation}\label{switchN} {\mathcal S}(\N{1},\N{2},\ldots,\N{N}) \left( \rho \otimes \rho_c \right) = \sum_{z=0}^N {\cal S}_z, \end{equation} and (see Appendices \ref{AppA} and \ref{Rules}) \begin{equation} \label{Sz} {\cal S}_z = \sum_{k, k'=1}^{N!} \sqrt{P_k P_{k'}} \sum_{A_z\in {\bf A}_z^N} f_{A_z}\cdot Q^{k,k'}_{A_z} \otimes \left| k \right> \left< k' \right| \end{equation} with $$f_{A_z}=d^{2(z-N)}\prod_{j=1}^{N}( 1-q_j)\prod_{a\in A_z} \frac{q_{a}}{1-q_{a}} $$ \noindent where ${\bf A}_z^N$ is the collection of all possible subsets ${A}_z$ of $z$ subscripts in $\{1,2,\ldots,N\}$ corresponding to the $z$ indices equal to zero (i.e. $i_a=0$ $\forall a \in A_z$). The following subsections detail examples with $N=2$ and $N=3$. The coefficients $ Q^{k,k'}_{A_z}$ are given by \begin{equation}\label{Qkk} Q^{k,k'}_{A_z} = \sum_{\{i_b|b\in B_z\}} \pi_{k}\left( U_{i_{1}}\cdots U_{i_{N}}\right)\rho \left[ \pi_{k'}\left(U_{i_{1}}\cdots U_{i_{N}} \right) \right] ^\dagger. \end{equation} \noindent The $U_{i_j}^j$ of equation (\ref{depch2}) have been simplified in $U_{i_j}$. We can see from equation~(\ref{Qkk}) that the elements of the matrix ${\mathcal S}(\N{1},\N{2},\ldots,\N{N}) \left( \rho \otimes \rho_c \right)$ will always be linear combination of $\rho$ and $\mathbb{I}_1$, whatever $N$ channels. Note also the operators $U_{i_j}$ for ${j\in A_z}$ are identity operators $\mathbb{I}_t$ by construction. Thus, arguments $U_{i_{1}}\cdots U_{i_{N}}$ under $\pi_k$ in (\ref{Qkk}) involves $N$ elements, $z$ of them in $A_z$ and $N-z$ in $B_z$. The matrix $\mathcal{S}$ and the pivotal equations~(\ref{switchN}-\ref{Qkk}) contain all information about the correlations between precise causal orders coherently controlled by $\rho_c$ and the output of the quantum switch. $\mathcal{S}$ is a function of several parameters: the involved causal orders $\pi_k$ via the probabilities $P_k$, the depolarization strengths $q_i$'s of each individual channel $\N{i}$, the dimension $d$ of the target system undergoing the operations of those channels and the number of channels $N$. Notably the sum over $k$ and $k'$ in equation (\ref{Sz}) can be restricted to a subset of definite causal orders via the probabilities $P_k$, i.e. a subset of superposition of $m$ causal orders among the $N!$ existing ones for advanced quantum control. This handle had remained unexplored up to now. It was not accessible to former explorations limited to two channels. In the current work we consider only superpositions of all causal orders. The control of causal orders will be presented elsewhere. In the following subsections we will give the explicit expressions of the quantum switch matrices for the quantum $N$-switch channel for $N=2$ and $N=3$. We access these matrices of the quantum $N$-switch channel via the systematic ordering of the terms in equations (\ref{Krausg}) as settled in equations~(\ref{switchN}-\ref{Qkk}). The explicit calculation of the quantum $N$-switch channel gives important insights on the transmission of information coherently controlled by $\rho_c$ in a fascinating multi-parameter space. We briefly review below some of the intriguing behaviors associated to the parameters exploration in the $N=2$ and the $N=3$ cases. We show indeed in those cases how the nature and number of the causal orders in the control state superposition, the dimension of the target system, the level of noise all play a role. We underline that the $N=3$ case is still untouched experimentally To derive equation (\ref{Sz}) for particular cases of $N$, we first introduce the definitions of $W_{\mathbf{i}}$ and $\rho_c$ into equation (\ref{Krausg}). Introducing the definitions of the Kraus operators in terms of $U_{i_j}^j$ operators and applying the same reordering on the sums as in equation (\ref{sumABz}) leads to equation (\ref{Sz}). In the following subsection, specific developments for $N=2$ and $N=3$ to evaluate the $Q^{k,k'}_{A_z}$ are given simplifying $Q^{k,k'}_{A_z}$ in (\ref{Qkk}) by following the relations presented in Appendix \ref{Rules} (equations (\ref{unitaryproperty1})-(\ref{unitaryproperty3})). \section{The quantum switch matrices for $N=2$ and $N=3$} \label{results} To show the usefulness of equations (\ref{Sz}), we derive general expressions to investigate the transmission of information through two and three channels in an indefinite causal order. Our method can be easily applied to any number of depolarizing channels provided that $\{ U_{i} \}_{i=1}^{d^2}$ are unitary operators setting an orthonormal basis for the space of $d\times d$ matrices. \subsection{Evaluation of $\mathcal{S}$ for $N=2$} \label{detailsN2} To explicitly evaluate equation (\ref{switchN}) with two channels, we identify the two permutations in $S_2$ : $\pi_1=\begin{psmallmatrix}1 & 2\\1 & 2\end{psmallmatrix}$ and $\pi_2=\begin{psmallmatrix}1 & 2\\2 & 1\end{psmallmatrix}$. Equation~(\ref{switchN}) for the quantum 2-switch channel matrix acting on the input state $\rho\otimes\rho_c$ writes \begin{equation} {\mathcal S}(\N{1},\N{2})(\rho\otimes\rho_c) = {\cal S}_0 + {\cal S}_1 + {\cal S}_2 . \end{equation} The collection of all subsets of subscripts in $\{1,2\}$ are ${\bf A}_0^2=\{\emptyset\}, {\bf A}_1^2=\{ \{ 1\}, \{ 2\} \}$ and ${\bf A}_2^2=\{ \{ 1, 2\} \}$. Then, the corresponding complementary collections are \noindent $ {\bf B}_0^2=\{ \{ 1, 2\} \}, {\bf B}_1^2=\{ \{ 2\}, \{ 1\} \}$ and ${\bf B}_2^2=\{\emptyset\}$. \\ \noindent \textit{Coefficients for $\mathcal{S}_0$}. In this case, we use ${\bf A}_0^2=\{\emptyset\}$ to calculate the coefficients $Q^{k,k'}_{\emptyset}$, $k,k'\in \{1,2\}$. The $Q^{k,k'}_{\emptyset}$ then reads \begin{align} \begin{array}{ll} Q^{1,1}_{\emptyset}= \sum_{i_1,i_2}\pi_1(U_{i_1} U_{i_2})\rho\pi_1(U_{i_1} U_{i_2} )^\dagger\\ % \hspace*{0.75cm} =\sum_{i_1,i_2}(U_{i_1} U_{i_2})\rho ( U_{i_2}^\dagger U_{i_1}^\dagger)\\ % \hspace*{0.75cm} =d\sum_{i_1,i_2} U_{i_1} U_{i_1}^\dagger = d^3 \mathbb{I}.\\ % Q^{1,2}_{\emptyset}= \sum_{i_1,i_2}\pi_1(U_{i_1} U_{i_2})\rho\pi_2(U_{i_1} U_{i_2} )^\dagger\\ % \hspace*{0.75cm}=\sum_{i_1,i_2}(U_{i_1} U_{i_2})\rho (U_{i_1}^\dagger U_{i_2}^\dagger)\\ % \hspace*{0.75cm} =d\sum_{i_1,} U_{i_1} {\rm tr} (\rho U_{i_1}^\dagger ) = d^2 \rho. \end{array} \end{align} \noindent where we have used equations~(\ref{unitaryproperty1}) and (\ref{unitaryproperty3}) for $Q^{1,1}_{\emptyset}$, equation~(\ref{unitaryproperty1}) with $X= U_{i_2}\rho$ and equation (\ref{unitaryproperty2}) for $Q^{1,2}_{\emptyset}$. \noindent Likewise, we have $Q^{\alpha,\alpha'}_{\emptyset}=d^3\mathbb{I}, \quad \text{for} \quad (\alpha,\alpha')\in {\mathfrak A}\equiv\{(1,1), (2,2)\}$ and $ Q^{\beta,\beta'}_{\emptyset}=d^2 \rho, \quad \text{for} \quad (\beta,\beta')\in {\mathfrak B}\equiv \{(1,2), (2,1) \}$. Then, we may write \begin{equation}\label{2S0} {\cal S}_0=\displaystyle \sum_{(\alpha,\alpha')\in {\mathfrak A}} \frac{r_0 \mathbb{I}}{d}\sqrt{P_{\alpha}P_{\alpha'}} \otimes \vert \alpha \rangle\langle \alpha'\vert+ \sum_{(\beta,\beta')\in {\mathfrak B}} \frac{r_0 \rho}{d^2} \sqrt{P_{\beta}P_{\beta'}} \otimes \vert \beta\rangle\langle \beta' \vert, \end{equation} \noindent where $r_0 = p_1p_2$ with $p_i=1-q_i$. \\ \noindent \textit{Coefficients for $\mathcal{S}_1$}. In this case ${\bf A}_1^2=\{\{1\},\{2\}\}$ and ${\bf B}_1^2=\{\{2\},\{1\}\}$. Let us first consider the coefficient $Q^{\gamma,\gamma'}_{\{1\}}=\sum_{i_2} \pi_\gamma ( \mathbb{I} \cdot U_{i_2}) \rho \pi_{\gamma'} (\mathbb{I} \cdot U_{i_2})^\dagger = d \mathbb{I}$, using the general relations (\ref{unitaryproperty1})-(\ref{unitaryproperty3}), for $(\gamma,\gamma')\in {\mathfrak G} \equiv \{(1,1), (1,2), (2,1), (2,2)\}$. Since indices are dumb it can be shown that $Q^{\gamma,\gamma'}_{\{2\}}=Q^{\gamma,\gamma'}_{\{1\}}$ for all $(\gamma, \gamma')$. Then the term ${\cal S}_1$ can be written as \begin{equation}\label{2S1} {\cal S}_1=\sum_{k,k'} \displaystyle\frac{r_1}{d}\sqrt{P_kP_{k'}} \mathbb{I} \otimes \vert k\rangle\langle k'\vert=\frac{r_1}{d} \mathbb{I}\otimes \rho_c, \end{equation} \noindent where $r_1=q_1p_2+q_2p_1. $ \noindent {\it Coefficients for $\mathcal{S}_2$. }Finally, let us consider the term ${\cal S}_2$. In this case ${\bf A}_2^2=\{\{1,2\}\}$ and hence ${ {\bf B}_2^2}=\{\emptyset\}$. Note that $Q^{k,k'}_{\{1,2\}}=\rho$ for all $k$ and $k'$. Thus, the term with $z=2$ reads \begin{equation}\label{2S2} {\cal S}_2 = \sum_{k,k'} r_2 \rho \sqrt{P_k P_{k'}} \otimes \vert k\rangle\langle k'\vert= {r_2} \rho\otimes \rho_c, \end{equation} with $r_2=q_1q_2$. By expanding the matrices $\mathcal{S}_0$, $\mathcal{S}_1$ and $\mathcal{S}_2$ in the control qubit basis, $\{ \left| 1\right>, \left|2\right>\}$, we are able to write \begin{equation} \label{Matrices2} \begin{array}{lll} {\mathcal S}_0=\left(\begin{array}{cc} \frac{r_0}{d} \mathbb{I} P_1 &\frac{r_0 \rho}{d^2} \sqrt{P_1 P_2} \\ \frac{r_0 \rho}{d^2} \sqrt{P_2 P_1} &\frac{r_0}{d} \mathbb{I} P_2 \end{array}\right), \\ [1em] % {\mathcal S}_1=\left(\begin{array}{cc} \frac{r_1 }{d} \mathbb{I} P_1 &\frac{r_1 }{d} \mathbb{I} \sqrt{P_1P_2}\\ \frac{r_1 }{d} \mathbb{I} \sqrt{P_2P_1} &\frac{r_1 }{d} \mathbb{I} P_2 \end{array}\right),\\ [1em] % {\mathcal S}_2=\left(\begin{array}{cc} r_2 \rho P_1 &r_2 \rho \sqrt{P_1 P_{2}}\\ r_2 \rho \sqrt{P_2 P_{1}} &r_2 \rho P_2 \end{array}\right). \end{array} \end{equation} \noindent where $\mathbb{I}=\mathbb{I}_t$. Summing those matrices according to equation~(\ref{switchN}), we find that the quantum 2-switch channel matrix ${\mathcal S}(\N{1},\N{2})$ has diagonal elements $ a_k=P_k[(r_0+r_1) \mathbb{I}/d+r_2\rho], $ for $ k=1,2 $ and off-diagonal elements $b=\sqrt{P_1P_2}[(r_0+d^2r_2)\rho/d^2+\frac{r_1}{d} \mathbb{I}] $, with $r_0=p_1p_2$, $r_1=q_1p_2+q_2p_1 $ and $r_2=q_1q_2$. Thus \begin{equation}\label{Matrix2} \begin{array}{ll} {\mathcal S}(\N{1},\N{2})(\rho \otimes \rho_c)=\left(\begin{array}{cc} a_1 &b \\ b &a_2\end{array}\right), \end{array} \end{equation} \noindent note that the diagonal and off-diagonal elements $a_1$, $a_2$ and $b$ are matrices and are linear combinations of matrices $\rho$ and $\mathbb{I}_t$. This property is non-unique for case $N=2$, instead is general for $N$ channels, an advisable aspect from equation (\ref{Qkk}) and equations (\ref{unitaryproperty1})-(\ref{unitaryproperty2}). Indeed, (\ref{Matrix2}) gives as particular outputs the predicted Holevo capacity of Figure 3 in \cite{goswami2018communicating} and expressions of Holevo information in \cite{ebler2018enhanced}. We end up this subsection stressing that Figure.~\ref{Figura1} sketches different ways to connect channels $\N{1}$ and $\N{2}$ in either (a) and (b) a definite causal order and (c) for an indefinite causal order combining the $2!$ possible orders. \subsection{Evaluation of $\mathcal{S}$ for $N=3$}\label{detailsN3} In this section, we explicitly evaluate expression~(\ref{switchN}) considering three channels. Let us label the 6 elements of $S_3$ according to the following set of permutations $\pi_1=\begin{psmallmatrix} 1 &2 & 3\\ 1&2&3\end{psmallmatrix}$, $\pi_2=\begin{psmallmatrix}1 &2 & 3\\ 1&3&2\end{psmallmatrix}$, $\pi_3= \begin{psmallmatrix}1&2&3\\ 2 &1 & 3\end{psmallmatrix}$, $\pi_4=\begin{psmallmatrix} 1 &2 & 3\\ 2&3&1\end{psmallmatrix}$, $\pi_5= \begin{psmallmatrix}1 &2 & 3\\ 3&1&2\end{psmallmatrix}$ and $\pi_6=\begin{psmallmatrix} 1 &2 & 3\\ 3&2&1\end{psmallmatrix}$. Equation (\ref{switchN}) for the quantum 3-switch channel matrix acting on input state $\rho\otimes\rho_c$ reads \begin{equation} {\mathcal S}(\N{1},\N{2},\N{3}) \left( \rho \otimes \rho_c \right) = {\cal S}_0 + {\cal S}_1 + {\cal S}_2 +{\cal S}_3. \end{equation} \noindent \textit{Coefficients for $\mathcal{S}_0$}. In this case note that ${\bf A}_0^3=\{\emptyset\}$, hence ${{\bf B}_0^3}=\{\{1,2,3\}\}$. Besides, the sum in $Q^{1,k'}_{\emptyset}$ is over the indices $\{i_1,i_2, i_3\}$. These can be computed explicitly \begin{equation} Q^{1,1}_{\emptyset}= \sum_{i_1,i_2,i_3}\pi_1(U_{i_1} U_{i_2} U_{i_3})\rho\pi_1(U_{i_1} U_{i_2} U_{i_3})^\dagger= d^5 \mathbb{I}. \end{equation} Likewise, \begin{equation} Q^{1,4}_{\emptyset}= \sum_{i_1,i_2,i_3} \pi_1(U_{i_1} U_{i_2}U_{i_3})\rho \pi_4(U_{i_1} U_{i_2}U_{i_3})^\dagger=d^4 \rho. \end{equation} The remaining coefficients for ${\cal S}_0$ are \begin{equation}\label{Q140} \begin{array}{ll} Q^{1,2}_{\emptyset}= \sum_{i_1,i_2,i_3}\pi_1(U_{i_1} U_{i_2}U_{i_3})\rho\pi_2(U_{i_1} U_{i_2} U_{i_3})^\dagger\\ \hspace*{.75cm}=\sum_{i_1,i_2,i_3}(U_{i_1} U_{i_2}U_{i_3})\rho (U_{i_2}^\dagger U_{i_3}^\dagger U_{i_1}^\dagger)\\ \hspace*{0.75cm}=d\sum_{i_1,i_3} U_{i_1} \tr ( U_{i_3} \rho) U_{i_3}^\dagger U_{i_1}^\dagger=d^2\sum_{i_1} U_{i_1} \rho U_{i_1}^\dagger\\ \hspace*{0.75cm} = d^3 \mathbb{I}, \\[0em] Q^{1,3}_{\emptyset}= \sum_{i_1,i_2,i_3}\pi_1(U_{i_1} U_{i_2}U_{i_3})\rho\pi_3(U_{i_1} U_{i_2} U_{i_3} )^\dagger\\ \hspace*{0.75cm}=\sum_{i_1,i_2,i_3}(U_{i_1} U_{i_2}U_{i_3})\rho (U_{i_3}^\dagger U_{i_1}^\dagger U_{i_2}^\dagger)\\ \hspace*{0.7cm} =d\sum_{i_1,i_2} U_{i_1} U_{i_2}\mathbb{I} U_{i_1}^\dagger U_{i_2}^\dagger=d^2\sum_{i_1} \tr (U_{i_2} \mathbb{I}) U_{i_2}^\dagger\\ \hspace*{0.75cm} = d^3 \mathbb{I},\\[0em] Q^{1,5}_{\emptyset}= \sum_{i_1,i_2,i_3}\pi_1(U_{i_1} U_{i_2}U_{i_3})\rho\pi_5(U_{i_1} U_{i_2} U_{i_3})^\dagger\\ \hspace*{0.75cm}=\sum_{i_1,i_2,i_3}(U_{i_1} U_{i_2}U_{i_3})\rho (U_{i_2}^\dagger U_{i_1}^\dagger U_{i_3}^\dagger)\\ \hspace*{0.75cm} =d\sum_{i_1,i_3} U_{i_1} \tr ( U_{i_3} \rho) U_{i_1}^\dagger U_{i_3}^\dagger=d^3\sum_{i_3} \tr (U_{i_3} \rho) U_{i_3}^\dagger\\ \hspace*{0.75cm} = d^4 \rho,\\[0em] Q^{1,6}_{\emptyset}= \sum_{i_1,i_2,i_3}\pi_1(U_{i_1} U_{i_2}U_{i_3})\rho\pi_6(U_{i_1} U_{i_2} U_{i_3})^\dagger\\ \hspace*{0.75cm}=\sum_{i_1,i_2,i_3}(U_{i_1} U_{i_2}U_{i_3})\rho (U_{i_1}^\dagger U_{i_2}^\dagger U_{i_3}^\dagger)\\ \hspace*{0.75cm} = d\sum_{i_1,i_3} U_{i_1} \tr (U_{i_3} \rho U_{i_1}^\dagger) U_{i_3}^\dagger=d^2 \sum_{i_1} U_{i_1}\rho U_{i_1}^\dagger\\ \hspace*{0.75cm}=d^3 \mathbb{I}. \end{array} \end{equation} \noindent The coefficients $Q^{k,k'}_{\emptyset}$ with $k\ge 2$ can be computed using these expressions from equations (\ref{Q140}). For instance, consider the following \begin{equation} Q^{2,6}_{\emptyset}= \sum_{i_1,i_2,i_3}\pi_2(U_{i_1} U_{i_2}U_{i_3})\rho\pi_6(U_{i_1} U_{i_2} U_{i_3})^\dagger=\sum_{i_1,i_2,i_3}(U_{i_1} U_{i_3}U_{i_2})\rho (U_{i_1}^\dagger U_{i_2}^\dagger U_{i_3}^\dagger), \end{equation} which is equivalent to expression $Q^{1,4}_{\emptyset}$ because the indices $i$'s are dumb. Thus one can calculate explicitly the remaining coefficients. Results are thus summarized in the following list \begin{equation} \begin{array}{ll} Q^{i,i'}_{\emptyset}=d^3\mathbb{I}, \forall \hspace*{0.1cm} (i,i')\in {\mathfrak I}\equiv \{(1,6), (2,4), (3,5), (4,2),\\ \hspace*{3.5cm} (1,2),(2,1), (3,4), (4,3), (5,6), \\ \hspace*{3.5cm} (6,5), (5,3),(6,1), (1,3), (2,5), \\ \hspace*{3.5 cm} (3,1), (4,6), (5,2),(6,4)\},\\ Q^{j,j'}_{\emptyset}=d^4\rho, \forall \hspace*{0.1cm} (j,j')\in {\mathfrak J}\equiv\{(1,4), (2,6), (3,2), (4,5), \\ \hspace*{3.5cm} (5,1),(6,3), (1,5), (2,3), (3,6), \\ \hspace*{3.5cm} (4,1), (5,4),(6,2)\},\\ Q^{k,k'}_{\emptyset}=d^5\mathbb{I}, \forall \hspace*{0.1cm} (k,k')\in {\mathfrak K}\equiv\{(1,1), (2,2), (3,3),\\ \hspace*{3.5cm} (4,4), (5,5),(6,6)\}.\\ \end{array} \end{equation} \noindent After calculating all these coefficients, we obtain \begin{equation}\label{S0} \begin{array}{ll} {\cal S}_0=\displaystyle \sum_{(i,i')\in {\mathfrak I}} \frac{s_0 }{d^3} \mathbb{I}\sqrt{P_iP_{i'}}\otimes \vert i\rangle\langle i'\vert % + \sum_{(j,j')\in {\mathfrak J}} \frac{s_0 \rho}{d^2}\sqrt{P_jP_{j'}}\otimes \vert j \rangle \langle j' \vert\\[1.5em] % \hspace*{6cm}\displaystyle +\sum_{(k,k')\in {\mathfrak K} } \frac{s_0 }{d} \mathbb{I} \sqrt{P_kP_{k'}}\otimes \vert k\rangle\langle k'\vert, \end{array} \end{equation} \noindent where $s_0=p_1p_2p_3$. \\ \noindent \textit{Coefficients for $\mathcal{S}_1$.} In this case ${\bf A}_1^3=\{\{1\},\{2\},\{3\}\}$ and ${{\bf B}_1^3}=\{\{2,3\},\{1,3\},\{1,2\}\}$. Let us first consider the coefficient $Q^{k,k'}_{\{1\}}$, so that sum must be accomplished over the indices $\{i_2,i_3\}$, hence $Q^{k,k'}_{\{1\}}=\sum_{i_2,i_3}\pi_k ( \mathbb{I} \cdot U_{i_2} \cdot U_{i_3}) \rho \pi_{k'} (\mathbb{I} \cdot U_{i_2} \cdot U_{i_3})^\dagger$. \noindent Using the relations~(\ref{unitaryproperty1})-(\ref{unitaryproperty3}) we obtain \begin{equation} \begin{array}{ll} Q^{\ell,\ell'}_{\{1\}}=d^2 \rho,\forall \hspace*{0.1cm} (\ell,\ell')\in {\mathfrak L}_1 \equiv \{(2,3), (3,2), (2,4), (4,2), \\ \hspace*{4cm} (3,5), (5,3), (3,6),(6,3),(4,5),\\ \hspace*{4cm} (5,4),(4,6),(6,4), (5,1), (1,5), \\ \hspace*{4cm} (1,2), (2,1),(1,6), (6,1)\},\\ Q^{m,m'}_{\{1\}}=d^3\mathbb{I},\forall \hspace*{0.1cm} (m,m')\in {\mathfrak M}_1 \equiv \{(1,1), (2,2), (3,3), (4,4), \\ \hspace*{4cm} (5,5), (6,6), (1,3),(1,4),(4,1)\\ \hspace*{4cm} (3,1), (2,5),(5,2), (2,6), (6,2), \\ \hspace*{4cm} (3,4), (4,3),(5,6),(6,5) \},\\ \end{array} \end{equation} \begin{equation} \begin{array}{ll} Q^{\ell,\ell'}_{\{2\}}=d^2 \rho,\forall \hspace*{0.1cm} (\ell,\ell')\in {\mathfrak L}_2 \equiv \{(1,4), (1,5), (1,6), (2,4), \\ \hspace*{4cm} (2,5), (2,6),(3,4),(3,5),(3,6)\\ \hspace*{4cm} (4,1),(4,2),(4,3), (5,1), (5,2), \\ \hspace*{4cm} (5,3), (6,1),(6,2), (6,3)\},\\ Q^{m,m'}_{\{2\}}=d^3\mathbb{I},\forall \hspace*{0.1cm} (m,m')\in {\mathfrak M}_2 \equiv \{(1,1), (1,2), (1,3), (2,1), \\ \hspace*{4cm} (2,2), (2,3), (3,1),(3,2),(3,3)\\ \hspace*{4cm} (4,4), (4,5),(4,6), (5,4), (5,5), \\ \hspace*{4cm} (5,6), (6,4),(6,5),(6,6) \},\\ \end{array} \end{equation} \begin{equation} \begin{array}{ll} Q^{\ell,\ell'}_{\{3\}}=d^2 \rho,\forall \hspace*{0.1cm} (\ell,\ell')\in {\mathfrak L}_3 \equiv \{(1,3), (1,4), (1,6), (2,3), \\ \hspace*{4cm} (2,4), (2,6),(3,1),(3,2),(3,5)\\ \hspace*{4cm} (4,1),(4,2),(4,5), (5,3), (5,4), \\ \hspace*{4cm} (5,6), (6,1),(6,2), (6,5)\},\\ Q^{m,m'}_{\{3\}}=d^3\mathbb{I},\forall \hspace*{0.1cm} (m,m')\in {\mathfrak M}_3 \equiv \{(1,1), (1,2), (1,5), (2,1), \\ \hspace*{4cm} (2,2), (2,5), (3,3),(3,4),(3,6)\\ \hspace*{4cm} (4,3), (4,4),(4,6), (5,1), (5,2), \\ \hspace*{4cm} (5,5), (6,3),(6,4),(6,6) \}.\\ \end{array} \end{equation} Hence, the matrix ${\cal S}_1$ can be computed \begin{equation}\label{S1} \begin{array}{ll} {\cal S}_1=\displaystyle\frac1{d^2} \sum_{s=1}^3 \left( t_s d \sum_{(\ell,\ell')\in {\mathfrak M}_s} \sqrt{P_\ell P_{\ell'}}\,\mathbb{I}\otimes \vert \ell \rangle \langle \ell'\vert\right. % \left. +t_s \displaystyle \sum_{(m,m')\in {\mathfrak L}_s} \sqrt{P_m P_{m'}} \, \rho \otimes \vert m \rangle \langle m'\vert\right), \end{array} \end{equation} where $t_1=p_2p_3q_1$, $t_2=p_1p_3q_2$ and $t_3=p_1p_2q_3$. \\ \noindent \textit{Coefficients for $\mathcal{S}_2$.} In this case ${\bf A}_2^3=\{\{1,2\},\{1,3\},\{2,3\}\}$ and hence ${ {\bf B}_2^3}=\{\{3\},\{2\},\{1\}\}$. Let us consider \begin{equation*} Q^{k,k'}_{\{2,3\}}=\sum_{i_1}\pi_k (U_{i_1} \cdot\mathbb{I} \cdot \mathbb{I}) \rho \pi_{k'} (U_{i_1} \cdot \mathbb{I}\cdot \mathbb{I})^\dagger=d \mathbb{I}, \end{equation*} where the operators $\mathbb{I}$ have been written for the sake of clarity as the permutations $\pi_k$ act on sets of three elements. In a similar way $Q^{k,k'}_{\{1,3\}}=Q^{k,k'}_{\{1,2\}}=d \mathbb{I}.$ Thus, we obtain \begin{equation}\label{S2} \begin{array}{ll} {\cal S}_2= \frac{p_1p_2p_3}{d^2} \sum_{k,k'} \sqrt{P_kP_{k'}} \left(\frac{q_2q_3}{p_2p_3} Q^{k,k'}_{\{2,3\}} \right.\\[1em] % \hspace*{1cm} + \left. \frac{q_1q_3}{p_1p_3} Q^{k,k'}_{\{1,3\}} + \frac{q_1q_2}{p_1p_2} Q^{k,k'}_{\{1,2\}} \right) \otimes \vert k \rangle \langle k' \vert= \frac{s_2}{d} \mathbb{I} \otimes \rho_c \end{array} \end{equation} \noindent where $s_2= q_1q_2p_3+q_1q_3p_2+q_2q_3p_1$.\\ \noindent \textit{Coefficients for $\mathcal{S}_3$.} Finally, note that $Q^{k,k'}_{\{1,2,3\}}=\rho$ for all $k$ and $k'$. Thus, the term with $z=3$ reads \begin{equation}\label{S3} {\cal S}_3 = s_3 \sum_{k,k'} \sqrt{P_kP_{k'}} \rho \otimes \vert k\rangle \langle k' \vert= {s_3} \rho\otimes \rho_c, \end{equation} \noindent where $s_3=q_1q_2q_3$ and using the definition of the control qudit. For three channels, Figure~\ref{Figura2} shows different ways to connect channels $\N{1}$, $\N{2}$ and $\N{3}$ in either (a)-(f) a definite causal order, or (g) in an indefinite causal order taking into account all 3! causal orders. The quantum 3-switch matrix is again calculated with equation (\ref{switchN}) (see Appendix~\ref{AppC}) \begin{equation}\label{Matrix3i} \begin{array}{lll} {\mathcal S}(\N{1},\N{2},\N{3})(\rho \otimes \rho_c)=\left(\begin{array}{cccccc} \mathcal{A}_1 &\mathcal{B} & \mathcal{C}&\mathcal{D}&\mathcal{E}&\mathcal{F}\\ \mathcal{B} &\mathcal{A}_2 &\mathcal{G}&\mathcal{H}&\mathcal{I}&\mathcal{J}\\ \mathcal{C} &\mathcal{G} & \mathcal{A}_3&\mathcal{K}&\mathcal{L}&\mathcal{M}\\ \mathcal{D} &\mathcal{H} & \mathcal{K}&\mathcal{A}_4&\mathcal{N}&\mathcal{P}\\ \mathcal{E} &\mathcal{I}& \mathcal{L}&\mathcal{N}&\mathcal{A}_5&\mathcal{Q}\\ \mathcal{F}&\mathcal{J} & \mathcal{M}&\mathcal{P}&\mathcal{Q}&\mathcal{A}_6\end{array}\right), \end{array} \end{equation} \noindent where the diagonal and the off-diagonal elements whose expressions are given in Appendix~\ref{AppC} are also linear combinations of matrices $\rho$ and $\mathbb{I}_t$. From the definition of symmetric matrices \cite{horn1990matrix}, we can see that the quantum switch matrices~(\ref{Matrix2}) and (\ref{Matrix3i}) are block-symmetric matrices with respect to the main diagonal. This could be seen as general from the fact $Q^{k,k'}_{A_z}=Q^{k',k}_{A_z}$ due to equations (\ref{Sz}) and (\ref{Qkk}), because indices in the sums are dumb. Thus, as the number of channels increases, the number of different $d\times d$ matrices involved in the quantum $N$-switch matrix $\mathcal{S}$ scales as $N!(N!+1)/2$. Notice that those matrices also characterize information transmission of any definite causal ordering $\pi_k$ of channels $\mathcal{N}_{\pi_k}$ when setting $P_k=1$ and $P_s=0$ for all $s\neq k$. Matrices in equation (\ref{Matrix2}) or (\ref{Matrix3i}) are written in the basis of the control system $\rho_c$ which maps and weights the chosen causal orders. To know the best rate to communicate classical information with two and three channels, in the following Section we diagonalize matrices~(\ref{Matrix2}) and (\ref{Matrix3i}) to compute the Holevo information limit $\chi$, which quantifies how much classical information can be transmitted through a channel in a single use. $\chi$ gives a lower bound on the classical capacity \cite{holevo1998capacity, abbott2018communication,schumacher1997sending}. \section{Holevo information limit for two and three channels}\label{Holevol23} We compute the Holevo information limit (Holevo information for shortness in the following) $\chi(\mathcal{S})$ for $N=2$ and $N=3$ channels through a generalization of the mutual information (see for example \cite{wilde2013quantum}) and supplementary information of \cite{ebler2018enhanced}. The Holevo information $\chi(\mathcal{S})$ is found by maximizing mutual information, and it can be shown that maximization over the $\rho$ pure states is sufficient \cite{wilde2013quantum}. The Holevo information is then given by \begin{equation}\label{Gholevo} \begin{array}{ll} \chi_{{\rm Q}N{\rm S}} \big({\mathcal S}\big) = \log d + H({\tilde \rho}_c^{(N)}) - H^\text{min}({\mathcal S}) \end{array} \end{equation} \noindent where $d$ is the dimension of the target system $\rho$, $H({\tilde \rho}_c^{(N)})$ is the von-Neumann entropy of the output control system $\tilde \rho_c^{(N)}$ for $N$ channels and $H^\text{min}(\mathcal{S})$ is the minimum of the entropy at the output of the channel $\mathcal{S}$. The minimization of $H^\text{min}(\mathcal{S})\equiv \underset{\rho}{\text{min}} \hspace{1ex} H^\text{min}(\mathcal{S}(\rho))$ is over all input states $\rho$ going on the channel $\mathcal{S}$ \cite{wilde2013quantum}. To evaluate equation~(\ref{Gholevo}): \begin{enumerate} \item The diagonalization and minimization of $H^\text{min}({\mathcal S})$ is performed on all possible states given by $\rho$. It is done analytically for $N=2$ channels and arbitrary $q_i$. For $N=3$ channels we compute the eigenvalues of the full quantum 3-switch matrix $\mathcal{S}(\N{1},\N{2},\N{3} )\left( \rho \otimes \rho_c \right)$ numerically. % \item ${\tilde \rho}_c^{(N)}$ was analytically calculated following \cite{ebler2018enhanced} % \item We deduce $H({\tilde \rho}_c^{(N)})$ from the analytical expressions of ${\tilde \rho}_c^{(N)}$. \end{enumerate} \subsection{Holevo information limit for $N=2$ channels} \subsubsection{Calculation of $H^\text{min}$}\label{CalculationHmin} \noindent We calculate the minimum output entropy $H^\text{min}(\mathcal{S})$ of the channel $\mathcal{S}\equiv{\mathcal S}(\N{1},\ldots,\N{N})$ \begin{equation*} H^\text{min}(\mathcal{S})\equiv \underset{\rho}{\text{min}} \hspace{1ex} H^\text{min}(\mathcal{S}(\rho))=\underset{\rho}{\text{min}}\sum_i-\lambda_{{\cal S}(\rho),i}\text{log}[\lambda_{{\cal S}(\rho),i}], \end{equation*} where the minimization is a priori over all input states $\rho$ and $\{\lambda_{{\cal S}(\rho),i}\}_{i=1}^d$ are the eigenvalues of ${\cal S}(\rho)$. In fact it is sufficient to minimize over the states \cite{wilde2013quantum} and the eigenvalues $\{\lambda_{\rho,i}\}_{i=1}^d$ sum up to $1$. As $H^\text{min}(\mathcal{S}(\rho))$ is concave, the minimization is done as in Ref. \cite{ebler2018enhanced} : the eigenvalues $\{\lambda_{{\cal S}(\rho),i}\}_{i=1}^d$ are taken at the border of the interval $[0,1]^{\times d}$ and as they sum up to one, the minimization is simplified to the cases where all $\lambda$ but one are set to zero and the last one is equal to 1. In this situation, ${\mathcal S}(\N{1},\N{2}) \left( \rho \otimes \rho_c \right)$ has only four non-zero matrix elements, (see equation~(\ref{Matrix2})), which can be rewritten as $2\times2$ matrices \begin{equation} \left(\begin{matrix} a_0 p & b \cr b & a_0 q \end{matrix}\right) \end{equation} \noindent where $a_0$ and $b$ are $d\times d$ matrices and linear combinations of $\rho$ and $\mathbb{I}_t$: \begin{equation} a_0=(r_0+r_1) \mathbb{I}/d+r_2\rho, \quad b=\sqrt{P_1P_2}[(r_0+d^2r_2)\rho/2+r_1\mathbb{I}/d], \end{equation} with $p\equiv P_1$, $q\equiv P_2$ are the control probabilities with $p+q=1$. Using the commutativity of $\rho$ and $\mathbb{I}_t$ (so they have the same eigenvectors), we then retrieve analytically $a_\pm$, the matrix-eigenvalues of ${\mathcal S}(\N{1},\N{2},\ldots,\N{N}) \left( \rho \otimes \rho_c \right)$ \begin{equation}\label{solutionsas} \quad a_\pm = \frac{a_0}{2} \pm \sqrt{b^2 + a_0^2 (p - \frac{1}{2})^2}. \end{equation} \noindent The existence of this last expression is warranted by the positivity of the discriminant \cite{bhatia2009positive}, considering the positivity of $\rho$ and the structure of $a_0$ and $b$, which are linear combinations of $\mathbb{I}$ and $\rho$. The commutativity properties of $\rho$ and $\mathbb{I}_t$ are inherited to $a_\pm$. Then, the eigenvalues of ${\mathcal S}(\N{1},\N{2}) \left( \rho \otimes \rho_c \right)$ for two causal orders are the eigenvalues of $a_\pm$ Thus, to diagonalize $a_\pm$ we just replace $\rho$ by its eigenvalues, labeled as $\lambda_{\rho,i}$, in equation (\ref{solutionsas}), which generalizes the procedure obtained in \cite{ebler2018enhanced}. Our procedure gives access to the transmission of information in a more general situation, where the depolarization strengths $q_i$ can be different for each channel and it can take any value between 0 and 1. Equation (\ref{solutionsas}) gives the eigenvalues of the matrix ${\mathcal S}(\N{1},\N{2})(\rho \otimes \rho_c)$ ($s=\pm1$) \begin{eqnarray} \lambda_{s,i} &=& \frac{\alpha_0}{2}+ s \sqrt{p q \beta^2 + \alpha_0^2 (p -\frac{1}{2})^2} \\ &\text {with:}& \hspace{1ex}\alpha_0 \equiv \frac{1 - q_1 q_2}{d} + q_1 q_2 \lambda_{\rho,i} \nonumber \\ && \beta \equiv \frac{p_1 q_2 + q_1 p_2}{d} + (\frac{p_1 p_2}{d^2}+q_1 q_2) \lambda_{\rho,i} \nonumber \end{eqnarray} \noindent The eigenvalues of $\lambda_{s,i}$ are well defined because of the positivity of discriminant \cite{bhatia2009positive}. Finally, using the concavity of the entropy, the minimum of the entropy $H^{\rm min}$ for a state is reached by setting just one $\lambda_{\rho,i}$ to one and all the others to zero, with this we obtain \begin{equation}\label{Hmin} - H^\text{min}({\mathcal S}(\N{1},\N{2})) = \sum_{\substack{{s \in \{\pm 1\}}\\ {k \in \{ 0, 1 \}} }} (d-1)^{1-k} \lambda_{s,k} \log \left( \lambda_{s,k} \right) \end{equation} \begin{equation} \lambda_{s,k} = \frac{{\alpha_{0,k}}}{2} + s \sqrt{p q \beta_k^2 + \alpha_{0,k}^2 (p -\frac{1}{2})^2} \end{equation} \begin{equation} \alpha_{0,k} = \frac{1 - q_1 q_2}{d} + {k q_1 q_2} \label{alfaq} \end{equation} \begin{equation} \beta_{k} = \frac{p_1 q_2 + q_1 p_2}{d} + k \left( \frac{p_1 p_2}{d^2}+q_1 q_2 \right) \end{equation} \noindent It is easy to show $\beta_k \le {\alpha_{0,k}}$, then $\lambda_{\pm,i} \ge 0$ $(\lambda_{s,k} \ge 0)$ as expected. Also, $0 \le \lambda_{s,k} \le 1$ and then $- H^{\rm min}(\mathcal{S}({\mathcal N}_1,{\mathcal N}_2)) \le 0$. If one of $q_1=1$ , i.e. channel $1$ is free of depolarization, then $\alpha_{0,k}=\frac{p_2}{d}+k q_2=\beta_{k}$ and \begin{equation}\label{HminN21} - H^{\rm min}(\mathcal{S}({\mathcal N}_1,{\mathcal N}_2))=(d-1) \frac{p_2}{d} \log(\frac{p_2}{d}) + (\frac{p_2}{d}+q_2) \log(\frac{p_2}{d}+q_2) \end{equation} depends only on the probability of depolarization for channel $2$. Thus, $- H^{\rm min}(\mathcal{S}({\mathcal N}_1,{\mathcal N}_2))$ reaches its maximum value of zero only if $q_1=q_2=1$. Alternatively, it is direct to show that the discriminant reaches its maximum value when $p=\frac{1}{2}$, which is the case studied by Ebler {\it et al.} \cite{ebler2018enhanced}. In addition, if $q_1=q_2=0$, i.e. both channels are fully depolarizing, then $\alpha_{0,k}=\frac{1}{d}, \beta_{k}=\frac{k}{d^2}$, so $- H^{\rm min}(\mathcal{S}({\mathcal N}_1,{\mathcal N}_2))$ reaches the minimum value \begin{equation}\label{HminN2} \begin{array}{ll} - H^{\rm min}(\mathcal{S}({\mathcal N}_1,{\mathcal N}_2))= - \log(2d) + \frac{1}{2d^2} \log(\frac{d+1}{d-1}) + \frac{1}{2d} \log(1 - \frac{1}{d^2}). \end{array} \end{equation} For sake of shortness the entropy $H^{\rm min}(\mathcal{S}({\mathcal N}_1,{\mathcal N}_2))$ will be denoted simply as $H^{\rm min}(\mathcal{S}_N)$. To illustrate the range of parameters of equation~\ref{HminN21}, we plot the entropy $H^{\rm min}(\mathcal{S}_2)$ map for two noisy channels. Figure \ref{Entropy} shows the entropy $H^{\rm min}(\mathcal{S}_2)$. The plots are contour surfaces of $H^{\rm min}(\mathcal{S}_2)$ when $q_1,q_2$ vary from 0 to 1. Each plot contains thirty surfaces distributed in their complete range shown in the color-chart. We plot several cases of $H^{\rm min}(\mathcal{S}_2)$ when the dimension of the target is $d=2, 3, 10$ and 100. \begin{figure} [h!] \vspace*{13pt} \scalebox{.2}{\includegraphics{Fig1new.jpg}} \vspace*{13pt} \caption{\label{Entropy} {Entropy map for two noisy channels.} The 3D graphs represent contour surfaces of the Von-Neumann entropy $H^{\rm min}(\mathcal{S}_2)$ when the depolarizing parameters $q_1, q_2,$ and the probabilities $P_1=P_2=p$ are varied from 0 to 1. We plot several cases when the dimension $d$ of the target $\rho$ is: a) $d=2$, b) $d=3$, c) $d=10$ and d) $d=100$. The value of $H^{\rm min}(\mathcal{S}_2)$ is depicted by the color in the bar besides. } \end{figure} \subsubsection{Derivation of ${\tilde \rho}_c^{(2)}$}\label{Rhocal} To obtain the output state of the control system ${\tilde \rho}_c^{(N)}$ after $N$ channels, we calculate \begin{equation*} {\rm Tr}_{XIJ} \left[ (\mathcal{S}(\N{1},\ldots,{\mathcal N}_{N} )\left( \rho \otimes \rho_c \right)) \otimes \mathbb{I})(\omega_{XIJAC})\right] \end{equation*} where $\omega_{XIJAC}$ is an extended input state with pure conditional state as described in \cite{ebler2018enhanced}. A direct calculation shows: \begin{align} {\rm Tr}_{XIJ} & \left[ (\mathcal{S}(\N{1},\ldots,{\mathcal N}_{N} )\left( \rho \otimes \rho_c \right)) \otimes \mathbb{I})(\omega_{XIJAC}) \right] = \nonumber \\ & = {\rm Tr}_{XIJ} \left[ \frac{1}{d^2} \sum_{x,i,j} p_x \left| x \left>\right< x \right| \left| i \left>\right< i \right| \left| j \left>\right< j \right| \otimes \mathcal{S}(\N{1},\ldots,{\mathcal N}_{N} ) (\rho' \otimes \rho_c) \right] \nonumber \\ & = \frac{\mathbb{I}}{d} \otimes {\tilde \rho}_c^{(N)} \end{align} \noindent here $\rho'=X(i) Z(j) \rho Z(j)^\dagger X(i)^\dagger$ and $X(i)\left| l \right>=\left|i \oplus l \right>, Z(j)\left| l \right>=e^{2 \pi i j l} \left| l \right>$ are the known Heisenberg$-$Weyl operators \cite{wilde2013quantum}. To isolate the term ${\tilde \rho}_c^{(N)} $ we apply the following relations \begin{eqnarray} \label{rules2} {\rm Tr}_{XIJ} \left[ \sum_{XIJ} p_x \left| x \left>\right< x \right| \left| i \left>\right< i \right| \left| j \left>\right< j \right| \rho' \right] = d \mathbb{I} \\ {\rm Tr}_{XIJ} \left[ \sum_{XIJ} p_x \left| x \left>\right< x \right| \left| i \left>\right< i \right| \left| j \left>\right< j \right| \mathbb{I} \right] = d^2 \mathbb{I} \end{eqnarray} which are valid for $N\geq2$ and they are obtained by direct calculation following the former definitions. Then, for $N=2$ we find that the output control state is \begin{equation} \label{output2} {\tilde \rho}_c^{(2)} = p_1 p_2 [ P_1 \left| 1 \left>\right< 1 \right| + P_2 \left| 2 \left>\right< 2 \right| % \frac{\sqrt{P_1P_2}}{d^2} \left( \left| 0 \left>\right< 1 \right| + \left| 1 \left>\right< 0 \right| \right) ] + \rho_c \left( 1 - p_1 p_2 \right) \end{equation} \noindent where $p_i=1-q_i$. Using the two previous results for $\chi_{{\rm Q}N{\rm S}}$, Figure \ref{Holevo2} shows the transmission map of information for two noisy channels. The plots are contour surfaces of $\chi_{\rm Q2S}$ when $q_1,q_2$ and $P_1=P_2=p$ vary from 0 to 1. The maximum capacity is trivially reached when $q_1=q_2=1$ simultaneously reaching the value $\chi_{\rm Q2S}=\log d$. The minimum capacity is zero, reached in the boundary of the front sides with $(q_1=0, p=0,1)$, $(q_2=0, p=0, 1)$, $(q_1=0, q_2=1)$, and $(q_1=1, q_2=0)$. Notably, for $q_1=q_2=0$ there are values higher than the minimum. This phenomenon is observed in the protuberance of plots near $\chi_{\rm Q2S}=0$. For larger values of $d$, the protuberance occurs sharply near $q_1=0$ and $q_2=0$ faces. Note the nearest surface to those faces are for $\chi_{\rm Q2S}=10^{-3}, 10^{-3}, 10^{-4}, 10^{-7}$ respectively for each plot $d=2, 3, 10, 100$. \begin{figure} [h!] \vspace*{13pt} \scalebox{.1}{\includegraphics{Fig1newC.jpg}} \vspace*{13pt} \caption{\label{Holevo2} {Transmission map of information for two noisy channels.}The 3D graphs represent contour surfaces of the Holevo information $\chi_{\rm Q2S}$ when the depolarising parameters $q_1,q_2$ and the probabilities $P_1=P_2=p$ varied from 0 to 1. We plot several cases for the dimension $d$ of the target system: a) $d=2$, b) $d=3$, c) $d=10$ and d) $d=100$. In all these cases there are thirty contour surfaces of $\chi_{\rm Q2S}$. The values of $\chi_{\rm Q2S}$ are shown in the color bars. } \end{figure} \subsection{Holevo information for $N=3$ channels}\label{CalculationHmin3channels} We numerically calculate the eigenvalues of the entropy $H^{\rm min}$ for $N=3$ channels from equation (\ref{Matrix3i}). Then, using relations (\ref{rules2}) from (\ref{S0}), (\ref{S1}), (\ref{S2}) and (\ref{S3}) we find that the output state is \begin{eqnarray}\label{output3} {\widetilde \rho}_c ^{(3)}= (s_2+s_3) \rho_c +\displaystyle \frac{s_0}{d^2} \left(\sum_{(k,k')\in {\mathfrak I},{\mathfrak J}} \sqrt{P_k P_{k'}} \vert k\rangle\langle k'\vert \right % + \displaystyle \left. d^2 \sum_{(k,k')\in {\mathfrak K}} \sqrt{P_k P_{k'}} \vert k\rangle \langle k'\vert \right) \\ % \hspace{1.5cm} +\displaystyle \frac1{d^2} \left(\sum_{s=1}^3 \sum_{(\ell,\ell')\in {\mathfrak L}_s} \sqrt{P_\ell P_{\ell'}} r_s \vert \ell \rangle \langle \ell'\ver % + d^2 \displaystyle \sum_{s=1}^3 \sum_{(m,m')\in {\mathfrak M}_s} \sqrt{P_m P_{m'}} r_s \vert m \rangle \langle m'\vert \right) \nonumber % \end{eqnarray} \begin{figure} [h!] \vspace*{13pt} \scalebox{.6}{\includegraphics[width = .7\textwidth]{chi2v2.jpg}}(a)\\ \scalebox{.6}{\includegraphics[width = .7\textwidth]{chi3v2.jpg}}(b) \vspace*{13pt} \caption{\label{Figura3}{Transmission of information for $N=2$ and $N=3$ channels.} Holevo information as a function of the depolarization strengths $q_i$ of the channels. We plot the subcases of equal depolarization strengths, i.e., $q_1=q_2=q_3=q$, with equally weighted probabilities $P_k$ for indefinite causal orders (solid line) with (a) $N=2$ and (b) $N=3$ channels. The transmission of information first decreases to a minimal value for Holevo information and then the transmission of information increases with $q$. For completely depolarizing channels, i.e. $q=0$, the transmission of information is nonzero and decreases as $d$ increases. A comparison is shown between the Holevo information when the channels are in a definite causal order (dashed line). A full superposition of $N!$ causal orders is used.} \end{figure} As before, putting those outcomes together in (\ref{Gholevo}), Figures~\ref{Figura3} (a) and (b) give the Holevo informations $\chi_{\text{Q2S}}$ and $\chi_{\text{Q3S}}$ for two and three channels respectively, as a function of the depolarization strengths $q_i$ and the dimension $d$ of the target system. Our model enables us to exhibit a wealth of different behaviors as a function of $d$,$q_i$, and $N$ from the fully noisy situation to the identity channel transmission. For the sake of simplicity, we restrict our graphical analysis to equal depolarization strengths, i.e., $q_1=q_2=q_3$, with a balanced superposition of $N!$ causal orders, that is, with equally weighted probabilities $P_k=1/N!$ for each case $N=2,3$. The analysis of these results allows us to draw the following conclusions for those particular cases: \begin{itemize} \item For a fixed dimension $d$, the Holevo information for indefinite causal order is always higher than the one obtained using one of the definite causal order shown in Fig.~\ref{Figura2}. This is especially the case for totally depolarized channels i.e. $q_i=0, \forall i$. For completely clean channels ($q=1$), the Holevo information for indefinite and definite causal order converges to the same value depending on $d$ (not shown). \item Two regions can be distinguished. In the strongly depolarized region (roughly $q<0.3$ for $N=2$ and $q<0.5$ for $N=3$) the increase of the dimension $d$ of the target system is detrimental to the Holevo information transmitted by the quantum switch. In contrast, in the moderately depolarized region ($q>0.3$ for $N=2$ and $q>0.5$ for $N=3$) the Holevo information increases both with $q$ and $d$, as expected a maximum (not shown) for completely clean channels. \item In the strongly depolarized region, increasing the number of channels to $N=3$ is definitively advantageous for information extraction. For instance, in the case of totally depolarized channels ($q=0$), the Holevo information is approximately doubled with $N=3$ with respect to $N=2$ for all values of the dimension $d$ calculated up to $d=10 \end{itemize} In fact, Table \ref{table1} gives the values of the ratio $\chi_{\text Q3S}/\chi_{\text Q2S}$, finding that the Holevo information is approximately doubled for $N=3$ with respect to $N=2$. \begin{table}[ht \centering \begin{tabular}{c c c c} \hline $d$ & $\chi_{\text Q2S}$ & $\chi_{\text Q3S}$ & $\chi_{\text Q2S}/\chi_{\text Q3S}$ \\ [0.5ex] \hline 2 & 0.0487 &0.0980 & 2.0123 \\ 3 & 0.0183 & 0.0339 & 1.8524 \\ 4 & 0.0085 & 0.0159 &1.8705 \\ 5 & 0.0046 & 0.0087 & 1.8913 \\ 6 &0.0027 & 0.0053 & 1.9629 \\ 7 &0.0018 & 0.0034 & 1.8888 \\ 8 & 0.0012 & 0.0023 & 1.9166 \\ 9 & 0.0008 & 0.0016 & 2 \\ 10 & 0.0006 & 0.0012 & 2 \\ [1ex] \hline \end{tabular} \caption{Values of the Holevo information ratio $\chi_{\text Q3S}/\chi_{\text Q2S}$. The mean value of the ratio is 1.9328 $\pm$ 0.0617.} \label{table1} \end{table} \section{Conclusions}\label{concl} Communication enhancement is a challenging task in quantum information processing due to imperfection of communication channels subjected to depolarization. Causal order has been proposed as a disruptive procedure to improve communication, compression of quantum information, bringing the quantum possibilities into a new frontier. We have analyzed the quantum control of $N$ operators in the context of the second-quantized Shannon theory and in the specific case of superposition of causal orders, extending the results in the current literature. We obtained a general expression for ${\mathcal S}(\N{1},\N{2},\ldots,\N{N})$for the quantum $N$-switch for an arbitrary number of channels with any depolarizing strength thus providing an operational formula enabling the exploration of communication channels controlled by causal orders. This formula is useful to explore computationally the cases with an increasing $N$. A detailed analysis to assess the information transmission for the cases of $N=2$ and $N=3$ channels is presented: an increasing number of channels improves the transmission of information. In particular, we remarkably found that the Holevo information is doubled when the number of channels goes from $N=2$ to $N=3$. We give the matrices corresponding to quantum $N$-switches ${\mathcal S}(\N{1},\N{2},\ldots,\N{N})$ as a function of the number of channels, depolarization strengths, dimension of the target system. We obtain other general properties for the general case of $N$ channels such as the symmetric properties of matrices $Q^{k,k'}_{A_z}$ and thus of ${\mathcal S}(\N{1},\N{2},\ldots,\N{N})$. We also demonstrate that ${\mathcal S}(\N{1},\N{2},\ldots,\N{N})$ is always a linear combination of $\rho$ and $\mathbb{I}_t$, whatever $N$ channels. Expressions for the Holevo limit are equally accessible from our expressions and methodology. Besides, we showed that the depolarizing strengths can be used as control parameters to modify the information transmission on demand. We shall develop elsewhere the analysis of control via selected combinations of the $N!$ available causal order enabled by the present work. \section*{Acknowledgements} \noindent F. Delgado acknowledges professor Jes\'us Ram\'irez-Joach\'in for the fruitful discussions and teaching in 1983 about combinatorics required in this work. L.M. Procopio wishes to thank Alastair A. Abbott for commenting this manuscript. F. Delgado and M. Enr\'iquez acknowledge the support from CONACyT and from School of Engineering and Science of Tecnol\'ogico de Monterrey in the developing of this research work. L.M. Procopio acknowledges the support from the European Union's Horizon 2020 research and innovation programme under the Marie Sk\l{}ukodowska-Curie grant agreement No 800306. This work is also supported by a public grant overseen by the French National Research Agency (ANR) as part of the ``Investissements d'Avenir'' program (Labex NanoSaclay, reference: ANR-10-LABX-0035) and by the Sitqom ANR project (reference : ANR-SITQOM-15-CE24-0005).\\
\section{Introduction}\label{sec:introduction} \input{sections/introduction.tex} \section{Problem Description}\label{sec:problem_description} \input{sections/problem_description.tex} \section{Distributed Self-Organization Algorithm}\label{sec:distributed_self_organization_algorithm} \input{sections/distributed_self_organization_algorithm.tex} \input{sections/acronyms.tex} \bibliographystyle{IEEEtran} \subsection{Agent-Based Modeling} \label{sec:agent_based_modeling} \ac{ABM} is a ground-up computational modeling approach whereby a phenomenon is modeled in terms of agents and their interactions. An agent is an autonomous computational individual or object with particular properties and actions \cite{wilensky2015introduction}. It is suitable for modeling heterogeneous and self organizing systems, and therefore suits as the perfect choice for the problem that is being addressed in this paper. We use \ac{ABM} to model the proposed distributed algorithm by modeling the functional entities of the base stations and the instances of \ac{MME}s, that are in taking decisions related to the handover region assignments as autonomous agents. The behavior of these entities is modeled by simple local rules of the agents. Whenever a handover occurs the BSs that are involved in this handover change their counters (the counters count the number of handoffs that come from a specific BS and specific MME). And when this happens the involved BSs decide whether to change their MME assignment based on a locally calculated metric (system energy), which represents the attraction of a BS towards an MME (we can think of the MMEs as clusters). If the BS decides to get assigned to another MME it sends a message, and the MME will accept the assignment if it has enough resources (there is a maximum number of BS that can be assigned to an MME). If the MME does not have enough resources it is going to perform a local decision-making task, which involves checking if the attraction of the new incoming BS is higher than the lowest attraction (system energy) of existing BSs. If this is the case, the new BS is going to be assigned to this MME, otherwise, the assignment is going to be rejected. If the new BS is accepted the BS with the lowest attraction among the existing ones will be thrown out of the cluster and a message is sent to this BS telling to find a new appropriate cluster. \subsection{METIS} \label{sec:METIS} \subsection{Simulation model} \label{sec:simulation_model} \subsection{Results} \label{sec:results}
\section{Introduction} \markboth{Error Rate Analysis of Amplitude-Coherent Detection} {Murray and Balemi: Using the Document Class IEEEtran.cls}% Generally speaking, there are three main types of detection schemes for digital signals, which are coherent detection, noncoherent detection, and partially coherent detection \cite{Dweik}. The detector design, required channel state information (CSI), computational complexity, and symbol error rate (SER) of each detection scheme depend on several factors such as the modulation scheme, modulation order, and channel model. Therefore, adopting a particular modulation and detection schemes is mostly determined by the targeted application. For example, broadband communications require spectrally efficient modulation schemes to support high data rates, and the communicating nodes typically have sufficient resources to estimate the CSI, and hence, modulation schemes with high order and coherent detectors are utilized. For most wireless applications, quadrature amplitude modulation (QAM) is considered as the most attractive due to its power and spectral efficiency \cite{DVB}-\cite{LTE-A}. Nevertheless, $M$-ary amplitude shift keying (MASK) has recently attracted extensive attention because it is more suitable for certain applications such as wireless sensor networks (WSNs) \cite{WSN}, wireless energy transfer \cite{NCD1}, radio frequency identification (RFID) \cite{RFID}, and optical wireless communications (OWC) \cite{FSO4}-\cite{FSO3}. Unlike typical wireless communications systems, OWC such as free space optics (FSO) and visible light communications (VLC) that use intensity modulation with direct detection (IM-DD) require the baseband signal to be real and positive, and hence, using QAM for OWC directly is infeasible. To overcome this limitation, QAM can be combined with orthogonal frequency division multiplexing (OFDM) to generate real and positive signals using various techniques \cite{Uysal-Survey}. Nevertheless, the spectral efficiency and SER of QAM-OFDM is generally equivalent to MASK-OFDM \cite{Haas-Sep-2013}. Therefore, MASK renders itself as an efficient alternative to QAM for OWC \cite{Lu-4PAM} because it can be used with/without OFDM. Moreover, in IM-DD, the binary ASK (BASK) can be detected using a simple noncoherent detector that does not require prior knowledge of the instantaneous CSI. The noncoherent BASK detector has low complexity and robust to hardware impairments such as the carrier frequency offset and phase noise, but it suffers from poor spectral efficiency, and accurate knowledge of the statistical CSI is necessary to compute the optimum threshold. Improving the spectral efficiency of noncoherent MASK modulation by increasing the modulation order $M$ is not feasible in fading channels due to its poor symbol error rate (SER) \cite{Dweik}, which limits its utilization to additive white Gaussian noise (AWGN) channels. Practically speaking, the AWGN channel model is limited to few applications such as indoor OWC \cite{Uysal-Survey}. Although the channel in OWC may be considered non-fading in certain scenarios \cite{Armstrong-2008}, \cite{Zhang-2014}, channel models that consider the fading induced by atmospheric turbulence can be considered more practical, and they are actually more flexible because they can be used to describe a wide range of fading scenarios. In the literature, several channel models have been adopted for OWC including the Gamma-Gamma, exponential and Rician \cite{Uysal-Survey}, \cite{Letzepis-2009}, \cite{Aghajanzadeh-2010}. Moreover, the random pointing error in OWC are typically modeled as Rician \cite{Slim-ICC-2018}-\cite{Ansari-2014}. The Rician channel model is of particular interest because it is also widely adopted in wireless communications systems, such as massive multiple-input multiple-output (MIMO) systems \cite{Yue-2015}-\cite{Sun-2016}, and satellite/drone to ground channels \cite{Matolak-II}, \cite{Matolak-III}. Therefore, the Rician channel model is adopted in this work. To resolve the spectral efficiency and SER conflict of MASK, Al-Dweik and Iraqi \cite{Dweik} recently proposed a semi-coherent detection scheme, also denoted as amplitude coherent (AC) detection, that allows using MASK modulation with $M>2$ over dispersive channels while maintaining the main advantages of noncoherent detection such as receiver low complexity, and immunity to phase noise and frequency offsets. The AC detector requires only the knowledge of the channel gain, which can be obtained blindly and efficiently for single and multicarrier modulation schemes \cite{Bariah-TVT}. The channel phase information is not required, which is the main factor that contributes to the complexity reduction of the detector. The optimum, suboptimum and a heuristic detectors are derived in Rayleigh fading channels, and the performance of the heuristic detector is evaluated with and without perfect knowledge of the channel gain in \cite{Dweik} and \cite{Bariah-TVT}, respectively. The optimum amplitudes of the transmitted MASK symbols are then derived for multibranch detectors in \cite{Malik}. However, the Rayleigh fading model is limited to wireless applications with no line-of-sight (LoS) signal component. Therefore, applying the AC detector and evaluating its performance in a more general channel model is indispensable. Consequently, this paper considers applying the AC detection technique to communications system in Rician fading channels with single and multiple receiving antennas. More specifically, the optimum AC detector is derived, and its SER is compared with the optimum coherent and noncoherent MASK detectors. Moreover, the SER of the heuristic detector \cite{Dweik} is derived using two different approaches, and efficient expressions are obtained. One of the approaches results in closed-form SER formula, which is then simplified to provide the asymptotic SER at high SNRs. The other approach results in an efficient expression that contains a single integral. The obtained analytical and simulation results demonstrate that the AC detector can offer reliable SER performance that is comparable to coherent detection in Rician fading channels. The rest of the paper is organized as follows. Section II presents the model of $M$-ary ASK system. In section III, the different types of considered detectors are derived including coherent, non-coherent and amplitude coherent detectors. Sections IV and V present the two approaches considered for analyzing the SER for the heuristic AC detector. Sections VI and VII provide the numerical results and conclusion, respectively. \section{System and Channel Models} In unipolar MASK systems, the baseband representation of the transmitted signal during the $\ell$th signaling interval is given by \begin{equation} d^{\{\ell\}}=s_{m}\text{, }m\in\{0\text{, }1\text{, }...\text{, }M-1\}, \end{equation} where $M$ is the modulation order, the transmitted symbols $s_{m}\in \mathbb{R}$, where $\mathbb{R}$\ the set of positive real numbers including the $0$. Without loss of generality, the symbols' amplitudes can be ordered such that $s_{m+1}>s_{m}$. Moreover, the amplitude spacing is assumed to be uniform such that $s_{m+1}-s_{m}=\delta$. It should be noticed that $\frac {1}{M}\sum_{m=0}^{M-1}E_{m}=1$, $E_{m}=s_{m}^{2}$ when the average symbol energy is normalized to unity. Therefore, the transmitted symbol during the $\ell$th transmission interval can be described by,% \begin{equation} d^{\left\{ \ell\right\} }=m\times\delta\text{, \ \ }m\in\{0\text{, }1\text{, }...\text{, }M-1\}, \end{equation} where $m$ is selected uniformly, and% \begin{equation} \delta=\sqrt{\frac{6}{\left( 2M-1\right) \left( M-1\right) }}\text{.}% \end{equation} The system under consideration assumes that the transmitter is equipped with single transmit antenna, and the receiver is equipped with $N$ receiving antennas. The channels between the transmitting and receiving antennas are assumed to be flat, independent and identically distributed (iid) Rician fading channels. Therefore, the received signals in vector notations can be written as% \begin{equation} \mathbf{r}=\mathbf{h}s_{m}+\mathbf{n},\label{E-r-1}% \end{equation} where the channel fading vector $\mathbf{h}\in\mathbb{C}^{N\times1}$, $h_{i}\sim\mathcal{CN}\left( m_{h}\text{, }2\sigma_{h}^{2}\right) $ represents the Rician fading, $s_{m}$ is the information symbol selected uniformly from the set $\mathbb{S=}\left\{ s_{0}\text{, }s_{1}\text{, ..., }s_{M-1}\right\} $, and the additive white Gaussian noise (AWGN)$\ $vector $\mathbf{n}\in\mathbb{C}^{N\times1}$ where $n_{i}\sim\mathcal{CN}\left( 0\text{, }2\sigma_{n}^{2}\right) $. The received signal in (\ref{E-r-1}) can also be written as \begin{equation} \mathbf{r}=\left[ \mathbf{\alpha}\circ\mathbf{\Phi}\right] s_{m}+\mathbf{n}, \end{equation} where $\mathbf{\alpha}=\left[ \left\vert h_{1}\right\vert \text{, }\left\vert h_{2}\right\vert \text{, }\ldots\text{, }\left\vert h_{N}\right\vert \right] $, $\mathbf{\Phi}\triangleq e^{j\mathbf{\theta}}$, and $\circ$ denotes the Hadamard product. \subsection{Rician Channel Model} In Rician fading, the received signal has a LoS component that affects the received signal envelope and phase. After dropping the channel index, the joint probability density function (PDF) of the channel envelope $\alpha\triangleq\left\vert h\right\vert $ and and phase $\theta\triangleq \arg\left\{ h\right\} $ is given by% \begin{equation} f\left( \alpha,\theta\right) =\frac{\alpha}{2\pi\sigma_{h}^{2}}\exp\left( -\frac{\alpha^{2}-2\mu_{h}\alpha\cos\theta+\mu_{h}^{2}}{2\sigma_{h}^{2}% }\right) ,\label{joint}% \end{equation} where $\mu_{h}=\left\vert m_{h}\right\vert $. The marginal PDF of $\alpha$ can be obtained by averaging the joint PDF $f\left( \alpha,\theta\right) $ over $\theta$. Thus% \begin{align} f\left( \alpha\right) & =\int_{-\pi}^{\pi}f\left( \alpha,\theta\right) \text{ }d\theta\label{env}\\ & =\frac{2(1+K)}{\Omega}\alpha\operatorname{e}^{-K}\operatorname{e}% ^{-\frac{(1+K)}{\Omega}\alpha^{2}}\text{ }I_{0}\left( 2\alpha\sqrt {\frac{K(1+K)}{\Omega}}\right) , \end{align} where $\Omega=\mu_{h}^{2}+2\sigma_{h}^{2}$ and $K=\frac{\mu_{h}^{2}}% {2\sigma_{h}^{2}}$. Similarly, the PDF of the phase $\theta$ can be obtained by averaging over the PDF of $\alpha$ \cite{Rice-phase}, which gives% \begin{equation} f(\theta)=\frac{1}{2\pi}\exp\left( -\frac{\mu_{h}^{2}}{2\sigma_{h}^{2}% }\right) +\frac{\mu_{h}\cos\left( \theta+\phi\right) }{\sqrt{2\pi}% \sigma_{h}}\exp\left( \frac{-\mu_{h}^{2}}{2\sigma_{h}^{2}}\sin^{2}\left( \theta+\phi\right) \right) Q\left( -\frac{\mu_{h}}{\sigma_{h}}\cos\left( \theta+\phi\right) \right) ,\label{phase}% \end{equation} where $\phi=\tan^{-1}\left( \frac{\mu_{h,Q}}{\mu_{h,I}}\right) $, $\mu _{h,I}\triangleq\Re\left\{ m_{h}\right\} $ and $\mu_{h,Q}=\Im\left\{ m_{h}\right\} $. \section{MASK Detector Design} Usually, there is a trade-off between the receiver complexity and SER performance. The complexity may refer to the computational complexity, hardware complexity or the amount of information required at the receiver side. Adopting a certain detector design depends on the desired application. Other parameters such as the spectral efficiency can affect the complexity and SER. Because it is typically difficult to achieve such conflicting objectives simultaneously, it is crucial to have various options that may fit various applications. In this section, various optimum and suboptimum detectors are derived for MASK signals in Rician fading channels, and their complexity will be discussed. \subsection{Coherent Detection} Based on the signal model in (\ref{E-r-1}), and noting that all received $N$ signals are mutually independent, the conditional PDF of $\mathbf{r}$ for a given fading vector $\mathbf{h}$, and a transmitted symbol $s_{m}$ is given by \cite{alouni}% \begin{equation} f\left( \mathbf{r|h,}s_{m}\right) =\prod\limits_{i=1}^{N}f(r_{i}% \mathbf{|}h_{i}\text{,}s_{m}). \end{equation} As can be noted from (\ref{E-r-1}), $f(r_{i}\mathbf{|}h_{i}$,$s_{m}% )\sim\mathcal{CN}\left( h_{i}s_{m},2\sigma_{n}^{2}\right) $, and thus \begin{align} f\left( \mathbf{r|h,}s_{m}\right) & =\prod\limits_{i=1}^{N}f(r_{i}% \mathbf{|}h_{i}\text{,}s_{m})\nonumber\\ & =\frac{1}{\left( 2\pi\sigma_{n}^{2}\right) ^{N}}\prod\limits_{i=1}^{N}% \exp\left( -\frac{1}{2\sigma_{n}^{2}}\left\vert r_{i}\mathbf{-}h_{i}% s_{m}\right\vert ^{2}\right) .\label{E-PDF-00}% \end{align} The maximum likelihood (ML) detector based on (\ref{E-PDF-00}) can be formulated as% \begin{equation} \hat{d}=\arg\max_{\tilde{s}_{m}\in\mathbb{S}}\text{ }f\left( \mathbf{r|h}% \text{,}\tilde{s}_{m}\right) \end{equation} which gives after taking the $\log$ of the objective function, dropping the common terms and constants, \begin{equation} \hat{d}=\arg\min_{\tilde{s}_{m}\in\mathbb{S}}\sum\limits_{i=1}^{N}\left\vert r_{i}\mathbf{-}h_{i}\tilde{s}_{m}\right\vert ^{2}\text{.}\label{E-MLD-Coh-00}% \end{equation} As can be noted from (\ref{E-MLD-Coh-00}), the computational complexity of the coherent detector is low, however, the fading parameters represented by $\mathbf{h}$ should be estimated. Generally speaking, estimating $\mathbf{h}$ requires significant efforts, and inaccurate channel estimation deteriorates the system SER \cite{Saci}. \subsection{Noncoherent Detection} The noncoherent detector can be derived following the same approach of the coherent detector, except that the detector should not have any information about the instantaneous values of $\mathbf{h}$. Consequently, $\mathbf{h}$ should be treated as a random vector. In such cases, the ML detector can be formulated as% \begin{align} \hat{d} & =\arg\max_{\tilde{s}_{m}\in\mathbb{S}}\text{ }f\left( \mathbf{r|}\tilde{s}_{m}\right) \nonumber\\ & =\arg\max_{\tilde{s}_{m}\in\mathbb{S}}\text{ }\prod\limits_{i=1}^{N}% f(r_{i}\mathbf{|}\tilde{s}_{m}). \end{align} The conditional PDF $f\left( r_{i}\mathbf{|}s_{m}\right) $ is the sum of two complex Gaussian random variables and thus% \begin{equation} f\left( r_{i}\mathbf{|}s_{m}\right) =\frac{1}{\pi\sigma_{\mathrm{r}}^{2}% }\exp\left( -\frac{\left\vert r_{i}\mathbf{-}\mu_{h}s_{m}\right\vert ^{2}% }{\sigma_{\mathrm{r}}^{2}}\right) . \end{equation} where $\sigma_{\mathrm{r}}^{2}\triangleq2\left( \sigma_{h}^{2}s_{m}% ^{2}+\sigma_{n}^{2}\right) $After some straightforward simplifications, the ML noncoherent detector reduces to% \begin{equation} \hat{d}=\arg\min_{\tilde{s}_{m}\in\mathbb{R}}\left\{ -N\ln\left( \pi \tilde{\sigma}_{\mathrm{r}}^{2}\right) +\frac{1}{\tilde{\sigma}_{\mathrm{r}% }^{2}}\sum\limits_{i=1}^{N}\left\vert r_{i}\mathbf{-}\mu_{h}\tilde{s}% _{m}\right\vert ^{2}\right\} ,\label{E-MLD-noncoherent-00}% \end{equation} where $\tilde{\sigma}_{\mathrm{r}}^{2}=\sigma_{\mathrm{r}}^{2}$ except that $s_{m}$ is replaced by $\tilde{s}_{m}$. As can be noted from (\ref{E-MLD-noncoherent-00}), the noncoherent detector does not require the knowledge of $\mathbf{h}$, instead, it requires the channel statistical information, i.e., the values of $\mu_{h}$, $\sigma_{h}^{2}$ and $\sigma _{n}^{2}$. Estimating the statistical information of the channel is generally challenging because it requires large number of observations, and hence, large delay and high computational complexity. Therefore, similar to the coherent detector, the noncoherent detector has complexity limitations as well. \subsection{Amplitude Coherent Detection} The AC detector is designed such as a compromise between the poor SER of the noncoherent and the high complexity of the coherent detector caused by the channel estimation process \cite{Dweik}. More specifically, the AC detector is designed assuming that the receiver has partial knowledge about the channel, namely, the fading gains vector $\mathbf{\alpha}$, but no information is required for $\mathbf{\Phi}$. Since phase estimation is typically more complex to achieve as compared to the channel envelope, the AC detector complexity is less than the coherent detection \cite{Bariah-TVT}. The following subsections present the derivation of the optimum and suboptimum AC detectors. \subsubsection{Optimum AC Detector} The optimum AC detector can be derived by applying the ML criterion and assuming the phase shift introduced by the channel is unknown. Therefore, \begin{equation} \hat{d}=\arg\max_{\tilde{s}_{m}\in\mathbb{S}}\text{ }f\left( \mathbf{r|\alpha ,}\tilde{s}_{m}\right) \text{.}\label{E-ACD-Optimum}% \end{equation} Because $r_{i}$ $\forall i$ are mutually independent, then the conditional joint PDF of $\mathbf{r}$ given that only the channel gain $\mathbf{\alpha}$ is known, can be derived as \begin{equation} f\left( \mathbf{r|\alpha,}s_{m}\right) =\prod\limits_{i=1}^{N}\int_{-\pi }^{\pi}f\left( r_{i}|\alpha_{i}\text{,}\theta_{i}\text{,}s_{m}\right) f_{\theta_{i}}(\theta_{i})d\theta_{i},\label{E-PDF-01}% \end{equation} where $f(\theta_{i})$ is given in (\ref{phase}). By noting that the real and imaginary parts of $r_{i}$\ are independent, and dropping the index $i$ for notational simplicity, then $f\left( r_{i}|\alpha_{i},\theta_{i}% ,s_{m}\right) $ can be written as% \begin{align} f\left( r|\alpha,\theta,s_{m}\right) & =f\left( r_{\Re}|\alpha ,\theta,s_{m}\right) f\left( r_{\Im}|\alpha,\theta,s_{m}\right) \nonumber\\ & =\frac{1}{2\pi\sigma_{n}^{2}}\exp\left[ -\frac{\left\vert r\right\vert ^{2}+\alpha^{2}s_{m}^{2}}{2\sigma_{n}^{2}}\right] \exp\left[ \frac{\alpha s_{m}}{\sigma_{n}^{2}}\left( r_{\Im}\sin\left( \theta\right) +r_{\Re}% \cos\left( \theta\right) \right) \right] \nonumber\\ & =\frac{1}{2\pi\sigma_{n}^{2}}\exp\left[ -\frac{\left\vert r\right\vert ^{2}+\alpha^{2}s_{m}^{2}}{2\sigma_{n}^{2}}\right] \exp\left[ \frac{\alpha s_{m}}{\sigma_{n}^{2}}\left\vert r\right\vert \cos(\theta-\theta_{\text{r}% })\right] ,\label{E-PDF-02}% \end{align} where $\theta_{\text{r}}\triangleq\tan^{-1}\left( r_{\Im}/r_{\Re}\right) $. Then, $f\left( r|\alpha,s_{m}\right) $\ can be evaluated by substituting (\ref{phase}) and (\ref{E-PDF-02}) into (\ref{E-PDF-01}). Because evaluating the integral in (\ref{E-PDF-01}) is intractable, Von Mises (Tikhonov or circular normal) distribution is used as approximation for $f_{\theta}(\theta)$ in (\ref{phase}), which can be written as \cite{Tikh-Rice}% \begin{equation} f(\theta)\approx\frac{1}{2\pi I_{0}\left( 2\sqrt{K\left( K+1\right) }\right) }\exp\left( 2\sqrt{K\left( K+1\right) }\cos\left( \theta -\phi\right) \right) . \end{equation} Therefore, the integral in (\ref{E-PDF-01}) can be written as \begin{equation} f\left( r|\alpha,s_{m}\right) \approx G\left( r\right) \exp\left( -\frac{\alpha^{2}s_{m}^{2}}{2\sigma_{n}^{2}}\right) \mathcal{I}_{\theta }\text{.}% \end{equation} where $G\left( r\right) $ \begin{equation} G\left( r\right) =\frac{1}{2\pi I_{0}\left( 2\sqrt{K\left( K+1\right) }\right) \sigma_{n}^{2}}\exp\left( -\frac{\left\vert r\right\vert ^{2}% }{2\sigma_{n}^{2}}\right) \end{equation} and \begin{equation} \mathcal{I}_{\theta}=\frac{1}{2\pi}\int_{-\pi}^{\pi}\exp\left( 2\sqrt {K\left( K+1\right) }\cos\left( \theta-\phi\right) \right) \exp\left( \frac{\alpha s_{m}}{\sigma_{n}^{2}}\left\vert r\right\vert \cos\left( \theta-\theta_{\text{r}}\right) \right) d\theta.\label{I-theta}% \end{equation} The factor $G\left( r\right) $ can be considered constant with respect to the maximization process in (\ref{E-ACD-Optimum}), thus, it is more convenient to separate it from the other terms. Moreover, for the special case where $s_{m}=0$, the PDF$\ f\left( r|\alpha\text{,}\theta\text{,}s_{m}=0\right) $ is independent of $\alpha$\ and $\theta$. Thus,% \begin{align} f\left( r|\alpha,\theta,s_{0}=0\right) & =\frac{1}{2\pi\sigma_{n}^{2}}% \exp\left[ -\frac{\left\vert r\right\vert ^{2}}{2\sigma_{n}^{2}}\right] \nonumber\\ & =G\left( r\right) I_{0}\left( 2\sqrt{K\left( K+1\right) }\right) \text{.}% \end{align} For $s_{m}\neq0$, evaluating the integral $\mathcal{I}_{\theta}$\ is actually intractable due to the existence of $\phi$ and $\theta_{\mathrm{r}}$. Moreover, $\theta_{\mathrm{r}}$ depends nonlinearly on $\theta$, which makes it difficult to evaluate $\mathcal{I}_{\theta}$ even numerically. To overcome this problem, we assume that $\theta_{\mathrm{r}}$ is independent of $\theta$, consequently, the derived detector is near-optimal. Moreover, $\theta _{\mathrm{r}}$ represents the phase of the received signal $r_{i}$, and hence it can be computed directly at the receiver. The SER performance of the near-optimal detector is expected to be close to the optimum at low SNRs because the second exponent in (\ref{I-theta}) will be less significant, and hence, the assumption that $\theta_{\mathrm{r}}$ and $\theta$ are independent will not have substantial effect on the SER. On the contrary, at high SNRs, the second exponent dominates the value of $\mathcal{I}_{\theta}$, and hence the SER is expected to diverge from the optimum. Based on the assumption that $\theta$ and $\theta_{\mathrm{r}}$ are independent, the Gauss-Chebyshev quadrature integration rule can used as shown in Appendix I to derive an approximate solution, which is given by \begin{equation} \mathcal{I}_{\theta}=\frac{1}{L}\sum\limits_{l=1}^{L}\exp\left[ \left( \bar{K}\cos\left( \phi\right) +\tfrac{\cos\left( \theta_{\text{r}}\right) }{\sigma_{n}^{2}}\alpha s_{m}\left\vert r\right\vert \right) \cos\left( \varphi+\pi\tfrac{2l-1}{2L}\right) +\left( \bar{K}\sin\left( \phi\right) +\tfrac{\sin\left( \theta_{\text{r}}\right) }{\sigma_{n}^{2}}\alpha s_{m}\left\vert r\right\vert \right) \sin\left( \varphi+\pi\tfrac{2l-1}% {2L}\right) \right] \label{Gauss-Cheb}% \end{equation} where $\bar{K}=2\sqrt{K\left( K+1\right) }$, $L$ is the quadrature order, and \[ \varphi=\tan^{-1}\left( \frac{\bar{K}\sin\left( \phi\right) +\frac {1}{\sigma_{n}^{2}}\sin\left( \theta_{\text{r}}\right) \alpha s_{m}% \left\vert r\right\vert }{\bar{K}\cos\left( \phi\right) +\frac{1}{\sigma _{n}^{2}}\cos\left( \theta_{\text{r}}\right) \alpha s_{m}\left\vert r\right\vert }\right) . \] Therefore, after applying the $\ln\left( \cdot\right) $ function and dropping the common and constant terms, the optimum AC detector reduces to% \begin{equation} \hat{d}=\arg\min_{\tilde{s}_{m}\in\mathbb{S}}\text{ }\sum\limits_{i=1}% ^{N}\frac{\alpha_{i}^{2}\tilde{s}_{m}^{2}}{2\sigma_{n}^{2}}-\ln\tilde {\mathcal{I}}_{\theta_{i}}\label{E-ACD-Opt-00}% \end{equation} where $\tilde{\mathcal{I}}_{\theta_{i}}=\mathcal{I}_{\theta_{i}}% |_{s_{m}\rightarrow\tilde{s}_{m}}$. As can be noted from (\ref{E-ACD-Opt-00}), the optimum AC detector has very high computational complexity induced by $\mathcal{I}_{\theta_{i}}$, which makes it prohibitively expensive to implement. Moreover, the detector requires the knowledge of the noise variance $\sigma_{n}^{2}$ and the Rician fading parameter $K$. The received signal phase can be computed directly from the received signal, $\theta_{\text{r}% _{i}}\triangleq\tan^{-1}\left( r_{i,\Im}/r_{i,\Re}\right) .$ \subsubsection{Suboptimum AC Detector} As can be noted from (\ref{I_theta}) in Appendix I, $B$ and $D$ dominates $g\left( \theta\right) $ at high SNRs, i.e., $B\gg A\cos\left( \phi\right) $ and $D\gg C$. Thus, substituting $A=C=0$ in (\ref{I_theta}) yields% \begin{align} \mathcal{I}_{\theta} & \approx\frac{1}{2\pi}\int_{-\pi}^{\pi}\exp\left( B\alpha s_{m}\left\vert r\right\vert \cos\left( \theta\right) +D\alpha s_{m}\left\vert r\right\vert \sin\left( \theta\right) \right) d\theta\nonumber\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}\exp\left( \frac{\alpha s_{m}\left\vert r\right\vert }{\sigma_{n}^{2}}\cos\left( \theta_{\text{r}}\right) \cos\left( \theta\right) +\frac{\alpha_{i}s_{m}\left\vert r\right\vert }{\sigma_{n}^{2}}\sin\left( \theta_{\text{r}}\right) \sin\left( \theta\right) \right) d\theta\nonumber\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}\exp\left( \frac{\alpha s_{m}\left\vert r\right\vert }{\sigma_{n}^{2}}\left( \cos\left( \theta_{\text{r}}\right) \cos\left( \theta\right) +\sin\left( \theta_{\text{r}}\right) \sin\left( \theta\right) \right) \right) d\theta\nonumber\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}\exp\left( \frac{\alpha s_{m}\left\vert r\right\vert }{\sigma_{n}^{2}}\cos\left( \theta-\theta_{\text{r}}\right) \right) d\theta\nonumber\\ & =\frac{1}{\pi}\int_{0}^{\pi}\exp\left( \frac{\alpha s_{m}\left\vert r\right\vert }{\sigma_{n}^{2}}\cos\left( \theta\right) \right) d\theta\nonumber\\ & =I_{0}\left( \frac{\alpha s_{m}\left\vert r\right\vert }{\sigma_{n}^{2}% }\right) . \end{align} It is worth noting that $\theta_{\text{r}}$\ does not affect the result of the integral because it is only a phase shift. Therefore, the AC detector can be expressed as% \begin{equation} \hat{d}=\arg\min_{\tilde{s}_{m}\in\mathbb{S}}\text{ }\sum\limits_{i=1}% ^{N}\frac{\alpha_{i}^{2}\tilde{s}_{m}^{2}}{2\sigma_{n}^{2}}-\ln\left[ I_{0}\left( \frac{\alpha_{i}\tilde{s}_{m}\left\vert r_{i}\right\vert }% {\sigma_{n}^{2}}\right) \right] .\label{E-ACD-subopt-00}% \end{equation} \bigskip The suboptimum AC detector described in (\ref{E-ACD-subopt-00}) is similar to the optimum AC detector derived in \cite{Dweik}\ for Rayleigh fading channels. Although this detector does not require knowledge of the statistical channel information, it requires computing the Bessel function, which incurs high complexity. Another suboptimal detector can be obtained by directly substituting $A=0$ and $C=0$ in (\ref{Gauss-Cheb}), therefore $\mathcal{I}_{\theta}$ can be approximated as% \begin{align} \mathcal{I}_{\theta} & \approx\frac{1}{L}\sum\limits_{l=1}^{L}\exp\left[ \frac{\alpha s_{m}\left\vert r\right\vert }{\sigma_{n}^{2}}\left( \cos\left( \theta_{\text{r}}\right) \cos\left( \varphi+\pi\tfrac{2l-1}{2L}\right) +\sin\left( \theta_{\text{r}}\right) \sin\left( \varphi+\pi\tfrac{2l-1}% {2L}\right) \right) \right] \nonumber\\ & =\frac{1}{L}\sum\limits_{l=1}^{L}\exp\left[ \frac{\alpha s_{m}\left\vert r\right\vert }{\sigma_{n}^{2}}\left( \cos\left( -\pi\tfrac{2l-1}{2L}\right) \right) \right] \nonumber\\ & =\frac{1}{L}\sum\limits_{l=1}^{L}\exp\left[ \frac{\alpha s_{m}\left\vert r\right\vert }{\sigma_{n}^{2}}\cos\left( \pi\tfrac{2l-1}{2L}\right) \right] . \end{align} Interestingly, this approach does not contain the Bessel function. \subsubsection{Heuristic ACD (HACD)} Although the two suboptimum AC detectors derived above\ are less complex than the optimum AC detector, evaluating the Bessel and exponential functions is necessary to calculate the decision metric. Therefore, the heuristic detector presented in \cite{Dweik} is considered to reduce the complexity even further. The heuristic detector is given by% \begin{equation} \hat{d}=\arg\min_{\tilde{s}_{m}\in\mathbb{S}}\text{ }\left[ \zeta-\tilde {s}_{m}^{2}\right] ^{2},\label{HeD}% \end{equation} where $\zeta$ is the combined signal from the $N$ antennas, which is given by% \begin{equation} \zeta=\frac{\left\vert r\right\vert _{\Sigma}^{2}}{\sum_{i=1}^{N}\alpha _{i}^{2}}, \end{equation} where $\left\vert r\right\vert _{\Sigma}^{2}=\sum_{i=1}^{N}\left\vert r_{i}\right\vert ^{2}$. For SER analysis, it is more convenient to express (\ref{HeD}) as \begin{equation} \hat{d}=\left\{ \begin{array} [c]{cc}% s_{0}\text{,} & \ \ \ 0<\zeta<\eta_{0,1}\\ s_{1}\text{,} & \eta_{0,1}<\zeta<\eta_{1,2}\\ \vdots & \vdots\\ s_{M-1}\text{,} & \eta_{M-1,M-2}<\zeta<\infty \end{array} \right. ,\label{E-d-hat}% \end{equation} where $\eta_{i,j}$'s are the detection thresholds and given by% \begin{equation} \eta_{i,j}=\frac{s_{i}^{2}+s_{j}^{2}}{2}.\label{E-Thresh_Heu}% \end{equation} In the following two sections, two different approaches are presented to evaluate the SER analytically. \section{Approach I: SER Analysis of the Heuristic AC Detector} Based on (\ref{E-d-hat}), the SER $P_{e}$ for the heuristic AC detector can be written as,% \begin{align} P_{e} & =1-\frac{1}{M}\left( \int_{0}^{\eta_{0,1}}f\left( \zeta |E_{0}\right) d\zeta+\int_{\eta_{M-2,M-1}}^{\infty}f\left( \zeta |E_{M-1}\right) d\zeta+\sum_{m=1}^{M-2}\int_{\eta_{m,m-1}}^{\eta_{m,m+1}% }f\left( \zeta|E_{m}\right) d\zeta\right) \nonumber\\ & =1-\frac{1}{M}\left( F_{\zeta}\left( \eta_{0,1}|E_{0}\right) +1-F_{\zeta }\left( \eta_{M-2,M-1}|E_{M-1}\right) +\sum_{m=1}^{M-2}F_{\zeta}\left( \eta_{m,m+1}|E_{m}\right) -F_{\zeta}\left( \eta_{m,m-1}|E_{m}\right) \right) \end{align} where $F_{\zeta}$ is the cumulative distribution function (CDF), which typically can be evaluated as \begin{equation} F_{\zeta}\left( \zeta|E_{m}\right) =\int_{0}^{\zeta}\int_{0}^{\infty}% \cdots\int_{0}^{\infty}f\left( \zeta|\mathbf{\alpha},E_{m}\right) f\left( \mathbf{\alpha}\right) d\mathbf{\alpha}\text{ }d\zeta\text{.}\label{E-CDF-00}% \end{equation} However, \textup{the} $N$-fold integral in (\ref{E-CDF-00}) can be substantially simplified by noting that $f\left( \zeta|\mathbf{\alpha}% ,E_{m}\right) $ is actually a function of $\sum_{i=1}^{N}\alpha_{i}% ^{2}\triangleq x.$ Consequently, the integral reduces to \begin{equation} F_{\zeta}\left( \zeta|E_{m}\right) =\int_{0}^{\zeta}\int_{0}^{\infty }f\left( \zeta|x,E_{m}\right) f\left( x\right) dx\text{ }d\zeta \text{,}\label{E-CDF-01}% \end{equation} The PDF of $x$ can be derived by noting that $h_{i}\sim\mathcal{CN}\left( m_{h},2\sigma_{h}^{2}\right) $, thus $f\left( x\right) $ is noncentral Chi-squared% \begin{equation} f\left( x\right) =\frac{\exp\left( -\frac{\lambda}{2}\right) }{2\sigma _{h}^{2}}\exp\left( -\frac{x}{2\sigma_{h}^{2}}\right) \left( \frac {x}{\lambda\sigma_{h}^{2}}\right) ^{0.5\left( N-1\right) }I_{N-1}\left( \sqrt{\frac{\lambda}{\sigma_{h}^{2}}x}\right) ,\label{PDF-x}% \end{equation} where% \begin{align} \lambda & =\sum_{i=1}^{N}\mu_{h_{I}}^{2}+\mu_{h_{Q}}^{2}\nonumber\\ & =\sum_{i=1}^{N}\frac{\mu_{h}^{2}\cos^{2}\phi}{\sigma_{h}^{2}}+\frac{\mu _{h}^{2}\sin^{2}\phi}{\sigma_{h}^{2}}\nonumber\\ & =2KN. \end{align} and the complete derivation can be found in Appendix II. To derive $f\left( \zeta|x,E_{m}\right) $ of the Heuristic detector (\ref{HeD}), the decision variable can be written as% \begin{align} \zeta & =\frac{\left\vert r\right\vert _{\Sigma}^{2}}{\sum_{i=1}^{N}\alpha _{i}^{2}}\nonumber\\ & =\frac{1}{\sum_{i=1}^{N}\alpha_{i}^{2}}\sum_{i=1}^{N}\left\vert r_{i}\right\vert ^{2}\nonumber\\ & =\frac{1}{\sum_{i=1}^{N}\alpha_{i}^{2}}\underset{r_{T}}{\underbrace{\sum _{i=1}^{N}\left\vert r_{i,\Re}+jr_{i,\Im}\right\vert ^{2}}},\label{He-D}% \end{align} where $r_{i,\Re}=\alpha_{i}s_{m}\cos\left( \theta_{i}\right) +n_{i,\Re}$ and $r_{i,\Im}=\alpha_{i}s_{m}\sin\left( \theta_{i}\right) +n_{i,\Im}$. By noting that $r_{i,\Re}$ and $r_{i,\Im}$ are mutually independent $\forall i$, and the PDF for each of which is conditionally Gaussian, i.e., $f\left( r_{i,\Re}|\alpha_{i},s_{m},\cos\left( \theta_{i}\right) \right) \sim\mathcal{N}\left( \alpha_{i}s_{m}\cos\left( \theta_{i}\right) ,\sigma_{n}^{2}\right) $ and $f\left( r_{i,\Im}|\alpha_{i},s_{m},\sin\left( \theta_{i}\right) \right) \sim\mathcal{N}\left( \alpha_{i}s_{m}\sin\left( \theta_{i}\right) ,\sigma_{n}^{2}\right) $. Therefore, $f\left( \left\vert r_{i}\right\vert ^{2}|\alpha_{i},s_{m},\theta_{i}\right) $is conditionally noncentral Chi-squared with two degrees of freedom and noncentrality factor $\lambda_{i}$, i.e., $f\left( \left\vert r_{i}\right\vert ^{2}|\alpha _{i},s_{m},\theta_{i}\right) \sim\chi^{2}\left( 2,\lambda_{i}\right) $, where \begin{align} \lambda_{i} & =\left[ \alpha_{i}s_{m}\cos\left( \theta_{i}\right) \right] ^{2}+\left[ \alpha_{i}s_{m}\cos\left( \theta_{i}\right) \right] ^{2}\nonumber\\ & =\alpha_{i}^{2}s_{m}^{2}. \end{align} Therefore, $f\left( \left\vert r_{i}\right\vert ^{2}|\alpha_{i},s_{m}% ,\theta_{i}\right) =f\left( \left\vert r_{i}\right\vert ^{2}|\alpha _{i},s_{m}\right) \sim\chi^{2}\left( 2,\lambda_{i}\right) $. Therefore, $f\left( \zeta|x\right) $ can be written as% \begin{equation} f\left( \zeta|x\mathbf{,}E_{m}\right) =\frac{x}{2\sigma_{n}^{2}}\left( \frac{\zeta}{E_{m}}\right) ^{0.5\left( N-1\right) }\exp\left( -x\frac{\zeta+E_{m}}{2\sigma_{n}^{2}}\right) I_{N-1}\left( \frac{x}% {\sigma_{n}^{2}}\sqrt{E_{m}\zeta}\right) \text{, }m>0.\label{f-zeta-em}% \end{equation} For the case of $m=0$, $r_{i,\Re}=n_{i,\Re}\sim\mathcal{N}\left( 0,\sigma _{n}^{2}\right) $ and $r_{i,\Im}=n_{i,\Im}\sim\mathcal{N}\left( 0,\sigma _{n}^{2}\right) $, thus, $f\left( \left\vert r_{i}\right\vert ^{2}% |\alpha_{i},d_{m},\theta_{i}\right) =f\left( \left\vert r_{i}\right\vert ^{2}\right) $\ which has exponential PDF with parameter $\beta=2\sigma _{n}^{2}$. Consequently, the PDF of the sum of $N$ iid exponential random variables is Erlang distribution, i.e.,% \begin{equation} f\left( \zeta|x\right) =\frac{\lambda_{0}^{N}}{\left( N-1\right) !}% x^{N}\text{ }\zeta^{N-1}\exp\left( -\lambda_{0}\zeta x\right) \text{, }m=0. \end{equation} where $\lambda_{0}=\frac{1}{2\sigma_{n}^{2}}.$ \subsection{Evaluating $F_{\zeta}\left( \zeta|E_{m}\right) $, $m>0$} To simplify the analysis, we replace the Bessel function in (\ref{PDF-x}) by its series expansion \cite{Table}, which gives% \begin{equation} I_{N-1}\left( \sqrt{\frac{\lambda}{\sigma_{h}^{2}}x}\right) =\sum _{l=0}^{\infty}\frac{1}{l!\Gamma\left( l+N\right) }\left( \frac{\lambda }{4\sigma_{h}^{2}}\right) ^{\frac{2l+N-1}{2}}\left( x\right) ^{\frac {2l+N-1}{2}}.\label{apprx1}% \end{equation} Although the same series expansion can be used to represent the Bessel function in (\ref{f-zeta-em}), the argument of the Bessel function $\sqrt{\frac{E_{m}\text{ }\zeta}{\sigma_{n}^{2}}}x\gg1$ for most typical values of $\sigma_{n}^{2}$. Therefore, the following approximation can be used \cite{Stegun},% \begin{equation} I_{N-1}\left( \frac{x}{\sigma_{n}^{2}}\sqrt{E_{m}\zeta}\right) \simeq \frac{\exp\left( \tfrac{x\sqrt{E_{m}\text{ }\zeta}}{\sigma_{n}^{2}}\right) }{\sqrt[4]{E_{m}\text{ }\zeta}\sqrt{\frac{2\pi}{\sigma_{n}^{2}}x}}\left( 1+\sum_{q=1}^{Q}\left( \frac{\left( -1\right) ^{q}}{x^{q}}\frac{\prod _{k=1}^{q}\left[ 4\left( N-1\right) ^{2}-\left( 2k-1\right) ^{2}\right] }{q!8^{q}\left( \frac{\sqrt{E_{m}\zeta}}{\sigma_{n}^{2}}\right) ^{q}% }\right) \right) .\label{apprx2}% \end{equation} Using (\ref{apprx1}) and (\ref{apprx2}), and noting that \begin{equation} f\left( \zeta|E_{m}\right) =\int_{0}^{\infty}f\left( \zeta|x,E_{m}\right) \text{ }f\left( x\right) dx, \end{equation} the PDF $f\left( \zeta|E_{m}\right) $ after evaluating the integral, as depicted in Appendix II, is given by% \begin{equation} f\left( \zeta|E_{m}\right) =C\text{ }\left( \sum_{l=0}^{\infty}A_{l}% \zeta\text{ }^{0.5N-0.75}\text{ }C_{\zeta}^{-\left( l+N+0.5\right) }% +\sum_{q=1}^{Q}\sum_{l=0}^{L}B_{q}^{l}\text{ }\zeta^{0.5N-0.5q-0.75}\text{ }C_{\zeta}^{-\left( N-q+l+0.5\right) }\right) \text{, }m>0 \end{equation} \bigskip where the variables $C$, $C_{\zeta}$, $A_{l}$ and $B_{q}^{l}$ are given by% \begin{equation} C_{\zeta}\triangleq\frac{\zeta+E_{m}}{2\sigma_{n}^{2}}+\frac{\sigma_{h}^{2}% }{2}-\frac{\sqrt{E_{m}\text{ }\zeta}}{\sigma_{n}^{2}}% \end{equation}% \begin{equation} C=\frac{\exp\left( -\frac{\lambda}{2}\right) }{4\sigma_{n}^{2}\sigma_{h}% ^{2}}\left( \frac{1}{E_{m}\sigma_{h}^{2}\lambda}\right) ^{0.5\left( N-1\right) }\frac{1}{\sqrt{2\pi\frac{\sqrt{E_{m}}}{\sigma_{n}^{2}}}}% \end{equation}% \begin{equation} A_{l}=\frac{\Gamma\left( l+N+0.5\right) }{l!\Gamma\left( l+N\right) }\left( \frac{\lambda}{4\sigma_{h}^{2}}\right) ^{\frac{2l+N-1}{2}}% \end{equation}% \begin{equation} B_{q}^{l}=\frac{\Gamma\left( N-q+l+0.5\right) }{l!\Gamma\left( l+N\right) }\left( \frac{\lambda}{4\sigma_{h}^{2}}\right) ^{\frac{2l+N-1}{2}}\left( \left( -1\right) ^{q}\frac{\prod_{k=1}^{q}\left[ 4\left( N-1\right) ^{2}-\left( 2k-1\right) ^{2}\right] }{q!8^{q}\left( \frac{\sqrt{E_{m}}% }{\sigma_{n}^{2}}\right) ^{q}}\right) , \end{equation} where $\Gamma\left( \cdot\right) $ is the Gamma function \cite{Table}. Finally, the CDF $F_{\zeta}\left( \zeta|E_{m}\right) $, $m>0$ can be evaluated as% \begin{align} F_{\zeta}\left( \zeta|E_{m}\right) & =\int_{0}^{\zeta}f\left( \acute {\zeta}|E_{m}\right) d\acute{\zeta}\nonumber\\ & =C\left( \sum_{l=0}^{\infty}A_{l}\mathcal{I}_{A}^{l}+\sum_{q=1}^{Q}% \sum_{l=0}^{\infty}B_{m}^{l}\mathcal{I}_{B}^{q,l}\right) \text{, }m>0, \end{align} where $\mathcal{I}_{A}^{l}$\ and $\mathcal{I}_{B}^{q,l}$\ are given by% \begin{align} \mathcal{I}_{A}^{l} & =2\int_{0}^{\sqrt{\zeta}}y^{2\left( 0.5N-0.75\right) +1}\left( \frac{y^{2}}{2\sigma_{n}^{2}}-\frac{\sqrt{E_{m}}}{\sigma_{n}^{2}% }y+c\right) ^{-\left( l+N+0.5\right) }dy\label{intga}\\ \mathcal{I}_{B}^{q,l} & =2\int_{0}^{\sqrt{\zeta}}y^{2\left( 0.5N-0.5q-0.75\right) +1}\left( \frac{y^{2}}{2\sigma_{n}^{2}}-\frac {\sqrt{E_{m}}}{\sigma_{n}^{2}}y+c\right) ^{-\left( N-q+l+0.5\right) }dy,\label{intgb}% \end{align} where $c=\frac{1}{2\sigma_{h}^{2}}+\frac{E_{m}}{2\sigma_{n}^{2}}$. \subsection{Evaluating $F_{\zeta}\left( \zeta|E_{m}\right) $, $m=0$} Averaging $\textup{f}\left( \zeta|x,E_{m}\right) $ over $\textup{f}\left( x\right) $\ using series expansion of the Bessel function using (\ref{apprx1})\ yields% \begin{align} f\left( \zeta|E_{m}\right) & =\int_{0}^{\infty}\textup{f}\left( \zeta|x,E_{m}\right) \text{ }f\left( x\right) dx\nonumber\\ & =C_{0}\text{ }\zeta^{N-1}\sum_{l=0}^{\infty}\frac{\Gamma\left( 2N+l\right) }{l!\Gamma\left( l+N\right) }\left( \frac{\lambda_{0}}{4\sigma_{h}^{2}% }\right) ^{\frac{2l+N-1}{2}}\left( \lambda_{0}\zeta+\frac{1}{2\sigma_{h}% ^{2}}\right) ^{-\left( 2N+l\right) }\text{, }m=0 \end{align} where $C_{0}$ is given by% \begin{equation} C_{0}=\frac{\lambda_{0}^{N}}{\left( N-1\right) !}\frac{1}{2\sigma_{h}^{2}% }\left( \frac{1}{\lambda_{0}\sigma_{h}^{2}}\right) ^{0.5\left( N-1\right) }\exp\left( -\frac{\lambda_{0}}{2}\right) . \end{equation} The complete derivation of $f\left( \zeta|E_{m}\right) $\ is given in Appendix III. Finally, the CDF of $\zeta$ can be evaluated as% \begin{align} F_{\zeta}\left( \zeta|E_{m}\right) & =\int_{0}^{\zeta}f\left( \acute {\zeta}|E_{m}\right) d\acute{\zeta}\nonumber\\ & =C_{0}\sum_{l=0}^{\infty}\frac{\Gamma\left( 2N+l\right) }{l!\Gamma\left( l+N\right) }\left( \frac{\lambda_{0}}{4\sigma_{h}^{2}}\right) ^{\frac{2l+N-1}{2}}\int_{0}^{\zeta}\acute{\zeta}^{N-1}\left( \lambda _{0}\text{ }\acute{\zeta}+\frac{1}{2\sigma_{h}^{2}}\right) ^{-\left( 2N+l\right) }d\acute{\zeta}\text{, }m=0.\label{intg0}% \end{align} It should be noticed that integrals of the form given in (\ref{intga}), (\ref{intgb}) and (\ref{intg0}) can be solved in recursive manner according to \cite[2.17, page 78]{Table}. \section{Approach II: Symbol Error Rate Analysis} In the first approach, we used the conditional PDF $f\left( \zeta |x,E_{m}\right) $ to derive the unconditional PDF $f\left( \zeta |E_{m}\right) $, which was used to derive the unconditional CDF. In this part, we derive the conditional CDF $F_{\zeta}\left( \zeta|x,E_{m}\right) $ from the conditional PDF $f\left( \zeta|x,E_{m}\right) $, and then we derive the unconditional CDF $F_{\zeta}\left( \zeta|E_{m}\right) .$ By noting that $\zeta=\frac{\left\vert r\right\vert _{\Sigma}^{2}}{x}$, then the conditional PDF $f\left( \zeta|x,E_{m}\right) $ follows an noncentral Chi-squared with $2N$ degrees of freedom, noncentrality parameter $E_{m}$, and the variance of Gaussian components is $\frac{\sigma_{n}^{2}}{x}$, i.e., $f\left( \zeta|x,E_{m}\right) \sim\chi^{2}\left( 2N,s_{m}^{2}\right) =\chi^{2}\left( 2N,E_{m}\right) $. Thus, $F_{\zeta}\left( \zeta |x,E_{m}\right) $ \cite{porakis} can be defined as% \begin{equation} F_{\zeta}\left( \zeta|x,E_{m}\right) =1-{Q}_{N}\left( \sqrt{\frac{xE_{m}% }{\sigma_{n}^{2}}},\sqrt{\frac{x\zeta}{\sigma_{n}^{2}}}\right) .\label{E-CDF-MQ-00}% \end{equation} The CDF of $\zeta$ given $E_{m}$ can be calculated by averaging the conditional CDF $F\left( \zeta|x,E_{m}\right) $ over the distribution of $x$ which is given by \begin{equation} F\left( \zeta|E_{m}\right) =\int_{0}^{\infty}F\left( \zeta|x,E_{m}\right) f(x)dx, \end{equation} where $f(x)$ is given in (\ref{PDF-x}). \subsection{The CDF $F_{\zeta}(\zeta|E_{m})$ for $\zeta<E_{m}$} The series representation of the generalized Marcum Q-function is given in \cite{andras} as \begin{equation} Q_{v}(a,b)=1-\sum_{n=0}^{\infty}(-1)^{n}\exp\left( -\frac{a^{2}}{2}\right) \frac{L_{n}^{(v-1)}\left( \frac{a^{2}}{2}\right) }{\Gamma(v+n+1)}\left( \frac{b^{2}}{2}\right) ^{n+v},\;\;\left\{ a,v\right\} >0\text{ and }b\geq0 \end{equation} where $L_{n}^{(\alpha)}(x)=\sum_{k=0}^{n}\frac{\Gamma(n+\alpha+1)}% {\Gamma(k+\alpha+1)\Gamma(n-k+1)}\frac{(-x)^{k}}{k!}$ is the generalized Laguerre polynomial of degree $n$ and order $\alpha$. Using this formula, the conditional CDF $F\left( \zeta|x,E_{m}\right) $ can be rewritten as% \begin{equation} F_{\zeta}\left( \zeta|x,E_{m}\right) =\sum_{n=0}^{\infty}\sum_{k=0}% ^{n}{\binom{N+n-1}{N+k-1}}\frac{(-1)^{n+k}}{(N+n)!k!}\left( \frac{\zeta }{2\sigma_{n}^{2}}\right) ^{N+n}\left( \frac{E_{m}}{2\sigma_{n}^{2}}\right) ^{k}x^{N+n+k}\exp\left( -\frac{E_{m}}{2\sigma_{n}^{2}}x\right) . \end{equation} Then, the CDF $F_{\zeta}(\zeta|E_{m})$ can be computed as% \begin{equation} F_{\zeta}(\zeta|E_{m})=\sum_{n=0}^{\infty}\sum_{k=0}^{n}{\binom{N+n-1}{N+k-1}% }\frac{(-1)^{n+k}}{(N+n)!k!}\left( \frac{\zeta}{2\sigma_{n}^{2}}\right) ^{N+n}\left( \frac{E_{m}}{2\sigma_{n}^{2}}\right) ^{k}% \underset{A}{\underbrace{\int_{0}^{\infty}x^{N+n+k}e^{-\frac{E_{m}}% {2\sigma_{n}^{2}}x}f(x)dx}}.\label{cdf_wA}% \end{equation} The integration $A$ can be solved by\ \cite[Eq. 2.15.5]{prudnikov}% \begin{align} A & =2\bar{K}\text{e}^{-NK}\left( \frac{\bar{K}}{NK}\right) ^{\frac{N-1}% {2}}\int_{0}^{\infty}\alpha^{2(N+n+k)+N}\exp\left( -\left( \frac{E_{m}% }{2\sigma_{n}^{2}}+\bar{K}\right) \alpha^{2}\right) I_{N-1}\left( 2\sqrt{NK\bar{K}}\alpha\right) d\alpha\nonumber\\ & =\text{e}^{-NK}\bar{K}^{N}\frac{\Gamma(n+k+2N)}{\Gamma(N)}\left( \frac{E_{m}}{2\sigma_{n}^{2}}+\bar{K}\right) ^{-(n+k+2N)}\text{ }{_{1}F_{1}% }\left( n+k+2N;N;\frac{NK(1+K)}{1+K+\frac{\Omega}{2\sigma_{n}^{2}}E_{m}% }\right) , \end{align} which can be simplified to% \begin{align} A & =\frac{e^{-\frac{\lambda}{2}}}{\sigma_{h}^{2}}\left( \frac{1}% {\lambda\sigma_{h}^{2}}\right) ^{\frac{N-1}{2}}\int_{0}^{\infty}% \alpha^{2(N+n+k)+N}\exp\left( -\left( \frac{E_{m}}{2\sigma_{n}^{2}}+\frac {1}{2\sigma_{h}^{2}}\right) \alpha^{2}\right) I_{N-1}\left( \sqrt {\frac{\lambda}{\sigma_{h}^{2}}}\alpha\right) d\alpha\nonumber\\ & =e^{-\frac{\lambda}{2}}\left( \frac{1}{2\sigma_{h}^{2}}\right) ^{N}% \frac{\Gamma(n+k+2N)}{\Gamma(N)}\left( \frac{E_{m}}{2\sigma_{n}^{2}}+\frac {1}{2\sigma_{h}^{2}}\right) ^{-(n+k+2N)}\text{ }{_{1}F_{1}}\left( n+k+2N;N;\frac{\lambda}{2\left( 1+\frac{\sigma_{h}^{2}}{\sigma_{n}^{2}}% E_{m}\right) }\right) , \end{align} where $\bar{K}=\frac{1+K}{\Omega}$ and ${_{1}F_{1}}(a;b;z)$ is the confluent hypergeometric function of the first kind. Consequently, by substituting $A$ into (\ref{cdf_wA}) and applying some manipulations, the CDF can be expressed as \begin{multline} F_{\zeta}(\zeta|E_{m})=\sum_{n=0}^{\infty}\sum_{k=0}^{n}{\binom{N+n-1}{N+k-1}% }\frac{(-1)^{n+k}(n+k+2N-1)!}{(N-1)!(N+n)!k!}\left( \frac{\zeta}{E_{m}% }\right) ^{n+N}\left( K_{m}\text{e}^{-K}\right) ^{N}\\ \times\frac{\left( \frac{\Omega}{2\sigma_{n}^{2}}\right) ^{n+k+N}}{\left( \frac{\Omega}{2\sigma_{n}^{2}}+K_{m}\right) ^{n+k+2N}}{_{1}F_{1}}\left( n+k+2N;N;\frac{NKK_{m}}{\frac{\Omega}{2\sigma_{n}^{2}}+K_{m}}\right) ,\label{cdf_zeta}% \end{multline} where $K_{m}=\frac{1+K}{E_{m}}$. Note that $\left( \frac{\zeta}{E_{m}% }\right) ^{n}$ in the CDF expression is converged only with $\frac{\zeta }{E_{m}}<1$ when $n$ goes to infinity. Therefore, it will be used to calculate the error probability for $\Pr\left( \zeta\leq\frac{E_{m}+E_{m-1}}{2}\right) $. For high SNR regime, when $\frac{\Omega}{2\sigma_{n}^{2}}\rightarrow\infty$, (\ref{cdf_zeta}) can be expressed as% \[ \lim_{\frac{\Omega}{2\sigma_{n}^{2}}\rightarrow\infty}\left( \frac {\frac{\Omega}{2\sigma_{n}^{2}}}{\frac{\Omega}{2\sigma_{n}^{2}}+K_{m}}\right) ^{n+k+N}{_{1}F_{1}}\left( n+k+2N;N;\frac{NKK_{m}}{\frac{\Omega}{2\sigma _{n}^{2}}+K_{m}}\right) =1. \] Then, (\ref{cdf_zeta}) can be simplified as \begin{gather} F^{\infty}(\zeta|E_{m})=\left( \frac{K_{m}e^{-K}}{\frac{\Omega}{2\sigma _{n}^{2}}+K_{m}}\right) ^{N}\sum_{n=0}^{\infty}\left( \frac{\zeta}{E_{m}% }\right) ^{n+N}\sum_{k=0}^{n}{\binom{N+n-1}{N+k-1}}\frac{(-1)^{n+k}% (n+k+2N-1)!}{(N-1)!(N+n)!k!}\nonumber\\ \overset{\text{(a)}}{=}\left( \frac{K_{m}e^{-K}}{\frac{\Omega}{2\sigma _{n}^{2}}+K_{m}}\right) ^{N}\sum_{n=0}^{\infty}\left( \frac{\zeta}{E_{m}% }\right) ^{n+N}\frac{(2N+n-1)!}{n!N!(N-1)!}\nonumber\\ \overset{\text{(b)}}{=}{\binom{2N-1}{N}}\left( \frac{K_{m}e^{-K}}% {\frac{\Omega}{2\sigma_{n}^{2}}+K_{m}}\frac{\frac{\zeta}{E_{m}}}{\left( \frac{\zeta}{E_{m}}-1\right) ^{2}}\right) ^{N},\;(\zeta<E_{m})\label{asymA}% \end{gather} where (a) comes from \[ \sum_{k=0}^{n}(-1)^{n+k}{\binom{N+n-1}{N+k-1}}\frac{(n+k+2N-1)!}{k!}% =\frac{(n+2N-1)!(n+N)!}{n!N!}% \] and (b) comes from \[ \sum_{n=0}^{\infty}a^{n}\frac{(n+2N-1)!}{n!}=(a-1)^{-2N}(2N-1)!\text{, }a<1. \] \subsection{The CDF $F_{\zeta}(\zeta|E_{m})$ for $\zeta>E_{m}$} To evaluate the required CDF, the following relation between $Q_{m}(a,b)$ and $Q_{m}(b,a)$ is applied.% \begin{equation} Q_{m}(a,b)+Q_{m}(b,a)=1+e^{-\frac{a^{2}+b^{2}}{2}}\sum_{k=1-m}^{m-1}\left( \frac{a}{b}\right) ^{k}I_{k}(ab). \end{equation} Using this transformation, the CDF $F_{\zeta}(\zeta|x,E_{m})$ for $\zeta >E_{m}$ can be now rewritten as% \begin{equation} F_{\zeta}(\zeta|x,E_{m})={Q}_{N}\left( \sqrt{\frac{x\zeta}{\sigma_{n}^{2}}% },\sqrt{\frac{xE_{m}}{\sigma_{n}^{2}}}\right) -\exp\left( -\frac{\zeta +E_{m}}{2\sigma_{n}^{2}}x\right) \sum_{k=1-N}^{N-1}\left( \sqrt{\frac{E_{m}% }{\zeta}}\right) ^{k}I_{k}\left( \frac{\sqrt{E_{m}\zeta}}{\sigma_{n}^{2}% }x\right) . \end{equation} The CDF of $F_{\zeta}(\zeta|E_{m})$ can be calculated as% \begin{equation} F_{\zeta}(\zeta|E_{m})=\underset{B}{\underbrace{\int_{0}^{\infty}{Q}% _{m}\left( \sqrt{\tfrac{x\zeta}{\sigma_{n}^{2}}},\sqrt{\tfrac{xE_{m}}% {\sigma_{n}^{2}}}\right) f(x)dx}}-\underset{\acute{C}}{\underbrace{\sum _{k=1-N}^{N-1}\left( \sqrt{\tfrac{E_{m}}{\zeta}}\right) ^{k}\int_{0}% ^{\infty}\exp\left( -\tfrac{\zeta+E_{m}}{2\sigma_{n}^{2}}x\right) I_{k}\left( \tfrac{\sqrt{E_{m}\zeta}}{\sigma_{n}^{2}}x\right) f(x)dx}% },\label{E-CDF-Kihong-00}% \end{equation} where integrals $B$ and $\acute{C}$ can be evaluated as shown below in (\ref{cdf_B}) and (\ref{cdf_C}), respectively. Integration in $B$ can be calculated similarly as (\ref{cdf_zeta}) which is given by% \begin{multline} B=1-\sum_{n=0}^{\infty}\sum_{k=0}^{n}{\binom{N+n-1}{N+k-1}}\frac {(-1)^{n+k}(n+k+2N-1)!}{(N-1)!(N+n)!k!}\left( \frac{E_{m}}{\zeta}\right) ^{n+N}\left( K_{\zeta}\text{\textrm{e}}^{-K}\right) ^{N}\frac{\left( \frac{\Omega}{2\sigma_{n}^{2}}\right) ^{n+k+N}}{\left( \frac{\Omega}% {2\sigma_{n}^{2}}+K_{\zeta}\right) ^{n+k+2N}}\\ \times{_{1}F_{1}}\left( n+k+2N;N;\frac{NKK_{\zeta}}{\frac{\Omega}{2\sigma _{n}^{2}}+K_{\zeta}}\right) ,\label{cdf_B}% \end{multline} where $K_{\zeta}=\frac{1+K}{\zeta}$. Using the series representation of modified Bessel function of the first kind, i.e., \[ I_{v}(z)=\left( \frac{z}{2}\right) ^{v}\sum_{n=0}^{\infty}\frac{\left( z^{2}/4\right) ^{n}}{n!(n+v)!}% \] and noting that $I_{v}(z)=I_{-v}(z)$, the integral $\acute{C}$ can be calculated as% \begin{align} \acute{C} & =\sum_{n=0}^{\infty}\sum_{k=1-N}^{N-1}\left( \frac{E_{m}}{\zeta }\right) ^{k}\frac{\left( \frac{\sqrt{E_{m}\zeta}}{2\sigma_{n}^{2}}\right) ^{2n+|k|}}{n!(n+|k|)!}\int_{0}^{\infty}x^{2n+|k|}\exp\left( -\frac {\zeta+E_{m}}{2\sigma_{n}^{2}}x\right) f(x)dx\nonumber\\ & =\sum_{n=0}^{\infty}\sum_{k=1-N}^{N-1}\left( \frac{E_{m}}{\zeta}\right) ^{k}\frac{\left( \frac{\sqrt{E_{m}\zeta}}{2\sigma_{n}^{2}}\right) ^{2n+|k|}% }{n!(n+|k|)!}\frac{(2n+|k|+N-1)!}{(N-1)!}e^{-NK}\left( \frac{1}{2\sigma _{h}^{2}}\right) ^{N}\nonumber\\ & \times\left( \frac{\zeta+E_{m}}{2\sigma_{n}^{2}}+\frac{1}{2\sigma_{h}^{2}% }\right) ^{-(2n+|k|+N)}{_{1}F_{1}}\left( 2n+|k|+N;N;\frac{\lambda}{2\left( 1+\frac{\sigma_{h}^{2}}{\sigma_{n}^{2}}(E_{m}+\zeta)\right) }\right) \nonumber\\ & =\sum_{n=0}^{\infty}\sum_{k=1-N}^{N-1}\left( \frac{\sqrt{E_{m}\zeta}}% {E_{m}+\zeta}\right) ^{2n+|k|}\left( \frac{E_{m}}{\zeta}\right) ^{k}% \frac{(2n+|k|+N-1)!}{n!(n+|k|)!(N-1)!}\left( e^{-K}K_{m\zeta}\right) ^{N}\frac{\left( \frac{\Omega}{2\sigma_{n}^{2}}\right) ^{2n+|k|}}{\left( \frac{\Omega}{2\sigma_{n}^{2}}+K_{m\zeta}\right) ^{2n+|k|+N}}\nonumber\\ & \times{_{1}F_{1}}\left( 2n+|k|+N;N;\frac{NKK_{m\zeta}}{\frac{\Omega }{2\sigma_{n}^{2}}+K_{m\zeta}}\right) ,\label{cdf_C}% \end{align} where $K_{m\zeta}=\frac{1+K}{E_{m}+\zeta}$.It can be noticed that $\left( \frac{E_{m}}{\zeta}\right) ^{n}$ in this CDF expression is converged only with $\frac{E_{m}}{\zeta}<1$ when $n$ goes to infinity. Therefore, it will be used to calculate the error probability for $\Pr\left( \zeta\geq\frac {E_{m}+E_{m+1}}{2}\right) $. Similar to the case for $\zeta<E_{m}$, $B$ and $C$ for $\zeta>E_{m}$ can be asymptotically represented as \begin{equation} B^{\infty}=1-{\binom{2N-1}{N}}\left( \frac{K_{\zeta}e^{-K}}{\frac{\Omega }{2\sigma_{n}^{2}}+K_{\zeta}}\cdot\frac{\frac{E_{m}}{\zeta}}{\left( \frac{E_{m}}{\zeta}-1\right) ^{2}}\right) ^{N}% \end{equation} and% \begin{align} \acute{C}^{\infty} & =\left( \frac{K_{m\zeta}e^{-K}}{\frac{\Omega}% {2\sigma_{n}^{2}}+K_{m\zeta}}\right) ^{N}\sum_{k=1-N}^{N-1}\left( \frac{\sqrt{E_{m}\zeta}}{E_{m}+\zeta}\right) ^{|k|}\left( \frac{E_{m}}% {\zeta}\right) ^{k}\sum_{n=0}^{\infty}\frac{(2n+|k|+N-1)!}{n!(n+|k|)!(N-1)!}% \left( \frac{\sqrt{E_{m}\zeta}}{E_{m}+\zeta}\right) ^{2n}\nonumber\\ & =\left( \frac{K_{m\zeta}e^{-K}}{\frac{\Omega}{2\sigma_{n}^{2}}+K_{m\zeta}% }\right) ^{N}\sum_{k=1-N}^{N-1}{\binom{N+|k|-1}{N-1}}\left( \frac {\sqrt{E_{m}\zeta}}{E_{m}+\zeta}\right) ^{|k|}\left( \frac{E_{m}}{\zeta }\right) ^{k}\nonumber\\ & \times{_{2}F_{1}}\left( \frac{|k|+N}{2},\frac{|k|+N+1}{2},|k|+1,\frac {4E_{m}\zeta}{(E_{m}+\zeta)^{2}}\right) .\label{asymC}% \end{align} \subsection{The CDF for $E_{m}=0$ when $\zeta>E_{m}$} As the CDF in (\ref{E-CDF-Kihong-00}) is not valid for $E_{0}$, the CDF $F_{\zeta}(\zeta|E_{0})$ is derived separately. Towards this end, the conditional CDF given $x$ can be rewritten as \begin{align} F_{\zeta}\left( \zeta|x,E_{0}\right) & =1-Q_{N}\left( 0,\sqrt{\frac{\zeta x}{\sigma_{n}^{2}}}\right) \nonumber\\ & =1-\frac{\Gamma\left( N,\frac{\zeta x}{2\sigma_{n}^{2}}\right) }% {\Gamma(N)}\nonumber\\ & =1-\exp\left( -\frac{\zeta x}{2\sigma_{n}^{2}}\right) \sum_{k=0}% ^{N-1}\frac{\left( \frac{\zeta x}{2\sigma_{n}^{2}}\right) ^{k}}{k!}. \end{align} The unconditional CDF is computed as \begin{align} F_{\zeta}(\zeta|E_{0}) & =1-\sum_{k=0}^{N-1}\frac{\left( \frac{\zeta }{2\sigma_{n}^{2}}\right) ^{k}}{k!}\int_{0}^{\infty}x^{k}\exp\left( -\frac{\zeta x}{2\sigma_{n}^{2}}\right) f(x)dx\nonumber\\ & =1-\sum_{k=0}^{N-1}{\binom{N+k-1}{k}}\left( K_{\zeta}e^{-K}\right) ^{N}\frac{\left( \frac{\Omega}{2\sigma_{n}^{2}}\right) ^{k}}{\left( \frac{\Omega}{2\sigma_{n}^{2}}+K_{\zeta}\right) ^{k+N}}. \end{align} Asymptotically, this CDF can be represented as \[ F_{\zeta}^{\infty}(\zeta|E_{0})=1-{\binom{2N-1}{N}}\left( \frac{K_{\zeta }e^{-K}}{\frac{\Omega}{2\sigma_{n}^{2}}+K_{\zeta}}\right) ^{N}. \] By substituting the CDFs into average SER, a closed form can be obtained form by summation of infinite series. Moreover, by replacing the obtained CDFs with the asymptotic CDFs, the asymptotic average SER can be obtained in a closed-form. \section{Numerical Results} This section presents analytical and simulation results of MASK modulation with coherent, noncoherent and amplitude-coherent detection in flat Rician fading channels. Moreover, the AC detection is evaluated using the optimum, suboptimum, and the heuristic detectors with single and antennas reception using various modulation orders. The Monte Carlo simulation results are obtained by generating ${10}^{7}$ realizations and the average SNR is defined as $SNR=\frac{\Omega\text{ }\bar{P}_{s}}{2\sigma_{h}^{2}}$, where $\bar{E}% _{s}=\frac{1}{M}\sum_{m=0}^{M-1}E_{m}$ is the average transmission power. In the analytical results, the summations with infinite limits are truncated where 20 terms are used. For the results included in this section $\bar{P}% _{s}$ and $\Omega$ are normalized to $1$. The figures' legends are using the following abbreviations, simulation (Sim.), analytical (Anal.), coherent detector (Coh.), noncoherent detector (NC), near-optimum AC (AC-NO), suboptimum AC (AC-SO), AC heuristic (AC-H), and asymptotic (Asymp.). Fig. \ref{F-PDF-Zeta} shows the analytical and simulated conditional PDF $f\left( \zeta|E_{m}\right) $, for the case of $M=4$, $K=10$ and $SNR=27$ $dB $. As can be noted from the figure, the overlap between the conditional PDF for different $E_{m}$ values at high SNRs is negligible, and thus, the transmitted signal can be recovered reliably by using the suitable threshold as described in (\ref{E-Thresh_Heu}) for the heuristic AC detector. However, because the conditional PDFs are not identical and not equally spaced, the probability of error given $E_{m}$ will not be equal. Consequently, the amplitudes of the transmitted signals can be optimized to minimize the BER. Nevertheless, the improvement that would be gained is generally limited as reported for the Rayleigh fading case \cite{Bariah-TVT}.% \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig1_PDF_Zeta.eps}% \caption{Analytical and simulated conditional PDF $f\left( \zeta |E_{m}\right) $ for $M=4$, $K=10$ and $SNR=27$ dB.}% \label{F-PDF-Zeta}% \end{figure} Figs. \ref{F-Diff-N-Heur-Coh-OOK} and \ref{F-Diff-N-Heur-Coh-4ASK} compare the SER of the coherent and heuristic AC detectors using $M=2$ and $4$, respectively. The figures also show the SER when the number of receiving antennas $N=1$, $2$, and $4.$The Rician factor for both figures is fixed at $K=4$. The results presented in both figures show that the simulated SER perfectly matches the analytical SER for all the considered $M$ and $N$ values. Comparing the coherent and AC heuristic detector for the case of $M=2 $ in Fig. \ref{F-Diff-N-Heur-Coh-OOK} show that the coherent detector outperforms the AC detector by about 3 dB at $P_{e}=5\times10^{-5}$. For the case of $M=4$ shown in Fig. \ref{F-Diff-N-Heur-Coh-4ASK}, the difference between the coherent and AC Heuristic becomes smaller and dependent on $N$. More specifically, the difference becomes about $1.4$, $1.7$ and $2.0$ dB for $N=1$, $2$, and $3$, respectively, at $P_{e}=5\times10^{-5}$.% \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig2_Cod_Heur_diff_N_M2.eps}% \caption{Analytical and simulated SER of the AC heuristic (AC-H) and coherent detectors using $N=1$, $2$, $4$, $M=2$, and $K=4$.}% \label{F-Diff-N-Heur-Coh-OOK}% \end{figure} \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig3_Cod_Heur_diff_N_M4.eps}% \caption{Analytical and simulated SER of the AC heuristic (AC-H) and coherent detectors using $N=1$, $2$, $4$, $M=4$, and $K=4$.}% \label{F-Diff-N-Heur-Coh-4ASK}% \end{figure} Fig. \ref{F_diff_k_n1_heur_m2_m4} illustrates the impact of the Rician factor $K$ on the SER for the cases of $M=2$ and $4$, for a single receiving antenna, $N=1$. The results for $K=0$ are considered as the worst case scenario where the channel becomes Rayleigh. As can be depicted from the figure, the SER of the AC detector may improve substantially for large values of $K$. Nevertheless, the SER improvement gained by increasing $K$ is higher for $M=2$ as compared with the $M=4$ case, which is due to the fact that higher order modulations are more sensitive to AWGN, and thus, the fading will be less dominant as compared to low order modulations. For example, the SER improvement by increasing $K$ from $1$ to $20$ is about $20$ dB for $M=2$, while it is about $18$ dB for $M=4$, at $P_{e}=4\times10^{-4}$.% \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig4_diff_K_N1_Heur_M2_M4.eps}% \caption{Analytical and simulated SER of the AC heuristic (AC-H) detector using $M=2$ and $4$ for different values of $K$, $N=1$.}% \label{F_diff_k_n1_heur_m2_m4}% \end{figure} Figs. \ref{F_her_subopt_opt_acd_diff_n_m2} and \ref{fig6_her_subopt_opt_acd_diff_n_m4}\ compare the SER performance of the near optimum, suboptimum and heuristic AC detectors for $M=2$ and $4$, respectively, and the results are obtained using $K=4$. As shown in both figures, the heuristic detector outperforms the suboptimum for all cases. For $M=2$, the difference is about $3.5$ and $3.7$ dB for $N=1$ and $2$, respectively. For $M=4$, the difference is about $2.5$ and $3$ dB for $N=1$ and $2$, respectively. As expected, the near-optimum detector outperforms the heuristic for $SNR\lesssim21$ dB for $M=2$ and $N=1$, which corresponds the low and moderate SNRs. For $N=2$, the system SNR is generally much smaller that the $N=1$ case, and hence, near-optimum detector outperforms the heuristic. The SER for the $M=4$ case in Fig. \ref{fig6_her_subopt_opt_acd_diff_n_m4} is generally similar to the $M=2$ case, except that the cross-over point is shifted to $SNR\approx29$ dB. Consequently, the heuristic detector offers the best compromise between SER and computational complexity as compared to the suboptimum and near-optimum detectors.% \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig5_Her_SubOpt_Opt_ACD_diff_N_M2.eps}% \caption{SER for of the near optimum (AC-NO), suboptimum (AC-SO), and heuristic AC (AC-H) detectors using $N=1$, $2$, $M=2$, and $K=4$.}% \label{F_her_subopt_opt_acd_diff_n_m2}% \end{figure} \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig6_Her_SubOpt_Opt_ACD_diff_N_M4.eps}% \caption{SER for of the near optimum (AC-NO), suboptimum (AC-SO) and heuristic AC (AC-H) detectors using $N=1$, $2 $, $M=4$, and $K=4$.}% \label{fig6_her_subopt_opt_acd_diff_n_m4}% \end{figure} Fig. \ref{fig7_ncd_heur_n2_m2_m4} presents the system SER using the optimum noncoherent and the heuristic AC detector given that $M=2$ and $4$, $N=1$, and $K=4$. As can be noted from the figure, the noncoherent detector outperforms the heuristic for SNRs less than $11$ and $5$ dB, for $M=2$ and $4$ respectively. Nevertheless, the noncoherent detector SER deteriorates severely for $M>2$ where an error floor is observed at $SER\sim10^{-1}$. Moreover, it is worth noting that the optimum noncoherent detector requires prior knowledge of the channel statistical values.% \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig7_NCD_Heur_N2_M2_M4.eps}% \caption{The SER for the noncoherent (NC) and heuristic (AC-H) detectors using $M=1$ and $2$, $N=1$ and $K=4$.}% \label{fig7_ncd_heur_n2_m2_m4}% \end{figure} Figs. \ref{fig8_phase_noise_m2} and \ref{fig9_phase_noise_m4} show the effect of the phase noise on both the heuristic and coherent detectors for the cases of $M=2$ and $4$, respectively. The parameters for the two figures are $N=1$ and $K=4$ while the phase noise is modeled as a Tikhonov random variable with variance $\sigma_{\phi}^{2}=\left[ 0\text{, }3\text{, }5\text{, }7\text{, }10\right] $. In both figures, the SER of the AC detector is represented by a single curve because it is immune to phase noise. The results in Figs. \ref{fig8_phase_noise_m2} and \ref{fig9_phase_noise_m4} show clearly the advantage of the heuristic detector in the presence of phase noise, particularly at high SNRs, where coherent detector exhibits SER error floors. As expected, the $M=4$ case is more sensitive than the $M=2$, even for very small values of $\sigma_{\phi}^{2}$.% \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig8_phase_noise_M2.eps}% \caption{The effect of the phase noise on the heuristic AC (AC-H) and coherent detectors for $N=1$, where $M=2$, $K=4$.}% \label{fig8_phase_noise_m2}% \end{figure} \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig9_phase_noise_M4.eps}% \caption{The effect of the phase noise on the heuristic AC (AC-H) and coherent detectors for $N=1$, where $M=4$, $K=4$.}% \label{fig9_phase_noise_m4}% \end{figure} Fig. \ref{F-Asympt} compares the asymptotic and analytical SERs using $M=2$, $K=4,$ $N=1,$ $2$ and $3$. As can be noted from the figure, the asymptotic SER provides accurate results for\ the SER at high SNRs, and thus, it can be used to simplify the SER analysis.% \begin{figure}[ptb]% \centering \includegraphics[ height=3.4411in, width=3.4411in ]% {Fig10_Asympt_N1_2_3.eps}% \caption{Asymptotic SER using $M=2$, $K=4$, and $N=1,2$ and $3$.}% \label{F-Asympt}% \end{figure} \section{Conclusion and Future Work} In this paper, the SER performance of MASK modulation with amplitude-coherent detection has been considered over flat Rician fading channels with receiver diversity. The optimum, near-optimum and suboptimum amplitude-coherent detectors were derived for the Rician channel and their SER was compared with the coherent and noncoherent detectors for various modulation orders and number of receiving antennas. The SER of the heuristic detector was derived analytically using different approaches, and the asymptotic SER was derived for high SNRs. The obtained analytical and simulation results confirm that the amplitude-coherent detection offers the SER performance that is comparable to the coherent detection, but without the need for a prior knowledge of the channel phase. Consequently, the computational complexity of the amplitude coherent detector is much less than the coherent detector and it is more robust to phase noise and phase estimation errors.
\section{Introduction} The discovery of thousands of exoplanets over the last couple of decades has shown that the birth of planets is a very efficient process in nature \citep[e.g.,][]{Burke:2015}. However, the physical mechanisms responsible for their origin are often poorly understood, and observational evidence for several of the proposed mechanisms is lacking. The currently accepted theory is that planets form in young circumstellar disks through the agglomeration of small dust particles into km-sized ``planetesimals'', which are massive enough to gravitationally attract gas and other solids in the disk. The formation of planetesimals is one of the most critical problems for theories of planet formation. In the simplest assumption of a gas-rich disk with density and temperature decreasing further from the star, small solids radially drift towards the star as a consequence of the aerodynamical drag by the gas rotating at sub-Keplerian speeds \citep{Weidenschilling:1977}. Models of solids evolution in disks have calculated radial drift timescales which are too short to allow them to grow to planetesimals. Moreover, the associated high velocities correspond to kinetic energies much higher than the binding energies of small solids as measured in laboratory experiments \citep{Testi:2014}, so that collisions lead to destruction instead of growth. Inward radial drift can be slowed down or stopped if there are local over-densities in the gas capable of trapping particles. In these over-densities the dust-to-gas ratio may increase up to the point at which the dusty layer becomes unstable and fragment. These fragments might eventually gravitationally collapse forming planetesimals. The origin of these over-densities are likely dynamical gas instabilities \citep{Lyra:2019}, such as the Rossby wave instability \citep{Lovelace:1999,Li:2001}, convective overstability \citep{Klahr:2014,Lyra:2014}, vertical shear instability \citep[][]{Nelson:2013}, zombie vortex instability \citep{Marcus:2015}, as well as streaming instabilities, in which the dust is an active ingredient in generating the density fluctuations \citep{Youdin:2005,Johansen:2007,Youdin:2007}. A natural prediction of these models is the presence of strong local accumulations of small solids in the disk \citep[e.g.,][]{Whipple:1972,Haghighipour:2002,Barge:1995,Lyra:2009,Chiang:2010,Johansen:2014}. In the last years, ALMA has found striking evidence for these local accumulations of small solids at distances $> 10-20$ au from the star \citep[e.g.][]{vanderMarel:2013}. The results of the ALMA observations demonstrate that some of the instabilities invoked by theory to explain the origin of planets are occurring in real disks, but they are limited to the outskirts of the planet-forming regions of disks (in the Solar System, $\approx 30-50$ au corresponds to the Kuiper Belt). Furthermore, models predict that solids with sizes of $\sim 1-10$ mm should show significantly higher levels of concentration than smaller dust grains. Constraining their spatial distribution is therefore key to inform and test the models of planetesimals formation. Solids with these sizes can be best traced by mapping the dust thermal emission at wavelengths longer than 1 mm. Given its very high sensitivity and angular resolution at long wavelengths \citep{Murphy:2018}, the ``Next Generation Very Large Array'' (ngVLA) will have the right technical capabilities to reveal and investigate the morphology of the birthsites of planetesimals in the planet-forming regions of disks, i.e. $< 10-30$ au from the star. The goal of this project is to study in a quantitative way the potential of the ngVLA to image the birthsites of planetesimals in nearby planet-forming disks. To derive predictions for models of the early evolution of solids in young disks, we performed state-of-the-art global 3D hydrodynamical radiative simulations of disks undergoing vertical shear instabilities based on the method described in \citet{Flock:2017}. \section{Methods: from disk simulations to ngVLA and ALMA observations} We describe here the method used to simulate observations with the ngVLA and ALMA for the dust continuum emission of disks undergoing vertical shear instabilities. \subsection{Disk model} In order to derive predictions for the appearance of disk models with particle trapping driven by hydrodynamical instabilities, we perform 3D radiation hydrodynamical global simulations, in which the radiation hydrodynamic equations are solved using the hybrid flux-limited diffusion and irradiation method developed by \citet{Flock:2013}. This model follows the setup described in \citet{Flock:2017}. The only change is the domain size in azimuth which we extended to the full 2$\pi$ value, so that the model described here represents the first global simulation of this kind. This gives a total grid size of $1024 \times 512 \times 2044$ in the $(r, \theta, \phi)$ domain. This domain covers from 20 to 100 au in stellocentric radii and $\pm$ 0.35 in $z/r$, where $z$ is the cylindrical height across the disk. Our disk model includes radiative transfer with stellar radiation. The initial conditions assumed for this simulation are taken from Table 1 in \citet{Flock:2017}. Particles with sizes of 0.1 and 1mm are randomly distributed in the domain after the vertical shear instability has reached a quasi steady state \citep[see][]{Flock:2017}. Our simulation includes a total of 1 million particles. After a couple of dynamical times the grains start to drift radially inward towards the central star whereas they are concentrated in regions of high pressure. Moreover we find the appearance of a vortex in this kind of simulations as it was recently found by \citet{manger:2018}. Such a vortex is able to concentrate the small solids in the disk. Furthermore, the deviations in the radial pressure profile cause ``traffic jams'' in the radial drift of grains which become visible as ring-like features. More details on these simulations will be discussed in a future paper (Flock et al. 2019, in prep.). The main products of this simulation for the study presented here are synthetic maps for the dust continuum emission at a wavelength of 3mm. The synthetic model image at 3mm is displayed on the top row of Figure 1. \subsection{ngVLA and ALMA observations} The synthetic map obtained following the method outlined in the previous section is converted into predictions for future observations with the ngVLA and ALMA using the CASA software package \citep{McMullin:2007}. The adopted procedure is the same as in \citet{Ricci:2018}, in which the ngVLA simulations are performed using the \texttt{SIMOBSERVE} task to generate the visibility dataset in the $(u,v)$ Fourier space, and the \texttt{SIMNOISE} task to add the noise by corrupting the visibilities. For the ngVLA simulations we considered the original ngVLA Rev B array configuration distributed across the US Southwest and Mexico. The Rev B configuration includes 214 antennas of 18 meter diameter, to baselines up to 1000\,km \citep{Selina:2018}. We instead did not include the 30 additional antennas distributed to baselines up to 9000\,km, as no signal would be detectable on these very long baselines from the sources considered here. For the array configuration of the ALMA observations, we used the \texttt{alma.out28.cfg} antenna position file available in the CASA package, which contains the longest 16 km baselines in the ALMA array. For the imaging of the visibilities we employed the \texttt{CLEAN} algorithm with Briggs weighting, and adjusted the robust parameter and $u,v$-taper to give a reasonable synthesized beam and noise performance. In particular, the ALMA images were computed with a Briggs weighting with robust parameter $R = −2$ (uniform weighting), while for the ngVLA we chose $R = − 1$. We also employed a multiscale clean approach to better recover compact emission at both high brightness and large diffuse structures in the model. The disk center was located at a declination of +24.0 degrees for the ngVLA simulations and -24.0 degrees for the ALMA simulations, and the assumed distance is 140pc. \begin{figure}[t!] \begin{center} \includegraphics[scale=0.7]{ngvla_vsi_main.png} \end{center} \caption{\footnotesize {Images of the dust continuum emission at 3mm for our disk model, with a total flux density of 16 mJy at 3mm. Top: the model synthetic image extracted with the method described in Section 2.1. Bottom left: The ngVLA image at 8mas $\times$ 6mas resolution. This was obtained after applying an outer taper of 5mas when imaging the visibilities using the method described in Section 2.2. The rms noise is 0.42\,$\mu$Jy\,beam$^{-1}$ and the peak signal-to-noise on the map is $\approx 50$. Bottom right: The ALMA image at 40mas $\times$ 31mas resolution (no outer taper), for a 8 hour synthesis. The rms noise is 5.2\,$\mu$Jy\,beam$^{-1}$. In both images, the synthesized beam is shown as a yellow ellipse in the bottom left corner. }} \end{figure} \section{Results} \subsection{Disk Images at 3mm} Figure~1 shows the results of our dust continuum simulations at a wavelength of 3mm for both the ngVLA and ALMA (bottom left and bottom right panels, respectively). For imaging of the ngVLA visibility dataset, we applied an outer taper of 5mas to increase the signal-to-noise on the map. The resulting synthesized beam has a FWHM $=$ 8\,mas $\times$ 6\,mas, corresponding to a spatial resolution of about 1.1\,au $\times$ 0.8\,au at the assumed distance of 140pc for our disk model. The rms noise on the ngVLA map is 0.42\,$\mu$Jy\,beam$^{-1}$, which, according to the results of the study on the ngVLA sensitivity presented in \citet{Carilli:2018}, should be achieved in about 10 hours of on-source time given the current reference design for the ngVLA interferometer. The peak signal-to-noise on the ngVLA map is about 50. The ALMA image was obtained by simulating a 8-hour long synthesis with the most extended array configuration available for ALMA in CASA. The peak signal-to-noise on the ALMA map is slightly above 30, a factor of $\approx 1.4\times$ lower than in the ngVLA image. More than the surface brightness sensitivity, the striking difference between the ngVLA and ALMA simulated observations is the angular resolution, as the ngVLA synthesized beam is smaller than the ALMA beam by a factor of 5 (in linear size). An even higher angular resolution could be achieved with the ngVLA with a more modest outer taper of the visibilities but at the expense of a lower signal-to-noise. For example, with a synthesized beam a factor of 2 smaller than shown in Fig. 1, the peak signal-to-noise would be decreased to values slightly above 10, high enough to characterize the brightest disk regions at a spatial resolution of 0.5 au. The impact of the higher resolution provided by the ngVLA is evident when one compares the ngVLA and ALMA images with the synthetic model image in Figure 1. For example, the ALMA observations do not resolve the inner ring/gap structure, as shown by the fact the the ring appears as significantly narrower than in the ngVLA map\footnote{Note that the presence of the large inner cavity in the disk images shown in Figures 1 and 2 is an effect of the inner disk radius of 20 au considered in the disk simulation presented here.}. The better sensitivity of the ngVLA at these wavelengths also allows for a better detection of the dust emission across the whole disk, up to the fainter regions in the disk outskirts. Furthermore, the local concentration of dust which is visible in the south-west side of the disk is well separated and spatially resolved by the ngVLA, whereas it is not resolved along the radial direction, and not even well separated by the inner ring-like structure, by the ALMA observations. Other asymmetric structures are detected by the ngVLA, although at lower signal-to-noise levels, in the fainter disk outskirts, but are not visible in the ALMA map. Right panel of Figure 2 shows a closer look into the area surrounding the most prominent local dust concentration, with the synthesized beam represented by the yellow ellipse with a linear size of $\approx 1$ au. This image highlights the details in the radial and azimuthal structure predicted by our disk model for the distribution of solids that the ngVLA would be capable of capturing. \begin{figure}[t!] \begin{center} \includegraphics[scale=0.65]{ngVLA_VSI2.png} \end{center} \caption{\footnotesize {Closer look into the ngVLA 3mm image around the dust-trapping vortex. The ngVLA image shown here is the same as in the left panel of Figure 1. The size of the synthesized beam, shown as the yellow ellipse on the bottom left corner, corresponds to a physical scale of about 1 au at the distance of the disk. }} \end{figure} The presence of the hydrodynamical instabilities generated in the gaseous component of the disk strongly affects the dynamics of the solids, making them migrate away from their initial orbits. As a consequence of this dynamics, a low-contrast narrow gap is opened at $\approx 0.23$arcsec from the star, a bright azimuthally symmetric structure is detected at $\approx 0.15$arcsec from the star, and an asymmetric structure with a local enhancement by an order of magnitude in the dust density is spatially resolved, as seen towards the center of the right panel in Fig. 2. This strong local enhancement in the solid component is due to a vortex in the gas. This vortex-induced ``dust trap'' is an example of what is often invoked by models of the early evolution of solids in disks to trigger the formation of planetesimals. The current specifications for the ngVLA would have the imaging capabilities to spatially resolve these birthsites of planetesimals, and test the model predictions regarding their morphology and location in nearby bright disks. \section{Conclusions} The ngVLA will transform the field of protoplanetary disks, allowing for imaging of their physical structure at sub-au resolution in nearby star forming regions. In this study we tested the imaging capabilities of the ngVLA for characterizing regions of local enhancement in the dust density. According to the models for the early evolution of solids in disks, such as the model presented in this work, these regions are necessary to concentrate small solids to higher and higher density, which may be necessary to form km-sized planetesimals, i.e. the building blocks of planets. High angular resolution observations of nearby bright disks with the ngVLA would be able to detect and characterize their morphology, e.g. their contrast and aspect ratio, and location in the disk. Observations of this kind would be key to test the predictions of physical models for the formation of vortices in the disk, as the aspect ratio of the observed structure is directly related to the vortex strength. Multi-wavelength observations both within the range of frequencies covered by the ngVLA, and also in combination with observations at higher frequencies with ALMA, would allow us to map the spectral index in these regions of local dust concentration. This is necessary to constrain observationally the spatial segregation of grains with different sizes as well as to better quantify the dust optical depth at these wavelengths. Moreover, the expected high astrometric precision of the ngVLA would allow for the investigation of the orbital motion of these asymmetric structure, as well as for possible variation in the morphology of these unstable regions on short timescales \citep[see for example the discussion in][for the case of disk substructures induced by the interaction with a planet]{Ricci:2018}. An investigation of the time-evolution of these structures will be presented in Ricci et al. (in prep.). This work shows the importance of the investigation of disk substructures generated by models without planets. Although the majority of the substructures detected in recent high-res images of protoplanetary disks are being interpreted with models of disk-planet interaction \citep[e.g.,][]{Dipierro:2018,Zhang:2018}, this work shows how similar structures could be explained also via alternative scenarios involving gas instabilities and the interaction with the solid component in the disk. Quantitative investigations on the disk structures predicted by these models under reasonable conditions for the observed disks are therefore vital for an accurate interpretation of the recent results from high-res observations of disks. \vskip 0.1in \acknowledgements This work was supported in part by the ngVLA Community Studies program, coordinated by the National Radio Astronomy Observatory, which is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities, Inc. D. B. acknowledges support from the Cal-Bridge scholarship program. \vskip 0.2in
\section{Introduction} In the past few years, several bright, millisecond-duration, and highly dispersed single pulses have been observed with radio telescopes across the world~\citep[e.g.][]{pbj+16}. This new class of radio transients, called fast radio bursts (FRBs), have dispersion measures (DMs) greater than a few times the DMs expected from our Galaxy~\citep{cl03}, placing their yet unknown sources outside the Milky Way and presumably at cosmological distances. To explain the distances and energetics involved, a wide variety of progenitor models have been proposed, many of them associating FRBs to cataclysmic events~\citep{tot13,kim13,fr14,gh15}. Such models cannot explain FRBs like FRB\,121102\ that are seen to repeat~\citep{ssh+16-1,ssh+16-2}. Although it might not be representative of the full class of FRBs, it demonstrates the value of a precisely known position. After the detection of additional bursts consistent in location and DM with the initial discovery burst of FRB\,121102~\citep{sch+14}, a direct sub-arcsecond localisation of a repeat burst was achieved using the Karl G. Jansky Very Large Array (VLA)~\citep{clw+17}. This allowed \citet{tbc+17} to identify the host galaxy of the source and to confirm its extra-galactic origin. Optical and infrared observations further showed the host to be a faint, low-metallicity dwarf galaxy at a redshift of $z = 0.193$~\citep{tbc+17} and the source to be located in a bright star-forming region~\citep{bta+17}. The VLA data also revealed a persistent radio source at the position of FRB\,121102~\citep{clw+17}. European Very Long Baseline Interferometry Network (EVN) observations subsequently showed that bursts of FRB\,121102\ originate within 40\,pc of this source, which suggest the two are physically connected~\citep{mph+17}. The bursts are also 100\% linearly polarised after a Faraday rotation correction with a rotation measure (RM) on the order of RM $\textasciitilde 10^{5}$ rad\,m$^{-2}$~\citep{msh+18}. Such a rotation measure, which was also seen to vary, requires a highly magnetic and ionised environment. Since the properties of this persistent radio source resemble those of a low-luminosity, accreting massive black hole~\citep{mph+17}, FRB\,121102's bursts could originate from a source in the vicinity of a massive black hole. The source could be a neutron star that then produces short-duration repeated emission like the giant pulses of radio pulsars~\citep{cw16,lbp16}. Alternatively, the bursts could originate from a young magnetar~\citep{lyu02,lyu14} and the persistent radio source is explained as a pulsar wind nebula~\citep{km17} or a supernova remnant~\citep{mbm17}. No periodicity has been found within the detected radio bursts~\citep{ssh+16-2,hds+17,zgf+18}, which is in contrast to what is expected for bursts originating from a rotating neutron star. The bursts of FRB\,121102\ are reported to be correlated in time~\citep{ssh+16-2,lab+17,oyp18} where the detection of one burst implies a higher probability of detecting another shortly thereafter. Its burst spectra also seem to be band-limited with a full with half maximum (FWHM) of approximately 500\,MHz and a central frequency that varies from burst to burst~\citep{ssh+16-1,ssh+16-2,lab+17}. It is as yet unclear if these properties are intrinsic to the source or caused by propagation effects~\citep{cwh+17}. In order to further constrain burst spectra, this work presents efforts to detect FRB\,121102\ simultaneously with the Effelsberg 100-m radio telescope, hereafter denoted with ``Effelsberg'', and the Low Frequency Array (LOFAR). Section \ref{sec:observations} describes the observations. A detailed description is given on how the resulting data were searched for single pulses in Sect. \ref{sec:analysis}. The results of this single pulse analysis are presented in Sect. \ref{sec:results}, which are then used for a multi-frequency burst comparison including previously published bursts in Sect. \ref{sec:burst-comp}. We conclude this work with Sect. \ref{sec:conclusion}. \section{Observations}\label{sec:observations} Between 4 September and 14 November 2016, four simultaneous observations were performed with Effelsberg and LOFAR of roughly five hours each. Within the five hour blocks, a few pulsars were observed for the purpose of calibration and to test the functionality of our triggering system. This triggering system, further described in Sect. \ref{sec:obsLOF}, was based on a private \mbox{VOEvent} Network~\citep{ad09} connecting the two observatories and enabled a rapid response to a potential Effelsberg detection with LOFAR. Table \ref{tab:obsprop} gives an overview of the FRB\,121102\ observations, their overlap, and how many bursts have been found in each of them. During the September observations, both telescopes were centred at the sky position RA = \hms{05}{31}{58}, DEC = \dms{33}{08}{04} (J2000)~\citep{ssh+16-1}. In November, Effelsberg was pointed at the updated sky position of FRB\,121102~\citep{mph+17} (RA = \hms{05}{31}{59}, DEC = \dms{33}{08}{50}), while LOFAR was centred at the previously used position. Assuming the primary beams of both telescopes to be Gaussian in shape, this positional error introduced a drop in sensitivity relative to a bore-sight detection of $\sim$2\% for a FWHM Effelsberg beam of 0.166$^{\circ}$ and $\sim$7\% for a FWHM LOFAR core tied-array beam of $\sim$5$'$. These values are smaller than the overall uncertainty on the sensitivities of the receivers and therefore neglected in all forthcoming calculations. \begin{table} \caption{Details about the performed observations.} \label{tab:obsprop} \centering \begin{tabular}{l l >{\centering\arraybackslash}p{1.5cm} c >{\centering\arraybackslash}p{0.8cm}} \hline\hline \noalign{\smallskip} Tel. & Date & Start time (UTC) & Duration & No. bursts\\ \noalign{\smallskip} \hline \noalign{\smallskip} EFF & 2016-09-04 & 04:51:30 & 4h 24m & 5\\ LOF & 2016-09-04 & 04:30:00 & 5h 00m & 0\smallskip\\ EFF & 2016-09-19 & 04:37:43 & 3h 52m & 4\\ LOF & 2016-09-19 & 04:30:00 & 3h 56m & 0\smallskip\\ EFF & 2016-11-13 & 01:24:59 & 4h 35m & 0\\ LOF & 2016-11-13 & 02:27:00 & 4h 42m & 0\smallskip\\ EFF & 2016-11-13 & 23:28:37 & 6h 31m & 0\\ LOF & 2016-11-13 & 23:12:00 & 4h 42m & 0\\ \noalign{\smallskip} \hline \end{tabular} \tablefoot{EFF = Effelsberg, LOF = LOFAR.} \end{table} \subsection{Effelsberg}\label{sec:obsEFF} The Pulsar Fast Fourier Transform Spectrometer (PFFTS) was used to record high time resolution, total intensity spectral data (i.e. Stokes-I only), similar to that for the Northern High Time Resolution Universe (HTRU North) pulsar survey~\citep{bck+13}. This search backend yielded data with a total of 512 frequency channels corresponding to a bandwidth of 300\,MHz centred at 1360\,MHz and a time resolution of 54.613\,$\mu$s. It recorded data for all the beams of the 7-beam feed array so as to be able to better discriminate between radio frequency interference (RFI) and actual bursts from FRB\,121102. Data from the central beam was also recorded using the high-precision pulsar timing backend PSRIX~\citep{lkg+16}. Although the sensitivity of the PFFTS spectrometers are higher, they are not synchronised with a precise clock and do not provide accurate timestamps. The PSRIX data, with a bandwidth of 250\,MHz centred at 1358.9\,MHz divided into 256 channels and a time resolution of 51.2\,$\mu$s, were therefore used to determine the exact times of arrival (TOAs) of the bursts detected with Effelsberg. ~~~~~ During the observations, the Effelsberg data were analysed in real time to allow the timely submission of FRB \mbox{VOEvents}~\citep{phb+17} to LOFAR. For this purpose the raw 32-bit PFFTS data from the central beam of the receiver were processed in gulps of 16 seconds with the graphics processing unit (GPU) -based transient detection pipeline {\tt heimdall}\footnote{\url{https://sourceforge.net/projects/heimdall-astro/}.}~\citep{thes:b12}. It was set to search for single pulses between a DM of 0 and 2000\,pc\,cm$^{-3}$. DM steps ranging from 0.2 to 11\,pc\,cm$^{-3}$ were used to convolve the dedispersed time series with a set of boxcars with widths $2^n \times t_{samp}$, where $0 \leq n \leq 9$ and $t_{samp}$ is the sampling time of the data to search up to a width of 27.96\,ms. Candidates were selected with a signal to noise ratio (S/N) of at least 6 and visually inspected for bursts at DM = 560\,pc\,cm$^{-3}$. For every candidate deemed significant by the observer, a trigger was sent to LOFAR initiating the transient buffer board (TBB) response, described in the next sub-section, within $\sim$30\,s after the detection of the burst. \subsection{LOFAR}\label{sec:obsLOF} The high-band antennae (HBAs) of LOFAR~\citep{hwg+13} were used to store visibility data and time series in the frequency range of 110 to 188\,MHz. For reasons explained below, the 14 remote stations and one core station were set to the interferometric imaging mode that produces correlated raw visibility data, and the remaining 23 core stations were set to the beamforming mode. This configuration produced one tied-array beam with an angular size of $\sim$5$'$, which is the coherent sum of all the core station beams centred at the position of FRB\,121102. The standard pulsar search pipeline~\citep{sha+11} was used to convert the 8-bit beamformed data into PSRFITS formatted time series with a time resolution of 1.31\,ms. To reduce the effect of intra-channel dispersion smearing, 25600 frequency channels were used to cover the 78\,MHz of bandwidth. Bursts of FRB\,121102\ would be smeared to $\sim$2, $\sim$4, and $\sim$11\,ms at 190, 150, and 110\,MHz, respectively. Additionally, the raw complex antenna voltages of the HBAs were continuously recorded on the TBBs implemented at all core and remote stations of LOFAR. The TBB ring buffers can store 2\,GB of data for each dipole, preserving a 5.2-second history of the radio sky. In order to use these data, the TBB recording must be stopped (``frozen'') by an internal or external trigger and then, after some potential further analysis of the trigger, read out (``dumped'') to the central LOFAR computer for offline processing. Due to network restrictions and the large amount of data to be read out, a dump can generally only be performed once per observation. Afterwards TBB data can be coherently dedispersed to yield resolved pulse profiles and imaged to localise the origin of bursts down to several arcseconds using the longest of the remote station's baselines~\citep{vef+18}. This makes TBB data valuable for FRB research, but as the dump of a full TBB buffer takes significant time during which the system is off, freezing or dumping TBB data must be decided on rigid trigger criteria. During our observations, the TBBs' viability for FRB observations was tested by providing triggers from Effelsberg via a prototype implementation of the \mbox{VOEvent} standard for FRBs described by \citet{phb+17}. Within fractions of a second upon the reception of a trigger at LOFAR, the TBBs were automatically frozen at a time most likely to detect the dispersed signal with the TBBs. For FRB\,121102\ this is possible as the high DM of the source causes its pulses to arrive at 188\,MHz about one minute after they are recorded at 1.4\,GHz. The decision whether to dump frozen TBB data onto disk was then made after a more detailed analysis of the corresponding Effelsberg candidate to ensure it was real. This validation was only possible for the brightest Effelsberg bursts, hence a total of two dumps were performed as a response to bursts V and IX in Table \ref{tab:burstprop}. To analyse single pulses within the TBB data, an accurate calibration of the time structure of the signal is required. \citet{cbe+16} studied this in detail for sub-microsecond pulses produced by cosmic rays for which the LOFAR TBBs are primarily used~\citep{snb+13}, but how to calibrate TBB data for the detection of FRBs is less well understood. Imaging our raw visibilities, recorded with the remote stations and a single core station, using the standard LOFAR techniques~\citep{hbh+11} could yield time delay tables that can be applied one-to-one on the TBB data. This procedure would significantly simplify the TBB data calibration, but requires a signal of FRB\,121102\ to be found in the TBBs. As the sensitivity of the TBBs is roughly the same as for the beamformed data, finding a pulse in the latter is a precondition for further analysis of the TBB data. It is therefore the analysis of the recorded beamformed data that is described below and which leads to the results presented in this paper. \section{Analysis}\label{sec:analysis} \subsection{Effelsberg data} Complementary to the real-time search, the 32-bit PFFTS data from all the seven beams were converted offline into 8-bit filterbank data to conserve computation and storage resources and re-analysed with {\tt heimdall}. This time, pulses were searched over a DM range of 0 to 5000\,pc\,cm$^{-3}$ to allow the detection of a new FRB in any of the receiver's beams. The local RFI was identified by comparing candidates from the outer beams with those from the central beam, and removed from the candidates list. Remaining promising events were then confirmed to be real bursts from FRB\,121102\ by visual inspection of the raw filterbank data using the task {\tt waterfaller.py} from the software package PRESTO\footnote{\url{http://www.cv.nrao.edu/~sransom/presto/}}~\citep{thes:r01}. To ensure no bursts were missed by {\tt heimdall}, the 8-bit filterbank data were also analysed using PRESTO alone. After making an RFI mask with the PRESTO task {\tt rfifind}, the data were dedispersed with DM steps of 1\,pc\,cm$^{-3}$ from 530 to 590\,pc\,cm$^{-3}$, a range centred around the DM of 560\,pc\,cm$^{-3}$ that most optimally aligns the sub-structure of the bursts of FRB\,121102\ and is therefore considered to be its true DM~\citep{hss+18}. The data were downsampled by a factor of 16 to attain a time resolution comparable to the data's inter-channel smearing of $\sim$1\,ms. Similar to {\tt heimdall}, the time series were convolved with several boxcar match-filters and candidates were created for events with an S/N $>$ 6 using the PRESTO task {\tt single\_pulse\_search.py}~\citep{lbh+15}. The same nine bursts were found with both methods and are presented in Sect. \ref{sec:results}. The characteristics of these bursts, that is their radio peak flux densities and pulse widths, were determined by extracting a small snapshot of dedispersed time-frequency data around the bursts with the digital signal processing for pulsars (DSPSR) program~\citep{sb11}. The bandpass of the receiver was removed from the resulting PSRCHIVEs, the data products of DSPSR, before they were averaged over frequency and downsampled in time with a factor that yielded the best least squares fit to the bursts' profiles using a Gaussian model. The widths and heights of the bursts were determined from these fits. For each burst, its height was converted to a peak flux density by applying the radiometer equation for two summed polarisations, 235\,MHz of bandwidth, due to band roll-off and flagged channels, and its S/N and width determined by the fit~\citep[Eq. A1.21 in][]{book:lk12}. These peak flux densities, widths, and S/Ns are listed in Table \ref{tab:burstprop}. We recall from Sect. \ref{sec:obsEFF} that the PFFTS data have no absolute time information. In order to improve the TOAs of the bursts in this data, determined as an offset in seconds from the start of their corresponding filterbank file, the same PRESTO analyses as applied to the 8-bit filterbank data was applied to the PSRIX data. This search yielded TOAs for seven bursts. For the two faintest bursts in the PFFTS data, no counterpart was found in the PSRIX data. Nevertheless a TOA was determined for all nine bursts by adding a correction obtained from bursts found in both data sets to the arrival times in the PFFTS data. The TOAs given in Table \ref{tab:burstprop} are the barycentred TOAs of the bursts referenced to infinite frequency calculated from the topocentric TOAs and updated sky position of FRB\,121102\ with the PRESTO function {\tt bary}. These arrival times enabled a targeted search for burst counterparts in the LOFAR band. \subsection{LOFAR beamformed data}\label{sec:analysis-lof} Although the persistent source surrounding could become optically thick at higher frequencies, free-free absorption is stated to be negligible for FRB\,121102\ at LOFAR frequencies by \citet{tbc+17}. FRB\,121102\ is affected by scattering and scintillation, the effects of which are seen to be consistent with the predictions of the NE2001 model~\citep{cl03} as caused by a Galactic electron column density of $\sim$188\,pc\,cm$^{-3}$~\citep{mph+17,msh+18}. LOFAR bursts from FRB\,121102\ are therefore expected to be strongly scatter-broadened to $\sim$35, $\sim$100, and $\sim$385\,ms at 190, 150, and 110\,MHz, respectively, assuming Kolmogorov frequency scaling ($\tau \propto \nu^{-4.4}$). In order to accommodate such pulse profile evolution over frequency in our search for LOFAR counterparts to the Effelsberg bursts, a new search method had to be devised for the LOFAR data. Unlike the Effelsberg data, the beamformed data were searched in eight sub-bands of $\sim$10\,MHz, for scattering might otherwise wash out the highly dispersed pulses from FRB\,121102\ when the entire bandwidth is frequency-scrunched to a time series. Additionally, shorter bursts can be resolved in the higher frequency sub-bands due to less intra-channel smearing in these bands (see Sect. \ref{sec:obsLOF}). With the PRESTO task {\tt prepsubband,} eight sub-bands were created for 100 dispersion trials between a DM of 545 and 575\,pc\,cm$^{-3}$ suppressing present RFI using an RFI mask made with {\tt rfifind}. Because {\tt prepsubband} cannot downsample sub-bands individually, all sub-bands per dispersion trial were downsampled by a factor of two, attaining a time resolution of 2.62\,ms compared to a total minimum smearing of 3.89\,ms for the highest frequency sub-band. The dispersion trials per sub-band were then converted to time series using {\tt prepsubband} again, as if eight sub-bands had been dedispersed individually. Each sub-band was then searched for bursts with {\tt single\_pulse\_search.py} using wider boxcar widths the lower the frequency range of the sub-band up to a maximum width of 300 times the time resolution of the data (i.e. 786\,ms). The resulting single pulse candidates with an S/N higher than 8 were visually inspected in a DM versus time diagram. In such a diagram, symmetric tear-drop shaped groups of candidates are a characteristic for broad band single pulses, as shown by \citet{cm03}, but none were evident. Many of the sub-bands are, however, heavily contaminated with RFI making it hard to recognise this characteristic shape. These sub-bands were therefore piped through {\tt pulse\_extract.py}, a code developed by \citet{mhl+18}, to group single pulse candidates and mitigate RFI, for instance by removing candidates detected at the same time with a similar S/N in several DM trials (i.e. narrow band RFI). The code reduced the number of candidates significantly but did not find any bursts from FRB\,121102. Finally, since we have an estimate of the arrival times of the bursts in the LOFAR band by extrapolating the arrival times of the Effelsberg bursts to LOFAR frequencies, a detailed inspection of the candidates at these times could be performed. Again, no bursts were found leading us to report a non-detection of bursts and burst counterparts of FRB\,121102\ with LOFAR. \subsection{Simulations}\label{sec:sim} Pulse profiles with large DMs are subject to a number of instrumental and propagation effects that are hard to disentangle at LOFAR frequencies. To quantify their influence on the sensitivity of the applied sub-band search, or in other words to investigate how well the search was able to recover initial burst energies, injection tests with fake single pulses in the LOFAR beamformed data were performed. To this purpose, a Gaussian profile was injected into a copy of the beamformed data simultaneous with burst IX. The profile, with a width of 4\,ms, was scattered with a frequency-dependent pulse-broadening timescale determined for a DM of 188\,pc\,cm$^{-3}$ (100\,ms at 150\,MHz) while conserving the area of the profile. Then it was smeared and dispersed using the DM of FRB\,121102, before being piped through the sub-band search pipeline. The results were analysed in a similar fashion as described at the end of Sect. \ref{sec:analysis-lof} to see if the initial integrated flux of the pulse could be reconstructed. This process was repeated for an integrated flux ranging from 4 $\pm$ 2 to 16 $\pm$ 8\,Jy in steps of 0.4\,Jy when measured over a single sub-band. For the injection, a flat spectral index was assumed across the LOFAR band. The lower flux density value used is the theoretical sensitivity limit of LOFAR at 150\,MHz calculated using Eq. 5 from \citet{kvh+16} with the same parameter dependencies as used in that paper. The exceptions are the position of FRB\,121102\ for the directional-dependent parameters, the number of summed stations $N_s$ being 46 (2 HBA fields $\times$ 23 core stations), a bad HBA tile fraction $\xi$ of 0.08, an RFI fraction $\zeta$ of 0.1, and bandwidth of 9.7\, MHz used in the sub-band search. This yields a sensitivity limit of 4 $\pm$ 2\,Jy at 150\,MHz to a 4\,ms burst at a 8-$\sigma$ confidence level. The above integrated flux errors arise from empirical results obtained by \citet{kvh+16}. An intrinsic 4\,ms wide burst was injected, because the median of the widths of the Effelsberg bursts is 3.7\,ms. Assuming that the intrinsic widths of the bursts do not scale with frequency, LOFAR bursts of FRB\,121102\ will have an intrinsic width of $\sim$4\,ms. As long as the true intrinsic widths of LOFAR bursts are small ($<$ 10\,ms), such that the detected burst widths are dominated by scatter broadening, the results of the simulations remain essentially unchanged. Only if the intrinsic widths at 150\,MHz are of the same order as the scatter broadening will the results presented below change in an unfavourable way and LOFAR be less sensitive for scattered bursts. Injected bursts were robustly detected at 150\,MHz from an initial integrated flux density of 11 $\pm$ 5\,Jy. Propagation effects, like scattering, thus reduced the sensitivity of the search pipeline by a factor of approximately three, though not evenly across the band. In the two sub-bands spanning the frequencies from 178 to 159\,MHz, the injected bursts were already detected at 10 $\pm$ 5\,Jy, but were not detected in the three lowest frequency sub-bands. This emphasises the importance of the use of the sub-band search technique; searches over the entire band might miss a pulse due to the large difference in sensitivity and effect of scattering across the LOFAR band. Since the theoretical sensitivity of LOFAR at 150\,MHz closely resembles the averaged theoretical sensitivity over the band, all forthcoming calculations are performed for a frequency of 150\,MHz. As the sensitivity for LOFAR, we therefore used the acquired value for the sensitivity limit of the sub-band search pipeline to scattered pulses of 11 $\pm$ 5\,Jy at 150\,MHz. \section{Results}\label{sec:results} All numbers are hereafter reported with 1-$\sigma$ error values if not mentioned otherwise. \subsection{L-band bursts} In total nine bursts were found with DMs consistent with FRB\,121102\ within the Effelsberg data. Table \ref{tab:burstprop} summarises their properties obtained from fitting Gaussian profiles to the data as described in Sect. \ref{sec:analysis}. Their fluences and pulse widths agree with the burst properties published in earlier work~\citep{sch+14,ssh+16-1,ssh+16-2,sbh+17,hds+17,lab+17,msh+18}, even though the widths are subject to significant intra-channel DM smearing of $\sim$1\,ms. From the published bursts it is apparent that pulse widths vary between 1 and 9\,ms and that the wider bursts often show a more complex structure~\citep{ssh+16-2,sbh+17,hss+18}. We also observed at least one burst with a more complex structure. Burst VII has a high enough S/N to partially resolve its burst profile and to show a double peak (Fig. \ref{fig:burst7}). The peaks are 3.6 $\pm$ 0.2\,ms apart and are most apparent for a dedispered profile with a DM of 560\,cm$^{-3}$, which is consistent with \citet{hss+18} reporting a DM of 560.57 $\pm$ 0.07\,pc\,cm$^{-3}$ to maximise FRB\,121102's burst structure. \begin{figure} \resizebox{\hsize}{!}{\includegraphics{burst_VII}} \vspace{-20pt} \caption{Pulse profile and dynamic spectrum of burst VII in the PFFTS data showing its double peaked structure. The burst was dedispered to 560\,pc\,cm$^{-3}$, downsampled to a time resolution of 873.81\,$\mu$s, and centred at the arrival time of the burst in the PSRIX data given in Table \ref{tab:burstprop}.} \label{fig:burst7} \end{figure} \begin{table*} \caption{Effelsberg L-band burst properties.} \label{tab:burstprop} \centering \begin{tabular}{c c c c c c} \hline\hline \noalign{\smallskip} No. & TOA (MJD) & Integrated peak flux (Jy) & Fluence (Jy\,ms) & Gaussian FWHM (ms) & Integrated S/N\\ \noalign{\smallskip} \hline \noalign{\smallskip} I & 57635.267401552 & 0.12 $\pm$ 0.02 & 0.5 $\pm$ 0.1 & 4.6 $\pm$ 0.6 & 10\\ II & 57635.275278708 & 0.41 $\pm$ 0.06 & 0.7 $\pm$ 0.1 & 1.8 $\pm$ 0.1 & 22\\ III & 57635.297930512 & 0.14 $\pm$ 0.02 & 1.0 $\pm$ 0.2 & 7.1 $\pm$ 0.6 & 15\\ IV & 57635.319982700 & 0.17 $\pm$ 0.03 & 0.6 $\pm$ 0.1 & 3.7 $\pm$ 0.4 & 13\\ V & 57635.392856006 & 0.8 $\pm$ 0.1 & 2.4 $\pm$ 0.4 & 3.15 $\pm$ 0.08 & 54\\ VI & 57650.268119170 & 0.22 $\pm$ 0.03 & 0.7 $\pm$ 0.1 & 3.3 $\pm$ 0.3 & 16\\ VII & 57650.294844960 & 0.26 $\pm$ 0.04 & 1.9 $\pm$ 0.3 & 7.5 $\pm$ 0.3 & 28\\ VIII & 57650.345421547 & 0.19 $\pm$ 0.03 & 0.9 $\pm$ 0.2 & 4.7 $\pm$ 0.4 & 17\\ IX & 57650.355313519 & 0.8 $\pm$ 0.1 & 2.7 $\pm$ 0.4 & 3.32 $\pm$ 0.07 & 61\\ \noalign{\smallskip} \hline \end{tabular} \tablefoot{All reported errors are the one standard deviation errors and the given TOAs are barycentred and referenced to infinite frequency.} \end{table*} \subsection{Repeat rates}\label{sec:repeat_rates} Effelsberg detected the nine bursts presented here from FRB\,121102\ in September 2016, whereas none were detected two months later. The overall averaged burst repeat rate for Effelsberg at 1.4\,GHz is therefore $R = 0.46 \pm 0.15$\,hr$^{-1}$ for bursts with an S/N above 10. As can be seen from Table \ref{tab:obsprop}, five and four bursts were detected on September 4 and 19 respectively, while no bursts were detected on November 13 and 14. This yields two repeat rates for September of $R_{\mathrm{Sep04}} = 1.1 \pm 0.5$\,hr$^{-1}$ and $R_{\mathrm{Sep19}} = 1.0 \pm 0.5$\,hr$^{-1}$. Having adopted a Poisson distribution for the burst detection probability to calculate the given errors~\citep{cp18}, we note that these rates are statistically consistent with each other. The same holds true for the November observations with no detections. We therefore argue a single rate to exist that is valid for the pair of observations in September and a second rate to exist for the pair of observations in November. The rates per month can then be combined to slightly reduce the uncertainties on the rates. This gives for the 8.3\,hr of September data $R = 1.1 \pm 0.4$\,hr$^{-1}$ compared to a repeat rate limit of $R < 0.3$\,hr$^{-1}$ (95\% confidence limit) for the non-detection in 11.1\,hr of November data. In the same way can we derive repeat rate limits for LOFAR, where no bursts were detected in 8.9 and 9.4\,hr in September and November respectively. This results in a rate limit of $R < 0.3$\,hr$^{-1}$ (95\% confidence limit) for each period. A similar variation in repeat rates as seen within the Effelsberg data was reported by \citet{lab+17}. The VLA detected nine bursts at 3\,GHz~\citep{clw+17} in September 2016, but did not find any during an earlier observing campaign in the same year. The bursts of FRB\,121102\ are thus correlated in time as was reported by \citet{ssh+16-2}, \citet{lab+17}, \citet{oyp18}, and \citet{shb+18}. \subsection{Instantaneous spectral index limit}\label{sec:isi} Despite extensive efforts, both a blind search for bursts and a targeted search for burst counterparts in the LOFAR data did not yield any bursts. Nevertheless, we can put constraints on their spectrum at 1.4\,GHz and 150\,MHz using this non-detection and the nine Effelsberg bursts. Therefore we consider not the bursts' fluxes but their fluences and assume their intrinsic widths not to scale with frequency. Since burst IX was the brightest detection, its fluence was taken as the reference fluence of Effelsberg at 1.4\,GHz. For the LOFAR fluence the sensitivity limit of the sub-band search was taken at 150\,MHz, determined in Sect. \ref{sec:sim}, multiplied with the adopted burst width of 4\,ms to obtain a fluence upper limit of 42\,Jy\,ms. Assuming the fluence $\mathcal{F}_{\nu}$ of bursts from FRB\,121102\ to scale with frequency as a power law ($\mathcal{F}_{\nu} \propto \nu^{\alpha}$), a limit on the spectral index $\alpha$ can be derived for its broad band instantaneous emission of $\alpha > -1.2 \pm 0.4$. The above is the first simultaneous spectral index limit for bursts of FRB\,121102\ below 1\,GHz. For FRBs in general, \citet{kca+15} reported a spectral index limit of $\alpha > 0.1$ at 145\,MHz based on an FRB non-detection with a single international LOFAR station. Although this is a higher value, this limit is much more model-dependent. For instance, they used a constant volumetric rate of FRBs with redshift together with the assumption that FRBs are standard candles with broad band emission to derive their limit. Here we only assumed that FRB\,121102\ produces broad band bursts and absorbed the effects of propagation that could potentially explain a non-detection with LOFAR in the determination of its sensitivity limit. We also used the core stations of LOFAR in contrast to just one international station, gaining a factor of $\sim$14 in sensitivity and enabling us to detect fainter signals. Nevertheless, it is striking that both limits point towards a flat FRB emission spectrum below 1\,GHz, which could be an indication that the power law assumption for FRB emission does not hold true at low frequencies. This statement is backed-up by the recent results from \citet{sbm+18}. Using the Murchison Widefield Array (MWA) at $170-200$\,MHz, they did not find bursts simultaneously with bursts found by the Australian Square Kilometre Array Pathfinder (ASKAP) at L-band. They claim this to originate from a break in the intrinsic spectrum of FRBs at frequencies above 200\,MHz. \section{Multi-frequency detection rate comparison}\label{sec:burst-comp} In September 2016, FRB\,121102\ was observed to have an increased repeat rate where its bursts were observed at multiple frequencies and with several different telescopes~\citep[][this work]{sbh+17,clw+17}. Utilising the large bandwidth of the VLA, \citet{lab+17} showed that the individual burst spectra of FRB\,121102\ are poorly described by a single power law and better modelled with a Gaussian envelope of $\sim$500\,MHz and a varying central frequency. An intrinsic band-limited emission of the bursts would explain why no LOFAR bursts were detected simultaneously with the Effelsberg bursts. However, if the central frequencies of these envelopes shift into the LOFAR band, we may have expected to detect bursts non-simultaneously. While the spectra of the individual bursts may be band-limited, the statistical distributions of burst centre frequencies and fluences may be frequency dependent, which would manifest observationally as a frequency-dependent occurrence rate of bursts of a given fluence. One possible mathematical description of this frequency dependence is a power law with a spectral index relating the normalisation of burst energy distributions at different frequencies. We refer to this as a statistical spectral index, which is distinct from an instantaneous spectral index. In practice a survey measures a burst detection rate above a sensitivity threshold. By measuring the detection rates from surveys conducted at multiple frequencies, one can measure this statistical spectrum, assuming observational biases such as propagation effects can be properly accounted for. Below is a simple mathematical derivation of the statistical spectral index. We assume that the statistical distribution of burst energies at a given radio frequency is described by a power law. Specifically we adopt the differential energy distribution from \citet{lab+17}: $dN/dE = T_{\rm obs}$\,$d\lambda/dE = AE^{\gamma}$, where $\lambda$ is the Poisson detection rate. The differential energy distribution has been recast as a differential rate distribution, because the key observable is number of bursts with a given energy per unit time. For a sensitivity-limited survey, most detections will be a factor of a few above the detection threshold. Directly comparing fluences between two burst samples from two surveys at different frequencies does not so much reflect the intrinsic source spectrum but rather the sensitivities of the surveys. Also, it is equally important to consider the total observing time required to detect a sample of bursts. If ten times as much time is needed at a higher frequency than at a lower frequency to observe a burst with similar fluence, it suggests that the bursts at the higher frequency are systematically weaker and a longer wait time is needed until a sufficiently bright burst occurs. Although burst energy is the more physically meaningful quantity, in practice we measure the fluence. Importantly, measuring a burst's energy requires being able to measure the bandwidth of the burst ($\Delta \nu$) and knowing the distance to the source ($D$) and the beaming factor of the emission ($\Omega$). Therefore, we will make a change of variables in the differential rate distribution from energy to fluence: \begin{equation} d\lambda = \left( \frac{\Omega}{4\pi} D^2 \Delta \nu \right)^{\gamma+1}d\mathcal{F}. \end{equation} We extend the formalism of \citet{lab+17} by assuming that the normalisation factors of the differential rate distributions ($A$) at two frequencies are related through a power law parameterised by a statistical spectral index ($\alpha_s$), that is, bursts with fluences $\mathcal{F}_{\nu,1}$ and $\mathcal{F}_{\nu,2}$ observed at frequencies $\nu_1$ and $\nu_2$ are related by $\mathcal{F}_{\nu,1}/\mathcal{F}_{\nu,2} = (\nu_1/\nu_2)^{\alpha_s}$. We enforce the shift in the normalisation by relating the fluences at $\nu_1$ and $\nu_2$ for the same rate ($d\lambda_{\nu1}/dN = d\lambda_{\nu2}/dN$) with the statistical spectral index. In practice we usually calculate the rate of all burst detections above a minimum detectable fluence. This can be obtained by integrating the differential rate distribution from the lowest detectable fluence $\mathcal{F}_{\rm min}$ to a maximum burst fluence $\mathcal{F}_{\rm max}$. To avoid the need for an absolute normalisation, we take the ratio between two observed burst rates at two different frequencies. This ratio can be further simplified when we assume that $\mathcal{F}_{\rm max} \gg \mathcal{F}_{\rm min}$. We also take $\gamma < -1$, such that the detection rate $\lambda$ is dominated by burst fluences close to the fluence detection threshold $\mathcal{F}_{\rm min}$, to obtain \begin{equation}\label{eq:ssi} \frac{\lambda_1}{\lambda_2} \approx \left(\frac{\nu_1}{\nu_2}\right)^{-\alpha_s\gamma}\left(\frac{\mathcal{F}_{\nu\rm 1,min}}{\mathcal{F}_{\nu\rm 2,min}}\right)^{\gamma+1}. \end{equation} We assumed that the emission beaming factor $\Omega$ is frequency independent when deriving the above expression. With Eq.~\ref{eq:ssi} a statistical spectral index can be obtained from the observed burst rates at two frequencies and the corresponding fluence complete limits of the observations. Importantly, several assumptions are built into this derivation. First, we assume that the rates at two different frequencies are scaled solely by the statistical spectral index and not caused by an intrinsic change in the rate of bursts generated at those frequencies. Second, we assume that $\gamma$ is constant with frequency and time, which is consistent with \citet{lab+17}, who derived a value for $\gamma$ of $-1.7$. Finally, we assume that $\lambda$ is constant in time during September 2016. We know that this it not the case for FRB\,121102\ over long timescales. In this work we present a markedly different rate in observations separated by roughly two months. Nevertheless, we do know that the detection rate was higher than average during September 2016 from the near daily observation campaign with the VLA~\citep{clw+17}. Furthermore, most of those observation sessions were 120 minutes long within which zero or one burst was detected, suggesting that the detection rate did not vary significantly during those two weeks. One possible exception is the 54-minute session on 2 September 2016 during which two bursts were detected. The sample of previously published bursts detected in this period come from the VLA at 3\,GHz \citep[i.e. $2.5-3.5$\,GHz band,][]{lab+17}, the Green Bank Telescope (GBT) at 2\,GHz \citep[i.e. $1.6-2.4$\,GHz band,][]{sbh+17}, and we add to them the Effelsberg data at 1.4\,GHz (i.e. $1.2-1.5$\,GHz band), presented in this paper. This gives three burst detection rates for the three central frequencies of the telescopes above. The derived rates are $R_{\rm VLA} = 0.3 \pm 0.1$\,hr$^{-1}$, $R_{\rm GBT} = 0.5 \pm 0.3$\,hr$^{-1}$ , and $R_{\rm EFF} = 1.1 \pm 0.4$\,hr$^{-1}$. The Effelsberg and VLA rates are consistent at the $1.5-\sigma$ level, whereas the GBT rate is consistent with both the Effelsberg and VLA rates. Applying Eq. \eqref{eq:ssi} to the measured detection rates from the VLA and GBT and using the Effelsberg bursts as a reference, we find two values for $\alpha_s$: $\alpha_{s,\rm\text{ VLA / EFF}} = -1.3_{-0.6}^{+0.5}$ and $\alpha_{s,\rm\text{ GBT / EFF}} = -2.5_{-1.5}^{+1.2}$. For our analysis we adopted the fitted value of $\gamma = -1.7$ taken from \citet{lab+17} together with their definition of the fluence completeness limit. This limit, being defined as an effective detection limit of 0.9 times the weakest burst detected, resulted in the following fluence completeness limits used for the second term on the right of Eq. \eqref{eq:ssi}: $\mathcal{F}_{\nu\rm, min}^{\rm VLA} = 0.2$\,Jy\,ms, $\mathcal{F}_{\nu\rm, min}^{\rm GBT} = 0.1$\,Jy\,ms, and $\mathcal{F}_{\nu\rm, min}^{\rm EFF} = 0.5$\,Jy\,ms, respectively. Although the errors on the statistical spectral indices are large, they tentatively suggest that FRB\,121102\ has a negative spectral index for its overall distribution of burst energies versus frequency. Now we calculate a limit for the statistical spectral index of potential bursts at 150\,MHz and those at 1.4\,GHz with the September repeat rate of LOFAR from Sect. \ref{sec:repeat_rates}. Adopting the fluence upper limit of LOFAR of 42\,Jy\,ms, we obtain $\alpha_{s,\rm\text{ LOF / EFF}} > -0.5_{-0.2}^{+0.2}$. This is a much flatter spectral index than at the approximately gigahertz frequencies and is marginally inconsistent with the previously mentioned values for $\alpha_{s,\rm\text{ VLA / EFF}}$ and $\alpha_{s,\rm\text{ GBT / EFF}}$. The statistical spectral indices for FRB\,121102\ thus seem to indicate a flattening of its spectrum at low frequencies, which is in line with the results presented in Sect. \ref{sec:isi}. To better quantify this possible flattening of the spectra of bursts from FRB\,121102\ below 1\,GHz, more precise statistical spectral indices must be obtained. More LOFAR observations simultaneous with multiple higher frequency observations are therefore needed to further constrain the repeat rate of FRB\,121102\ at 150\,MHz and observing frequencies of the other observatories. Alternatively, the sensitivity of LOFAR can be increased to yield better constrained repeat rate limits and potentially a burst from FRB\,121102. This can be done by performing observations with not just LOFAR's core stations but with its remote stations as well, or by obtaining LOFAR data that can be coherently dedispersed to gain a wider usable bandwidth. \section{Summary and conclusions}\label{sec:conclusion} In late 2016 we performed roughly 20 hours of simultaneous observations on FRB\,121102\ with Effelsberg and LOFAR. The observation time was divided over four sessions. During two sessions in September, nine bursts from FRB\,121102\ were detected at 1.4\,GHz, while no bursts were detected in two sessions in November. With a newly designed single pulse sub-band search method, no bursts were detected at 150\,MHz in the LOFAR beamformed data. From this we derived a spectral index limit for the fluence of the instantaneous broad band emission of FRB\,121102\ between 1.4\,GHz and 150\,MHz of \begin{equation*} \alpha > -1.2 \pm 0.4. \end{equation*} In order to obtain this instantaneous spectral index, simulations were performed to determine the response of the sub-band search method to strongly scattered pulses. We showed that its sensitivity is a factor of three lower than the theoretical sensitivity of LOFAR due to the intensity drop of the bursts from FRB\,121102\ when scattered to a width of 100\,ms at 150\,MHz. Despite extensive efforts to detect a burst from FRB\,121102\ at multiple frequencies~\citep{ssh+16-2,sbh+17,hds+17}, this has only been achieved three times~\citep{sbh+17,lab+17}, which suggests that simultaneous detections at frequencies separated by 1\,GHz are unlikely. Nevertheless, we could have found non-simultaneous bursts, the lack of which led us to calculate a statistical spectral index to estimate the probability of detecting bursts given the rate of Effelsberg bursts at 1.4\,GHz. This was done by obtaining statistical spectral indices for bursts detected at different frequencies at the VLA, GBT, and Effelsberg using the repeat rate ratio analysis presented here. Three statistical spectral indices were calculated: \begin{align*} \alpha_{s,\rm\text{ VLA / EFF}} &= -1.3_{-0.6}^{+0.5},\\ \alpha_{s,\rm\text{ GBT / EFF}} &= -2.5_{-1.5}^{+1.2},\\ \alpha_{s,\rm\text{ LOF / EFF}} &> -0.5_{-0.2}^{+0.2}. \end{align*} The indices calculated at frequencies above 1\,GHz are consistent within the uncertainties, while below 1\,GHz a flattening in the statistical spectral index may occur. Whether this is a real feature of the distribution is yet unclear. More observations, preferably more sensitive, coherently dedispered LOFAR observations, are needed to provide clarity about the exact value and any dependence on frequency of the spectral index of FRB\,121102. This is achieved by applying the repeat rate ratio analysis on observations performed simultaneously over a wide frequency range and long time span. ~~~~~ Very recently, a second repeating FRB has been discovered by \citet{CHIME}. It will be interesting to repeat the experiment for this source and to compare the results with the conclusions reached here. \begin{acknowledgements} This paper is based on observations with the 100-m telescope of the MPIfR (Max-Planck-Institut f\"ur Radioastronomie) at Effelsberg and (in part) on data obtained with the International LOFAR Telescope (ILT) under project code LC6\_009. LOFAR~\citep{hwg+13} is the Low Frequency Array designed and constructed by ASTRON. It has observing, data processing, and data storage facilities in several countries, which are owned by various parties (each with their own funding sources), and that are collectively operated by the ILT foundation under a joint scientific policy. This work is part of the research programme TOP1EW.14.106 with project number 614.001.454, which is (partly) financed by the Netherlands Organisation for Scientific Research (NWO). L.G.S. acknowledges financial support from the ERC Starting Grant BEACON under contract number 279702, as well as the Max Planck Society. \end{acknowledgements} \vspace{1cm} \bibliographystyle{aa}
\section{Introduction} Structured transductions are a natural generalization of supervised learning to application scenarios where both input samples and predictions are structured pieces of information. Trees are an example of non-trivial structured data which allows to straightforwardly represent compound information characterized by the presence of hierarchical-like relationships between its elements. Within this context, learning a tree structured transduction amounts to inferring a function associating an input tree to a prediction that is, as well, a tree. Many challenging real world applications can be addressed as tree transduction problems. The problem of learning generic tree transductions, where both input and output trees have different topologies, is still a challenging open research question, despite some works \cite{tdLSTM}\cite{drnn} have started dealing with learning to sample tree-structured information, which is a prerequisite functionality for realizing a predictor of tree structured outputs. Isomorphic transductions define a restricted form of tree transformations \cite{IOBUTHMM} which, nevertheless, allow to model and address several interesting learning tasks on structured data, including: (i) tree classification and regression, i.e. predicting a vectorial label for the whole tree; (ii) node relabeling, i.e. predicting a vectorial label for each node in a tree taking into account information from its surrounding context (e.g. its rooted subtree or its root-to-node path); and (iii) reduction to substructure, i.e. predicting a tree obtained by pruning pieces of the input structure. Isomorph transductions have been realized by several learning models, starting from the seminal work on the recursive processing of structures in \cite{generalframework}. There it has been formalized the idea of extending recurrent models to perform a bottom-up processing of the tree, unfolding the network recursively over the tree structure so that the hidden state of the current tree node depends from that of its children. The same approach has been taken by a number of models from different paradigms, such as the probabilistic bottom-up Hidden Markov Tree model \cite{buthmm}, the neural Tree Echo State Network \cite{treeesn} or the neural-probabilistic hybrid in Hidden Tree Markov Networks (HTNs) \cite{htn}. Another approach can be taken based on inverting the direction of parsing of the tree, by processing this top-down from the root to its leaves. This is diffused in particular in the probabilistic paradigm \cite{tdthmm}, where it represents a proper straightforward extension of hidden Markov models for sequences. More recently, within the deep learning community it has diffused a widespread use of Long Short Term Memory (LSTM) networks \cite{lstm} for the processing of tree structured information. The so-called TreeLSTM model \cite{treelstmbu} extends the LSTM cell to handle tree-structures through a bottom-up approach implementing a specific instance of the recursive framework by \cite{generalframework}. Although defined for the general case of an n-ary tree, the TreeLSTM has been used on binary trees obtained by binarization of the original parse tree which, in practice, reduces significantly the contribution of the structured information to solving the task. Two recent works show example of a top-down TreeLSTM: one proposed in \cite{tdLSTM} to learn to sample trees and one in \cite{ssci18} showing the its use in learning simple non-isomorph transductions. The aim of this paper is to present an orderly discussion of modern TreeLSTM models, assessing the effect of different stationarity assumptions (i.e. parameterization of the hidden state) on a full n-ary setting (i.e. without requiring a binarization of the structure). Also, since the choice of the tree parsing direction has a well-known effect on the representational capabilities of the model \cite{buthmm}, we consider both bottom-up and top-down TreeLSTM models. In particular, we focus on benchmarking the TreeLSTM models on three different tasks associated with the three different types of isomorph tree structured transductions discussed above. We will show how each of such task has different assumptions and characteristics which cannot all be effectively addressed by a single approach. \section{Problem Formulation} \label{sect:back} Before delving into the details of the different LSTM-based approaches to deal with tree data, we formalize the problems addressed in the experimental assessment using the generic framework of structured transductions. We consider the problem of learning tree transductions from pairs of input-output trees $(\mathbf{x}^{n},\mathbf{y}^{n})$, where the superscript identifies the $n$-th sample pair in the dataset (omitted when the context is clear). We consider labeled rooted trees defined by the triplet ${(\mathcal{U}_{n},\mathcal{E}_{n},\mathcal{X}_{n})}$ consisting of a set of nodes $\mathcal{U}_{n} = \{1,\dots,U_n\}$, a set of edges $\mathcal{E}_{n}\subseteq\mathcal{U}_{n}\times\mathcal{U}_{n} $ and a set of labels $\mathcal{X}_{n}$. The term $u \in \mathcal{U}_{n}$ denotes a generic tree node whose direct ancestor, called \emph{parent}, is referred to as $pa(u)$. A node $u$ can have a variable number of direct descendants (\emph{children}), such that the $l$-th child of node $u$ is denoted as $ch_l(u)$. The pair $(u,v) \in \mathcal{E}_{n}$ is used to denote an edge between a generic node and its child and we assume trees to have maximum finite out-degree $L$ (i.e. the maximum number of children of a node). Each vertex $u$ in the tree is associated with a label $x_u$ ($y_u$, respectively) which can be of different nature depending on the application, e.g. a vector of continuous-valued features representing word embeddings or a symbol from a discrete and finite alphabet. A tree transduction is defined as a mapping from an input sample to an output elements where both are tree structured pieces of information. Using $\mathcal{I}^{\#}, \mathcal{O}^{\#}$ to denote the input and output domains, respectively, then a structural transduction is a function $\mathcal{F}: \mathcal{I}^{\#}\rightarrow \mathcal{O}^{\#}$. We focus on transductions exploiting the following definition of tree isomorphism. \begin{definition}{Tree isomorphism} Let $\mathbf{x} = {(\mathcal{U},\mathcal{E},\mathcal{X})}$ and $\mathbf{x}' = {(\mathcal{U'},\mathcal{E'},\mathcal{X'})}$, they are isomorphic if exists a bijection\\ $f:\mathcal{U} \rightarrow \mathcal{U'}$ such that $ \forall (u,u')\in \mathcal{E} \iff (f(u), f(u'))\in \mathcal{E'}$. \end{definition} An equivalent definition can be given using the concept of \emph{skeleton}. \begin{definition}{Skeleton tree} Let $\mathbf{x} = {(\mathcal{U},\mathcal{E},\mathcal{X})}$, its skeleton is $skel(\mathbf{x}) = {(\mathcal{U},\mathcal{E})}$. \end{definition} Following such definition, two trees are isomorphic if they have the same skeleton (labels are irrelevant, only structure matters). A general \emph{structured transduction} can be formalized by a learnable encoding-decoding process where $\mathcal{F} = \mathcal{F}_{out} \circ \mathcal{F}_{enc}$ with: \begin{equation*} \mathcal{F}_{enc}: \mathcal{I}^{\#}\rightarrow \mathcal{H}^{\#} \qquad \qquad \mathcal{F}_{out}: \mathcal{H}^{\#}\rightarrow \mathcal{O}^{\#}. \end{equation*} The terms $\mathcal{F}_{enc}$ and $\mathcal{F}_{out}$ are the \emph{encoding} and \emph{output} transductions, while we assume the existence of a state space $\mathcal{H}^{\#}$ providing an intermediate and rich representation of the structured information, such as in the activations of the hidden neurons of a recursive neural model. Different types of transductions can be obtained depending on the isomorphism properties of the encoding and output mappings. In this work, we consider three types of tree transductions, each associated with a practical learning and prediction task. First, we consider a \emph{tree-to-tree isomorphic transduction} where both encoding and output mappings are isomorphic. The second type is the \emph{structure-to-element} or \emph{supersource transduction} that map an input tree into a single vectorial element in the output domain, basically realizing a classical tree classification or regression task. The third type is the \emph{structure-to-substructure} transduction which defines a restricted form of non-isomorphic transduction where the output tree $\mathbf{y}$ is obtained from the input tree $\mathbf{x}$ by pruning some of its proper subtrees. In practice, such a transformation can again be realized as an isomorphic transduction, where the encoding is isomorphic as in the previous cases. The output function, instead, isomorphically maps each element of the hidden encoding into an output node while using a specific \emph{NULL} value as label of those nodes of the input structure that are non-existing in the output tree. \section{TreeLSTM for Constrained Tree Transductions} \label{sect:mod} Several works have been dealing with extending Recurrent Neural Networks (RNN) to deal with tree structured data. Lately, most of these works focused on tree-structured extensions of LSTM cells and networks. Two sources of differentiation exist between the different models. One concerns the stationarity assumptions, that is how much tied are the network parameters with respect to topological aspects such as the position of a node with respect to its siblings. The second source of differentiation concerns the direction of tree processing (top-down or bottom-up for trees), which determines the context upon which a specific node is assessed (i.e. depending on the hidden state of the parent, for the top-down case, or depending on the states of its children, for the bottom-up case). In the following, we briefly review the TreeLSTM approaches in literature with respect to these two differentiating factors. \begin{description} \item[Top-Down (TD) TreeLSTM:]in this model, tree processing flows from the root to the leaves. In literature, TD TreeLSTM models are mainly used in generative settings, where one wants to generate the children of a node based on the hidden state of the parent \cite{tdLSTM,drnn}. Their use as encoders of the full structure is not common, as this requires some form of mapping function summarizing the whole tree into a single encoding vector (e.g. the mean of the hidden states of all the nodes in the tree). Here, we consider the use of TD TreeLSTM in the context of learning isomorph transductions of the three types discussed in Section \ref{sect:back}. In particular, we will assess the capabilities of this model in realizing non-generative tasks, highlighting limitations and advantages with respect to its more popular bottom-up counterpart. Formally, the activation of a TD TreeLSTM cell for a generic node $u$ is regulated by the following equations \begin{align} r_u &= \tanh \biggl( W^{(r)} x_u + U^{(r)} h_{pa(u)} + b^{(r)} \biggr) \\ i_u &= \sigma \biggl( W^{(i)} x_u + U^{(i)} h_{pa(u)} + b^{(i)} \biggr) \\ o_u &= \sigma \biggl( W^{(o)} x_u + U^{(o)} h_{pa(u)} + b^{(o)} \biggr) \\ f_u &= \sigma \biggl( W^{(f) }x_u + U^{(f)} h_{pa(u)} + b^{(f)} \biggr) \\\ c_u &= i_u \odot r_u+ f_u \odot c_{pa(u)} \\ h_u &= o_u \odot \tanh (c_u) \end{align} \noindent with the term $x_u$ denoting unit input, $h_{pa(u)}$ and $c_{pa(u)}$ are, respectively, the hidden state and the memory cell state of the node's parent, $\sigma$ is the sigmoid activation function and $\odot$ is elementwise multiplication. It can be seen that the formal model of this unit is that of a standard LSTM unit for sequences, but this will be unfolded over the tree in a TD fashion by following in parallel all the root to leaves paths. \end{description} The second type is Bottom-Up (BU) TreeLSTM, in which tree processing flows from the leaves to the root. In literature there are two types of BU TreeLSTM, which is mainly used as one-pass encoder for tree structured information \cite{treelstmbu}. The two BU TreeLSTM types differ in stationarity assumptions and the choice of which one to use depends on the specificity of the structured data at hand (e.g. finiteness of the outdegree, relevance of node positionality information). The choice of a bottom-up approach is motivated by consolidated results showing a superior expressiveness of bottom-up parsing with respect top-down approaches when dealing with trees \cite{buthmm}. When considered within the context neural processing of the structure this founds on the assumption that a node hidden state computed recursively from its children states is a ``good" vectorial summary of the information in all the subtree rooted in the node. Another observation is that the bottom-up approach provides a natural means to obtain a state mapping function for the whole tree, by considering the hidden state of the tree as a good summary of the information contained in the whole structure. \begin{description} \item[Child-Sum TreeLSTM:] this type of TreeLSTM is used to encode trees where the position of nodes (ordering) with respect to their siblings is not relevant for the task. Let $ch(u)$ be the set of children (of size $K$) of the generic node $u$, its state transition equation follows: \begin{align} \tilde h_u &= \sum_{k \in ch(u)} h_k \\ r_u &= \tanh \biggl( W^{(r)} x_u + U^{(r)} \tilde h_u + b^{(r)} \biggr) \\ i_u &= \sigma \biggl( W^{(i)} x_u + U^{(i)} \tilde h_u + b^{(i)} \biggr) \\ o_u &= \sigma \biggl( W^{(o)} x_u + U^{(o)} \tilde h_u + b^{(o)} \biggr) \\ f_{uk} &= \sigma \biggl( W^{(f) }x_u + U^{(f)} h_k + b^{(f)} \biggr) , \forall k \in ch(u) \\ c_u &= i_u \odot r_u + \sum_{k \in ch(u)} f_{uk} \odot c_k \\ h_u &= o_u \odot \tanh (c_u) \end{align} \noindent with the term $x_u$ denoting unit input, $h_k$ and $c_k$ are, respectively, the hidden state and the memory cell state of the $k$-th child, $\sigma$ sigmoid function and $\odot$ the elmentwise product. As every LSTM it has the three gates, in particular there is a forget gate for every child but all of them share the same parameters.\\ \item[N-ary TreeLSTM:] this TreeLSTM variant allows to discriminate children by their position with respect to the siblings, while needing to fix a priori the maximum outdegree of the tree. Let $u$ be the generic node, the associated TreeLSTM cell activations are as follows \begin{align} r_u &= \tanh \biggl( W^{(r)} x_u + \sum_{\ell=1}^N U_\ell^{(r)} h_{ch_{\ell}(u)} + b^{(r)} \biggr) \\ i_u &= \sigma \biggl( W^{(i)} x_u + \sum_{\ell=1}^N U_\ell^{(i)} h_{ch_{\ell}(u)} + b^{(i)} \biggr) \\ o_u &= \sigma \biggl( W^{(o)} x_u + \sum_{\ell=1}^N U_\ell^{(o)} h_{ch_{\ell}(u)} + b^{(o)} \biggr) \\ \begin{split} f_{uk} &= \sigma \biggl( W^{(f)} x_u + \sum_{\ell=1}^N U_{k\ell}^{(f)} h_{ch_{\ell}(u)} + b^{(f)} \biggr), \\ \forall k &= 1,2,\ldots,N \label{forgetgatepar} \end{split} \\ c_u &= i_u \odot r_u + \sum_{\ell=1}^N f_{u\ell} \odot c_{ch_{\ell}(u)} \\ h_u &= o_u \odot \tanh (c_u) \end{align} \noindent with the term $x_u$ denoting unit input, $h_{ch_{\ell}(u)}$ and $c_{ch_{\ell}(u)}$ are, respectively, the hidden state and the memory cell state of the $\ell$-th child, $\sigma$ is the sigmoid function and $\odot$ is the element-wise product. The introduction of separate parameter matrices for each child allows the model to learn more fine-grained conditioning on the states of a unit's children. Equation \eqref{forgetgatepar} shows a parametrization of the $k$-th child's forget gate $f_{uk}$ that allows more flexible control of information propagation from child to parent and it can be also used to control the influence between siblings. \end{description} \section{Experiments and Results} \label{sect:exp} In this section, we empirically evaluate the TreeLSTM types surveyed in Section \ref{sect:mod} in three different classes of tree transduction tasks. All tasks are based on real-world data and have been chosen as they allow to further compare with other approaches in literature. Model selection choices have been performed on hold-out validation data and final performance is assessed on further hold-out test data. A $L_{2}$ penalization term has been added to the loss function for the sake of model regularization, using a penalization weight fixed to $\lambda = 10^{-4}$. The only hyperparameter in model selection is the number of LSTM units, chosen in $\{ 100, 150, 200, 250, 300, 350, 400\}$, and we have used a standard Adam optimizer \cite{adam}. For the sake of compactness, we only report test-set results, obtained by averaging on 10 independent runs with random weights initializations (variance is not reported, if less than millesimal). The first experiment assesses TreeLSTM models on structure-to-element transductions by means of two tree classification tasks coming from the INEX 2005 and INEX 2006 competitions \cite{Inex} (task INEX20xx in the following). Both dataset are multiclass classification tasks based on trees that represent XML documents from different thematic classes. The datasets are provided with standard splits in training and test sets: for model selection purposes we held out 10\% of the former to define the validation set (by stratification, to preserve the dataset class ratios in the folds). All TreeLSTM models used a LogSoftMax layer in output and a Negative Log-Likelihood loss. Performance on both INEX20xx datasets are evaluated in terms of classification accuracy, reported in Table \ref{tab:inex05} and \ref{tab:inex06} for the model-selected configurations of each TreeLSTM model. These results highlight how the BU approaches outperform TD approaches in structure-to-element transductions. This is due to the fact that a BU encoding results in node hidden activations that summarize information concerning the whole subtree rooted on the node. When compared to other state-of-the-art approaches, the TreeLSTMs show very competitive results in INEX 2005 (where the best accuracy is $97.15\%$, attained by PAK-PT \cite{bestinex05}) while the ChildSum TreeLSTM has the best performance in INEX 2006 (the runner up being the Jaccard kernel in \cite{bestkernel06}, with an accuracy of $45.06\%$). \begin{table}[tb] \begin{minipage}{0.46\textwidth} \caption{Inex05 Test Results} \centering \begin{tabular}{c} \newcommand\T{\rule{0pt}{2.5ex}} \resizebox{\textwidth}{!} { \begin{tabular}{l|c} \multicolumn{1}{c|}{\bf{Model}} & \bf{Accuracy \%}\\ \hline \T TD-TreeLSTM & 62.05\\ ChildSum TreeLSTM & 82.85\\ \bf{N-ary TreeLSTM} & \bf{96.89} \\ \end{tabular} } \label{tab:inex05} \end{tabular} \end{minipage} \begin{minipage}{0.49\textwidth} \caption{Inex06 Test Results} \centering \begin{tabular}{c} \newcommand\T{\rule{0pt}{2.5ex}} \resizebox{\textwidth}{!} { \begin{tabular}{l|c} \multicolumn{1}{c|}{\bf{Model}} & \bf{Accuracy \%}\\ \hline \T TD-TreeLSTM & 25.07\\ \bf{ChildSum TreeLSTM} & \bf{46.12}\\ N-ary TreeLSTM & 38.57 \\ \end{tabular} } \label{tab:inex06} \end{tabular} \end{minipage} \end{table} The second experiment is focused on the assessment of TreeLSTM models on structure-to-substructure transductions based on the CLwritten corpus \cite{CLcorpora}. This is a benchmark dataset for sentence compression techniques which is based on sentences from written sources whose ground truth shortened versions were created manually. Here, the annotators were asked to produce the smallest possible target compression by deleting extraneous words from the source, without changing the word order and the meaning of the sentences. The original corpus provides sentences in sequential form (see \cite{CLcorpora} for more details). The corresponding tree representation has been obtained using the (constituency) \emph{Stanford Parser} \cite{stanfordparser} on the original sentences. Node labels in the resulting trees are of two kind: leaves are labeled with vocabulary words, represented through \emph{word embeddings} obtained using the \emph{word2vec} \cite{word2vec}. Internal nodes are labelled with semantic categories that are, instead, represented using a one-hot encoding. For model selection and validation purposes we have split the corpus in $903$ training trees, $63$ validation samples and $882$ test trees, along the lines of the experimental setup defined for the baseline models in \cite{LapataCompress,compressLSTM}. The TreeLSTM output is generated by a layer of sigmoid neurons, where an activation smaller than $0.5$ represents the fact that the corresponding input node is not present in the output tree, while the opposite means that the node (and the corresponding word) is preserved. The associated loss is, indeed, the Binary Cross Entropy. Performance on the corpus has been assessed using two metrics assessing different aspects of compression quality: \begin{description} \item[accuracy or importance factor:] this metric measures how much of the important information is retained. Accuracy is evaluated using \emph{Simple String Accuracy} (SSA) \cite{ssa}, which is based on the string edit distance between the compressed output generated by the model and the reference ground-truth compression; \item[compression rate:] this metric measures how much of the original sentence remains after compression. Compression rate is defined as the length of the compressed sentence divided by the original length, so lower values indicate more compression; \end{description} During training, early stopping decisions are taken by considering an hybrid metric, which trades off accuracy and compression according to the following definition \[ t = \frac{\text{accuracy}^2}{\text{compression rate}}. \] Table \ref{tab:compression} reports the performance values for the CLWritten task. Here it is evident that the TD approach outperforms both BU approaches. As in the first experiment, this is due to the characteristics of the transduction task. In a parse tree the words occur only at leaves and a disambiguation of their interpretation can be performed only by considering their context, which can only come from their ancestors because they have no children by definition. Hence, it follows that a parent-to-children information flow is more relevant than a children-to-parent one to determine if a word, represented necessarily by a leaf node, has to be included or not in a summary. The best result in literature for the task is obtained by a LSTM applied to the original sequential representation of the data, achieving less than $70\%$ in accuracy and about $82\%$ in compression. This marks the clear advantage of using a TD tree transduction approach, as the corresponding TreeLSTM outperforms the sequential model both in accuracy and compression. \begin{table}[tb] \begin{minipage}{\textwidth} \caption{CLWritten summarization results: the reference compression value for the gold-standard compressions is $70.41$.} \centering \begin{tabular}{c} \newcommand\T{\rule{0pt}{2.5ex}} \begin{tabular}{l|c|c} \multicolumn{1}{c|}{\bf{Model}} & \bf{Accuracy \%} & \bf{Compression \%}\\ \hline \T \bf{TD-TreeLSTM} & \bf{73.58} & \bf{72.37}\\ ChildSum TreeLSTM & 63.17 & 84.01\\ N-ary TreeLSTM & 63.41 & 91.46\\ \end{tabular} \label{tab:compression} \end{tabular} \vspace{.4cm} \end{minipage} \end{table} The last experiment assesses the TreeLSTM models on an isomorph structure-to-structure transduction. The task requires to relabel an input tree into an isomorphic structure with changed labels. This is applied to the problem of inferring the semantic categories of a parse tree (grammar induction), given the structure of the parse tree and knowledge on the labels of the leaves (i.e. the words in the sentences). To this end, we have used the Treebank2 dataset focusing, in particular, on the Wall Street Journal (WSJ) subset of trees. Due to the fact that output labels can be assigned taking values from a discrete set, the output layers used to label internal nodes is of LogSoftMax type (with Negative Log-Likelihood as training loss). For our experiments, we used the standard WSJ partition, where sections 2-21 are used for training, section 22 for validation, and section 23 for testing. The performance metric for the task is label accuracy (computed as the proportion of correctly inferred semantic categories for each parse tree). Table \ref{tab:treebank} reports the resulting accuracies for the TreeLSTM models: we were not able to obtain results for the N-ary TreeLSTM configuration within reasonable computing time ($2$ weeks) for this task, due to its computational complexity. Nevertheless, results highlight how the BU approach based on the ChildSum encoding outperforms the TD one. As in the first experiment, relevant information on this task flows from the leaves to the root, i.e. from the sentence words, which are observable, to the internal nodes, where we want to infer the missing semantic categories. \begin{table} \begin{minipage}{\textwidth} \caption{Treebank2 Test Results} \centering \begin{tabular}{c} \newcommand\T{\rule{0pt}{2.5ex}} \begin{tabular}{l|c} \multicolumn{1}{c|}{\bf{Model}} & \bf{Test Accuracy \%}\\ \hline \T TD-TreeLSTM & 49.56\\ \bf{ChildSum TreeLSTM} & \bf{95.23}\\ \end{tabular} \label{tab:treebank} \end{tabular} \end{minipage} \end{table} Comparison with the start-of-the-art can't be done due to the fact we used a restricted set of the output labels, so comparisons would be unfair. \section{Concluding Remarks} \label{sect:conc} We surveyed different TreeLSTM architectures and parameterizations, providing an empirical assessment of their performance on learning different types of constrained tree transductions. Our analysis, not unsurprisingly, concluded that there is no single best configuration for all transduction problems. In general, one must choose the model which computes the structural encoding following a direction of elaboration akin to the information flow in the structure. This said, in the majority of cases, the BU approach proved more effective than the TD, thanks to the fact that in BU approaches, the state of a node summarizes the information of its rooted subtree. Moreover, we showed that TreeLSTMs have competitive performances with respect to the state-of-the-art models in all types of structured transductions. \section*{Acknowledgment} This work has been supported by the Italian Ministry of Education, University, and Research (MIUR) under project SIR 2014 LIST-IT (grant n. RBSI14STDE).
\section{Introduction} \label{sec:intro} Exactly solvable lattice models have found numerous applications in the study of special functions. (See \cite{KorepinBogoliebovIzergin, KuperbergASM, LascouxSix, LLTFlag, GorbounovKorff, GorbounovKorffStroppel, WheelerZJGrothendieck, KnutsonZGPuzzles} to name but a few.) Here we use the Gelfand school interpretation of ``special function,'' meaning one that arises as a matrix coefficient of a group representation. If the group is a complex Lie group or a $p$-adic reductive group, these matrix coefficients include highest weight characters and in particular, Schur polynomials, as well as Demazure characters and various specializations and limits of Macdonald polynomials. Many of these special functions may be studied by methods originating in statistical mechanics, by expressing them as a multivariate generating function (the ``partition function'') over the admissible states of a solvable lattice model. The term ``solvable'' means that the model possesses a solution of the Yang-Baxter equation that often permits one to express the partition function of the model in closed form. Knowing that a special function is expressible as a partition function of a solvable lattice model then leads to a host of interesting combinatorial properties, including branching rules, exchange relations under Hecke operators, Pieri- and Cauchy-type identities, and functional equations. We will concentrate on the five- and six-vertex models on a square lattice, two-dimensional lattice models with five (respectively, six) admissible configurations on the edges adjacent to any vertex in the lattice. The latter models are sometimes referred to as ``square ice'' models, as the six configurations index the ways in which hydrogen atoms may be placed on two of the four edges adjacent to an oxygen atom at each vertex. Then weights for each configuration may be chosen so that the partition function records the probability that water molecules are arranged in any given way on the lattice (see for example \cite{Baxter}). More recently, lattice models with different weighting schemes have been studied in relation with certain stochastic models like the Asymmetric Simple Exclusion Process (ASEP) or the Kardar-Parisi-Zhang (KPZ) stochastic partial differential equation. These were shown to be part of a large family of solvable lattice models, called stochastic higher spin six-vertex models in \cite{BorodinAIM, CorwinPetrov}. Solutions to the Yang-Baxter equation also arise naturally from R-matrices of quantum groups; these higher spin models were associated to R-matrices for $U_q(\widehat{\mathfrak{sl}}_2)$. In this paper, we only make use of the associated quantum groups to differentiate among the various lattice model weighting schemes and the resulting solutions to the Yang-Baxter equations. Subsequently, Borodin and Wheeler \cite{BorodinWheelerColored} introduced generalizations of the above models, which they call colored lattice models. Antecedents to these colored models appeared earlier in \cite{BorodinBufetovWheeler, FodaWheeler}. (A different notion of ``colored'' models appears in many other works such as~\cite{AkutsuDeguchiOhtsuki}.) In~\cite{BorodinWheelerColored}, ``colors'' are additional attributes introduced to the boundary data and internal edges of a given model, corresponding to replacing the governing quantum group $U_q(\widehat{\mathfrak{sl}}_2)$ in the setting mentioned above by $U_q(\widehat{\mathfrak{sl}}_{r+1})$. The partition functions of their colored lattice models are non-symmetric \emph{spin} Hall-Littlewood polynomials. These are functions depending on a parameter $s$, which recover non-symmetric Hall-Littlewood polynomials when one sets $s=0$. The idea of introducing ``color'' in this way may be applied to a wide variety of lattice models. If one chooses the Boltzmann weights for the colored models appropriately, then one obtains a refinement of the (uncolored) partition function as a sum of partition functions indexed by all permutations of colors. Moreover, if the resulting colored model is solvable, then similar applications to those described above will follow. For example in~\cite{BorodinWheelerColored}, properties for these generalizations of Hall-Littlewood polynomials are proved including branching rules, exchange relations under Hecke divided-difference operators and Cauchy type identities motivated by the study of multi-species versions of the ASEP. Inspired by these ideas of Borodin and Wheeler, this paper studies colored versions of an (uncolored) five-vertex model whose partition function is (up to a constant) a Schur polynomial $s_\lambda$ indexed by a partition $\lambda$. The states of the uncolored system are in bijection with the set of semi-standard Young tableaux of shape $\lambda$, so the above closed form of the partition function is a reformulation of the classical combinatorial definition of the Schur function. This uncolored five-vertex model is a degeneration (crystal limit) of a six-vertex model described in Hamel and King~\cite{HamelKing}, that is similarly equivalent to the generalization of the combinatorial definition of the Schur function by Tokuyama~\cite{Tokuyama}. These models were shown to be solvable by Brubaker, Bump and Friedberg~\cite{hkice}. See Section~\ref{sec:kansas} for the full definition of the uncolored five-vertex model used in this paper. In Section \ref{sec:oz} we introduce our colored five-vertex model. A color is assigned to each of the $r$ rows of its rectangular lattice and permuting these colors gives a system for each element of the symmetric group $S_r$. We find Boltzmann weights for the colored models that simultaneously refine the uncolored model and produce a (colored) Yang-Baxter equation associated to a quantum superalgebra (see Theorem~\ref{coloredybethm}). This allows us to evaluate the partition functions for the colored models for each $w \in S_r$ and prove in Theorem~\ref{zdematoms} that they are \textit{Demazure atoms}. Demazure atoms, introduced by Lascoux and Sch\"{u}tzenberger~\cite{LascouxSchutzenbergerKeys} and referred to as ``standard bases'' there, decompose Demazure characters into their smallest non-intersecting pieces. So in particular, summing Demazure atoms over a Bruhat interval produces Demazure characters. Mason~\cite{MasonAtoms} coined the term ``atoms'' and showed that they are specializations of non-symmetric Macdonald polynomials of Cartan type~A with $q=t=0$. Basic properties of Demazure atoms and characters are reviewed in Section~\ref{sec:do}. Demazure characters and Schur polynomials may be viewed as polynomial functions in formal variables or as functions on an algebraic torus associated to a given reductive group. But they may also be lifted to subsets of the Kashiwara-Nakashima~\cite{KashiwaraNakashima} crystal $\mathcal{B}_\lambda$ whose elements are semistandard Young tableaux of a given shape $\lambda$, called \textit{Demazure crystals}. The existence of such a lift of Demazure modules to crystals was shown by Littelmann~\cite{LittelmannYT} and Kashiwara~\cite{KashiwaraDemazure}. Summing the weights of the Demazure crystal recovers the Demazure character. Just as Littelmann and Kashiwara lifted Demazure characters to the crystal, polynomial Demazure atoms may also be lifted to subsets of the crystal. We will call these sets \textit{crystal Demazure atoms}. Summing the weights of the crystal Demazure atom, one obtains the usual polynomial Demazure atom. Crystals and the refined Demazure character formula are briefly reviewed in Section~\ref{dcandci}. Although the theory of Demazure characters and crystals is in place for all Cartan types, most of the literature concerning Demazure atoms and the related topic of Lascoux-Sch\"utzenberger keys is for Cartan Type~A. There is a Type~C theory in~\cite{Santos} and recently~\cite{JaconLecouvey} gives a theory of Demazure atoms and keys for all Kac-Moody Cartan types. See \cite{HershLenart,AssafSchilling} for other recent work on Demazure atoms. Based on Theorem~\ref{zdematoms}, which shows that the partition functions of our colored models are Demazure atoms, it is natural to ask for a more refined version of the connection between colored ice and the crystal Demazure atoms. In Section~\ref{bijsec}, we accomplish this by exhibiting a bijection between the admissible states of colored ice and crystal Demazure atoms as a subset of an associated crystal $\mathcal{B}_\lambda$. Showing this refined bijection is much more difficult than the initial evaluation of the partition function. Its proof forms a major part of this paper and builds on Theorem~\ref{daform}, which gives an algorithmic description of Demazure atoms. This result is proved in Section~\ref{sec:dafpro} after introducing Kashiwara's $\mathcal{B}_\infty$ crystal in Section~\ref{sec:binf}. As a biproduct of our arguments, we will also obtain a theory of Demazure atoms on $\mathcal{B}_\infty$. The proofs take input from both the colored ice model and the Yang-Baxter equation, and from crystal base theory, particularly Kashiwara's $\star$-involution of~$\mathcal{B}_\infty$. Another biproduct of the results in Section \ref{bijsec} is a new formula for \textit{Lascoux-Sch\"utzenberger keys}. These are tableaux with the defining property that each column (except the first) is a subset of the column before it. What is most important is that each crystal Demazure atom contains a unique key. Thus if $T\in\mathcal{B}_\lambda$ there is a unique key $\operatorname{\bold{key}}(T)$ that is in the same crystal Demazure atom as $T$; this is called the \textit{right key} of $T$. We will review this theory in Subsection~\ref{subsec:alg}. Algorithms for computing $\operatorname{\bold{key}}(T)$ may be found in {\cite{LascouxSchutzenbergerKeys,ReinerShimozono,LenartUnified,MasonAtoms,MasonRSK,WillisThesis,ProctorWillis,WillisKey,WillisFilling,AvalKeys,Seaborn}}. In this paper we give a new algorithm for computing the Lascoux-Sch\"utzenberger right key of a tableau in a highest weight crystal. Since this algorithm may be of independent interest we will describe it (and the topic of Lascoux-Sch\"utzenberger keys) in this introduction, in Subsection~\ref{subsec:alg} below. We prove the algorithm in Section \ref{sec:algo}. This paper also serves as a stepping stone to colored versions of the six-vertex (or ``ice'' type) models of~\cite{hkice} and of~\cite{BBB}. Indeed, since the results of this paper, we have shown that analogous colored partition functions recover special values of Iwahori fixed vectors in Whittaker models for general linear groups over a $p$-adic field \cite{BBBGIwahori} and their metaplectic covers (in progress), respectively. The colored five-vertex model in this paper is a degeneration of these models. \subsection{\label{subsec:alg}Lascoux-Sch\"utzenberger keys} Type~A Demazure atoms are pieces of Schur functions: if $\lambda$ is a partition of length $\leqslant r$, the Schur function $s_{\lambda} (z_1, \cdots, z_r)$ can be decomposed into a sum, over the Weyl group $W = S_r$, of such atoms. This is an outgrowth of the Demazure character formula: if $\partial_w$ is the Demazure operator defined later in Section~\ref{sec:do} then $\partial_w \mathbf{z}^{\lambda}$ is called a \textit{Demazure character}. Originally these were introduced by Demazure~{\cite{Demazure}} to study the cohomology of line bundles on flag and Schubert varieties. A variant represents the Demazure character as $\sum_{y \leqslant w} \partial^\circ_y \mathbf{z}^{\lambda}$ where $\partial^\circ_y$ are modified operators, and $y \leqslant w$ is the Bruhat order. The components $\partial^\circ_y \mathbf{z}^{\lambda}$ are called (polynomial) {\textit{Demazure atoms}}. As we will explain in Section~\ref{sec:oz}, a state of the colored lattice model features $r$ colored lines running through a grid moving downward and rightward. These can cross, but they are allowed to cross at most once. Each line intersects the boundary of the grid in two places, and the colors are permuted depending on which lines cross. Hence they determine a permutation $w$ from this braiding, which can be encoded into the boundary conditions. This allows us to construct a system $\mathfrak{S}_{\mathbf{z}, \lambda, w}$ whose partition function satisfies the identity \begin{equation} \label{partdc} Z (\mathfrak{S}_{\mathbf{z}, \lambda, w}) =\mathbf{z}^{\rho} \partial^\circ_w \mathbf{z}^{\lambda}, \end{equation} where $\rho$ is the Weyl vector. Here the polynomial $\partial^\circ_w \mathbf{z}^{\lambda}$ is the Demazure atom. The Schur function $s_{\lambda}$ is the character of the Kashiwara-Nakashima~{\cite{KashiwaraNakashima}} crystal $\mathcal{B}_{\lambda}$ of tableaux. The Demazure character formula was lifted by Littelmann~{\cite{LittelmannYT}} and Kashiwara~{\cite{KashiwaraDemazure}} to define subsets $\mathcal{B}_{\lambda}(w) \subseteq \mathcal{B}_\lambda$ whose characters are Demazure characters $\partial_w \mathbf{z}^{\lambda}$. If $w = 1_W$ then $\mathcal{B}_{\lambda} (w) = \{ v_{\lambda} \}$ where $v_{\lambda}$ is the highest weight element. If $w_0$ is the long element then $\mathcal{B}_{\lambda} (w_0) =\mathcal{B}_{\lambda}$. If $w \leqslant w'$ in the Bruhat order then $\mathcal{B}_{\lambda} (w) \subseteq \mathcal{B}_{\lambda} (w')$. In type~A, the results of Lascoux and Sch{\"u}tzenberger~{\cite{LascouxSchutzenbergerKeys}} give an alternative decomposition of $\mathcal{B}_{\lambda}$ into disjoint subsets that we will here denote $\mathcal{B}_{\lambda}^{\circ} (w)$. Then \[ \mathcal{B}_{\lambda} (w) = \bigcup_{y \leqslant w} \mathcal{B}^{\circ}_{\lambda} (y) . \] The term \textit{Demazure atom} is used in the literature to mean two closely related but different things: the sets that we are denoting $\mathcal{B}_{\lambda}^{\circ} (w)$ or their characters, which are the functions $\partial^\circ_w \mathbf{z}^{\lambda}$. When we need to distinguish them, we will use the term {\textit{crystal Demazure atoms}} to refer to the subsets $\mathcal{B}_{\lambda}^{\circ} (w)$ while their characters will be referred to as \textit{polynomial Demazure atoms}. Since (up to the factor $\mathbf{z}^{\rho}$) the character of the colored system indexed by $w$ is the polynomial Demazure atom $\mathcal{B}^{\circ}_{\lambda} (w)$, we may hope that, when we identify the set of states of our model with a subset of $\mathcal{B}_{\lambda}$, the the set of states indexed by $w$ is $\mathcal{B}^{\circ}_{\lambda} (w)$. This is true and we will give a proof of this fact using techniques developed by Kashiwara, particularly the $\star$-involution of the $\mathcal{B}_{\infty}$ crystal, as well as (\ref{partdc}), which is proved using the Yang-Baxter equation. As a biproduct of this proof we obtain apparently new algorithms for computing Lascoux-Sch\"utzenberger right keys, which we now explain. First, we will explain a theorem of Lascoux-Sch\"utzenberger that concerns the following question: given a tableau $T \in \mathcal{B}_{\lambda}$, determine $w \in W$ such that $T \in \mathcal{B}^{\circ}_{\lambda} (w)$. The set of Demazure atoms is in bijection with the orbit $W \lambda$ in the weight lattice, and this bijection may be made explicit as follows. The weights $W \lambda$ are extremal in the sense that they are the vertices of the convex hull of the set of weights of $\mathcal{B}_{\lambda}$. Each extremal weight $w \lambda$ has multiplicity one, in that there exists a unique element $u_{w \lambda}$ of $\mathcal{B}_{\lambda}$ with weight $w \lambda$. These extremal elements are called \textit{key tableaux}, and they may be characterized by the following property: if $C_1, \ldots, C_k$ are the columns of a tableau $T$, then $T$ is a key if and only if each column $C_i$ contains $C_{i + 1}$ elementwise. Lascoux and Sch\"utzenberger proved that every crystal Demazure atom contains a unique key tableau, and every key tableau is contained in a unique crystal Demazure atom. The weight of the key tableau in $\mathcal{B}_\lambda^\circ(w)$ is $w\lambda$. If $T \in \mathcal{B}_{\lambda}$ let $\operatorname{\bold{key}} (T)$ be the unique key that is in the same atom as $T$. This is called the {\textit{right key}} by Lascoux and Sch{\"u}tzenberger; its origin is in the work of Ehresmann~{\cite{Ehresmann}} on the topology of flag varieties. (There is also a \textit{left key}, which is $\operatorname{\bold{key}}(T')'$, where $T \mapsto T'$ is the Sch{\"u}tzenberger (Lusztig) involution of $\mathcal{B}_{\lambda}$.) We will describe two apparently new algorithms that compute $\operatorname{\bold{key}} (T')$ and $\operatorname{\bold{key}} (T)$, respectively. The algorithms depend on a map $\omega:\mathcal{B}_\lambda\rightarrow W$ such that if $w=w_0\omega(T)$ then $T\in\mathcal{B}_\lambda^\circ(w)$. Thus $\operatorname{\bold{key}}(T)$ is determined by the condition that $\operatorname{wt}\bigl(\operatorname{\bold{key}}(T)\bigr)=w\lambda = w_0\omega(T)\lambda$. The extremal weight $w\lambda$ has multiplicity one in the crystal $\mathcal{B}_\lambda$, so the unique key tableau $\operatorname{\bold{key}}(T)$ with that weight is determined by $w\lambda$. To compute it, the most frequently occurring entry (as specified by the weight) must appear in every column of $\operatorname{\bold{key}}(T)$, the next most frequently occurring entry must then appear in every remaining, non-filled column, and so on. The entries of the columns are thus determined, and arranging each column in ascending order we get~$\operatorname{\bold{key}}(T)$. Given a tableau $T$, the first algorithm computes $\omega(T')$, and the second algorithm computes $\omega(T)$. The two algorithms depend on the notion of a \textit{nondescending product} of a sequence of simple reflections $s_i$ in the Weyl group $W$. Let $i_1, \cdots, i_k$ be a sequence of indices and define the \textit{nondescending product} $\Pi_{\operatorname{nd}}(s_{i_1},\cdots,s_{i_k})$ to be $s_{i_1}$ if $k=1$ and then recursively \begin{equation} \label{pinddef} \Pi_{\operatorname{nd}} (s_{i_1}, \cdots, s_{i_k}) = \left\{ \begin{array}{ll} s_{i_1} \pi & \text{if $s_{i_1} \pi > \pi$}\\ \pi & \text{otherwise}, \end{array} \right. \end{equation} where $\pi = \Pi_{\operatorname{nd}} (s_{i_2}, \cdots, s_{i_k})$. \begin{remark} \label{heckecompute} There is another way of calculating the nondescending product. There is a degenerate Hecke algebra $\mathcal{H}$ with generators $S_i$ subject to the braid relations and the quadratic relation $S_i^2 = S_i$.\footnote{It may be worth remarking that these are the same relations satisfied by the Demazure operators $\partial_i$.} Given $w \in W$, set $S_w = S_{j_1} \cdots S_{j_{\ell}}$ where $w = s_{j_1} \cdots s_{j_{\ell}}$ is a reduced expression. Then the $S_w$ ($w\in W$) form a basis of $\mathcal{H}$, and we will denote by $\{ \cdot \}$ the map from this basis to $W$ that sends $S_w$ to $w$. Then \[\Pi_{\operatorname{nd}}(s_{i_1}, \cdots, s_{i_k}) = \{S_{i_1}\cdots S_{i_k}\}\;.\] \end{remark} An element $T$ of $\mathcal{B}_\lambda$ is a semistandard Young tableau with entries in $\{1,2,\ldots,r\}$ and shape $\lambda$. There is associated with $T$ a Gelfand-Tsetlin pattern $\Gamma(T)$ as follows. The top row is the shape $\lambda$; the second row is the shape of the tableau obtained from $T$ by erasing all entries equal to $r$. The third row is the shape of the tableau obtained by further erasing all $r-1$ entries, and so forth. For example suppose that $r=4$, $\lambda=(5,3,1)$. Here is a tableau and its Gelfand-Tsetlin pattern: \begin{equation} \label{examplepats} T=\begin{ytableau}1&1&2&4&4\\2&3&4\\3\end{ytableau}\;,\qquad \Gamma(T)=\left\{\begin{array}{cccccccccc}5&&3&&1&&0\\&3&&2&&1\\&&3&&1\\&&&2\end{array}\right\}\;. \end{equation} \subsection*{First algorithm} To compute $\omega(T')$, we decorate the Gelfand-Tsetlin pattern as follows. For each subtriangle \[\begin{array}{ccc}x&&y\\&z\end{array}\] if $z=y$ then we circle the $z$. We then transfer the circles in the Gelfand-Tsetlin pattern to the following array: \begin{equation} \label{gamcirc} \left[\begin{array}{ccccccc} s_1&&s_2&&\cdots&&s_{r-1}\\ &\ddots&&\vdots&&\iddots\\ &&s_1&&s_2\\ &&&s_1 \end{array}\right]\;. \end{equation} Note that the array of reflections has one fewer row than the first, but that circling cannot happen in the top row of the Gelfand-Tsetlin pattern. Now we traverse this array in the order bottom to top, right to left. We take the subsequence of circled entries in the indicated order, and their nondescending product is $\omega(T')$. \subsection*{Second algorithm} To compute $\omega(T)$, we decorate the Gelfand-Tsetlin pattern as follows. For each subtriangle \[\begin{array}{ccc}x&&y\\&z\end{array}\] if $z=x$ then we circle the $z$. We then transfer the circles in the Gelfand-Tsetlin pattern to the following array: \begin{equation} \label{delcirc} \left[\begin{array}{ccccccc} s_1&&s_2&&\cdots&&s_{r-1}\\ &\ddots&&\vdots&&\iddots\\ &&s_{r-2}&&s_{r-1}\\ &&&s_{r-1} \end{array}\right]\;. \end{equation} Now we traverse this array in the order bottom to top, left to right. We take the subsequence of circled entries in the indicated order, and their nondescending product is $\omega(T)$. \bigbreak Let us illustrate these algorithms with the example (\ref{examplepats}). For the first algorithm, we obtain the following circled Gelfand-Tsetlin pattern and array of simple reflections \[\left\{\vcenter{\xymatrix@-2pc{5&&3&&1&&0\\&*+[o][F-]{3}&&2&&{1}\\&&{3}&&*+[o][F-]{1}\\&&&2}}\right\}\;,\qquad \left[\vcenter{\xymatrix@-2pc{*+[o][F-]{s_1}&&s_2&&{s_3}\\&{s_1}&&*+[o][F-]{s_2}\\&&s_1}}\right] \] The first algorithm predicts that if $T'$ is the Sch\"utzenberger involute of $T$ then $\omega(T')=s_2s_1$, which is the nondescending product of the circle entries in the order bottom to top, right to left. Thus $w_0\omega(T')=w_0s_2s_1=s_1s_2s_3s_2$. We claim that $\operatorname{\bold{key}}(T')$ is the unique key tableau with shape $(5,3,1,0)$ having weight $w_0\omega(T')\lambda=(0,5,1,3)$. Let us check this. The tableau $T'$ and its key (computed by Sage using the algorithm in Willis~\cite{WillisKey}) are: \[T'=\begin{ytableau}1&1&1&2&2\\3&3&4\\4\end{ytableau}\;,\qquad \operatorname{\bold{key}}(T')=\begin{ytableau}2&2&2&2&2\\3&4&4\\4\end{ytableau}\;.\] As claimed $\operatorname{wt}(\operatorname{\bold{key}}(T'))=w_0\omega(T')\lambda$. For the second algorithm, there are two circled entries, and we transfer the circles to the array of reflections as follows: \[\left\{\vcenter{\xymatrix@-2pc{5&&3&&1&&0\\&{3}&&2&&*+[o][F-]{1}\\&&*+[o][F-]{3}&&1\\&&&2}}\right\}\;,\qquad \left[\vcenter{\xymatrix@-2pc{{s_1}&&s_2&&*+[o][F-]{s_3}\\&*+[o][F-]{s_2}&&s_3\\&&s_3}}\right] \] Thus $\omega(T)=s_2s_3$ is the (nondescending) product in the order bottom to top, left to right. Then if $w=w_0s_2s_3=s_3s_1s_2s_1$, the right key of $T$ is determined by the condition that its weight is $w\lambda=(1,3,0,5)$. Indeed, the right key of $T$ is \[\operatorname{\bold{key}}(T)=\begin{ytableau}1&2&2&4&4\\2&4&4\\4\end{ytableau}\;.\] This is the unique key tableau with shape $(5,3,1,0)$ and weight $(1,3,0,5)$. The two algorithms hinge on Theorem~\ref{daform}, which refines results on keys due to Lascoux and Sch\"{u}tzenberger \cite{LascouxSchutzenbergerKeys}. The proof of Theorem~\ref{daform} is detailed in the subsequent three sections of the paper, and the resulting algorithms are proved in Section~\ref{sec:algo}. \subsection{A sketch of the proofs} In Section~\ref{sec:kansas} we review the \textit{Tokuyama model} (in its crystal limit), a statistical-mechanical system $\mathfrak{S}_{\mathbf{z},\lambda}$ whose partition function is $\mathbf{z}^\rho s_\lambda(\mathbf{z})$ in terms of the Schur function $s_\lambda$ (Proposition~\ref{zschur}). The states of this 5-vertex model system are in bijection with $\mathcal{B}_\lambda$. For $w\in W$ we will describe a refinement $\mathfrak{S}_{\mathbf{z},\lambda,w}$ of this system in Section~\ref{sec:oz} whose states are a subset of those of $\mathfrak{S}_{\mathbf{z},\lambda}$. The Weyl group element $w$ is encoded in the boundary conditions. Thus the set of states of $\mathfrak{S}_{\mathbf{z},\lambda,w}$ may be identified with a subset of $\mathcal{B}_\lambda$. If $S$ is a subset of a crystal, the \textit{character} of $S$ is $\sum_{v\in S}\mathbf{z}^{\operatorname{wt}(v)}$. Using a Yang-Baxter equation, in Theorem~\ref{zdematoms}, are able to prove a recursion formula for the character of $\mathfrak{S}_{\mathbf{z},\lambda,w}$, regarded as a subset of $\mathcal{B}_\lambda$, and this is the same as the character of the crystal Demazure atom $\mathcal{B}_\lambda^\circ(w)$. This suggests but does not prove that the states of $\mathfrak{S}_{\mathbf{z},\lambda,w}$ comprise $\mathcal{B}_\lambda^\circ(w)$. The equality of $\mathfrak{S}_{\mathbf{z},\lambda,w}$ and $\mathcal{B}_\lambda^\circ(w)$ is Theorem~\ref{daform}. Leveraging the information in Theorem~\ref{zdematoms} into a proof of Theorem~\ref{daform} is accomplished in Sections~\ref{sec:binf} and~\ref{sec:dafpro} using methods of Kashiwara~\cite{KashiwaraDemazure}, namely transferring the problem to the infinite $\mathcal{B}_\infty$ crystal, then using Kashiwara's $\star$-involution of that crystal to transform and solve the problem. The information that we obtained from the Yang-Baxter equation in Theorem~\ref{zdematoms} is used at a key step (\ref{eq:keystep}) in the proof. A more detailed outline of these proofs will be given near the beginning of Section~\ref{sec:binf}. The two algorithms are treated in Section~\ref{sec:algo}, but the key insight is earlier in Theorem~\ref{crystalmt}, where the first algorithm is proved for $\mathfrak{S}_{\mathbf{z},\lambda,w}$. The idea is that the unique permutation $w$ such that a given state of $\mathfrak{S}_{\mathbf{z},\lambda}$ lies in of $\mathfrak{S}_{\mathbf{z},\lambda,w}$ is determined by the pattern of crossings of colored lines; these crossings correspond to the circled entries in (\ref{gamcirc}). Then with Theorem~\ref{daform} in hand, the result applies to $\mathcal{B}^\circ_\lambda(w)$. The second algorithm is deduced from the first using properties of crystal involutions. \bigbreak \textbf{Acknowledgements:} This work was supported by NSF grants DMS-1801527 (Brubaker) and DMS-1601026 (Bump). Buciumas was supported by ARC grant DP180103150. Gustafsson was at Stanford University (his affiliation at the date of submission) supported by the Knut and Alice Wallenberg Foundation. We thank Amol Aggarwal, Alexei Borodin, Vic Reiner, Anne Schilling, Michael Wheeler and Matthew Willis for helpful conversations and communications. We thank the referees for useful comments which improved the exposition of the paper. \section{\label{sec:do}Demazure operators} Let us review the theory of Demazure operators. Let $\Phi$ be a root system with weight lattice $\Lambda$, which may be regarded as the weight lattice of a complex reductive Lie group $G$. Thus if $T$ is a maximal torus of $G$, then we may identify $\Lambda$ with the group $X^{\ast} (T)$ of rational characters of $T$. If $\mathbf{z} \in T$ and $\lambda \in \Lambda$ we will denote by $\mathbf{z}^{\lambda}$ the application of $\lambda$ to $\mathbf{z}$. Let $\mathcal{O} (T)$ be the set of polynomial functions on $T$, that is, finite linear combinations of the functions $\mathbf{z}^{\lambda}$. We decompose $\Phi$ into positive and negative roots, and let $\alpha_i$ ($i\in I$) be the simple positive roots, where $I$ is an index set. Let $\alpha_i^{\vee} \in X_{\ast} (T)$ denote the corresponding simple coroots and $s_i$ the corresponding simple reflections generating the Weyl group $W$. To each simple reflection $s_i$ with $i\in I$, we define the isobaric Demazure operator acting on $f \in \mathcal{O} (T)$ by \begin{equation} \label{isobaricddefined} \partial_i f (\mathbf{z}) = \frac{f (\mathbf{z})-\mathbf{z}^{-\alpha_i} f (s_i \mathbf{z})} {1 -\mathbf{z}^{-\alpha_i}}. \end{equation} The numerator is divisible by the denominator, so the resulting function is again in $\mathcal{O}(T)$. It is straightforward to check that $\partial^2_i = \partial_i = s_i \partial_i$. Given any $\mu \in \Lambda$, set $k = \langle \mu, \alpha_i^{\vee} \rangle$ so $s_i (\mu) = \mu - k\alpha_i$. Then the action on the monomial $\mathbf{z}^{\mu}$ is given by \begin{equation} \partial_i \mathbf{z}^{\mu} = \left\{ \begin{array}{ll} \mathbf{z}^{\mu} +\mathbf{z}^{\mu - \alpha_i} + \ldots +\mathbf{z}^{s_i (\mu)} & \text{if $k \geqslant 0$,}\\ 0 & \text{if $k = - 1$,}\\ - (\mathbf{z}^{\mu + \alpha_i} +\mathbf{z}^{\mu + 2 \alpha_i} + \ldots +\mathbf{z}^{s_i (\mu + \alpha_i)}) & \text{if $k < - 1$} . \end{array} \right. \end{equation} We will also make use of $\partial^\circ_i:=\partial_i-1$, that is \[\partial^\circ_i f(\mathbf{z}):= \frac{f(\mathbf{z})-f(s_i\mathbf{z})}{{\mathbf{z}^{\alpha}_i-1}}.\] Both $\partial_i$ and $\partial^\circ_i$ satisfy the braid relations. Thus \[\partial_{i}\partial_j\partial_i\cdots = \partial_j\partial_i\partial_j\cdots,\] where the number of terms on both sides is the order of $s_is_j$ in $W$, and similarly for the $\partial^\circ_i$. These are proved in~\cite{BumpLie}, Proposition~25.1 and Proposition~25.3. (There is a typo in the second Proposition where the wrong font is used for $\partial_i$.) Consequently to each $w \in W$, and any reduced decomposition $w = s_{i_1} \cdots s_{i_k}$, we may define $\partial_w = \partial_{i_1} \cdots \partial_{i_k}$ and $\partial^\circ_w = \partial^\circ_{i_1} \cdots \partial^\circ_{i_k}$. For $w = 1$ we let $\partial_1 = \partial^\circ_1 = 1$. Let $w_0$ be the long Weyl group element. If $\lambda$ is a dominant weight let $\chi_{\lambda}$ denote the character of the irreducible representation $\pi_{\lambda}$ with highest weight $\lambda$. The {\textit{Demazure character formula}} is the identity, for $\mathbf{z}\in T$: \[ \chi_{\lambda} (\mathbf{z}) = \partial_{w_0} \mathbf{z}^{\lambda} . \] For a proof, see~\cite{BumpLie}, Theorem~25.3. More generally for any Weyl group element $w$, we may consider $\partial_w\mathbf{z}^\lambda$. These polynomials are called \textit{Demazure characters}. Next we review the theory of (polynomial) \textit{Demazure atoms}. These are polynomials of the form $\partial^\circ_w\mathbf{z}^\lambda$. They were introduced in type~A by Lascoux and Sch\"utzenberger~\cite{LascouxSchutzenbergerKeys}, who called them ``standard bases.'' The modern term ``Demazure atom'' was introduced by Mason in~\cite{MasonAtoms}, who showed that they are specializations of nonsymmetric Macdonald polynomials, among other things. The following theorem, done for type~A in~\cite{LascouxSchutzenbergerKeys}, relates Demazure characters and Demazure atoms and is valid for any finite Cartan type. \begin{theorem} \label{thm:lskeys} Let $f\in\mathcal{O}(T)$. Then \begin{equation} \label{phidemaz} \partial_{w}f(\mathbf{z})=\sum_{y\leqslant w}\partial^\circ_{y}f(\mathbf{z}). \end{equation} \end{theorem} \begin{proof} We prove this by induction with respect to the Bruhat order. Setting $\phi (w) := \partial^\circ_w f(\mathbf{z})$ and assuming the theorem for $w$, we must show that for any $s_i$ with $s_i w > w$ in the Bruhat order, \begin{equation} \label{inductionstep} \sum_{y\leqslant s_iw}\phi(y)=\partial_{s_iw} f(\mathbf{z}). \end{equation} We recall ``Property~Z'' of Deodhar~{\cite{DeodharCharacterizations}}, which asserts that if $s_i w > w$ and $s_i y > y$ then the following inequalities are equivalent: \[ y \leqslant w\quad \iff \quad y \leqslant s_i w \quad \iff \quad s_i y \leqslant s_i w\;.\] Using this fact we may split the sum on the left-hand side as follows \begin{equation*} \sum_{y \leqslant s_i w} \phi (y) = \sum_{\substack{y \leqslant s_i w \\ y < s_i y }} \phi (y) + \sum_{\substack{y \leqslant s_i w \\ s_i y < y}} \phi (y) = \sum_{\substack{y \leqslant s_i w \\ y < s_i y}} \phi (y) + \sum_{\substack{s_i y \leqslant s_i w \\ y < s_i y}} \phi (s_i y) = \sum_{\substack{ y \leqslant w\\ y < s_i y}} \bigl(\phi (y) + \phi (s_i y) \bigr) \, . \end{equation*} If $s_iw>w$ then \begin{equation} \label{partialrecurse} \phi(w)+\phi(s_iw)=\partial_i\phi(w). \end{equation} Indeed, since $\partial_i=\partial^\circ_i+1$, this is another way of writing \[\partial^\circ_{s_iw}f(\mathbf{z})=\partial^\circ_i\partial^\circ_w\,f(\mathbf{z})\,,\] which follows from the definitions. Using (\ref{partialrecurse}), we obtain \begin{equation} \label{partialcomp} \sum_{y \leqslant s_i w} \phi (y) = \partial_i \Bigl( \sum_{\substack{y \leqslant w\\ y < s_i y}} \phi (y) \Bigr) . \end{equation} Still assuming $s_iw>w$ we will prove that \begin{equation} \label{partialsimp} \partial_i \sum_{\substack{ y \leqslant w\\ y < s_i y}} \phi (y) = \partial_i \sum_{y \leqslant w} \phi (y) . \end{equation} We split the terms on the right-hand side into three groups and write \[ \partial_i \sum_{y \leqslant w} \phi (y) = \partial_i \sum_{\substack{ y \leqslant w\\ y < s_i y\\ s_i y \leqslant w}} \bigl( \phi (y) + \phi (s_i y) \bigr) + \partial_i \sum_{\substack{ y \leqslant w\\ y < s_i y\\ s_i y \nleqslant w}} \phi (y) . \] Now using (\ref{partialrecurse}) again this equals \[ \partial_i \sum_{\substack{ y \leqslant w\\ y < s_i y\\ s_i y \leqslant w}} \partial_i \phi (y) + \partial_i \sum_{\substack{ y \leqslant w\\ y < s_i y\\ s_i y \nleqslant w}}\phi (y), \] and remembering that $\partial_i^2 = \partial_i$ this equals \[ \partial_i \Bigl( \sum_{\substack{ y \leqslant w\\ y < s_i y\\ s_i y \leqslant w}} \phi (y) + \sum_{\substack{ y \leqslant w\\ y < s_i y\\ s_i y \nleqslant w}}\phi (y) \Bigr) = \partial_i \sum_{\substack{ y \leqslant w\\ y < s_i y}} \phi (y), \] proving (\ref{partialsimp}). Now (\ref{inductionstep}) follows using (\ref{partialcomp}), (\ref{partialsimp}) and our induction hypothesis. \end{proof} \section{\label{sec:kansas}Ice Models for $\operatorname{GL}(r)$} In statistical mechanics, an {\it ensemble} is a probability distribution over every possible admissible state (i.e., microscopic arrangement) of particles in a given physical system. The probability of any given state is measured by its {\it Boltzmann weight}, which is calculated by computing the energy associated to all local interactions between particles. If there are only finitely many admissible states in the ensemble (as in all of the examples in this paper), then the {\it partition function} is defined to be a sum of the Boltzmann weights of each state. While computing the partition function explicitly is often intractable, there is a nice class of so-called {\it solvable models}~\cite{Baxter,JimboMiwa} for which the partition function may be computed using a microscopic symmetry of the partition function known as the {\it Yang-Baxter equation}. With few exceptions, solvable models are based on two-dimensional physical systems. The \textit{six-vertex} or \textit{ice-type models} are a class of two-dimensional solvable models based on a square, planar grid in which admissible states are determined by associating one of two spins $\{ +, - \}$ to each edge. See Figure~\ref{icestate} for an example. The term \textit{six-vertex} refers to the fact that only six admissible configurations of spins are allowed on the four edges adjacent to any vertex in the grid. Similarly, \textit{five-vertex models} are systems, typically degenerations of six-vertex models, in which only five local configurations are allowed. An example of such a set of configurations can be found in Figure~\ref{uncoloredbw} where the configuration labeled $\texttt{b}_1$ is removed. In the next two sections, we will revisit all of the above terms and give precise definitions for an ensemble of admissible states and associated weights that result in a solvable model first for a five-vertex model based on the configurations in Figure~\ref{uncoloredbw}, and then generalizations thereof. Our Boltzmann weights for states will depend on several complex variables and while they will not try to model the probability distribution of a physical system, they will nonetheless result in solvable variants of the above five-vertex model whose partition functions are explicitly evaluable as Demazure atoms. More precisely, inspired by colored lattice models in Borodin and Wheeler~\cite{BorodinWheelerColored}, we will show that Demazure atoms and characters for $\operatorname{GL}(r)$ can be represented as partition functions of certain ``colored five-vertex models.'' Strictly speaking, it is no longer true that there are only five allowed configurations at a vertex. Still, the allowed configurations can be classified into five different groups, which we will denote $\tt{a}_1$, $\tt{a}_2$, $\tt{b}_2$, $\tt{c}_1$ and $\tt{c}_2$ in keeping with notational conventions of \cite{Baxter}. Before introducing the colored models, we begin with a model that is not new, but rather a special case of models due to Hamel and King~\cite{HamelKing} and Brubaker, Bump and Friedberg~\cite{hkice}. Our five-vertex models will occur on square grids inside a finite rectangle of fixed size. Then to describe the ensemble of admissible states of the model, it suffices to specify the size of the rectangle and the spins associated to edges along the boundary of this rectangle. Indeed, then the admissible states will consist of all possible assignments of spins to the remaining edges of the grid so that every vertex has adjacent edges in one of the five allowable configurations of Figure~\ref{uncoloredbw} (those not of form $\tt{b}_1$). Given an integer partition $\lambda = (\lambda_1, \ldots, \lambda_r)$ with $r$ parts, our grid will have $r$ rows and $N+1$ columns, where $N$ is a fixed integer at least $\lambda_1 + r - 1$. In order to enumerate the vertices, the columns are labeled $0$ to $N$ from right to left, and the rows are labeled $1$ to $r$ from top to bottom. Vertices occur at every crossing of rows and columns and boundary edges are those edges in the grid connected to only one vertex. The spins $\{+,-\}$ of the edges on the boundary are fixed according to the choice of $\lambda$ by the following rules. For the top boundary edges, we put~$-$ in the columns labeled $\lambda_i+r-i$ for $i \in \{1, \ldots, r\}$ and~$+$ in the remaining columns. Then, we put~$+$ on all the left and bottom boundary edges and~$-$ on the right boundary edges. As noted above, an (admissible) \textit{state} $\mathfrak{s}$ of the resulting system assigns spins to the interior edges so that each vertex is one of the five configurations in Figure~\ref{uncoloredbw} \textit{excluding} patterns of type $\tt{b}_1$, which are not allowed (or equivalently, are assigned weight $0$). An example of an admissible state for $\lambda = (2,1,0)$ and $N=4$ is given in Figure~\ref{icestate}. \begin{figure}[h] \[ \scalebox{.95}{\begin{tikzpicture} \draw [line width=0.45mm] (1,0)--(1,6); \draw [line width=0.45mm] (3,0)--(3,6); \draw [line width=0.45mm] (5,0)--(5,6); \draw [line width=0.45mm] (7,0)--(7,6); \draw [line width=0.45mm] (9,0)--(9,6); \draw [line width=0.45mm] (0,1)--(10,1); \draw [line width=0.45mm] (0,3)--(10,3); \draw [line width=0.45mm] (0,5)--(10,5); \draw[line width=0.45mm, fill=white] (1,6) circle (.35); \draw[line width=0.45mm, fill=white] (3,6) circle (.35); \draw[line width=0.45mm, fill=white] (5,6) circle (.35); \draw[line width=0.45mm, fill=white] (7,6) circle (.35); \draw[line width=0.45mm, fill=white] (9,6) circle (.35); \draw[line width=0.45mm, fill=white] (1,4) circle (.35); \draw[line width=0.45mm, fill=white] (3,4) circle (.35); \draw[line width=0.45mm, fill=white] (5,4) circle (.35); \draw[line width=0.45mm, fill=white] (7,4) circle (.35); \draw[line width=0.45mm, fill=white] (9,4) circle (.35); \draw[line width=0.45mm, fill=white] (1,2) circle (.35); \draw[line width=0.45mm, fill=white] (3,2) circle (.35); \draw[line width=0.45mm, fill=white] (5,2) circle (.35); \draw[line width=0.45mm, fill=white] (7,2) circle (.35); \draw[line width=0.45mm, fill=white] (9,2) circle (.35); \draw[line width=0.45mm, fill=white] (1,0) circle (.35); \draw[line width=0.45mm, fill=white] (3,0) circle (.35); \draw[line width=0.45mm, fill=white] (5,0) circle (.35); \draw[line width=0.45mm, fill=white] (7,0) circle (.35); \draw[line width=0.45mm, fill=white] (9,0) circle (.35); \draw[line width=0.45mm, fill=white] (0,5) circle (.35); \draw[line width=0.45mm, fill=white] (2,5) circle (.35); \draw[line width=0.45mm, fill=white] (4,5) circle (.35); \draw[line width=0.45mm, fill=white] (6,5) circle (.35); \draw[line width=0.45mm, fill=white] (8,5) circle (.35); \draw[line width=0.45mm, fill=white] (10,5) circle (.35); \draw[line width=0.45mm, fill=white] (0,3) circle (.35); \draw[line width=0.45mm, fill=white] (2,3) circle (.35); \draw[line width=0.45mm, fill=white] (4,3) circle (.35); \draw[line width=0.45mm, fill=white] (6,3) circle (.35); \draw[line width=0.45mm, fill=white] (8,3) circle (.35); \draw[line width=0.45mm, fill=white] (10,3) circle (.35); \draw[line width=0.45mm, fill=white] (0,1) circle (.35); \draw[line width=0.45mm, fill=white] (2,1) circle (.35); \draw[line width=0.45mm, fill=white] (4,1) circle (.35); \draw[line width=0.45mm, fill=white] (6,1) circle (.35); \draw[line width=0.45mm, fill=white] (8,1) circle (.35); \draw[line width=0.45mm, fill=white] (10,1) circle (.35); \path[fill=white] (1,1) circle (.2); \node at (1,1) {$z_3$}; \path[fill=white] (3,1) circle (.2); \node at (3,1) {$z_3$}; \path[fill=white] (5,1) circle (.2); \node at (5,1) {$z_3$}; \path[fill=white] (7,1) circle (.2); \node at (7,1) {$z_3$}; \path[fill=white] (9,1) circle (.2); \node at (9,1) {$z_3$}; \path[fill=white] (1,3) circle (.2); \node at (1,3) {$z_2$}; \path[fill=white] (3,3) circle (.2); \node at (3,3) {$z_2$}; \path[fill=white] (5,3) circle (.2); \node at (5,3) {$z_2$}; \path[fill=white] (7,3) circle (.2); \node at (7,3) {$z_2$}; \path[fill=white] (9,3) circle (.2); \node at (9,3) {$z_2$}; \path[fill=white] (1,5) circle (.2); \node at (1,5) {$z_1$}; \path[fill=white] (3,5) circle (.2); \node at (3,5) {$z_1$}; \path[fill=white] (5,5) circle (.2); \node at (5,5) {$z_1$}; \path[fill=white] (7,5) circle (.2); \node at (7,5) {$z_1$}; \path[fill=white] (9,5) circle (.2); \node at (9,5) {$z_1$}; \node at (1,6) {$-$}; \node at (3,6) {$+$}; \node at (5,6) {$-$}; \node at (7,6) {$+$}; \node at (9,6) {$-$}; \node at (1,4) {$+$}; \node at (3,4) {$+$}; \node at (5,4) {$-$}; \node at (7,4) {$-$}; \node at (9,4) {$+$}; \node at (1,2) {$+$}; \node at (3,2) {$+$}; \node at (5,2) {$+$}; \node at (7,2) {$-$}; \node at (9,2) {$+$}; \node at (1,0) {$+$}; \node at (3,0) {$+$}; \node at (5,0) {$+$}; \node at (7,0) {$+$}; \node at (9,0) {$+$}; \node at (0,5) {$+$}; \node at (2,5) {$-$}; \node at (4,5) {$-$}; \node at (6,5) {$-$}; \node at (8,5) {$+$}; \node at (10,5) {$-$}; \node at (0,3) {$+$}; \node at (2,3) {$+$}; \node at (4,3) {$+$}; \node at (6,3) {$-$}; \node at (8,3) {$-$}; \node at (10,3) {$-$}; \node at (0,1) {$+$}; \node at (2,1) {$+$}; \node at (4,1) {$+$}; \node at (6,1) {$+$}; \node at (8,1) {$-$}; \node at (10,1) {$-$}; \node at (1.00,6.8) {$ 4$}; \node at (3.00,6.8) {$ 3$}; \node at (5.00,6.8) {$ 2$}; \node at (7.00,6.8) {$ 1$}; \node at (9.00,6.8) {$ 0$}; \node at (-.75,1) {$ 3$}; \node at (-.75,3) {$ 2$}; \node at (-.75,5) {$ 1$}; \end{tikzpicture}} \] \caption{A state of a five-vertex model system with $N=4$, $r=3$ and $\lambda=(2,1,0)$.} \label{icestate} \end{figure} Next we describe the Boltzmann weight $\beta(\mathfrak{s})$ of a state $\mathfrak{s}$. It will depend on a choice of $r$ complex numbers $\mathbf{z} = (z_1, \ldots, z_r)$ in $(\mathbb{C}^\times)^r$. We set $$ \beta(\mathfrak{s}) := \prod_{v: \; \textrm{vertex in } \mathfrak{s}} \textrm{wt}(v), $$ where the function $\textrm{wt}(v)$ is defined in Figure~\ref{uncoloredbw} and depends on the row~$i$ in which the vertex $v$ appears. For example, one may quickly check that the state in Figure~\ref{icestate} has Boltzmann weight $z_1^3 z_2^2 z_3$. Let $\mathfrak{S}_{\mathbf{z},\lambda}$ denote the ensemble of all admissible states with boundary conditions dictated by $\lambda$ and weights depending on parameters $\mathbf{z} = (z_1, \ldots, z_r)$. Further define the \textit{partition function} $Z(\mathfrak{S}_{\mathbf{z},\lambda})$ to be the sum of the Boltzmann weights over all states in the ensemble. Our notation suppresses the choice of number of columns $N$; indeed, the partition function is independent of any such (large enough) choice, since adding columns to the left of the $\lambda_1+r-1$ column adds only $\tt{a}_1$ patterns, which have weight~1. \begin{figure} \[ \begin{array}{|c|c|c|c|c|c|} \hline \tt{a}_1&\tt{a}_2&\tt{b}_1&\tt{b}_2&\tt{c}_1&\tt{c}_2\\ \hline \gammaice{+}{+}{+}{+} & \gammaice{-}{-}{-}{-} & \gammaice{+}{-}{+}{-} & \gammaice{-}{+}{-}{+} & \gammaice{-}{+}{+}{-} & \gammaice{+}{-}{-}{+}\\ \hline 1&z_i&0&z_i&z_i&1\\ \hline\end{array}\] \caption{Boltzmann weights $\textrm{wt}(v)$ for a vertex $v$ in the $i$-th row of the uncolored system.} \label{uncoloredbw} \end{figure} We will next describe bijections between states of this system and two other sets of combinatorial objects: Gelfand-Tsetlin patterns with top row $\lambda$ and semistandard Young tableaux of shape $\lambda$ with entries in $\{1,2,\ldots,r\}$. These will allow us to conclude that $Z(\mathfrak{S}_{\mathbf{z},\lambda})$ is, up to a simple factor, the Schur polynomial $s_\lambda(\mathbf{z})$. Our boundary conditions imply via a combinatorial argument (\cite{Baxter} Section~8.3 or Proposition~19.1 in~\cite{wmd5book}) that in any given state $\mathfrak{s}$ of the system, the number of $-$ spins in the row of $N$ vertical edges above the $i$-th row will be exactly $r+1-i$. Let $(i,j)$ with $r \geqslant j\geqslant i$ enumerate these spins and let $A_{i,j}$ be their corresponding column numbers, in descending order. Then \[\operatorname{GTP}(\mathfrak{s}):=\left\{\begin{array}{ccccccc} A_{1,1}&&A_{1,2}&&\cdots&& A_{1,r}\\ &A_{2,2}&&\cdots&& A_{2,r}\\ &&\ddots&\vdots&\iddots\\ &&&A_{r,r}\end{array}\right\}\] is a \textit{left-strict} Gelfand-Tsetlin pattern, meaning that $A_{i,j}>A_{i+1,j+1}\geqslant A_{i,j+1}$. This follows from Proposition~19.1 of~\cite{wmd5book}, taking into account the omission of $\tt{b}_1$ patterns in Figure~\ref{uncoloredbw}, which implies that the inequality $A_{i,j}>A_{i+1,j+1}$ is strict. \begin{remark} If we allowed patterns of type $\tt{b}_1$ we would have $A_{i,j}\geqslant A_{i+1,j+1}\geqslant A_{i,j+1}$ and $A_{i,j}>A_{i,j+1}$. \end{remark} Since $\operatorname{GTP}(\mathfrak{s})$ is left-strict, we may subtract $\rho_{r+1-i}:=(r-i,r-i-1,\cdots,0)$ from the $i$-th row of $\operatorname{GTP}(\mathfrak{s})$ to obtain another Gelfand-Tsetlin pattern. We denote this \textit{reduced} pattern by \begin{equation} \label{reducedgtp} \operatorname{GTP}^\circ(\mathfrak{s}):=\left\{\begin{array}{ccccccc} a_{1,1}&&a_{1,2}&&\cdots&& a_{1,r}\\ &a_{2,2}&&\cdots&& a_{2,r}\\ &&\ddots&\vdots&\iddots\\ &&&a_{r,r}\end{array}\right\}\;, \end{equation} whose entries are $a_{i,j}=A_{i,j}-r+j$. The top row of $\operatorname{GTP}^\circ(\mathfrak{s})$ is $\lambda$. The map $\mathfrak{s}\mapsto \operatorname{GTP}^\circ(\mathfrak{s})$ is easily seen to be a bijection between the states of $\mathfrak{S}_{\mathbf{z},\lambda}$ and the set of Gelfand-Tsetlin patterns with top row $\lambda$. There is also associated with a state $\mathfrak{s}$ a semistandard Young tableau, which may be described as follows. Let $\mathcal{B}_\lambda$ be the set of semi-standard Young tableaux of shape $\lambda$ with entries in $\{1,2,3,\ldots,r\}$. We first associate a tableau $\mathfrak{T}\in\mathcal{B}_\lambda$ with any Gelfand-Tsetlin pattern. The top row of the pattern is the shape $\lambda$ of $\mathfrak{T}$. Removing the cells labeled $r$ from the tableau results in the shape that is the second row of the Gelfand-Tsetlin pattern, etc. This procedure is reversible and so there is another bijection between $\mathcal{B}_\lambda$ and Gelfand-Tsetlin patterns with top row $\lambda$. We may compose this with our previous bijection between $\mathfrak{S}_{\mathbf{z},\lambda}$ and Gelfand-Tsetlin patterns. Given an admissible state $\mathfrak{s}$, we will denote the associated tableau by $\mathfrak{T}(\mathfrak{s})$. For example with the state $\mathfrak{s}$ in Figure~\ref{icestate}, we have \[\operatorname{GTP}(\mathfrak{s})=\left\{\begin{array}{ccccc}4&&2&&0\\&2&&1\\&&1\end{array}\right\},\qquad \operatorname{GTP}^\circ(\mathfrak{s})=\left\{\begin{array}{ccccc}2&&1&&0\\&1&&1\\&&1\end{array}\right\},\qquad \mathfrak{T}(\mathfrak{s})=\begin{ytableau}1&3\\2\end{ytableau}\;.\] The set $\mathcal{B}_\lambda$ has the structure of a Kashiwara-Nakashima crystal of tableaux (see \cite{KashiwaraNakashima,BumpSchilling}). As such it comes with a weight map $\operatorname{wt}:\mathcal{B}_\lambda\longrightarrow\Lambda,$ where $\Lambda \simeq \mathbb{Z}^r$ denotes the weight lattice for $G=\operatorname{GL}(r)$. If $\mathfrak{T}\in\mathcal{B}_\lambda$, then identifying $\Lambda$ with $\mathbb{Z}^r$, we define $\operatorname{wt}(\mathfrak{T})=(\mu_1,\cdots,\mu_r)$ where $\mu_i$ is the number of entries in $\mathfrak{T}$ equal to~$i$. \begin{proposition} \label{zschur} Let $\lambda \in \Lambda$ be a dominant weight and $\mathfrak{s} \in \mathfrak{S}_{\mathbf{z},\lambda}$ be an admissible state of the uncolored five-vertex model defined above. \begin{enumerate}[label={(\roman*)}, leftmargin=*] \item \label{itm:zweightid} The Boltzmann weight $\beta(\mathfrak{s})$ and the weight map of the associated tableau $\mathfrak{T}(\mathfrak{s})$ are related by $$\beta(\mathfrak{s})=\mathbf{z}^{\rho+w_0 \operatorname{wt}(\mathfrak{T}(\mathfrak{s}))}.$$ \item \label{itm:schur} The partition function of an ensemble $\mathfrak{S}_{\mathbf{z},\lambda}$ is related to Schur functions by $${Z(\mathfrak{S}_{\mathbf{z},\lambda})=\mathbf{z}^\rho\,s_\lambda(\mathbf{z})}.$$ \end{enumerate} \end{proposition} To illustrate \ref{itm:zweightid}, in the example of Figure~\ref{icestate}, we have \[\beta(\mathfrak{s})=z_1^3z_2^2z_3,\quad\mathbf{z}^\rho=z_1^2z_2,\quad \textrm{and} \quad \mathbf{z}^{w_0\operatorname{wt}(\mathfrak{T}(\mathfrak{s}))}=z_1z_2z_3.\] \begin{proof}[Proof of Proposition~\ref{zschur}] To prove \ref{itm:zweightid}, note that from the weights in Figure~\ref{uncoloredbw} a vertex in the $i$-th row contributes a factor of $z_i$ if and only if the spin to the left of the vertex is $-$. Hence the power of $z_i$ equals the number of $-$ spins on the horizontal edges in the $i$-th row, not counting the $-$ on the right boundary edge. Now such $-$ occur on the horizontal edges between the $A_{i,j}$ and $A_{i+1,j+1}$ columns, or to the right of the $A_{i,r}$ column. Hence the power of $z_i$ in $\mathfrak{S}_{\mathbf{z},\lambda}$ is \[\sum_{j=i}^rA_{i,j}-\sum_{j=i}^{r-1}A_{i+1,j+1}= \left(\sum_{j=i}^ra_{i,j}-\sum_{j=i+1}^{r}a_{i+1,j}\right)+r-i.\] The term in parentheses is the number of $r+1-i$ entries in the tableau $\mathfrak{T}(\mathfrak{s})$. Taking the product over all $i$ gives~\ref{itm:zweightid}. Using \ref{itm:zweightid} and the combinatorial formula \[s_\lambda(\mathbf{z})=\sum_{\mathfrak{T}}\mathbf{z}^{\operatorname{wt}{\mathfrak{T}}}\] for the Schur function we have $Z(\mathfrak{S}_{\mathbf{z},\lambda})=\mathbf{z}^\rho\,s_\lambda(w_0\mathbf{z})$. Part \ref{itm:schur} now follows from the symmetry of the Schur function. \end{proof} Alternatively, we can evaluate the partition function using a local symmetry known as the Yang-Baxter equation, which is Theorem~\ref{thm:ybe} below. To state this we need to introduce a new type of vertices that we will call rotated vertices. These vertices are rotated by 45 degrees counterclockwise and there are two parameters $z_i,z_j$ associated to each vertex. We denote such rotated vertices by $R_{z_i,z_j}$ (here we use $R$ as their Boltzmann weights may be alternately viewed as entries of an $R$-matrix that ``solves'' a lattice model). These vertices can be attached to the grid systems we defined before, like the one in Figure~\ref{icestate} to obtain new systems. It is by working with these new systems that we can use the Yang-Baxter equation and derive functional equations for the partition function of our initial system (the one without any rotated vertices). The Boltzmann weights of the rotated vertices are different from the Boltzmann weights of the regular vertices and are given in Figure~\ref{crystalrmatrix}. \begin{figure}[b] \[\begin{array}{|c|c|c|c|c|} \hline \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \draw[fill=white] (2,2) circle (.35); \node at (0,0) {$+$}; \node at (0,2) {$+$}; \node at (2,2) {$+$}; \node at (2,0) {$+$}; \node at (2,0) {$+$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \draw[fill=white] (2,2) circle (.35); \node at (0,0) {$-$}; \node at (0,2) {$-$}; \node at (2,2) {$-$}; \node at (2,0) {$-$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \draw[fill=white] (2,2) circle (.35); \node at (0,0) {$-$}; \node at (0,2) {$+$}; \node at (2,2) {$-$}; \node at (2,0) {$+$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \draw[fill=white] (2,2) circle (.35); \node at (0,0) {$-$}; \node at (0,2) {$+$}; \node at (2,2) {$+$}; \node at (2,0) {$-$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \draw[fill=white] (2,2) circle (.35); \node at (0,0) {$+$}; \node at (0,2) {$-$}; \node at (2,2) {$-$}; \node at (2,0) {$+$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}\\ \hline z_j&z_i&z_i-z_j&z_i&z_j\\ \hline \end{array}\] \caption{The R-matrix for the uncolored system. From~\cite{BBB} we know that we may regard this combinatorial R-matrix as the ``crystal limit'' of the $U_q(\widehat{\mathfrak{gl}}(1|1))$ R-matrix when $q\rightarrow 0$.} \label{crystalrmatrix} \end{figure} Now consider the following two miniature systems that contain both regular and rotated vertices: \begin{equation} \label{eqn:ybe} \hfill \begin{tikzpicture}[baseline=(current bounding box.center)] \draw (0,1) to [out = 0, in = 180] (2,3) to (4,3); \draw (0,3) to [out = 0, in = 180] (2,1) to (4,1); \draw (3,0) to (3,4); \draw[fill=white] (0,1) circle (.3); \draw[fill=white] (0,3) circle (.3); \draw[fill=white] (3,4) circle (.3); \draw[fill=white] (4,3) circle (.3); \draw[fill=white] (4,1) circle (.3); \draw[fill=white] (3,0) circle (.3); \draw[fill=white] (2,3) circle (.3); \draw[fill=white] (2,1) circle (.3); \draw[fill=white] (3,2) circle (.3); \node at (0,1) {$a$}; \node at (0,3) {$b$}; \node at (3,4) {$c$}; \node at (4,3) {$d$}; \node at (4,1) {$e$}; \node at (3,0) {$f$}; \node at (2,3) {$g$}; \node at (3,2) {$h$}; \node at (2,1) {$i$}; \path[fill=white] (3,3) circle (.3); \node at (3,3) {$z_i$}; \path[fill=white] (3,1) circle (.3); \node at (3,1) {$z_j$}; \path[fill=white] (1,2) circle (.3); \node at (1,2) {$R_{z_i,z_j}$}; \end{tikzpicture}\qquad\qquad \begin{tikzpicture}[baseline=(current bounding box.center)] \draw (0,1) to (2,1) to [out = 0, in = 180] (4,3); \draw (0,3) to (2,3) to [out = 0, in = 180] (4,1); \draw (1,0) to (1,4); \draw[fill=white] (0,1) circle (.3); \draw[fill=white] (0,3) circle (.3); \draw[fill=white] (1,4) circle (.3); \draw[fill=white] (4,3) circle (.3); \draw[fill=white] (4,1) circle (.3); \draw[fill=white] (1,0) circle (.3); \draw[fill=white] (2,3) circle (.3); \draw[fill=white] (1,2) circle (.3); \draw[fill=white] (2,1) circle (.3); \node at (0,1) {$a$}; \node at (0,3) {$b$}; \node at (1,4) {$c$}; \node at (4,3) {$d$}; \node at (4,1) {$e$}; \node at (1,0) {$f$}; \node at (2,3) {$j$}; \node at (1,2) {$k$}; \node at (2,1) {$l$}; \path[fill=white] (1,3) circle (.3); \node at (1,3) {$z_j$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$z_i$}; \path[fill=white] (3,2) circle (.3); \node at (3,2) {$R_{z_i,z_j}$}; \end{tikzpicture} \end{equation} Here, as with the system defined before, we fix the spins of the exterior edges ($a,b,c,d,e,f$). An assignment of spins to the interior edges is again called a state. Both systems have a partition function defined by summing the weights of the admissible states made from all possible assignments of spins to the interior edges ($g$, $h$, $i$ in the left system, or $j$, $k$, $l$ on the right). The weight of the entire state is computed just as above: we take a product of the weights of each vertex using the weights of the regular vertices that are given in Figure~\ref{uncoloredbw} and the weights of the rotated vertices that are given in Figure~\ref{crystalrmatrix}. For example if $(a,b,c,d,e,f)=(+,-,+,-,+,+)$ there is only one choice $(g,h,i)=(-,+,+)$ that gives a nonzero contribution to the first system, and the partition function is the Boltzmann weight $z_iz_j$ of this state. For the second system, there are two states with nonzero contribution, namely $(j,k,l)=(-,+,+)$, with weight $z_j^2$ and $(+,-,-)$ with weight $z_j(z_i-z_j)$. The partition function again equals $z_iz_j$. \begin{theorem} \label{thm:ybe} Let $a,b,c,d,e,f\in\{+,-\}$. Then the partition functions of the two systems in \eqref{eqn:ybe} are equal. \end{theorem} \begin{proof} This is a special case of a Yang-Baxter equation found in~\cite{hkice}. Referring to the arXiv version of the paper, the Boltzmann weights are in Table~1 of that paper with $t_i=0$. \end{proof} The symmetry of the Schur function may be easily deduced from this via a procedure called the ``train argument'' that amounts to repeated use of Theorem~\ref{thm:ybe} on a larger grid system with an attached rotated vertex as later illustrated in Figure~\ref{modpf} for the colored five-vertex model. See also~\cite[Lemma 4]{hkice}, leading to an alternate proof of the evaluation of the partition function. The models of this section may be described as the ``uncolored'' (or equivalently ``one-colored'') version of our five-vertex models. They were known before the writing of this paper. In the next section, we present a generalization known as colored models, which are new. We will prove a Yang-Baxter equation in the colored setting (Theorem~\ref{coloredybethm}) that will then be used to relate the partition function of the lattice models to the Demazure atoms. \section{\label{sec:oz}Colored Ice Models for $\operatorname{GL}(r)$} There are multiple ways to depict admissible states of the six-vertex model. Many of these are described in Chapter~8 of Baxter's inspiring book~\cite{Baxter}. In particular, rather than using spins or arrows to decorate edges, one can instead use the presence or absence of a line (or ``path'') along an edge. These are the ``line configurations'' in~\cite{Baxter}, Figure~8.2. Our convention will be that the presence of a line corresponds to a $-$ spin, so that admissible states may be viewed as a collection of paths moving downward and rightward through the lattice. Inspired by ideas of Borodin and Wheeler~\cite{BorodinWheelerColored} in the context of certain other solvable lattice models, we may assign colors to each such path to refine the partition function of the prior section to produce polynomial Demazure atoms. First we describe the relevant solvable colored lattice model. Just as before, upon fixing a dominant weight $\lambda = (\lambda_1, \ldots, \lambda_r)$, we begin with a rectangular lattice of $N+1$ columns ($N \geqslant \lambda_1 + r - 1$) and $r$ rows whose edges are to be assigned spins $\pm$ according to a five-vertex model. Moreover, to each edge with $-$ spin, we assign a ``color,'' an additional attribute from a finite set $\{ c_1,\cdots,c_r \}$ of size equal to the number of rows in the model. We will order these colors by $c_1>c_2>\cdots>c_r$. By a \textit{colored spin} we mean either $+$, or a color $c_i$. For the purpose of comparing with the uncolored system, we regard a colored spin $c_i$ as a spin $-$ with an extra piece of data, namely a color. To each dominant weight $\lambda$, we now define $r!$ distinct partition functions. Given $w\in W=S_r$ and a vector of colors $\mathbf{c}=(c_1,\cdots,c_r)$, let $w\mathbf{c}$ be the permuted vector of colors, that is $(w\mathbf{c})_i=c_{w^{-1}i}$. We will call such vectors of colors \emph{flags}. Now assign boundary conditions to the colored lattice model as follows. To the vertical top boundary edges, we assign spins $-$ in the columns labeled $\lambda_i+r-i$ as before ($1\leqslant i\leqslant r$). Now however we also need to assign colors to these edges, and we assign the color $c_i$ to the $\lambda_i+r-i$ column. Each edge along the right boundary is also assigned a $-$ spin, but here we assign the colors $w\mathbf{c}$ in order from top to bottom. Just as before, all remaining boundary spins along the bottom, left, and top are $+$. Admissible states are then assignments of colored spins to the interior edges such that every vertex has adjacent spins as in Figure~\ref{coloredweights} with the understanding that the colors {\color{red}{red}}~$>$~{\color{blue}{blue}} may be replaced by any colors $c_i$ and $c_j$ with $c_i > c_j$. Boltzmann weights for each vertex are listed in the figure as well. We denote the resulting system of admissible states as $\mathfrak{S}_{\mathbf{z},\lambda,w}$. In short, the choice of $w \in W$ specifies the row where each colored path, moving downward and rightward through the lattice, exits the right-hand boundary. As before, we denote by $Z(\mathfrak{S}_{\mathbf{z},\lambda,w})$ the partition function of the colored lattice model. \begin{figure}[t] \[ \begin{array}{|c|c|c|c|c|c|} \hline \tt{a}_1&\multicolumn{4}{|c|}{\tt{a}_2}&\tt{b}_1\\ \hline \begin{tikzpicture & \gammaA{red}{blue}{red}{blue}{R}{B}{R}{B} & \gammaAA{blue}{red}{B}{R} & \gammaA{red}{red}{red}{red}{R}{R}{R}{R} & \gammaA{blue}{blue}{blue}{blue}{B}{B}{B}{B} & \gammab{red}{R} \\ \hline 1&\multicolumn{4}{|c|}{z_i}&0\\ \hline \hline \multicolumn{2}{|c|}{\tt{b_2}} & \multicolumn{2}{|c|}{\tt{c}_1}&\multicolumn{2}{|c|}{\tt{c}_2}\\ \hline \gammaB{red}{R}&\gammaB{blue}{B} & \gammac{red}{R} & \gammac{blue}{B} &\gammaC{red}{R} &\gammaC{blue}{B}\\ \hline \multicolumn{2}{|c|}{z_i}& \multicolumn{2}{|c|}{z_i}&\multicolumn{2}{|c|}{1}\\ \hline \end{array}\] \caption{Colored Boltzmann weights for two colors $c_i$ and $c_j$, portrayed as red and blue. We assume that {\color{red}{red}} $>$ {\color{blue}{blue}}. If the configuration is not in the table, the weight is zero. The weights are not quite symmetric in the colors, since in the $\tt{a}_2$ patterns, the smaller of the two involved colors (blue) is not allowed on the right edge and the larger color is not allowed on the bottom edge. With our boundary conditions, the patterns with four edges all red or blue could be omitted, but this would change the R-matrix in Figure~\ref{coloredrmatrix}; see Remark~\ref{superrem}. This would not affect the results of this paper, but we prefer these weights for consistency with the uncolored case.} \label{coloredweights} \end{figure} For example, let $r=3$. We will denote the three colors $c_1$, $c_2$ and $c_3$ as $R$ (red), $B$ (blue) and $G$ (green) in the figures. Take $w=s_1s_2$. Then $\mathbf{c}=(R,B,G)$ and $w\mathbf{c}=(G,R,B)$. With $\lambda=(2,1,0)$ the system $\mathfrak{S}_{\mathbf{z},\lambda,w}$ has two states, which are illustrated in Figure~\ref{tostates}. \begin{figure} \[ \begin{array}{|c|c|} \hline \begin{tikzpicture}[scale=0.8] \draw (1,0)--(1,6); \draw (3,0)--(3,6); \draw (5,0)--(5,6); \draw (7,0)--(7,6); \draw (9,0)--(9,6); \draw (0,1)--(10,1); \draw (0,3)--(10,3); \draw (0,5)--(10,5); \draw [dashed,thick,->] (.25,6) -- (9.75,6); \node at (0,6) {$\ell_0$}; \draw [dashed,thick,->] (.25,4) -- (9.7,4) -- (9.7,5.75); \node at (0,4) {$\ell_1$}; \draw [dashed,thick,->] (.25,2) -- (10,2) -- (10,5.75); \node at (0,2) {$\ell_2$}; \draw [dashed,thick,->] (.25,0) -- (10.3,0) -- (10.3,5.75); \node at (0,0) {$\ell_3$}; \draw [line width=0.5mm,red] (1.00,5.75) to [out=-90,in=180] (1.75,5.00); \draw [line width=0.5mm,red] (2.35,5.00)--(3.75,5.00); \draw [line width=0.5mm,blue] (5,4)--(5,6); \draw [line width=0.5mm,red] (4.35,5.00)--(5.75,5.00); \draw [line width=0.5mm,red] (6.25,5.00) to [out=0,in=90] (7.00,4.25); \draw [line width=0.5mm,darkgreen] (9.00,5.75) to [out=-90,in=180] (9.75,5.00); \draw [line width=0.5mm,blue] (5.00,3.75) to [out=-90,in=180] (5.75,3.00); \draw [line width=0.5mm,red] (7.00,3.75) to [out=-90,in=180] (7.75,3.00); \draw [line width=0.5mm,blue] (6.25,3.00) to [out=0,in=90] (7.00,2.25); \draw [line width=0.5mm,red] (8.35,3.00)--(9.75,3.00); \draw [line width=0.5mm,blue] (7.00,1.75) to [out=-90,in=180] (7.75,1.00); \draw [line width=0.5mm,blue] (8.35,1.00)--(9.75,1.00); \draw[line width=0.5mm,red,fill=white] (1,6) circle (.35); \draw[fill=white] (3,6) circle (.35); \draw[line width=0.5mm,blue,fill=white] (5,6) circle (.35); \draw[fill=white] (7,6) circle (.35); \draw[line width=0.5mm,darkgreen,fill=white] (9,6) circle (.35); \draw[fill=white] (1,4) circle (.35); \draw[fill=white] (3,4) circle (.35); \draw[line width=0.5mm,blue,fill=white] (5,4) circle (.35); \draw[line width=0.5mm,red,fill=white] (7,4) circle (.35); \draw[fill=white] (9,4) circle (.35); \draw[fill=white] (1,2) circle (.35); \draw[fill=white] (3,2) circle (.35); \draw[fill=white] (5,2) circle (.35); \draw[line width=0.5mm,blue,fill=white] (7,2) circle (.35); \draw[fill=white] (9,2) circle (.35); \draw[fill=white] (1,0) circle (.35); \draw[fill=white] (3,0) circle (.35); \draw[fill=white] (5,0) circle (.35); \draw[fill=white] (7,0) circle (.35); \draw[fill=white] (9,0) circle (.35); \draw[fill=white] (0,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (2,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (4,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (6,5) circle (.35); \draw[fill=white] (8,5) circle (.35); \draw[line width=0.5mm,darkgreen,fill=white] (10,5) circle (.35); \draw[fill=white] (0,3) circle (.35); \draw[fill=white] (2,3) circle (.35); \draw[fill=white] (4,3) circle (.35); \draw[line width=0.5mm,blue,fill=white] (6,3) circle (.35); \draw[line width=0.5mm,red,fill=white] (8,3) circle (.35); \draw[line width=0.5mm,red,fill=white] (10,3) circle (.35); \draw[fill=white] (0,1) circle (.35); \draw[fill=white] (2,1) circle (.35); \draw[fill=white] (4,1) circle (.35); \draw[fill=white] (6,1) circle (.35); \draw[line width=0.5mm,blue,fill=white] (8,1) circle (.35); \draw[line width=0.5mm,blue,fill=white] (10,1) circle (.35); \node at (1,6) {$R$}; \node at (3,6) {$+$}; \node at (5,6) {$B$}; \node at (7,6) {$+$}; \node at (9,6) {$G$}; \node at (1,4) {$+$}; \node at (3,4) {$+$}; \node at (5,4) {$B$}; \node at (7,4) {$R$}; \node at (9,4) {$+$}; \node at (1,2) {$+$}; \node at (3,2) {$+$}; \node at (5,2) {$+$}; \node at (7,2) {$B$}; \node at (9,2) {$+$}; \node at (1,0) {$+$}; \node at (3,0) {$+$}; \node at (5,0) {$+$}; \node at (7,0) {$+$}; \node at (9,0) {$+$}; \node at (0,5) {$+$}; \node at (2,5) {$R$}; \node at (4,5) {$R$}; \node at (6,5) {$R$}; \node at (8,5) {$+$}; \node at (10,5) {$G$}; \node at (0,3) {$+$}; \node at (2,3) {$+$}; \node at (4,3) {$+$}; \node at (6,3) {$B$}; \node at (8,3) {$R$}; \node at (10,3) {$R$}; \node at (0,1) {$+$}; \node at (2,1) {$+$}; \node at (4,1) {$+$}; \node at (6,1) {$+$}; \node at (8,1) {$B$}; \node at (10,1) {$B$}; \node at (1.00,6.8) {$ 4$}; \node at (3.00,6.8) {$ 3$}; \node at (5.00,6.8) {$ 2$}; \node at (7.00,6.8) {$ 1$}; \node at (9.00,6.8) {$ 0$}; \node at (-.75,5) {$ 1$}; \node at (-.75,3) {$ 2$}; \node at (-.75,1) {$ 3$}; \node at (0,-.50) {$\quad$}; \path[fill=white] (1,1) circle (.25); \node at (1,1) {\scriptsize\scriptsize$z_3$}; \path[fill=white] (3,1) circle (.25); \node at (3,1) {\scriptsize$z_3$}; \path[fill=white] (5,1) circle (.25); \node at (5,1) {\scriptsize$z_3$}; \path[fill=white] (7,1) circle (.25); \node at (7,1) {\scriptsize$z_3$}; \path[fill=white] (9,1) circle (.25); \node at (9,1) {\scriptsize$z_3$}; \path[fill=white] (1,3) circle (.25); \node at (1,3) {\scriptsize$z_2$}; \path[fill=white] (3,3) circle (.25); \node at (3,3) {\scriptsize$z_2$}; \path[fill=white] (5,3) circle (.25); \node at (5,3) {\scriptsize$z_2$}; \path[fill=white] (7,3) circle (.25); \node at (7,3) {\scriptsize$z_2$}; \path[fill=white] (9,3) circle (.25); \node at (9,3) {\scriptsize$z_2$}; \path[fill=white] (1,5) circle (.25); \node at (1,5) {\scriptsize$z_1$}; \path[fill=white] (3,5) circle (.25); \node at (3,5) {\scriptsize$z_1$}; \path[fill=white] (5,5) circle (.25); \node at (5,5) {\scriptsize$z_1$}; \path[fill=white] (7,5) circle (.25); \node at (7,5) {\scriptsize$z_1$}; \path[fill=white] (9,5) circle (.25); \node at (9,5) {\scriptsize$z_1$}; \end{tikzpicture} & \raisebox{80pt}{$\begin{array}{c}\operatorname{GTP}^\circ=\left\{\begin{array}{cccccc}2&&1&&0\\&1&&1\\&&1\end{array}\right\}\\\qquad\\ \mathfrak{T}=\begin{ytableau}1&3\\2\end{ytableau}\\\\ \mathbf{c}_0=(R,B,G)\\ \mathbf{c}_1=(B,R,G)\\ \mathbf{c}_2=(B,R,G)\\ \mathbf{c}_3=(B,R,G)\end{array}$}\\ \hline \begin{tikzpicture}[scale=0.8] \draw (1,0)--(1,6); \draw (3,0)--(3,6); \draw (5,0)--(5,6); \draw (7,0)--(7,6); \draw (9,0)--(9,6); \draw (0,1)--(10,1); \draw (0,3)--(10,3); \draw (0,5)--(10,5); \draw [dashed,thick,->] (.25,6) -- (9.75,6); \node at (0,6) {$\ell_0$}; \draw [dashed,thick,->] (.25,4) -- (9.7,4) -- (9.7,5.75); \node at (0,4) {$\ell_1$}; \draw [dashed,thick,->] (.25,2) -- (10,2) -- (10,5.75); \node at (0,2) {$\ell_2$}; \draw [dashed,thick,->] (.25,0) -- (10.3,0) -- (10.3,5.75); \node at (0,0) {$\ell_3$}; \draw [line width=0.5mm,red] (1.00,5.75) to [out=-90,in=180] (1.75,5.00); \draw [line width=0.5mm,red] (2.25,5.00) to [out=0,in=90] (3.00,4.25); \draw [line width=0.5mm,blue] (5.00,5.75) to [out=-90,in=180] (5.75,5.00); \draw [line width=0.5mm,blue] (6.25,5.00) to [out=0,in=90] (7.00,4.25); \draw [line width=0.5mm,darkgreen] (9.00,5.75) to [out=-90,in=180] (9.75,5.00); \draw [line width=0.5mm,red] (3.00,3.75) to [out=-90,in=180] (3.75,3.00); \draw [line width=0.5mm,red] (4.35,3.00)--(5.75,3.00); \draw [line width=0.5mm,blue] (7,2)--(7,4); \draw [line width=0.5mm,red] (6.35,3.00)--(7.75,3.00); \draw [line width=0.5mm,red] (8.35,3.00)--(9.75,3.00); \draw [line width=0.5mm,blue] (7.00,1.75) to [out=-90,in=180] (7.75,1.00); \draw [line width=0.5mm,blue] (8.35,1.00)--(9.75,1.00); \draw[line width=0.5mm,red,fill=white] (1,6) circle (.35); \draw[fill=white] (3,6) circle (.35); \draw[line width=0.5mm,blue,fill=white] (5,6) circle (.35); \draw[fill=white] (7,6) circle (.35); \draw[line width=0.5mm,darkgreen,fill=white] (9,6) circle (.35); \draw[fill=white] (1,4) circle (.35); \draw[line width=0.5mm,red,fill=white] (3,4) circle (.35); \draw[fill=white] (5,4) circle (.35); \draw[line width=0.5mm,blue,fill=white] (7,4) circle (.35); \draw[fill=white] (9,4) circle (.35); \draw[fill=white] (1,2) circle (.35); \draw[fill=white] (3,2) circle (.35); \draw[fill=white] (5,2) circle (.35); \draw[line width=0.5mm,blue,fill=white] (7,2) circle (.35); \draw[fill=white] (9,2) circle (.35); \draw[fill=white] (1,0) circle (.35); \draw[fill=white] (3,0) circle (.35); \draw[fill=white] (5,0) circle (.35); \draw[fill=white] (7,0) circle (.35); \draw[fill=white] (9,0) circle (.35); \draw[fill=white] (0,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (2,5) circle (.35); \draw[fill=white] (4,5) circle (.35); \draw[line width=0.5mm,blue,fill=white] (6,5) circle (.35); \draw[fill=white] (8,5) circle (.35); \draw[line width=0.5mm,darkgreen,fill=white] (10,5) circle (.35); \draw[fill=white] (0,3) circle (.35); \draw[fill=white] (2,3) circle (.35); \draw[line width=0.5mm,red,fill=white] (4,3) circle (.35); \draw[line width=0.5mm,red,fill=white] (6,3) circle (.35); \draw[line width=0.5mm,red,fill=white] (8,3) circle (.35); \draw[line width=0.5mm,red,fill=white] (10,3) circle (.35); \draw[fill=white] (0,1) circle (.35); \draw[fill=white] (2,1) circle (.35); \draw[fill=white] (4,1) circle (.35); \draw[fill=white] (6,1) circle (.35); \draw[line width=0.5mm,blue,fill=white] (8,1) circle (.35); \draw[line width=0.5mm,blue,fill=white] (10,1) circle (.35); \node at (1,6) {$R$}; \node at (3,6) {$+$}; \node at (5,6) {$B$}; \node at (7,6) {$+$}; \node at (9,6) {$G$}; \node at (1,4) {$+$}; \node at (3,4) {$R$}; \node at (5,4) {$+$}; \node at (7,4) {$B$}; \node at (9,4) {$+$}; \node at (1,2) {$+$}; \node at (3,2) {$+$}; \node at (5,2) {$+$}; \node at (7,2) {$B$}; \node at (9,2) {$+$}; \node at (1,0) {$+$}; \node at (3,0) {$+$}; \node at (5,0) {$+$}; \node at (7,0) {$+$}; \node at (9,0) {$+$}; \node at (0,5) {$+$}; \node at (2,5) {$R$}; \node at (4,5) {$+$}; \node at (6,5) {$B$}; \node at (8,5) {$+$}; \node at (10,5) {$G$}; \node at (0,3) {$+$}; \node at (2,3) {$+$}; \node at (4,3) {$R$}; \node at (6,3) {$R$}; \node at (8,3) {$R$}; \node at (10,3) {$R$}; \node at (0,1) {$+$}; \node at (2,1) {$+$}; \node at (4,1) {$+$}; \node at (6,1) {$+$}; \node at (8,1) {$B$}; \node at (10,1) {$B$}; \node at (1.00,6.8) {$4$}; \node at (3.00,6.8) {$3$}; \node at (5.00,6.8) {$2$}; \node at (7.00,6.8) {$1$}; \node at (9.00,6.8) {$0$}; \node at (-.75,5) {$ 1$}; \node at (-.75,3) {$ 2$}; \node at (-.75,1) {$ 3$}; \path[fill=white] (1,1) circle (.25); \node at (1,1) {\scriptsize$z_3$}; \path[fill=white] (3,1) circle (.25); \node at (3,1) {\scriptsize$z_3$}; \path[fill=white] (5,1) circle (.25); \node at (5,1) {\scriptsize$z_3$}; \path[fill=white] (7,1) circle (.25); \node at (7,1) {\scriptsize$z_3$}; \path[fill=white] (9,1) circle (.25); \node at (9,1) {\scriptsize$z_3$}; \path[fill=white] (1,3) circle (.25); \node at (1,3) {\scriptsize$z_2$}; \path[fill=white] (3,3) circle (.25); \node at (3,3) {\scriptsize$z_2$}; \path[fill=white] (5,3) circle (.25); \node at (5,3) {\scriptsize$z_2$}; \path[fill=white] (7,3) circle (.25); \node at (7,3) {\scriptsize$z_2$}; \path[fill=white] (9,3) circle (.25); \node at (9,3) {\scriptsize$z_2$}; \path[fill=white] (1,5) circle (.25); \node at (1,5) {\scriptsize$z_1$}; \path[fill=white] (3,5) circle (.25); \node at (3,5) {\scriptsize$z_1$}; \path[fill=white] (5,5) circle (.25); \node at (5,5) {\scriptsize$z_1$}; \path[fill=white] (7,5) circle (.25); \node at (7,5) {\scriptsize$z_1$}; \path[fill=white] (9,5) circle (.25); \node at (9,5) {\scriptsize$z_1$}; \node at (0,-.50) {$\quad$}; \end{tikzpicture}& \raisebox{80pt}{$\begin{array}{c}\operatorname{GTP}^\circ=\left\{\begin{array}{cccccc}2&&1&&0\\&2&&1\\&&1\end{array}\right\}\\\qquad\\ \mathfrak{T}=\begin{ytableau}1&2\\2\end{ytableau}\\\\ \mathbf{c}_0=(R,B,G)\\ \mathbf{c}_1=(R,B,G)\\ \mathbf{c}_2=(B,R,G)\\ \mathbf{c}_3=(B,R,G)\end{array}$}\\ \hline \end{array} \] \caption{The two states of the system $\mathfrak{S}_{\mathbf{z},(2,1,0),s_1s_2}$ where $\mathbf{c}=(R,B,G)$ (red, blue, green) and $w\mathbf{c} = s_1s_2\mathbf{c}=(G,R,B)$. The dashed lines $\ell_i$, and the intermediate flags $\mathbf{c}_i$ will be used in the proof of Theorem~\ref{crystalmt}. Each intermediate flag $\mathbf{c}_i$ is the sequence of colors through the line $\ell_i$, and is obtained from the previous $\mathbf{c}_{i-1}$ by interchanging some colors on the vertical edges that intersect it. Because $\ell_{r-1}$ only intersects one vertical edge, no interchanges are possible at the last step, meaning that $\mathbf{c}_{r-1}=\mathbf{c}_r$. Note that, while the flag $w\mathbf{c} = s_1s_2\mathbf{c}=(G,R,B)$ denoting the right boundary condition is read from the top down, the last line $\ell_3$ intersects the same edges from the bottom up. Thus, $\mathbf{c}_3=w_0s_1s_2\mathbf{c} = (B,R,G)$. } \label{tostates} \end{figure} \begin{proposition} \label{statedpf} For any dominant weight $\lambda$, $\mathfrak{S}_{\mathbf{z},\lambda} = \bigsqcup_{w \in W} \mathfrak{S}_{\mathbf{z},\lambda,w}$ (disjoint union) where a colored spin $c_i$ is mapped to spin $-$, and hence \[Z(\mathfrak{S}_{\mathbf{z},\lambda})=\sum_{w\in W}Z(\mathfrak{S}_{\mathbf{z},\lambda,w}).\] \end{proposition} \begin{proof} We may begin with a state of the uncolored system and assign colors to the edges with $-$ spins. Along the top row, assign color $c_i$ to the $-$ spin in column $\lambda_i+r-i$ as directed for colored ice states. We will argue that there is a unique way of coloring the remaining $-$~spins that is consistent with the configurations in Figure~\ref{coloredweights}. The boundary spins on the left edge are all $+$, so they do not need colors assigned. After this, we proceed inductively, rightwards and downwards row by row, adding color to the $-$~spins of the state using the weights from Figure~\ref{coloredweights}. The key observation is that at a vertex labeled as follows: \[\gammaice{a}{b}{c}{d} \] the colored spins $a$ and $b$ and the spins $\pm$ of $c$ and $d$ determine a unique color at $c$ and $d$ with non-zero weight according to Figure~\ref{coloredweights}. Indeed, colored spin is conserved at a vertex, meaning that the total incoming (top and left) colored spins counted with multiplicity equals the total outgoing (bottom and right) colored spins. Moreover for the $\tt{a}_2$ configurations if $a$ and $b$ are of different colors, then $d$ will be the smaller of the two colors. We see that the assignment of colors is completely deterministic, and the colored state falls into a unique one of the ensembles $\mathfrak{S}_{\mathbf{z},\lambda,w}$. Now mapping colored spins $c_i$ to spin $-$, the colored Boltzmann weights of Figure~\ref{coloredweights} map to the uncolored Boltzmann weights of Figures~\ref{uncoloredbw}, thus proving both statements. \end{proof} There is again a Yang-Baxter equation. \begin{theorem} \label{coloredybethm} Using the Boltzmann weights in Figure~\ref{coloredweights} for the regular vertices and the R-matrix in Figure~\ref{coloredrmatrix} for the rotated vertices, let $a,b,c,d,e,f$ be colored spins. Then the partition functions of the (now colored) systems depicted in \eqref{eqn:ybe} are equal. \end{theorem} \begin{proof} In order for either side of (\ref{eqn:ybe}) to be nonzero, each color that appears on a boundary edge $a,b,c,d,e,f$ must appear an even number of times (and therefore at least twice), since otherwise according to Figures~\ref{coloredweights} and~\ref{coloredrmatrix}, the Boltzmann weight of the state is zero. Therefore at most 3 colors can appear among $a,b,c,d,e,f$ and the interior edges cannot involve any further colors. Thus there are only a fixed finite number ($4^6=4096$) of cases to be considered (independent of the number of colors $r$), and this can easily be checked using a computer. (To check this we used the Sage mathematical software.) \end{proof} \begin{figure}[h] \[\begin{array}{|c|c|c|c|c|c|} \hline \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \draw[fill=white] (2,2) circle (.35); \node at (0,0) {$+$}; \node at (0,2) {$+$}; \node at (2,2) {$+$}; \node at (2,0) {$+$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[fill=white] (0,0) circle (.35); \draw[line width=0.5mm, blue, fill=white] (0,2) circle (.35); \draw[line width=0.5mm, blue, fill=white] (2,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \node at (0,0) {$+$}; \node at (0,2) {$B$}; \node at (2,2) {$B$}; \node at (2,0) {$+$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[fill=white] (0,0) circle (.35); \draw[line width=0.5mm, red, fill=white] (0,2) circle (.35); \draw[line width=0.5mm, red, fill=white] (2,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \node at (0,0) {$+$}; \node at (0,2) {$R$}; \node at (2,2) {$R$}; \node at (2,0) {$+$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[line width=0.5mm, blue, fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[fill=white] (2,2) circle (.35); \draw[line width=0.5mm, blue, fill=white] (2,0) circle (.35); \node at (0,0) {$B$}; \node at (0,2) {$+$}; \node at (2,2) {$+$}; \node at (2,0) {$B$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[line width=0.5mm, red, fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[fill=white] (2,2) circle (.35); \draw[line width=0.5mm, red, fill=white] (2,0) circle (.35); \node at (0,0) {$R$}; \node at (0,2) {$+$}; \node at (2,2) {$+$}; \node at (2,0) {$R$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[line width=0.5mm, blue, fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[line width=0.5mm, blue, fill=white] (2,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \node at (0,0) {$B$}; \node at (0,2) {$+$}; \node at (2,2) {$B$}; \node at (2,0) {$+$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}\\ \hline z_j & z_j & z_j & z_i & z_i & z_i - z_j\\ \hline \hline \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[line width=0.5mm, red, fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[line width=0.5mm, red, fill=white] (2,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \node at (0,0) {$R$}; \node at (0,2) {$+$}; \node at (2,2) {$R$}; \node at (2,0) {$+$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[line width=0.5mm, blue, fill=white] (0,0) circle (.35); \draw[line width=0.5mm, blue, fill=white] (0,2) circle (.35); \draw[line width=0.5mm, blue, fill=white] (2,2) circle (.35); \draw[line width=0.5mm, blue, fill=white] (2,0) circle (.35); \node at (0,0) {$B$}; \node at (0,2) {$B$}; \node at (2,2) {$B$}; \node at (2,0) {$B$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[line width=0.5mm, blue, fill=white] (0,0) circle (.35); \draw[line width=0.5mm, red, fill=white] (0,2) circle (.35); \draw[line width=0.5mm, red, fill=white] (2,2) circle (.35); \draw[line width=0.5mm, blue, fill=white] (2,0) circle (.35); \node at (0,0) {$B$}; \node at (0,2) {$R$}; \node at (2,2) {$R$}; \node at (2,0) {$B$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[line width=0.5mm, red, fill=white] (0,0) circle (.35); \draw[line width=0.5mm, blue, fill=white] (0,2) circle (.35); \draw[line width=0.5mm, blue, fill=white] (2,2) circle (.35); \draw[line width=0.5mm, red, fill=white] (2,0) circle (.35); \node at (0,0) {$R$}; \node at (0,2) {$B$}; \node at (2,2) {$B$}; \node at (2,0) {$R$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[line width=0.5mm, red, fill=white] (0,0) circle (.35); \draw[line width=0.5mm, blue, fill=white] (0,2) circle (.35); \draw[line width=0.5mm, red, fill=white] (2,2) circle (.35); \draw[line width=0.5mm, blue, fill=white] (2,0) circle (.35); \node at (0,0) {$R$}; \node at (0,2) {$B$}; \node at (2,2) {$R$}; \node at (2,0) {$B$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}& \begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[line width=0.5mm, red, fill=white] (0,0) circle (.35); \draw[line width=0.5mm, red, fill=white] (0,2) circle (.35); \draw[line width=0.5mm, red, fill=white] (2,2) circle (.35); \draw[line width=0.5mm, red, fill=white] (2,0) circle (.35); \node at (0,0) {$R$}; \node at (0,2) {$R$}; \node at (2,2) {$R$}; \node at (2,0) {$R$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_i,z_j}$}; \end{tikzpicture}\\ \hline z_i-z_j & z_i & z_i & z_j & z_i-z_j & z_i\\ \hline \end{array} \] \caption{The colored R-matrix.} \label{coloredrmatrix} \end{figure} \begin{figure}[h] \vspace{5mm} \begin{tikzpicture}[scale=0.75, font=\small] \draw (1,0)--(1,6); \draw (3,0)--(3,6); \draw (5,0)--(5,6); \draw (7,0)--(7,6); \draw (9,0)--(9,6); \draw (11,0)--(11,6); \draw (13,0)--(13,6); \draw (15,0)--(15,6); \draw (0,1)--(16,1); \draw (0,3)--(16,3); \draw (0,5)--(16,5); \draw [line width=0.5mm,red] (1.00,5.75) to [out=-90,in=180] (1.75,5.00); \draw [line width=0.5mm,red] (2.35,5.00)--(3.75,5.00); \draw [line width=0.5mm,red] (4.35,5.00)--(5.75,5.00); \draw [line width=0.5mm,red] (6.35,5.00)--(7.75,5.00); \draw [line width=0.5mm,blue] (9,4)--(9,6); \draw [line width=0.5mm,red] (8.35,5.00)--(9.75,5.00); \draw [line width=0.5mm,red] (10.35,5.00)--(11.75,5.00); \draw [line width=0.5mm,red] (12.35,5.00)--(13.75,5.00); \draw [line width=0.5mm,darkgreen] (15,4)--(15,6); \draw [line width=0.5mm,red] (14.35,5.00)--(15.75,5.00); \draw [line width=0.5mm,blue] (9.00,3.75) to [out=-90,in=180] (9.75,3.00); \draw [line width=0.5mm,blue] (10.35,3.00)--(11.75,3.00); \draw [line width=0.5mm,blue] (12.35,3.00)--(13.75,3.00); \draw [line width=0.5mm,darkgreen] (15,2)--(15,4); \draw [line width=0.5mm,blue] (14.35,3.00)--(15.75,3.00); \draw [line width=0.5mm,darkgreen] (15.00,1.75) to [out=-90,in=180] (15.75,1.00); \draw[line width=0.5mm,red,fill=white] (1,6) circle (.35); \draw[fill=white] (3,6) circle (.35); \draw[fill=white] (5,6) circle (.35); \draw[fill=white] (7,6) circle (.35); \draw[line width=0.5mm,blue,fill=white] (9,6) circle (.35); \draw[fill=white] (11,6) circle (.35); \draw[fill=white] (13,6) circle (.35); \draw[line width=0.5mm,darkgreen,fill=white] (15,6) circle (.35); \draw[fill=white] (1,4) circle (.35); \draw[fill=white] (3,4) circle (.35); \draw[fill=white] (5,4) circle (.35); \draw[fill=white] (7,4) circle (.35); \draw[line width=0.5mm,blue,fill=white] (9,4) circle (.35); \draw[fill=white] (11,4) circle (.35); \draw[fill=white] (13,4) circle (.35); \draw[line width=0.5mm,darkgreen,fill=white] (15,4) circle (.35); \draw[fill=white] (1,2) circle (.35); \draw[fill=white] (3,2) circle (.35); \draw[fill=white] (5,2) circle (.35); \draw[fill=white] (7,2) circle (.35); \draw[fill=white] (9,2) circle (.35); \draw[fill=white] (11,2) circle (.35); \draw[fill=white] (13,2) circle (.35); \draw[line width=0.5mm,darkgreen,fill=white] (15,2) circle (.35); \draw[fill=white] (1,0) circle (.35); \draw[fill=white] (3,0) circle (.35); \draw[fill=white] (5,0) circle (.35); \draw[fill=white] (7,0) circle (.35); \draw[fill=white] (9,0) circle (.35); \draw[fill=white] (11,0) circle (.35); \draw[fill=white] (13,0) circle (.35); \draw[fill=white] (15,0) circle (.35); \draw[fill=white] (0,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (2,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (4,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (6,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (8,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (10,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (12,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (14,5) circle (.35); \draw[line width=0.5mm,red,fill=white] (16,5) circle (.35); \draw[fill=white] (0,3) circle (.35); \draw[fill=white] (2,3) circle (.35); \draw[fill=white] (4,3) circle (.35); \draw[fill=white] (6,3) circle (.35); \draw[fill=white] (8,3) circle (.35); \draw[line width=0.5mm,blue,fill=white] (10,3) circle (.35); \draw[line width=0.5mm,blue,fill=white] (12,3) circle (.35); \draw[line width=0.5mm,blue,fill=white] (14,3) circle (.35); \draw[line width=0.5mm,blue,fill=white] (16,3) circle (.35); \draw[fill=white] (0,1) circle (.35); \draw[fill=white] (2,1) circle (.35); \draw[fill=white] (4,1) circle (.35); \draw[fill=white] (6,1) circle (.35); \draw[fill=white] (8,1) circle (.35); \draw[fill=white] (10,1) circle (.35); \draw[fill=white] (12,1) circle (.35); \draw[fill=white] (14,1) circle (.35); \draw[line width=0.5mm,darkgreen,fill=white] (16,1) circle (.35); \node at (1,6) {$R$}; \node at (3,6) {$+$}; \node at (5,6) {$+$}; \node at (7,6) {$+$}; \node at (9,6) {$B$}; \node at (11,6) {$+$}; \node at (13,6) {$+$}; \node at (15,6) {$G$}; \node at (1,4) {$+$}; \node at (3,4) {$+$}; \node at (5,4) {$+$}; \node at (7,4) {$+$}; \node at (9,4) {$B$}; \node at (11,4) {$+$}; \node at (13,4) {$+$}; \node at (15,4) {$G$}; \node at (1,2) {$+$}; \node at (3,2) {$+$}; \node at (5,2) {$+$}; \node at (7,2) {$+$}; \node at (9,2) {$+$}; \node at (11,2) {$+$}; \node at (13,2) {$+$}; \node at (15,2) {$G$}; \node at (1,0) {$+$}; \node at (3,0) {$+$}; \node at (5,0) {$+$}; \node at (7,0) {$+$}; \node at (9,0) {$+$}; \node at (11,0) {$+$}; \node at (13,0) {$+$}; \node at (15,0) {$+$}; \node at (0,5) {$+$}; \node at (2,5) {$R$}; \node at (4,5) {$R$}; \node at (6,5) {$R$}; \node at (8,5) {$R$}; \node at (10,5) {$R$}; \node at (12,5) {$R$}; \node at (14,5) {$R$}; \node at (16,5) {$R$}; \node at (0,3) {$+$}; \node at (2,3) {$+$}; \node at (4,3) {$+$}; \node at (6,3) {$+$}; \node at (8,3) {$+$}; \node at (10,3) {$B$}; \node at (12,3) {$B$}; \node at (14,3) {$B$}; \node at (16,3) {$B$}; \node at (0,1) {$+$}; \node at (2,1) {$+$}; \node at (4,1) {$+$}; \node at (6,1) {$+$}; \node at (8,1) {$+$}; \node at (10,1) {$+$}; \node at (12,1) {$+$}; \node at (14,1) {$+$}; \node at (16,1) {$G$}; \node at (1,6.8) {$7$}; \node at (3,6.8) {$6$}; \node at (5,6.8) {$5$}; \node at (7,6.8) {$4$}; \node at (9,6.8) {$3$}; \node at (11,6.8) {$2$}; \node at (13,6.8) {$1$}; \node at (15,6.8) {$0$}; \node at (-.75,5) {$ 1$}; \node at (-.75,3) {$ 2$}; \node at (-.75,1) {$ 3$}; \path[fill=white] (1,1) circle (.25); \node at (1,1) {\scriptsize$z_3$}; \path[fill=white] (3,1) circle (.25); \node at (3,1) {\scriptsize$z_3$}; \path[fill=white] (5,1) circle (.25); \node at (5,1) {\scriptsize$z_3$}; \path[fill=white] (7,1) circle (.25); \node at (7,1) {\scriptsize$z_3$}; \path[fill=white] (9,1) circle (.25); \node at (9,1) {\scriptsize$z_3$}; \path[fill=white] (11,1) circle (.25); \node at (11,1) {\scriptsize$z_3$}; \path[fill=white] (13,1) circle (.25); \node at (13,1) {\scriptsize$z_3$}; \path[fill=white] (15,1) circle (.25); \node at (15,1) {\scriptsize$z_3$}; \path[fill=white] (1,3) circle (.25); \node at (1,3) {\scriptsize$z_2$}; \path[fill=white] (3,3) circle (.25); \node at (3,3) {\scriptsize$z_2$}; \path[fill=white] (5,3) circle (.25); \node at (5,3) {\scriptsize$z_2$}; \path[fill=white] (7,3) circle (.25); \node at (7,3) {\scriptsize$z_2$}; \path[fill=white] (9,3) circle (.25); \node at (9,3) {\scriptsize$z_2$}; \path[fill=white] (11,3) circle (.25); \node at (11,3) {\scriptsize$z_2$}; \path[fill=white] (13,3) circle (.25); \node at (13,3) {\scriptsize$z_2$}; \path[fill=white] (15,3) circle (.25); \node at (15,3) {\scriptsize$z_2$}; \path[fill=white] (1,5) circle (.25); \node at (1,5) {\scriptsize$z_1$}; \path[fill=white] (3,5) circle (.25); \node at (3,5) {\scriptsize$z_1$}; \path[fill=white] (5,5) circle (.25); \node at (5,5) {\scriptsize$z_1$}; \path[fill=white] (7,5) circle (.25); \node at (7,5) {\scriptsize$z_1$}; \path[fill=white] (9,5) circle (.25); \node at (9,5) {\scriptsize$z_1$}; \path[fill=white] (11,5) circle (.25); \node at (11,5) {\scriptsize$z_1$}; \path[fill=white] (13,5) circle (.25); \node at (13,5) {\scriptsize$z_1$}; \path[fill=white] (15,5) circle (.25); \node at (15,5) {\scriptsize$z_1$}; \end{tikzpicture} \vglue3pt \[ \operatorname{GTP}(\mathfrak{s})=\left\{\begin{array}{ccccc}7&&3&&0\\&3&&0\\&&0\end{array}\right\},\quad \operatorname{GTP}^\circ(\mathfrak{s})=\left\{\begin{array}{ccccc}5&&2&&0\\&2&&0\\&&0\end{array}\right\},\] \vglue5pt \[\mathfrak{T}(\mathfrak{s})=\begin{ytableau}2&2&3&3&3\\3&3\end{ytableau}\;,\qquad \operatorname{string}_{(1,2,1)}(\mathfrak{T})=\left[\vcenter{\[email protected]{*+[o][F-]{0}&*+[o][F-]{0}\\&*+[o][F-]{0}}}\right]\;. \] \caption{The ground state. In this unique state with maximal number of crossings of colored lines, we have $\beta(\mathfrak{s})=\mathbf{z}^{\lambda+\rho}$, $\operatorname{wt}(\mathfrak{T}(\mathfrak{s}))=\mathbf{z}^{w_0(\lambda+\rho)}$.} \label{groundstate} \end{figure} \begin{remark} \label{superrem} It may be checked that the colored R-matrix (with $r$ colors) in Figure~\ref{coloredrmatrix} is the limit as $q\to \infty$ of the R-matrix of a Drinfeld twist of $U_q\big(\widehat{\mathfrak{sl}}(r|1)\big)$. It is also possible to vary the Boltzmann weights as follows: in Figure~\ref{coloredweights}, omit the $\tt{a}_2$ patterns in which all four edges have the same color; and in Figure~\ref{coloredrmatrix}, change the Boltzmann weights of the patterns in which all four edges have the same color from $z_i$ to $z_j$. These changes do not affect any of the arguments in this paper since the changed patterns do not appear in any of the states of the systems we consider, but they change the underlying quantum group to a Drinfeld twist of $U_q(\widehat{\mathfrak{sl}}_{r+1})$. \end{remark} Our next result shows that the colored partition function with $r$ colors and $r$ rows is a polynomial Demazure atom for $\mathrm{GL}(r)$ up to a factor of $\mathbf{z}^{\rho}$. \begin{theorem} \label{zdematoms} For every $w\in W$ we have \[Z(\mathfrak{S}_{\mathbf{z},\lambda,w})=\mathbf{z}^\rho\partial^\circ_w\mathbf{z}^\lambda.\] \end{theorem} \begin{proof} The proof is by induction with respect to Bruhat order. If $w=1_W$, it is easy to see that there is a unique state in $\mathfrak{S}_{\mathbf{z},\lambda,1_W}$ and its Boltzmann weight is $\mathbf{z}^{\rho+\lambda}$ (see Figure~\ref{groundstate}). Thus it suffices to show that for each $s_i$ and $w$ with $s_i w > w$, \begin{equation} \label{lemrecurse} \mathbf{z}^{- \rho} Z (\mathfrak{S}_{\mathbf{z}, \lambda, s_i w}) = \partial^\circ_i \bigl(\mathbf{z}^{- \rho} Z (\mathfrak{S}_{\mathbf{z}, \lambda, w})\bigr). \end{equation} Let $w\mathbf{c}=\mathbf{d}= (d_1, \cdots, d_r)$. Since $s_i w > w$, we have $d_i > d_{i + 1}$. Consider the partition function of the system in Figure~\ref{modpf} (top). This is a system like the one portrayed in Figure~\ref{tostates} but with an attached rotated vertex $z_{i + 1}, z_i$ on the left. We only exhibit two of the rows of the system because this is where the interesting changes occur. Also note that the parameters of the two rows are flipped, so now the top row has parameter $z_{i+1}$ and the bottom row has parameter $z_i$. Consulting Figure~\ref{coloredrmatrix}, the rotated vertex (or the R-matrix) has only one possible admissible configuration (with all $+$ spins). This means the partition function of the top system in Figure~\ref{modpf} will be equal to the Boltzmann weight of \[\begin{tikzpicture}[scale=0.7] \draw (0,0) to [out = 0, in = 180] (2,2); \draw (0,2) to [out = 0, in = 180] (2,0); \draw[fill=white] (0,0) circle (.35); \draw[fill=white] (0,2) circle (.35); \draw[fill=white] (2,0) circle (.35); \draw[fill=white] (2,2) circle (.35); \node at (0,0) {$+$}; \node at (0,2) {$+$}; \node at (2,2) {$+$}; \node at (2,0) {$+$}; \path[fill=white] (1,1) circle (.3); \node at (1,1) {$R_{z_{i+1},z_i}$}; \end{tikzpicture} \] times the partition function of the system with the rotated vertex removed. This is then $z_i Z (\mathfrak{S}_{s_i \mathbf{z}, \lambda, w})$. Note that $z_i$ and $z_j$ in Figure~\ref{coloredrmatrix} become here $z_{i+1}$ and $z_i$, respectively. We are using red and blue for the colors $d_i$ and $d_{i + 1}$, respectively. \begin{figure}[h] \begin{tikzpicture}[scale=0.7] \begin{scope}[shift={(-1,0)}] \draw (0,1) to [out = 0, in = 180] (2,3) to (4,3); \draw (0,3) to [out = 0, in = 180] (2,1) to (4,1); \draw (3,0.25) to (3,3.75); \draw (7,0.25) to (7,3.75); \draw (6,1) to (8,1); \draw (6,3) to (8,3); \draw[fill=white] (0,1) circle (.4); \draw[fill=white] (0,3) circle (.4); \draw[line width=0.5mm,red,fill=white] (8,3) circle (.4); \draw[line width=0.5mm,blue,fill=white] (8,1) circle (.4); \node at (0,1) {$+$}; \node at (0,3) {$+$}; \node at (5,3) {$\cdots$}; \node at (5,1) {$\cdots$}; \draw[densely dashed] (3,3.75) to (3,4.25); \draw[densely dashed] (3,0.25) to (3,-0.25); \draw[densely dashed] (7,3.75) to (7,4.25); \draw[densely dashed] (7,0.25) to (7,-0.25); \node at (8,1) {$B$}; \node at (8,3) {$R$}; \path[fill=white] (3,3) circle (.5); \node at (3,3) {\scriptsize$z_{i+1}$}; \path[fill=white] (3,1) circle (.4); \node at (3,1) {\scriptsize$z_i$}; \path[fill=white] (7,3) circle (.5); \node at (7,3) {\scriptsize$z_{i+1}$}; \path[fill=white] (7,1) circle (.4); \node at (7,1) {\scriptsize$z_i$}; \path[fill=white] (1,2) circle (.3); \node at (1,2) {\scriptsize$R_{z_{i+1},z_i}$}; \end{scope} \begin{scope}[shift={(1,-5.5)}] \draw (4,1) to (6,1) to [out = 0, in = 180] (8,3); \draw (4,3) to (6,3) to [out = 0, in = 180] (8,1); \draw[line width=0.5mm,red,fill=white] (8,3) circle (.4); \draw[line width=0.5mm,blue,fill=white] (8,1) circle (.4); \draw (0,1) to (2,1); \draw (0,3) to (2,3); \draw (5,0.25) to (5,3.75); \draw (1,0.25) to (1,3.75); \draw[fill=white] (0,1) circle (.4); \draw[fill=white] (0,3) circle (.4); \node at (3,1) {$\cdots$}; \node at (3,3) {$\cdots$}; \draw[densely dashed] (1,3.75) to (1,4.25); \draw[densely dashed] (1,0.25) to (1,-0.25); \draw[densely dashed] (5,3.75) to (5,4.25); \draw[densely dashed] (5,0.25) to (5,-0.25); \path[fill=white] (1,3) circle (.4); \node at (1,3) {\scriptsize$z_{i}$}; \path[fill=white] (1,1) circle (.5); \node at (1,1) {\scriptsize$z_{i+1}$}; \path[fill=white] (5,3) circle (.4); \node (a) at (5,3) {\scriptsize$z_{i}$}; \path[fill=white] (5,1) circle (.5); \node at (5,1) {\scriptsize$z_{i+1}$}; \path[fill=white] (7,2) circle (.4); \node at (7,2) {\scriptsize$R_{z_{i+1},z_i}$}; \node at (8,1) {$B$}; \node at (8,3) {$R$}; \node at (0,1) {$+$}; \node at (0,3) {$+$}; \end{scope} \end{tikzpicture} \caption{Top: the system $\mathfrak{S}_{s_i\mathbf{z},\lambda,w}$ with the R-matrix attached. Bottom: after using the Yang-Baxter equation.} \label{modpf} \end{figure} After repeated use of the Yang-Baxter equation (Figure~\ref{eqn:ybe}), we move the rotated vertex to the right, switch the parameters of the two rows and obtain a system with the same partition function by Theorem~\ref{coloredybethm}. This is the system on the bottom of Figure~\ref{modpf}. This method of Baxter is sometimes called the ``train argument.'' Now looking at the possible weights from Figure~\ref{coloredrmatrix}, the R-matrix has two admisible configurations (third and fifth on the second row) and so the equality of partition functions from Figure~\ref{modpf} becomes the identity \[ z_i Z (\mathfrak{S}_{s_i \mathbf{z}, \lambda, w}) = z_{i + 1} Z (\mathfrak{S}_{\mathbf{z}, \lambda, w}) + (z_{i+1} - z_{i})\,Z (\mathfrak{S}_{\mathbf{z}, \lambda, s_i w}) . \] Since $\mathbf{z}^{\alpha_i}=z_i/z_{i+1}$, the above identity may be rewritten as \begin{equation} \label{asdbaraction} Z (\mathfrak{S}_{\mathbf{z}, \lambda, s_iw}) = - (1 -\mathbf{z}^{\alpha_i})^{- 1} (Z (\mathfrak{S}_{\mathbf{z}, \lambda, w}) -\mathbf{z}^{\alpha_i} Z (\mathfrak{S}_{s_i\mathbf{z}, \lambda, w})) . \end{equation} The right-hand side can be interpreted as the operator $-(1 -\mathbf{z}^{\alpha_i})^{-1} (1 - \mathbf{z}^{\alpha_i}s_i)$ applied to $Z (\mathfrak{S}_{\mathbf{z}, \lambda, w})$. Note that \[\partial^\circ_i=-(1 -\mathbf{z}^{\alpha_i})^{-1} (1 - s_i),\quad \textrm{and hence} \quad \mathbf{z}^\rho\partial^\circ_i\mathbf{z}^{-\rho}= -(1 -\mathbf{z}^{\alpha_i})^{-1} (1 - \mathbf{z}^{\alpha_i}s_i).\] Using this, (\ref{lemrecurse}) follows from (\ref{asdbaraction}). \end{proof} \begin{remark} It was recently found by Brubaker, Bump and Friedberg that a variation of the Boltzmann weights produces the Demazure character $\mathbf{z}^\rho\partial_{w}\mathbf{z}^\lambda$ instead of the Demazure atom $\mathbf{z}^\rho\partial^\circ_{w}\mathbf{z}^\lambda$ in Theorem~\ref{zdematoms}. The modification is to interchange red and blue in the third case of Figure~\ref{coloredweights}. We hope to discuss this in a subsequent paper. \end{remark} \section{\label{dcandci}Demazure crystals and atoms} A refined Demazure character formula in the context of crystals was obtained by Littelmann~\cite{LittelmannYT} and Kashiwara~\cite{KashiwaraDemazure}. We begin this section by reviewing this refinement and then proceed to identify Demazure atoms with subsets of crystal and characterize the vertices belonging to this crystal. Let us fix a finite Cartan type with weight lattice $\Lambda$; when we return to the colored ice we will take this to be the $\operatorname{GL}(r)$ Cartan type. Let $\lambda$ be a dominant weight, which we assume to be a partition. Then there is a unique irreducible representation $\pi_\lambda$ of highest weight $\lambda$, and a corresponding normal crystal $\mathcal{B}_\lambda$ whose character is the same as that of $\pi_\lambda$. Recall that crystals come equipped with Kashiwara maps $e_i,f_i:\mathcal{B}_\lambda\to\mathcal{B}_\lambda\cup\{0\}$ and $\varphi_i,\varepsilon_i:\mathcal{B}_\lambda\to\mathbb{Z}$ (see \cite{KashiwaraNakashima}). For a crystal $\mathcal{B}$ an element $v$ is called a \textit{highest weight element} if $e_i(v)=0$ for all $i$; similarly it is \textit{lowest weight} if all $f_i(v)=0$. The crystal $\mathcal{B}_\lambda$ has unique highest and lowest weight elements $v_\lambda$ and $v_{w_0\lambda}$, respectively; with weights $\operatorname{wt}(v_\lambda)=\lambda$ and $\operatorname{wt}(v_{w_0\lambda})=w_0\lambda$. With $\mathcal{B}=\mathcal{B}_\lambda$ let $\mathbb{Z} [\mathcal{B}]$ be the free abelian group on $\mathcal{B}$. We define a map $\partial_i : \mathcal{B} \longrightarrow \mathbb{Z} [\mathcal{B}]$ in terms of the Kashiwara operators $e_i$ and $f_i$ by \[ \partial_i v = \left\{ \begin{array}{ll} v + f_i v + \ldots + f_i^k v & \text{if $k \geqslant 0,$}\\ 0 & \text{if $k = - 1,$}\\ - (e_i v + \ldots + e_i^{- k - 1} v) & \text{if $k < -1$}, \end{array} \right. \] where $k = \langle \operatorname{wt} (v), \alpha_i^{\vee} \rangle$. This lifts the Demazure operator $\partial_i$ to the crystal; indeed, composing with the familiar weight map on the crystal (described in Section~\ref{sec:kansas}) produces the Demazure operators of (\ref{isobaricddefined}), and so we will use the same notation for the operator in both contexts. By an {\textit{$i$-root string}} we mean an equivalence class of elements of $\mathcal{B}$ under the equivalence relation that $x \equiv y$ if $x = e_i^r y$ or $x = f_i^r y$ for some $r$. An $i$-root string $S$ has a unique highest weight element $u_S$ characterized by $e_i (u_S) = 0$. We may now state the \textit{refined Demazure character formula} of Littelmann and Kashiwara. \begin{theorem}[Littelmann, Kashiwara] \label{demazurecrystals} Let $\mathcal{B}=\mathcal{B}_\lambda$. \begin{enumerate}[label={(\roman*)}, leftmargin=*] \item \label{itm:crystals} There exist subsets $\mathcal{B}(w)$ of $\mathcal{B}$ indexed by $w \in W$ such that $\mathcal{B}(1) = \{ v_{\lambda} \}$, $\mathcal{B}(w_0)=\mathcal{B}$ and if $s_i w > w$ then \[\mathcal{B}(s_i w) = \left\{ x \in \mathcal{B} \mid \text{$e_i^r x \in \mathcal{B}(w)$ for some $r$} \right\}\;.\] \item If $S$ is an $i$-root string then $\mathcal{B}(w) \cap S$ is one of the three possibilities: $\varnothing$, $S$ or $\{ u_S \}$. \par\smallskip\noindent \item \label{itm:character} We have \[ \sum_{x \in \mathcal{B}(w)} \mathbf{z}^{\operatorname{wt}(x)} = \partial_w\mathbf{z}^\lambda\;.\] \end{enumerate} \end{theorem} \noindent See~\cite{KashiwaraDemazure} or \cite{BumpSchilling} Chapter~13 for proof. \medskip Demazure characters and atoms were defined in Section~\ref{sec:do} as functions on the complex torus $T$. The preceding theorem allows us to lift Demazure characters to the crystal $\mathcal{B}=\mathcal{B}_\lambda$; as in the theorem, we will denote these (lifted) Demazure characters by $\mathcal{B}(w)$ for $w \in W$. Let $\mathcal{B}^\circ(w)$ ($w\in W$) be a family of disjoint subsets of $\mathcal{B}$. We call these a family of \textit{crystal Demazure atoms} if \begin{equation} \label{eqatomic}\mathcal{B}(w)=\bigcup_{y\leqslant w}\mathcal{B}^\circ(y). \end{equation} \begin{lemma} \label{lem:uniqueatomic} If a family of disjoint subsets $\mathcal{B}^\circ(w)$ satisfying \eqref{eqatomic} exists it is unique. \end{lemma} \begin{proof} Let us identify a subset $S$ of $\mathcal{B}$ with the element $\sum_{v\in S} v$ of the free abelian group $\mathbb{Z}[\mathcal{B}]$. Then we may rewrite (\ref{eqatomic}) as \[\mathcal{B}(w)=\sum_{y\leqslant w}\mathcal{B}^\circ(y).\] By M\"{o}bius inversion with respect to the Bruhat order (\cite{Verma,Stembridge}) this is equivalent to \[\mathcal{B}^\circ(w)=\sum_{y\leqslant w}(-1)^{\ell(w)-\ell(y)}\mathcal{B}(y).\] This characterization of $\mathcal{B}^\circ(w)$ as an element of $\mathbb{Z}[\mathcal{B}]$ proves the uniqueness. \end{proof} As explained in the Introduction, in type~A such a decomposition of the set of tableaux in any $\mathcal{B}_\lambda$ is given by the theory of Lascoux-Sch\"utzenberger keys. We will give another algorithm to compute, for any $v \in \mathcal{B}$, the element~$w \in W$ such that $v \in \mathcal{B}^\circ(w)$ and show that the resulting subsets satisfy (\ref{eqatomic}), making them a family of crystal Demazure atoms. This algorithm makes use of the \textit{string} or \textit{BZL} patterns for vertices in a crystal, which we now describe. These patterns were introduced in~\cite{BerensteinZelevinskyDuke} for type~$A$, and more generally in~\cite{LittelmannCones}. See also~\cite{BumpSchilling} Chapter~11 and~\cite{wmd5book} Chapters~2 and~5. Let $\mathbf{i}=(i_1,\cdots,i_N)$ be a reduced word for $w_0=s_{i_1}\cdots s_{i_N}$. Given any $v\in\mathcal{B}_\lambda$, let $b_1 := b_1(v)$ be the largest nonnegative integer such that $f_{i_1}^{b_1}v\neq 0$. Then let $b_2$ be the largest integer such that $f_{i_2}^{b_2}f_{i_1}^{b_1}v\neq 0$. Continuing, we find that $f_{i_N}^{b_N}\cdots f_{i_2}^{b_2}f_{i_1}^{b_1}v=v_{w_0\lambda}$. We will denote the resulting vector of lengths in root strings by \begin{equation} \label{plstring} \operatorname{string}^{(f)}_{\mathbf{i}}(v):=(b_1,\cdots,b_N). \end{equation} Dually, let $c_1,\cdots,c_N$ be the maximum values such that $e_{i_k}^{c_k}\cdots e_{i_2}^{c_2}e_{i_1}^{c_1}v\neq 0$ for $k=1,2,\cdots,N$. Then $e_{i_N}^{c_N}\cdots e_{i_2}^{c_2}e_{i_1}^{c_1}v=v_\lambda$ and we define \begin{equation} \label{plstringe} \operatorname{string}^{(e)}_{\mathbf{i}}(v):=(c_1,\cdots,c_N). \end{equation} The map $\alpha\mapsto -w_0\alpha$ permutes the positive roots, and in particular the simple roots. Thus there is a bijection $i\mapsto i'$ of the set $I$ of indices such that $\alpha_{i'}=-w_0\alpha_i$ and $w_0s_iw_0^{-1}=s_{i'}$. In the $\operatorname{GL}(r)$ case $I=\{1,\cdots,r-1\}$ and $i'=r-i$. The crystal also has a map $v\mapsto v'$, the \textit{Sch\"utzenberger} or \textit{Lusztig} involution, such that if $v\in\mathcal{B}$ then \begin{equation} \label{schutzef} f_i(v')=(e_{i'}(v))',\qquad e_i(v')=(f_{i'}(v))' . \end{equation} It follows from (\ref{schutzef}) that if $\mathbf{i}'=(i_1',\cdots,i_N')$ then \begin{equation} \label{schutzbzl} \operatorname{string}^{(e)}_{\mathbf{i}'}(v)=\operatorname{string}^{(f)}_{\mathbf{i}}(v'). \end{equation} Littelmann~\cite{LittelmannCones} observed that for certain ``good'' choices of long word $\mathbf{i}$ the set of possible string patterns can be easily characterized. For $\operatorname{GL}(r)$, we take \begin{equation} \label{littstr} \mathbf{i}=(1,2,1,3,2,1,4,3,2,1,\cdots,r,r-1,\cdots,3,2,1). \end{equation} Thus \begin{equation} \label{litstrp} \mathbf{i}'=(r-1,r-2,r-1,r-3,r-2,r-1,\cdots,r-3,r-2,r-1) . \end{equation} Following~\cite{LittelmannCones} we arrange the string pattern $\operatorname{string}^{(e)}_{\mathbf{i}'}(v)=(b_1,b_2,\cdots)$ in an array \begin{equation} \label{bzlpat} \operatorname{string}^{(e)}_{\mathbf{i}'}(v)= \left[\begin{array}{cccc} \ddots&&\vdots&\vdots\\ &b_4&b_5&b_6\\ &&b_2&b_3\\ &&&b_1\end{array}\right] \end{equation} in which the $b_i$ satisfy the Littelmann cone inequalities \begin{equation} \label{litcone} b_1\geqslant 0,\qquad b_2\geqslant b_3\geqslant 0,\qquad b_4\geqslant b_5\geqslant b_6\geqslant 0\,,\qquad\cdots\;. \end{equation} Following~\cite{wmd5book} we decorate the string pattern (\ref{bzlpat}) by circling certain $b_i$ according to these cone inequalities. \begin{circling} \label{circlingrule} Let $\mathbf{b}=(b_1,b_2,\cdots,b_N)$ where $N=r(r-1)/2$ be a sequence of nonnegative integers satisfying \eqref{litcone}. We arrange the sequence in an array \eqref{bzlpat} and decorate it by circling an entry $b_i$ if it is minimal in the cone. Explicitly, if $i$ is a triangular number, so that $b_i$ is at the right end of its row, the condition for circling it is that $b_i=0$; otherwise, the condition for circling is that $b_i=b_{i+1}$. \end{circling} Let $(i_1,i_2,i_3,i_4,i_5,i_6,\cdots)$ be the sequence $(1,2,1,3,2,1,\cdots)$ of \eqref{littstr}. We transfer the circles from the string pattern to the following array made with the simple reflections: \begin{equation} \label{circledreflections} \left[\begin{array}{cccc} \ddots&&\vdots&\vdots\\ &s_{i_6}&s_{i_5}&s_{i_4}\\ &&s_{i_3}&s_{i_2}\\ &&&s_{i_1}\end{array}\right] = \left[\begin{array}{cccc} \ddots&&\vdots&\vdots\\ &s_1&s_2&s_3\\ &&s_1&s_2\\ &&&s_1\end{array}\right]\;. \end{equation} \begin{remark} Note that the horizontal orders of the entries in (\ref{bzlpat}) and (\ref{circledreflections}) are different. \end{remark} If $v\in\mathcal{B}_\lambda$, let $(s_{j_1},\cdots,s_{j_k})$ be the subsequence of $(s_{i_1},s_{i_2},s_{i_3},\cdots)=(s_1,s_2,s_1,s_3,s_2,s_1,\cdots)$ consisting of the circled reflections in (\ref{circledreflections}) derived from the string pattern $\operatorname{string}^{(e)}_{\mathbf{i}'}(v)$. Here $\mathbf{i}'$ is the specific sequence in (\ref{litstrp}). With the nondescending product $\Pi_{\operatorname{nd}}$ defined in (\ref{pinddef}), define $\omega : \mathcal{B}_\lambda \to W$ by \begin{equation} \label{ompdef}\omega(v) := \Pi_{\operatorname{nd}}(s_{j_1},\cdots,s_{j_k}). \end{equation} For example, suppose that the string pattern is: \begin{equation} \label{samplebzl} \left[ \vcenter{ \[email protected]{ *+[o][F-]{1}&1\\ &*+[o][F-]{0}}}\right]\;. \end{equation} The circling rule tells us to circle $b_1$ and $b_2$ since $b_1=0$ and $b_2=b_3$. Thus we circle these entries: \[\left[ \vcenter{ \[email protected]{ *+[o][F-]{s_1}&s_2\\ &*+[o][F-]{s_1}}}\right]\; \] and $\omega(v)=\Pi_{\operatorname{nd}}(s_1,s_1)= \left\{ S_1^2 \right\} = s_1$ in this case, using the notation of Remark~\ref{heckecompute}. We may now state one of our main results. Let $W_\lambda$ be the stabilizer of $\lambda$ in $W$. Note that if $w,w'\in W$ lie in the same coset of $W/W_\lambda$ then $\mathcal{B}_\lambda(w)=\mathcal{B}_\lambda(w')$. We will say that $w\in W$ is $\lambda$-maximal if it is the longest element of its subset. \begin{theorem} \label{daform} Let $\mathcal{B}=\mathcal{B}_\lambda$. There exist a family of subsets $\mathcal{B}^\circ(w)$ of $\mathcal{B}$ indexed by $w\in W$ such that $\mathcal{B}^\circ(w)=\mathcal{B}^\circ(w')$ if and only if $w,w'$ lie in the same coset of $W/W_\lambda$; otherwise they are disjoint, and such that the decomposition \eqref{eqatomic} is satisfied. If $w$ is the longest element of this coset, then \begin{equation} \label{bcircdef} \mathcal{B}^\circ(w)=\{v\in\mathcal{B} \mid w_0\omega(v)=w\}. \end{equation} If $w$ is not the longest element of its coset then the equation $w_0\omega(v)=w$ has no solutions. \end{theorem} This is a refinement of results of Lascoux and Sch\"utzenberger~\cite{LascouxSchutzenbergerKeys}, and is one of the main points of the paper. Equation (\ref{bcircdef}), together with the definition and properties of $\omega$, leads to the the algorithmic characterization of the crystal Demazure atom in Subsection~\ref{subsec:alg}. The proof of Theorem~\ref{daform} will be given later, in Section~\ref{sec:dafpro}. \section{\label{bijsec}A bijection between colored states and Demazure atoms} We return now to colored ice models. Recall from Proposition~\ref{statedpf} that the admissible states of colored ice $\mathfrak{S}_{\mathbf{z}, \lambda, w}$ with $w \in W$ partition the set of admissible states of uncolored ice in the system $\mathfrak{S}_{\mathbf{z}, \lambda}$. The map from any $\mathfrak{S}_{\mathbf{z}, \lambda, w}$ to $\mathfrak{S}_{\mathbf{z}, \lambda}$ is simply given by ignoring the colors (i.e., replacing each colored edge by a $-$ spin). In Section~\ref{sec:kansas} we defined a map $\mathfrak{s}\to\mathfrak{T}(\mathfrak{s})$ from $\mathfrak{S}_{\mathbf{z},\lambda}$ to $\mathcal{B}_\lambda$. We are interested in knowing the image of $\mathfrak{S}_{\mathbf{z}, \lambda, w}$ under this map. Let $v\to v'$ be the Sch\"utzenberger (Lusztig) involution of $\mathcal{B}_\lambda$. \begin{theorem} \label{crystalmt} If $w \in W$ and $\mathfrak{s}\in\mathfrak{S}_{\mathbf{z},\lambda}$, then $\mathfrak{s}\in\mathfrak{S}_{\mathbf{z},\lambda,w}$ if and only if $w_0\omega\big(\mathfrak{T}(\mathfrak{s})'\big)=w$. \end{theorem} Thus if we accept Theorem~\ref{daform}, whose proof will be given later, comparing Theorem~\ref{crystalmt} with (\ref{bcircdef}) shows that the map $\mathfrak{s}\rightarrow\mathfrak{T}(\mathfrak{s})'$ sends the ensemble $\mathfrak{S}_{\mathbf{z},\lambda,w}$ to the Demazure atom $\mathcal{B}_\lambda^\circ(w)$. Ultimately the proof of Theorem~\ref{daform} in Section~\ref{sec:dafpro} will rely on this Theorem~\ref{crystalmt}. Before we prove Theorem~\ref{crystalmt} we give an example. In Figure~\ref{adjointcrystal}, we have labeled the elements of the $\operatorname{GL}(3)$ crystal $\mathcal{B}_\lambda$ ($\lambda=(2,1,0)$) by a flag indicating the colors along the right edge of the corresponding state. These colors are read off from top to bottom on the horizontal edges at the right boundary of the grid. In the decomposition of Proposition~\ref{statedpf}, the flag is a permutation $w\mathbf{c}$ of the colors of the standard flag, which we are taking to be $\mathbf{c}=(R,B,G)$. For example, to compute the flags for the elements \begin{equation} \label{tostatesbis} \ytableausetup{nosmalltableaux}\begin{ytableau}1&3\\2\end{ytableau} \quad \text{and} \quad \begin{ytableau}1&2\\2\end{ytableau} \end{equation} we construct the corresponding states as in Figure~\ref{tostates} and then read off the colors from the right edge, which are $(G,R,B)$ for both states. In Figure~\ref{adjointcrystal} these colors are represented as a flag. The flag allows us to read off the unique $y\in W$ such that the corresponding state $\mathfrak{s}$ is in $\mathfrak{S}_{\mathbf{z},\lambda,y}$. For example in the two states in (\ref{tostatesbis}), we have the flag $(G,R,B)=s_1s_2(R,B,G)$ and so $y=s_1s_2$. \noindent \begin{figure}[htb] \[\ytableausetup{smalltableaux} \begin{tikzpicture}[flagmatrix/.style={xshift=.9cm, matrix of nodes, nodes={outer sep=0pt, inner sep=0pt, minimum size=3.5mm, font=\scriptsize\bfseries, text=white}, row sep={3.5mm,between origins}}] \node at (0,0) {$\begin{ytableau}2&3\\3\end{ytableau}$}; \node at (-2,2) {$\begin{ytableau}1&3\\3\end{ytableau}$}; \node at (2,2) {$\begin{ytableau}2&2\\3\end{ytableau}$}; \node at (-2,4) {$\begin{ytableau}1&3\\2\end{ytableau}$}; \node at (2,4) {$\begin{ytableau}1&2\\3\end{ytableau}$}; \node at (-2,6) {$\begin{ytableau}1&2\\2\end{ytableau}$}; \node at (2,6) {$\begin{ytableau}1&1\\3\end{ytableau}$}; \node at (0,8) {$\begin{ytableau}1&1\\2\end{ytableau}$}; \draw[->] (-1.6,1.6) -- (-.5,.5); \draw[->] (1.5,1.5) -- (.5,.5); \draw[->] (-2,3.4) -- (-2,2.6); \draw[->] (2,3.4) -- (2,2.6); \draw[->] (-2,5.4) -- (-2,4.6); \draw[->] (2,5.4) -- (2,4.6); \draw[->] (0.4,7.6) -- (1.5,6.5); \draw[->] (-.5,7.5) -- (-1.5,6.5); \matrix at (0,0) [flagmatrix] {|[fill=red]| R \\ |[fill=blue]| B \\ |[fill=green]| G \\}; \matrix at (-2,2) [flagmatrix] {|[fill=red]| R \\ |[fill=green]| G \\ |[fill=blue]| B \\}; \matrix at (-2,4) [flagmatrix] {|[fill=green]| G \\ |[fill=red]| R \\ |[fill=blue]| B \\}; \matrix at (-2,6) [flagmatrix] {|[fill=green]| G \\ |[fill=red]| R \\ |[fill=blue]| B \\}; \matrix at (2,2) [flagmatrix] {|[fill=blue]| B \\ |[fill=red]| R \\ |[fill=green]| G \\}; \matrix at (2,4) [flagmatrix] {|[fill=blue]| B \\ |[fill=green]| G \\ |[fill=red]| R \\}; \matrix at (2,6) [flagmatrix] {|[fill=blue]| B \\ |[fill=green]| G \\ |[fill=red]| R \\}; \matrix at (0,8) [flagmatrix] {|[fill=green]| G \\ |[fill=blue]| B \\ |[fill=red]| R \\}; \node at (-1.2,7.25) {$\scriptstyle 1$}; \node at (1.2,7.25) {$\scriptstyle 2$}; \node at (-2.2,5) {$\scriptstyle 2$}; \node at (2.2,5) {$\scriptstyle 1$}; \node at (-2.2,3) {$\scriptstyle 2$}; \node at (2.2,3) {$\scriptstyle 1$}; \node at (1.2,1) {$\scriptstyle 2$}; \node at (-1.2,1) {$\scriptstyle 1$}; \end{tikzpicture}\qquad\qquad \begin{tikzpicture} \node at (0,0) {$\begin{smallmatrix}0&0\\&0\end{smallmatrix}$}; \node at (-2,2) {$\begin{smallmatrix}0&0\\&1\end{smallmatrix}$}; \node at (-2,4) {$\begin{smallmatrix}1&1\\&0\end{smallmatrix}$}; \node at (-2,6) {$\begin{smallmatrix}2&1\\&0\end{smallmatrix}$}; \node at (2,2) {$\begin{smallmatrix}1&0\\&0\end{smallmatrix}$}; \node at (2,4) {$\begin{smallmatrix}1&0\\&1\end{smallmatrix}$}; \node at (2,6) {$\begin{smallmatrix}1&0\\&2\end{smallmatrix}$}; \node at (0,8) {$\begin{smallmatrix}1&2\\&1\end{smallmatrix}$}; \draw (0,0) circle (.4); \draw (-2,2) circle (.4); \draw (2,2) circle (.4); \draw (-2,4) circle (.4); \draw (2,4) circle (.4); \draw (-2,6) circle (.4); \draw (2,6) circle (.4); \draw (0,8) circle (.4); \draw[->] (-1.6,1.6) -- (-.5,.5); \draw[->] (1.5,1.5) -- (.5,.5); \draw[->] (-2,3.4) -- (-2,2.6); \draw[->] (2,3.4) -- (2,2.6); \draw[->] (-2,5.4) -- (-2,4.6); \draw[->] (2,5.4) -- (2,4.6); \draw[->] (0.4,7.6) -- (1.5,6.5); \draw[->] (-.5,7.5) -- (-1.5,6.5); \node at (-1.2,7.25) {$\scriptstyle 1$}; \node at (1.2,7.25) {$\scriptstyle 2$}; \node at (-2.2,5) {$\scriptstyle 2$}; \node at (2.2,5) {$\scriptstyle 1$}; \node at (-2.2,3) {$\scriptstyle 2$}; \node at (2.2,3) {$\scriptstyle 1$}; \node at (1.2,1) {$\scriptstyle 2$}; \node at (-1.2,1) {$\scriptstyle 1$}; \end{tikzpicture}\] \caption{Left: The $\operatorname{GL}(3)$ crystal of highest weight $\lambda={(2,1,0)}$, showing the ``flags'' that are the colors of the right edges of the corresponding states. Right: the same crystal, showing the pattern $\operatorname{string}^{(f)}_{\mathbf{i}}$ that controls both the crossings of colored lines in the state, and which also carry information about the Demazure crystals.} \label{adjointcrystal} \end{figure} Now let us also verify Theorem~\ref{daform} and Theorem~\ref{crystalmt} for the patterns in Figure~\ref{tostates}. Both are in the system $\mathfrak{S}_{\mathbf{z},(2,1,0),s_1s_2}$. Their string patterns $\operatorname{string}^{(e)}_{\mathbf{i}'}(\mathfrak{T}')=\operatorname{string}^{(f)}_{\mathbf{i}}(\mathfrak{T})$ are shown in Table~\ref{tab:string-patterns}. \begin{table}[h] \ytableausetup{nosmalltableaux} \centering \caption{String patterns for the examples shown in Figure~\ref{tostates} with tableau $\mathfrak{T}$ and its Sch\"utzenberger involution $\mathfrak{T}'$.} \label{tab:string-patterns} \vspace{-1em} \[\def2.2{2.2} \begin{array}{c@{\hskip 2em}c@{\hskip 2em}l} \toprule \mathfrak{T} & \mathfrak{T}' & \operatorname{string}^{(f)}_{(1,2,1)}(\mathfrak{T})=\operatorname{string}^{(e)}_{(2,1,2)}(\mathfrak{T}') \\ \midrule \ytableaushort{12,2} & \ytableaushort{22,3} & \left[\vcenter{\[email protected]{2&1\\&*+[o][F-]{0}}}\right] \vspace{1em}\\ \ytableaushort{13,2} & \ytableaushort{12,3} & \left[\vcenter{\[email protected]{*+[o][F-]{1}&1\\&*+[o][F-]{0}}}\right] \vspace{1em}\\ \bottomrule \end{array} \] \end{table} We have $\omega(\mathfrak{T}')=s_1$ in both cases; indeed for the first row in Table~\ref{tab:string-patterns}, $\omega(\mathfrak{T}')=\Pi_{\operatorname{nd}}(s_1)=s_1$ and in the second row $\omega(\mathfrak{T}')=\Pi_{\operatorname{nd}}(s_1,s_1)=s_1$, and in both cases $w_0\omega(\mathfrak{T'})=s_1s_2$. Moreover the two patterns $\mathfrak{T}'$ comprise the Demazure atom $\mathcal{B}^\circ(s_1s_2)$ since they are the two patterns in $\mathcal{B}(s_1s_2)$ that are not already in $\mathcal{B}(s_2)$. Thus we have confirmed both Theorem~\ref{daform} and Theorem~\ref{crystalmt} for one particular Demazure atom. \begin{proof}[Proof of Theorem~\ref{crystalmt}] First we will show that the circled locations in $\operatorname{GTP}^\circ(\mathfrak{s})$ correspond to $\texttt{a}_2$ vertices in the state $\mathfrak{s}$ (by the labeling in Figure~\ref{coloredweights}), which are places where the colored lines may cross. Let $\mathfrak{s}$ be a state of $\mathfrak{S}_{\mathbf{z},\lambda,y}$. Let $\operatorname{GTP}^\circ(\mathfrak{s})$ and $\mathfrak{T}\in\mathcal{B}_\lambda$ be the corresponding Gelfand-Tsetlin pattern and tableau as described in Section~\ref{sec:kansas} (using the embedding of $\mathfrak{S}_{\mathbf{z},\lambda,y}$ into $\mathfrak{S}_{\mathbf{z},\lambda}$). We take $v=\mathfrak{T}'$ in (\ref{bzlpat}) so we are using $\operatorname{string}_{\mathbf{i}'}^{(e)}(\mathfrak{T}')=\operatorname{string}_{\mathbf{i}}^{(f)}(\mathfrak{T})$ represented as a vector $(b_1, b_2, \cdots)$. Let us consider how the circles may be read off from the Gelfand-Tsetlin pattern with entries $a_{i,j}$ as in (\ref{reducedgtp}). According to Proposition~2.2 of~\cite{wmd5book}, \begin{equation} \label{bzlfromgtp} \begin{array}{l} b_1 = a_{r,r}-a_{r-1,r}\\ b_2 = (a_{r-1,r-1}+a_{r-1,r})-(a_{r-2,r-1}+a_{r-2,r}),\\ b_3 = a_{r-1,r}-a_{r-2,r},\\ b_4 = (a_{r-2,r-2}+a_{r-2,r-1}+a_{r-2,r})-(a_{r-3,r-2}+a_{r-3,r-1}+a_{r-3,r}),\\ b_5 = (a_{r-2,r-1}+a_{r-2,r})-(a_{r-3,r-1}+a_{r-3,r}),\\ b_6 = a_{r-2,r}-a_{r-3,r},\\ \quad\vdots\end{array} \end{equation} These imply that the circled locations depend on equalities between entries in $\operatorname{GTP}(\mathfrak{s})$ or, equivalently, $\operatorname{GTP}^\circ(\mathfrak{s})$. For example $b_2$ is circled if and only if $a_{r-1,r-1}=a_{r-2,r-1}$. With $A_{i,j}$ the entries in $\operatorname{GTP}(\mathfrak{s})$, so that $A_{i,j}=a_{i,j}+r-j$, this is equivalent to $A_{r-1,r-1}=A_{r-2,r-1}$, and similarly if any $b_k$ is circled then we have $A_{i,j}=A_{i-1,j}$ for the appropriate $i,j$. Now recall that in the bijection $\mathfrak{T} \leftrightarrow \mathfrak{s}$, $A_{i,j}$ is the number of a column where a vertical edge has a colored spin. Therefore from the admissible colored ice configurations of Figure~\ref{coloredweights}, the circled entries in (\ref{bzlpat}) correspond to vertices of type $\tt{a}_2$ in the state of ice $\mathfrak{s}$. These are locations where two colored lines may cross. From Figure~\ref{coloredweights} the lines will cross if and only if the left edge color is greater than the top edge color at the vertex, which is equivalent to the assumption that they have not crossed previously. We consider a sequence of lines $\ell_i$ through the grid, $i=0,\ldots,r$ to be described as follows. The line $\ell_i$ begins to the left of the grid between the $i$-th and $(i+1)$-th row, or above the first row if $i=0$, or below the $r$-th row if $i=r$. It traverses the grid, then moves up to the northeast corner. See Figure~\ref{tostates} where these lines are drawn in two examples. Each $\ell_i$ intersects exactly $r$ colored lines, and we can read off the colors sequentially; let $\mathbf{c}^i$ be the corresponding sequence of colors. Thus $\mathbf{c}^0=\mathbf{c}$, while $\mathbf{c}^r=w_0y\mathbf{c}$, where $y$ is the Weyl group element we wish to compute. The $w_0$ in this last identity is included because the line $\ell_r$ visits the horizontal edges on the right edge from bottom to top, whereas in describing the flag $y\mathbf{c}$, the reading is from top to bottom. (See Figure~\ref{tostates}.) As we have already noted, the circled entries in (\ref{bzlpat}) correspond to $\tt{a}_2$ patterns in the state. These are places where two colored lines may cross. The crossings interchange colors and each corresponds to a simple reflection that is circled in (\ref{circledreflections}). So if $i>0$ we may try to compute $\mathbf{c}_{i}$ from $\mathbf{c}_{i-1}$ by applying the circled reflections in the $i$-th row of (\ref{circledreflections}). Remembering from the proof of Proposition~\ref{statedpf} that the colors in the $i$-th row are assigned from right to left, this means (subject to a caveat that we will explain below) that \[\mathbf{c}_i=(s_{r-i})_i\cdots(s_3)_i(s_2)_i(s_1)_i\mathbf{c}_{i-1},\] where $(s_j)_i$ denotes $s_j$ if $s_j$ is circled in the $i$-th row of (\ref{circledreflections}), and $(s_j)_i=1$ if $s_j$ is not circled. If $i=r$, there is no $i$-th row to (\ref{circledreflections}), and correspondingly $\mathbf{c}_r=\mathbf{c}_{r-1}$. This is as it should be since at this stage there is only a single colored vertical edge that intersects the line $\ell_{r-1}$, and no interchanges are possible. (See Figure~\ref{tostates}.) We mentioned that there is a caveat in the above explanation. This is because from Figure~\ref{coloredweights} we see that in an $\tt{a}_2$ vertex, if the color $c$ is left of the vertex and $d$ is above, the colored lines will cross if $c>d$ but not otherwise. In particular, two colored lines can only cross once. More precisely, if two colored lines meet more than once (at $\tt{a}_2$ vertices) they will cross the first time they meet, and never again. For this reason, the permutation that turns $\mathbf{c}^0=\mathbf{c}$ into $\mathbf{c}^r=w_0y\mathbf{c}$ is the nondescending product $\Pi_{\operatorname{nd}}(s_{i_1},\cdots,s_{i_k})$ where $(s_{i_1},\cdots,s_{i_k})$ is the subsequence of circled simple reflections in \eqref{circledreflections}. Note that according to the definition of $\Pi_{\operatorname{nd}}(s_{i_1},\cdots,s_{i_k})$ in equation~\eqref{pinddef}, the circled simple reflections corresponding to the $\tt{a}_2$ patterns where there is a crossing play a role in recursively defining $\Pi_{\operatorname{nd}}(s_{i_1},\cdots,s_{i_k})$, while the circled simple reflections corresponding to the $\tt{a}_2$ patterns where there is no crossing do not affect the product. Therefore $y=w_0\Pi_{\operatorname{nd}}(s_{i_1},\cdots,s_{i_k})=w_0\omega(\mathfrak{T}')$. This shows that $\mathfrak{s} \in \mathfrak{S}_{\mathbf{z}, \lambda, y}$ implies $y = w_0 \omega(\mathfrak{T}(\mathfrak{s})')$. By Proposition~\ref{statedpf}, if $\mathfrak{s} \notin \mathfrak{S}_{\mathbf{z},\lambda, y}$ then $\mathfrak{s} \in \mathfrak{S}_{\mathbf{z},\lambda, y'}$ with $y \neq y' \in W$, which we have shown implies that $y \neq y' = w_0 \omega(\mathfrak{T}')$. \end{proof} \begin{proposition} \label{adjacentcols}Suppose that a part of $\lambda$ is repeated, so that $\lambda_i = \lambda_{i + 1} = \ldots = \lambda_j = c$. Then each pair of colored lines through the top boundary edges in columns $c + r - i, \cdots, c + r - j$ must cross. Thus if $\mathfrak{S}_{\mathbf{z}, \lambda, w}$ is nonempty, then $w$ is the shortest Weyl group element in its coset in $W / W_{\lambda}$. \end{proposition} \begin{proof} We are only considering states in which there are no $\tt{b}_1$ patterns since these have weight $0$ in Figure~\ref{coloredweights}. We leave it to the reader to convince themselves that because of this, colored lines that start in adjacent columns, or more generally in columns not separated by a $+$ spin on the top boundary edge must cross. Because we read the colors on the top boundary vertical edges from left to right and on the right horizontal boundary edges from top to bottom, this means that the colors are in the same order. Hence if $\mathfrak{S}_{\mathbf{z}, \lambda, w}$ is nonempty, $w$ does not change the order of colors corresponding to equal parts in the partition $\lambda$. This is the same as saying that it is the shortest element of its coset in $W / W_{\lambda}$. \end{proof} \begin{corollary} \label{adjacentcor} If $v \in \mathcal{B}_{\lambda}$ then $\omega (v)$ is the longest element of its coset in $W / W_{\lambda}$. \end{corollary} \begin{proof} Let $\mathfrak{s}$ be the state such that $\mathfrak{T} (\mathfrak{s})' = v$. Then $\mathfrak{s} \in \mathfrak{S}_{\mathbf{z}, \lambda, w}$ with $w = w_0 \omega(v)$ by Proposition~\ref{statedpf} and Theorem~\ref{crystalmt}. Thus, according to Proposition~\ref{adjacentcols}, $w_0 \omega (v)$ is the shortest element in its coset and therefore $\omega (v)$ is the longest element of its coset. \end{proof} \section{\label{sec:binf}Demazure atoms in $\mathcal{B}_\infty$} Littelmann~\cite{LittelmannYT} proved the refined Demazure character formula Theorem~\ref{demazurecrystals} using tableaux methods in many cases. Kashiwara~{\cite{KashiwaraDemazure}} used two innovations in proving it completely for symmetrizable Kac-Moody Lie algebras. The first innovation in~\cite{KashiwaraDemazure} is to prove the formula indirectly by working not with $\mathcal{B}_\lambda$ but with the infinite crystal $\mathcal{B}_\infty$ that is the crystal base of a Verma module. Thus Theorem~\ref{demazurecrystals} is true for $\mathcal{B}_\infty$ as well as $\mathcal{B}_\lambda$ meaning that we also have Demazure crystals $\mathcal{B}_\infty(w)$ for $\mathcal{B}_\infty$. One may embed $\mathcal{B}_{\lambda}$ into $\mathcal{B}_\infty$, and the preimage of the Demazure crystal $\mathcal{B}_\infty(w)$ in $\mathcal{B}_\infty$ is the Demazure crystal $\mathcal{B}_\lambda(w)$. In {\cite{KashiwaraDemazure,BumpSchilling,JosephConsequences}} proofs of the refined Demazure character formula proceed by proving a version on $\mathcal{B}_\infty$ first. The second innovation in~\cite{KashiwaraDemazure} is to make use of an involution $\star$ which, as we will explain, interchanges two natural parametrizations of the crystal by elements of a convex cone in~$\mathbb{Z}^N$. We will use both of these ideas from~\cite{KashiwaraDemazure}, namely to lift the problem to $\mathcal{B}_\infty$ crystal and to exploit the properties of the $\star$-involution, in proving Theorem~\ref{daform}. Two references adopting a point of view similar to Kashiwara's are Bump and Schilling~\cite{BumpSchilling} and Joseph~\cite{JosephConsequences}. Both these references treat the Demazure character formula in the context of $\mathcal{B}_\infty$ and the $\star$-involution. The notion of crystal Demazure atoms can be adapted to $\mathcal{B}_\infty$; we define these to be subsets $\mathcal{B}^\circ(w)$ that are disjoint and satisfy (\ref{eqatomic}). By Lemma~\ref{lem:uniqueatomic} these conditions determine the atoms, and at least for type~A, the existence of a family of crystal Demazure atoms for $\mathcal{B}_\infty$ will be proved in Corollary~\ref{cor:binfda} in the next section. The characterizations of $\mathcal{B}(w)$ and $\mathcal{B}^\circ(w)$ in terms of the function $\omega$ translates readily to $\mathcal{B}_\infty$. The $\star$-involution of $\mathcal{B}_\infty$ is not a crystal graph automorphism, but it has other important properties. In particular, it maps the Demazure crystal $\mathcal{B} (w)$ into $\mathcal{B}(w^{- 1})$. So using the $\star$-involution we are able to reformulate Theorem~\ref{daform}, or more precisely the corresponding identity for $\mathcal{B}_\infty(w)$, as the identity \begin{equation} \label{daformstar} \mathcal{B}_\infty(w^{-1})=\{v\in\mathcal{B}\,|\,w_0\omega(v^\star)\leqslant w\}. \end{equation} The definition of $\omega$ for $\mathcal{B}_\lambda$ was given in terms of Gelfand-Tsetlin patterns, but it may be restated in terms of string data (\ref{bzlpat}). As we will explain later in this section, the $\star$-involution transforms the string data into other natural data. (See (\ref{stringbinf}).) In Lemma~\ref{daggerlem} below we have an explicit formula for $\omega(v^\star)$ in terms of this data. Thus (\ref{daformstar}) becomes amenable to proof. The main details are in the proof of Lemma~\ref{omstarrec}, which contains partial information about how $\omega(v^\star)$ changes when $f_k$ is applied to $v$. The proof of this Lemma is technical, but the starting point is the formula (\ref{fmaxtens}) for $f_k(v)$ in terms of data that we have in hand due to Lemma~\ref{lem:techlem}. Once Lemma~\ref{omstarrec} is proved, we conclude this section with Lemma~\ref{lem:B-inclusion} which makes progress towards showing (\ref{daformstar}) by proving the inclusion of the left-hand side in the right-hand side. Then, using the information that we have obtained from the Yang-Baxter equation in Theorem~\ref{zdematoms}, we can leverage this inclusion to prove Theorem~\ref{daform} in Section~\ref{sec:dafpro}. Note that this is a statement about $\mathcal{B}_\lambda$, not $\mathcal{B}_\infty$. Equation (\ref{daformstar}) is equivalent to Theorem~\ref{thm:binfdc}, which is proved after Theorem~\ref{daform} by going back to $\mathcal{B_\infty}$. Theorem~\ref{thm:binfdc} would of course imply Theorem~\ref{daform}, but we prove Theorem~\ref{daform} first where we can apply Theorem~\ref{zdematoms}. Thus we go back and forth between $\mathcal{B}_\infty$ and $\mathcal{B}_\lambda$ in order to prove everything. Finally in Corollary~\ref{cor:binfda} we obtain a characterization of crystal Demazure atoms in $\mathcal{B}_\infty$. \medskip In {\cite{KashiwaraDemazure,BumpSchilling}}, the construction of $\mathcal{B}_\infty$ depends on the choice of a reduced decomposition of the long Weyl group element $w_0 = s_{i_1} \cdots s_{i_N}$. A main feature of the theory is that the crystal is independent of this choice of decomposition; to change to another reduced decomposition one may apply piecewise linear maps to all data. On the other hand, Littelmann~{\cite{LittelmannCones}} showed that one particular choice of reduced word is especially nice, and it is this Littelmann word that is important for us. Given this choice, elements of the crystal are parametrized by data from which we can read off the Demazure atoms. We recall Kashiwara's definition of $\mathcal{B}_\infty$ for an arbitrary Cartan type before specializing to the $\operatorname{GL} (r)$ (Cartan type~$A_{r - 1}$) crystal. (For further details and proofs see \cite{KashiwaraDemazure} and Chapter~12 of {\cite{BumpSchilling}}.) If $i \in I$, the index set for the simple reflections, let $\mathcal{B}_i$ be the elementary crystal defined in \cite{KashiwaraDemazure} Example~1.2.6 or {\cite{BumpSchilling}} Section~12.1. This crystal has one element $u_i (a)$ of weight $a \alpha_i$ for every $a \in \mathbb{Z}$ on which the crystal operators $e_i$ and $f_i$ act as $e_i(u_i(a)) = u_i(a+1)$ and $f_i(u_i(a)) = u_i(a-1)$. Let $\mathbf{i}= (i_1, \cdots, i_N)$ be a sequence of indices such that $w_0 = s_{i_N} \cdots s_{i_1}$ is a reduced expression of the long Weyl group element and let \[\mathcal{B}_{\mathbf{i}}= \mathcal{B}_{i_1}\otimes\cdots\otimes\mathcal{B}_{i_N}\;.\] \begin{remark} We recall that there is a difference between notation for tensor product of crystals between~\cite{KashiwaraDemazure} and {\cite{BumpSchilling}}. We will follow the second reference, so to read Kashiwara or Joseph, reverse the order of tensor products, interpreting $x \otimes y$ as $y \otimes x$. \end{remark} Let $u_0 = u_{i_1} (0) \otimes \cdots \otimes u_{i_N} (0)\in\mathcal{B}_{\mathbf{i}}$, and let $\mathfrak{C}_{\mathbf{i}}$ be the subset of $\mathbb{Z}^N$ consisting of all elements $\mathbf{a}= (a_1, \cdots, a_N)$ such that \begin{equation} \label{kashiwaradata} u_{\mathbf{i}} (\mathbf{a}) = u (\mathbf{a}) = u_{i_1} (- a_1) \otimes \cdots \otimes u_{i_N} (- a_N) \end{equation} can be obtained from $u_0$ by applying some succession of crystal operators $f_i$. Then $\mathfrak{C}_{\mathbf{i}}$ is the set of integer points in a convex polyhedral cone in $\mathbb{R}^N$. We regard $\mathfrak{C}_{\mathbf{i}}$, embedded via the map $\mathbf{a} \mapsto u (\mathbf{a})$ to be a subcrystal of $\mathcal{B}_{\mathbf{i}}$; this requires redefining $e_i (v) = 0$ if $\varepsilon_i (v) = 0$. With this exception, the Kashiwara operators $e_i$, $f_i$, $\varepsilon_i$ and $\varphi_i$ are the same as for the ambient crystal $\mathcal{B}_{\mathbf{i}}$. If $\mathbf{j}$ is another reduced expresion for $w_0$ then there is a piecewise-linear bijection $\mathfrak{C}_{\mathbf{i}} \longrightarrow \mathfrak{C}_{\mathbf{j}}$ that is an isomorphism of crystals; in this sense the crystal $\mathfrak{C}_{\mathbf{i}}$ is independent of the choice of word $\mathbf{i}$. The crystal $\mathcal{B}_\infty$ is defined to be this crystal. In $\mathcal{B}_\infty$ the element $u_0$ is the unique highest weight element, and the unique element of weight $0$. If $x\in\mathcal{B}_\infty$ then, as with the finite crystals $\mathcal{B}_\lambda$, the integer $\varepsilon_i(x)$ is nonnegative and equals the number of times $e_i$ may be applied to $x$, i.e. $\varepsilon_i(x)=\max\{k|e_i^k(x)=0\}$. On the other hand $f_i(x)$ is never $0$, so $\varphi_i(x)$ has no such interpretation. It still has meaning and the identity $\varphi_i(x)-\varepsilon_i(x)=\langle\operatorname{wt}(x),\alpha_i^\vee\rangle$ holds. Because $f_i(x)$ is never $0$, the string patterns $\operatorname{string}_{\mathbf{i}}^{(f)}(v)$ cannot be defined for $\mathcal{B}_\infty$ since the sequence $f_i^kv$ never terminates. However $\operatorname{string}_{\mathbf{i}}^{(e)}(v)$ can be defined by (\ref{plstringe}). Interestingly, for each reduced word $\mathbf{i}$ representing $w_0$, the set $\{\operatorname{string}_{\mathbf{i}}^{(e)}(v) \mid v\in\mathcal{B}_\infty\}$ coincides with the cone $\mathfrak{C}_{\mathbf{i}}$. However the data $\mathbf{a}$ such that (\ref{kashiwaradata}) holds is \textit{not} the string data. Rather, there is a weight-preserving bijection $\star:\mathcal{B}_\infty\to\mathcal{B}_\infty$ of order two such that \begin{equation} \label{stringbinf} \mathbf{a}=\operatorname{string}^{(e)}_{\mathbf{i}}(v^\star), \qquad v=u_{\mathbf{i}}(\mathbf{a})\;. \end{equation} This is true for any reduced word $\mathbf{i}$, and $\star$ is independent of $\mathbf{i}$. This is Kashiwara's \textit{$\star$-involution}. See~\cite{KashiwaraDemazure}, \cite{BumpSchilling} and~\cite{JosephConsequences}. Equation (\ref{stringbinf}) is Theorem~14.16 in~\cite{BumpSchilling}, or see the proof of Proposition~3.2.3 in~\cite{JosephConsequences}. Let $\lambda$ be a dominant weight. There is a crystal $\mathcal{T}_{\lambda}$ with a single element $t_{\lambda}$ of weight $\lambda$; then $\mathcal{T}_{\lambda} \otimes \mathcal{B}_\infty$ is a crystal identical to $\mathcal{B}_{\infty}$ except that the weights of its elements are all shifted by $\lambda$. Thus its highest weight element is $t_{\lambda} \otimes u_0$ with weight $\lambda$. If $\mathcal{B}_{\lambda}$ is the crystal with highest weight $\lambda$, then $\mathcal{B}_{\lambda}$ may be embedded in $\mathcal{T}_{\lambda} \otimes \mathcal{B}_\infty$ by mapping the highest weight vector $v_{\lambda}$ to $t_{\lambda} \otimes u_0$. Let $\psi_\lambda:\mathcal{B}_\lambda\to\mathcal{B}_\infty$ be the map such that $v\mapsto t_\lambda\otimes\psi_\lambda(v)$ is this embedding of crystals. Demazure crystals are defined for $\mathcal{B}=\mathcal{B}_\infty$ as follows. If $w=1$ then $\mathcal{B}(w)=\{u_0\}$. Then recursively: if $s_i$ is a simple reflection such that $s_iw>w$ we define $\mathcal{B}(s_iw)$ to be the set of all $v\in\mathcal{B}$ such that $e_i^kv\in\mathcal{B}(w)$ for some $k\geqslant0$. Theorem~\ref{demazurecrystals}~\ref{itm:crystals} remains valid for $\mathcal{B}_\infty$. The theory of Demazure crystals for $\mathcal{B}_\infty$ is related to the theory for $\mathcal{B}_\lambda$ by the fact that $\mathcal{B}_\lambda(w)$ is the preimage of the corresponding $\mathcal{B}_\infty$ Demazure crystal under the embedding of $\mathcal{B}_\lambda$ into $\mathcal{T}_\lambda\otimes\mathcal{B}_\infty$. See~\cite{KashiwaraDemazure} and~\cite{BumpSchilling} Chapters~12 and~13. Now we specialize to $\operatorname{GL}(r)$ crystals; the Cartan type is $A_{r-1}$. If we use either the Littelmann word (\ref{littstr}) or $\mathbf{i}'$ in (\ref{litstrp}) then the cone $\mathfrak{C}_{\mathbf{i}}$ is characterized by the inequalities (\ref{litcone}). See~\cite{LittelmannCones} Theorem~5.1 or~\cite{wmd5book}, Proposition~2.2. Now $\psi_\lambda$ is a crystal morphism, so if $v\in\mathcal{B}_\lambda$ then \[\operatorname{string}_{\mathbf{i}'}^{(e)}(\psi_\lambda(v))= \operatorname{string}_{\mathbf{i}'}^{(e)}(v).\] Thus we may define $\omega:\mathcal{B}_\infty\to W$ by (\ref{ompdef}) and if $v\in\mathcal{B}_\lambda$ then $\omega(\psi_\lambda(v))=\omega(v)$. Then we may define $\mathcal{B}^\circ(w)$ by \eqref{bcircdef} also for $\mathcal{B}=\mathcal{B}_\infty$ and $\mathcal{B}_\lambda^\circ(w)$ is the preimage of $\mathcal{B}_\infty^\circ(w)$ under the map $\psi_\lambda$. Let $\mathbf{i}$ be as in \eqref{litstrp} so that $\mathbf{i}'=(1,2,1,3,2,1,\cdots)$. Let \begin{equation} \label{vddefa} v = D_1 \otimes \cdots \otimes D_{r - 1} \in \mathcal{B}_\infty \subset \mathcal{B}_\mathbf{i},\qquad D_i \in \mathcal{B}_{r - i} \otimes \cdots \otimes \mathcal{B}_{r - 1}. \end{equation} Specifically we may write \begin{equation} \label{vddefb} D_i = D_i (v) = u_{r - i} (- d_{i, r - i}) \otimes \cdots \otimes u_{r - 1} (- d_{i, r - 1}) = \bigotimes_{j = r - i}^{r - 1} u_j (- d_{i, j}) . \end{equation} Remembering (\ref{stringbinf}), for $v$ to be in $\mathcal{B}_\infty$ the entries $d_{i j} = d_{ij} (v)$ must lie in the Littelmann cone (\ref{litcone}), which in our present notation is determined by the inequalities \[ d_{i, j} \geqslant d_{i, j + 1}, \qquad (r - i \leqslant j \leqslant i) . \] Let $c_{i, j} = c_{i, j} (v) = d_{i, j} - d_{i, j + 1} \geqslant 0$. \begin{remark} \label{remconvention}Initially $d_{i, j}$ is defined if $r - i \leqslant j \leqslant r - 1$ but we extend this to $j = r$ with the convention that $d_{i, r} = 0$. Hence by this convention $c_{i, r - 1} = d_{i, r - 1}$. \ This convention will prevent certain cases having to be treated separately. \end{remark} By \cite{BumpSchilling} Lemma~2.33 the function $\varphi_k$ (part of the data defining a crystal) is given by \begin{equation} \label{phimaxtens} \varphi_k (v) = \max_i (\Phi_{i, k} (v)) \end{equation} where \[ \Phi_{i, k} = \Phi_{i, k} (v) = \varphi_k (D_i) + \sum_{\ell < i} \langle \operatorname{wt} (D_{\ell}), \alpha_k^{\vee} \rangle \; . \] \begin{lemma} \label{lem:techlem} Assume that $r - k \leqslant i \leqslant r - 1$. Then \begin{equation} \label{phievv} \varphi_k (D_i) = \left\{\begin{array}{ll}c_{i, k - 1} & \text{if $k>r-i$;}\\-d_{i,k}&\text{if $k=r-i$.}\end{array}\right. \end{equation} and \begin{equation} \label{majdiff} \Phi_{i, k} - \Phi_{i + 1, k} = c_{i, k} - c_{i + 1, k - 1} . \end{equation} \end{lemma} \begin{proof} First assume that $r-k+1\leqslant i\leqslant r-1$. Then using Lemma~2.33 of~\cite{BumpSchilling} again, $\varphi_k (D_i)$ is the maximum over $r - i \leqslant j \leqslant r - 1$ of \[ \varphi_k (u_j (- d_{i, j})) + \Bigl\langle \sum_{r - i \leqslant \ell < j} - d_{i, \ell} \alpha_{\ell}, \, \alpha_k^{\vee} \Bigr\rangle . \] By the definition of the elementary crystal ({\cite{BumpSchilling}} Section~12.1) we have $\varphi_k (u_j (- d_{i, j})) = - \infty$ unless $j = k$, so \[ \varphi_k (D_i) = \varphi_k (u_k (- d_{i, k})) + \Bigl\langle \sum_{r - i \leqslant \ell < k} - d_{i, \ell} \alpha_{\ell}, \, \alpha_k^{\vee} \Bigr\rangle = - d_{i, k} + d_{i, k - 1} = c_{i, k - 1} \] proving (\ref{phievv}). Here we have used the fact that $\varphi_k(u_k(-a)) = -a$, as well as $\langle \alpha_{\ell}, \alpha_k^{\vee} \rangle = - 1$ if $l = k \pm 1$ and $2$ if $l = k$, and $0$ otherwise. Now \[ \Phi_{i, k} - \Phi_{i + 1, k} = \varphi_k (D_i) - \varphi_k (D_{i + 1}) - \langle \operatorname{wt} (D_i), \alpha_k^{\vee} \rangle \] and with $r - k + 1 \leqslant i \leqslant r - 1$ we have (using Remark~\ref{remconvention} if $k = r - 1$) \[ \langle \operatorname{wt} (D_i), \alpha_k^{\vee} \rangle = d_{i, k - 1} - 2 d_{i, k} + d_{i, k + 1} = c_{i, k - 1} - c_{i, k} . \] Combining this with (\ref{phievv}) we obtain (\ref{majdiff}). The case $k=r-i$ is similar, except that $d_{i,k-1}$ is replaced by zero where it appears. \end{proof} We now wish to use some nondescending products. We will use the notation of Remark~\ref{heckecompute}. Let \begin{equation} \label{omegaomg} \Omega_i (D_i) = \prod_{\substack{ 1 \leqslant j \leqslant i\\ c_{i, r - 1 + j - i} = 0}} S_j\;. \end{equation} Define $\omega^\dagger : \mathcal{B}_\infty \to W$ by \begin{equation} \label{dagdef} \omega^\dagger (v) = \{\Omega_{r - 1} (D_{r - 1}) \cdots \Omega_1 (D_1)\}\;. \end{equation} From Remark~\ref{heckecompute} the brackets $\{\cdot\}$ here mean that the product is taken in the degenerate Hecke algebra, then the resulting basis vector is replaced by the corresponding Weyl group element. \begin{lemma} We have \label{daggerlem} \[\omega^\dagger(v)=\omega(v^\star)^{-1}.\] \end{lemma} \begin{proof} By (\ref{stringbinf}), the string pattern $\operatorname{string}_{\mathbf{i}'}^{(e)}(v^\star)$ is the sequence $(b_1,b_2,\ldots)$ such that \[v=u_{i_1'}(-b_1)\otimes u_{i_2'}(-b_2)\otimes\cdots\;\, .\] Put these into an array as in (\ref{bzlpat}) and circle entries as in Circling Rule~\ref{circlingrule}. Thus the $b_k$ are the $d_{i,j}$ in the order determined by (\ref{vddefa}) and (\ref{vddefb}). Since $c_{i,j}=d_{i,j}-d_{i,j+1}$ (with the caveat in Remark~\ref{remconvention}) we see that if $b_k$ equals $d_{i,j}$, it is circled if and only if $c_{i,j}=0$. Recall that \[\omega(v^\star)=\Pi_{\operatorname{nd}}(s_{j_1},\cdots,s_{j_k})=\{S_{j_1}\cdots S_{j_k}\}\] where $s_{j_1},s_{j_2},\cdots$ are the circled elements. Now $S_{j_1},S_{j_2},\cdots$ are exactly the entries that appear in the product (\ref{dagdef}), but they appear in reverse order; so what we get is $\omega(v^\star)^{-1}$. \end{proof} \begin{lemma} \label{omstarrec} We have either $\omega^\dagger (v) = \omega^\dagger (f_k v)$ or $\omega^\dagger (v) = s_k \omega^\dagger (f_k v)$. \end{lemma} \begin{proof} Let $p$ be the first value of $i$ where $\Phi_{i, k} (v)$ attains its maximum. By \cite{BumpSchilling} Lemma 2.33 \begin{equation} \label{fmaxtens} f_k (v) = D_1 \otimes \cdots \otimes f_k (D_p) \otimes \cdots \otimes D_{r - 1} . \end{equation} Furthermore, by applying the same Lemma to $f_k(D_p)$ and using the fact that $\varphi_k (u_j (- d_{i, j})) = - \infty$ unless $j = k$ we have \begin{equation*} f_k(D_p) = u_{r - p} (- d_{p, r - i}) \otimes \cdots \otimes u_k(-d_{p,k} - 1) \otimes \cdots \otimes u_{r - 1}(- d_{p, r - 1}) \end{equation*} meaning that $f_k$ acting on $v$ has the effect that $d_{p, k}$ is replaced by $d_{p, k} + 1$. We factor $\Omega_p (D_p) = \Omega_p' (D_p) \Omega''_p (D_p)$ where \[ \Omega_p' (D_p) = \prod_{\substack{1 \leqslant j \leqslant k + p - r\\ c_{p, r - 1 + j - p} = 0}} S_j, \qquad \Omega''_p(D_p) = \prod_{\substack{ k + p - r + 1 \leqslant j \leqslant p\\ c_{p, r - 1 + j - p} = 0}} S_j\;.\] We will prove that \begin{equation} \label{omegacommute} \Omega_p' (D_p) \Omega''_p (D_p) = \Omega''_p (D_p) \Omega_p' (D_p), \qquad \Omega_p' (f_k D_p) \Omega''_p (f_k D_p) = \Omega''_p (f_k D_p) \Omega_p' (f_k D_p) . \end{equation} Indeed, every $S_j$ above with $1 \leqslant j \leqslant k + p - r$ commutes with every $S_{j'}$ with $k + p - r + 1 \leqslant j' \leqslant p$ with one possible exception: $S_{k + p - r}$ does not commute with $S_{k + p - r + 1}$. These factors are both present if both $c_{p, k - 1} = c_{p, k} = 0$. Now since $i = p$ is the first value that maximizes $\Phi_{i, k}$ we have \begin{equation} \label{zpkid} 0 < \Phi_{p, k} - \Phi_{p - 1, k} = c_{p, k - 1} - c_{p - 1, k} \end{equation} by $\left( \ref{majdiff} \right)$. Now $c_{p - 1, k} \geqslant 0$ and so $c_{p, k - 1} > 0$. Hence $\Omega_p' (D_p)$ does not involve $S_{k + p - r}$, proving the first identity in (\ref{omegacommute}). On the other hand $d_{p, k} (f_k v) = d_{p, k} (v) + 1$ while $d_{p, j} (f_k v) = d_{p, j} (v)$ for all $j \neq k$. Therefore $c_{p, k} (f_k v) = c_{p, k} (v) + 1 > 0$ and so $S_{k + p - r - 1}$ does not appear in $\Omega''_p (f_k D_p)$, proving the second identity in (\ref{omegacommute}). Now using (\ref{omegacommute}) we may rearrange the products and write $\omega^\dagger (v) = \{\omega_1^\dagger (v) \omega_2^\dagger (v) \omega_3^\dagger (v)\}$ where \[ \omega_1^\dagger (v) = \Omega_{r - 1} (D_{r - 1}) \cdots \Omega_{p + 1} (D_{p + 1}) \Omega_p'' (D_p (v)), \] \[ \omega_2^\dagger (v) = \Omega_p' (D_p (v)) \Omega_{p - 1} (D_{p - 1}) \cdots \Omega_{r - k} (D_{r - k}), \] \[ \omega_3^\dagger (v) = \Omega_{r - k - 1} (D_{r - k - 1}) \cdots \Omega_1 (D_1), \] and similarly for $f_k v$. Here all factors $\Omega_i (D_i)$ with $i \neq p$ are the same for $v$ and $f_k v$ so we omit the $v$ from the notation except when $i = p$. Then we trivially have that $\omega_3^\dagger(f_kv) = \omega_3^\dagger(v)$ and will show that \begin{equation} \label{firstomid} \omega_1^\dagger (f_kv) = \omega_1^\dagger (v) \quad \text{or} \quad S_k \omega_1^\dagger (f_k v) \end{equation} and \begin{equation} \label{secondomid} \omega_2^\dagger (f_k v) = \omega_2^\dagger (v) . \end{equation} The lemma will follow upon demonstrating these two identities. Let us prove (\ref{firstomid}). Since $c_{p, k} (f_k v) = c_{p, k} (v) + 1 > 0$ as shown above, we have that $\Omega_p'' (D_p (f_k v)) = \Omega''_p (f_k D_p (v)) = \Omega_p'' (D_p (v))$ unless $c_{p, k} = 0$. If this is true we are done, so we assume that $c_{p, k} = 0$. Then \[ \Omega_p'' (D_p) = S_{k + p - r + 1} \Omega_p'' (f_k D_p) . \] Thus what we must show is that either \begin{equation} \label{firstindc} \begin{array}{lll} \Omega_{r - 1} (D_{r - 1}) \cdots \Omega_{p + 1} (D_{p + 1}) S_{k + p - r + 1} & = & S_k \Omega_{r - 1} (D_{r - 1}) \cdots \Omega_{p + 1} (D_{p + 1})\\ & \text{or} & \Omega_{r - 1} (D_{r - 1}) \cdots \Omega_{p + 1} (D_{p + 1}) . \end{array} \end{equation} We will prove this, obtaining a series of inequalities along the way. First consider $\Omega_{p + 1} (D_{p + 1}) S_{k + p - r + 1}$. Let us argue that $\Omega_{p + 1} (D_{p + 1})$ involves $S_{k + p - r + 1}$. Indeed, its presence is conditioned on $c_{p + 1, k - 1} = 0$. Now since the first value where $\Phi_{i, k}$ attains its maximum is at $i = p$, we have $0 \leqslant \Phi_{p, k} - \Phi_{p + 1, k} = c_{p, k} - c_{p + 1, k - 1}$. Therefore $c_{p + 1, k - 1} \leqslant c_{p, k} = 0$, so $c_{p + 1, k - 1} = 0$. Thus $\Omega_{p + 1} (D_{p + 1})$ involves $S_{k + p - r + 1}$ and $c_{p + 1, k - 1} = c_{p, k} = 0$. Now unless $c_{p + 1, k} = 0$, the product $\Omega_{p + 1} (D_{p + 1})$ does not involve $S_{k + p - r + 2}$ and so $\Omega_{p + 1} (D_{p + 1}) = \cdots S_{k + p - r + 1} \cdots$, where the second ellipsis represents factors that all commute with $S_{k + p - r + 1}$. Therefore since $S_{k + p - r + 1}^2 = S_{k + p - r + 1}$ we have $\Omega_{p + 1} (D_{p + 1}) S_{k + p - r + 1} = \Omega_{p + 1} (D_{p + 1})$, and (\ref{firstindc}) is proved. This means that we may assume that $c_{p + 1, k} = 0$ and so $\Omega_{p + 1} (D_{p + 1}) = \cdots S_{k + p - r + 1} S_{k + p - r + 2} \cdots$ where again the second ellipsis represents factors that all commute with $S_{k + p - r + 1}$. Now we use the braid relation and write \[ \Omega_{p + 1} (D_{p + 1}) S_{k + p - r + 1} = \cdots S_{k + p - r + 1} S_{k + p - r + 2} \cdots S_{k + p - r + 1} = \cdots S_{k + p - r + 2} S_{k + p - r + 1} S_{k + p - r + 2} \cdots . \] The first ellipsis represents factors that commute with $S_{k + p - r + 2}$ and so we obtain \[ \Omega_{p + 1} (D_{p + 1}) S_{k + p - r + 1} = S_{k + p - r + 2} \Omega_{p + 1} (D_{p + 1}) . \] We wish to repeat the process so we consider now $\Omega_{p + 2} (D_{p + 2}) S_{k + p - r + 2}$. To continue, we need to know that $c_{p + 2, k - 1} = 0$. Because the first value where $\Phi_{i, k}$ attains its maximum is at $i = p$, we have $0 \leqslant \Phi_{p, k} - \Phi_{p + 2, k} = c_{p, k} - c_{p + 1, k - 1} + c_{p + 1, k} - c_{p + 2, k - 1}$. Since we already have $c_{p, k} = c_{p + 1, k - 1} = c_{p + 1, k} = 0$ we have $c_{p + 2, k - 1} \leqslant c_{p + 1, k} = 0$ so $c_{p + 2, k - 1} = 0$ as required. Now the same argument as before produces either $\Omega_{p + 2} (D_{p + 2}) S_{k + p - r + 2} = \Omega_{p + 2} (D_{p + 2})$, in which case we are done, or \[ \Omega_{p + 2} (D_{p + 2}) S_{k + p - r + 2} = S_{k + p - r + 2} \Omega_{p + 1} (D_{p + 1}) \] and the further equality $c_{p + 2, k} = 0$. Repeating this argument gives a succession of identities which together imply (\ref{firstindc}) and (\ref{firstomid}). Now let us prove (\ref{secondomid}). We recall that $D_p (f_k v) = f_k D_p (v)$ differs from $D_p (v)$ in replacing $d_{p, k}$ by $d_{p, k} + 1$. This can change only the last factor in $\Omega'_p (D_p)$, and this only if $d_{p, k} = d_{p, k - 1} - 1$. Therefore we may assume that $c_{p, k - 1} = 1$ and $\Omega'_p (D_p (f_k v)) = \Omega' (D_p (v)) S_{k + p - r}$. Therefore what we must prove is that \begin{equation} \label{secondpmid} S_{k + p - r} \Omega_{p - 1} (D_{p - 1}) \cdots \Omega_{r - k} (D_{r - k}) = \Omega_{p - 1} (D_{p - 1}) \cdots \Omega_{r - k} (D_{r - k}) . \end{equation} Thus consider $S_{k + p - r} \Omega_{p - 1} (D_{p - 1})$. We have $c_{p - 1, k} < c_{p, k - 1} = 1$ by (\ref{zpkid}), and so $c_{p - 1, k} = 0$. This means that $\Omega_{p - 1} (D_{p - 1})$ has $S_{k + p - r}$ as a factor, and unless it also has $S_{k + p - r - 1}$ as a factor, we obtain $S_{k + p - r} \Omega_{p - 1} (D_{p - 1}) = \Omega_{p - 1} (D_{p - 1})$, which implies (\ref{secondomid}). Therefore we may assume that $\Omega_{p - 1} (D_{p - 1})$ has $S_{k + p - r - 1}$ as a factor, which means that $c_{p - 1, k - 1} = 0$, which we now assume. Now we use $S_{k + p - r} \Omega_{p - 1} (D_{p - 1}) = S_{k + p - r} \cdots S_{k + p - r - 1} S_{k + p - r} \cdots$ where the first ellipsis represents factors that commute with $S_{k + p - r}$ and the second ellipsis represents factors that commute with $S_{k + p - r - 1}$. Using the braid relation we obtain \[ S_{k + p - r} \Omega_{p - 1} (D_{p - 1}) = \Omega_{p - 1} (D_{p - 1}) S_{k + p - r - 1} . \] We repeat the process. The next step is to prove that either \[ S_{k + p - r - 1} \Omega_{p - 2} (D_{p - 2}) = \Omega_{p - 2} (D_{p - 2}) \qquad \text{or\qquad$\Omega_{p - 2} (D_{p - 2})$} S_{k + p - r - 2} . \] If $S_{k + p - r - 1} \Omega_{p - 2} (D_{p - 2}) = \Omega_{p - 2} (D_{p - 2})$ then (\ref{secondomid}) follows and we may stop; otherwise we will prove the second identity together with the equation $c_{p-2,k}=c_{p-2,k-1}=0$ that will be needed for subsequent steps. Since $i = p$ is the first value to maximize $\Phi_{i, k}$ we have, using (\ref{majdiff}) \[ 0 < \Phi_{p, k} - \Phi_{p - 2, k} = \Phi_{p, k} - \Phi_{p-1, k} + \Phi_{p-1, k} - \Phi_{p - 2, k} = c_{p, k - 1} - c_{p - 1, k} + c_{p - 1, k - 1} - c_{p - 2, k} . \] We already have $c_{p, k - 1} = 1$ while $c_{p - 1, k} = c_{p - 1, k - 1} = 0$, so $c_{p - 2, k} = 0$. This means that $\Omega_{p - 2} (D_{p - 2})$ has a factor $S_{k + p - r - 1}$. Unless it also has a factor $S_{k + p - r - 2}$ we have $S_{k + p - r - 1} \Omega_{p - 2} (D_{p - 2}) = \Omega_{p - 2} (D_{p - 2})$ and we are done. If it does have the factor $S_{k + p - r - 2}$ then we have $c_{p - 2, k - 1} = 0$ and $S_{k + p - r - 1} \Omega_{p - 2} (D_{p - 2}) = \Omega_{p - 2} (D_{p - 2}) S_{k + p - r - 2}$ follows from the braid relation. Continuing this way, we obtain a sequence of identities $c_{p-a,k}=0$ and \[S_{k+p-r+1-a}\Omega_{p-a}(D_{p-a})=\Omega_{p-a}(D_{p-a})\qquad\text{or}\qquad \Omega_{p-a}(D_{p-a})S_{p+k-r-a}.\] If first alternative is true we may stop, since then (\ref{secondpmid}) is proved and we are done. Otherwise if the second equality is true we have also $c_{p-a,k-1}=0$, which is used to prove $c_{p-a-1,k}=0$ by an argument as above based on (\ref{majdiff}) and move to the next stage. Finally, with $c_{r-k,k}=0$, the last identity to be proved is \[ S_1 \Omega_{r - k} (D_{r - k}) = \Omega_{r - k} (D_{r - k}), \] and this time there is no second alternative. This is true since then the first factor of $\Omega_{r-k}(D_{r-k})$ is $S_1$, and $S_1^2=S_1$. Now (\ref{secondpmid}) is proved, establishing~(\ref{secondomid}). \end{proof} \begin{lemma} \label{lem:B-inclusion} Let $w \in W$. Then \begin{equation} \label{daformstarineq} \mathcal{B}_{\infty} (w^{- 1}) \subseteq \{ v \in \mathcal{B}_{\infty} \mid w_0 \omega (v^{\star}) \leqslant w \} \end{equation} and \begin{equation} \label{daformstarineqa} \mathcal{B}_{\infty} (w) \subseteq \{ v \in \mathcal{B}_{\infty} \mid w_0 \omega (v) \leqslant w \} \, . \end{equation} \end{lemma} \noindent We will improve the inclusions in this Lemma later in Theorem~\ref{thm:binfdc} to equalities, taking into account the additional information we have from Theorem~\ref{zdematoms}. \begin{proof}[Proof of Lemma~\ref{lem:B-inclusion}] By \cite{KashiwaraDemazure} or \cite{BumpSchilling} Theorem~14.17, the $\star$-involution takes $\mathcal{B}_{\infty} (w^{- 1})$ to $\mathcal{B}_{\infty} (w)$. Thus (\ref{daformstarineq}) and (\ref{daformstarineqa}) are equivalent. Using Lemma~\ref{daggerlem} and the fact that the inverse map on $W$ preserves the Bruhat order, \eqref{daformstarineq} is also equivalent to \begin{equation} \label{eq:dagdemc} \mathcal{B}_{\infty} (w) \subseteq \{ v \in \mathcal{B}_{\infty} \mid \omega^{\dagger} (v) w_0 \leqslant w \} \, , \end{equation} which we will now prove by induction on $\ell (w)$. If $w = 1$ then $\mathcal{B}_{\infty} (1) = \{ u_0 \}$, where $u_0$ is the highest weight vector in $\mathcal{B}_{\infty}$. For $v = u_0$ all the conditions $c_{i, r - 1 + j - 1} = 0$ are satsified in (\ref{omegaomg}) and it follows that $\omega^{\dagger} (u_0) = w_0$, so \eqref{eq:dagdemc} is satisfied in this case. Now assume that $\eqref{eq:dagdemc}$ is true for $w$; we show that if $s_i$ is a simple reflection and $s_i w > w$ then it is also true for $s_i w$. Now, by Theorem~\ref{demazurecrystals}~\ref{itm:crystals} for $\mathcal{B} = \mathcal{B}_\infty$, if $v \in \mathcal{B}_{\infty} (s_i w)$ then there is a $v_1 \in \mathcal{B}_{\infty} (w)$ such that $v$ and $v_1$ lie in the same root string. Note that Lemma~\ref{omstarrec} implies that if $v, v_1$ lie in the same $i$-string then either $\omega^\dagger (v_1) = \omega^\dagger (v)$ or $\omega^\dagger (v_1) = s_i \omega^\dagger (v)$. Then $\omega^{\dagger} (v_1) w_0 \leqslant w$ by induction, and $\omega^{\dagger} (v) w_0 = \omega^{\dagger} (v_1) w_0$ or $s_i \omega^{\dagger} (v_1) w_0$; in either case $\omega^{\dagger} (v) w_0 \leqslant s_i w$. \end{proof} \section{\label{sec:dafpro}Proof of Theorem~\ref{daform}} In this section we will prove Theorem~\ref{daform} and its $\mathcal{B}_\infty$ analogue. \begin{proof}[Proof of Theorem~\ref{daform}] We consider the preimage in $\mathcal{B}_{\lambda}$ of both sides of the identity in Lemma~\ref{lem:B-inclusion} under the map $\psi_\lambda:\mathcal{B}_\lambda\to\mathcal{B}_\infty$ defined in Section~\ref{sec:binf} and we obtain the inclusion of sets \begin{equation} \label{oneinclusion} \mathcal{B}_{\lambda} (w) \subseteq \{ v \in \mathcal{B}_{\lambda} \mid w_0 \omega (v) \leqslant w \} = \bigcup_{y \leqslant w} \{ v \in \mathcal{B}_{\lambda} \mid w_0 \omega (v) = y \} . \end{equation} We claim that, in fact, these sets are equal, which would give us \eqref{eqatomic}. We caution the reader that the Kashiwara involution $\star$ (which is not a crystal isomorphism) does not preserve $\mathcal{B}_\lambda$ embedded in the crystal via $\psi_\lambda$. What is true is that it maps $\mathcal{B}_\infty(w)$ into $\mathcal{B}_\infty(w^{-1})$, and the preimage of $\mathcal{B}_\infty(w)$ in $\mathcal{B}_\lambda$ is $\mathcal{B}_\lambda(w)$. That is all that is needed for (\ref{oneinclusion}). Let $X$ and $Y$ be the two subsets of $\mathcal{B}_\lambda$ on the left- and right-hand sides of (\ref{oneinclusion}). We have just shown that $X \subseteq Y$. Now, on the one hand, we have from Theorem~\ref{demazurecrystals}~\ref{itm:character} that \begin{equation} \label{eq:sumXweights} \sum_{\mathfrak{T} \in X} \mathbf{z}^{\operatorname{wt}(\mathfrak{T})} = \partial_w \mathbf{z}^\lambda \, . \end{equation} On the other hand, using the bijection between the crystal $\mathcal{B}_\lambda$ and the ensemble of states $\mathfrak{S}_{\mathbf{z}, \lambda}$ together with Theorem~\ref{crystalmt}, we have that \begin{equation*} \sum_{\mathfrak{T} \in Y} \mathbf{z}^{\operatorname{wt}(\mathfrak{T})} := \sum_{y \leqslant w} \sum_{\substack{v \in \mathcal{B}_\lambda \\ w_0 \omega(v) = y}} \mathbf{z}^{\operatorname{wt}(v)} = \sum_{y \leqslant w} \sum_{s \in \mathfrak{S}_{\mathbf{z}, \lambda, y}} \mathbf{z}^{\operatorname{wt}(\mathfrak{T}(s)')} \, . \end{equation*} The Sch\"utzenberger involution satisfies the property that $\operatorname{wt}(\mathfrak{T}') = w_0 \operatorname{wt}(\mathfrak{T})$. Using this, then \ref{itm:zweightid} of Proposition~\ref{zschur} and then Theorem~\ref{zdematoms} we get that \begin{equation*} \sum_{s \in \mathfrak{S}_{\mathbf{z}, \lambda, y}} \mathbf{z}^{\operatorname{wt}(\mathfrak{T}(s)')} = \sum_{s \in \mathfrak{S}_{\mathbf{z}, \lambda, y}} \mathbf{z}^{w_0 \operatorname{wt}(\mathfrak{T}(s))} = \mathbf{z}^{-\rho} Z(\mathfrak{S}_{\mathbf{z}, \lambda, y}) = \partial^\circ_y \mathbf{z}^\lambda \, . \end{equation*} Finally by Theorem~\ref{thm:lskeys} and comparing with \eqref{eq:sumXweights}, it follows that \begin{equation} \label{eq:keystep} \sum_{\mathfrak{T} \in Y} \mathbf{z}^{\operatorname{wt}(\mathfrak{T})} = \sum_{y \leqslant w} \partial^\circ_y \mathbf{z}^\lambda = \partial_w \mathbf{z}^\lambda = \sum_{\mathfrak{T} \in X} \mathbf{z}^{\operatorname{wt}(\mathfrak{T})}. \end{equation} Setting $\mathbf{z} = 1_T$ in the above equality shows that $X$ and $Y$ have the same cardinality. Therefore $X = Y$. The assertion that $w_0\omega(v)=w$ implies that $w$ is the longest element of its coset in $W/W_\lambda$ is Corollary~\ref{adjacentcor}. \end{proof} Now that Theorem~\ref{daform} is proved, we have an analogous characterization of Demazure crystals and Demazure atoms in $\mathcal{B}_\infty$. \begin{theorem} \label{thm:binfdc} For any $w \in W$, \begin{equation} \label{binfdcid} \mathcal{B}_\infty(w)=\{v\in\mathcal{B}_\infty \mid \omega^\dagger(v)w_0\leqslant w\}= \{v\in\mathcal{B}_\infty \mid w_0\omega(v)\leqslant w\}\;. \end{equation} The map $\omega$ satisfies \begin{equation} \label{omegaid} w_0\omega(v)w_0=\omega^\dagger(v)=\omega(v^\star)^{-1}. \end{equation} \end{theorem} \begin{proof} The identities \[\mathcal{B}_\lambda(w)=\{v\in\mathcal{B}_\lambda \mid \omega^\dagger(v)w_0\leqslant w\}= \{v\in\mathcal{B}_\lambda \mid w_0\omega(v)\leqslant w\}\] have been proved for the finite crystal $\mathcal{B}_\lambda$, and since the images of $\psi_\lambda$ exhaust $\mathcal{B}_\infty$, (\ref{binfdcid}) follows. The identity (\ref{omegaid}) follows using Lemma~\ref{daggerlem}. \end{proof} Now the Demazure atoms in $\mathcal{B}_\infty$ may be defined as \begin{equation} \label{binfatoms} \mathcal{B}^\circ_\infty(w)=\{v\in\mathcal{B}_\infty \mid \omega^\dagger(v)w_0=w\}= \{v\in\mathcal{B}_\infty \mid w_0\omega(v)=w\}\;. \end{equation} \begin{corollary} \label{cor:binfda} The subsets $\mathcal{B}^\circ_\infty(w)$ are a family of crystal Demazure atoms for $\mathcal{B}_\infty$. \end{corollary} \begin{proof} These are obviously a family of disjoint subsets of $\mathcal{B}_\infty$ and by Theorem~\ref{thm:binfdc} they satisfy the characterizing identity~(\ref{eqatomic}). \end{proof} \section{\label{sec:algo}Proof of the algorithms for computing Lascoux-Sch\"utzenberger keys} We now prove the algorithms from Subsection~\ref{subsec:alg}. For the first algorithm, given any tableau $T \in \mathcal{B}_{\lambda}$, we compute $\omega(T')$ by means of the definition (\ref{ompdef}). Thus we consider $\operatorname{string}_{\mathbf{i}'}^{(e)}(T')=\operatorname{string}_{\mathbf{i}}^{(f)}(T)=(b_1,b_2,\cdots)$, where the Gelfand-Tsetlin pattern of $T$ is the array $(a_{ij})$ and the $b_i$ are given by the formula (\ref{bzlfromgtp}). Then \[\begin{array}{lcl} b_1=0&\quad\iff\quad& a_{r,r}=a_{r-1,r},\\ b_2=b_3&\quad\iff\quad& a_{r-1,r-1}=a_{r-2,r-1},\\ b_3=0&\quad\iff\quad&a_{r-1,r}=a_{r-2,r},\\ &\vdots&\end{array}\] and so forth. This means that the circled entries in (\ref{gamcirc}) are the same as in (\ref{circledreflections}). Therefore the first algorithm follows from Theorem~\ref{daform}. We may now prove Algorithm~2. The idea is to deduce it from Algorithm~1 (which is already proved) for the crystal $\mathcal{B}_{- w_0 \lambda}$. Now $- w_0 \lambda = (- \lambda_r, \cdots, - \lambda_1)$ is not a partition (since its entries may be negative) but it is a dominant weight. Fortunately the facts that we need, particularly the map to Gelfand-Tsetlin patterns and Algorithm~1, may be extended to crystals $\mathcal{B}_{\lambda}$ where $\lambda$ is a dominant weight by the following considerations. If $\lambda = (\lambda_1, \cdots, \lambda_r)$ a dominant weight (that is, $\lambda_1 \geqslant \cdots \geqslant \lambda_r$ but the entries may be negative) then for sufficiently large $N$, $\lambda + N^r = (\lambda_1 + N, \cdots, \lambda_r + N)$ is a partition and $\mathcal{B}_{\lambda + (N^r)}$ is a crystal of tableaux. To put this into context, $\mathcal{B}_{\lambda}$ is the crystal of the representation $\pi_{\lambda}$ of $\operatorname{GL}(r)$ with highest weight $\lambda$, and $\mathcal{B}_{\lambda + (N^r)}$ is the crystal of $\det^N \otimes \pi_{\lambda}$. The crystal graph of $\mathcal{B}_{\lambda + (N^r)}$ is isomorphic to that of $\mathcal{B}_{\lambda}$ and we may transfer results such as Theorem~\ref{daform} from $\mathcal{B}_{\lambda + (N^r)}$ to $\mathcal{B}_{\lambda}$. In particular let $\mathfrak{P}_{\lambda}$ be the space of Gelfand-Tsetlin patterns with top row $\lambda$. Let $\Gamma : \mathcal{B}_{\lambda} \longrightarrow \mathfrak{P}_{\lambda}$ be the map defined in the introduction for $\lambda$ a partition. If $\lambda$ is a dominant weight, then $\Gamma : \mathcal{B}_{\lambda} \longrightarrow \mathfrak{P}_{\lambda}$ may be similarly defined; for if $v \in \mathcal{B}_{\lambda}$ and $T$ is the corresponding element of $\mathcal{B}_{\lambda + (N^r)}$, then $\Gamma (T)$ is defined and we define $\Gamma (v)$ to be the Gelfand-Tsetlin pattern ottained from $\Gamma (T)$ by subtracting $N$ from every element of $\Gamma (T)$. The map $\omega : \mathcal{B}_{\lambda} \longrightarrow W$ is also defined and Algorithm~1 is valid. Now there are maps $\alpha_1, \alpha_2 : \mathfrak{P}_{\lambda} \longrightarrow W$ corresponding to Algorithm~1 and Algorithm~2 of the introduction. Thus if $a = (a_{i j})$ is a Gelfand-Tsetlin pattern, then for each $(i, j)$ with $a_{i, j} = a_{i - 1, j}$ we circle the corresponding entry in (\ref{gamcirc}) and $\alpha_1 (a)$ will be the nondecreasing product of the circled reflection in order from bottom to top, right to left; and similarly to compute $\alpha_2 (a)$ we circle the entries of (\ref{delcirc}) when $a_{i, j} = a_{i - 1, j - 1}$ and take the nondecreasing product in order from bottom to top, left to right. There is an operation $- \text{rev}$ on Gelfand-Tsetlin patterns that maps $\mathfrak{P}_{\lambda}$ to $\mathfrak{P}_{- w_0 \lambda}$ that negates the entries in a pattern $a$ and mirror-reflects them from left to right, so if $r = 3$ \[ - \text{rev} \left( \begin{array}{ccccc} \lambda_1 & & \lambda_2 & & \lambda_3\\ & a & & b & \\ & & c & & \end{array} \right) = \left( \begin{array}{ccccc} - \lambda_3 & & - \lambda_2 & & - \lambda_1\\ & - b & & - a & \\ & & - c & & \end{array} \right) . \] As further discussed in \cite{wmd5book}, there is a map $\phi_{\lambda} : \mathcal{B}_{\lambda} \longrightarrow \mathcal{B}_{- w_0 \lambda}$ that maps the highest weight element to the highest weight element and has the effect that $\phi_{\lambda} (e_i v) = e_{i'} \phi_{\lambda} (v)$, where we recall that $i' = r - i$. \begin{proposition} For all $T\in\mathcal{B}_\lambda$ \begin{equation} \label{omphic} \omega (\phi_{\lambda} (T)) = w_0 \omega (T) w_0^{- 1} . \end{equation} \end{proposition} \begin{proof} Note that $w \mapsto w_0 w w_0^{- 1}$ is the automorphism of $W$ that sends the simple reflection $s_i$ to $s_{i'}$. So by the definition of the Demazure crystals it is clear that $\phi_{\lambda} \mathcal{B}_{\lambda} (w) =\mathcal{B}_{- w_0 \lambda} (w_0 w w_0^{- 1}) .$ Hence $\phi_{\lambda} (\mathcal{B}_{\lambda}^{\circ} (w)) =\mathcal{B}_{- w_0 \lambda}^{\circ} (w_0 w w_0^{- 1})$. By Theorem~\ref{daform}, we may characterize $\omega (T)$ as the shortest Weyl group element such that $T \in \mathcal{B}_{\lambda}^{\circ} (w_0 \omega (T))$. Equation (\ref{omphic}) follows. \end{proof} The map $\phi_{\lambda}$ intertwines the Sch{\"u}tzenberger-Lusztig involutions $v \mapsto v'$ on $\mathcal{B}_{\lambda}$ and $\mathcal{B}_{- w_0 \lambda}$. We will denote $\phi'_{\lambda} (v) = \phi_{\lambda} (v') = \phi_{\lambda} (v)'$. Let $\tau : W \longrightarrow W$ be conjugation by $w_0$. We have a commutative diagram \[ \begin{tikzcd}[column sep=huge] \mathcal{B}_\lambda \arrow{r}{\phi'_\lambda} \arrow{d}{\Gamma} & \mathcal{B}_{-w_0\lambda} \arrow{d}{\Gamma} \\ \mathfrak{P}_\lambda \arrow{r}{-\text{rev}} \arrow{d}{\alpha_2} & \mathfrak{P}_{-w_0\lambda} \arrow{d}{\alpha_1} \\ W \arrow{r}{\tau} & W \end{tikzcd} \] Indeed, the top square commutes by (2.12) of {\cite{wmd5book}}, which is proved there using the description of the Sch\"utzenberger involution on Gelfand-Tsetlin patterns in~{\cite{BerensteinKirillov}}. The commutativity of the bottom square is clear from the definitions of $\alpha_1$ and $\alpha_2$, bearing in mind that $w_0 s_i w_0^{-1} = s_{i'}$ when circling \eqref{gamcirc} and \eqref{delcirc}. We may now prove the second algorithm. If $T \in \mathcal{B}_{\lambda}$, the commutative diagram shows that \[ w_0 \alpha_2 (\Gamma (T)) w_0^{- 1} = \alpha_1 (\Gamma (\phi_{\lambda} (T)')) = \omega (\phi_{\lambda} (T)) = w_0 \omega (T) w_0^{- 1} \] where the second step is by applying Algorithm~1 to $\phi_{\lambda} (T)' \in \mathcal{B}_{- w_0 \lambda}$ and the last step is by (\ref{omphic}). Therefore $\omega (T) = \alpha_2 (\Gamma (T))$, which is Algorithm~2. \bibliographystyle{hplain}
\section{Introduction} Let $F$ be a field. In this paper, every algebra is unitary associative over $F$. Let $F\langle X \rangle$ be the free unitary associative algebra, freely generated over $F$ by the infinite set $X=\{x_1,x_2,\ldots \}$. A polynomial $f(x_1,\ldots,x_n) \in F\langle X \rangle$ is a polynomial identity for an algebra $A$ if \[f(a_1,\ldots,a_n)=0\] for all $a_1,\ldots,a_n \in A$. Denote by $Id(A)$ the set of all polynomial identities for $A$. It is known that $Id(A)$ is a T-ideal, that is, an ideal closed under all endomorphisms of $F\langle X \rangle$. If $S\subseteq F\langle X \rangle$, we denote by $\langle S \rangle^T$ the T-ideal generated by $S$, that is, the intersection of all T-ideals containing $S$. Given a T-ideal $I$, if there exists a finite set $S$ such that $I=\langle S \rangle^T$, we say that $I$ is finitely generated as a T-ideal. In 1950, Specht \cite{specht} posed the following problem: \begin{problem}[Specht's problem] \label{problemspecht} Is $Id(A)$ finitely generated, as a T-ideal, for every algebra $A$ ? \end{problem} \noindent The answers to this question are: a) Yes, if char$(F)=0$. Kemer \cite{kemer}. b) No, if char$(F)\neq 0$. Belov (\cite{belov}), Grishin (\cite{grishin}) and Shchigolev (\cite{Shchigolev}). \vspace{0.15cm} In general, the description of $Id(A)$ is a hard problem. The algebra $UT_n(F)$ of $n\times n$ upper triangular matrices plays an important role in the theory of PI-algebras. Maltsev \cite{maltsev} described $Id(UT_n(F))$ when char$(F)=0$, and Siderov \cite{siderov} when $F$ is any field. In particular, they proved that $Id(UT_n(F))$ is finitely generated, as a T-ideal. A T-space is a vector subspace of $F\langle X \rangle$ closed under all endomorphisms of $F\langle X \rangle$. Every T-ideal is a T-space. Another important T-space is the set of all central polynomials for an algebra $A$, denoted by $C(A)$. A polynomial $f(x_1,\ldots,x_n) \in F\langle X \rangle$ is a central polynomial for an algebra $A$ if \[f(a_1,\ldots,a_n)\in Z(A) \ \mbox{(center of $A$)}\] for all $a_1,\ldots,a_n \in A$. Note that \[C(A) \supseteq Id(A)+F.\] Thus, some authors don't include $Id(A)+F$ in the definition of $C(A)$. In this paper, if $f \in Id(A)+F$, we say that $f$ is a trivial central polynomial for $A$. Let $M_n(F)$ be the $n\times n$ matrix algebra. It is known that \[[x_1,x_2]^2 \] is a non-trivial central polynomial for $M_2(F)$. Here, $[x_1,x_2]=x_1x_2-x_2x_1$ is the commutator of $x_1$ and $x_2$. In 1956, Kaplansky \cite{kaplansky} posed the following problem: \begin{problem} Does there exist a non-trivial central polynomial for $M_n(F)$ for all $n\geq 3$ ? \end{problem} Formanek (\cite{formanek}) and Razmyslov (\cite{razmyslov}) answer ``yes'' to the question, and this was very important for ring theory. Let $\tau(n)$ be the minimal degree of the non-trivial central polynomial for $M_n(F)$ when char$(F)=0$. We known that $\tau(1)=1$ and $\tau(2)=4$. Drensky and Kasparian \cite{drenskykasparia1, drenskykasparia2} proved that $\tau(3)=8$. We don't known $\tau(n)$ when $n\geq 4$. It is an open problem. If $S\subseteq F\langle X \rangle$, we denote by $\langle S \rangle^{TS}$ the T-space generated by $S$, that is, the intersection of all T-spaces containing $S$. Given a T-space $I$, if there exists a finite set $S$ such that $I=\langle S \rangle^{TS}$, we say that $I$ is finitely generated as a T-space. Shchigolev \cite{shchigolev2} proved the following theorem: \begin{theorem} If $char(F)=0$ then every T-space is finitely generated. \end{theorem} If $F$ is an infinite field of char$(F) > 2$, we have an important example of non-finitely generated T-space: it is $C(G)$, where $G$ is the infinite dimensional Grassmann algebra. See \cite{bekhocirrankin, brandaoplkrel}. It is well known that \begin{equation} \label{cutnfigualidutnfmaisf} C(UT_n(F))=Id(UT_n(F))+F \end{equation} for all $n\geq 2$. See \cite[Exercise 1.4.2]{rowen} and \cite[Example 3.2]{drenskyformanek}. For the algebra $M_2(F)$, the T-space $C(M_2(F))$ was described when $F$ is an infinite field of char$(F)\neq 2$. See \cite{colombo, okhitin}. From now on, $F$ will be a field of char$(F) \neq 2$. Furthermore, we will consider algebras with involution of the first kind only. Let $X=\{x_1,x_2,\ldots\}$, $X^*=\{x_1^*,x_2^*,\ldots\}$ be two disjoint infinite sets. Denote by $F\langle X \cup X^* \rangle$ the free unitary associative algebra, freely generated by $X \cup X^*$. Let $A$ be an algebra with involution $\circledast$. A polynomial $f(x_1,x_1^*, \ldots,x_n,x_n^*) \in F\langle X \cup X^* \rangle$ is a polynomial identity with involution (or $*$-polynomial identity) for $(A,\circledast)$ if \[f(a_1,a_1^{\circledast}, \ldots,a_n,a_n^{\circledast})=0\] for all $a_1,\ldots,a_n \in A$. Denote by $Id(A, \circledast)$ the set of all $*$-polynomial identities for $(A, \circledast)$. It is known that $Id(A,\circledast)$ is a $T(*)$-ideal, that is, an $*$-ideal of $F\langle X\cup X^* \rangle$ closed under all $*$-endomorphisms of $F\langle X\cup X^* \rangle$. If $S\subseteq F\langle X\cup X^* \rangle$, we denote by $\langle S \rangle^{T(*)}$ the $T(*)$-ideal generated by $S$, that is, the intersection of all $T(*)$-ideals containing $S$. Given a $T(*)$-ideal $I$, if there exists a finite set $S$ such that $I=\langle S \rangle^{T(*)}$, we say that $I$ is finitely generated as a $T(*)$-ideal. Recently, Aljadeff, Giambruno, Karasik (\cite{Aljgiakar}) and Sviridova (\cite{sviridova}) proved the following: \begin{theorem} Let $F$ be a field of $char(F)=0$. If $A$ is an algebra with involution $\circledast$, then $Id(A, \circledast)$ is finitely generated as a $T(*)$-ideal \end{theorem} Di Vincenzo, Koshlukov, La Scala \cite{vinkossca} described the involutions of the first kind on $UT_n(F)$. They proved that there exist two classes of inequivalent involutions when $n$ is even and a single class otherwise. They also described: a) $Id(UT_2(F),\circledast)$ when $F$ is infinite, b) $Id(UT_3(F),\circledast)$ when char$(F)=0$, \noindent for all involutions of the first kind on $UT_2(F)$ and $UT_3(F)$ respectively. Urure and Gon\c{c}alves \cite{ronalddimas} described $Id(UT_2(F),\circledast)$ when $F$ is finite. In particular, $Id(UT_2(F),\circledast)$ is finitely generated as a $T(*)$-ideal (see \cite{ronalddimas,vinkossca}). It is an open problem to describe $Id(UT_n(F),\circledast)$ in other cases. Now, a $T(*)$-space is a vector subspace of $F\langle X \cup X^* \rangle$ closed under all $*$-endomorphisms of $F\langle X\cup X^* \rangle$. Every $T(*)$-ideal is a $T(*)$-space. Another important $T(*)$-space is the set of all $*$-central polynomials for an algebra with involution $(A,\circledast)$, denoted by $C(A,\circledast)$. A polynomial $f(x_1,x_1^*, \ldots,x_n,x_n^*) \in F\langle X \cup X^* \rangle$ is a central polynomial with involution (or $*$-central polynomial) for $(A,\circledast)$ if \[f(a_1,a_1^{\circledast}, \ldots,a_n,a_n^{\circledast}) \in Z(A)\] for all $a_1,\ldots,a_n \in A$. If $W\subseteq F\langle X\cup X^* \rangle$, we denote by $\langle W \rangle^{TS(*)}$ the $T(*)$-space generated by $W$, that is, the intersection of all $T(*)$-spaces containing $W$. Given a $T(*)$-space $I$, if there exists a finite set $W$ such that $I=\langle W \rangle^{TS(*)}$, we say that $I$ is finitely generated as a $T(*)$-space. If $F$ is an infinite field, Brandão and Koshlukov \cite{brandaoplamen} decribed $C(M_2(F),\circledast)$ for every involution $\circledast$ on $M_2(F)$. Silva \cite{diogo} studied $C(M_{1,1}(G),\circledast)$. In this paper, we describe $C(UT_2(F),\circledast)$ for every involution of the first kind $\circledast$ and every field $F$ (finite or infinite) with char$(F) \neq 2$. In particular, we prove that \[C(UT_2(F),\circledast)\neq Id(UT_2(F),\circledast)+F.\] Compare this information with (\ref{cutnfigualidutnfmaisf}). Moreover, we prove the following theorem: \begin{theorem}\label{teoremafinitogeradoresdeute} Let $F$ be a field of $char(F) \neq 2$. If $\circledast$ is an involution of the first kind on $UT_2(F)$, then $C(UT_2(F),\circledast)$ is finitely generated as a $T(*)$-space. \end{theorem} \section{Involution} From now on $F$ will be a field of char$(F)\neq 2$. Let $A$ be an unitary associative algebra over $F$. A map $*: A \rightarrow A$ is an involution on $A$ if a) $(a+b)^*=a^*+b^*$ for all $a,b \in A$, b) $(ab)^*=b^*a^*$ for all $a,b \in A$, c) $(a^*)^*=a$ for all $a \in A$. \noindent Let $Z(A)$ be the center of $A$. If $a^*=a$ for all $a\in Z(A)$, then $*$ is called an involution of the first kind on $A$. Otherwise $*$ is called an involution of the second kind on $A$. From now on we consider involutions of the first kind only. In this case $(\lambda a)^*=\lambda (a^*)$ for all $\lambda \in F$, $a\in A$. An element $a\in A$ is said to be symmetric if $a^*=a$. It's skew-symmetric if $a^*=-a$. Denote by $A^{+}$ and $A^{-}$ the following vector spaces: $A^{+}=\{a\in A: \ a^*=a\}$ and $A^{-}=\{a\in A: \ a^*=-a\}$. If $a\in A$ then \[a=(1/2)(a+a^*)+(1/2)(a-a^*).\] Therefore $A=A^{+} \oplus A^{-}$ as a vector space. Let $(A,*)$ and $(B, \circ)$ be algebras with involutions $*$ and $\circ$ respectively. We say that they are isomorphic as algebras with involution if there exists an algebra isomorphism $\varphi: A \rightarrow B$ such that $\varphi (a^*)=(\varphi(a))^{\circ}$ for all $a\in A$. In this case we denote $(A,*) \simeq (B, \circ)$. Denote by $\star$ and $s$ the following involutions on $UT_2(F)$: \begin{equation} \left( \begin{array}{cc} a&c \\ 0&b \end{array} \right)^{\star}=\left( \begin{array}{cc} b&c \\ 0&a \end{array} \right) \ \ \ \mbox{and} \ \ \ \left( \begin{array}{cc} a&c \\ 0&b \end{array} \right)^{s}=\left( \begin{array}{cc} b&-c \\ 0&a \end{array} \right) \end{equation} for all $a,b,c \in F$. By \cite[Propositions 2.5 and 2.6]{vinkossca} we have the next corollary: \begin{corollary}\label{corolarioequivalenciainvolucoe} If $*$ is an involution of the first kind on $UT_2(F)$, then \[(UT_2(F),*)\simeq (UT_2(F),\star) \ \ or \ \ (UT_2(F),*)\simeq (UT_2(F),s).\] Moreover, $(UT_2(F),\star)$ and $(UT_2(F),s)$ are not isomorphic as algebras with involution. \end{corollary} \section{$*$-polynomial identities and $*$-central polynomials} Let $X=\{x_1,x_2,\ldots\}$ and $X^*=\{x_1^*,x_2^*,\ldots\}$ be two disjoint infinite sets. Denote by $F\langle X \cup X^* \rangle$ the free unitary associative algebra freely generated by $X \cup X^*$ over $F$. This algebra has an involution $*:F\langle X \cup X^* \rangle \rightarrow F\langle X \cup X^* \rangle$ induced by the map $X\cup X^* \rightarrow X \cup X^* $ defined by $x_i \rightarrow x_i^*$ and $x_i^* \rightarrow x_i$. For example \[(x_1x_2x_3^*+2x_1^*x_4)^*=x_3x_2^*x_1^*+2x_4^*x_1.\] Let $F\langle Y \cup Z \rangle$ be the free unitary associative algebra freely generated by $Y\cup Z$ over $F$, where \[Y=\{y_1,y_2,\ldots \}, \ Z=\{z_1,z_2,\ldots \}, \ y_i=x_i+x_i^*, \ z_i=x_i-x_i^*\] for all $i\geq 1$. Note that $F\langle X \cup X^* \rangle=F\langle Y \cup Z \rangle$, $y_i$ is symmetric and $z_i$ is skew-symmetric. Thus $f(y_1,\ldots,y_n,z_1,\ldots,z_m)$ is a $*$-polynomial identity for an algebra with involution $(A,\circledast)$ if \[f(a_1,\ldots,a_n,b_1,\ldots,b_m)=0\] for all $a_1,\ldots,a_n \in A^{+}$ and $b_1,\ldots,b_m\in A^{-}$. Denote by $Id(A,\circledast)$ the set of all $*$-polynomial identities for $(A,\circledast)$. This set is a $T(*)$-ideal that is an ideal invariant under all $*$-endomorphisms of $F\langle X \cup X^* \rangle$. Here $*$-endomorphism means an endomorphism $\varphi$ of the algebra $F\langle X \cup X^* \rangle$ such that \[\varphi (f^*)=(\varphi (f))^*\] for all $f\in F\langle X \cup X^* \rangle$. In particular, if $f(y_1,\ldots,y_n,z_1,\ldots,z_m) \in Id(A,\circledast)$ then \[f(g_1,\ldots,g_n,h_1,\ldots,h_m) \in Id(A,\circledast)\] for all $g_1,\ldots,g_n \in F\langle Y \cup Z \rangle^{+}$ and $h_1,\ldots,h_m \in F\langle Y \cup Z \rangle^{-}$. We denote by $\langle W \rangle^{T(*)}$ the $T(*)$-ideal of $F\langle Y \cup Z \rangle$ generated by $W$ that is the smallest $T(*)$-ideal of $F\langle Y \cup Z \rangle$ containing $W$. If $A$ is an algebra we denote the commutators as follows: \[[a_1,a_2]=a_1a_2-a_2a_1 \ \ \mbox{and} \ \ [a_1,\ldots,a_{n-1},a_n]=[[a_1,\ldots,a_{n-1}],a_n]\] for all $a_1,\ldots,a_n \in A$, $n\geq 2$. A polynomial $f(y_1,\ldots,y_n,z_1,\ldots,z_m) \in F\langle Y\cup Z \rangle$ is called $Y$-proper if $f$ is a linear combination of polynomials \[z_1^{r_1}\cdots z_m^{r_m}f_1 \cdots f_t\] where $t \geq 0$, $r_1,\ldots,r_m \geq 0$ and $f_i \in F\langle Y \cup Z \rangle$ is a commutator of lenght $\geq 2$ for all $i=1,\ldots,t$. Denote by $B$ the vector space of all $Y$-proper polynomials. By the Poincar\'e-Birkhoff-Witt theorem every element $g(y_1,\ldots,y_n,z_1,\ldots,z_m) \in F\langle Y \cup Z \rangle$ is a linear combination of polynomials \begin{equation}\label{teoremapbw} y_1^{s_1}\cdots y_n^{s_n}g_{(s_1,\ldots,s_n)} \end{equation} where $s_1,\ldots,s_n \geq 0$ and $g_{(s_1,\ldots,s_n)}\in B$. Using \cite[Lemma 2.1]{drenskygiambruno} and similar arguments as in \cite[Proposition 4.3.11]{drenskybook} we state the following: \begin{proposition}\label{baseparapropiosbaseparatudo} Let $F$ be an infinite field of char$(F)\neq 2$. Let $I$ be a $T(*)$-ideal of $F\langle Y\cup Z \rangle$. Consider $W \subset B$ such that \[\{w+(B\cap I) \ : \ w\in W\}\] is a basis for the quotient vector space $B/(B\cap I)$. Then the set of all polynomials \[ y_1^{s_1}\cdots y_n^{s_n}w+I, \] where $s_1,\ldots,s_n \geq 0,$ \ $n\geq 1$ and $w\in W$, is a basis for the quotient vector space $F\langle Y\cup Z \rangle/I$. \end{proposition} Recall that a polynomial $g(x_1,x_1^*, \ldots,x_n,x_n^*) \in F\langle X \cup X^* \rangle$ is a $*$-central polynomial for an algebra with involution $(A,\circledast)$ if \[g(a_1,a_1^{\circledast}, \ldots,a_n,a_n^{\circledast})\in Z(A)\] for all $a_1,\ldots,a_n \in A$. Note that $f(y_1,\ldots,y_n,z_1,\ldots,z_m)\in F\langle Y\cup Z \rangle$ is a $*$-central polynomial for $(A,\circledast)$ if \[f(a_1,\ldots,a_n,b_1,\ldots,b_m)\in Z(A)\] for all $a_1,\ldots,a_n \in A^{+}$ and $b_1,\ldots,b_m\in A^{-}$. Denote by $C(A,\circledast)$ the set of all $*$-central polynomials for $(A,\circledast)$. This set is a $T(*)$-space that is a vector space invariant under all $*$-endomorphisms of $F\langle X \cup X^* \rangle$. If $W \subseteq F\langle Y \cup Z \rangle$ then we denote by $\langle W \rangle^{TS(*)}$ the $T(*)$-space generated by $W$ that is the smallest $T(*)$-space of $F\langle Y \cup Z \rangle$ containing $W$. It's the vector space generated by the polynomials \[f(g_1,\ldots,g_n,h_1,\ldots,h_m) \] where $f(y_1,\ldots,y_n,z_1,\ldots,z_m) \in W$ , \ $g_1,\ldots,g_n \in F\langle Y \cup Z \rangle^{+}$ and $h_1,\ldots,h_m \in F\langle Y \cup Z \rangle^{-}$. Using similar arguments as in \cite[Proposition 4.2.3]{drenskybook} we state the following: \begin{proposition}\label{propositconseq} Let $F$ be a field (finite or infinite) with $|F|\geq q$. Let $f \in F\langle Y\cup Z \rangle$ and $w\in Y\cup Z$. Write \[f=\sum_{i=0}^{d_w} f^{(i)} \] where $f^{(i)}$ is the homogeneous component of $f$ with $\deg_{w} f^{(i)}=i$. If $d_w < q$ then \[\langle f \rangle^{TS(*)}=\langle f^{(0)},f^{(1)},\ldots,f^{(d_w)} \rangle^{TS(*)}.\] \end{proposition} Using Proposition \ref{propositconseq} and similar arguments as in \cite[Proposition 4.2.3]{drenskybook} we state the following: \begin{proposition}\label{proposgeradoremultilemultih} Let $I$ be a $T(*)$-space of $F\langle Y\cup Z \rangle$. \begin{itemize} \item[a)] If $F$ is an infinite field then $I$ is generated, as a $T(*)$-space, by its multihomogeneous elements. \item[b)] If $F$ is a field of char$(F)=0$ then $I$ is generated, as a $T(*)$-space, by its multilinear elements. \end{itemize} \end{proposition} \begin{lemma}\label{partesimetricadefeidentidade} Let $f=f(y_1,\ldots,y_n,z_1,\ldots,z_m) \in F\langle Y\cup Z \rangle$ and write \[f=f^{+}+f^{-}\] where $f^{+}\in F\langle Y\cup Z \rangle^{+}$ and $f^{-}\in F\langle Y\cup Z \rangle^{-}$. Consider an algebra with involution $(A,\circledast)$. If \[f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)\in A^{-}\] for all $Y_1,\ldots,Y_n \in A^{+}$ and $Z_1,\ldots,Z_m \in A^{-}$ then $f^{+}\in Id(A,\circledast)$. \end{lemma} \begin{proof} Let $Y_1,\ldots,Y_n \in A^{+}$ and $Z_1,\ldots,Z_m \in A^{-}$. Since $f^{+}\in F\langle Y\cup Z \rangle^{+}$ we have $f^{+}(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)\in A^{+}$. Since \[f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)-f^{-}(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)= f^{+}(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)\] we have $f^{+}(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)\in A^{-}$ too. Therefore \[f^{+}(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)=0\] as desired. \end{proof} \section{$*$-central polynomials for $(UT_2(F),\star)$} In this section, we describe the $*$-central polynomials for $(UT_2(F),\star)$ where \begin{equation}\label{definicaoprimeirainvolucao} \left( \begin{array}{cc} a&c \\ 0&b \end{array} \right)^{\star}=\left( \begin{array}{cc} b&c \\ 0&a \end{array} \right) \end{equation} for all $a,b,c \in F$. Note that $\{e_{11}+e_{22}, \ e_{12}\}$ and $\{e_{11}-e_{22}\}$ form a basis for the vector spaces $(UT_2(F))^{+}$ and $(UT_2(F))^{-}$ respectively. The next lemma is proved in \cite[Theorem 3.1]{vinkossca}. See \cite[Lemma 5.2]{ronalddimas} too. \begin{lemma}\label{lemavariavcomutam} Let $F$ be a field of $char(F)\neq 2$. If $I=Id(UT_2(F),\star)$ then \begin{eqnarray*} z_{\sigma (1)} \cdots z_{\sigma (m)}[z_{\sigma (m+1)},y_1]+I&=&z_{1} \cdots z_{m}[z_{m+1},y_1]+I \ \ and \\ z_{1} \cdots z_{m}[z_{m+1},y_1]+I&=&(-1)^{m-i}z_{1} \cdots z_{i} [z_{m+1},y_1] z_{i+1} \cdots z_{m}+I \end{eqnarray*} for all $\sigma \in S_{m+1}$. \end{lemma} \begin{lemma}\label{polcentral1} Let $F$ be a field of $char(F)\neq 2$. Let \[f(z_1,\ldots,z_m)=z_1 z_2 \cdots z_{m}\] where $m\geq 0$. If $m$ is even then $f \in C(UT_2(F),\star)$. If $m$ is odd then $f\notin C(UT_2(F),\star)$. \end{lemma} \begin{proof} Suppose $m=2n$ for some $n\geq 0$. If $Z_i=\lambda_i (e_{11}-e_{22})$, where $\lambda_i \in F$, then \[f(Z_1,\ldots,Z_{2n})=(\lambda_1\cdots \lambda_{2n})(e_{11}+e_{22}) \in Z(UT_2(F)).\] Thus $f \in C(UT_2(F),\star)$. Suppose $m=2n+1$ for some $n\geq 0$. Then \[f(e_{11}-e_{22},e_{11}-e_{22},\ldots,e_{11}-e_{22})=e_{11}-e_{22}.\] Therefore $f\notin C(UT_2(F),\star)$. \end{proof} \begin{proposition}\label{propositioncomznadireita} Let $F$ be a field of $char(F)\neq 2$. Let \[g(y_1,\ldots,y_n,z_1,\ldots,z_m)=f(y_1,\ldots,y_n,z_1,\ldots,z_m)z_{m}\] be a polynomial where $f$ is a homogeneous polynomial in the variable $z_m$. If $g \in C(UT_2(F), \star)$ then \[g \in \left( Id(UT_2(F), \star)+ \langle z_1z_2 \rangle^{TS(*)}\right) . \] \end{proposition} \begin{proof} Let $Y_1,\ldots,Y_n \in UT_2(F)^{+}$ and $Z_1,\ldots,Z_m \in UT_2(F)^{-}$. Then \[f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)= \begin{pmatrix} a & c \\ 0 & b \end{pmatrix} \ \ \mbox{and} \ \ Z_{m}=\left(\begin{array}{cc} d & 0 \\ 0 & -d \end{array}\right)\] for some $a,b,c,d \in F$. Since $f(y_1,\ldots,y_n,z_1,\ldots,z_m)z_{m}\in C(UT_2(F), \star)$, we obtain \[f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)Z_{m}= \begin{pmatrix} ad & -cd \\ 0 & -bd \end{pmatrix} \in Z(UT_2(F)).\] Thus $cd=0$ and $ad=-bd$. We have two cases: \ Case 1. $\deg_{z_m}f=0$. In this case, $f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)=f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_{m-1})$. If $d=1$ then $a=-b$ and $c=0$. Thus $f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)\in UT_2(F)^{-}$. \ Case 2. $\deg_{z_m}f\geq 1$. In this case, if $d=0$ then $f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)=0 \in UT_2(F)^{-}$. If $d\neq 0$ then $a=-b$ and $c=0$. Thus $f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)\in UT_2(F)^{-}$. \ By the two cases we have $f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)\in UT_2(F)^{-}$ for all $Y_1,\ldots,Y_n \in UT_2(F)^{+}$ and $Z_1,\ldots,Z_m \in UT_2(F)^{-}$. By Lemma \ref{partesimetricadefeidentidade} we can write $f=f^{+}+f^{-}$ where $f^{+} \in Id(UT_2(F),\star)$ and $f^{-} \in F\langle Y\cup Z \rangle^{-}$. Thus \[fz_{m}=f^{+}z_{m}+f^{-}z_{m}\in \left( Id(UT_2(F), \star)+ \langle z_1z_2 \rangle^{TS(*)}\right). \] The proof is complete. \end{proof} \begin{lemma}\label{coromatrizantisimetrica2} Let $F$ be a field of $char(F)\neq 2$. If $n\geq 1$ then \[z_1 \cdots z_{2n}\in \left( Id(UT_2(F), \star)+ \langle z_1z_2 \rangle^{TS(*)}\right) . \] \end{lemma} \begin{proof} This is a direct consequence of Lemma \ref{polcentral1} and Lemma \ref{propositioncomznadireita}. \end{proof} \subsection{$C(UT_2(F),\star)$ when char$(F)=0$} The next theorem was proved in \cite{vinkossca}. See Proposition \ref{baseparapropiosbaseparatudo} and \cite[Theorem 3.1]{vinkossca} for details. \begin{theorem} \label{teoremaidentidaprimeirainv} Let $F$ be an infinite field of char$(F)\neq 2$. Consider the involution $\star$ defined in (\ref{definicaoprimeirainvolucao}). Denote by $I$ the $T(*)$-ideal generated by the polynomials \begin{eqnarray*} [y_1,y_2], \ \ [z_1,z_2], \ \ [y_1,z_1][y_2,z_2] \ \ \mbox{and} \ \ z_1y_1z_2-z_2y_1z_1. \end{eqnarray*} Then $Id(UT_2(F),\star)=I$. Moreover, the quotient vector space $F\langle Y\cup Z \rangle /I$ has a basis consisting of all polynomials of the form \begin{equation}\label{geradoresquocientepori} y_1^{s_1}\cdots y_n^{s_n} z_1^{r_1}\cdots z_m^{r_m}[z_m,y_k]+I \ \ \ \mbox{and} \ \ \ y_1^{s_1}\cdots y_n^{s_n} z_1^{r_1}\cdots z_m^{r_m}+I \end{equation} where $n\geq 1$, \ $m\geq 1$, \ $s_1,\ldots, s_n, r_1,\ldots,r_m\geq 0$, \ $k\geq 1$. \end{theorem} Now we will prove the first main theorem of this paper. \begin{theorem} \label{teorinvsta1} Let $F$ be a field of char$(F)=0$. Consider the involution $\star$ defined in (\ref{definicaoprimeirainvolucao}). The set of all $*$-central polynomials of $(UT_2(F), \star)$ is \[C(UT_2(F),\star)= Id(UT_2(F), \star)+ \langle z_1z_2 \rangle^{TS(*)}+F.\] \end{theorem} \begin{proof} Denote $I=Id(UT_2(F), \star)$ and $C=C(UT_2(F),\star)$. By Lemma \ref{polcentral1}, we have \[C \supseteq (I+ \langle z_1z_2 \rangle^{TS(*)}+F). \] Let $f(y_1,\ldots,y_n,z_1,\ldots,z_m) \in C$ be a multilinear polynomial. We shall prove that $f \in (I+\langle z_1z_2 \rangle^{TS(*)}+F)$. By Theorem \ref{teoremaidentidaprimeirainv}, we have $f+I=\overline{f}+I$ where \[\overline{f}=\alpha y_1\cdots y_n z_1\cdots z_m + \sum_{k=1}^n \alpha_k y_1\cdots \widehat{y_k} \cdots y_n z_1\cdots z_{m-1}[z_m,y_k],\] for some $\alpha, \alpha_k \in F$. Thus, there exists $g\in I$ such that $f=\overline{f}+g$. In particular, $\overline{f}=(f-g) \in C$. \ Case 1. $n=0$ and $m=0$. In this case, $\overline{f}=\alpha$ and so $f\in (F+I) \subset (I+\langle z_1z_2 \rangle^{TS(*)}+F)$. \ Case 2. $n=0$ and $m>0$. In this case, \[\overline{f}=\alpha z_1\cdots z_m.\] By Lemma \ref{polcentral1}, we have that $\alpha =0$ or $m$ is even. By Lemma \ref{coromatrizantisimetrica2}, we obtain $f\in (I+\langle z_1z_2 \rangle^{TS(*)}+F)$. \ Case 3. $n>0$ and $m=0$. In this case, \[\overline{f}=\alpha y_1\cdots y_n.\] If $\alpha \neq 0$ then \[\overline{f}(1,\ldots,1, e_{12})=\alpha e_{12}.\] Thus $\overline{f} \notin C$, which is a contradiction. Therefore $\alpha=0$ and $f\in I \subset (I+\langle z_1z_2 \rangle^{TS(*)}+F)$. \ Case 4. $n>0$ and $m=1$. In this case, \[\overline{f}=\alpha y_1\cdots y_n z_1 + \sum_{k=1}^n \alpha_k y_1\cdots \widehat{y_k} \cdots y_n [z_1,y_k].\] Since $\overline{f}\in C$ we have $\overline{f}(1,\ldots,1,e_{11}-e_{22})=\alpha (e_{11}-e_{22}) \in Z(UT_2(F))$. Thus $\alpha =0$ and \[\overline{f}=\sum_{k=1}^n \alpha_k y_1\cdots \widehat{y_k} \cdots y_n [z_1,y_k].\] Since $\overline{f}\in C$ we obtain $\overline{f}(1,\ldots ,1,e_{12},1,\ldots ,1, e_{11}-e_{22})=2\alpha_k e_{12} \in Z(UT_2(F))$. Thus $\alpha_k=0$ for all $k=1,\ldots,n$. We prove that $f\in I \subset (I+\langle z_1z_2 \rangle^{TS(*)}+F)$. \ Case 5. $n>0$ and $m\geq 2$. By Lemma \ref{lemavariavcomutam}, we have $f+I=\overline{f}+I=\overline{\overline{f}}+I$ where \[\overline{\overline{f}}=\alpha y_1\cdots y_n z_1\cdots z_m - \sum_{k=1}^n \alpha_k y_1\cdots \widehat{y_k} \cdots y_n z_1\cdots z_{m-2}[z_{m-1},y_k]z_m.\] Since $I\subset C$ we have $\overline{\overline{f}} \in C$. By Proposition \ref{propositioncomznadireita}, we obtain $\overline{\overline{f}} \in (I+\langle z_1z_2 \rangle^{TS(*)})$. Thus $f \in (I+\langle z_1z_2 \rangle^{TS(*)}) \subset (I+\langle z_1z_2 \rangle^{TS(*)}+F)$. By the five cases and by Proposition \ref{proposgeradoremultilemultih} we have $C=I+\langle z_1z_2 \rangle^{TS(*)}+F$ as desired. \end{proof} \subsection{$C(UT_2(F),\star)$ when $F$ is an infinite field of char$(F)>2$} We start this section with the next proposition. Similar result is obtained in \cite[Theorem 6 in Chapter 4]{bahturinbook} when we consider $T$-ideals of the free Lie algebra. Moreover, similar result is obtained when we consider $T$-spaces of the free associative algebra. \begin{proposition}\label{proposicaocorpoinfinitopotenciasdep} Let $F$ be an infinite field of $char(F)=p >2$. If $H$ is a $T(*)$-space then $H$ is generated, as a $T(*)$-space, by its multihomogeneous elements $f(y_1,\ldots,y_n,z_1,\ldots,z_m)\in H$ with multidegree $(p^{a_1},\ldots,p^{a_n},p^{b_1},\ldots,p^{b_m})$ where $a_1,\ldots,a_n,b_1,\ldots,b_m \geq 0$. \end{proposition} \begin{proof} Denote by $H_M$ the set of all multihomogeneous elements of $H$, and by $H_{PM}$ the set of all multihomogeneous elements $f(y_1,\ldots,y_n,z_1,\ldots,z_m)\in H$ with multidegree $(p^{a_1},\ldots,p^{a_n},p^{b_1},\ldots,p^{b_m})$ where $a_1,\ldots,a_n,b_1,\ldots,b_m \geq 0$, $n\geq 0$ and $m\geq 0$. By Proposition \ref{proposgeradoremultilemultih} it follows that \[H=\langle H_M \rangle ^{TS(*)}.\] We have to prove $\langle H_M \rangle ^{TS(*)}=\langle H_{PM}\rangle^{TS(*)}$. It's clear that $\langle H_M \rangle ^{TS(*)} \supseteq \langle H_{PM}\rangle^{TS(*)}$. Note that \begin{equation} \langle H_M \rangle ^{TS(*)} \subseteq \langle H_{PM}\rangle^{TS(*)} \Leftrightarrow H_M \subseteq \langle H_{PM}\rangle^{TS(*)}. \end{equation} Let $g(y_1,\ldots,y_n,z_1,\ldots,z_m) \in H_M$. a) If $g\in H_{PM}$ then $g\in \langle H_{PM}\rangle^{TS(*)}$. b) Suppose $g \notin H_{PM}$. Denote by \[d=(d_{y_1},\ldots, d_{y_n},d_{z_1}, \ldots, d_{z_m})\] the multidegree of $g$. Without loss of generality, we may assume that $\deg_{y_1}g=d_{y_1}$ is not a power of $p$. Let $\deg_{y_1}g=p^kq$ where $(p,q)=1$. Denote by $\overline{g}(y_1,y_2,\ldots,y_n,y_{n+1},z_1,\ldots,z_m)$ the multihomogeneous component of \[g(y_1+y_{n+1},y_2,\ldots , y_n, z_1, \ldots,z_m)\] with multidegree \[\overline{d}=(\overline{d}_{y_1},\overline{d}_{y_2},\ldots, \overline{d}_{y_n},\overline{d}_{y_{n+1}},\overline{d}_{z_1}, \ldots, \overline{d}_{z_m})= (\overline{d}_{y_1},d_{y_2},\ldots, d_{y_n},\overline{d}_{y_{n+1}},d_{z_1}, \ldots, d_{z_m})\] where \[\deg_{y_1}\overline{g}=\overline{d}_{y_1}=p^k \ \ \mbox{and} \ \ \deg_{y_{n+1}}\overline{g}=\overline{d}_{y_{n+1}}=p^kq-p^k.\] Since $F$ is an infinite field, we have $\overline{g} \in \langle g \rangle^{TS(*)}$. It is known that \[ {p^kq \choose p^k}=q \neq 0 \mod p. \] Thus, since \[\overline{g}(y_1, y_2, \ldots,y_n,y_{1},z_1,\ldots,z_m)={p^kq \choose p^k} g(y_1, \ldots,y_n,z_1,\ldots,z_m),\] we have $g\in \langle \overline{g} \rangle^{TS(*)}$. We prove that $\langle g \rangle^{TS(*)}=\langle \overline{g} \rangle^{TS(*)}$. Now we can use the same arguments in $\overline{g}$. After a few steps, we will obtain $\langle g \rangle^{TS(*)}=\langle h \rangle^{TS(*)}$ for some $h\in H_{PM}$. Thus $g\in \langle H_{PM}\rangle^{TS(*)}$. We prove that $\langle H_M \rangle ^{TS(*)} \subseteq \langle H_{PM}\rangle^{TS(*)}$ as desired. \end{proof} \begin{lemma} \label{lemacorpoinfinitopotdep} Let $F$ be an infinite field of char$(F)=p >2$. Let $L$ be the $T(*)$-space \[L= Id(UT_2(F), \star)+ \langle z_1z_2 \rangle^{TS(*)}+ \langle y_1^p \rangle^{TS(*)}.\] a) Then $L \subseteq C(UT_2(F),\star)$. b) Let $a_1,\ldots,a_n \geq 1$. If $f(y_1,\ldots,y_n)$ is a multihomogeneous polynomial with multidegree $(p^{a_1},\ldots,p^{a_n})$ then $f \in L$. \end{lemma} \begin{proof} a) Let $Y\in UT_2(F)^{+}$. Thus $Y=\begin{pmatrix} a & b \\ 0 & a \end{pmatrix}$ for some $a,b \in F$. If $i\geq 1$ then \[Y^i= \left( \begin{array}{cc} a^i& ia^{i-1}b \\ 0 & a^i \end{array}\right). \] Therefore $Y^p \in Z(UT_2(F))$ and $y_1^p \in C(UT_2(F),\star)$. By Lemma \ref{polcentral1}, we have $z_1z_2 \in C(UT_2(F),\star)$. Therefore $L \subseteq C(UT_2(F),\star)$. b) Denote $I=Id(UT_2(F), \star)$. By Theorem \ref{teoremaidentidaprimeirainv}, \[f+I=\alpha y_1^{p^{a_1}} y_2^{p^{a_2}} \cdots y_n^{p^{a_n}}+I\] for some $\alpha \in F$. Since $[y_i,y_j] \in I$ (see Theorem \ref{teoremaidentidaprimeirainv}), we obtain \begin{eqnarray*} f+I&=&\alpha y_1^{p^{a_1}} \cdots y_n^{p^{a_n}}+I= \alpha \left(y_1^{p^{a_1-1}} \cdots y_n^{p^{a_n-1}}\right)^p +I\\ &=&\alpha \left(1/2( y_1^{p^{a_1-1}} \cdots y_n^{p^{a_n-1}}+y_n^{p^{a_n-1}} \cdots y_1^{p^{a_1-1}}) \right)^p +I\\ &=&\alpha g^p +I, \end{eqnarray*} where $g=1/2( y_1^{p^{a_1-1}} \cdots y_n^{p^{a_n-1}}+y_n^{p^{a_n-1}} \cdots y_1^{p^{a_1-1}})$. Since $g$ is a symmetric polynomial, we have $\alpha g^p \in \langle y_1^p \rangle^{TS(*)}$ and therefore $f \in (I+\langle y_1^p \rangle^{TS(*)}) \subseteq L$. The proof is complete. \end{proof} \begin{theorem}\label{teorinvsta2} Let $F$ be an infinite field of char$(F)=p >2$. Consider the involution $\star$ defined in (\ref{definicaoprimeirainvolucao}). The set of all $*$-central polynomials of $(UT_2(F), \star)$ is \[C(UT_2(F),\star)= Id(UT_2(F), \star)+ \langle z_1z_2 \rangle^{TS(*)}+ \langle y_1^p \rangle^{TS(*)}.\] \end{theorem} \begin{proof} Denote $I=Id(UT_2(F), \star)$ and $C=C(UT_2(F),\star)$. By Lemma \ref{lemacorpoinfinitopotdep}, we have \[C \supseteq (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)}). \] Let $f(y_1,\ldots,y_n,z_1,\ldots,z_m) \in C$ be a multihomogeneous polynomial with multidegree $(p^{a_1},\ldots,p^{a_n},p^{b_1},\ldots,p^{b_m})$ where $a_1,\ldots,a_n, b_1, \ldots, b_m \geq 0$. We shall prove that $f \in (I+\langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)})$. By Theorem \ref{teoremaidentidaprimeirainv} we obtain $f+I=\overline{f}+I$ where \begin{eqnarray*} \overline{f}&=& \sum_{k=1}^n \alpha_k y_1^{p^{a_1}}\cdots y_k^{p^{a_k}-1} \cdots y_n^{p^{a_n}} z_1^{p^{b_1}}\cdots z_m^{p^{b_m}-1}[z_m,y_k]+\\ &&+\alpha y_1^{p^{a_1}} \cdots y_n^{p^{a_n}} z_1^{p^{b_1}}\cdots z_m^{p^{b_m}} \end{eqnarray*} for some $\alpha_1,\ldots,\alpha_n, \alpha \in F$. \ Case 1. $n=0$ and $m=0$. In this case, $f=\alpha$ and so \[f\in F \subset \langle y_1^p \rangle^{TS(*)} \subset (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)}).\] \ Case 2. $n\geq 1$ and $m=0$. In this case, \[\overline{f}=\alpha y_1^{p^{a_1}} \cdots y_n^{p^{a_n}}.\] If $a_i=0$, for some $i$, then \[\overline{f}=\alpha y_1^{p^{a_1}} \cdots y_i \cdots y_n^{p^{a_n}}\] and $\overline{f}(1,\ldots,1,y_i,1,\ldots,1)= \alpha y_i \in C$. Thus $\alpha =0$, $\overline{f}=0$ and $f\in I \subset (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)})$. Suppose $a_1,\ldots,a_n \geq 1$. By Lemma \ref{lemacorpoinfinitopotdep}, \[\overline{f} \in (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)})\] and therefore $f \in (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)})$. \ Case 3. $m=1$ and $b_m=0$. In this case, \[\overline{f}= \sum_{k=1}^n \alpha_k y_1^{p^{a_1}}\cdots y_k^{p^{a_k}-1} \cdots y_n^{p^{a_n}}[z_1,y_k]+ \alpha y_1^{p^{a_1}} \cdots y_n^{p^{a_n}} z_1. \] Since $\overline{f} \in C$ we have $\overline{f}(1,\ldots,1,z_1)=\alpha z_1 \in C$. Thus $\alpha =0$ and \[\overline{f}= \sum_{k=1}^n \alpha_k y_1^{p^{a_1}}\cdots y_k^{p^{a_k}-1} \cdots y_n^{p^{a_n}}[z_1,y_k].\] If $Y_1=\ldots = Y_{k-1}= Y_{k+1}=\ldots = Y_n=e_{11}+e_{22}$, $Y_k=e_{11}+e_{22}+e_{12}$ and $Z_1=e_{11}-e_{22}$, then \[\overline{f}(Y_1,\ldots,Y_n,Z_1)= 2 \alpha_k e_{12} \in Z(UT_2(F)).\] Thus $\alpha_k=0$ for all $k=1,\ldots,n$ and $\overline{f}=0$. Therefore \[f \in I \subseteq (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)}).\] \ Case 4. $m\geq 2$ and $b_m=0$. In this case, \begin{eqnarray*} \overline{f}&=& \sum_{k=1}^n \alpha_k y_1^{p^{a_1}}\cdots y_k^{p^{a_k}-1} \cdots y_n^{p^{a_n}} z_1^{p^{b_1}}\cdots z_{m-1}^{p^{b_{m-1}}}[z_m,y_k]+\\ &&+\alpha y_1^{p^{a_1}} \cdots y_n^{p^{a_n}} z_1^{p^{b_1}}\cdots z_{m-1}^{p^{b_{m-1}}}z_m. \end{eqnarray*} By Lemma \ref{lemavariavcomutam} we have \[z_{m-1}^{p^{b_{m-1}}}[z_m,y_k]+I=z_{m-1}^{p^{b_{m-1}}-1}z_m[z_{m-1},y_k]+I= -z_{m-1}^{p^{b_{m-1}}-1}[z_{m-1},y_k]z_m+I.\] Thus $\overline{f}+I=\widetilde{f}z_m+I$ where \begin{eqnarray*} \widetilde{f}&=& -\sum_{k=1}^n \alpha_k y_1^{p^{a_1}}\cdots y_k^{p^{a_k}-1} \cdots y_n^{p^{a_n}} z_1^{p^{b_1}}\cdots z_{m-1}^{p^{b_{m-1}}-1}[z_{m-1},y_k]+\\ &&+\alpha y_1^{p^{a_1}} \cdots y_n^{p^{a_n}} z_1^{p^{b_1}}\cdots z_{m-1}^{p^{b_{m-1}}}. \end{eqnarray*} Since $\widetilde{f}z_m \in C$, by Proposition \ref{propositioncomznadireita} we have that $\widetilde{f}z_m \in (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)})$. Therefore \[f \in (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)}).\] \ Case 5. $m\geq 1$ and $b_m \geq 1$. By Lemma \ref{lemavariavcomutam}, \[z_{m}^{p^{b_{m}}-1}[z_m,y_k]+I=-z_{m}^{p^{b_{m}}-2}[z_m,y_k]z_m+I.\] Thus $\overline{f}+I=\widetilde{f}z_m+I$ where \begin{eqnarray*} \widetilde{f}&=& -\sum_{k=1}^n \alpha_k y_1^{p^{a_1}}\cdots y_k^{p^{a_k}-1} \cdots y_n^{p^{a_n}} z_1^{p^{b_1}}\cdots z_{m}^{p^{b_{m}}-2}[z_m,y_k]+\\ &&+\alpha y_1^{p^{a_1}} \cdots y_n^{p^{a_n}} z_1^{p^{b_1}}\cdots z_{m}^{p^{b_{m}}-1}. \end{eqnarray*} Since $\widetilde{f}z_m \in C$, by Proposition \ref{propositioncomznadireita} we have \[\widetilde{f}z_m \in (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)}).\] Therefore $f \in (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)}).$ By the five cases it follows that \[C \subseteq (I+ \langle z_1z_2 \rangle^{TS(*)}+\langle y_1^p \rangle^{TS(*)}) \] as desired. The proof is complete. \end{proof} \subsection{$C(UT_2(F),\star)$ when $F$ is a finite field} Let $F$ be a finite field with $|F|=q$ elements and char$(F)=p \neq 2$. Since $( \ F-\{0\} \ , \ \cdot \ )$ is a group, we have $a^{q-1}=1$ for all $a\in F-\{0\}$. In particular, \[a^q=a\] for all $a\in F$. Hence, if $$Y=\begin{pmatrix} a & b \\ 0 & a \end{pmatrix}$$ then \begin{equation}\label{potenciay} Y^i=\begin{pmatrix} a^i & ia^{i-1}b \\ 0 & a^i \end{pmatrix} \ , \ \ Y^q=\begin{pmatrix} a^q & qa^{q-1}b \\ 0 & a^q \end{pmatrix}= \begin{pmatrix} a & 0 \\ 0 & a \end{pmatrix} \end{equation} for all $a,b \in F$ and $i\geq 1$. The next lemma is direct consequence of \cite[Proposition 4.2.3]{drenskybook}. See \cite[Lemma 2.1]{ronalddimas} too. \begin{lemma} \label{lemapolcomutident} Let $F$ be a finite field with $|F|=q$. Let $f \in F \langle X \rangle$ be a polynomial given by \[f(x_1,\ldots,x_n)=\sum_{d_1=0}^{q-1} \ldots \sum_{d_n=0}^{q-1}\alpha_{(d_1,\ldots,d_n)}x_1^{d_1}\cdots x_n^{d_n},\] where $\alpha_{(d_1,\ldots,d_n)} \in F$. If $f$ is a polynomial identity for $F$ then $\alpha_{(d_1,\ldots,d_n)}=0$ for all $(d_1,\ldots,d_n)$. \end{lemma} Let $\Lambda_n$ be the set of all elements $(s_1,\ldots,s_n) \in \mathbb{Z}^n$ such that: \begin{itemize} \item[a)] $0\leq s_1,\ldots,s_n < 2q$, \item[b)]If $s_i\geq q$ for some $i$, then $s_j<q$ for all $j\neq i$. \end{itemize} The next theorem was proved in \cite[Theorem 5.9]{ronalddimas}. \begin{theorem} \label{teoremaprimeirainvolucao} Let $F$ be a finite field with $|F|=q$ elements and char$(F)\neq 2$. Consider the involution $\star$ defined in (\ref{definicaoprimeirainvolucao}). Denote by $J$ the $T(*)$-ideal generated by the polynomials \begin{eqnarray*} [y_1,y_2], \ \ [z_1,z_2], \ \ [y_1,z_1][y_2,z_2], \ \ z_1y_1z_2-z_2y_1z_1, \\ (y_1^q-y_1)[z_1,y_2], \ \ (y_1^q-y_1)(y_2^q-y_2), \ \ z_1^q-z_1, \\ (z_1^{q-1}-1)[z_1,y_1], \ \ (y_{1}^q-y_{1})z_{1}-2^{-1}[z_{1},y_{1}] . \end{eqnarray*} Then $Id(UT_2(F),\star)=J$. Moreover, the quotient vector space $F\langle Y\cup Z \rangle /J$ has a basis consisting of all polynomials of the form \[ \left\{ \begin{array}{ll} y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_m^{r_m-1}[z_m,y_k]+J, & 0\leq s_1,\ldots,s_n,r_1,\ldots,r_m< q,\ \ r_m\geq 1,\\ &n\geq 1, \ m\geq 1, \ k\geq 1;\\ y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_m^{r_m}+J, & 0\leq s_1,\ldots,s_n,r_1,\ldots,r_m< q, \ \ r_m\geq 1, \\ &n\geq 1, \ m\geq 1;\\ y_1^{s_1}\cdots y_n^{s_n}+J, & (s_1,\ldots,s_n)\in \Lambda_n, \ \ n\geq 1. \end{array} \right. .\] \end{theorem} \begin{proposition}\label{polinomio central da finitud} Let $F$ be a finite field with $|F| = q$ and char$(F) \neq 2$. Then \[l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l\] is a $*$-central polynomial for $ (UT_2(F),\star)$ for all $l\geq 0$. \end{proposition} \begin{proof} Denote $f(y_1,y_2)=l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l$ and consider \[Y_i = \begin{pmatrix} a_i & b_i \\ 0 & a_i \end{pmatrix},\] where $a_i,b_i \in F$, $i=1,2$. By (\ref{potenciay}), we have \[ Y_2^l = \begin{pmatrix} a_2^l & la_2^{l-1}b_2 \\ 0 & a_2^l \end{pmatrix} \ \mbox{and} \ Y_2^{q + l - 1} = \begin{pmatrix} a_2^l & (l-1)a_2^{l-1}b_2 \\ 0 & a_2^l \end{pmatrix}.\] Thus \[ Y_2^{q+l-1} - Y_2^l = \begin{pmatrix} 0 & - a_2^{l-1}b_2 \\ 0 & 0 \end{pmatrix} \ \mbox{and} \ l Y_1 (Y_2^{q+l-1} - Y_2^l) = \begin{pmatrix} 0 & - l a_1 a_2^{l-1}b_2 \\ 0 & 0 \end{pmatrix}.\] By (\ref{potenciay}), we have \[ Y_1^q Y_2^l = \begin{pmatrix} a_1 & 0 \\ 0 & a_1 \end{pmatrix} \begin{pmatrix} a_2^l & l a_2^{l-1} b_2 \\ 0 & a_2^l \end{pmatrix} = \begin{pmatrix} a_1 a_2^l & l a_1 a_2^{l-1} b_2 \\ 0 & a_1 a_2^l \end{pmatrix}.\] Therefore \[f(Y_1,Y_2)= \begin{pmatrix} a_1a_2^l & 0 \\ 0 & a_1a_2^l \end{pmatrix} \in Z(UT_2(F)) \] as desired. The proof is complete. \end{proof} \ Denote by $V$ the following $T(*)$-space: \begin{equation} V = \left\langle l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l: \ l \geq 0 \right\rangle ^{TS(*)} . \end{equation} By Proposition \ref{polinomio central da finitud}, we obtain \[V+Id(UT_2(F),\star) \subseteq C(UT_2(F),\star).\] Since char$(F)=p$, if $l=kp$ and $y_1=1$ then $ l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l= y_2^{kp}.$ Hence \begin{equation} \label{potenciadeyemv} y_2^{kp} \in V \end{equation} for all $k\geq 0$. From now on we write \[f \equiv g \Longleftrightarrow f+V+Id(UT_2(F),\star)=g+V+Id(UT_2(F),\star).\] \begin{lemma}\label{lema general de l} Let $F$ be a finite field with $|F| = q$ and char$(F) \neq 2$. If $l, n\geq 0$ then \[ \left( l y_1\cdots y_n (y_{n+1}^{q+l-1} - y_{n+1}^l) + y_1^q \cdots y_n^q y_{n+1}^l \right) \equiv 0 .\] \end{lemma} \begin{proof} The case $n=0$ is consequence of Proposition \ref{polinomio central da finitud}. In fact, substituting in \[l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l\] the variable $y_1$ by $1$, we will have $l(y_2^{q+l-1} - y_2^l) + y_2^l \equiv 0$. Suppose $n\geq 1$. Denote $u =(1/2)(y_1 y_2\cdots y_n + y_n \cdots y_2 y_1)$ and $J=Id(UT_2(F),\star)$. Since $u$ is a symmetric polynomial it follows that \begin{equation}\label{aaa1} v= lu(y_{n+1}^{q+l-1} - y_{n+1}^l) + u^q y_{n+1}^l \in V. \end{equation} Since $[y_i,y_j] \in J$ (see Theorem \ref{teoremaprimeirainvolucao}), we have \[y_iy_j+J= y_jy_i+J.\] Thus $u + J = y_1\cdots y_n + J$ and $u^q + J = y_1^q \cdots y_n^q + J.$ Hence \[v+J= l y_1\cdots y_n (y_{n+1}^{q+l-1} - y_{n+1}^l) + y_1^q \cdots y_n^q y_{n+1}^l + J . \] Now we use (\ref{aaa1}) to finish the proof. \end{proof} \begin{corollary}\label{diminui potencia de y} Let $F$ be a finite field with $|F| = q$ and char$(F)=p \neq 2$. If $ f(y_1,\ldots,y_n) \in F \left\langle Y \cup Z \right\rangle $ and $p \nmid l$ then there exists $g(y_1,\ldots,y_n) \in F \left\langle Y \cup Z \right\rangle$ such that \[ f y_{n+1}^{q+l-1} \equiv g y_{n+1}^l .\] \end{corollary} \begin{proof} By Lemma \ref{lema general de l}, we have \[ y_1\cdots y_n y_{n+1}^{q+l-1}\equiv (y_1\cdots y_n -(l^{-1}) y_1^q \cdots y_n^q )y_{n+1}^l.\] Since $f y_{n+1}^{q+l-1}$ is a linear combination of polynomials \[y_{i_1}\cdots y_{i_m} y_{n+1}^{q+l-1},\] we finish the proof. \end{proof} \begin{proposition}\label{uma variavel y} Let $F$ be a finite field with $|F| = q$ and char$(F)=p \neq 2$. Consider \[f = \sum_{i=0}^{2q-1} \alpha_i y_1^i,\] where $\alpha_i \in F$ for all $i$. If $f \in C(UT_2(F), \star)$ then $ f \equiv 0 $. \end{proposition} \begin{proof} Let $g$ be given by \[g = \sum_{i=q}^{2q-1} \alpha_i y_1^i = \sum_{i=1}^{q} \alpha_{q+i-1} y_1^{q+i-1} = \sum_{\substack{i=1 \\ p|i}}^q \alpha_{q+i-1} y_1^{q+i-1} + \sum_{\substack{i=1 \\ p\nmid i}}^q \alpha_{q+i-1} y_1^{q+i-1}. \] By Corollary \ref{diminui potencia de y}, we have \[ g \equiv \sum_{\substack{i=1 \\ p|i}}^q \alpha_{q+i-1} y_1^{q+i-1} + \sum_{\substack{i=1 \\ p\nmid i}}^q \beta_i y_1^i, \] for some $\beta_i \in F$. Thus, there exist $ \gamma_i \in F$ such that \[ f \equiv \sum_{\substack{i=1 \\ p|i}}^q \alpha_{q+i-1} y_1^{q+i-1} + \sum_{i=0}^{q-1} \gamma_i y_1^i. \] By (\ref{potenciadeyemv}), we obtain \begin{equation} \label{aaa2} f \equiv \underbrace{\sum_{\substack{i=1 \\ p|i}}^q \alpha_{q+i-1} y_1^{q+i-1} + \sum_{\substack{i=1 \\ p \nmid i}}^{q-1} \gamma_i y_1^i}_h. \end{equation} It follows from Proposition \ref{polinomio central da finitud} that \begin{equation} \label{aaa3} C(UT_2(F),\star)\supseteq V+Id(UT_2(F),\star). \end{equation} Since $f\in C(UT_2(F), \star ) $, by (\ref{aaa2}) and (\ref{aaa3}) we have that $h\in C(UT_2(F), \star ) $ where \begin{equation*}\label{equacao1 polinomio central da finitud} h = \sum_{\substack{i=1 \\ p|i}}^q \alpha_{q+i-1} y_1^{q+i-1} + \sum_{\substack{i=1 \\ p \nmid i}}^{q-1} \gamma_i y_1^i. \end{equation*} If $a\in F$ and \[ Y = \begin{pmatrix} a & 1 \\ 0 & a \end{pmatrix},\] then by (\ref{potenciay}), \[h(Y)= \begin{pmatrix} h(a)& \left[\displaystyle \sum_{\substack{i=1 \\ p|i}}^q \alpha_{q+i-1}(-1) a^{i-1}+\sum_{\substack{i=1 \\ p \nmid i}}^{q-1} \gamma_i ia^{i-1} \right]\\ 0 & h(a) \end{pmatrix} \] Since $ h(Y) \in Z(UT_2(F)) $ it follows that \[\displaystyle \sum_{\substack{i=1 \\ p|i}}^q \alpha_{q+i-1}(-1) a^{i-1}+\sum_{\substack{i=1 \\ p \nmid i}}^{q-1} \gamma_i ia^{i-1} = 0\] for all $a\in F$. By Lemma \ref{lemapolcomutident}, we have \[ \left\{ \begin{array}{lll} \alpha_{q+i-1}(-1)=0,&1\leq i \leq q,& p\mid i \ ; \\ \gamma_i i=0,&1\leq i \leq q-1,& p \nmid i. \end{array} \right. \] Thus $h=0$ and $f \equiv 0$ as desired. \end{proof} \begin{lemma}\label{potencia pq} Let $F$ be a finite field with $|F| = q$ and char$(F)=p \neq 2$. Then $ y_1^{pq} - y_1^p \in Id(UT_2(F),\star) $. \end{lemma} \begin{proof} If $a,b \in F$ and $ Y = \begin{pmatrix} a & b \\ 0 & a \end{pmatrix},$ then by (\ref{potenciay}), \[ Y^{pq} =(Y^q)^p= \begin{pmatrix} a^p & 0 \\ 0 & a^p \end{pmatrix} = Y^p. \] Thus $ Y^{pq} - Y^p=0$ as desired. \end{proof} \begin{lemma}\label{adicionando ps} Let $F$ be a finite field with $|F| = q$ and char$(F)=p \neq 2$. If $ i\geq 0 $ then \[\left( i y_1 (y_2^{q+i-1} - y_2^i) + y_1^q y_2^i\right) y_3^p \equiv 0. \] \end{lemma} \begin{proof} Denote $ u = (1/2) (y_1 y_3^p + y_3^p y_1)$ and $J=Id(UT_2(F),\star)$. Since $ u $ is a symmetric polynomial, we have \begin{equation}\label{adicionando ps ecuacao} i u (y_2^{q+i-1} - y_2^i) + u^q y_2^i \in V. \end{equation} Since $y_i y_j + J = y_j y_i +J$ it follows that \begin{equation}\label{aaa4} u + J = y_1 y_3^p + J. \end{equation} Thus, by Lemma \ref{potencia pq}, \begin{equation}\label{aaa5} u^q + J = y_1^q y_3^{pq} + J = y_1^q y_3^p + J. \end{equation} Now we use (\ref{aaa4}) and (\ref{aaa5}) to obtain \begin{align} i u (y_2^{q+i-1} - y_2^i) + u^q y_2^i + J &= i y_1 y_3^p (y_2^{q+i-1} - y_2^i) + y_1^q y_3^p y_2^i + J \nonumber \\ &= i y_1 (y_2^{q+i-1} - y_2^i) y_3^p + y_1^q y_2^i y_3^p + J \nonumber \\ &=\left( i y_1 (y_2^{q+i-1} - y_2^i) + y_1^q y_2^i\right) y_3^p+J. \label{aaa6} \end{align} By (\ref{adicionando ps ecuacao}) and (\ref{aaa6}) it follows that $\left( i y_1 (y_2^{q+i-1} - y_2^i) + y_1^q y_2^i\right) y_3^p \equiv 0$ as desired. \end{proof} \begin{corollary}\label{f com y p} Let $F$ be a finite field with $|F| = q$ and char$(F)=p \neq 2$. If $ f(y_1,\ldots,y_n) \equiv 0$ then $f(y_1,\ldots,y_n) y_{n+1}^{lp} \equiv 0$ for all $l\geq 0$. \end{corollary} \begin{proof} Write $f=f_V+f_I$, where $f_V \in V$ and $f_I \in Id(UT_2(F),\star)$. Since \[fy_{n+1}^{lp}=f_Vy_{n+1}^{lp}+f_Iy_{n+1}^{lp} \equiv f_Vy_{n+1}^{lp}\] we can suppose $f(y_1,\ldots,y_n) \in V $. In this case, $f$ is a linear combination of polynomials \[ i g_1 (g_2^{q+i-1} - g_2^i) + g_1^q g_2^i, \] where $ g_1 , g_2 \in F \left\langle Y \cup Z \right\rangle ^+ $ and $ i\geq 0 $. By Lemma \ref{adicionando ps} we have \[ \left( i g_1 (g_2^{q+i-1} - g_2^i) + g_1^q g_2^i \right) y_{n+1}^p \equiv 0.\] Thus $f(y_1,\ldots,y_n) y_{n+1}^p \equiv 0$. Since $V+Id(UT_2(F),\star)$ is a $T(*)$-space we have $f(y_1,\ldots,y_n) y_{n+1}^{lp}=f(y_1,\ldots,y_n) (y_{n+1}^{l})^p \equiv 0$ for all $l\geq 0$. \end{proof} \begin{proposition}\label{com variavel y} Let $F$ be a finite field with $|F| = q$ and char$(F)=p \neq 2$. If $f(y_1,\ldots,y_n) \in C(UT_2(F),\star) $ then $ f(y_1,\ldots,y_n)\equiv 0$. \end{proposition} \begin{proof} By Theorem \ref{teoremaprimeirainvolucao} we can suppose \[ f = \sum_{s \in \Lambda_n} \alpha_s y_1^{s_1} \cdots y_n^{s_n}, \] where $ s=(s_1,\ldots,s_n)$, $ \alpha_s \in F $. We will prove the proposition using induction on $n$. The case $n=1$ is consequence of Proposition \ref{uma variavel y}. Suppose $n\geq 2$. Write $$f = \sum_{i=0}^{2q-1} f_i y_n^i.$$ Note that: a) If $0 \leq i \leq q-1$ then \begin{align*} f_i = \sum_{(s_1,\ldots,s_{n-1}) \in \Lambda_{n-1}} \alpha_{(s_1,\ldots,s_{n-1},i)} y_1^{s_1} \cdots y_{n-1}^{s_{n-1}}. \end{align*} b) If $ q \leq i \leq 2q-1$ then \begin{align}\label{tipo maior que q} f_i = \sum_{s_1,\ldots,s_{n-1}=0}^{q-1} \alpha_{(s_1,\ldots,s_{n-1},i)} y_1^{s_1} \cdots y_{n-1}^{s_{n-1}}. \end{align} Write \[ g = \sum_{i=q}^{2q-1} f_i y_n^i = \sum_{i=1}^{q} f_{q+i-1} y_n^{q+i-1} = \sum_{\substack{i=1 \\ p|i}}^q f_{q+i-1} y_n^{q+i-1} + \sum_{\substack{i=1 \\ p\nmid i}}^q f_{q+i-1} y_n^{q+i-1}. \] By Corollary \ref{diminui potencia de y}, there exist polynomials $g_i(y_1,\ldots,y_{n-1})$ such that \[ g\equiv \sum_{\substack{i=1 \\ p|i}}^q f_{q+i-1} y_n^{q+i-1} + \sum_{\substack{i=1 \\ p\nmid i}}^q g_i y_n^i. \] Thus, there exist polynomials $ h_i(y_1,\ldots,y_{n-1})$ such that \begin{equation}\label{aaa7} f \equiv \underbrace{\sum_{\substack{i=1 \\ p|i}}^q f_{q+i-1} y_n^{q+i-1} + \sum_{i=0}^{q-1} h_i y_n^i}_h. \end{equation} Denote \begin{equation*} h(y_1,\ldots,y_n) = \sum_{\substack{i=1 \\ p|i}}^q f_{q+i-1} y_n^{q+i-1} + \sum_{i=0}^{q-1} h_i y_n^i. \end{equation*} Since $f\in C(UT_2(F,\star))$ and $V+Id(UT_2(F,\star)) \subseteq C(UT_2(F,\star))$, we have by (\ref{aaa7}) that $ h\in C(UT_2(F,\star)) $. Consider the following matrices \[Y_n = \begin{pmatrix} a_n & 1 \\ 0 & a_n \end{pmatrix} \ \ \mbox{and} \ \ Y_k=\begin{pmatrix} a_k & 0 \\ 0 & a_k \end{pmatrix} \ (k\neq n)\] where $a_j \in F$ for all $j$. By (\ref{potenciay}) we have \[Y_n^i = \begin{pmatrix} a_n^i & i a_n^{i-1} \\ 0 & a_n^i \end{pmatrix}.\] In particular, if $p|i$ then \[Y_n^{q+i-1} = \begin{pmatrix} a_n^i & - a_n^{i-1} \\ 0 & a_n^i \end{pmatrix}.\] Hence \[h(Y_1,\ldots,Y_n)=\begin{pmatrix} h(a_1,\ldots,a_n) & \overline{h}(a_1,\ldots,a_n) \\ 0 & h(a_1,\ldots,a_n) \end{pmatrix},\] where \begin{eqnarray*} \overline{h}(a_1,\ldots,a_n) &=& \sum_{\substack{i=1 \\ p|i}}^q f_{q+i-1}(a_1,\ldots,a_{n-1})(-1) a_n^{i-1} + \sum_{i=0}^{q-1} h_i(a_1,\ldots,a_{n-1}) i a_n^{i-1}\\ &=&\sum_{\substack{i=1 \\ p|i}}^q f_{q+i-1}(a_1,\ldots,a_{n-1})(-1) a_n^{i-1} + \sum_{\substack{i=1 \\ p \nmid i}}^{q-1} h_i(a_1,\ldots,a_{n-1}) i a_n^{i-1}. \end{eqnarray*} Since $h(Y_1,\ldots,Y_n) \in Z(UT_2(F)) $ we obtain $\overline{h}(a_1,\ldots,a_n)=0$ for all $a_1,\ldots,a_n \in F$. By Lemma \ref{lemapolcomutident} it follows that \begin{equation}\label{equacao f segunda} f_{q+i-1} (a_1,\ldots,a_{n-1}) = 0 \end{equation} for all $i=1,\ldots, q$ where $p|i$ ; and \begin{equation}\label{equacao h segunda} h_i (a_1,\ldots,a_{n-1}) = 0 \end{equation} for all $i=1, \ldots, q-1$ where $p \nmid i$. By (\ref{tipo maior que q}), (\ref{equacao f segunda}) and Lemma \ref{lemapolcomutident}, we have $f_{q+i-1}(y_1,\ldots ,y_{n-1}) = 0 $ for all $i=1,\ldots, q$ where $p|i$. Thus \begin{equation} \label{aaa8} h(y_1,\ldots,y_n) = \sum_{i=0}^{q-1} h_i y_n^i. \end{equation} Since $h\in C(UT_2(F),\star)$, by Proposition \ref{propositconseq} it follows that $h_i y_n^i \in C(UT_2(F),\star)$ for all $i=0,\ldots, q-1$. Substituting in $h_iy_n^i$ the variable $y_n$ by $1$, it follows that \[h_i \in C(UT_2(F),\star)\] for all $i=0,\ldots, q-1$. We have two cases: \ a) Case $p \nmid i$. Consider $$Y_k = \begin{pmatrix} a_k & b_k \\ 0 & a_k \end{pmatrix},$$ where $a_k,b_k \in F$ and $k=1,\ldots,n-1$. We have \[ h_i(Y_1,\ldots,Y_{n-1}) = \begin{pmatrix} h_i(a_1,\ldots,a_{n-1}) & \beta \\ 0 & h_i(a_1,\ldots,a_{n-1}) \end{pmatrix} \] for some $\beta \in F$. Since $h_i \in C(UT_2(F,\star))$ it follows that $\beta=0$. By (\ref{equacao h segunda}), we have $h_i(a_1,\ldots,a_{n-1})=0$ too. Thus $h_i(Y_1,\ldots,Y_{n-1})=0$ and $h_i(y_1,\ldots,y_{n-1}) \in Id(UT_2(F),\star)$ for all $i=0, \ldots, q-1$ where $p \nmid i$. \ b) Case $p | i$. Since $h_i(y_1,\ldots,y_{n-1}) \in C(UT_2(F),\star)$, we obtain, by induction, that $h_i \equiv 0$. Thus, by Corollary \ref{f com y p}, it follows that $h_i y_n^i \equiv 0$ for all $i=0, \ldots, q-1$ where $p | i$. By (\ref{aaa7}), (\ref{aaa8}) and two cases above, we have \[f\equiv h \equiv 0,\] as desired. \end{proof} \begin{theorem} \label{teorinvstar3} Let $F$ be a finite field with $|F| = q$ and char$(F)=p \neq 2$. Then \[C(UT_2(F),\star) = \left\langle l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l: \ 1 \leq l \leq p \right\rangle ^{TS(*)} + \left\langle z_1 z_2 \right\rangle ^{TS(*)} + Id(UT_2(F),\star).\] \end{theorem} \begin{proof} Firstly, we will prove the following claim : \ \noindent {\bf Claim 1.} The set $C(UT_2(F),\star)$ equals \[C(UT_2(F),\star) = \left\langle l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l: \ l \geq 0 \right\rangle ^{TS(*)} + \left\langle z_1 z_2 \right\rangle ^{TS(*)} + Id(UT_2(F),\star).\] \noindent \emph{Proof of Claim 1.} Denote $J=Id(UT_2(F),\star)$ and \[V=\left\langle l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l: \ l \geq 0 \right\rangle ^{TS(*)}.\] Since $z_1z_2 \in C(UT_2(F),\star)$, we have $ C(UT_2(F),\star) \supseteq \left\langle z_1 z_2 \right\rangle ^{TS(*)} $. Therefore, by Proposition \ref{polinomio central da finitud}, we obtain \begin{equation}\label{aaa9} C(UT_2(F),\star) \supseteq \left(V + \left\langle z_1 z_2 \right\rangle ^{TS(*)} +J\right). \end{equation} Consider $f \in C(UT_2(F),\star)$. We will prove that $f\in \left(V + \left\langle z_1 z_2 \right\rangle ^{TS(*)} +J\right)$. By Theorem \ref{teoremaprimeirainvolucao}, $f=f_J+f_{\Upsilon}$ where $f_J \in J$ and $f_{\Upsilon}$ is a linear combination of polynomials \[ \left\{ \begin{array}{ll} y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_m^{r_m-1}[z_m,y_k], & 0\leq s_1,\ldots,s_n,r_1,\ldots,r_m< q,\ \ r_m\geq 1,\\ &n\geq 1, \ m\geq 1, \ k\geq 1; \hspace{\fill} (\Upsilon_1)\\ y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_m^{r_m}, & 0\leq s_1,\ldots,s_n,r_1,\ldots,r_m< q, \ \ r_m\geq 1, \\ &n\geq 1, \ m\geq 1; \hspace{\fill} (\Upsilon_2)\\ y_1^{s_1}\cdots y_n^{s_n}, & (s_1,\ldots,s_n)\in \Lambda_n, \ \ n\geq 1. \hspace{\fill} (\Upsilon_3) \end{array} \right. \] Since $f_J \in J$, we have \[f\in \left(V + \left\langle z_1 z_2 \right\rangle ^{TS(*)} +J\right) \Leftrightarrow f_{\Upsilon} \in \left(V + \left\langle z_1 z_2 \right\rangle ^{TS(*)} +J\right). \] Thus we can suppose $f=f_{\Upsilon}$. Since $\deg_{z_i}f <q$, we can suppose $f$ a homogeneous polynomial in the variable $z_i$ for all $i=1,\ldots,m$ (see Proposition \ref{propositconseq}). Denote $\deg_{z_i}f =r_i$. If $r_1=\ldots=r_m=0$ then by Proposition \ref{com variavel y} \[f \in \left(V + \left\langle z_1 z_2 \right\rangle ^{TS(*)} +J\right).\] Suppose $r_i \neq 0$ for some $i$. Renumbering the indices if necessary, we may assume that $r_i \geq 1$ for all $i=1,\ldots,m$. Since $f$ is a linear combination of polynomials in $\Upsilon_1$ and $\Upsilon_2$, we have $f=f_1+f_2$ where \[ f_1=f_1(y_1,y_2,\ldots,z_1,z_2,\ldots) = \sum_{n,k,s} \alpha_{(n,k,s)}y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_m^{r_m-1}[z_m,y_k] \] with $0\leq s_1,\ldots,s_n< q$, \ \ $1\leq r_1,\ldots,r_m< q$, $\ \ n\geq 1, \ \ m\geq 1, \ \ k\geq 1$, \ \ $s=(s_1,\ldots,s_n)$, \ \ $\alpha_{(n,k,s)}\in F$; and \[ f_2=f_2(y_1,y_2,\ldots,z_1,z_2,\ldots) = \sum_{n,s} \beta_{(n,s)}y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_m^{r_m} \] with $0\leq s_1,\ldots,s_n< q$, \ \ $1\leq r_1,\ldots,r_m< q$, $ \ \ n\geq 1, \ \ m\geq 1$, \ \ $s=(s_1,\ldots,s_n),$ \ \ $\beta_{(n,s)}\in F$. We have three cases: \ Case 1. $m=1$ and $r_m=1$. In this case, $f=f_1+f_2$ where \[ f_1=f_1(y_1,y_2,\ldots,z_1) = \sum_{n,k,s} \alpha_{(n,k,s)}y_1^{s_1}\cdots y_n^{s_n}[z_1,y_k] \] and \[ f_2=f_2(y_1,y_2,\ldots,z_1) = \sum_{n,s} \beta_{(n,s)}y_1^{s_1}\cdots y_n^{s_n}z_1. \] Let \[ Y_i=\left( \begin{array}{cc} a_i&0 \\ 0&a_i \end{array} \right) \ \ \mbox{and} \ \ Z_i=\left( \begin{array}{cc} 1&0 \\ 0&-1 \end{array} \right) \] where $a_i \in F$. We have \[f(Y_1,Y_2,\ldots,Z_1)= \left(\begin{array}{cc} \displaystyle \sum_{n,s} \beta_{(n,s)}a_1^{s_1}\cdots a_n^{s_n} &\theta \\ 0&\displaystyle -\sum_{n,s} \beta_{(n,s)}a_1^{s_1}\cdots a_n^{s_n} \end{array} \right) \] where $\theta \in F$. Since $f(Y_1,Y_2,\ldots,Z_1) \in Z(UT_2(F))$, it follows that $\theta =0$ and \[\sum_{n,s} \beta_{(n,s)}a_1^{s_1}\cdots a_n^{s_n}=0\] for all $a_1,\ldots, a_n \in F$. Since $0\leq s_1,\ldots,s_n< q$ we have, by Lemma \ref{lemapolcomutident}, that $\beta_{(n,s)}=0$ for all $n,s$. Thus $f=f_1$. If $\overline{Y}_1,\overline{Y}_2, \ldots \in UT_2(F)^+$ and $\overline{Z}_1 \in UT_2(F)^-$ then \[f(\overline{Y}_1,\overline{Y}_2,\ldots,\overline{Z}_1)= f_1(\overline{Y}_1,\overline{Y}_2,\ldots,\overline{Z}_1)=\alpha e_{12} \] for some $\alpha \in F$. Since $f(\overline{Y}_1,\overline{Y}_2,\ldots,\overline{Z}_1)\in Z(UT_2(F))$, we obtain $\alpha=0$, that is $f \in J$. Therefore $f \in \left(V + \left\langle z_1 z_2 \right\rangle ^{TS(*)} +J\right)$. \ Case 2. $m\geq 2$ and $r_m=1$. In this case, $f=f_1+f_2$ where \[ f_1=f_1(y_1,y_2,\ldots,z_1,z_2,\ldots) = \sum_{n,k,s} \alpha_{(n,k,s)}y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_{m-1}^{r_{m-1}}[z_m,y_k] \] and \[ f_2=f_2(y_1,y_2,\ldots,z_1,z_2,\ldots) = \sum_{n,s} \beta_{(n,s)}y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_{m-1}^{r_{m-1}}z_m. \] By Lemma \ref{lemavariavcomutam}, we have \[z_{m-1}^{r_{m-1}}[z_m,y_k]+J=z_{m-1}^{r_{m-1}-1}z_m[z_{m-1},y_k]+J= -z_{m-1}^{r_{m-1}-1}[z_{m-1},y_k]z_m+J.\] Thus $f+J=\widetilde{f}z_m+J$ where \begin{eqnarray*} \widetilde{f}&=& -\sum_{n,k,s} \alpha_{(n,k,s)}y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_{m-1}^{r_{m-1}-1}[z_{m-1},y_k] +\\ &&+\sum_{n,s} \beta_{(n,s)}y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_{m-1}^{r_{m-1}}. \end{eqnarray*} Since $\widetilde{f}z_m \in C(UT_2(F),\star)$ we have, by Proposition \ref{propositioncomznadireita}, that $\widetilde{f}z_m \in ( \langle z_1z_2 \rangle^{TS(*)}+J)$. Therefore \[f \in \left(V+ \langle z_1z_2 \rangle^{TS(*)}+J\right).\] \ Case 3. $m\geq 1$ and $r_m\geq 2$. By Lemma \ref{lemavariavcomutam}, we have \[z_{m}^{r_m-1}[z_m,y_k]+J=-z_{m}^{r_m-2}[z_m,y_k]z_m+J.\] Thus $f+J=\widetilde{f}z_m+J$ where \begin{eqnarray*} \widetilde{f}&=&-\sum_{n,k,s} \alpha_{(n,k,s)}y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_m^{r_m-2}[z_m,y_k]\\ &&+\sum_{n,s} \beta_{(n,s)}y_1^{s_1}\cdots y_n^{s_n}z_1^{r_1}\cdots z_m^{r_m-1}. \end{eqnarray*} Since $\widetilde{f}z_m \in C(UT_2(F),\star)$ we have, by Proposition \ref{propositioncomznadireita}, that $\widetilde{f}z_m \in ( \langle z_1z_2 \rangle^{TS(*)}+J)$. Therefore \[f \in \left(V+ \langle z_1z_2 \rangle^{TS(*)}+J\right).\] \ We prove that \[C(UT_2(F),\star) \subseteq \left(V + \left\langle z_1 z_2 \right\rangle ^{TS(*)} +J\right).\] By (\ref{aaa9}) we finish the proof of Claim 1. \ \ \noindent {\bf Claim 2.} If $l\geq 0$ then \[ l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l \in \left\langle r y_1 (y_2^{q+r-1} - y_2^r) + y_1^q y_2^r : 1\leq r \leq p \right\rangle ^{TS(*)} + J.\] \ \noindent \emph{Proof of Claim 2.} If $l\geq 0$, let $k,r$ be the integers such that $l = k p + r$ and $0\leq r <p$. We have \begin{equation}\label{abcdcba} l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l = r y_1 y_2^{k p} (y_2^{q+r-1} - y_2^r) + y_1^q y_2^{k p} y_2^r. \end{equation} \ Case 1. $r = 0$. In this case, by (\ref{abcdcba}), it follows that \[l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l= y_1^q y_2^{kp} \in \left\langle y_1^q y_2^p \right\rangle ^{TS(*)}.\] Note that \[y_1^q y_2^p=p y_1 (y_2^{q+p-1} - y_2^p) + y_1^q y_2^p.\] This case is done. \ Case 2. $1\leq r < p$. Denote $u = (1/2) (y_1 y_2^{k p} + y_2^{k p} y_1)$. Since \[y_1y_2+J=y_2y_1+J,\] we have $u + J = y_1 y_2^{k p}+J$. Moreover, by Lemma \ref{potencia pq}, \[ u^q + J = y_1^q y_2^{k p q} + J = y_1^q y_2^{k p} + J. \] Thus, by (\ref{abcdcba}), we obtain \begin{eqnarray*} l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l+J&=&r y_1 y_2^{k p} (y_2^{q+r-1} - y_2^r) + y_1^q y_2^{k p} y_2^r + J \\ &=&r u (y_2^{q+r-1} - y_2^r) + u^q y_2^r + J. \end{eqnarray*} Therefore \[l y_1 (y_2^{q+l-1} - y_2^l) + y_1^q y_2^l \in \left\langle r y_1 (y_2^{q+r-1} - y_2^r) + y_1^q y_2^r \right\rangle^{TS(*)} + J\] as desired. \ By the Claims 1 and 2 we complete the proof of theorem. \end{proof} \section{$*$-central polynomials for $(UT_2(F),s)$} In this section, we describe the $*$-central polynomials for $(UT_2(F),s)$ where \begin{equation*} \left( \begin{array}{cc} a&c \\ 0&b \end{array} \right)^{s}=\left( \begin{array}{cc} b&-c \\ 0&a \end{array} \right) \end{equation*} for all $a,b,c \in F$. Note that $\{e_{11}+e_{22}\}$ and $\{e_{11}-e_{22}, e_{12}\}$ form a basis for the vector spaces $(UT_2(F))^{+}$ and $(UT_2(F))^{-}$ respectively. The next theorem was proved in \cite[Theorem 3.2]{vinkossca}: \begin{theorem}\label{identidadesut2fsinfinito} Let $F$ be an infinite field with $char(F)\neq 2$. Then $Id(UT_2(F),s)$ is the $T(*)$-ideal generated by the polynomials \begin{equation*} [y_1,y_2], \ \ [z_1,y_1], \ \ [z_1,z_2][z_3,z_4] \ \ \mbox{and} \ \ z_1z_2z_3-z_3z_2z_1. \end{equation*} \end{theorem} \ The next theorem was proved in \cite[Theorem 6.15]{ronalddimas}: \begin{theorem}\label{identidadesut2fsfinito} Let $F$ be a finite field with $|F|=q$ elements and char$(F)\neq 2$. Then $Id(UT_2(F),s)$ is the $T(*)$-ideal generated by the polynomials \begin{eqnarray*} [y_1,y_2], \ \ [z_1,y_1], \ \ [z_1,z_2][z_3,z_4] \ \ \mbox{and} \ \ z_1z_2z_3-z_3z_2z_1, \\ y_1^q-y_1, \ \ (z_1^q-z_1)(z_2^q-z_2), \ \ z_1^{q+1}-z_1^2, \\ (z_{1}^q-z_{1})z_{2}+z_2(z_{1}^q-z_{1}), \ \ [z_{1}, z_{2}](z_3^{q}-z_3). \end{eqnarray*} \end{theorem} \begin{theorem}\label{teoremainvs} Let $F$ be a field of char$(F) \neq 2$. The set of all $*$-central polynomials of $(UT_2(F), s)$ is \[C(UT_2(F),s)= Id(UT_2(F), s)+ \langle y_1 \rangle^{TS(*)}.\] \end{theorem} \begin{proof} Since $(UT_2(F))^+=Z(UT_2(F))$ we have \[C(UT_2(F),s)\supseteq Id(UT_2(F), s)+ \langle y_1 \rangle^{TS(*)}.\] Let $f=f(y_1,\ldots,y_n,z_1,\ldots,z_m) \in C(UT_2(F),s)$ and write \[f=f^{+}+f^{-}\] where $f^{+}\in F\langle Y\cup Z \rangle^{+}$ and $f^{-}\in F\langle Y\cup Z \rangle^{-}$. If $Y_1,\ldots, Y_n \in UT_2(F)^+$ and $Z_1,\ldots, Z_m \in UT_2(F)^-$ then $f^-(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m) \in UT_2(F)^-$ and \begin{multline*} f(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)-f^+(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)=\\ f^-(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m) \in UT_2(F)^+. \end{multline*} Thus $f^-(Y_1,\ldots,Y_n,Z_1,\ldots,Z_m)=0$ and $f^-\in Id(UT_2(F), s)$. Since $f^+ \in \langle y_1 \rangle^{TS(*)}$ it follows that $f\in Id(UT_2(F), s)+ \langle y_1 \rangle^{TS(*)}$. We prove that \[C(UT_2(F),s)= Id(UT_2(F), s)+ \langle y_1 \rangle^{TS(*)}\] as desired. \end{proof} \section{Conclusion} Let $F$ be a field of char$(F)\neq 2$, and let $*$ be an involution of the first kind on $UT_2(F)$. By Corollary \ref{corolarioequivalenciainvolucoe}, we have \[C(UT_2(F),*)=C(UT_2(F),\star) \ \ \mbox{or} \ \ C(UT_2(F),*)=C(UT_2(F),s).\] Thus, by Theorem \ref{teorinvsta1}, Theorem \ref{teorinvsta2}, Theorem \ref{teorinvstar3} and Theorem \ref{teoremainvs} we have described $C(UT_2(F),*)$. Since \[z_1z_2 \notin Id(UT_2(F),\star) \ \ \mbox{and} \ \ y_1 \notin Id(UT_2(F),s),\] it follows that \[C(UT_2(F),*)\neq Id(UT_2(F),*)+F.\] Moreover, by Theorem \ref{teoremaidentidaprimeirainv}, Theorem \ref{teoremaprimeirainvolucao}, Theorem \ref{identidadesut2fsinfinito}, Theorem \ref{identidadesut2fsfinito} it follows that there exists a finite set $S$ such that \[Id(UT_2(F),*)=\langle S \rangle^{T(*)}.\] Since \begin{eqnarray*} \langle S \rangle^{T(*)}=&\langle \ y_{n+1}fy_{n+2}, \ y_{n+1}fz_{m+1}, \ z_{m+1}fy_{n+1}, \ z_{m+1}fz_{m+2} \ \ | \\ &f=f(y_1,\ldots,y_n,z_1,\ldots,z_m)\in S \ \ \mbox{or} \ \ f^* \in S \ \rangle^{TS(*)}, \end{eqnarray*} we prove the Theorem \ref{teoremafinitogeradoresdeute}. \section*{Acknowledgments} The first author was supported by Ph.D. grant from CAPES. The second author was partially supported by FAPESP grant No. 2014/09310-5, and by CNPq grant No. 406401/2016-0.
\section{Introduction} Representations of Boolean functions by real polynomials play a central role in theoretical computer science. The notion of \emph{approximating} a Boolean function $f\colon\zoon\to\moo$ pointwise by polynomials of given degree has been particularly fruitful. Formally, let $E(f,d)$ denote the minimum error in an infinity-norm approximation of $f$ by a real polynomial of degree at most $d$: \[ E(f,d)=\min_{p}\{\|f-p\|_{\infty}:\deg p\leq d\}. \] This quantity clearly ranges between $0$ and $1$ for any function $f\colon\zoon\to\moo$. In more detail, we have $0=E(f,n)\leq E(f,n-1)\leq\cdots\leq E(f,0)\leq1$, where the first equality holds because any such $f$ is representable exactly by a polynomial of degree at most $n$. The study of the polynomial approximation of Boolean functions dates back to the pioneering work in the 1960s by Myhill and Kautz~\cite{myhill-kautz61} and Minsky and Papert~\cite{minsky88perceptrons}. This line of research has grown remarkably over the decades, with numerous connections discovered to other subjects in theoretical computer science. Lower bounds for polynomial approximation have complexity-theoretic applications, whereas upper bounds are a tool in algorithm design. In the former category, polynomial approximation has enabled significant progress in circuit complexity~\cite{beigel91rational,aspnes91voting,krause94depth2mod,KP98threshold,sherstov07ac-majmaj,beame-huyn-ngoc09multiparty-focs}, quantum query complexity~\cite{beals-et-al01quantum-by-polynomials,aaronson-shi04distinctness,ambainis05collision,BKT17poly-strikes-back}, and communication complexity~\cite{buhrman-dewolf01polynomials,razborov02quantum,buhrman07pp-upp,sherstov07ac-majmaj,sherstov07quantum,RS07dc-dnf,lee-shraibman08disjointness,chatt-ada08disjointness,dual-survey,beame-huyn-ngoc09multiparty-focs,sherstov12mdisj,sherstov13directional}. On the algorithmic side, polynomial approximation underlies many of the strongest results obtained to date in computational learning~\cite{tt99DNF-incl-excl,KS01dnf,KOS:02,KKMS,odonnell03degree,ACRSZ07nand}, differentially private data release~\cite{tuv12releasing-marginals,ctuw14release-of-marginals}, and algorithm design in general~\cite{linial-nisan90incl-excl,kahn96incl-excl,sherstov07inclexcl-ccc}. \subsection{The hardest halfspace} Myhill and Kautz's work~\cite{myhill-kautz61} six decades ago, and many of the papers that followed~\cite{myhill-kautz61,muroga71threshold,siu91small-weights,paturi92approx,beigel94perceptrons,hastad94weights,sherstov09hshs,sherstov09opthshs,thaler14omb}, focused on \emph{halfspaces}. Also known as a linear threshold function, a halfspace is any function $h\colon\zoon\to\moo$ representable as $h(x)=\sign(\sum_{i=1}^{n}z_{i}x_{i}-\theta)$ for some fixed reals $z_{1},z_{2},\ldots,z_{n},\theta.$ The fundamental question taken up in this line of research is: how well can halfspaces be approximated by polynomials of given degree? An early finding, due to Muroga~\cite{muroga71threshold}, was the upper bound \begin{equation} E(h,1)\leq1-\frac{1}{n^{\Theta(n)}}\label{eq:muroga} \end{equation} for every halfspace $h$ in $n$ variables. In words, every halfspace can be approximated pointwise by a linear polynomial to error just barely smaller than the trivial bound of~$1$. Many authors pursued matching lower bounds on $E(h,1)$ for specific halfspaces $h$, culminating in an explicit construction by H\aa stad~\cite{hastad94weights} that matches Muroga's bound~(\ref{eq:muroga}). The study of $E(h,d)$ for $d\geq2$ proved to be challenging. For a long time, essentially the only result was the lower bound $E(h,d)\geq1-2^{-\Theta(n/d^{2})+1}$ due to Beigel~\cite{beigel94perceptrons}, where $h$ is the so-called \emph{odd-max-bit} halfspace\emph{. }Paturi~\cite{paturi92approx} proved the incomparable lower bound $E(h,\Theta(n))\ge1/3$, where $h$ is the majority function on $n$ bits. Much later, the bound $E(h,\Theta(\sqrt{n}))\geq1-2^{-\Theta(\sqrt{n})}$ was obtained in~\cite{sherstov09hshs} for an explicit halfspace. This fragmented state of affairs persisted until the question was resolved completely in~\cite{sherstov09opthshs}, with an \emph{existence proof} of a halfspace $h$ such that $E(h,d)\ge1-2^{-\Theta(n)}$ for $d=1,2,\ldots,\Theta(n).$ This result is clearly as strong as one could hope for, since it essentially matches Muroga's upper bound for approximation by \emph{linear} polynomials\emph{.} The work in~\cite{sherstov09opthshs} further determined the minimum error, denoted $R(h,d)$, to which this $h$ can be approximated by a degree-$d$ rational function, showing that this quantity too is as large for $h$ as it can be for any halfspace. Explicitly constructing a halfspace with these properties is our main technical contribution: \begin{thm} \label{thm:MAIN-approx}There is an algorithm that takes as input an integer $n\geq1,$ runs in time polynomial in $n,$ and outputs a halfspace $h_{n}\colon\zoon\to\moo$ with \begin{align*} E(h_{n},d) & \geq1-2^{-\Omega(n)}, & & d=1,2,\ldots,\lfloor cn\rfloor,\\ R(h_{n},d) & \geq1-2^{-\Omega(n/d)}, & & d=1,2,\ldots,\lfloor cn\rfloor, \end{align*} where $c>0$ is an absolute constant. \end{thm} \noindent Classic bounds for the approximation of the sign function imply that for any $d,$ the lower bounds in Theorem~\ref{thm:MAIN-approx} are essentially the best possible for any halfspace on $n$ variables (see Sections~\ref{subsec:Polynomial-approximation} and~\ref{subsec:Rational-approximation} for details). Thus, the construction of Theorem~\ref{thm:MAIN-approx} is the ``hardest'' halfspace from the point of view of approximation by polynomials and rational functions. Theorem~\ref{thm:MAIN-approx} is not a de-randomization of the existence proof in~\cite{sherstov09opthshs}, which incidentally we are still unable to de-randomize. Rather, it is based on a new and simpler approach, presented in detail at the end of this section. Given the role that halfspaces play in theoretical computer science, we see Theorem~\ref{thm:MAIN-approx} as answering a basic question of independent interest. In addition, Theorem~\ref{thm:MAIN-approx} has applications to communication complexity and computational learning, which we now discuss. \subsection{\label{sec:disc-vs-signrank}Discrepancy vs. sign-rank} Consider the standard model of randomized communication~\cite{ccbook}, which features players Alice and Bob and a Boolean function $F\colon X\times Y\to\moo.$ On input $(x,y)\in X\times Y,$ Alice and Bob receive the arguments $x$ and $y,$ respectively. Their objective is to compute $F$ on any given input with minimal communication. To this end, each player privately holds an unlimited supply of uniformly random bits which he or she can use in deciding what message to send at any given point in the protocol. The \emph{cost} of a protocol is the total number of bits exchanged by Alice and Bob in a worst-case execution. The\emph{ $\epsilon$-error randomized communication complexity of $F$}, denoted \emph{$R_{\epsilon}(F)$,} is the least cost of a protocol that computes $F$ with probability of error at most $\epsilon$ on every input. Our interest in this paper is in communication protocols with error probability close to that of random guessing, $1/2.$ There are two standard ways to define the complexity of a function $F$ in this setting, both inspired by probabilistic polynomial time for Turing machines~\cite{gill77pp}: \[ \upp(F)=\inf_{0\leq\epsilon<1/2}R_{\epsilon}(F) \] and \[ \pp(F)=\inf_{0\leq\epsilon<1/2}\left\{ R_{\epsilon}(F)+\log_{2}\left(\frac{1}{\frac{1}{2}-\epsilon}\right)\right\} . \] The former quantity, introduced by Paturi and Simon~\cite{paturi86cc}, is called the communication complexity of $F$ with \emph{unbounded error}, in reference to the fact that the error probability can be arbitrarily close to $1/2.$ The latter quantity, proposed by Babai et al.~\cite{BFS86cc}, includes an additional penalty term that depends on the error probability. We refer to $\pp(F)$ as the communication complexity of $F$ with \emph{weakly unbounded error}. For all functions $F\colon\zoon\times\zoon\to\moo,$ one has the trivial bounds $\upp(F)\leq\pp(F)\leq n+2.$ These two complexity measures give rise to corresponding \emph{complexity classes} in communication complexity theory, defined in the seminal paper of Babai et al.~\cite{BFS86cc}. Formally, $\UPP$ is the class of families $\{F_{n}\}_{n=1}^{\infty}$ of communication problems $F_{n}\colon\zoon\times\zoon\to\moo$ whose unbounded-error communication complexity is at most polylogarithmic in $n.$ Its counterpart $\PP$ is defined analogously for the complexity measure $\pp$. These two models of large-error communication are synonymous with two central notions in communication complexity: \emph{sign-rank} and \emph{discrepancy}, defined formally in Sections~\ref{subsec:Communication-complexity} and~\ref{subsec:Discrepancy}. In more detail, Paturi and Simon~\cite{paturi86cc} proved that the communication complexity of any problem with unbounded error is characterized up to an additive constant by the sign-rank of its communication matrix, $[F(x,y)]_{x,y}.$ Analogously, Klauck~\cite{klauck01quantum,klauck01quantum-journal} showed that the communication complexity of any problem $F\colon\zoon\times\zoon\to\moo$ with weakly unbounded error is essentially characterized in terms of the discrepancy of $F$. Discrepancy and sign-rank enjoy a rich mathematical life~\cite{linial04sign,sherstov07halfspace-mat,sherstov07cc-prod-nonprod,LS08learning-cc} outside communication complexity, which further motivates the study of $\PP$ and $\UPP$ as fundamental complexity classes. Communication with weakly unbounded error is by definition no more powerful than unbounded-error communication, and for twenty years after the paper of Babai et al.~\cite{BFS86cc} it was unknown whether this containment is proper. Buhrman et al.~\cite{buhrman07pp-upp} and the author~\cite{sherstov07halfspace-mat} answered this question in the affirmative, independently and with unrelated techniques. These papers exhibited functions $F\colon\zoon\times\zoon\to\moo$ with an exponential gap between communication complexity with unbounded error versus weakly unbounded error: $\upp(F)=O(\log n)$ in both works, versus $\pp(F)=\Omega(n^{1/3})$ in \cite{buhrman07pp-upp} and $\pp(F)=\Omega(\sqrt{n})$ in~\cite{sherstov07halfspace-mat}. In complexity-theoretic notation, these results show that $\PP\subsetneq\UPP$. A simpler alternate proof of the result of Buhrman et al.~\cite{buhrman07pp-upp} was given in~\cite{sherstov07quantum} using the pattern matrix method. More recently, Thaler~\cite{thaler14omb} exhibited another, remarkably simple communication problem $F\colon\zoon\times\zoon\to\moo,$ with communication complexity $\upp(F)=O(\log n)$ and $\pp(F)=\Omega(n/\log n)^{2/5}.$ To summarize, the strongest explicit separation of communication complexity with unbounded versus weakly unbounded error prior to our work was the separation of $O(\log n)$~versus~$\Omega(\sqrt{n})$ from twelve years ago~\cite{sherstov07halfspace-mat}. The \emph{existence} of a communication problem with a quadratically larger gap, of $O(\log n)$~versus~$\Omega(n)$, follows from the work in~\cite{sherstov09opthshs}. This state of affairs parallels other instances in communication complexity, such as the $\mathsf{{P}}$ versus $\BPP$ question in multiparty communication~\cite{BDPW07p-rp}, where the best existential separations are much stronger than the best explicit ones. There is considerable interest in communication complexity in explicit separations because they provide a deeper and more complete understanding of the complexity classes, whereas the lack of a strong explicit separation indicates a basic gap in our knowledge. As an application of Theorem~\ref{thm:MAIN-approx}, we obtain: \begin{thm} \label{thm:MAIN-pp-upp}There is a communication problem $F_{n}\colon\zoon\times\zoon\to\moo,$ defined by \begin{align} F_{n}(x,y)=\sign\left(w_{0}+\sum_{i=1}^{n}w_{i}x_{i}y_{i}\right)\label{eq:main-pp-upp-form} \end{align} for some explicitly given reals $w_{0},w_{1},\dots,w_{n},$ such that \begin{align*} \upp(F_{n}) & \leq\log n+O(1),\\ \pp(F_{n}) & =\Omega(n). \end{align*} Moreover, \begin{align*} \srank(F_{n}) & \leq n+1,\\ \disc(F_{n}) & =2^{-\Omega(n)}. \end{align*} \end{thm} \noindent Theorem~\ref{thm:MAIN-pp-upp} gives essentially the strongest possible separation of the communication classes $\PP$ and $\UPP$, improving quadratically on previous constructions and matching the previous nonconstructive separation. Another compelling aspect of the theorem is the simple form~(\ref{eq:main-pp-upp-form}) of the communication problem in question. The last two bounds in Theorem~\ref{thm:MAIN-pp-upp} state that $F_{n}$ has sign-rank at most $n+1$ and discrepancy $2^{-\Omega(n)}$, which is essentially the strongest possible separation. The best previous construction~\cite{sherstov07halfspace-mat} achieved sign-rank $O(n)$ and discrepancy $2^{-\Omega(\sqrt{n})}$. We further generalize Theorem~\ref{thm:MAIN-pp-upp} to the \emph{number-on-the-forehead $k$-party model}, the standard formalism of multiparty communication. Analogous to two-party communication, the $k$-party model has its own classes $\UPP_{k}$ and $\PP_{k}$ of problems solvable efficiently by protocols with unbounded error and weakly unbounded error, respectively. Their formal definitions can be found in Section~\ref{subsec:Communication-complexity}. In this setting, we prove: \begin{thm} \label{thm:MAIN-pp-upp-multiparty}There is a $k$-party communication problem $F_{n}\colon(\zoon)^{k}\to\moo,$ defined by \[ F_{n}(x_{1},x_{2},\ldots,x_{k})=\sign\left(w_{0}+\sum_{i=1}^{n}w_{i}x_{1,i}x_{2,i}\cdots x_{k,i}\right) \] for some explicitly given reals $w_{0},w_{1},\dots,w_{n},$ such that \begin{align*} \upp(F_{n}) & \leq\log n+O(1),\\ \pp(F_{n}) & =\Omega\left(\frac{n}{4^{k}}\right),\\ \disc(F_{n}) & =\exp\left(-\Omega\left(\frac{n}{4^{k}}\right)\right). \end{align*} \end{thm} \noindent Theorem~\ref{thm:MAIN-pp-upp-multiparty} gives essentially the strongest possible explicit separation of the $k$-party communication complexity classes $\UPP_{k}$ and $\PP_{k}$ for up to $k\leq(0.5-\epsilon)\log n$ parties, where $\epsilon>0$ is an arbitrary constant. The previous best explicit separation~\cite{chattopadhyay-mande16multiparty-pp-upp,sherstov16multiparty-pp-upp} of these classes was quadratically weaker, with communication complexity $\Omega(\sqrt{n}/4^{k})$ for unbounded error and $O(\log n)$ for weakly unbounded error. The communication lower bound in Theorem~\ref{thm:MAIN-pp-upp-multiparty} reflects the state of the art in the area, in that the strongest lower bound for any explicit communication problem $F\colon(\zoon)^{k}\to\moo$ to date is $\Omega(n/2^{k})$ due to Babai et al.~\cite{bns92}. \subsection{Computational learning} A \emph{sign-representing polynomial} for a given function $f\colon\zoon\to\moo$ is any real polynomial $p$ such that $f(x)=\sign p(x)$ for all $x.$ The minimum degree of a sign-representing polynomial for $f$ is called the \emph{threshold degree} of $f,$ denoted $\degthr(f).$ Clearly $0\leq\degthr(f)\leq n$ for every Boolean function $f$ on $n$ variables. The reader can further verify that sign-representation is equivalent to pointwise approximation with error strictly less than, but arbitrarily close to, the trivial error of~$1$. Sign-representing polynomials are appealing from a learning standpoint because they immediately lead to efficient learning algorithms. Indeed, any function of threshold degree $d$ is by definition a linear combination of $N={n \choose 0}+{n \choose 1}+\cdots+{n \choose d}$ monomials and can thus be viewed as a halfspace in $N$ dimensions. As a result, $f$ can be PAC learned~\cite{valiant84pac} under arbitrary distributions in time polynomial in $N,$ using a variety of halfspace learning algorithms. The study of sign-representing polynomials started fifty years ago with the seminal monograph of Minsky and Papert~\cite{minsky88perceptrons}, who examined the threshold degree of several common functions. Since then, the threshold degree approach has yielded the fastest known PAC learning algorithms for notoriously hard concept classes, including DNF formulas~\cite{KS01dnf} and AND-OR trees~\cite{ACRSZ07nand}. Conspicuously absent from this list of success stories is the concept class of \emph{intersections of halfspaces}. While solutions are known to several restrictions of this learning problem~\cite{blum-kannan97intersection-of-halfspaces,KwekPitt:98,Vempala:97,arriaga98proj,KOS:02,KlivansServedio:04coltmargin,KLT09intersections-of-halfspaces}, no algorithm has been discovered for PAC learning the intersection of even two halfspaces in time faster than $2^{\Theta(n)}.$ Known hardness results, on the other hand, only apply to polynomially many halfspaces or to proper learning, e.g.,~\cite{blum92trainingNN,ABFKP:04,focs06hardness,khot-saket08hs-and-hs}. This state of affairs has motivated a quest to determine the threshold degree of the intersection of two halfspaces~\cite{minsky88perceptrons,odonnell03degree,klivans-thesis,sherstov09hshs,sherstov09opthshs}. Prior to our work, the best lower bound was $\Omega(\sqrt{n})$ for an explicit intersection of two halfspaces~\cite{sherstov09hshs}, complemented by a tight but highly nonconstructive $\Omega(n)$ lower bound~\cite{sherstov09opthshs}. Using Theorem~\ref{thm:MAIN-approx}, we prove: \begin{thm} \label{thm:MAIN-hshs} There is an $($explicitly given$)$ halfspace $h_{n}\colon\zoon\to\moo$ such that \[ \degthr(h_{n}\wedge h_{n})=\Omega(n). \] \end{thm} \noindent The symbol $h_{n}\wedge h_{n}$ above stands for the intersection of two copies of $h_{n}$ on disjoint sets of variables. In other words, Theorem~\ref{thm:MAIN-hshs} constructs an explicit intersection of two halfspaces whose threshold degree is asymptotically maximal, $\Omega(n).$ While the nonconstructive $\Omega(n)$ lower bound of~\cite{sherstov09opthshs} already ruled out the threshold degree approach as a way to learn intersections of halfspaces, we see Theorem~\ref{thm:MAIN-hshs} as contributing a key qualitative piece of the puzzle. Specifically, it constructs a small and simple family of intersections of two halfspaces that are off-limits to all known algorithmic approaches (namely, the family obtained by applying $h_{n}\wedge h_{n}$ to different subsets of the variables $x_{1},x_{2},\ldots,x_{4n}$). \subsection{\label{subsec:Proof-overview}Proof overview} Our solution has two main components: the construction of a sparse set of integers that appear random modulo $m,$ and the univariatization of a multivariate Boolean function. We describe each of these components in detail. \subsubsection*{Discrepancy of integer sets.} Let $m\geq2$ be a given integer. Key to our work is the notion of \emph{$m$-discrepancy}, which quantifies the pseudorandomness or aperiodicity modulo $m$ of any given multiset of integers. It is largely unrelated to the notion of discrepancy in communication complexity (Section~\ref{sec:disc-vs-signrank}). Formally, the $m$-discrepancy of a nonempty multiset $Z=\{z_{1},z_{2},\ldots,z_{n}\}$ is defined as \[ \disc(Z,m)=\max_{k=1,2,\ldots,m-1}\left|\frac{1}{n}\sum_{j=1}^{n}\omega^{kz_{j}}\right|, \] where $\omega$ is a primitive $m$-th root of unity. This fundamental quantity arises in combinatorics and theoretical computer science, e.g.,~\cite{gks86k-page-graphs-and-nondeterministic-TMs,ruzsa87essential-components,AIKPS90aperiodic-set,katz89character-sums,rsw93sets-uniform-in-arithmetic-progressions,alon-roichman94rando-cayley-graphs-and-expanders}. The identity $1+\omega+\omega^{2}+\cdots+\omega^{m-1}=0$ for any $m$-th root of unity $\omega\ne1$ implies that the set $Z=\{0,1,2,\ldots,m-1\}$ achieves the smallest possible $m$-discrepancy: $\disc(Z,m)=0.$ Much sparser sets with small $m$-discrepancy can be shown to exist using the probabilistic method (Fact~\ref{fact:small-fourier-set-existence} and Corollary~\ref{cor:small-fourier-set-existence}). Specifically, one easily verifies for any constant $\epsilon>0$ the existence of a set $Z\subseteq\{0,1,2,\ldots,m-1\}$ with $m$-discrepancy at most $\epsilon$ and cardinality $O(\log m),$ an exponential improvement in sparsity compared to the trivial set $\{0,1,2,\ldots,m-1\}.$ We are aware of two efficient constructions of sparse sets with small $m$-discrepancy, due to Ajtai et al.~\cite{AIKPS90aperiodic-set} and Katz~\cite{katz89character-sums}. The approach of Ajtai et al.~is elementary except for an appeal to the prime number theorem, whereas Katz's construction relies on deep results in number theory. Neither work appears to directly imply the kind of optimal de-randomization that we require, namely, an algorithm that runs in time polynomial in $\log m$ and produces a multiset of cardinality $O(\log m)$ with $m$-discrepancy bounded away from~1. We obtain such an algorithm by adapting the approach of Ajtai et al.~\cite{AIKPS90aperiodic-set}. The centerpiece of the construction of Ajtai et al.~\cite{AIKPS90aperiodic-set} is what the authors call the \emph{iteration lemma}, stated in this paper as Theorem~\ref{thm:ajtai-iteration}. Its role is to reduce the construction of a sparse set with small $m$-discrepancy to the construction of sparse sets with small $p$-discrepancy, for primes $p\ll m.$ Ajtai et al.~\cite{AIKPS90aperiodic-set} proved their iteration lemma for $m$ prime, but we show that their argument readily generalizes to arbitrary moduli $m$. By applying the iteration lemma in a recursive manner, one reaches smaller and smaller primes. The authors of~\cite{AIKPS90aperiodic-set}~continue this recursive process until they reach primes $p$ so small that the trivial construction $\{0,1,2,\ldots,p-1\}$ can be considered sparse. We proceed differently and terminate the recursion after just two stages, at which point the input size is small enough for brute force search based on the probabilistic method. The final set that we construct has size logarithmic in $m$ and $m$-discrepancy a small constant, as opposed to the superlogarithmic size and $o(1)$ discrepancy in the work of Ajtai et al.~\cite{AIKPS90aperiodic-set}. We note that this modified approach additionally gives the first explicit circulant expander on $n$ vertices of degree $O(\log n),$ which is optimal and improves on the previous best degree bound of $(\log^{*}n)^{O(\log^{*}n)}\cdot O(\log n)$ due to Ajtai et al.~\cite{AIKPS90aperiodic-set}. Background on circulant expanders, and the details of our expander construction, can be found in Section~\ref{subsec:A-circulant-expander}. \subsubsection*{Univariatization.} We now describe the second major component of our proof. Consider a halfspace $h_{n}(x)=\sign(\sum z_{i}x_{i}-\theta)$ in Boolean variables $x_{1},x_{2},\ldots,x_{n},$ where the coefficients can be assumed without loss of generality to be integers. Then the linear form $\sum z_{i}x_{i}-\theta$ ranges in the discrete set $\{\pm1,\pm2,\ldots,\pm N\}$, for some integer $N$ proportionate to the magnitude of the coefficients. As a result, one can approximate $h_{n}$ to any given error $\epsilon$ by approximating the sign function to $\epsilon$ on $\{\pm1,\pm2,\ldots,\pm N\}.$ This approach works for both rational approximation and polynomial approximation. We think of it as the \emph{black-box} approach to the approximation of $h_{n}$ because it uses the linear form $\sum z_{i}x_{i}-\theta$ rather than the individual bits. There is no reason to expect that the black-box construction is anywhere close to optimal. Indeed, there are halfspaces~\cite[Section~1.3]{sherstov09hshs} that can be approximated to arbitrarily small error by a rational function of degree~$1$ but require a black-box approximant of degree $\Omega(n)$. Surprisingly, we are able to construct a halfspace $h_{n}$ with exponentially large coefficients for which the black-box approximant is essentially optimal. As a result, tight lower bounds for the rational and polynomial approximation of $h_{n}$ follow immediately from the univariate lower bounds for approximating the sign function on $\{\pm1,\pm2,\pm3,\ldots,\pm2^{\Theta(n)}\}$. The role of $h_{n}$ is to reduce the multivariate problem taken up in this work to a well-understood univariate question, hence the term \emph{univariatization}. The construction of $h_{n}$ involves several steps. First, we study the probability distribution of the weighted sum $z_{1}X_{1}+z_{2}X_{2}+\cdots+z_{n}X_{n}$ modulo $m$, where $z_{1},z_{2},\ldots,z_{n}$ are given integers and the bits $X_{1},X_{2},\ldots,X_{n}\in\zoo$ are chosen uniformly at random. We show that the distribution is exponentially close to uniform whenever the multiset $\{z_{1},z_{2},\ldots,z_{n}\}$ has $m$-discrepancy bounded away from~$1$. For the next step, fix any multiset $\{z_{1},z_{2},\ldots,z_{n}\}$ with small $m$-discrepancy and consider the linear map $L\colon\zoon\to\ZZ_{m}$ given by $L(x)=\sum z_{i}x_{i}.$ At this point in the proof, we know that for uniformly random $X\in\zoon$, the probability distribution of $L(X)$ is exponentially close to uniform. This implies that the characteristic functions of $L^{-1}(0),L^{-1}(1),\ldots,L^{-1}(m-1)$ have approximately the same Fourier spectrum up to degree $cn$, for some constant $c>0$. We substantially strengthen this conclusion by proving that there are probability distributions $\mu_{0},\mu_{1},\ldots,\mu_{m-1}$, supported on $L^{-1}(0),L^{-1}(1),\ldots,L^{-1}(m-1)$, respectively, such that the Fourier spectra of $\mu_{0},\mu_{1},\ldots,\mu_{m-1}$ are \emph{exactly} the same up to degree $cn.$ Our proof relies on a general tool from~\cite[Theorem~4.1]{sherstov09opthshs}, proved there using the Gershgorin circle theorem. As our final step, we use $\mu_{0},\mu_{1},\ldots,\mu_{m-1}$ to construct a halfspace in terms of $z_{1},z_{2},\ldots,z_{n}$ whose approximation by rational functions and polynomials gives corresponding approximants for the sign function on the discrete set $\{\pm1,\pm2,\ldots,\pm m\}$. More generally, for any tuple $z_{1},z_{2},\ldots,z_{n}$, we define an associated halfspace and prove a lower bound on $m$ in terms of the discrepancy of the multiset $\{z_{1},z_{2},\ldots,z_{n}\}.$ Combining this result with the efficient construction of an integer set with small $m$-discrepancy for $m=2^{\Theta(n)}$, we obtain an explicit halfspace $h_{n}\colon\zoon\to\moo$ whose approximation by polynomials and rational functions is equivalent to the univariate approximation of the sign function on $\{\pm1,\pm2,\pm3,\ldots,\pm2^{\Theta(n)}\}$. Theorem~\ref{thm:MAIN-approx} now follows by appealing to known lower bounds for the polynomial and rational approximation of the sign function. To obtain the exponential separation of communication complexity with unbounded versus weakly unbounded error (Theorem~\ref{thm:MAIN-pp-upp}), we use the \emph{pattern matrix method}~\cite{sherstov07ac-majmaj,sherstov07quantum} to ``lift'' the lower bound of Theorem~\ref{thm:MAIN-approx} to a discrepancy bound. Finally, our result on the threshold degree of the intersection of two halfspaces (Theorem~\ref{thm:MAIN-hshs}) works by combining the rational approximation lower bound of Theorem~\ref{thm:MAIN-approx} with a structural result from~\cite{sherstov09hshs} on the sign-representation of arbitrary functions of the form $f\wedge f.$ A key technical contribution of this paper is the identification of $m$-discrepancy as a pseudorandom property that is weak enough to admit efficient de-randomization and strong enough to allow the univariatization of the corresponding halfspace. The previous, existential result in~\cite{sherstov09opthshs} used a completely different and more complicated pseudorandom property based on affine shifts of the Fourier transform on $\zoon,$ which we have not been able to de-randomize. Apart from the construction of a low-discrepancy set, our proof is simpler and more intuitive than the existential proof in~\cite{sherstov09opthshs}. \section{\label{sec:prelim}Preliminaries} We start with a review of the technical preliminaries. The purpose of this section is to make the paper as self-contained as possible, and comfortably readable by a broad audience. The expert reader should therefore skim this section for notation or skip it altogether. \subsection{Notation} There are two common arithmetic encodings for the Boolean values: the traditional encoding $\operatorname{\it false}\leftrightarrow0,\;\operatorname{\it true}\leftrightarrow1,$ and the Fourier-motivated encoding $\operatorname{\it false}\leftrightarrow1,\;\operatorname{\it true}\leftrightarrow-1.$ Throughout this manuscript, we use the former encoding for the domain of a Boolean function and the latter for the range. With this convention, Boolean functions are mappings $\zoon\to\moo$ for some $n.$ For Boolean functions $f\colon\zoon\to\moo$ and $g\colon\zoom\to\moo,$ we let $f\circ g$ denote the coordinatewise composition of $f$ with $g.$ Formally, $f\circ g\colon(\zoom)^{n}\to\moo$ is given by \begin{align} (f\circ g)(x_{1},x_{2},\dots,x_{n})=f\left(\frac{1-g(x_{1})}{2},\frac{1-g(x_{2})}{2},\ldots,\frac{1-g(x_{n})}{2}\right),\label{eq:coordinatewise-composition} \end{align} where the linear map on the right-hand side serves the purpose of switching between the distinct arithmetizations for the domain versus~range. A \emph{partial function} $f$ on a set $X$ is a function whose domain of definition, denoted $\dom f,$ is a nonempty proper subset of $X.$ We generalize coordinatewise composition $f\circ g$ to partial Boolean functions $f$ and $g$ in the natural way. Specifically, $f\circ g$ is the Boolean function given by (\ref{eq:coordinatewise-composition}), with domain the set of all inputs $(\ldots,x_{i},\dots)\in(\dom g)^{n}$ for which $(\ldots,(1-g(x_{i}))/2,\dots)\in\dom f.$ We use the following two versions of the sign function: \begin{align*} \sign x=\begin{cases} -1 & \text{if }x<0,\\ 0 & \text{if }x=0,\\ 1 & \text{if }x>0, \end{cases}\qquad\qquad\qquad & \Sgn x=\begin{cases} -1 & \text{if }x<0,\\ 1 & \text{if }x\geq0. \end{cases} \end{align*} For a subset $\Xcal\subseteq\Re,$ we let $\sign|_{\Xcal}$ denote the restriction of the sign function to $\Xcal.$ A \emph{halfspace }for us is any Boolean function $h\colon\zoon\to\moo$ given by \[ h(x)=\sign\left(\sum_{i=1}^{n}w_{i}x_{i}-\theta\right) \] for some reals $w_{1},w_{2},\ldots,w_{n},\theta.$ The \emph{majority function} $\MAJ_{n}\colon\zoon\to\moo$ is the halfspace defined by \begin{align*} \MAJ_{n}(x) & =-\sign\left(\sum_{i=1}^{n}x_{i}-\frac{n}{2}-\frac{1}{4}\right)\\ & =\begin{cases} -1 & \text{if }x_{1}+x_{2}+\cdots+x_{n}>n/2,\\ 1 & \text{otherwise}. \end{cases} \end{align*} Some authors define $\MAJ_{n}$ only for $n$ odd, in which case the tiebreaker term $1/4$ can be omitted. The complement and the power set of a set $S$ are denoted as usual by $\overline{S}$ and $\Pcal(S)$, respectively. The symmetric difference of sets $S$ and $T$ is $S\oplus T=(S\cap\overline{T})\cup(\overline{S}\cap T).$ \begin{comment} For elements $x,y$ of a given set, we use the Kronecker delta \begin{align*} \delta_{x,y}=\begin{cases} 1 & \text{if \ensuremath{x=y,}}\\ 0 & \text{otherwise.} \end{cases} \end{align*} \end{comment} Throughout this manuscript, we use brace notation as in $\{z_{1},z_{2},\ldots,z_{n}\}$ to specify \emph{multisets} rather than sets. The \emph{cardinality} $|Z|$ of a finite multiset $Z$ is defined as the total number of element occurrences in $Z$, with each element counted as many times as it occurs. The equality and subset relations on multisets are defined analogously, with the number of element occurrences taken into account. For example, $\{1,1,2\}=\{1,2,1\}$ but $\{1,1,2\}\ne\{1,2\}$. Similarly, $\{1,2\}\subseteq\{1,1,2\}$ but $\{1,1,2\}\nsubseteq\{1,2\}.$ The infinity norm of a function $f\colon\Xcal\to\Re$ is denoted $\|f\|_{\infty}=\sup_{x\in\Xcal}|f(x)|.$ For real-valued functions $f$ and $g$ and a nonempty finite subset $\Xcal$ of their domain, we write \[ \langle f,g\rangle_{\Xcal}=\frac{1}{|\Xcal|}\sum_{x\in\Xcal}f(x)g(x). \] We will often use this notation with $\Xcal$ a nonempty \emph{proper} subset of the domain of $f$ and $g.$ We let $\ln x$ and $\log x$ stand for the natural logarithm of $x$ and the logarithm of $x$ to base $2,$ respectively. The binary entropy function $H\colon[0,1]\to[0,1]$ is given by $H(p)=-p\log p-(1-p)\log(1-p)$ and is strictly increasing on $[0,1/2].$ The following bound is well known~\cite[p.~283]{jukna01extremal}: \begin{align} \sum_{i=0}^{k}{n \choose i}\leq2^{H(k/n)n}, & & k=0,1,2,\dots,\left\lfloor \frac{n}{2}\right\rfloor .\label{eqn:entropy-bound} \end{align} For a complex number $x,$ we denote the real part, imaginary part, and complex conjugate of $x$ as usual by $\realpart(x),$ $\imagpart(x),$ and $\overline{x},$ respectively. We typeset the imaginary unit $\mathbf{i}$ in boldface to distinguish it from the index variable $i$. For an arbitrary integer $a$ and a positive integer $m$, recall that $a\bmod m$ denotes the unique element of $\{0,1,2,\ldots,m-1\}$ that is congruent to $a$ modulo $m.$ For an integer $m\geq2,$ the symbols $\mathbb{Z}_{m}$ and $\mathbb{Z}_{m}^{*}$ refer to the ring of integers modulo $m$ and the multiplicative group of integers modulo $m,$ respectively. For a multiset $Z=\{z_{1},z_{2},\ldots,z_{n}\}$ of integers, we adopt the standard notation \begin{align} -Z & =\{-z_{1},\ldots,-z_{n}\},\label{eq:multi1}\\ aZ & =\{az_{1},\ldots,az_{n}\},\\ Z+b & =\{z_{1}+b,\ldots,z_{n}+b\},\\ Z\bmod m & =\{z_{1}\bmod m,\ldots,z_{n}\bmod m\}.\label{eq:multi4} \end{align} Note that the multisets in (\ref{eq:multi1})\textendash (\ref{eq:multi4}) each have cardinality $n,$ the same as the original set $Z$. We often use these shorthands in combination, as in $\text{\ensuremath{(aZ+b)\bmod m}}=\{(az_{1}+b)\bmod m,\ldots,(az_{n}+b)\bmod m\}.$ For a logical condition $C,$ we use the Iverson bracket \[ \I[C]=\begin{cases} 1 & \text{if \ensuremath{C} holds,}\\ 0 & \text{otherwise.} \end{cases} \] The following concentration inequality, due to Hoeffding~\cite{hoeffding-bound}, is well-known. \begin{fact}[Hoeffding's Inequality] \label{fact:hoeffding}Let $X_{1},X_{2},\ldots,X_{n}$ be independent random variables with $X_{i}\in[a_{i},b_{i}].$ Let \[ p=\sum_{i=1}^{n}\Exp X_{i}. \] Then \[ \Prob\left[\left|\sum_{i=1}^{n}X_{i}-p\right|\geq\delta\right]\leq2\exp\left(-\frac{2\delta^{2}}{\sum_{i=1}^{n}(b_{i}-a_{i})^{2}}\right). \] \end{fact} \noindent In Fact~\ref{fact:hoeffding} and throughout this paper, we typeset random variables using capital letters. % \begin{comment} Wikipedia article: https://en.wikipedia.org/wiki/Hoeffding\%27s\_inequality\#General\_case \end{comment} \begin{comment} \subsection{Fourier transform} Consider the vector space of functions $\zoon\to\Re,$ equipped with the inner product \begin{align*} \langle f,g\rangle=2^{-n}\sum_{x\in\zoon}f(x)g(x). \end{align*} For $S\subseteq\oneton,$ define $\chi_{S}\colon\zoon\to\moo$ by $\chi_{S}(x)=(-1)^{\sum_{i\in S}x_{i}}.$ Then $\{\chi_{S}\}_{S\subseteq\oneton}$ is an orthonormal basis for the inner product space in question. As a result, every function $f\colon\zoon\to\Re$ has a unique representation of the form \begin{align*} f=\sum_{S\subseteq\oneton}\hat{f}(S)\chi_{S}, \end{align*} where $\hat{f}(S)=\langle f,\chi_{S}\rangle$. The reals $\hat{f}(S)$ are called the \emph{Fourier coefficients of $f.$} The orthonormality of $\{\chi_{S}\}$ immediately yields \emph{Parseval's identity}: \begin{align} \sum_{S\subseteq\oneton}\hat{f}(S)^{2}=\langle f,f\rangle=\Exp_{x\in\zoon}[f(x)^{2}].\label{eqn:parsevals} \end{align} \end{comment} \subsection{\label{subsec:Number-theoretic-preliminaries}Number-theoretic preliminaries} For positive integers $a$ and $b$ that are relatively prime, $(a^{-1})_{b}\in\{1,2,\ldots,b-1\}$ denotes the multiplicative inverse of $a$ modulo $b.$ The following fact is well-known and straightforward to verify;~cf.~\cite{AIKPS90aperiodic-set}. \begin{fact} \label{fact:rel-prime}For any positive integers $a$ and $b$ that are relatively prime, \begin{equation} \frac{(a^{-1})_{b}}{b}+\frac{(b^{-1})_{a}}{a}-\frac{1}{ab}\in\mathbb{Z}.\label{eq:rel-prime} \end{equation} \end{fact} \begin{proof} We have $a(a^{-1})_{b}+b(b^{-1})_{a}\equiv b(b^{-1})_{a}\equiv1\pmod a,$ and analogously $a(a^{-1})_{b}+b(b^{-1})_{a}\equiv a(a^{-1})_{b}\equiv1\pmod b.$ Thus, $a(a^{-1})_{b}+b(b^{-1})_{a}-1$ is divisible by both $a$ and $b.$ Since $a$ and $b$ are relatively prime, we conclude that $a(a^{-1})_{b}+b(b^{-1})_{a}-1$ is divisible by $ab,$ which is equivalent to~(\ref{eq:rel-prime}). \end{proof} Recall that the \emph{prime counting function} $\pi(x)$ for a real argument $x\geq0$ evaluates to the number of prime numbers less than or equal to $x.$ In what follows, it will be clear from the context whether $\pi$ refers to $3.14159\ldots$ or the prime counting function. The asymptotic growth of the latter is given by the \emph{prime number theorem}, which states that $\pi(n)\sim n/\ln n.$ Many explicit bounds on $\pi(n)$ are known, such as the following theorem of Rosser~\cite{rosser41primes}. \begin{fact}[Rosser] \label{fact:PNT}For $n\geq55,$ \[ \frac{n}{\ln n+2}<\pi(n)<\frac{n}{\ln n-4}. \] \end{fact} \noindent \noindent The number of distinct prime divisors of a natural number $n$ is denoted $\nu(n)$. We will need the following first-principles bound on $\nu(n)$, which is asymptotically tight for infinitely many $n.$ \begin{fact} \label{fact:num-prime-factors}The number of distinct prime divisors of $n$ obeys \begin{equation} (\nu(n)+1)!\leq n.\label{eq:nu-n-upper-bound} \end{equation} In particular, \begin{equation} \nu(n)\leq(1+o(1))\frac{\ln n}{\ln\ln n}.\label{eq:nu-n-asymptotic-bound} \end{equation} \end{fact} \begin{proof} An integer $n\geq1$ has by definition $\nu(n)$ distinct prime divisors. Letting $p_{k}$ denote the $k$-th prime, we have \begin{align*} \ln n & \geq\ln p_{1}p_{2}\ldots p_{\nu(n)}\\ & \geq\sum_{k=1}^{\nu(n)}\ln(k+1)\\ & \geq\int_{1}^{\nu(n)}\ln x\;dx\\ & =\nu(n)\ln\nu(n)-\nu(n)+1, \end{align*} where the second step uses the trivial estimate $p_{k}\geq k+1.$ The second step in this derivation settles~(\ref{eq:nu-n-upper-bound}), whereas the last step settles~(\ref{eq:nu-n-asymptotic-bound}). \end{proof} \noindent \subsection{Matrix analysis} For an arbitrary set $X$ such as $X=\mathbb{C}$ or $X=\{-1,1\},$ the symbol $X^{n\times m}$ denotes the family of $n\times m$ matrices with entries in $X$. The symbols $I_{n}$ and $J_{n,m}$ stand for the order-$n$ identity matrix and the $n\times m$ matrix of all ones, respectively. When the dimensions of the matrix are clear from the context, we omit the subscripts and write simply $I$ or $J.$ The shorthand $\diag(d_{1},d_{2},\ldots,d_{n})$ refers to the diagonal matrix with entries $d_{1},d_{2},\ldots,d_{n}$ on the diagonal: \[ \diag(d_{1},d_{2},\ldots,d_{n})=\begin{bmatrix}d_{1} & 0 & \cdots & 0\\ 0 & d_{2} & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & d_{n} \end{bmatrix}. \] For a matrix $M=[M_{i,j}],$ recall that its complex conjugate is given by $\overline{M}=[\overline{M_{i,j}}]$. The transpose and conjugate transpose of $M$ are denoted $M^{T}$ and $M^{*}=\overline{M}{}^{T},$ respectively. The conjugation, transpose, and conjugate transpose operations apply as a special case to vectors, which we view as matrices with a single column. We use the familiar matrix norms $\|M\|_{\infty}=\max|M_{ij}|$ and $\|M\|_{1}=\sum|M_{ij}|.$ Again, these definitions carry over to vectors as a special case. A matrix $M\in\mathbb{C}^{n\times n}$ is called \emph{unitary} if $MM^{*}=M^{*}M=I.$ A \emph{circulant matrix} is any matrix $C\in\CC^{m\times m}$ of the form \begin{align} C & =\begin{bmatrix}c_{0} & c_{1} & c_{2} & \cdots & c_{m-2} & c_{m-1}\\ c_{m-1} & c_{0} & c_{1} & \cdots & c_{m-3} & c_{m-2}\\ c_{m-2} & c_{m-1} & c_{0} & \cdots & c_{m-4} & c_{m-3}\\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\ c_{2} & c_{3} & c_{4} & \cdots & c_{0} & c_{1}\\ c_{1} & c_{2} & c_{3} & \cdots & c_{m-1} & c_{0} \end{bmatrix}\label{eq:circulant} \end{align} for some $c_{0},c_{1},\ldots,c_{m-1}\in\CC.$ Thus, every row of $C$ is obtained by a circular shift of the previous row one entry to the right. We let $\circulant(c_{0},c_{1},\ldots,c_{m-1})$ denote the right-hand side of~(\ref{eq:circulant}). In this notation, $\circulant(1,0,\ldots,0)=I$ and $\circulant(1,1,\ldots,1)=J.$ The eigenvalues and eigenvectors of a circulant matrix are well-known and straightforward to determine. For the reader's convenience, we include the short derivation below in Fact~\ref{fact:circulant-eigen} and Corollary~\ref{cor:circulant-diagonalization}. \begin{fact} \label{fact:circulant-eigen}Let $C=\circulant(c_{0},c_{1},\ldots,c_{m-1})$ be a circulant matrix. Then for every $m$-th root of unity $\omega,$ the vector \begin{equation} \begin{bmatrix}1\\ \omega\\ \omega^{2}\\ \vdots\\ \omega^{m-1} \end{bmatrix}\label{eq:eigenvector} \end{equation} is an eigenvector of $C$ with eigenvalue $\sum_{j=0}^{m-1}c_{j}\omega^{j}.$ \end{fact} \begin{proof} Let $v$ denote the vector in~(\ref{eq:eigenvector}). Then for $k=1,2,3,\ldots,m,$ \begin{align*} (Cv)_{k} & =\sum_{j=0}^{m-1}c_{(j-k+1)\bmod m}\;\omega^{j}\\ & =\left(\sum_{j=0}^{m-1}c_{(j-k+1)\bmod m}\;\omega^{j-k+1}\right)v_{k}\\ & =\left(\sum_{j=0}^{m-1}c_{(j-k+1)\bmod m}\;\omega^{(j-k+1)\bmod m}\right)v_{k}\\ & =\left(\sum_{j=0}^{m-1}c_{j}\omega^{j}\right)v_{k}, \end{align*} where the third step uses $\omega^{m}=1.$ \end{proof} \noindent As a corollary to Fact~\ref{fact:circulant-eigen}, one recovers the full complement of eigenvalues for any circulant matrix $C$ and furthermore learns that $C$ is unitarily similar to a diagonal matrix. In the statement below, recall that a \emph{primitive $m$-th root of unity} is any generator, such as $\exp(2\pi\mathbf{i}/m),$ for the multiplicative group of the roots of $x^{m}-1\in\mathbb{Q}[x]$. \begin{cor} \label{cor:circulant-diagonalization}Let $C=\circulant(c_{0},c_{1},\ldots,c_{m-1})$ be a circulant matrix. Let $\omega$ be a primitive $m$-th root of unity. Then the matrix \[ W=[\omega^{jk}/\sqrt{m}]_{j,k=0,1,\ldots,m-1} \] is unitary and satisfies \begin{equation} W^{*}CW=\diag\left(\sum_{j=0}^{m-1}c_{j},\sum_{j=0}^{m-1}c_{j}\omega^{j},\sum_{j=0}^{m-1}c_{j}\omega^{2j},\ldots,\sum_{j=0}^{m-1}c_{j}\omega^{(m-1)j}\right).\label{eq:C-unitarily-diagonalizable} \end{equation} In particular, the eigenvalues of $C,$ counting multiplicities, are \[ \sum_{j=0}^{m-1}c_{j}\omega^{kj},\qquad\qquad k=0,1,2,\ldots,m-1. \] \end{cor} \begin{proof} For $k,k'=0,1,\ldots,m-1$, we have \begin{align*} \sum_{j=0}^{m-1}\frac{\omega^{jk}}{\sqrt{m}}\cdot\frac{\overline{\omega^{jk'}}}{\sqrt{m}} & =\frac{1}{m}\sum_{j=0}^{m-1}\omega^{j(k-k')}\\ & =\begin{cases} 1 & \text{if \ensuremath{k=k',}}\\ 0 & \text{otherwise,} \end{cases} \end{align*} where the second step is valid because $\omega$ is primitive and in particular $\omega^{k}\ne\omega^{k'}$. We conclude that \begin{equation} WW^{*}=W^{*}W=I.\label{eq:W-unitary} \end{equation} Fact~\ref{fact:circulant-eigen} implies that \[ CW=W\diag\left(\sum_{j=0}^{m-1}c_{j},\sum_{j=0}^{m-1}c_{j}\omega^{j},\sum_{j=0}^{m-1}c_{j}\omega^{2j},\ldots,\sum_{j=0}^{m-1}c_{j}\omega^{(m-1)j}\right), \] which in light of~(\ref{eq:W-unitary}) is equivalent to~(\ref{eq:C-unitarily-diagonalizable}). \end{proof} \subsection{Polynomial approximation} Recall that the \emph{total degree} of a multivariate real polynomial $p\colon\Re^{n}\to\Re$, denoted $\deg p,$ is the largest degree of any monomial of $p.$ We use the terms ``degree'' and ``total degree'' interchangeably in this paper. Let $f\colon\Xcal\to\Re$ be a given function with domain $\Xcal\subseteq\Re^{n}.$ For any $d\geq0,$ define \[ E(f,d)=\inf_{p}\|f-p\|_{\infty}, \] where the infimum is over real polynomials $p$ of degree at most $d.$ In words, $E(f,d)$ is the least error in a pointwise approximation of $f$ by a polynomial of degree no greater than $d.$ The \emph{$\epsilon$-approximate degree of $f$} is the minimum degree of a polynomial $p$ that approximates $f$ pointwise within $\epsilon$: \[ \|f-p\|_{\infty}\leq\epsilon. \] In this overview, we focus on the polynomial approximation of the sign function. We start with an elementary construction of an approximant due to Buhrman et al.~\cite{BNRW05robust}. \begin{fact}[Buhrman et al.] \label{fact:polynomial-approx-SGN-upper}For any $N>1$ and $0<\epsilon<1,$ the sign function can be approximated on $[-N,-1]\cup[1,N]$ pointwise to within $\epsilon$ by a polynomial of degree \[ O\left(N^{2}\log\frac{2}{\epsilon}\right). \] \end{fact} \noindent The degree upper bound in Fact~\ref{fact:polynomial-approx-SGN-upper} is not tight. Indeed, a quadratically stronger bound of $O(N\log(2/\epsilon))$ follows in a straightforward manner from Jackson's theorem in approximation theory~\cite[Theorem~1.4]{rivlin-book}. Our applications do not benefit from this improvement, however, and we opt for the construction of Buhrman et al.~~\cite{BNRW05robust} because of its striking simplicity. For the reader's convenience, we provide their short proof below. \begin{proof}[Proof \emph{(adapted from Buhrman et al.)}] For a positive integer $d,$ consider the degree-$d$ univariate polynomial \begin{align*} B_{d}(t)=\sum_{i=\lceil d/2\rceil}^{d}{d \choose i}t^{i}(1-t)^{d-i}. \end{align*} In words, $B_{d}(t)$ is the probability of observing at least as many heads as tails in a sequence of $d$ independent coin flips, each coming up heads with probability $t.$ By Hoeffding's inequality (Fact~\ref{fact:hoeffding}) for sufficiently large $d=O(N^{2}\log(2/\epsilon)),$ the polynomial $B_{d}$ sends $[0,\frac{1}{2}-\frac{1}{2N}]\to[0,\frac{\epsilon}{2}]$ and similarly $[\frac{1}{2}+\frac{1}{2N},1]\to[1-\frac{\epsilon}{2},1].$ As a result, the shifted and scaled polynomial $2B_{d}\left(\frac{1}{2N}\cdot t+\frac{1}{2}\right)-1$ approximates the sign function pointwise on $[-N,-1]\cup[1,N]$ within $\epsilon.$ \end{proof} On the lower bounds side, Paturi proved that low-degree polynomials cannot approximate the majority function well. He in fact obtained analogous results for all symmetric functions, but the special case of majority will be sufficient for our purposes. \begin{thm}[Paturi] \label{thm:paturi-maj}For some constant $c>0$ and all integers $n\geq1,$ \[ E(\MAJ_{n},cn)\geq\frac{1}{3}. \] \end{thm} \noindent The constant $1/3$ in Paturi's theorem can be replaced by any other in $(0,1).$ His result is of interest to us because along with Fact~\ref{fact:polynomial-approx-SGN-upper}, it implies a lower bound for the approximation of the sign function on the discrete set of points $\{\pm1,\pm2,\dots,\pm N\}$ for any $N.$ \begin{prop} \label{prop:polynomial-approx-SGN-lower}For all positive integers $N$ and $d,$ \[ E(\sign|_{\{\pm1,\pm2,\ldots,\pm N\}},d)\geq1-O\left(\frac{d}{N}\right)^{1/2}. \] \end{prop} \begin{proof} Abbreviate $\epsilon=E(\sign|_{\{\pm1,\pm2,\ldots,\pm N\}},d)$ and fix a polynomial $p$ of degree at most $d$ that approximates the sign function on $\{\pm1,\pm2,\ldots,\pm N\}$ within $\epsilon$. Fact~\ref{fact:polynomial-approx-SGN-upper} gives a polynomial $s$ of degree $O(1/(1-\epsilon)^{2})$ that sends $[-1-\epsilon,-1+\epsilon]\to[-4/3,-2/3]$ and $[1-\epsilon,1+\epsilon]\to[2/3,4/3].$ Then the composition of these two approximants obeys \[ \max_{t=\pm1,\pm2,\ldots,\pm N}|\sign(t)-s(p(t))|\leq\frac{1}{3}. \] This in turn gives an approximant for the majority function on $n=\lfloor(N-1)/2\rfloor$ bits: \begin{align*} & \max_{x\in\zoon}\left|\MAJ_{n}(x)-s\left(p\left(2\sum_{j=1}^{n}(-1)^{x_{j}}+1\right)\right)\right|\\ & \qquad=\max_{x\in\zoon}\left|\sign\left(2\sum_{j=1}^{n}(-1)^{x_{j}}+1\right)-s\left(p\left(2\sum_{j=1}^{n}(-1)^{x_{j}}+1\right)\right)\right|\\ & \qquad\leq\max_{t=\pm1,\pm2,\ldots,\pm N}|\sign(t)-s(p(t))|\\ & \qquad\leq\frac{1}{3}. \end{align*} In view of Paturi's lower bound for the majority function (Theorem~\ref{thm:paturi-maj}), the approximant $s(p(2\sum(-1)^{x_{j}}+1))$ must have degree $\Omega(n)=\Omega(N).$ But this composition is a polynomial in $x\in\zoon$ of degree $\deg s\cdot\deg p=O(d/(1-\epsilon)^{2}).$ We conclude that $d/(1-\epsilon)^{2}\geq\Omega(N),$ whence $\epsilon\geq1-O(d/N)^{1/2}.$ \end{proof} \subsection{Rational approximation} Consider a rational function $r(x)=p(x)/q(x),$ where $p$ and $q$ are polynomials on $\Re^{n}.$ We refer to the degrees of $p$ and $q$ as the \emph{numerator degree} and \emph{denominator degree}, respectively, of $r$. The \emph{degree} of $r$ is, then, the maximum of the numerator and denominator degrees. For a function $f\colon X\to\Re$ with domain $X\subseteq\Re^{n},$ we define \begin{align} R(f,d_{0},d_{1})\,=\,\inf_{p,q}\,\sup_{x\in X}\left\lvert f(x)-\frac{p(x)}{q(x)}\right\rvert ,\label{eq:R-d0-d1-defined} \end{align} where the infimum is over multivariate polynomials $p$ and $q$ of degree at most $d_{0}$ and $d_{1}$, respectively, such that $q$ does not vanish on $X.$ In words, $R(f,d_{0},d_{1})$ is the least error in an approximation of $f$ by a multivariate rational function with numerator degree and denominator degree at most $d_{0}$ and $d_{1},$ respectively. We will be mostly working with $R(f,d_{0},d_{1})$ in the regimes $d_{0}=d_{1}$ and $d_{0}\gg d_{1}$. In the former regime, we use the shorthand \[ R(f,d)=R(f,d,d). \] As a limiting case of the latter regime, we have \[ E(f,d)=R(f,d,0). \] The study of the rational approximation of the sign function dates back to the seminal work by Zolotarev~\cite{zolotarev1877rational} in the 1870s. The problem was revisited almost a century later by Newman~\cite{newman64rational}, who proved the following result. \begin{fact}[Newman] \label{fact:newman}For any $N>1$ and any integer $d\geq1,$ \[ R(\sign|_{[-N,-1]\cup[1,N]},d)\leq1-\frac{1}{N^{1/d}}. \] \end{fact} \noindent For a recent exposition of Newman's construction, we refer the reader to~\cite[Theorem~2.4]{sherstov09hshs}. As an important special case, Newman's work gives upper bounds for the rational approximation of the sign function on the discrete set $\{\pm1,\pm2,\ldots,\pm N\}.$ Newman's upper bounds were sharpened and complemented with matching lower bounds in~\cite[Eq.~(2.2) and Theorem~5.1]{sherstov09hshs}, to the following effect. \begin{thm}[Sherstov] \label{thm:rational-approx-SGN}For any positive integers $N$ and $d,$ \[ R(\sign|_{\{\pm1,\pm2,\ldots,\pm N\}},d)=\begin{cases} 1-N^{-\Theta(1/d)} & \text{if }1\leq d\leq\log N,\\ 2^{-\Theta(d/\log(N/d))} & \text{if }\log N<d<N/2. \end{cases} \] \end{thm} \noindent Among other things, Theorem~\ref{thm:rational-approx-SGN} implies the following result on the rational approximation of the majority function~\cite[Eq.~(2.2) and Theorems~5.1,~5.9]{sherstov09hshs}. \begin{thm}[Sherstov] \label{thm:rational-approx-MAJ}For any positive integers $n$ and $d,$ \[ R(\MAJ_{n},d)=\begin{cases} 1-n^{-\Theta(1/d)} & \text{if }\ensuremath{1\leq d\leq\log n,}\\ 2^{-\Theta(d/\log(n/d))} & \text{if }\ensuremath{\log n\leq d<\lfloor n/4\rfloor.} \end{cases} \] \end{thm} \subsection{Sign-representation} Let $f\colon X\to\moo$ be a given function, where $X\subset\Re^{n}$ is finite. The \emph{threshold degree} of $f,$ denoted $\degthr(f),$ is the least degree of a polynomial $p(x)$ such that $f(x)\equiv\sign p(x).$ For functions $f\colon X\to\moo$ and $g\colon Y\to\moo,$ we let the symbol $f\wedge g$ stand for the function $X\times Y\to\moo$ given by $(f\wedge g)(x,y)=f(x)\wedge g(y).$ Note that in this notation, $f$ and $f\wedge f$ are completely different functions, the former having domain $X$ and the latter $X\times X.$ The following ingenious observation, due to Beigel et al.~\cite{beigel91rational}, relates the notions of sign-representation and rational approximation for conjunctions of Boolean functions. \begin{thm}[Beigel et al.] \label{thm:beigel-degthr-rational} Let $f\colon X\to\moo$ and $g\colon Y\to\moo$ be given functions, where $X,Y\subseteq\Re^{n}.$ Let $d$ be any integer with \[ R(f,d)+R(g,d)<1. \] Then \begin{align*} \degthr(f\wedge g)\leq4d. \end{align*} \end{thm} \begin{proof}[Proof \emph{(adapted from Beigel et al.).}] Fix arbitrary rational functions $p_{1}(x)/q_{1}(x)$ and $p_{2}(y)/q_{2}(y)$ of degree at most $d$ such that \begin{align*} \sup_{X}\left|f(x)-\frac{p_{1}(x)}{q_{1}(x)}\right|+\sup_{Y}\left|g(y)-\frac{p_{2}(y)}{q_{2}(y)}\right|<1. \end{align*} Then \begin{align*} f(x)\wedge g(y) & \equiv\sign(1+f(x)+g(y))\\ & \equiv\sign\left(1+\frac{p_{1}(x)}{q_{1}(x)}+\frac{p_{2}(y)}{q_{2}(y)}\right). \end{align*} Multiplying through by the positive quantity $q_{1}(x)^{2}q_{2}(y)^{2}$ gives the desired sign-representing polynomial: $f(x)\wedge g(y)\equiv\sign\{q_{1}(x)^{2}q_{2}(y)^{2}+p_{1}(x)q_{1}(x)q_{2}(y)^{2}+p_{2}(y)q_{2}(y)q_{1}(x)^{2}\}.$ \end{proof} The construction of Theorem~\ref{thm:beigel-degthr-rational} is somewhat ad hoc, and there is no particular reason to believe that it gives a sign-representing polynomial of asymptotically optimal degree. Remarkably, it does. The following converse to the theorem of Beigel et al.~was established in~\cite[Theorem~3.16]{sherstov09hshs}. \begin{thm}[Sherstov] \label{thm:sherstov-degthr-R} Let $f\colon X\to\moo$ and $g\colon Y\to\moo$ be given functions, where $X,Y\subset\Re^{n}$ are arbitrary finite sets. Assume that $f$ and $g$ are not identically false. Let $d=\degthr(f\wedge g).$ Then \begin{align*} R(f,4d)+R(g,2d)<1. \end{align*} \end{thm} \subsection{Symmetrization} Let $S_{n}$ denote the symmetric group on $n$ elements. For $\sigma\in S_{n}$ and $x\in\zoon$, we denote $\sigma x=(x_{\sigma(1)},\ldots,x_{\sigma(n)})\in\zoon.$ For $x\in\zoon,$ we define $|x|=x_{1}+x_{2}+\cdots+x_{n}.$ A function $\phi\colon\zoon\to\Re$ is called \emph{symmetric} if $\phi(x)=\phi(\sigma x)$ for every $x\in\zoon$ and every $\sigma\in S_{n}.$ Equivalently, $\phi$ is symmetric if $\phi(x)$ is uniquely determined by $|x|.$ Symmetric functions on $\zoon$ are intimately related to univariate polynomials, as borne out by Minsky and Papert's \emph{symmetrization argument}~\cite{minsky88perceptrons}. \begin{prop}[Minsky and Papert] \label{prop:minsky-papert}Let $p\colon\zoon\to\Re$ be a polynomial of degree $d.$ Then there is a univariate polynomial $p^{*}$ of degree at most $d$ such that for all $x\in\zoon,$ \begin{align*} \Exp_{\sigma\in S_{n}}p(\sigma x)=p^{*}(|x|). \end{align*} \end{prop} \noindent Minsky and Papert's result generalizes to block-symmetric functions, as pointed out in~\cite[Proposition~2.3]{RS07dc-dnf}: \begin{prop}[Razborov and Sherstov] \label{prop:symmetrization} Let $n_{1},\dots,n_{k}$ be positive integers. Let $p\colon\zoo^{n_{1}}\times\cdots\times\zoo^{n_{k}}\to\Re$ be a polynomial of degree $d.$ Then there is a polynomial $p^{*}\colon\Re^{k}\to\Re$ of degree at most $d$ such that for all $x_{1}\in\zoo^{n_{1}},\ldots,x_{k}\in\zoo^{n_{k}},$ \begin{align*} \Exp_{\sigma_{1}\in S_{n_{1}},\dots,\sigma_{k}\in S_{n_{k}}}p(\sigma_{1}x_{1},\dots,\sigma_{k}x_{k}) & =p^{*}(|x_{1}|,\ldots,|x_{k}|). \end{align*} \end{prop} \noindent Proposition~\ref{prop:symmetrization} follows in a straightforward manner from Minsky and Papert's Proposition~\ref{prop:minsky-papert} by induction on the number of blocks $k.$ \subsection{\label{subsec:Communication-complexity}Communication complexity} An excellent reference on communication complexity is the monograph by Kushilevitz and Nisan~\cite{ccbook}. In this overview, we will limit ourselves to key definitions and notation. We adopt the \emph{randomized number-on-the-forehead model}, due to Chandra et al.~\cite{cfl83multiparty}. The model features $k$ communicating players, tasked with computing a (possibly partial) Boolean function $F$ on the Cartesian product $X_{1}\times X_{2}\times\cdots\times X_{k}$ of some finite sets $X_{1},X_{2},\dots,X_{k}$. A given input $(x_{1},x_{2},\dots,x_{k})\in X_{1}\times X_{2}\times\cdots\times X_{k}$ is distributed among the players by placing $x_{i}$, figuratively speaking, on the forehead of the $i$-th player (for $i=1,2,\dots,k$). In other words, the $i$-th player knows the arguments $x_{1},\dots,x_{i-1},x_{i+1},\dots,x_{k}$ but not $x_{i}$. The players communicate by sending broadcast messages, taking turns according to a protocol agreed upon in advance. Each of them privately holds an unlimited supply of uniformly random bits, which he can use along with his available arguments when deciding what message to send at any given point in the protocol. The protocol's purpose is to allow accurate computation of $F$ everywhere on the domain of $F$. An \emph{$\epsilon$-error protocol} for $F$ is one which, on every input $(x_{1},x_{2},\dots,x_{k})\in\dom F,$ produces the correct answer $F(x_{1},x_{2},\dots,x_{k})$ with probability at least $1-\epsilon$. The \emph{cost} of a protocol is the total bit length of the messages broadcast by all the players in the worst case.\footnote{~The contribution of a $b$-bit broadcast to the protocol cost is $b$ rather than $k\cdot b$.} The \emph{$\epsilon$-error randomized communication complexity} of $F,$ denoted $R_{\epsilon}(F),$ is the least cost of an $\epsilon$-error randomized protocol for $F$. As a special case of this model for $k=2,$ one recovers the original two-party model of Yao~\cite{yao79cc} reviewed in the introduction. We focus on randomized protocols with probability of error close to that of random guessing, $1/2$. There are two natural ways to define the communication complexity of a multiparty problem $F$ in this setting. The \emph{communication complexity of $F$ with unbounded error}, introduced by Paturi and Simon~\cite{paturi86cc}, is the quantity \[ \upp(F)=\inf_{0\leq\epsilon<1/2}R_{\epsilon}(F). \] The error probability in this formalism is ``unbounded'' in the sense that it can be arbitrarily close to $1/2$. Babai et al.~\cite{BFS86cc} proposed an alternate quantity, which includes an additive penalty term that depends on the error probability: \[ \pp(F)=\inf_{0\leq\epsilon<1/2}\left\{ R_{\epsilon}(F)+\log\frac{1}{\frac{1}{2}-\epsilon}\right\} . \] We refer to $\pp(F)$ as the \emph{communication complexity of $F$ with weakly unbounded error.} These two complexity measures naturally give rise to corresponding complexity classes $\UPP_{k}$ and $\PP_{k}$ in multiparty communication complexity~\cite{BFS86cc}, both inspired by Gill's probabilistic polynomial time for Turing machines~\cite{gill77pp}. Formally, let $\{F_{n,k}\}_{n=1}^{\infty}$ be a family of $k$-party communication problems $F_{n,k}\colon(\zoon)^{k}\to\moo$, where $k=k(n)$ is either a constant or a function. Then $\{F_{n,k}\}_{n=1}^{\infty}\in\UPP_{k}$ if and only if $\upp(F_{n,k})\leq\log^{c}n$ for some constant $c$ and all $n\geq c$. Analogously, $\{F_{n,k}\}_{n=1}^{\infty}\in\PP_{k}$ if and only if $\pp(F_{n,k})\leq\log^{c}n$ for some constant $c$ and all $n\geq c$. By definition, \[ \PP_{k}\subseteq\UPP_{k}. \] It is standard practice to abbreviate $\PP=\PP_{2}$ and $\UPP=\UPP_{2}$. The following well-known fact, whose proof in the stated generality is available in~\cite[Fact~2.4]{sherstov16multiparty-pp-upp}, gives a large class of communication problems that are efficiently computable with unbounded error. \begin{fact} \label{fact:upp-upper-bound} Let $F\colon(\zoon)^{k}\to\moo$ be a $k$-party communication problem such that $F(x)=\sign p(x)$ for some polynomial $p$ with $\ell$ monomials. Then \[ \upp(F)\leq\lceil\log\ell\rceil+2. \] \end{fact} In the setting of $k=2$ parties, Paturi and Simon~\cite{paturi86cc} showed that unbounded-error communication complexity has a natural matrix-analytic characterization. For a matrix $M$ without zero entries, the \emph{sign-rank} of $M$ is denoted $\srank(M)$ and defined as the minimum rank of a real matrix $R$ such that $\sign R_{i,j}=\sign M_{i,j}$ for all $i,j.$ In words, the sign-rank of $M$ is the minimum rank of a real matrix that has the same sign pattern as $M.$ We extend the notion of sign-rank to communication problems $F\colon X\times Y\to\moo$ by defining $\srank(F)=\srank(M_{F}),$ where $M_{F}=[F(x,y)]_{x\in X,y\in Y}$ is the characteristic matrix of $F.$ The following classic result due to Paturi and Simon~\cite[Theorem~3]{paturi86cc} relates two-party unbounded-error communication complexity to sign-rank. \begin{thm}[Paturi and Simon] \label{thm:srank-upp} Let $F\colon X\times Y\to\moo$ be a two-party communication problem. Then \[ \log\srank(F)\leq\upp(F)\leq\log\srank(F)+2. \] \end{thm} \subsection{\label{subsec:Discrepancy}Discrepancy} A $k$-dimensional \emph{cylinder intersection} is a function $\chi\colon X_{1}\times X_{2}\times\cdots\times X_{k}\to\zoo$ of the form \begin{align*} \chi(x_{1},x_{2},\dots,x_{k})=\prod_{i=1}^{k}\chi_{i}(x_{1},\dots,x_{i-1},x_{i+1},\dots,x_{k}), \end{align*} where $\chi_{i}\colon X_{1}\times\cdots\times X_{i-1}\times X_{i+1}\times\cdots\times X_{k}\to\zoo$. In other words, a $k$-dimensional cylinder intersection is the product of $k$ functions with range $\zoo,$ where the $i$-th function does not depend on the $i$-th coordinate but may depend arbitrarily on the other $k-1$ coordinates. Introduced by Babai et al.~\cite{bns92}, cylinder intersections are the fundamental building blocks of communication protocols and for that reason play a central role in the theory. For a (possibly partial) Boolean function $F$ on $X_{1}\times X_{2}\times\cdots\times X_{k}$ and a probability distribution $P$ on $X_{1}\times X_{2}\times\cdots\times X_{k},$ the \emph{discrepancy} \emph{of $F$ with respect to $P$} is given by \begin{align*} \disc_{P}(F)=\sum_{x\notin\dom F}P(x)+\max_{\chi}\left|\sum_{x\in\dom F}F(x)P(x)\chi(x)\right|, \end{align*} where the maximum is over cylinder intersections $\chi$. The minimum discrepancy over all distributions is denoted \[ \disc(F)=\min_{P}\disc_{P}(F). \] Upper bounds on a function's discrepancy give lower bounds on its randomized communication complexity, a classic technique known as the \emph{discrepancy method}~\cite{chor-goldreich88ip,bns92,ccbook}. \begin{thm} \label{thm:dm} Let $F$ be a $($possibly partial$)$ Boolean function on $X_{1}\times X_{2}\times\cdots\times X_{k}$. Then for $0\leq\epsilon\leq1/2,$ \begin{align*} 2^{R_{\epsilon}(F)}\geq\frac{1-2\epsilon}{\disc(F)}. \end{align*} \end{thm} \noindent A proof of Theorem~\ref{thm:dm} in the stated generality is available in~\cite[Theorem 2.9]{sherstov12mdisj}. Combining this theorem with the definition of $\pp(F)$ gives the following corollary. \begin{cor} \label{cor:dm}Let $F$ be a $($possibly partial$)$ Boolean function on $X_{1}\times X_{2}\times\cdots\times X_{k}$. Then \[ \pp(F)\geq\log\frac{2}{\disc(F)}. \] \end{cor} \subsection{\label{subsec:Pattern-matrix-method}Pattern matrix method} Theorem~\ref{thm:dm} and Corollary~\ref{cor:dm} highlight the role of discrepancy in proving lower bounds on randomized communication complexity. Apart from a few canonical examples~\cite{ccbook}, discrepancy is a challenging quantity to analyze. The \emph{pattern matrix method} is a technique that gives tight bounds on the discrepancy and communication complexity for a large class of communication problems. The technique was developed in~\cite{sherstov07ac-majmaj,sherstov07quantum} for two-party communication complexity and has since been generalized by several authors to the multiparty setting. We now review the strongest form~\cite{sherstov12mdisj,sherstov13directional} of the pattern matrix method, focusing our discussion on discrepancy bounds. \emph{Set disjointness} is the $k$-party communication problem of determining whether $k$ given subsets of the universe $\{1,2,\dots,n\}$ have empty intersection, where, as usual, the $i$-th party knows all the sets except for the $i$-th. Identifying the sets with their characteristic vectors, set disjointness corresponds to the Boolean function $\DISJ_{n,k}\colon(\zoon)^{k}\to\moo$ given by \begin{align} \DISJ_{n,k}(x_{1},x_{2},\dots,x_{k})=\neg\bigvee_{i=1}^{n}x_{1,i}\wedge x_{2,i}\wedge\cdots\wedge x_{k,i}\,.\label{eq:disj-def} \end{align} The partial function $\UDISJ_{n,k}$ on $(\zoon)^{k}$, called \emph{unique set disjointness}, is defined as $\DISJ_{n,k}$ with domain restricted to inputs $x\in(\zoon)^{k}$ such that \emph{$x_{1,i}\wedge x_{2,i}\wedge\cdots\wedge x_{k,i}=1$} for at most one coordinate $i$. In set-theoretic terms, this restriction corresponds to requiring that the $k$ sets either have empty intersection or intersect in a unique element. The pattern matrix method pertains to the communication complexity of \emph{composed} communication problems. Specifically, let $G$ be a (possibly partial) Boolean function on $X_{1}\times X_{2}\times\cdots\times X_{k},$ representing a $k$-party communication problem, and let $f\colon\zoon\to\moo$ be given. The coordinatewise composition $f\circ G$ is then a $k$-party communication problem on $X_{1}^{n}\times X_{2}^{n}\times\cdots\times X_{k}^{n}$. We are now in a position to state the pattern matrix method for discrepancy bounds~\cite[Theorem~5.7]{sherstov12mdisj}. \begin{thm}[Sherstov] \label{thm:pm-large-adeg}For every Boolean function $f\colon\zoon\to\{-1,+1\},$ all positive integers $m$ and $k,$ and all reals $0<\gamma<1,$ \[ \disc(f\circ\UDISJ_{m,k})\leq\left(\frac{\e\cdot2^{k}n}{\deg_{1-\gamma}(f)\sqrt{m}}\right)^{\deg_{1-\gamma}(f)}+\gamma\,. \] \end{thm} \noindent This theorem makes it possible to prove communication lower bounds by leveraging the existing literature on polynomial approximation. In follow-up work, the author improved Theorem~\ref{thm:pm-large-adeg} to an essentially tight upper bound~\cite[Theorem~5.7]{sherstov13directional}. However, we will not need this sharper version. \section{\label{sec:Discrepancy}Discrepancy of integer sets} Let $m\geq2$ be an integer modulus. Key to our work is the notion of \emph{$m$-discrepancy}, which quantifies the pseudorandomness or aperiodicity of any given multiset of integers modulo $m.$ The $m$-discrepancy of a nonempty multiset $Z=\{z_{1},z_{2},\ldots,z_{n}\}$ of arbitrary integers is defined as \[ \disc(Z,m)=\max_{k=1,2,\ldots,m-1}\left|\frac{1}{n}\sum_{j=1}^{n}\omega^{kz_{j}}\right|, \] where $\omega$ is a primitive $m$-th root of unity; the right-hand side is obviously the same for any such $\omega$. By way of terminology, we emphasize that the notion of $m$-discrepancy just defined is unrelated to the notion of \emph{discrepancy} from Section~\ref{subsec:Discrepancy}. As a matter of convenience, we define \begin{equation} \disc(\varnothing,m)=0.\label{eq:disc-empty} \end{equation} The notion of $m$-discrepancy has a long history in combinatorics and theoretical computer science, e.g.,~\cite{gks86k-page-graphs-and-nondeterministic-TMs,ruzsa87essential-components,AIKPS90aperiodic-set,katz89character-sums,rsw93sets-uniform-in-arithmetic-progressions,alon-roichman94rando-cayley-graphs-and-expanders}. The $m$-discrepancy of an integer multiset $Z$ has a natural interpretation in terms of the discrete Fourier transform on $\ZZ_{m}.$ Specifically, consider the \emph{frequency vector $(f_{0},f_{1},\ldots,f_{m-1})$} of $Z$, where $f_{j}$ is the total number of element occurrences in $Z$ that are congruent to $j$ modulo $m.$ Applying the discrete Fourier transform to $(f_{j})_{j=0}^{m-1}$ produces the sequence $(\sum_{j=0}^{m-1}f_{j}\exp(-2\pi\mathbf{i} kj/m))_{k=0}^{m-1}=(\sum_{j=1}^{n}\exp(-2\pi\mathbf{i} kz_{j}/m))_{k=0}^{m-1},$ which is a permutation of $(n,\sum_{j=1}^{n}\omega^{z_{j}},\ldots,\sum_{j=1}^{n}\omega^{(m-1)z_{j}}).$ Summarizing, the $m$-discrepancy of $Z$ coincides up to a normalizing factor with the largest absolute value of a nonconstant Fourier coefficient of the frequency vector of $Z.$ \subsection{Basic properties} We collect a few elementary properties of $m$-discrepancy. To start with, we quantify the ``continuity'' of $\disc(Z,m)$ in the first argument. By way of notation, we remind the reader that the cardinality $|Z|$ of a multiset $Z$ is found by summing, for each distinct element $z\in Z,$ the number of times $z$ occurs in~$Z.$ \begin{prop} \label{prop:norm-Z-subset-Z}Fix a natural number $m\geq2.$ Then for any nonempty finite multisets $Z,Z'$ of integers with $Z'\subseteq Z,$ \begin{equation} 1+\disc(Z',m)\leq(1+\disc(Z,m))\cdot\frac{|Z|}{|Z'|}.\label{eq:Z'-norm} \end{equation} \end{prop} \begin{proof} Abbreviate $n=|Z|$ and $n'=|Z'|,$ and fix an enumeration $z_{1},z_{2},\ldots,z_{n}$ of the elements of $Z$ such that $Z'=\{z_{1},z_{2},\ldots,z_{n'}\}.$ Then for a primitive $m$-th root of unity $\omega,$ \begin{align*} n\disc(Z,m) & =\max_{k=1,2,\ldots,m-1}\left|\sum_{j=1}^{n}\omega^{kz_{j}}\right|\\ & \geq\max_{k=1,2,\ldots,m-1}\left\{ \left|\sum_{j=1}^{n'}\omega^{kz_{j}}\right|-\sum_{j=n'+1}^{n}\left|\omega^{kz_{j}}\right|\right\} \\ & =\max_{k=1,2,\ldots,m-1}\left|\sum_{j=1}^{n'}\omega^{kz_{j}}\right|-(n-n')\\ & =n'\disc(Z',m)-(n-n'), \end{align*} which directly implies~(\ref{eq:Z'-norm}). \end{proof} The $m$-discrepancy of $Z$ is invariant under a variety of operations on $Z$, such as shifting the elements of $Z$ by any given integer or multiplying the elements of $Z$ by an integer relatively prime to $m.$ For our purposes, the following observation will be sufficient. \begin{prop} \label{prop:normZ-norm-minusZ}Fix a natural number $m\geq2$ and a nonempty finite multiset $Z$ of integers. Then \[ \disc(-Z,m)=\disc(Z,m). \] \end{prop} \begin{proof} The claim is immediate from the definition of $m$-discrepancy because $\omega$ is a primitive $m$-th root of unity if and only if $\omega^{-1}$ is. \end{proof} \subsection{Existential bounds} Since the $m$-discrepancy of a multiset remains unchanged when one reduces its elements modulo $m,$ we can focus without loss of generality on multisets with elements in $\{0,1,2,\ldots,m-1\}.$ The identity $1+\omega+\omega^{2}+\cdots+\omega^{m-1}=0$ for any $m$-th root of unity $\omega\ne1$ implies that $Z=\{0,1,2,\ldots,m-1\}$ achieves the smallest possible $m$-discrepancy: $\disc(Z,m)=0.$ The problem of constructing \emph{sparse} nonempty multisets with small discrepancy has seen considerable work. Their existence is straightforward to verify, as follows. \begin{fact} \label{fact:small-fourier-set-existence}Fix $0<\epsilon<1$ and an integer $m\geq2$. Let $Z$ be a random multiset of size $n$ whose elements are chosen independently and uniformly at random from $\{0,1,2,\ldots,m-1\}.$ Then \[ \Prob\left[\disc(Z,m)\geq\epsilon\right]\leq4m\exp\left(-\frac{n\epsilon^{2}}{8}\right). \] \end{fact} \noindent Fact~\ref{fact:small-fourier-set-existence} has been proved in one form or another by many authors, e.g.,~\cite{gks86k-page-graphs-and-nondeterministic-TMs,ruzsa87essential-components,alon-roichman94rando-cayley-graphs-and-expanders}. For the reader's convenience, we include a short proof below. \begin{proof}[Proof of Fact~\emph{\ref{fact:small-fourier-set-existence}}.] Let $Z_{1},Z_{2},\ldots,Z_{n}$ be independent random variables, each distributed uniformly in $\{0,1,2,\ldots,m-1\}.$ For any $m$-th root of unity $\omega\ne1,$ we have $|\omega^{Z_{j}}|=1$ and $\Exp\omega^{Z_{j}}=0$ for $j=1,2,\ldots,n.$ Hence, $\operatorname{Re}(\omega^{Z_{1}}),\operatorname{Re}(\omega^{Z_{2}}),\ldots,\operatorname{Re}(\omega^{Z_{n}})$ are independent random variables with range in $[-1,1]$ and expectation~$0,$ and likewise for $\imagpart(\omega^{Z_{1}}),\imagpart(\omega^{Z_{2}}),\ldots,\imagpart(\omega^{Z_{n}})$. As a result, \begin{align*} \Prob\left[\left|\frac{1}{n}\sum_{j=1}^{n}\omega^{Z_{j}}\right|\geq\epsilon\right] & \leq\Prob\left[\left|\realpart\left(\frac{1}{n}\sum_{j=1}^{n}\omega^{Z_{j}}\right)\right|\geq\frac{\epsilon}{2}\right]\\ & \qquad\qquad+\Prob\left[\left|\imagpart\left(\frac{1}{n}\sum_{j=1}^{n}\omega^{Z_{j}}\right)\right|\geq\frac{\epsilon}{2}\right]\\ & \leq4\exp\left(-\frac{n\epsilon^{2}}{8}\right), \end{align*} where the second step uses Hoeffding's inequality (Fact~\ref{fact:hoeffding}). Applying the union bound across all $m$-th roots of unity $\omega\ne1,$ we conclude that the probability that $\disc(\{Z_{1},Z_{2},\ldots,Z_{n}\},m)\geq\epsilon$ is at most $4(m-1)\exp(-n\epsilon^{2}/8)$. \end{proof} \noindent In some applications, one is restricted to working with \emph{subsets} of $\{0,1,2,\ldots,m-1\}$ as opposed to arbitrary \emph{multisets} with possibly repeated elements. We record a version of Fact~\ref{fact:small-fourier-set-existence} for this setting. \begin{cor} \label{cor:small-fourier-set-existence}Fix $0<\epsilon<1$ and an integer $m\geq2$. Let $Z$ be a random multiset of size $n\leq m$ whose elements are chosen independently and uniformly at random from $\{0,1,2,\ldots,m-1\}.$ Then with probability at least \begin{equation} \left(1-\frac{n}{m}\right)^{n}-4m\exp\left(-\frac{n\epsilon^{2}}{8}\right),\label{eq:small-fourier-set-distinct-elements} \end{equation} the elements of $Z$ are nonzero and pairwise distinct, and obey $\disc(Z,m)\leq\epsilon.$ \end{cor} \begin{proof} The probability that $Z$ does not contain $0$ or repeated elements is easily seen to be $\prod_{i=1}^{n}\frac{m-i}{m}\geq(1-\frac{n}{m})^{n}.$ As a result, the claim follows from Fact~\ref{fact:small-fourier-set-existence}. \end{proof} In all of our applications, the error parameter $\epsilon>0$ will be a small constant. In this regime, Corollary~\ref{cor:small-fourier-set-existence} guarantees the existence of a set $Z\subseteq\{1,2,\ldots,m-1\}$ with $m$-discrepancy at most $\epsilon$ and cardinality $O(\log m),$ an exponential improvement in sparsity compared to the trivial set $\{0,1,2,\ldots,m-1\}.$ No further improvement is possible: it is well known that any nonempty multiset with $m$-discrepancy bounded away from $1$ has cardinality $\Omega(\log m)$. This classical lower bound has a remarkable variety of proofs, e.g., using random walks~\cite{alon-roichman94rando-cayley-graphs-and-expanders}, sphere packing arguments~\cite{fmt06spectral-estimates-for-cayley-graphs}, and diophantine approximation~\cite{lns11nonexistence-circular-expander}. We include here a particularly simple and self-contained proof, adapted from Leung et al.~\cite{lns11nonexistence-circular-expander}. Unlike all other technical statements in this paper, Fact~\ref{fact:disc-lower} is not used in the proof of our main result and is provided solely for completeness. \begin{fact}[Leung et al.] \label{fact:disc-lower}Fix a natural number $m\geq2.$ Let $Z=\{z_{1},z_{2},\ldots,z_{n}\}$ be a multiset of integers. Then \[ \disc(Z,m)\geq1-\frac{2\pi}{\lfloor(m-1)^{1/n}\rfloor}. \] \end{fact} \begin{proof}[Proof \emph{(adapted from~\cite{lns11nonexistence-circular-expander}).}] The proof is based on a classic technique from simultaneous diophantine approximation. For a nonnegative real number $x,$ let $\fr(x)$ denote the fractional part of $x.$ Abbreviate $q=\lfloor(m-1)^{1/n}\rfloor$ and consider the $q$ intervals \begin{equation} \left[0,\frac{1}{q}\right),\left[\frac{1}{q},\frac{2}{q}\right),\left[\frac{2}{q},\frac{3}{q}\right),\ldots,\left[\frac{q-1}{q},1\right).\label{eq:boxes} \end{equation} By the pigeonhole principle, there must be a pair of distinct integers $k',k''\in\{0,1,2,\ldots,q^{n}\}$ such that \[ \fr\left(\frac{z_{1}k'}{m}\right),\fr\left(\frac{z_{2}k'}{m}\right),\ldots,\fr\left(\frac{z_{n}k'}{m}\right) \] are in the same intervals of~(\ref{eq:boxes}) as \[ \fr\left(\frac{z_{1}k''}{m}\right),\fr\left(\frac{z_{2}k''}{m}\right),\ldots,\fr\left(\frac{z_{n}k''}{m}\right), \] respectively. Without loss of generality, $k'>k''.$ Then the integer $k=k'-k''$ obeys \begin{align} & k\in\{1,2,\ldots,m-1\},\label{eq:k-legal}\\ & \left|\frac{z_{j}k}{m}-u_{j}\right|\leq\frac{1}{q},\qquad\qquad\qquad j=1,2,\ldots,n\label{eq:all-near-int} \end{align} for some $u_{1},u_{2},\ldots,u_{n}\in\ZZ.$ Now \begin{align*} \disc(Z,m) & \geq\frac{1}{n}\left|\sum_{j=1}^{n}\exp\left(2\pi\mathbf{i}\cdot\frac{kz_{j}}{m}\right)\right|\\ & \geq1-\frac{1}{n}\sum_{j=1}^{n}\left|1-\exp\left(2\pi\mathbf{i}\cdot\frac{kz_{j}}{m}\right)\right|\\ & =1-\frac{1}{n}\sum_{j=1}^{n}\left|1-\exp\left(2\pi\mathbf{i}\cdot\left(\frac{kz_{j}}{m}-u_{j}\right)\right)\right|\\ & \geq1-\frac{1}{n}\sum_{j=1}^{n}2\pi\left|\frac{kz_{j}}{m}-u_{j}\right|\\ & \geq1-\frac{2\pi}{q}, \end{align*} where the first step uses the definition of $m$-discrepancy; the second step applies the triangle inequality; the third step is valid by periodicity; the fourth step uses the bound $|1-\exp(2\pi x\mathbf{i})|=\sqrt{2-2\cos(2\pi x)}\leq2\pi|x|$ for all real $x$; and the final step is immediate from~(\ref{eq:all-near-int}). \end{proof} \subsection{\label{subsec:An-explicit-construction}An explicit construction} We now turn to the problem of efficiently constructing sparse sets with small $m$-discrepancy. Two such constructions are known to date, due to Ajtai et al.~\cite{AIKPS90aperiodic-set} and Katz~\cite{katz89character-sums}. The approach of Ajtai et al.~is elementary except for an appeal to the prime number theorem. Katz's construction, on the other hand, relies on deep results in number theory. Neither work appears to directly imply the kind of optimal de-randomization that we require, namely, an algorithm that runs in time polynomial in $\log m$ and produces a multiset of cardinality $O(\log m)$ with $m$-discrepancy bounded away from~1. We obtain such an algorithm by adapting the approach of Ajtai et al.~\cite{AIKPS90aperiodic-set}. The following technical result plays a central role. \begin{thm}[cf.~Ajtai et al.] \label{thm:ajtai-iteration}Fix an integer $R\geq1$ and a real number $P\geq2$. Let $m$ be an integer with $m\geq P^{2}(R+1).$ Fix a set $S_{p}\subseteq\{1,2,\ldots,p-1\}$ for each prime $p\in(P/2,P]$ with $p\nmid m,$ such that all $S_{p}$ have the same cardinality. Consider the multiset \begin{multline*} S=\{(r+s\cdot(p^{-1})_{m})\bmod m:\\ \qquad r=1,\ldots,R;\quad p\in(P/2,P]\text{ prime with }p\nmid m;\quad s\in S_{p}\}. \end{multline*} Then the elements of $S$ are pairwise distinct and nonzero. Moreover, \[ \disc(S,m)\leq\frac{c}{\sqrt{R}}+\frac{c\log m}{\log\log m}\cdot\frac{\log P}{P}+\max_{p}\{\disc(S_{p},p)\} \] for some $($explicitly given$)$ constant $c\geq1$ independent of $P,R,m.$ \end{thm} \noindent Ajtai et al.~\cite{AIKPS90aperiodic-set} proved a special case of Theorem~\ref{thm:ajtai-iteration} for $m$ prime, but their argument readily generalizes to arbitrary moduli $m$ as just stated. For the reader's convenience, we provide a complete proof of Theorem~\ref{thm:ajtai-iteration} in Appendix~\ref{sec:ajtai}. The theorem's purpose is to reduce the construction of a sparse set with small $m$-discrepancy to the construction of sparse sets with small $p$-discrepancy, for primes $p\ll m.$ By applying Theorem~\ref{thm:ajtai-iteration} in a recursive manner, one reaches smaller and smaller primes. The authors of~\cite{AIKPS90aperiodic-set}~continue this recursive process until they reach primes $p$ so small that the trivial construction $\{1,2,3,\ldots,p-1\}$ can be considered sparse. We proceed differently and terminate the recursion after just two stages, at which point the input size is small enough for brute force search based on Corollary~\ref{cor:small-fourier-set-existence}. The final set that we construct has size logarithmic in $m$ and $m$-discrepancy a small constant, as opposed to the superlogarithmic size and $o(1)$ discrepancy in the work of Ajtai et al.~\cite{AIKPS90aperiodic-set}. A detailed exposition of our algorithm follows. \begin{thm} \label{thm:explicit-set-small-Fourier-coeffs}Let $0<\epsilon\leq1$ be given. Then there is an algorithm that takes as input an integer $m\geq2,$ runs in time polynomial in $\log m,$ and outputs a nonempty set $Z\subseteq\{0,1,2,\ldots,m-1\}$ with \begin{align*} & \disc(Z,m)\leq\epsilon,\\ & |Z|\leq C_{\epsilon}\log m, \end{align*} where $C_{\epsilon}\geq1$ is a constant. Moreover, the constant $C_{\epsilon}$ and the algorithm are given explicitly. \end{thm} \begin{proof} Set $\delta=\epsilon/(11c),$ where $c\geq1$ is the explicit constant from Theorem~\ref{thm:ajtai-iteration}. Define \begin{align*} P' & =\frac{1}{\delta}\ln\left(\frac{1}{\delta}\ln m\right),\\ P'' & =\frac{1}{\delta}\ln m. \end{align*} We may assume that \begin{align} & P'\geq\frac{1}{\delta^{2}},\label{eq:P'-large}\\ & P'>4\left\lceil \frac{8\ln8P'}{\delta^{2}}\right\rceil ^{2},\label{eq:stage1-prereq}\\ & P''\geq2P'^{2}\left\lceil \frac{1}{\delta^{2}}+1\right\rceil ,\label{eq:stage2-prereq}\\ & m\geq P''^{2}\left\lceil \frac{1}{\delta^{2}}+1\right\rceil ,\label{eq:stage3-prereq}\\ & \pi(P')>\pi\left(\frac{P'}{2}\right),\label{eq:stage2-enough-primes}\\ & \pi(P'')-\pi\left(\frac{P''}{2}\right)>\nu(m),\label{eq:stage3-enough-primes} \end{align} where $\pi$ is the prime counting function and $\nu$ is the number of distinct prime divisors function. Indeed, if any of (\ref{eq:P'-large})\textendash (\ref{eq:stage3-prereq}) is violated, then by elementary calculus $m$ is bounded in terms of $1/\delta=O(1)$ and therefore the trivial set $Z=\{0,1,2,\ldots,m-1\}$ satisfies $\disc(Z,m)=0$ and $|Z|=O(1).$ Analogously, the explicit bounds for $\pi$ and $\nu$ in Facts~\ref{fact:PNT} and~\ref{fact:num-prime-factors} ensure that (\ref{eq:stage2-enough-primes}) and~(\ref{eq:stage3-enough-primes}) can fail only if $m$ is bounded in terms of $1/\delta=O(1),$ so that we may again output $Z=\{0,1,2,\ldots,m-1\}$. Assuming~(\ref{eq:P'-large})\textendash (\ref{eq:stage3-enough-primes}), our construction of $Z$ has three stages. In the first and second stages, we construct sparse sets $S_{p}\subseteq\{1,2,\ldots,p-1\}$ with small $p$-discrepancy for all primes $p\in(P'/2,P']$ and $p\in(P''/2,P''],$ respectively. In the final stage, we construct the set $Z$ in the theorem statement. We ensure that each stage runs in time polynomial in $\ln m.$\bigskip{} \emph{Stage 1.} For every prime $p'\in(P'/2,P'],$ Corollary~\ref{cor:small-fourier-set-existence} along with (\ref{eq:stage1-prereq}) guarantees the existence of a set $S_{p'}\subseteq\{1,2,\ldots,p'-1\}$ with \begin{align} & |S_{p'}|=\left\lceil \frac{8\ln8P'}{\delta^{2}}\right\rceil , & & \text{prime }p'\in(P'/2,P'],\label{eq:stage1-size}\\ & \disc(S_{p'},p')\leq\delta, & & \text{prime }p'\in(P'/2,P'].\label{eq:stage1-norm} \end{align} The primes in $(P'/2,P']$ can be identified by the trivial algorithm in time polynomial in $P'=O(\ln\ln m).$ For each such prime $p',$ we can find a set $S_{p'}$ with the above properties in time $P'^{O(|S_{p'}|)}=o(\ln m)$ by trying out all candidate sets.\bigskip{} \emph{Stage 2.} Apply the construction of Theorem~\ref{thm:ajtai-iteration} with parameters $P=P'$ and $R=\lceil1/\delta^{2}\rceil$ to the sets constructed in Stage~$1$ to obtain a set $S_{p''}\subseteq\{1,2,\ldots,p''-1\}$ for each prime $p''\in(P''/2,P''].$ This choice of parameters is legitimate by~(\ref{eq:stage2-prereq}). By~(\ref{eq:stage1-size}), the new sets have the same cardinality, namely, \begin{align*} |S_{p''}| & =R\left\lceil \frac{8\ln8P'}{\delta^{2}}\right\rceil \left(\pi(P')-\pi\left(\frac{P'}{2}\right)\right), & & \qquad\text{prime }p''\in(P''/2,P'']. \end{align*} The prime number theorem (Fact~\ref{fact:PNT}) implies that $|S_{p''}|=O(P')=O(\ln\ln m)$. In view of~(\ref{eq:P'-large}), (\ref{eq:stage1-norm}), and $P''=\exp(\delta P'),$ the new sets have \begin{align} \disc(S_{p''},p'') & \leq6c\delta, & & \text{prime }p''\in(P''/2,P''].\label{eq:stage2-norm} \end{align} We now show that Stage~$2$ runs in time polynomial in $\ln m.$ To start with, the primes in $(P''/2,P'']$ can be identified by the trivial algorithm in time polynomial in $P''=O(\ln m).$ For any such prime $p'',$ the construction of the corresponding set $S_{p''}$ in Theorem~\ref{thm:ajtai-iteration} amounts to $O(|S_{p''}|)=O(\ln\ln m)$ arithmetic operations in the field $\FF_{p''}$ of size $|\FF_{p''}|=O(\ln m),$ and therefore can be carried out in time polynomial in $\ln\ln m.$ \bigskip{} \emph{Stage 3.} Apply the construction of Theorem~\ref{thm:ajtai-iteration} with parameters $P=P''$ and $R=\lceil1/\delta^{2}\rceil$ to the sets constructed in Stage~$2$ to obtain a set $S_{m}\subseteq\{1,2,\ldots,m-1\}$. This choice of parameters is legitimate by~(\ref{eq:stage3-prereq}). This new set has cardinality \begin{multline*} |S_{m}|=R^{2}\left\lceil \frac{8\ln8P'}{\delta^{2}}\right\rceil \left(\pi(P')-\pi\left(\frac{P'}{2}\right)\right)\\ \times\left|\left\{ p''\text{ prime}:p''\in\left(\frac{P''}{2},P''\right]\text{ and }p''\nmid m\right\} \right|, \end{multline*} which in view of (\ref{eq:stage2-enough-primes}) and~(\ref{eq:stage3-enough-primes}) guarantees that $S_{m}$ is nonempty. Simplifying, \begin{align*} |S_{m}| & \leq\left\lceil \frac{1}{\delta^{2}}\right\rceil ^{2}\left\lceil \frac{8\ln8P'}{\delta^{2}}\right\rceil \cdot\pi(P')\cdot\pi(P'')\\ & =O\left(\ln P'\cdot\frac{P'}{\ln P'}\cdot\frac{P''}{\ln P''}\right)\\ & =O(\ln m), \end{align*} where the second step applies the prime number theorem (Fact~\ref{fact:PNT}). The multiplicative constant in this asymptotic bound on $|S_{m}|$ can be easily recovered from the explicit bounds in Fact~\ref{fact:PNT}. Using~(\ref{eq:stage2-prereq}), (\ref{eq:stage2-norm}), and $m=\exp(\delta P''),$ we further obtain \[ \disc(S_{m},m)\leq11c\delta. \] Since $\delta=\epsilon/(11c)$, the set $Z=S_{m}$ satisfies the requirements of the theorem. Finally, the construction of $S_{m}$ in Stage~3 amounts to $O(|S_{m}|)=O(\ln m)$ arithmetic operations in the ring $\ZZ_{m}$ and therefore can be carried out in time polynomial in $\ln m.$ \end{proof} \section{\label{sec:Univariatization}Univariatization} Consider a halfspace $h_{n}(x)=\sign(\sum z_{i}x_{i}-\theta)$ in Boolean variables $x_{1},x_{2},\ldots,x_{n}\in\zoo,$ where the coefficients can be assumed without loss of generality to be integers. Then the linear form $\sum z_{i}x_{i}-\theta$ ranges in the discrete set $\{\pm1,\pm2,\ldots,\pm N\}$, for some integer $N$ proportionate to the magnitude of the coefficients. As a result, one can approximate $h_{n}$ to any given error $\epsilon$ by approximating the sign function to $\epsilon$ on $\{\pm1,\pm2,\ldots,\pm N\}.$ This approach works for both rational approximation and polynomial approximation. Needless to say, there is no reason to expect that the degree of the approximant in this na\"{i}ve construction is anywhere close to optimal. Perhaps the most dramatic example is the \emph{odd-max-bit function}, defined by $\OMB_{n}(x)=\sign(1+\sum_{i=1}^{n}(-2)^{i}x_{i})$. A moment's thought reveals that $\OMB_{n}$ can be approximated to any given error $\epsilon>0$ by a rational function of degree~$1,$ whereas the na\"{i}ve construction produces an approximant of degree $\Omega(n).$ Surprisingly, we are able to construct a halfspace $h_{n}(x)=\sign(\sum z_{i}x_{i}-\theta)$ with exponentially large coefficients for which the na\"{i}ve construction is essentially optimal. Specifically, we show that a rational approximant for $h_{n}$ with given error and given numerator and denominator degrees implies an analogous \emph{univariate} rational approximant for the sign function on $\{\pm1,\pm2,\pm3,\ldots,\pm2^{\Theta(n)}\}.$ As a result, tight lower bounds for the rational and polynomial approximation of $h_{n}$ follow immediately from the univariate lower bounds for the sign function. The construction of $h_{n}$, carried out in this section, is the centerpiece of our paper. The role of $h_{n}$ is to reduce the multivariate problem taken up in this work to a well-understood univariate question, whence the title of this section. We have broken down the proof into four steps, corresponding to subsections~\ref{subsec:Eigenvalue-bounds-for}\textendash \ref{subsec:The-master-theorem} below. \subsection{\label{subsec:Eigenvalue-bounds-for}Distribution of a linear form modulo \emph{m}} We start by studying the probability distribution of the weighted sum $z_{1}X_{1}+z_{2}X_{2}+\cdots+z_{n}X_{n}$ modulo $m$, where $z_{1},z_{2},\ldots,z_{n}$ are given integers and $X_{1},X_{2},\ldots,X_{n}\in\zoo$ are chosen uniformly at random. We will show that the distribution is close to uniform whenever the multiset $\{z_{1},z_{2},\ldots,z_{n}\}$ has small $m$-discrepancy. This result uses the following classical fact on linear forms modulo $m$. \begin{fact}[cf.~Gould~\cite{gould72combinatorial-identities}; Thathachar~\cite{Thathachar98BP-hierarchy}] \label{fact:number-solutions-linear-form}Fix a natural number $m\geq2$ and a multiset $Z=\{z_{1},z_{2},\ldots,z_{n}\}$ of integers. Let $\omega$ be a primitive $m$-th root of unity. Then \begin{multline} \left|\Prob_{X\in\zoon}\left[\sum_{j=1}^{n}z_{j}X_{j}\equiv s\pmod m\right]-\frac{1}{m}\right|\\ \leq\frac{1}{m}\sum_{k=1}^{m-1}\left|\prod_{j=1}^{n}\frac{1+\omega^{kz_{j}}}{2}\right|,\qquad s\in\ZZ.\label{eq:weighted-sums-uniform-1} \end{multline} \end{fact} \begin{proof}[{Proof \emph{(adapted from~\cite[Lemma~13]{Thathachar98BP-hierarchy})}}] The fraction of vectors $X\in\zoon$ that satisfy the equation $\sum_{j=1}^{n}z_{j}X_{j}\equiv s\pmod m$ can be computed directly, as follows: \begin{align*} \Prob_{X\in\zoon}\left[\sum_{j=1}^{n}z_{j}X_{j}\equiv s\pmod m\right] & =\Exp_{X\in\zoon}\;\I\left[\sum_{j=1}^{n}z_{j}X_{j}\equiv s\pmod m\right]\\ & =\Exp_{X\in\zoon}\;\frac{1}{m}\sum_{k=0}^{m-1}\omega^{k(\sum_{j=1}^{n}z_{j}X_{j}-s)}\\ & =\Exp_{X\in\zoon}\;\frac{1}{m}\sum_{k=0}^{m-1}\omega^{-ks}\prod_{j=1}^{n}\omega^{kz_{j}X_{j}}\\ & =\frac{1}{m}\sum_{k=0}^{m-1}\omega^{-ks}\Exp_{X\in\zoon}\prod_{j=1}^{n}\omega^{kz_{j}X_{j}}\\ & =\frac{1}{m}\sum_{k=0}^{m-1}\omega^{-ks}\prod_{j=1}^{n}\frac{1+\omega^{kz_{j}}}{2}\\ & =\frac{1}{m}+\frac{1}{m}\sum_{k=1}^{m-1}\omega^{-ks}\prod_{j=1}^{n}\frac{1+\omega^{kz_{j}}}{2}. \end{align*} This implies~(\ref{eq:weighted-sums-uniform-1}) because $|\omega^{-ks}|=1$ for all $k,s\in\ZZ$. \end{proof} \noindent In the original version of this manuscript, we proved~(\ref{eq:weighted-sums-uniform-1}) using a different, matrix-analytic argument, which we include as Appendix~\ref{app:number-solutions-linear-form}. The short and elegant proof above was pointed out to us by T.~S.~Jayram, who kindly allowed us to include it. We now simplify the right-hand side of~(\ref{eq:weighted-sums-uniform-1}) and relate it to $m$-discrepancy. \begin{lem} \label{lem:sum-equidistributed-mod-m}Fix a natural number $m\geq2$ and a multiset $Z=\{z_{1},z_{2},\ldots,z_{n}\}$ of integers. Then for all $s\in\ZZ,$ \[ \left|\Prob_{X\in\zoon}\left[\sum_{j=1}^{n}z_{j}X_{j}\equiv s\pmod m\right]-\frac{1}{m}\right|\leq\left(\frac{1+\disc(Z,m)}{2}\right)^{n/2}. \] \end{lem} \begin{proof} Let $\omega$ be a primitive $m$-th root of unity. For $k=1,2,\ldots,m-1,$ we have \begin{align*} \left|\prod_{j=1}^{n}\frac{1+\omega^{kz_{j}}}{2}\right| & =\left(\prod_{j=1}^{n}\frac{(1+\omega^{kz_{j}})(\overline{1+\omega^{kz_{j}}})}{4}\right)^{1/2}\\ & =\left(\prod_{j=1}^{n}\frac{1+\operatorname{Re}(\omega^{kz_{j}})}{2}\right)^{1/2}\\ & \leq\left(\frac{1}{n}\sum_{j=1}^{n}\frac{1+\operatorname{Re}(\omega^{kz_{j}})}{2}\right)^{n/2}\\ & =\left(\frac{1}{2}+\frac{1}{2}\operatorname{Re}\left(\frac{1}{n}\sum_{j=1}^{n}\omega^{kz_{j}}\right)\right)^{n/2}\\ & \leq\left(\frac{1}{2}+\frac{1}{2}\left|\frac{1}{n}\sum_{j=1}^{n}\omega^{kz_{j}}\right|\right)^{n/2}, \end{align*} where the second step uses $|\omega|=1$, and the third step follows by convexity since $1+\operatorname{Re}(\omega^{kz_{j}})\geq0.$ Maximizing over $k,$ we arrive at \begin{align*} \max_{k=1,2,\ldots,m-1}\left|\prod_{j=1}^{n}\frac{1+\omega^{kz_{j}}}{2}\right| & \leq\left(\frac{1}{2}+\frac{1}{2}\max_{k=1,2,\ldots,m-1}\left|\frac{1}{n}\sum_{j=1}^{n}\omega^{kz_{j}}\right|\right)^{n/2}\\ & =\left(\frac{1+\disc(Z,m)}{2}\right)^{n/2}. \end{align*} In view of Fact~\ref{fact:number-solutions-linear-form}, the proof is complete. \end{proof} \subsection{Fooling distributions} Let $Z=\{z_{1},z_{2},\ldots,z_{n}\}$ be a multiset with $m$-discrepancy bounded away from $1.$ Consider the linear map $L\colon\zoon\to\ZZ_{m}$ given by $L(x)=\sum z_{i}x_{i}.$ We have shown that for uniformly random $X\in\zoon$, the probability distribution of $L(X)$ is exponentially close to uniform. This implies, for some constant $c>0$, that the sets $L^{-1}(0),L^{-1}(1),\ldots,L^{-1}(m-1)$ cannot be reliably distinguished by a real polynomial of degree up to $cn$. More precisely, the characteristic functions of $L^{-1}(0),L^{-1}(1),\ldots,L^{-1}(m-1)$ have approximately the same Fourier spectrum up to degree $cn$. We will now substantially strengthen this conclusion by proving that there are probability distributions $\mu_{0},\mu_{1},\ldots,\mu_{m-1}$, supported on $L^{-1}(0),L^{-1}(1),\ldots,L^{-1}(m-1)$, respectively, such that the Fourier spectra of $\mu_{0},\mu_{1},\ldots,\mu_{m-1}$ are \emph{exactly} the same up to degree $cn.$ To use a technical term, these distributions \emph{fool} any polynomial $p$ of degree up to $cn$, in that $\Exp_{\mu_{0}}p=\Exp_{\mu_{1}}p=\cdots=\Exp_{\mu_{m-1}}p.$ Our proof relies on the following technical result~\cite[Theorem~4.1]{sherstov09opthshs}. \begin{thm}[Sherstov] \label{thm:distribution-by-inversion} Let $f,\chi_{1},\dots,\chi_{k}\colon\Xcal\to\moo$ be given functions on a finite set $\Xcal.$ Suppose that \begin{align} & \sum_{\substack{i=1} }^{k}|\langle f,\chi_{i}\rangle_{\Xcal}|<\frac{1}{2},\label{eqn:f-chi-bounded}\\ & \sum_{\substack{j=1\\ j\ne i } }^{k}|\langle\chi_{i},\chi_{j}\rangle_{\Xcal}|\leq\frac{1}{2}, & & i=1,2,\dots,k.\label{eqn:diag-dominance}\\ \intertext{\text{{\it Then there exists a probability distribution \ensuremath{\mu} on \ensuremath{\Xcal} such that}}} & \Exp_{\mu}\,[f(x)\chi_{i}(x)]=0, & & i=1,2,\dots,k.\nonumber \end{align} \end{thm} \noindent By way of notation, we remind the reader that $\langle f,g\rangle_{\Xcal}=\frac{1}{|\Xcal|}\sum_{x\in\Xcal}f(x)g(x)$ for any real-valued functions $f$ and $g$ and a nonempty subset $\Xcal$ of their domain. In words, Theorem~\ref{thm:distribution-by-inversion} states that if $\chi_{1},\chi_{2},\dots,\chi_{k}$ each have small correlation with $f$ and, in addition, have small pairwise correlations, then a distribution exists with respect to which $f$ is completely uncorrelated with $\chi_{1},\chi_{2},\dots,\chi_{k}.$ We are now in a position to prove the existence of the promised fooling distributions. In the statement that follows, recall that $H(p)=-p\log p-(1-p)\log(1-p)$ is the binary entropy function. \begin{lem} \label{lem:fooling-distributions}Fix $\delta\in[0,1/2)$ and a nonempty multiset $Z=\{z_{1},z_{2},\ldots,z_{n}\}$ of integers. Let $m$ be an integer with \begin{equation} 2\leq m\leq\left(\frac{2(1-2\delta)}{1+\disc(Z,m)}\right)^{\left(\frac{1}{2}-\delta\right)n}2^{-H(\delta)n-2}.\label{eq:Z-delta-m} \end{equation} Define \begin{align} \Xcal_{s} & =\left\{ x\in\zoon:\sum_{j=1}^{n}z_{j}x_{j}\equiv s\pmod m\right\} , & & s\in\ZZ.\label{eq:Xcal-s-defined} \end{align} Then each $\Xcal_{s}$ is nonempty. Moreover, there is a probability distribution $\mu_{s}$ on $\Xcal_{s}$ $($for each $s)$ such that \begin{equation} \Exp_{X\sim\mu_{s}}p(X)=\Exp_{X\sim\mu_{s'}}p(X)\label{eq:fooling-p} \end{equation} for all $s,s'\in\ZZ$ and all real polynomials $p\colon\zoon\to\Re$ of degree at most $\delta n.$ \end{lem} \begin{proof} For a subset $A\subseteq\{1,2,\ldots,n\}$, define $\chi_{A}\colon\zoon\to\moo$ by $\chi_{A}(x)=(-1)^{\sum_{i\in A}x_{i}}.$ The centerpiece of the proof is the following claim. \begin{claim} \label{claim:chi_A-orthog-to-Xs}For every $s\in\ZZ$ and every nonempty proper subset $A\subset\{1,2,\ldots,n\},$ \begin{align} & \Xcal_{s}\ne\varnothing,\label{eq:Xs-nonempty}\\ & |\langle\chi_{A},1\rangle_{\Xcal_{s}}|\leq2m\left(\frac{1+\disc(Z,m)}{2}\cdot\frac{n}{n-|A|}\right)^{\frac{n-|A|}{2}}.\label{eq:character-correl} \end{align} \end{claim} We will proceed with the main proof and settle the claim after we are finished. Fix $s\in\ZZ$ arbitrarily. Let $\Acal$ denote the family of nonempty subsets of $\{1,2,\ldots,n\}$ of cardinality at most $\delta n.$ Recall from~(\ref{eqn:entropy-bound}) that \begin{equation} |\Acal|\leq2^{H(\delta)n}-1.\label{eq:Acal-bound} \end{equation} As a result, \begin{align} \sum_{A\in\Acal}|\langle\chi_{A},1\rangle_{\Xcal_{s}}| & \leq|\Acal|\cdot\max_{1\leq|A|\leq\delta n}|\langle\chi_{A},1\rangle_{\Xcal_{s}}|\nonumber \\ & \leq(2^{H(\delta)n}-1)\cdot2m\max_{1\leq k\leq\delta n}\left(\frac{1+\disc(Z,m)}{2}\cdot\frac{n}{n-k}\right)^{\frac{n-k}{2}}\nonumber \\ & =(2^{H(\delta)n}-1)\cdot2m\left(\frac{1+\disc(Z,m)}{2(1-\delta)}\right)^{\frac{(1-\delta)n}{2}}\nonumber \\ & <\frac{1}{2},\label{eq:correl-with-1} \end{align} where the second step uses~(\ref{eq:Acal-bound}) and Claim~\ref{claim:chi_A-orthog-to-Xs}; the third step is valid because $1+\disc(Z,m)<2(1-\delta)$ by (\ref{eq:Z-delta-m}); and the final step is immediate from~(\ref{eq:Z-delta-m}). An analogous calculation shows that for every $A\in\Acal,$ \begin{align} \sum_{A'\in\Acal\setminus\{A\}}|\langle\chi_{A},\chi_{A'}\rangle_{\Xcal_{s}}| & =\sum_{\substack{\substack{A'\in\Acal} \\ A'\ne A } }|\langle\chi_{A\oplus A'},1\rangle_{\Xcal_{s}}|\nonumber \\ & \leq(2^{H(\delta)n}-1)\cdot2m\left(\frac{1+\disc(Z,m)}{2(1-2\delta)}\right)^{\frac{(1-2\delta)n}{2}}\nonumber \\ & <\frac{1}{2},\label{eq:cross-correls} \end{align} where the second step follows from~(\ref{eq:Acal-bound}) and Claim~\ref{claim:chi_A-orthog-to-Xs}, and the last step uses~(\ref{eq:Z-delta-m}). Recall from Claim~\ref{claim:chi_A-orthog-to-Xs} that each $\Xcal_{s}$ is nonempty. Applying Theorem~\ref{thm:distribution-by-inversion} with (\ref{eq:correl-with-1}) and (\ref{eq:cross-correls}) to the functions $\chi_{A}$ $(A\in\Acal)$ and $f=1$, we infer the existence of a probability distribution $\mu_{s}$ on $\Xcal_{s}$ such that \begin{align} \Exp_{X\sim\mu_{s}}\chi_{A}(X) & =0, & & A\in\Acal.\label{eq:distribution-orthogonalizes} \end{align} Now that the probability distributions $\mu_{s}$ have been constructed for each $s\in\ZZ,$ consider an arbitrary polynomial $p\colon\zoon\to\Re$ of degree at most $\delta n.$ Then $p=\sum_{|A|\leq\delta n}p_{A}\chi_{A}$ for some reals $p_{A}$. As a result,~(\ref{eq:distribution-orthogonalizes}) implies that $\Exp_{\mu_{s}}p=p_{\varnothing}$ for all $s\in\ZZ,$ thereby settling~(\ref{eq:fooling-p}). \end{proof} \begin{proof}[Proof of Claim~\emph{\ref{claim:chi_A-orthog-to-Xs}}.] By symmetry, we may assume that $A=\{1,2,\ldots,k\}$ for some $0<k<n.$ Let $X=(X_{1},X_{2},\ldots,X_{n})$ be a random variable with uniform distribution on $\zoon$. Then \begin{align} \frac{|\Xcal_{s}|}{2^{n}} & \geq\frac{1}{m}-\left|\frac{|\Xcal_{s}|}{2^{n}}-\frac{1}{m}\right|\nonumber \\ & =\frac{1}{m}-\left|\Prob_{X}[X\in\Xcal_{s}]-\frac{1}{m}\right|\nonumber \\ & \geq\frac{1}{m}-\left(\frac{1+\disc(Z,m)}{2}\right)^{n/2}\nonumber \\ & \geq\frac{1}{2m},\label{eq:unconditioned-set-size} \end{align} where the last two steps follow from Lemma~\ref{lem:sum-equidistributed-mod-m} and~(\ref{eq:Z-delta-m}), respectively. This settles~(\ref{eq:Xs-nonempty}). Moreover, \begin{align} \frac{|\Xcal_{s}|}{2^{n}} & |\langle\chi_{A},1\rangle_{\Xcal_{s}}|\nonumber \\ & =\left|\Exp_{X}\;\chi_{\{1,2,\ldots,k\}}(X)\cdot\I[X\in\Xcal_{s}]\right|\nonumber \\ & =\left|\sum_{x\in\zook}\frac{(-1)^{x_{1}+\cdots+x_{k}}}{2^{k}}\Prob[x_{1}\ldots x_{k}X_{k+1}\ldots X_{n}\in\Xcal_{s}]\right|\nonumber \\ & =\left|\sum_{x\in\zook}\frac{(-1)^{x_{1}+\cdots+x_{k}}}{2^{k}}\left(\Prob[x_{1}\ldots x_{k}X_{k+1}\ldots X_{n}\in\Xcal_{s}]-\frac{1}{m}\right)\right|\nonumber \\ & \leq\frac{1}{2^{k}}\sum_{x\in\zook}\left|\Prob[x_{1}\ldots x_{k}X_{k+1}\ldots X_{n}\in\Xcal_{s}]-\frac{1}{m}\right|\nonumber \\ & =\frac{1}{2^{k}}\sum_{x\in\zook}\left|\Prob\left[\sum_{j=k+1}^{n}z_{j}X_{j}\equiv s-\sum_{j=1}^{k}z_{j}x_{j}\pmod m\right]-\frac{1}{m}\right|\nonumber \\ & \leq\left(\frac{1+\disc(\{z_{k+1},z_{k+2},\ldots,z_{n}\},m)}{2}\right)^{(n-k)/2}\nonumber \\ & \leq\left(\frac{1+\disc(Z,m)}{2}\cdot\frac{n}{n-k}\right)^{(n-k)/2},\label{eq:correl-intermediate} \end{align} where the third step uses $k\geq1$; the next-to-last step is legitimate by Lemma~\ref{lem:sum-equidistributed-mod-m}; and the last step applies Proposition~\ref{prop:norm-Z-subset-Z}. Now~(\ref{eq:character-correl}) is immediate from~(\ref{eq:unconditioned-set-size}) and~(\ref{eq:correl-intermediate}). \end{proof} \subsection{The univariate reduction} At last, we present a generic construction of a halfspace whose approximation by rational functions and polynomials gives corresponding approximants for the sign function on the discrete set $\{\pm1,\pm2,\ldots,\pm m\}$. In more detail, let $z_{1},z_{2},\ldots,z_{n}$ be given integers. For any such $n$-tuple, we define an associated halfspace and prove a lower bound on $m$ in terms of the discrepancy of the multiset $\{z_{1},z_{2},\ldots,z_{n}\}.$ The following first-principles calculation will be helpful. \begin{prop} \label{prop:averaging-num-denom}Let $a_{1},a_{2},\ldots,a_{k}\in\Re$ and $b_{1},b_{2},\ldots,b_{k}>0$. Then \begin{equation} \min\frac{a_{i}}{b_{i}}\leq\frac{\Exp a_{i}}{\Exp b_{i}}\leq\max\frac{a_{i}}{b_{i}}.\label{eq:averaging-num-denom} \end{equation} \end{prop} \begin{proof} Abbreviate $m=\min a_{i}/b_{i}$ and $M=\max a_{i}/b_{i}.$ Since each $b_{i}$ is positive, we obtain $mb_{i}\leq a_{i}\leq Mb_{i}$. Taking a weighted sum of these inequalities, we arrive at $m\Exp b_{i}\leq\Exp a_{i}\leq M\Exp b_{i},$ which is equivalent to~(\ref{eq:averaging-num-denom}). \end{proof} We have: \begin{thm} \label{thm:master}Fix $\delta\in[0,1/2)$ and a nonempty multiset $Z=\{z_{1},z_{2},\ldots,z_{n}\}$ of integers. Let $m$ be an integer with \begin{equation} 2\leq m\leq\left(\frac{2(1-2\delta)}{1+\disc(Z,m)}\right)^{\left(\frac{1}{2}-\delta\right)n}2^{-H(\delta)n-2}.\label{eq:m-range} \end{equation} Define $f\colon\zoo^{n}\times\zoon\to\moo$ by \[ f(x,y)=\sign\left(\frac{1}{2}+\sum_{j=1}^{n}(z_{j}\bmod m)x_{j}-m\sum_{j=1}^{n}y_{j}\right). \] Then \begin{align*} R(f,d_{0},d_{1}) & \geq R(\sign|_{\{\pm1,\pm2,\ldots,\pm m\}},2d_{0},2d_{1}) \end{align*} for all $d_{0},d_{1}=0,1,2,\ldots,\lfloor\delta n/2\rfloor.$ \end{thm} \begin{proof} Fix $0<\epsilon<1$ arbitrarily for the remainder of the proof, and suppose that $R(f,d_{0},d_{1})<\epsilon$ for some $d_{0},d_{1}\leq\delta n/2.$ Our goal is to show that \begin{equation} R(\sign|_{\{\pm1,\pm2,\ldots,\pm m\}},2d_{0},2d_{1})<\epsilon.\label{eq:master-goal} \end{equation} The proof is algorithmic and involves three steps. Given any approximant for $f$, we will first manipulate it to control the sign behavior in the numerator and denominator, then symmetrize it with respect to $y,$ and finally\textemdash the arduous part of the proof\textemdash symmetrize it with respect to $x.$ The result of these manipulations will be a univariate approximant for the sign function. \medskip{} \emph{Step 1: Original approximant.} Since $R(f,d_{0},d_{1})<\epsilon,$ there are polynomials $p$ and $q$ of degree at most $d_{0}$ and $d_{1},$ respectively, with \begin{align*} \left|f(x,y)-\frac{p(x,y)}{q(x,y)}\right| & <\epsilon \end{align*} for all $x,y\in\zoon.$ This inequality is equivalent to \begin{align} 1-\epsilon & <\frac{p(x,y)}{q(x,y)}f(x,y)<1+\epsilon.\label{eq:orig-ineq} \end{align} Observe that for all $x,y\in\zoon,$ we have $p(x,y)\ne0$ and $q(x,y)\ne0,$ where the former is a consequence of $\epsilon<1$ and the latter follows from the definition of a rational approximant. As a result, (\ref{eq:orig-ineq}) gives \begin{align} 1-\epsilon & <\frac{p(x,y)q(x,y)f(x,y)}{q(x,y)^{2}}<1+\epsilon,\label{eq:squared-ineq1}\\ 1-\epsilon & <\frac{p(x,y)^{2}}{p(x,y)q(x,y)f(x,y)}<1+\epsilon.\label{eq:squared-ineq2} \end{align} \medskip{} \emph{Step 2: Symmetrization on $y.$} The fractions in~(\ref{eq:squared-ineq1}) and~(\ref{eq:squared-ineq2}) have positive numerators and denominators. Therefore, Proposition~\ref{prop:averaging-num-denom} implies that \begin{align} 1-\epsilon<\frac{\Exp_{\sigma\in S_{n}}[p(x,\sigma y)q(x,\sigma y)f(x,\sigma y)]}{\Exp_{\sigma\in S_{n}}[q(x,\sigma y)^{2}]} & <1+\epsilon,\label{eq:symmetrizing1}\\ \rule{0mm}{6mm}1-\epsilon<\frac{\Exp_{\sigma\in S_{n}}[p(x,\sigma y)^{2}]}{\Exp_{\sigma\in S_{n}}[p(x,\sigma y)q(x,\sigma y)f(x,\sigma y)]} & <1+\epsilon.\label{eq:symmetrizing2} \end{align} Minsky and Papert's symmetrization technique (Proposition~\ref{prop:minsky-papert}) ensures the existence of polynomials $p^{*},q^{*},r^{*}$ of degree at most $2d_{0},$ $2d_{1},$ and $d_{0}+d_{1}$, respectively, such that for all $x,y\in\zoon,$ \begin{align*} \Exp_{\sigma\in S_{n}}[p(x,\sigma y)^{2}] & \equiv p^{*}(x,|y|),\\ \Exp_{\sigma\in S_{n}}[q(x,\sigma y)^{2}] & \equiv q^{*}(x,|y|),\\ \Exp_{\sigma\in S_{n}}[p(x,\sigma y)q(x,\sigma y)] & \equiv r^{*}(x,|y|). \end{align*} Moreover, \[ f(x,\sigma y)\equiv f^{*}(x,|y|) \] for all $\sigma\in S_{n},$ where $f^{*}\colon\zoon\times\{0,1,2,\dots,n\}\to\moo$ is given by \[ f^{*}(x,t)=\sign\left(\frac{1}{2}+\sum_{j=1}^{n}(z_{j}\bmod m)x_{j}-mt\right). \] Now~(\ref{eq:symmetrizing1}) and~(\ref{eq:symmetrizing2}) simplify to \begin{align} 1-\epsilon & <\frac{r^{*}(x,t)f^{*}(x,t)}{q^{*}(x,t)}<1+\epsilon,\label{eq:f-star1}\\ 1-\epsilon & <\frac{p^{*}(x,t)}{r^{*}(x,t)f^{*}(x,t)}<1+\epsilon\label{eq:f-star2} \end{align} for all $x\in\zoon$ and $t=0,1,2,\ldots n.$ The numerators and denominators of these fractions are again positive, being averages of positive numbers.\medskip{} \emph{Step 3: Symmetrization on $x.$} We have reached the most demanding part of the proof, where we symmetrize the approximants obtained so far with respect to $x.$ For $s\in\ZZ,$ let $\Xcal_{s}\subseteq\zoon$ be given by~(\ref{eq:Xcal-s-defined}). Then Lemma~\ref{lem:fooling-distributions} guarantees that each $\Xcal_{s}$ is nonempty, and additionally provides a probability distribution $\mu_{s}$ on $\Xcal_{s}$ (for each $s\in\ZZ$) such that for every polynomial $P\colon\zoon\to\Re,$ \begin{equation} \deg P\leq\delta n\quad\implies\qquad\qquad\Exp_{\mu_{s}}P(x)=\Exp_{\mu_{s'}}P(x)\qquad\forall s,s'\in\ZZ.\label{eq:master-orthogonalization} \end{equation} Now fix an integer $s\in[-m-1,m-1].$ On the support of $\mu_{s},$ we have \begin{align*} \sum_{j=1}^{n}(z_{j}\bmod m)x_{j}-s & \in[0\cdot n-m+1,(m-1)\cdot n+m+1]\cap m\ZZ\\ & \subseteq(-m,(n+1)m)\cap m\ZZ\\ & =\{0,m,2m,\ldots,nm\}, \end{align*} where the second step is valid because $n\geq2$ by~(\ref{eq:m-range}). It follows that on the support of $\mu_{s},$ the linear form \[ \ell(x,s)=\frac{1}{m}\left(\sum_{j=1}^{n}(z_{j}\bmod m)x_{j}-s\right) \] ranges in $\{0,1,2,\ldots,n\},$ forcing $f^{*}(x,\ell(x,s))=\sign(s+\frac{1}{2})$. Now~(\ref{eq:f-star1}) and~(\ref{eq:f-star2}) imply that \begin{align*} 1-\epsilon & <\frac{r^{*}(x,\ell(x,s))\sign(s+\frac{1}{2})}{q^{*}(x,\ell(x,s))}<1+\epsilon,\\ 1-\epsilon & <\frac{p^{*}(x,\ell(x,s))}{r^{*}(x,\ell(x,s))\sign(s+\frac{1}{2})}<1+\epsilon \end{align*} for all integers $s\in[-m-1,m-1]$ and all $x$ in the support of $\mu_{s}.$ Since the numerators and denominators of these fractions are positive, Proposition~\ref{prop:averaging-num-denom} allows us to pass to expectations with respect to $x\sim\mu_{s}$ to obtain \begin{align*} 1-\epsilon & <\frac{\Exp_{x\sim\mu_{s}}[r^{*}(x,\ell(x,s))]\sign(s+\frac{1}{2})}{\Exp_{x\sim\mu_{s}}[q^{*}(x,\ell(x,s))]}<1+\epsilon,\\ 1-\epsilon & <\frac{\Exp_{x\sim\mu_{s}}[p^{*}(x,\ell(x,s))]}{\Exp_{x\sim\mu_{s}}[r^{*}(x,\ell(x,s))]\sign(s+\frac{1}{2})}<1+\epsilon, \end{align*} or equivalently \begin{align} \left|\frac{\Exp_{x\sim\mu_{s}}[r^{*}(x,\ell(x,s))]}{\Exp_{x\sim\mu_{s}}[q^{*}(x,\ell(x,s))]}-\sign\left(s+\frac{1}{2}\right)\right| & <\epsilon,\label{eq:exp-final1}\\ \rule{0mm}{6mm}\left|\frac{\Exp_{x\sim\mu_{s}}[p^{*}(x,\ell(x,s))]}{\Exp_{x\sim\mu_{s}}[r^{*}(x,\ell(x,s))]}-\sign\left(s+\frac{1}{2}\right)\right| & <\epsilon,\label{eq:exp-final2} \end{align} for all integers $s\in[-m-1,m-1].$ Consider the univariate polynomials \begin{align*} p^{**}(s) & =\Exp_{x\sim\mu_{s}}[p^{*}(x,\ell(x,s))],\\ q^{**}(s) & =\Exp_{x\sim\mu_{s}}[q^{*}(x,\ell(x,s))],\\ r^{**}(s) & =\Exp_{x\sim\mu_{s}}[r^{*}(x,\ell(x,s))]. \end{align*} Equations~(\ref{eq:exp-final1}) and~(\ref{eq:exp-final2}) show that $r^{**}(s-1)/q^{**}(s-1)$ and $p^{**}(s-1)/r^{**}(s-1)$ approximate $\sign s$ pointwise on $\{\pm1,\pm2,\ldots,\pm m\}$ to error less than $\epsilon.$ Moreover, (\ref{eq:master-orthogonalization}) ensures that the degrees of $p^{**},q^{**},r^{**}$ are at most the degrees of $p^{*},q^{*},r^{*},$ respectively. We conclude that \begin{align*} R(\sign|_{\{\pm1,\pm2,\ldots,\pm m\}},d_{0}+d_{1},2d_{1}) & <\epsilon,\\ R(\sign|_{\{\pm1,\pm2,\ldots,\pm m\}},2d_{0},d_{0}+d_{1}) & <\epsilon. \end{align*} These complementary bounds force~(\ref{eq:master-goal}) and thereby complete the proof. \end{proof} \subsection{\label{subsec:The-master-theorem}The master theorem} We now combine Theorem~\ref{thm:master} with the efficient construction, in Theorem~\ref{thm:explicit-set-small-Fourier-coeffs}, of an integer set with small $m$-discrepancy for $m=2^{\Theta(n)}$. The result is an explicit halfspace $h_{n}\colon\zoon\to\moo$ whose approximation by polynomials and rational functions is asymptotically equivalent to the univariate approximation of the sign function on $\{\pm1,\pm2,\pm3,\ldots,\pm2^{\Theta(n)}\}$. We refer to this result as our \emph{master theorem} since all our main theorems are derived from it. \begin{thm} \label{thm:rational-approx-h-REDUCTION-TO-SGN}For some constant $c'>0,$ there is an algorithm that takes as input an integer $n\geq1,$ runs in time polynomial in $n,$ and outputs a halfspace $h_{n}\colon\zoon\to\moo$ with \begin{equation} R(h_{n},d_{0},d_{1})\geq R\left(\sign|_{\{\pm1,\pm2,\pm3,\ldots,\pm2^{\lfloor c'n\rfloor}\}},2d_{0},2d_{1}\right)\label{eq:rational-approx-h-REDUCTION-TO-SGN} \end{equation} for all $d_{0},d_{1}=0,1,2,\ldots,\lfloor c'n\rfloor.$ Moreover, the constant $c'$ and the algorithm are given explicitly. \end{thm} \begin{proof} Let \begin{equation} c'=\min\left\{ \frac{1}{200},\frac{1}{2C_{1/10}}\right\} ,\label{eq:def-c} \end{equation} where $C_{1/10}\geq1$ is the constant defined in Theorem~\ref{thm:explicit-set-small-Fourier-coeffs}. On input $n$, the construction of $h_{n}$ is as follows. For $n<1/c',$ the sought property~(\ref{eq:rational-approx-h-REDUCTION-TO-SGN}) amounts to $R(h_{n},0,0)\geq R(\sign|_{\{-1,1\}},0,0)$, which is in turn equivalent to $R(h_{n},0,0)\geq1$ and holds trivially for the halfspace $h_{n}(x)=(-1)^{x_{1}}.$ We now turn to the nontrivial case, $n\geq1/c'.$ Abbreviate $m=2^{\lfloor c'n\rfloor}.$ Then the algorithm of Theorem~\ref{thm:explicit-set-small-Fourier-coeffs} constructs, in time polynomial in $n,$ a nonempty multiset $Z$ with $m$-discrepancy \begin{align} \disc(Z,m) & \leq\frac{1}{10}\label{eq:Z-norm-small} \end{align} and cardinality $|Z|\leq n/2.$ Observe that for any integer $k\geq1,$ the union of $k$ copies of $Z$ is a multiset with $m$-discrepancy $\disc(Z,m)$ and cardinality $k|Z|$. Therefore, we may assume without loss of generality that \begin{equation} \frac{n}{4}\leq|Z|\leq\frac{n}{2}.\label{eq:Z-not-too-small} \end{equation} We let \[ h_{n}(x)=\sign\left(\frac{1}{2}+\sum_{j=1}^{|Z|}(z_{j}\bmod m)x_{j}-m\sum_{j=|Z|+1}^{2|Z|}x_{j}\right), \] where $z_{1},z_{2},z_{3},\ldots,z_{|Z|}$ denote the elements of the multiset $Z.$ Taking $\delta=1/25,$ we have from~(\ref{eq:def-c}) and~(\ref{eq:Z-not-too-small}) that \begin{equation} c'n\leq\frac{\delta|Z|}{2}.\label{eq:cn-delta-Z} \end{equation} Moreover, \begin{align*} m & \in[2,2^{c'n}]\\ & \subseteq[2,2^{n/200}]\\ & \subseteq\left[2,\left(\frac{2(1-2\delta)}{1+\disc(Z,m)}\right)^{\left(\frac{1}{2}-\delta\right)\cdot|Z|}2^{-H(\delta)\cdot|Z|-2}\right], \end{align*} where the second step applies~(\ref{eq:def-c}), and the third step uses~(\ref{eq:Z-norm-small}), (\ref{eq:Z-not-too-small}), and $n\geq1/c'\geq200.$ As a result, Theorem~\ref{thm:master} implies~(\ref{eq:rational-approx-h-REDUCTION-TO-SGN}) for all $d_{0},d_{1}\leq\delta|Z|/2$. In view of~(\ref{eq:cn-delta-Z}), the proof is complete. \end{proof} \section{\label{sec:Main-results}Main results} Using the halfspace $h_{n}$ constructed in our master theorem, we will now establish the main results of this paper. \subsection{\label{subsec:Polynomial-approximation}Polynomial approximation} Prior to our work, the strongest lower bound for the approximation of an explicit halfspace $f_{n}\colon\zoon\to\moo$ by polynomials was $E(f_{n},c\sqrt{n})\geq1-2^{-c\sqrt{n}}$ for an absolute constant $c>0$, proved in~\cite{sherstov09hshs,sherstov09opthshs}. The result that we are about to prove is a quadratic improvement on previous work, with respect to both degree and error. As we will discuss shortly, this new result is essentially the best possible. \begin{thm}[Polynomial approximation] \label{thm:polynomial-approx-hs-LOWER} Let $h_{n}\colon\zoon\to\moo$ be the halfspace constructed in Theorem~\emph{\ref{thm:rational-approx-h-REDUCTION-TO-SGN}}. Then for some constant $c>0$ and all $n,$ \begin{equation} E(h_{n},cn)>1-2^{-cn}.\label{eq:approx-poly-lower} \end{equation} \end{thm} \begin{proof} Let $c'>0$ be the constant in Theorem~\ref{thm:rational-approx-h-REDUCTION-TO-SGN}. Then \begin{align*} E(h_{n},c'n) & \geq E(\sign|_{\{\pm1,\pm2,\pm3,\ldots,\pm2^{\lfloor c'n\rfloor}\}},2\lfloor c'n\rfloor)\\ & \geq1-O\left(\frac{n}{2^{c'n}}\right)^{1/2}, \end{align*} where the first step corresponds to taking $d_{0}=\lfloor c'n\rfloor$ and $d_{1}=0$ in Theorem~\ref{thm:rational-approx-h-REDUCTION-TO-SGN}, and the second step is immediate from Proposition~\ref{prop:polynomial-approx-SGN-lower}. This implies~(\ref{eq:approx-poly-lower}) for $c>0$ small enough. \end{proof} \noindent Theorem~\ref{thm:polynomial-approx-hs-LOWER} is essentially as strong as one could hope for. First of all, any function in $n$ Boolean variables can be approximated to zero error by a polynomial of degree at most $n,$ i.e., at most a constant factor larger than what is assumed in~(\ref{eq:approx-poly-lower}). Moreover, a classic result due to Muroga~\cite{muroga71threshold} implies that for every halfspace, the error bound in~(\ref{eq:approx-poly-lower}) is almost achieved by polynomials of degree $1$: \begin{fact} \label{fact:muroga}There is an absolute constant $c>0$ such that for every $n$ and every halfspace $h\colon\zoon\to\moo,$ \begin{align*} E(h,1) & \leq1-n^{-cn}. \end{align*} \end{fact} \begin{proof} Muroga~\cite{muroga71threshold} showed that every halfspace $h\colon\zoon\to\moo$ can be represented as $h(x)=\sign(\sum_{j=1}^{n}z_{j}x_{j}-\theta)$ for some integers $z_{1},z_{2},\ldots,z_{n},\theta$ whose absolute values sum to $n^{O(n)}.$ It follows that \begin{align*} E(h,1) & \leq\max_{x\in\zoon}\left|h(x)-\frac{1}{|\theta|+\sum_{j=1}^{n}|z_{j}|}\left(\sum_{j=1}^{n}z_{j}x_{j}-\theta\right)\right|\\ & \leq1-\frac{1}{|\theta|+\sum_{j=1}^{n}|z_{j}|}\\ & \leq1-n^{-O(n)}.\qedhere \end{align*} \end{proof} \subsection{\label{subsec:Rational-approximation}Rational approximation} We now show that the halfspace $h_{n}$ constructed in our master theorem cannot be approximated pointwise to any small constant except by rational functions of degree $\Omega(n)$. This degree lower bound matches the trivial upper bound and is a quadratic improvement on the previous best construction~\cite{sherstov09hshs,sherstov09opthshs}. More generally, we derive a lower bound on the approximation of $h_{n}$ by rational functions of any given degree $d$, and this lower bound too is essentially the best possible for any halfspace. Details follow. \begin{thm}[Rational approximation] \label{thm:rational-approx-to-hs-LOWER} Let $h_{n}\colon\zoon\to\moo$ be the halfspace constructed in Theorem~\emph{\ref{thm:rational-approx-h-REDUCTION-TO-SGN}}. Then for some constant $c>0$ and all $n,$ \begin{align} R(h_{n},d) & \geq1-\exp\left(-\frac{cn}{d}\right), & & d=1,2,\ldots,\lfloor cn\rfloor.\label{eq:rational-approx-to-hs-LOWER} \end{align} \end{thm} \begin{proof} Let $c'>0$ be the constant in Theorem~\ref{thm:rational-approx-h-REDUCTION-TO-SGN}. Then for $d=1,2,\ldots,\lfloor c'n\rfloor,$ we have \begin{align*} R(h_{n},d) & \geq R(\sign|_{\{\pm1,\pm2,\pm3,\ldots,\pm2^{\lfloor c'n\rfloor}\}},2d)\\ & \geq1-\exp\left(-\Theta\left(\frac{n}{d}\right)\right), \end{align*} where the first step corresponds to taking $d_{0}=d_{1}=d$ in Theorem~\ref{thm:rational-approx-h-REDUCTION-TO-SGN}, and the second step is immediate from Theorem~\ref{thm:rational-approx-SGN}. This implies~(\ref{eq:rational-approx-to-hs-LOWER}) for $c>0$ small enough. \end{proof} \noindent We now show that the lower bounds on the approximation error in Theorem~\ref{thm:rational-approx-to-hs-LOWER} are essentially the best possible for any halfspace. \begin{fact} \label{fact:rational-approx-to-hs-UPPER}There exists an absolute constant $c>0$ such that for every $n$ and every halfspace $h\colon\zoon\to\moo,$ \begin{align*} R(h,d) & \leq1-\exp\left(-\frac{cn\log n}{d}\right), & & d=1,2,\ldots,n. \end{align*} \end{fact} \begin{proof} As already mentioned, Muroga~\cite{muroga71threshold} showed that $h(x)\equiv\sign p(x)$ for some linear polynomial $p(x)$ that ranges in $[-N,-1]\cup[1,N],$ where $N=\exp(cn\log n)$ for some absolute constant $c>0$. This makes it possible to obtain a rational approximant for $h(x)$ by taking any rational approximant for the sign function on $[-N,-1]\cup[1,N]$ and composing it with $p(x)$. We conclude that for any integer $d$, \begin{align*} R(h,d) & \leq R(\sign|_{[-N,-1]\cup[1,N]},d)\\ & \leq1-\frac{1}{N^{1/d}}\\ & =1-\exp\left(-\frac{cn\log n}{d}\right), \end{align*} where the second step uses Newman's rational approximation (Fact~\ref{fact:newman}). \end{proof} \subsection{Threshold degree} Here, we use the halfspace $h_{n}$ constructed in our master theorem to study the degree required to sign-represent intersections of halfspaces. Our result is a lower bound of $\Omega(n)$ for the intersection $h_{n}\wedge h_{n}$ of two independent copies of $h_{n}.$ This result improves quadratically on the previous best construction~\cite{sherstov09hshs,sherstov09opthshs} and matches the trivial upper bound of $O(n)$ for sign-representing any Boolean function in $n$ variables. \begin{thm} \label{thm:degthr-h-h} Let $h_{n}\colon\zoon\to\moo$ be the halfspace constructed in Theorem~\emph{\ref{thm:rational-approx-h-REDUCTION-TO-SGN}}. Then \[ \degthr(h_{n}\wedge h_{n})=\Omega(n). \] \end{thm} \begin{proof} Abbreviate $D_{n}=\degthr(h_{n}\wedge h_{n}).$ Taking $f=g=h_{n}$ in Theorem~\ref{thm:sherstov-degthr-R} shows that $R(h_{n},4D_{n})<1/2,$ which by Theorem~\ref{thm:rational-approx-to-hs-LOWER} forces $D_{n}=\Omega(n).$ \end{proof} \noindent Theorem~\ref{thm:degthr-h-h} should be contrasted with the result of Beigel et al.~\cite{beigel91rational} that the conjunction of any constant number of majority functions on $\zoon$ has threshold degree $O(\log n).$ We now derive a lower bound of $\Omega(\sqrt{n\log n})$ on the threshold degree of the intersection of an explicitly given halfspace and a majority function, improving quadratically on the previous best construction~\cite{sherstov09hshs,sherstov09opthshs}. As we discuss shortly, the new construction is optimal up to a logarithmic factor. \begin{thm} \label{thm:degthr-h-maj} Let $h_{n}\colon\zoon\to\moo$ be the halfspace constructed in Theorem~\emph{\ref{thm:rational-approx-h-REDUCTION-TO-SGN}}. Then \begin{align} \degthr(h_{n}\wedge\MAJ_{n})=\Omega(\sqrt{n\log n}).\label{eqn:degthr-h-maj} \end{align} \end{thm} \begin{proof} Abbreviate $D_{n}=\degthr(h_{n}\wedge\MAJ_{n}).$ Then $R(h_{n},4D_{n})+R(\MAJ_{n},2D_{n})<1$ by Theorem~\ref{thm:sherstov-degthr-R}. The lower bounds for the rational approximation of $h_{n}$ and $\MAJ_{n}$ in Theorems~\ref{thm:rational-approx-MAJ} and~\ref{thm:rational-approx-to-hs-LOWER} now imply that $D_{n}=\Omega(\sqrt{n\log n}).$ \end{proof} \begin{rem} \label{rem:degthr-h-MAJ-upper}The construction of Theorem~\ref{thm:degthr-h-maj} is essentially the best possible, in that \begin{equation} \degthr(h\wedge\MAJ_{n})=O(\sqrt{n}\log n)\label{eq:h-MAJ-upper} \end{equation} for every halfspace $h\colon\zoon\to\moo.$ Indeed, taking $d=C\sqrt{n}\log n$ in Theorem~\ref{thm:rational-approx-MAJ} and Fact~\ref{fact:rational-approx-to-hs-UPPER} for a large enough constant $C\geq1$ yields $R(h,C\sqrt{n}\log n)+R(\MAJ_{n},C\sqrt{n}\log n)<1,$ which in turn implies~(\ref{eq:h-MAJ-upper}) in view of Theorem~\ref{thm:beigel-degthr-rational}. \end{rem} \subsection{Threshold density} In addition to threshold degree, several other complexity measures are of interest when sign-representing Boolean functions by real polynomials. One such complexity measure is \emph{threshold density}, defined as the least $k$ for which a given function can be sign-represented by a linear combination of $k$ parity functions. Formally, for a given function $f\colon\zoon\to\moo,$ its threshold density $\dns(f)$ is the minimum size $|\Scal|$ of a family $\Scal\subseteq\Pcal(\oneton)$ such that \begin{align*} f(x)\equiv\sign\left(\sum_{S\in\Scal}w_{S}(-1)^{\sum_{j\in S}x_{j}}\right) \end{align*} for some reals $w_{S}.$ It is clear from the definition that $\dns(f)\leq2^{n}$ for all functions $f\colon\zoon\to\moo,$ and we will now construct a pair of halfspaces whose intersection has threshold density $2^{\Theta(n)}.$ Prior to our work, the best construction~\cite{sherstov09hshs} had threshold density $2^{\Theta(\sqrt{n})}.$ \global\long\def\text{{\rm KP}}{\text{{\rm KP}}} To proceed, we recall a technique due to Krause and Pudlák~\cite{krause94depth2mod} that transforms Boolean functions with high threshold degree into Boolean functions with high threshold density. Their transformation works in a black-box manner and sends a function $f\colon\zoon\to\moo$ to the function $f^{\text{{\rm KP}}}\colon(\zoon)^{3}\to\moo$ defined by \begin{align*} f^{\text{{\rm KP}}}(x,y,z) & =f(\dots,(\overline{z_{i}}\wedge x_{i})\vee(z_{i}\wedge y_{i}),\dots). \end{align*} The threshold degree of $f$ and the threshold density of $f^{\text{{\rm KP}}}$ are related as follows~\cite[Proposition~2.1]{krause94depth2mod}. \begin{thm}[Krause and Pudlák] \label{thm:degree-length} For every function $f\colon\zoon\to\moo,$ \begin{align*} \dns(f^{\text{{\rm KP}}})\geq2^{\degthr(f)}. \end{align*} \end{thm} \noindent We are now in a position to obtain the claimed density results. \begin{thm} \label{thm:dns} There is an $($explicit$)$ algorithm that takes as input an integer $n\geq1,$ runs in time polynomial in $n,$ and outputs a halfspace $H_{n}\colon\zoon\to\moo$ such that \begin{align} \dns(H_{n}\wedge H_{n}) & =2^{\Omega(n)},\label{eqn:hh}\\ \dns(H_{n}\wedge\MAJ_{n}) & =2^{\Omega(\sqrt{n\log n})}.\label{eqn:hmajn} \end{align} \end{thm} \begin{proof} For any function $f\colon\zoon\to\zoo,$ standard arithmetization gives \begin{equation} f^{\text{{\rm KP}}}(x,y,z)=f\left(\ldots,\frac{1}{2}(x_{i}+y_{i}+x_{i}\oplus z_{i}-y_{i}\oplus z_{i}),\ldots\right),\label{eq:KP-arithmetic} \end{equation} where $a\oplus b\in\zoo$ denotes as usual the XOR of $a$ and $b$. Similarly, one has \begin{equation} \MAJ_{n}^{\text{{\rm KP}}}(x,y,z)=\MAJ_{4n}(x,y,x\oplus z,\overline{y\oplus z}),\label{eq:KP-MAJ} \end{equation} where the XOR and complement operations are applied bitwise. Let $h_{n}\colon\zoon\to\moo$ be the halfspace from Theorem~\ref{thm:degthr-h-h}, so that $h_{n}\wedge h_{n}$ has threshold degree $\Omega(n).$ By Theorem~\ref{thm:degree-length}, the function $(h_{n}\wedge h_{n})^{\text{{\rm KP}}}=h_{n}^{\text{{\rm KP}}}\wedge h_{n}^{\text{{\rm KP}}}$ has threshold density $2^{\Omega(n)}.$ Observe from~(\ref{eq:KP-arithmetic}) that $h_{n}^{\text{{\rm KP}}}\wedge h_{n}^{\text{{\rm KP}}}$ is the result of starting with the intersection $H_{4n}\wedge H_{4n}$ of two explicitly given halfspaces in $4n$ variables each, and replacing their input variables with appropriately chosen parity functions. This replacement cannot increase the threshold density because the parity of several parity functions is another parity function. We conclude that $\dns(H_{4n}\wedge H_{4n})=2^{\Omega(n)}.$ This completes the proof of (\ref{eqn:hh}). The proof of (\ref{eqn:hmajn}) is closely analogous. Specifically, recall from Theorem~\ref{thm:degthr-h-maj} that $h_{n}\wedge\MAJ_{n}$ has threshold degree $\Omega(\sqrt{n\log n}).$ By Theorem~\ref{thm:degree-length}, the function $(h_{n}\wedge\MAJ_{n})^{\text{{\rm KP}}}=h_{n}^{\text{{\rm KP}}}\wedge\MAJ_{n}^{\text{{\rm KP}}}$ has threshold density $\exp(\Omega(\sqrt{n\log n})).$ It follows from~(\ref{eq:KP-arithmetic}) and~(\ref{eq:KP-MAJ}) that $h_{n}^{\text{{\rm KP}}}\wedge\MAJ_{n}^{\text{{\rm KP}}}$ is the result of starting with the intersection $H_{4n}\wedge\MAJ_{4n}$ for an explicit halfspace $H_{4n}$ in $4n$ variables, and replacing the input variables with appropriately chosen parity functions or their negations. This replacement cannot increase the threshold density because the parity of several parity functions is another parity function. We conclude that $\dns(H_{4n}\wedge\MAJ_{4n})=\exp(\Omega(\sqrt{n\log n})).$ This completes the proof of (\ref{eqn:hmajn}). \end{proof} \noindent Both lower bounds in Theorem~\ref{thm:dns} are essentially the best possible for any halfspace $H_{n}\colon\zoon\to\moo$. Indeed, the first lower bound is tight by definition, while the second lower bound nearly matches the upper bound of $\exp(O(\sqrt{n}\log^{2}n))$ that follows from Remark~\ref{rem:degthr-h-MAJ-upper}. \subsection{Communication complexity} Using the pattern matrix method, we will now ``lift'' the approximation lower bound of Theorem~\ref{thm:polynomial-approx-hs-LOWER} to communication complexity. As a result, we will obtain an explicit separation of $k$-party communication complexity with unbounded and weakly unbounded error (which for $k=2$ is equivalent to a separation of sign-rank and discrepancy). Our application of the pattern matrix method is based on the fact that the unique set disjointness function $\UDISJ_{m,k}$ has an exact representation on its domain as a polynomial with a small number of monomials; cf.~\cite[Section~10]{sherstov07quantum}, \cite[Section~4.2.3]{thaler14omb}, and~\cite[Section~3.1]{sherstov16multiparty-pp-upp}. Specifically, define $\UDISJ_{m,k}^{*}\colon(\zoo^{m})^{k}\to\Re$ by \[ \UDISJ_{m,k}^{*}(x)=-1+2\sum_{i=1}^{m}x_{1,i}x_{2,i}\cdots x_{k,i}\,. \] Then \begin{align} \UDISJ_{m,k}(x)=\UDISJ_{m,k}^{*}(x), & & x\in\dom\UDISJ_{m,k}.\label{eq:udisj-linear-poly} \end{align} \begin{thm} \label{thm:pp-upp}For some constant $C>1$ and all positive integers $n$ and $k,$ there is an $($explicitly given$)$ $k$-party communication problem $F_{n,k}\colon(\zoon)^{k}\to\moo$ such that \begin{align} \upp(F_{n,k}) & \leq\log n+4,\label{eq:Fnk-upp}\\ \pp(F_{n,k}) & \geq\left\lfloor \frac{n}{C\cdot4^{k}}\right\rfloor ,\label{eq:Fnk-pp}\\ \disc(F_{n,k}) & \leq\exp\left(-\left\lfloor \frac{n}{C\cdot4^{k}}\right\rfloor \right).\label{eq:Fnk-disc} \end{align} Moreover, \begin{align} F_{n,k}(x_{1},x_{2},\ldots,x_{k})=\sign\left(w_{0}+\sum_{i=1}^{n}w_{i}x_{1,i}x_{2,i}\cdots x_{k,i}\right)\label{eq:Fnk-form} \end{align} for some explicitly given reals $w_{0},w_{1},\dots,w_{n}$. \end{thm} \begin{proof} Let $h_{n}\colon\zoon\to\moo$ be the halfspace constructed in Theorem~\ref{thm:rational-approx-h-REDUCTION-TO-SGN}. Then by definition, $h_{n}(x)=\sign p_{n}(x)$ for a linear polynomial $p_{n}\colon\Re^{n}\to\Re$. Moreover, Theorem~\ref{thm:polynomial-approx-hs-LOWER} ensures that \begin{align} \deg_{1-2^{-cn}}(h_{n})\geq cn\label{eq:poly-approx-error-h} \end{align} for some constant $c>0$ independent of $n$. Abbreviate $m=\lceil2^{k+1}\e/c\rceil^{2}$ and consider the $k$-party communication problem $F'_{n,k}\colon(\zoo^{nm})^{k}\to\moo$ given by \begin{equation} F'_{n,k}=\Sgn\,p_{n}\!\left(\frac{1-\UDISJ_{m,k}^{*}}{2},\frac{1-\UDISJ_{m,k}^{*}}{2},\ldots,\frac{1-\UDISJ_{m,k}^{*}}{2}\right),\label{eq:Fnk-prime-def} \end{equation} where the right-hand side features the coordinatewise composition of the polynomial $p_{n}$ with $n$ independent copies of the polynomial $(1-\UDISJ_{m,k}^{*})/2$. The identity (\ref{eq:udisj-linear-poly}) implies that $F'_{n,k}$ coincides with $h_{n}\circ\UDISJ_{m,k}$ on the domain of the latter. Therefore, \begin{align} \disc(F'_{n,k}) & \leq\disc(h_{n}\circ\UDISJ_{m,k})\nonumber \\ & \leq2^{-cn}+2^{-cn}\nonumber \\ & =2\cdot2^{-cn},\label{eq:Fnk-prime-disc} \end{align} where the second step uses~(\ref{eq:poly-approx-error-h}) and the pattern matrix method (Theorem~\ref{thm:pm-large-adeg}). Applying the discrepancy method (Corollary~\ref{cor:dm}), we obtain \begin{align} \pp(F'_{n,k}) & \geq\log\frac{2}{\disc(F_{n,k}')}\nonumber \\ & \geq cn.\label{eq:Fnk-prime-pp} \end{align} To complete the proof, define the functions $F_{n,k}$ for any positive integers $n$ and $k$ by \[ F_{n,k}=\begin{cases} F'_{\lfloor n/\lceil2^{k+1}\e/c\rceil^{2}\rfloor,k} & \text{if }n\geq\lceil2^{k+1}\e/c\rceil^{2},\\ 0 & \text{otherwise.} \end{cases} \] Then (\ref{eq:Fnk-pp})\textendash (\ref{eq:Fnk-form}) are immediate from~(\ref{eq:Fnk-prime-def})\textendash (\ref{eq:Fnk-prime-pp}), whereas~(\ref{eq:Fnk-upp}) is a consequence of~(\ref{eq:Fnk-form}) and Fact~\ref{fact:upp-upper-bound}. \end{proof} \noindent Theorem~\ref{thm:pp-upp} gives an explicit separation $\PP_{k}\subsetneq\UPP_{k}$ for up to $k\leq(0.5-\epsilon)\log n$ parties, where $\epsilon>0$ is an arbitrary constant. The special case $k=2$ can be equivalently stated as an explicit separation of sign-rank and discrepancy: \begin{cor} \label{cor:pp-upp-2-party}There is an $($explicitly given$)$ family $\{F_{n}\}_{n=1}^{\infty}$ of communication problems $F_{n}\colon\zoon\times\zoon\to\moo$ with \begin{align} \srank(F_{n}) & \leq n+1,\label{eq:Fn-srank}\\ \disc(F_{n}) & =2^{-\Omega(n)},\label{eq:Fn-disc}\\ \upp(F_{n}) & \leq\log n+4,\label{eq:Fn-upp}\\ \pp(F_{n}) & =\Omega(n).\label{eq:Fn-pp} \end{align} Moreover, \begin{align} F_{n}(x,y)=\sign\left(w_{0}+\sum_{i=1}^{n}w_{i}x_{i}y_{i}\right)\label{eq:Fn-form} \end{align} for some explicitly given reals $w_{0},w_{1},\dots,w_{n}$. \end{cor} \begin{proof} Equations~(\ref{eq:Fn-disc})\textendash (\ref{eq:Fn-form}) result from setting $k=2$ in Theorem~\ref{thm:pp-upp}. The new item,~(\ref{eq:Fn-srank}), is immediate from~(\ref{eq:Fn-form}). \end{proof} \noindent Theorem~\ref{thm:pp-upp} and Corollary~\ref{cor:pp-upp-2-party} settle Theorems~\ref{thm:MAIN-pp-upp-multiparty} and~\ref{thm:MAIN-pp-upp}, respectively, from the introduction. \subsection{\label{subsec:A-circulant-expander}A circulant expander} Consider a $d$-regular undirected graph $G$ on $n$ vertices, with adjacency matrix $A.$ Since $A$ is symmetric, it has $n$ real eigenvalues (counting multiplicities). We denote these eigenvalues by $\lambda_{1}(G)\geq\lambda_{2}(G)\geq\cdots\geq\lambda_{n}(G)$ and define $\lambda(G)=\max\{|\lambda_{2}(G)|,|\lambda_{3}(G)|,\ldots,|\lambda_{n}(G)|\}$. It is well known and straightforward to verify that $\lambda_{1}(G)=d$ and $|\lambda_{i}(G)|\leq d$ for $i=2,3,\ldots,n.$ We say that $G$ is an \emph{$\epsilon$-expander} if $\lambda(G)\leq\epsilon d.$ This spectral notion is intimately related to key graph-theoretic and stochastic properties of $G$, such as vertex expansion and the convergence rate of a random walk on $G$ to the uniform distribution. One is typically interested in $\epsilon$-expanders that are $d$-regular for $d$ as small as possible, where $0<\epsilon<1$ is a constant. The existence of expanders with strong parameters can be verified using the probabilistic method~\cite{alon-spencer08probab-method}, and explicit constructions are known as well. In this section, we study the problem of constructing \emph{circulant }expanders. Formally, a graph is \emph{circulant} if its adjacency matrix is circulant. It is clear that a circulant graph is $d$-regular for some $d$, meaning that every vertex has out-degree $d$ and in-degree $d.$ We focus on circulant graphs that are undirected and have no self-loops, which corresponds to adjacency matrices that are symmetric and have zeroes on the diagonal. It is well known~\cite{alon-roichman94rando-cayley-graphs-and-expanders} that for any $0<\epsilon<1$ and all large enough $n$, there exists a circulant $\epsilon$-expander on $n$ vertices of degree $O(\log n)$. This degree bound is asymptotically optimal~\cite{alon-roichman94rando-cayley-graphs-and-expanders,fmt06spectral-estimates-for-cayley-graphs,lns11nonexistence-circular-expander}, and the problem of constructing such circulant expanders explicitly has been studied by several authors~\cite{alon86,AIKPS90aperiodic-set,alon-roichman94rando-cayley-graphs-and-expanders}. The best construction prior to our work, due to Ajtai et al.~\cite{AIKPS90aperiodic-set}, achieves degree $(\log^{*}n)^{O(\log^{*}n)}\log n$. In this section, we construct a circulant $\epsilon$-expander of optimal degree, $O(\log n)$, for any constant $0<\epsilon<1$. By way of terminology, recall that the adjacency matrix of a circulant graph on $n$ vertices is $\circulant(\1_{S})$ for some subset $S\subseteq\{0,1,2,\ldots,n-1\}.$ With this in mind, we say that an algorithm \emph{constructs a circulant graph on $n$ vertices in time $T(n)$} if the algorithm outputs in time $T(n)$ the elements of the associated subset $S$. The formal statement of our result follows. \begin{thm} \label{thm:circulant-expander}Let $0<\epsilon<1$ be given. Then there is an $($explicitly given$)$ algorithm that takes as input an integer $n\geq2$ and constructs in time polynomial in $\log n$ an undirected simple $d$-regular circulant graph $G_{n}$ on $n$ vertices, where \begin{align} & 1\leq d\leq O(\log n),\label{eq:thm-expander-degree}\\ & \lambda(G_{n})\leq\max\left\{ \epsilon,\frac{1}{n-1}\right\} d.\label{eq:thm-expander-gap} \end{align} \end{thm} \begin{proof} Let $C_{\epsilon}$ be the constant from Theorem~\ref{thm:explicit-set-small-Fourier-coeffs}. We first consider the trivial case when $2(C_{\epsilon}\log n)^{2}\geq n,$ which means that $n$ is bounded by an explicit constant. In this case, we take $G_{n}$ to be the complete graph on $n$ vertices. It is clear that $G_{n}$ is a $d$-regular circulant graph for $d=n-1.$ The adjacency matrix of $G_{n}$ is $\circulant(0,1,1,\ldots,1)$, whose eigenvalues by Corollary~\ref{cor:circulant-diagonalization} are $n-1,-1,-1,\ldots,-1$. In particular, $\lambda(G_{n})=1=d/(n-1).$ This settles~(\ref{eq:thm-expander-gap}), whereas~(\ref{eq:thm-expander-degree}) holds trivially because $d$ and $n$ are bounded by a constant. We now turn to the nontrivial case when $2(C_{\epsilon}\log n)^{2}<n.$ The algorithm of Theorem~\ref{thm:explicit-set-small-Fourier-coeffs} constructs, in time polynomial in $\log n,$ a set $Z\subseteq\{0,1,2,\ldots,n-1\}$ with \begin{align} & \disc(Z,n)\leq\epsilon,\label{eq:disc-Z-expander}\\ & 1\leq|Z|\leq C_{\epsilon}\log n.\label{eq:Z-cardinality-expander} \end{align} For any $z,z'\in Z,$ the linear congruence $z+\Delta\equiv-(z'+\Delta)\pmod n$ has at most two solutions $\Delta\in\{0,1,2,\ldots,n-1\}.$ Recalling that $2|Z|^{2}<n$ in the case under consideration, we conclude that there exists $\Delta\in\{0,1,2,\ldots,2|Z|^{2}\}$ with \begin{equation} z+\Delta\not\equiv-(z'+\Delta)\pmod n,\qquad\qquad\qquad\qquad z,z'\in Z.\label{eq:magic-translate} \end{equation} Moreover, such $\Delta$ can clearly be found by brute force search in time polynomial in $|Z|=O(\log n).$ Equation~(\ref{eq:magic-translate}) now implies that no two elements of the multiset $(Z\cup\Delta)\cup(-Z-\Delta)$ are congruent modulo $n,$ and in particular no element of $Z\cup\Delta$ is congruent to $0$ modulo $n.$ We define $G_{n}$ to be the undirected graph with vertex set $\{0,1,2,\ldots,n-1\}$ in which $(i,j)$ is an edge if and only if $i-j$ is congruent modulo $n$ to an element of $(Z+\Delta)\cup(-Z-\Delta).$ The roles of $i$ and $j$ in this definition are symmetric, making $G_{n}$ an undirected graph. It is obvious that the adjacency matrix of $G_{n}$ is circulant. Furthermore, $G_{n}$ has no self-loops because by construction no element of $Z\cup\Delta$ is congruent to $0$ modulo $n$. Since the elements of $(Z+\Delta)\cup(-Z-\Delta)$ are pairwise distinct modulo $n,$ the degree of $G_{n}$ is $|(Z+\Delta)\cup(-Z-\Delta)|=2|Z|.$ Now~(\ref{eq:thm-expander-degree}) follows from~(\ref{eq:Z-cardinality-expander}). To settle the remaining property~(\ref{eq:thm-expander-gap}), observe that the first row of the adjacency matrix of $G_{n}$ is the characteristic vector of the set $((Z+\Delta)\cup(-Z-\Delta))\bmod n$. As a result, Corollary~\ref{cor:circulant-diagonalization} implies that the eigenvalues of the adjacency matrix of $G_{n}$ are \begin{align*} \sum_{z\in Z+\Delta}\omega^{kz}+\sum_{z\in-Z-\Delta}\omega^{kz}, & & k=0,1,2,\ldots,n-1, \end{align*} where $\omega$ is a primitive $n$-th root of unity. Setting $k=0$ yields the largest eigenvalue, $2|Z|$. The other eigenvalues are bounded by \begin{align*} \lambda(G_{n}) & =\max_{k=1,2,\ldots,n-1}\left|\sum_{z\in Z+\Delta}\omega^{kz}+\sum_{z\in-Z-\Delta}\omega^{kz}\right|\\ & \leq\max_{k=1,2,\ldots,n-1}\left|\sum_{z\in Z+\Delta}\omega^{kz}\right|+\max_{k=1,2,\ldots,n-1}\left|\sum_{z\in-Z-\Delta}\omega^{kz}\right|\\ & =2|Z|\disc(Z,n). \end{align*} Along with~(\ref{eq:disc-Z-expander}), this proves~(\ref{eq:thm-expander-gap}). \end{proof} \section*{Acknowledgments} I am thankful to Mark Bun, T.~S.~Jayram, Ryan O'Donnell, Rocco Servedio, and Justin Thaler for valuable comments on this work. Special thanks to T.~S.~Jayram for allowing me to include his short and elegant proof of Fact~\ref{fact:number-solutions-linear-form}. \bibliographystyle{siamplain}
\section{Introduction} \noindent Smooth, complex Fano varieties play an important role in projective geometry, both from the classical and modern point of view, in the framework of the Minimal Model Program. There are finitely many families of Fano varieties of any given dimension, which are classified up to dimension $3$ -- the classification of Fano $3$-folds was achieved more than 30 years ago, see \cite{fanoEMS} and references therein. In dimensions $4$ and higher there is no classification apart from some special classes, and we still lack a good understanding of the geometry of Fano $4$-folds. This paper is part of a program to study Fano $4$-folds $X$ with large Picard number $\rho_X$, by means of birational geometry, more precisely via the study of contractions and flips of Fano $4$-folds. Our goal is to get a sharp bound on $\rho_X$, and possibly to classify Fano $4$-folds $X$ with ``large'' Picard number. Let us notice that, among the known examples of Fano $4$-folds, products of del Pezzo surfaces have $\rho_X\leq 18$, and the others have $\rho_X\leq 9$ (see \cite{vb} for the case $\rho_X=9$). In this paper we focus on Fano $4$-folds $X$ having a rational contraction of fiber type. Here a \emph{contraction} is a morphism $f\colon X\to Y$ with connected fibers onto a normal projective variety. More generally, a \emph{rational contraction} is a rational map $f\colon X\dasharrow Y$ that can be factored as $X\stackrel{\varphi}{\dasharrow}X'\stackrel{f'}{\to}Y$, where $X'$ is a normal and $\mathbb{Q}$-factorial projective variety, $\varphi$ is birational and an isomorphism in codimension $1$, and $f'$ is a contraction. As usual, $f$ is of fiber type if $\dim Y<\dim X$. Note that $X$ has a non-constant rational contraction of fiber type if and only if there is a non-zero, non-big movable divisor. Our main results are the following. \begin{thm}\label{main} Let $X$ be a smooth Fano $4$-fold with a rational contraction of fiber type $f\colon X\dasharrow Y$, where $\dim Y>0$. If $Y\not\cong\mathbb{P}^1$ and $Y\not\cong\mathbb{P}^2$, then $\rho_X\leq 18$, with equality only if $X$ is a product of surfaces. \end{thm} \begin{thm}\label{rationalfibration} Let $X$ be a smooth Fano $4$-fold. Suppose that there exists a dominant rational map $f\colon X\dasharrow Y$, regular and proper on an open subset of $X$, with $\dim Y=3$. Then either $X$ is a product of surfaces, or $\rho_X\leq 12$. \end{thm} Let us say something on the techniques and strategy used in the paper. We consider the following classes of rational contractions of fiber type: $$\{\text{``quasi-elementary''}\}\ \subset\ \{\text{``special''}\}\ \subset\ \{\text{general}\}.$$ Quasi-elementary rational contractions of fiber type have been introduced in \cite{fanos,eff} (see \S \ref{secquasiel} for more details); when $f$ is quasi-elementary Th.~\ref{main} is already known (ibidem), and one can even allow $Y\cong\mathbb{P}^1$ and $Y\cong\mathbb{P}^2$. In this paper we introduce a more general notion, that of ``special'' rational contraction of fiber type, which plays a key role in the proof of Th.~\ref{main}. We define special (regular and rational) contractions in \S \ref{secspecial}; then we show that every rational contraction of fiber type of a Mori dream space can be factored as a special rational contraction, followed by a birational map (Prop.~\ref{factorization1}). In particular, if a Fano variety has a rational contraction of fiber type, then it also has a special rational contraction of fiber type, so that we can reduce to prove Th.~\ref{main} when $f$ is special. Secondly, we show that up to flips, every special rational contraction of a Mori dream space can be factored as a sequence of elementary divisorial contractions, followed by a quasi-elementary contraction (Th.~\ref{factorization2}). This allows to relate the study of special rational contractions of Fano $4$-folds $X$ to our previous study of elementary divisorial contractions and quasi-elementary contractions of $4$-folds obtained from $X$ with a sequence of flips, in \cite{eff,blowup}. Another key ingredient used in the paper is the Lefschetz defect $\delta_X$, an invariant of $X$ which basically allows to bound $\rho_X$ in terms of the Picard number of prime divisors in $X$ (see \S \ref{prelLD} for an account). After developing the necessary techniques and preliminary results in \S\S \ref{special} - \ref{sanfrancisco}, we prove Th.~\ref{main} first in the case where $\dim Y=2$ in \S \ref{sec_surf}, and then in the case where $\dim Y=3$ in \S \ref{sec_3folds}. Th.~\ref{rationalfibration} is then an easy consequence of the case where $\dim Y=3$. \medskip \noindent{\bf Acknowledgments.} I am grateful to St\'ephane Druel for important suggestions. \subsection{Notation and terminology}\label{terminology} \noindent If $\mathcal{N}$ is a finite-dimensional real vector space and $a_1,\dotsc,a_r\in \mathcal{N}$, $\langle a_1,\dotsc,a_r\rangle$ denotes the convex cone in $\mathcal{N}$ generated by $a_1,\dotsc,a_r$. Moreover, for every $a\neq 0$, $a^{\perp}$ is the hyperplane orthogonal to $a$ in the dual vector space $\mathcal{N}^*$. We refer the reader to \cite{hukeel} for the notion of Mori dream space; \emph{we always assume that a Mori dream space is projective, normal and $\mathbb{Q}$-factorial}. We recall that Fano varieties are Mori dream spaces by \cite[Cor.~1.3.2]{BCHM}. We also refer to \cite{kollarmori} for the standard notions in birational geometry, in particular the definition of flip \cite[Def.~6.5]{kollarmori} Let $X$ be a normal and $\mathbb{Q}$-factorial projective variety. A small $\mathbb{Q}$-factorial modification (SQM) is a birational map $\varphi\colon X \dasharrow X'$ which is an isomorphism in codimension one, where $X'$ is a normal and $\mathbb{Q}$-factorial projective variety. If $X$ is a Mori dream space, every SQM can be factored as a finite sequence of flips. Let $f\colon X\to Y$ be an elementary contraction, namely a contraction with $\rho_X-\rho_Y=1$. We say that $f$ is of type $(a,b)$ if $\dim\operatorname{Exc}(f)=a$ and $\dim f(\operatorname{Exc}(f))=b$. We say that $f$ is of type $(\dim X-1,b)^{sm}$ if it is the blow-up of a smooth $b$-dimensional subvariety of $Y$, contained in $Y_{reg}$. If $X$ is a smooth $4$-fold, we say that $f$ is of type $(3,0)^Q$ if $f$ is of type $(3,0)$, $\operatorname{Exc}(f)$ is isomorphic to an irreducible quadric $Q$, and $\mathcal{N}_{\operatorname{Exc}(f)/X}\cong \mathcal{O}_Q(-1)$. Let $D$ be a divisor. A contraction $f\colon X\to Y$ is $D$-negative (respectively, $D$-positive) if there exists $m\in\mathbb{Z}_{>0}$ such that $-mD$ (respectively, $mD$) is Cartier and $f$-ample. A $D$-negative flip is the flip of a small, $D$-negative elementary contraction, and similarly for $D$-positive. \emph{We do not assume that contractions or flips are $K$-negative, unless specified.} When $X$ is a Mori dream space, given a contraction $f\colon X\to Y$ and a divisor $D$ in $X$, one can run a MMP for $D$ relative to $f$. This means that there exists a birational map $\psi\colon X\dasharrow X'$, given by a composition of $D$-negative flips and elementary divisorial contractions, such that $f':=f\circ\psi^{-1}\colon X'\to Y$ is regular, and if $D'$ is the transform of $D$ in $X'$, then either $D'$ is $f'$-nef, or $f'$ factors through a $D'$-negative elementary contraction of fiber type of $X'$. A movable divisor is an effective divisor $D$ such that the stable base locus of the linear system $|D|$ has codimension $\geq 2$. A fixed prime divisor is a prime divisor $D$ which is the stable base locus of $|D|$. We will consider the usual cones of divisors and of curves: $$\operatorname{Nef}(X)\subseteq\operatorname{Mov}(X)\subseteq\operatorname{Eff}(X)\subset\mathcal{N}^1(X),\qquad \operatorname{mov}(X)\subseteq \operatorname{NE}(X)\subset\mathcal{N}_1(X),$$ where all the notations are standard except $\operatorname{mov}(X)$, which is the convex cone generated by classes of curves moving in a family covering $X$. When $X$ is a Mori dream space, all these cones are closed, rational and polyhedral. If $D$ is a divisor and $C$ is a curve in $X$, we denote by $[D]\in\mathcal{N}^1(X)$ and $[C]\in\mathcal{N}_1(X)$ their numerical equivalence classes. For every closed subset $Z\subset X$, we denote by $\mathcal{N}_1(Z,X)$ the linear subspace of $\mathcal{N}_1(X)$ spanned by classes of curves contained in $Z$. We will use the following simple property. \begin{remark}\label{caffe} Let $D$ be a prime divisor. If $Z\cap D=\emptyset$, then $\mathcal{N}_1(Z,X)\subseteq D^{\perp}$, in particular $\mathcal{N}_1(Z,X)\subsetneq \mathcal{N}_1(X)$. This is because $D\cdot C=0$ for every curve $C\subset Z$. \end{remark} Let $X$ be a smooth $4$-fold. An \emph{exceptional plane} is a closed subset $L\subset X$ such that $L\cong\mathbb{P}^2$ and $\mathcal{N}_{L/X}\cong\mathcal{O}_{\mathbb{P}^2}(-1)^{\oplus 2}$; an \emph{exceptional line} is a closed subset $\ell\subset X$ such that $\ell\cong\mathbb{P}^1$ and $\mathcal{N}_{\ell/X}\cong\mathcal{O}_{\mathbb{P}^1}(-1)^{\oplus 3}$. \section{Special contractions of fiber type}\label{special} \noindent When studying Fano varieties, or more generally Mori dream spaces, one often needs to consider contractions of fiber type $f\colon X\to Y$ which are not elementary. In full generality, such contractions are hard to deal with, in particular $Y$ may be very singular and/or non $\mathbb{Q}$-factorial. For this reason, it is useful to introduce some classes of contractions of fiber type with good properties, which should include the elementary case. A first notion of this type is that of ``quasi-elementary'' contraction; we briefly recall this definition and some properties in \S \ref{secquasiel}. Here we introduce a more general notion, that of ``special'' contraction of fiber type. In \S \ref{secspecial} we define special contractions, in the regular and rational case; the target is automatically $\mathbb{Q}$-factorial. In \S \ref{secfactorizations} we show two factorization results for rational contractions of fiber type of Mori dream spaces. More precisely, we show that every rational contraction of fiber type of a Mori dream space can be factored as a special rational contraction, followed by a birational map (Prop.~\ref{factorization1}). Moreover, up to flips, every special rational contraction of a Mori dream space can be factored as a sequence of elementary divisorial contractions, followed by a quasi-elementary contraction (Th.~\ref{factorization2}). Finally, in \S \ref{secsingularities} we consider special contractions of fiber type $f\colon X\to Y$ which are also $(K+\Delta)$-negative for a suitable boundary $\Delta$ on $X$, and we show that if $X$ has good singularities, then $Y$ has good singularities too. \subsection{Quasi-elementary contractions}\label{secquasiel} \noindent We refer the reader to \cite[\S 2.2]{eff} and \cite{fanos} for the notion of quasi-elementary contraction of fiber type; here we just recall the definition. \begin{definition}[quasi-elementary contraction] Let $X$ be a normal and $\mathbb{Q}$-factorial projective variety and $f\colon X\to Y$ a contraction of fiber type. We say that $f$ is quasi-elementary if for every fiber $F$ of $f$ we have $\mathcal{N}_1(F,X)=\ker f_*$, where $f_*\colon\mathcal{N}_1(X)\to\mathcal{N}_1(Y)$ is the push-forward of one-cycles (see \S \ref{terminology} for $\mathcal{N}_1(F,X)$). \end{definition} Let us give an equivalent characterization, for Mori dream spaces. \begin{proposition}\label{quasiel} Let $X$ be a Mori dream space and $f\colon X\to Y$ a contraction of fiber type. The following are equivalent: \begin{enumerate}[$(i)$] \item $f$ is quasi-elementary; \item for every prime divisor $D$ in $X$, either $f(D)=Y$, or $D=\lambda f^*B$ for some $\mathbb{Q}$-Cartier prime divisor $B$ in $Y$ and $\lambda\in\mathbb{Q}_{> 0}$; \item $Y$ is $\mathbb{Q}$-factorial and for every prime divisor $B$ in $Y$, the pull-back $f^*B$ is irreducible (but possibly non-reduced). \end{enumerate} \end{proposition} \begin{proof} Let $F\subset X$ be a general fiber of $f$. $(i)\Rightarrow (iii)\ $ The target $Y$ is $\mathbb{Q}$-factorial by \cite[proof of Rem.~2.26]{eff}. Let $B$ be a prime divisor in $Y$, and let $D$ be an irreducible component of $f^*B$. Then $D\cap F=\emptyset$, so that $\mathcal{N}_1(F,X)\subseteq D^{\perp}$ by Rem.~\ref{caffe}. Since $f$ is quasi-elementary, we have $\mathcal{N}_1(F,X)=\ker f_*$, hence $\ker f_*\subseteq D^{\perp}$, and $D$ is the pull-back of a $\mathbb{Q}$-divisor in $Y$ (see \cite[Rem.~2.9]{eff}). Since $B=f(D)$, we must have $D=\lambda f^*B$ with $\lambda\in\mathbb{Q}_{> 0}$, so $f^*B$ is irreducible. \medskip $(ii)\Rightarrow (i)\ $ Let $\sigma$ be the minimal face of $\operatorname{Eff}(X)$ containing $f^*(\operatorname{Nef}(Y))$; by \cite[Lemma 2.21 and Prop.~2.22]{eff} we have $\sigma=\operatorname{Eff}(X)\cap\mathcal{N}_1(F,X)^{\perp}$, and $f$ is quasi-elementary if and only if $\dim\sigma=\rho_Y$. Suppose that $f$ is not quasi-elementary. Then $\dim\sigma>\rho_Y$, so that $\sigma\not\subseteq f^*\mathcal{N}^1(Y)$, and there exists a one-dimensional face $\tau$ of $\sigma$ such that $\tau \not\subseteq f^*\mathcal{N}^1(Y)$. Let $D\subset X$ be a prime divisor with $[D]\in\tau$. Then $D$ is not the pull-back of a $\mathbb{Q}$-Cartier prime divisor in $Y$. On the other hand, we also have $[D]\in \mathcal{N}_1(F,X)^{\perp}$, so that $D\cdot C=0$ for every curve $C\subset F$. Since $F\not\subset D$, we must have $F\cap D=\emptyset$, hence $f(D)\subsetneq Y$. \medskip $(iii)\Rightarrow (ii)\ $ Let $D\subset X$ be a prime divisor which does not dominate $Y$. Let $B\subset Y$ be a prime divisor containing $f(D)$. Then $B$ is $\mathbb{Q}$-Cartier, and $D$ is an irreducible component of $f^*B$, hence $f^*B=\mu D$ with $\mu\in\mathbb{Q}_{> 0}$. \end{proof} \subsection{Special contractions}\label{secspecial} \begin{definition}[special contraction] Let $X$ be a normal and $\mathbb{Q}$-factorial projective variety and $f\colon X\to Y$ a contraction of fiber type. We say that $f$ is special if for every prime divisor $D\subset X$ we have that either $f(D)=Y$, or $f(D)$ is a $\mathbb{Q}$-Cartier prime divisor in $Y$. \end{definition} \begin{remark}\label{Qfact} Let $X$ be a normal and $\mathbb{Q}$-factorial projective variety and $f\colon X\to Y$ a contraction of fiber type. Then $f$ is special if and only if the following conditions hold: \begin{enumerate}[(1)] \item $\operatorname{codim} f(D)\leq 1$ for every prime divisor $D\subset X$; \item $Y$ is $\mathbb{Q}$-factorial. \end{enumerate} \end{remark} Condition (1) above is not enough to ensure that $Y$ is $\mathbb{Q}$-factorial, as the following simple example shows. \begin{example} Set $Z:=\mathbb{P}_{\mathbb{P}^2}(\mathcal{O}\oplus\mathcal{O}(1)\oplus\mathcal{O}(1))$, $X:=Z\times\mathbb{P}^1$, and let $\pi\colon X\to Z$ be the projection. Then $Z$ has a small elementary contraction $g\colon Z\to Y$, and $f:=g\circ\pi\colon X\to Y$ satisfies (1) but not (2), in particular it is not special. Note that $X$ is Fano and $f$ is $K$-negative. \end{example} \begin{remark}\label{unico} Let $X$ be a normal and $\mathbb{Q}$-factorial projective variety and $f\colon X\to Y$ a contraction of fiber type. \begin{enumerate}[$(a)$] \item If $X$ is a Mori dream space and $f$ is elementary, or quasi-elementary, then $f$ is special by Prop.~\ref{quasiel}. \item\label{equidimensional} If $f$ is special, then the locus where $f$ is not equidimensional has codimension at least $3$ in $Y$. \item\label{ind} Let $f$ be special, and $\varphi\colon X\dasharrow X'$ a SQM such that $f':=f\circ\varphi^{-1}$ is regular. Then $f'$ is special. \end{enumerate} \end{remark} The following is a consequence of \cite[Lemma 2.6]{druelcodone}. \begin{lemma}\label{kollar} Let $X$ be a normal and $\mathbb{Q}$-factorial projective variety and $f\colon X\to Y$ a contraction of fiber type. If $f$ is equidimensional, then $Y$ is $\mathbb{Q}$-factorial and $f$ is special. \end{lemma} \begin{definition}[special rational contraction] Let $X$ be a normal and $\mathbb{Q}$-factorial projective variety and $f\colon X\dasharrow Y$ a rational contraction of fiber type. We say that $f$ is special if there exists a SQM $\varphi\colon X\dasharrow X'$ such that $f':=f\circ\varphi^{-1}$ is regular and special. \end{definition} \begin{remark}\label{Qfactrat} If $f\colon X\dasharrow Y$ is special, then: \begin{enumerate}[--] \item $Y$ is $\mathbb{Q}$-factorial, by Rem.~\ref{Qfact}; \item for every SQM $\varphi\colon X\dasharrow X'$ such that $f':=f\circ\varphi^{-1}$ is regular, we have that $f'$ is special, by Rem.~\ref{unico}$(\ref{ind})$. \end{enumerate} \end{remark} In the next subsection we will prove the following characterization of special rational contractions of Mori dream spaces. \begin{proposition}\label{milano} Let $X$ be a Mori dream space and $f\colon X\dasharrow Y$ a rational contraction of fiber type. Then $f$ is special if and only if $f$ cannot be factored as: $$\xymatrix{X\ar@{-->}[r]_{g}\ar@{-->}@/^1pc/[rr]^{f}&{Z}\ar@{-->}[r]_h& {Y} }$$ where $g$ is a rational contraction, $h$ is birational, and $\rho_Z>\rho_Y$. \end{proposition} \subsection{Factorizations}\label{secfactorizations} \noindent We start this subsection with a construction that will be used in the proofs of two factorization results, Prop.~\ref{factorization1} and Th.~\ref{factorization2}. \begin{construction}\label{constr} Let $X$ be a Mori dream space, $f\colon X\to Y$ a contraction, and $D\subset X$ a prime divisor such that $f(D)\subsetneq Y$. Let us run a MMP for $-D$, relative to $f$ (see \S \ref{terminology}). We get a commutative diagram: \stepcounter{thm} \begin{equation}\label{diagram} \xymatrix{X\ar[d]_f\ar@{-->}[r]^{\psi}&{W}\ar[dl]_{f_W}\ar[d]^j \\ Y& T\ar[l]^{k} }\end{equation} where $W$ is $\mathbb{Q}$-factorial, $\psi$ is a composition of $D$-positive flips and divisorial contractions (in particular $D$ cannot be exceptional for $\psi$, so it has a proper transform $D_W$ in $W$), and $f_W:=f\circ\psi^{-1}$ is regular. Since $f(D)\subsetneq Y$, the MMP cannot end with a fiber type contraction, and $-D_W$ is $f_W$-nef. Let $j\colon W\to T$ be the contraction given by $\operatorname{NE}(f_W)\cap D_W^{\perp}$, so that $f_W$ factors as in \eqref{diagram}; there exists a $\mathbb{Q}$-Cartier prime divisor $D_T$ in $T$ such that $D_W=\lambda j^*D_T$ for some $\lambda\in\mathbb{Q}_{>0}$, and $-D_T$ is $k$-ample. We have the following properties: \begin{enumerate}[$(a)$] \item $k$ is birational, $\operatorname{Exc}(k)\subseteq D_T$, $f(D)=k(D_T)$; \item $f$, $f_W$, and $j$ coincide in the open subset $X\smallsetminus f^{-1}(f(D))$; \item the divisorial irreducible components of $f^{-1}(f(D))$ are exactly $D$ and the prime exceptional divisors of $\psi$. \begin{proof} By construction $\psi$ is a composition of $D$-positive flips and divisorial contractions (relative to $f$), hence the images under $f$ of the exceptional divisors of $\psi$ are all contained in $f(D)$, so these divisors must be divisorial irreducible components of $f^{-1}(f(D))$. On the other hand $k^{-1}(k(D_T))=D_T$, so $f_W^{-1}(f(D))=j^{-1}(D_T)=D_W$ is irreducible. \end{proof} \item $f^{-1}(f(D))$ has $\rho_X-\rho_W+1$ divisorial irreducible components; \item $k$ is an isomorphism if and only if $f(D)$ is a $\mathbb{Q}$-Cartier prime divisor in $Y$. \begin{proof} The ``only if'' direction is clear, because $D_T$ is $\mathbb{Q}$-Cartier and $f(D)=k(D_T)$. For the other, suppose that $f(D)$ is a $\mathbb{Q}$-Cartier prime divisor in $Y$. Since $k^{-1}(f(D))=k^{-1}(k(D_T))=D_T$, we must have $k^*(f(D))=\mu D_T$, with $\mu\in\mathbb{Q}_{> 0}$. Then $-D_T$ is both $k$-trivial and $k$-ample, so that $k$ must be an isomorphism. \end{proof} \item $\operatorname{Exc}(k)$ is a prime divisor if and only if $\operatorname{codim} f(D)>1$; \item $k$ is not an isomorphism and $\operatorname{codim}\operatorname{Exc}(k)>1$ if and only if $f(D)$ is a non $\mathbb{Q}$-Cartier prime divisor. \end{enumerate} \end{construction} \begin{proposition}\label{factorization1} Let $X$ be a Mori dream space and $f\colon X\dasharrow Y$ a rational contraction of fiber type. Then $f$ can be factored as follows: $$\xymatrix{X\ar@{-->}[r]_{g}\ar@{-->}@/^1pc/[rr]^{f}&{Z}\ar[r]_h& {Y} }$$ where $g$ is a special rational contraction, and $h$ is birational. Moreover, such a factorization is unique up to composition with a SQM of $Z$. \end{proposition} \begin{proof} To show existence of the factorization, we proceed by induction on $\rho_X-\rho_Y$. If $\rho_X-\rho_Y=1$, then $f$ is elementary and hence special, so the statement holds with $g=f$ and $h=\text{Id}_Y$. For the general case, up to composing with a SQM of $X$, we can assume that $f$ is regular. If $f$ is special, then as before the statement holds with $g=f$. Otherwise, there exists a prime divisor $D$ in $X$ such that $f(D)\subsetneq Y$ and $f(D)$ is not a $\mathbb{Q}$-Cartier divisor in $Y$. We apply Construction \ref{constr} to $f$ and $D$. We get a diagram as \eqref{diagram}, where $k$ is not an isomorphism by $(e)$, because $f(D)$ is not a $\mathbb{Q}$-Cartier divisor in $Y$; in particular $\rho_T>\rho_Y$. The composition $\tilde{f}:=j\circ \psi\colon X\dasharrow T$ is a rational contraction of fiber type with $\rho_X-\rho_T<\rho_X-\rho_Y$; by the induction assumption, $\tilde{f}$ can be factored as follows: $$\xymatrix{X\ar[d]_f\ar@{-->}[rd]_{\tilde{f}}\ar@{-->}[r]^{g}&{Z}\ar[d]^{\tilde{h}}\\ Y& T\ar[l]^{k} }$$ where $g$ is a special rational contraction of fiber type, and $\tilde{h}$ is birational. Then $h:=k\circ \tilde{h}\colon Z\to Y$ is birational, so we have a factorization as in the statement. To show uniqueness, suppose that $f$ has another factorization $X\stackrel{g'}{\dasharrow} Z'\stackrel{h'}{\to}Y$ with $g'$ special and $h'$ birational; notice that both $Z$ and $Z'$ are $\mathbb{Q}$-factorial by Rem.~\ref{Qfactrat}. We show that the birational map $\varphi:=(h')^{-1}\circ h\colon Z\dasharrow Z'$ is a SQM. Let $B\subset Z$ be a prime divisor. Up to composing $g$ and $g'$ with a SQM of $X$, we can assume that $g'\colon X\to Z'$ is regular. Let $D\subset X$ be a prime divisor dominating $B$ under $g$; then $g'(D)\subsetneq Z'$, and since $g'$ is special, $B':=g'(D)$ is a prime divisor in $Z'$. This means that $\varphi$ does not contract $B$. Similarly, we see that $\varphi^{-1}$ does not contract divisors, hence $\varphi$ is a SQM. \end{proof} \begin{proof}[Proof of Prop.~\ref{milano}] Suppose that $f$ is not special, and consider the factorization of $f$ given by Prop.~\ref{factorization1}. Then $h$ cannot be an isomorphism, thus $\rho_Z>\rho_Y$. Conversely, suppose that $f$ has a factorization as in the statement. By applying Prop.~\ref{factorization1} to $g$, we get a factorization of $f$ as follows: $$\xymatrix{X\ar@{-->}[r]_{g'}\ar@{-->}@/^1pc/[rrr]^{f}&{Z'}\ar[r]_{h'}&Z\ar@{-->}[r]_h& {Y} }$$ where $g'$ is special and $h'$ is birational. Thus $h\circ h'$ is birational with $\rho_{Z'}>\rho_Y$; by the uniqueness part of Prop.~\ref{factorization1}, $f$ is not special. \end{proof} \begin{notation}\label{notation} Let $X$ be a Mori dream space and $f\colon X\to Y$ a special contraction; recall that $Y$ is $\mathbb{Q}$-factorial by Rem.~\ref{Qfact}. If $B$ is a prime divisor in $Y$, then every irreducible component of $f^*B$ must dominate $B$. As the general fiber of $f$ is irreducible, there are at most finitely many prime divisors in $Y$ whose pullback to $X$ is reducible. We fix the notation $B_1,\dotsc,B_m$ for these divisors in $Y$, where $m\in\mathbb{Z}_{\geq 0}$, and we denote by $r_i\in\mathbb{Z}_{\geq 2}$ the number of irreducible components of $f^*B_i$, for $i=1,\dotsc,m$ (we ignore the multiplicities of these components, and ignore the possible prime divisors $B$ such that $f^*B$ is irreducible but nonreduced). Note that by Prop.~\ref{quasiel}, $f$ is quasi-elementary if and only if $m=0$. Given a special rational contraction $f\colon X\dasharrow Y$, we will use the same notation $B_1,\dotsc,B_m$ and $r_1,\dotsc,r_m$, with the obvious meaning. \end{notation} \begin{thm}\label{factorization2} Let $X$ be a Mori dream space and $f\colon X\to Y$ a special contraction; notation as in \ref{notation}. Let $E$ be the union of (arbitrarily chosen) $r_i-1$ components of $f^*B_i$, for $i=1,\dotsc,m$. Then there is a factorization: $$\xymatrix{X\ar[d]_f\ar@{-->}[r]^g&{X'}\ar[dl]^{f'}\\ Y& }$$ where $X'$ is projective, normal, and $\mathbb{Q}$-factorial, $g$ is birational with $\operatorname{Exc}(g)=E$,\footnote{We denote by $\operatorname{Exc}(g)$ the closure in $X$ of the exceptional locus of $g$ in its domain.} the general fiber of $f$ is contained in the open subset where $g$ is an isomorphism, and $f'$ is quasi-elementary. \end{thm} \begin{proof} We proceed by induction on $\rho_X-\rho_Y$. If $f$ is elementary, then it is quasi-elementary, so $E=\emptyset$ and the statement holds with $X'=X$ and $f'=f$. Let us consider the general case. If $f$ is quasi-elementary, then again the statement holds with $f'=f$. Suppose that $f$ is not quasi-elementary, so that $m\geq 1$ by Prop.~\ref{quasiel}, and consider the divisor $B_1\subset Y$. Let $D$ be the irreducible component of $f^*B_1$ not contained in $E$; we have $f(D)=B_1$ because $f$ is special. We apply Construction \ref{constr} to $f$ and $D$, and get a diagram: $$\xymatrix{X\ar[d]_f\ar@{-->}[r]^{\psi}&{W}\ar[dl]^{f_W} \\ Y& }$$ where $W$ is $\mathbb{Q}$-factorial, $\psi$ is a sequence of $D$-positive flips and divisorial contractions, relative to $f$, and the general fiber of $f$ is contained in the open subset where $\psi$ is an isomorphism (by $(b)$). Moreover $f_W^*B_1$ is irreducible (by $(e)$), and the exceptional divisors of $\psi$ are all the components of $f^*B_1$ except $D$ (by $(c)$). In particular, $r_1-1\geq 1$ elementary divisorial contractions occur in $\psi$, so $\rho_W<\rho_X$. Clearly $f_W$ is still special, and we conclude by applying the induction assumption to $f_W$. \end{proof} In particular, given a special contraction $f\colon X\to Y$ with general fiber $F$, one can bound $\rho_X$ in terms of $\rho_Y$, $\rho_F$, and the number of irreducible components of $f^*B_i$, $i=1,\dotsc,m$. \begin{corollary}\label{boundrho} Let $X$ be a Mori dream space, $f\colon X\to Y$ a special contraction, and $F\subset X$ a general fiber of $f$. Notation as in \ref{notation}. Then $$\rho_X=\rho_Y+\dim\mathcal{N}_1(F,X)+ \sum_{i=1}^m(r_i-1)\leq\rho_Y+\rho_F+\sum_{i=1}^m(r_i-1).$$ \end{corollary} For the proof of Cor.~\ref{boundrho} we need the following simple property. \begin{lemma}\label{stephane} Let $\varphi\colon X\dasharrow X'$ be a birational map between normal and $\mathbb{Q}$-factorial projective varieties. Let $T\subset X$ be a closed subset contained in the open subset where $\varphi$ is an isomorphism, and set $T':=\varphi(T)\subset X'$. Then $\dim\mathcal{N}_1(T,X)=\dim\mathcal{N}_1(T',X')$. \end{lemma} \begin{proof} We note that $\mathcal{N}_1(T,X)$ is the quotient of the vector space of real $1$-cycles in $T$ by the subspace of 1-cycles $\gamma$ such that $\gamma\cdot D=0$ for every divisor $D$ in $X$, so it is determined by the image of the restriction map $\mathcal{N}^1(X)\to\mathcal{N}^1(T)$, and similarly for $\mathcal{N}_1(T',X')$. Since $X$ and $X'$ are $\mathbb{Q}$-factorial, and $T$ is contained in the open subset where $\varphi$ is an isomorphism, it is easy to see that the images of the maps $\mathcal{N}^1(X)\to\mathcal{N}^1(T)$ and $\mathcal{N}^1(X')\to\mathcal{N}^1(T')$ are the same, under the natural isomorphism $\mathcal{N}^1(T)\cong\mathcal{N}^1(T')$. \end{proof} \begin{proof}[Proof of Cor.~\ref{boundrho}] Let us consider the factorization of $f$ given by Th.~\ref{factorization2}. The difference $\rho_X-\rho_{X'}$ is the number of prime exceptional divisors of $g$, namely $\sum_{i=1}^m(r_i-1)$. Moreover $F$ is contained in the open subset where $g$ is an isomorphism, $g(F)\subset X'$ is a general fiber of $f'$, and $\dim\mathcal{N}_1(F,X)=\dim\mathcal{N}_1(g(F),X')$ by Lemma \ref{stephane}. Finally, since $f'$ is quasi-elementary, we have $\rho_{X'}=\rho_Y+\dim\mathcal{N}_1(g(F),X')$. This yields the statement. \end{proof} \begin{corollary}\label{face} Let $X$ be a Mori dream space and $f\colon X\to Y$ a special contraction; notation as in \ref{notation}. Then every prime divisor in $f^*B_i$ is a fixed divisor, for $i=1,\dotsc,m$. Moreover, let $E$ be the union of (arbitrarily chosen) $r_i-1$ components of $f^*B_i$, for $i=1,\dotsc,m$. Then the classes of the components of $E$ in $\mathcal{N}^1(X)$ generate a simplicial face $\sigma$ of $\operatorname{Eff}(X)$, and $\sigma\cap\operatorname{Mov}(X)=\{0\}$. \end{corollary} \begin{proof} Th.~\ref{factorization2} implies the existence of a contracting birational map $g\colon X\dasharrow X'$, with $X'$ $\mathbb{Q}$-factorial, whose prime exceptional divisors are precisely the components of $E$. This gives the statement (see for instance \cite[Lemma 2.7]{okawa_MCD}). \end{proof} We will also need the following technical property. \begin{lemma}\label{unosolo} Let $X$ be a Mori dream space and $f\colon X\dasharrow Y$ a special rational contraction; notation as in \ref{notation}. Let $E_0$ be an irreducible component of $f^*B_i$ for some $i\in\{1,\dotsc,m\}$. Then there is a factorization of $f$: $$\xymatrix{X\ar@{-->}[r]^{\varphi}\ar@{-->}[d]_f&{\widehat{X}}\ar[d]^{\sigma}\\ Y&Z\ar[l] }$$ where $\varphi$ is a SQM, $\sigma$ is an elementary divisorial contraction, $\operatorname{Exc}(\sigma)$ is the transform of $E_0$, and $\dim\sigma(\operatorname{Exc}\sigma)\geq\dim Y-1$. \end{lemma} \begin{proof} Let us choose a SQM $\psi\colon X\dasharrow X'$ such that $f':=f\circ\psi^{-1}\colon X'\to Y$ is regular. We still denote by $E_0$ the transform of $E_0$ in $X'$; by Cor.~\ref{face}, $E_0$ is a fixed divisor, and it is easy to see that it cannot be $f'$-nef. We run a MMP in $X'$ for $E_0$, relative to $f'$, and get a diagram: $$\xymatrix{X\ar@{-->}[r]^{\psi}\ar@{-->}[dr]_f&{X'}\ar@{-->}[r]^{\xi}\ar[d]_{f'}& {\widehat{X}}\ar[d]^{\sigma} \\ & Y&Z\ar[l]_h }$$ where $\xi$ is a sequence of $E_0$-negative flips, and $\sigma$ is an elementary divisorial contraction with exceptional divisor (the transform of) $E_0$. Now $h\circ\sigma\colon\widehat{X}\to Y$ is a special contraction, therefore $h(\sigma(\operatorname{Exc}(\sigma)))$ is a divisor in $Y$, and $\dim \sigma(\operatorname{Exc}(\sigma))\geq \dim Y-1$. \end{proof} \subsection{Singularities of the target}\label{secsingularities} \noindent The goal of this subsection is to prove the following result. \begin{proposition}\label{sing} Let $X$ be a smooth projective variety, and $\Delta$ a $\mathbb{Q}$-divisor on $X$ such that $(X,\Delta)$ is klt. Let $f\colon X\to Y$ be a $(K+\Delta)$-negative special contraction of fiber type. Then $Y$ has locally factorial, canonical singularities, and is nonsingular in codimension 2. \end{proposition} Prop.~\ref{sing} will follow from some technical lemmas. \begin{lemma}\label{lf} Let $X$ be a projective variety with locally factorial, canonical singularities, and $\Delta$ a boundary such that $(X,\Delta)$ is klt. Let $f\colon X\to Y$ be a $(K+\Delta)$-negative special contraction of fiber type. Then $Y$ has locally factorial, canonical singularities. \end{lemma} \begin{proof} It follows from \cite[Cor.~4.5]{fujino} that $Y$ has rational singularities, so it is enough to show that it is locally factorial \cite[Cor.~5.24]{kollarmori}. Let $B$ be a prime divisor in $Y$. Since $Y$ is $\mathbb{Q}$-factorial, there exists $m\in\mathbb{Z}_{>0}$ such that $mB$ is Cartier. Set $U:=f^{-1}(Y_{reg})$; since $Y$ is normal and $f$ is special, we have $\operatorname{codim} \operatorname{Sing}(Y)\geq 2$ and $\operatorname{codim}(X\smallsetminus U)\geq 2$. Then $B\cap Y_{reg}$ is a Cartier divisor on $Y_{reg}$, and $f_{|U}^*(B\cap Y_{reg})$ is a Cartier divisor on $U$. Since $X$ is locally factorial, there exists a Cartier divisor $D$ in $X$ such that $D_{|U}=f_{|U}^*(B\cap Y_{reg})$. Then $(mD)_{|U}=f_{|U}^*((mB)_{|Y_{reg}})=f^*(mB)_{|U}$, and hence $mD=f^*(mB)$. We deduce that $D\cdot C=0$ for every curve $C\subset X$ contracted by $f$. Since $f$ is $(K+\Delta)$-negative, this implies that there exists a Cartier divisor $B'$ on $Y$ such that $D=f^*B'$ \cite[Th.~3.7(4)]{kollarmori}. Thus we have $B'_{|Y_{reg}}=B\cap Y_{reg}$, and hence $B=B'$ is Cartier. \end{proof} The following two lemmas are basically \cite[Prop.~1.4 and 1.4.1]{ABW}, where they are attributed to Fujita. \begin{lemma}\label{quotient} Let $X$ be a smooth projective variety, and $\Delta$ a $\mathbb{Q}$-divisor on $X$ such that $(X,\Delta)$ is klt. Let $f\colon X\to Y$ be an equidimensional, $(K+\Delta)$-negative contraction of fiber type. If $Y$ has at most finite quotient singularities, then $Y$ is smooth. \end{lemma} \begin{proof} Let $F\subset X$ be a general fiber of $f$. Then $F$ is smooth and $(F,\Delta_{|F})$ is klt \cite[Lemma 5.17]{kollarmori}; moreover $-(K_F+\Delta_{|F})\equiv -(K_X+\Delta)_{|F}$ is ample, so that $(F,\Delta_{|F})$ is log Fano. By Kawamata-Viehweg vanishing, $h^i(F,\mathcal{O}_F)=0$ for every $i>0$, hence $\chi(F,\mathcal{O}_F)=1$. Then the same proof as \cite[Prop.~1.4]{ABW} applies. \end{proof} \begin{lemma}\label{target2} Let $X$ be a smooth projective variety with $\dim X\geq 3$, and $\Delta$ a $\mathbb{Q}$-divisor on $X$ such that $(X,\Delta)$ is klt. Let $f\colon X\to S$ be an equidimensional, $(K+\Delta)$-negative contraction onto a surface. Then $S$ is smooth. \end{lemma} \begin{proof} Notice first of all that $S$ is $\mathbb{Q}$-factorial by Lemma \ref{kollar}. Moreover, by \cite[Cor.~4.5]{fujino}, there exists $\mathbb{Q}$-divisor $\Delta'$ on $S$ such that $(S,\Delta')$ is klt; in particular $S$ has log terminal singularities, and hence finite quotient singularities \cite[Prop.~4.18]{kollarmori}. Then $S$ is smooth by Lemma \ref{quotient}. \end{proof} \begin{lemma}\label{cod3} Let $X$ be a smooth projective variety, $\Delta$ a $\mathbb{Q}$-divisor on $X$ such that $(X,\Delta)$ is klt, and $f\colon X\to Y$ a $(K+\Delta)$-negative contraction of fiber type. Suppose that the locus where $f$ is not equidimensional has codimension at least $3$ in $Y$, equivalently that there is no prime divisor $D\subset X$ such that $\operatorname{codim} f(D)=2$. Then $Y$ is smooth in codimension $2$. \end{lemma} \begin{proof} Set $m=\dim Y$ and let $H_1,\dotsc,H_{m-2}$ be general very ample divisors in $Y$. Consider $S:=H_1\cap\cdots\cap H_{m-2}$ and $Z:=f^{-1}(S)=f^*H_1\cap\cdots f^*H_{m-2}$. Then $S$ is a normal projective surface, $Z$ is smooth, and $f$ is equidimensional over $S$, so that $f_Z:=f_{|Z}\colon Z\to S$ is an equidimensional contraction. Moreover $(Z,\Delta_{|Z})$ is klt \cite[Lemma 5.17]{kollarmori}. Let $C\subset Z$ be a curve contracted by $f$; then $f^*H_i\cdot C=0$ for every $i$, so that by adjunction $(K_Z+\Delta_{|Z})\cdot C=(K_X+\Delta)\cdot C<0$, and $f_Z$ is $(K_Z+\Delta_{|Z})$-negative. Thus $S$ is smooth by Lemma \ref{target2}, so $S\subseteq Y_{reg}$ and hence $\operatorname{codim}\operatorname{Sing} Y\geq 3$. \end{proof} Prop.~\ref{sing} follows from Lemma \ref{lf}, Rem.~\ref{unico}$(\ref{equidimensional})$, and Lemma \ref{cod3}. \section{Special contractions of Fano varieties of relative dimension 1} \subsection{Preliminaries on the Lefschetz defect}\label{prelLD} \noindent Let $X$ be a normal and $\mathbb{Q}$-factorial Fano variety. The {\em Lefschetz defect} $\delta_X$ is an invariant of $X$, introduced in \cite{codim}, and defined as follows: $$\delta_X=\max\left\{\operatorname{codim}\mathcal{N}_1(D,X)\,|\,D\text{ a prime divisor in }X\right\}$$ (see \S \ref{terminology} for $\mathcal{N}_1(D,X)$). The main properties of $\delta_X$ are the following. \begin{thm}[\cite{codim,gloria}]\label{trento} Let $X$ be a $\mathbb{Q}$-factorial, Gorenstein Fano variety, with canonical singularities and at most finitely many non-terminal points. Then $\delta_X\leq 8$. If moreover $X$ is smooth and $\delta_X\geq 4$, then $X\cong S\times Y$, where $S$ is a surface. \end{thm} \begin{thm}[\cite{codim}, Cor.~1.3 and \cite{cdue}, Th.~1.2]\label{buonconsiglio} Let $X$ be a smooth Fano $4$-fold. Then one of the following holds: \begin{enumerate}[$(i)$] \item $X$ is a product of surfaces; \item $\delta_X=3$ and $\rho_X\leq 6$; \item $\delta_X=2$ and $\rho_X\leq 12$; \item $\delta_X\leq 1$. \end{enumerate} \end{thm} \subsection{The case of relative dimension one} \noindent In this subsection we show that if $X$ is a Fano variety and $f\colon X\to Y$ is a special contraction with $\dim Y=\dim X-1$, then $\rho_X-\rho_Y\leq 9$; this is a generalization of an analogous result in \cite{eleonora} in the case where $f$ is a conic bundle. The strategy of proof is the same: we use $f$ to produce $\rho_X-\rho_Y-1$ pairwise disjoint divisors in $X$, and then we use them to show that if $\rho_X-\rho_Y\geq 3$, then $\delta_X\geq \rho_X-\rho_Y-1$; finally we apply Th.~\ref{trento}. \begin{proposition}\label{reldim1} Let $X$ be a $\mathbb{Q}$-factorial, Gorenstein Fano variety, with canonical singularities and at most finitely many non-terminal points. Let $f\colon X\to Y$ be a special contraction with $\dim Y=\dim X-1$. Then the following holds: \begin{enumerate}[$(a)$] \item $\rho_X-\rho_Y\leq 9$; \item if $\rho_X-\rho_Y\geq 3$, then $\delta_X\geq\rho_X-\rho_Y-1$. \end{enumerate} If moreover $X$ is smooth and $\rho_X-\rho_Y\geq 5$, then there exists a surface $S$ such that $X\cong S\times Z$, $Y\cong\mathbb{P}^1\times Z$, and $f$ is induced by a conic bundle $S\to\mathbb{P}^1$. \end{proposition} For the proof of Prop.~\ref{reldim1} we need some technical lemmas, that will be used also in \S~\ref{sec_3folds}. \begin{lemma}\label{klt} Let $X$ be a Mori dream space, and suppose that $K_X$ is Cartier in codimension $2$, namely that there exists a closed subset $T\subset X$ such that $\operatorname{codim} T\geq 3$ and $K_{X\smallsetminus T}$ is Cartier. Let $f\colon X\to Y$ be a $K$-negative special contraction with $\dim Y=\dim X-1$; notation as in \ref{notation}. Then $\rho_X=\rho_Y+1+m$ and $r_i=2$ for every $i=1,\dotsc,m$. Let moreover $E_i,\widehat{E}_i$ be the irreducible components of $f^*B_i$. Then the general fiber of $f$ over $B_i$ is $e_i+\hat{e}_i$, where $e_i$ and $\hat{e}_i$ are integral curves with $E_i\cdot e_i<0$, $\widehat{E}_i \cdot\hat{e}_i<0$, and $-K_X\cdot e_i=-K_X\cdot \hat{e}_1=1$. \end{lemma} \begin{proof} Fix $i\in\{1,\dotsc,m\}$. The closed subset $T$ cannot dominate $B_i$, hence the general fiber of $f$ over $B_i$ is a curve $F_i$ contained in $X\smallsetminus T$ where $K_X$ is cartier. Since $-K_X\cdot F_i=2$, and $f$ is $K$-negative, $F_i$ has at most two irreducible components. This implies that $r_i=2$ and $F_i=e_i+\hat{e}_i$, with $e_i\subset E_i$, $\hat{e}_i\subset \widehat{E}_i$, and conversely $e_i\not\subset \widehat{E}_i$, $\hat{e}_i\not\subset {E}_i$. The fiber $F_i$ is connected, hence we have $E_i\cap\hat{e}_i\neq\emptyset$, and therefore $E_i\cdot \hat{e}_i>0$. Since $E_i\cdot F_i=0$, we get $E_i\cdot e_i<0$; similarly for $\widehat{E}_i$. Finally $\rho_X=\rho_Y+1+m$ by Cor.~\ref{boundrho}. \end{proof} \begin{lemma}\label{gor} In the setting of Lemma \ref{klt}, if moreover $\operatorname{codim} T\geq 4$, then $B_1,\dotsc,B_m$ are pairwise disjoint. \end{lemma} \begin{proof} By contradiction, suppose that $B_1\cap B_2\neq\emptyset$. Then $B_1\cap B_2$ has pure dimension $\dim X-3$, because $Y$ is $\mathbb{Q}$-factorial (see Rem.~\ref{Qfact}); let $W$ be an irreducible component. Since $f$ is special, the general fiber $F_W$ of $f$ over $W$ is a curve. Moreover, $F_W$ is contained in the open subset where $K_X$ is cartier, so that $F_W=C+C'$ with $C$ and $C'$ integral curves of anticanonical degree $1$. By Lemma \ref{klt}, for $i=1,2$ the general fiber $F_i$ of $f$ over $B_i$ is $e_i+\hat{e}_i$, with $-K_X\cdot e_i=1$, and $F_i$ degenerates to $F_W$. Thus, up to switching the components, we can assume that both $e_1$ and $e_2$ are numerically equivalent to $C$, which implies that $e_1\equiv e_2$. This is impossible, because $E_1\neq E_2$, $E_i\cdot e_i<0$, and $e_i$ moves in a family of curves dominating $E_i$, for $i=1,2$. \end{proof} \begin{proof}[Proof of Prop.~\ref{reldim1}] This the same as the proof of \cite[Th.~1.1 and 1.3]{eleonora}, so we give only a sketch. We have $\rho_X=\rho_Y+1+m$ by Lemma \ref{klt}. As in \cite[Lemmas 3.9 and 3.10]{eleonora}, using Lemma \ref{gor}, one sees that if $m\geq 2$, then $\delta_X\geq m$. Hence the statement follows from Th.~\ref{trento}. \end{proof} \section{Preliminary results on Fano $4$-folds}\label{sanfrancisco} \noindent From now on, we focus on smooth Fano $4$-folds. After giving in \S \ref{birat} some preliminary results on rational contractions of Fano $4$-folds, in \S \ref{secfixed} we recall the classification of fixed prime divisors in a Fano $4$-fold $X$ with $\rho_X\geq 7$, and report some properties that will be crucial in the sequel. Then in \S \ref{fabri} we apply the previous results to study special rational contractions of fiber type of $X$, when $\rho_X\geq 7$. \subsection{Rational contractions of Fano $4$-folds}\label{birat} \begin{lemma}[\cite{eff}, Rem.~3.6 and its proof]\label{basic1} Let $X$ be a smooth Fano $4$-fold and $\varphi\colon X\dasharrow \widetilde{X}$ a SQM. \begin{enumerate}[$(a)$] \item $\widetilde{X}$ is smooth, the indeterminacy locus of $\varphi$ is a disjoint union of exceptional planes (see \S \ref{terminology}), and the indeterminacy locus of $\varphi^{-1}$ is a disjoint union of exceptional lines; \item an exceptional line in $\widetilde{X}$ cannot meet any integral curve of anticanonical degree $1$, in particular it cannot meet an exceptional plane; \item let $\psi\colon\widetilde{X}\dasharrow\widehat{X}$ be a SQM that factors as a sequence of $K$-negative flips. Then the indeterminacy locus of $\psi$ (respectively, $\psi^{-1}$) is a disjoint union of exceptional planes (respectively, lines). \end{enumerate} \end{lemma} \begin{lemma}[\cite{eff}, Rem.~3.7]\label{basic2} Let $X$ be a smooth Fano $4$-fold and $f\colon X\dasharrow Y$ a rational contraction. Then one can factor $f$ as $X\stackrel{\varphi}{\dasharrow}X'\stackrel{f'}{\to} Y$, where $\varphi$ is a SQM, $X'$ is smooth, and $f'$ is a $K$-negative contraction. \end{lemma} These results allow to conclude that the target of a special rational contraction of a Fano $4$-fold has mild singularities. \begin{lemma}\label{2} Let $X$ be a smooth Fano $4$-fold and $f\colon X\dasharrow Y$ a special rational contraction. If $\dim Y=2$, then $Y$ is smooth. If $\dim Y=3$, then $Y$ has isolated locally factorial, canonical singularities. \end{lemma} \begin{proof} By Lemma \ref{basic2} we can factor $f$ as $X\stackrel{\varphi}{\dasharrow} X'\stackrel{f'}{\to} Y$ where $\varphi$ is a SQM, $X'$ is smooth, and $f'$ is regular, $K$-negative, and special. Then the statement follows from Prop.~\ref{sing}. \end{proof} \subsection{Fixed prime divisors in Fano $4$-folds with $\rho\geq 7$}\label{secfixed} \noindent Let $X$ be a Fano $4$-fold with $\rho_X\geq 7$. Fixed prime divisors in $X$ have been classified in \cite{eff,blowup} in four types, and have many properties; this explicit information on the geometry of fixed divisors is a key ingredient in the proof of Th.~\ref{main}. In this subsection we recall this classification, and show some properties that will be used in the sequel. \begin{thmdefi}[\cite{blowup}, Th.~5.1, Def.~5.3, Cor.~5.26, Def.~5.27]\label{long} Let $X$ be a smooth Fano $4$-fold with $\rho_X\geq 7$, or $\rho_X=6$ and $\delta_X\leq 2$, and $D$ a fixed prime divisor in $X$. The following holds. \begin{enumerate}[$(a)$] \item Given a SQM $X\dasharrow X'$ and an elementary divisorial contraction $k\colon X'\to Y$ with $\operatorname{Exc}(k)$ the transform of $D$, then $k$ is of type $(3,0)^{sm}$, $(3,0)^Q$, $(3,1)^{sm}$, or $(3,2)$. \item The type of $k$ depends only on $D$, so we define $D$ to be of type $(3,0)^{sm}$, $(3,0)^Q$, $(3,1)^{sm}$, or $(3,2)$, respectively. \item If $D$ is of type $(3,2)$, then $D$ is the exceptional divisor of an elementary divisorial contraction of $X$, of type $(3,2)$. \item We define $C_D\subset D\subset X$ to be the transform of a general irreducible curve $\Gamma\subset X'$ contracted by $k$, of minimal anticanonical degree; the curve $C_D$ depends only on $D$. \item $C_D\cong\mathbb{P}^1$, $D\cdot C_D=-1$, $C_D$ is contained in the open subset where the birational map $X\dasharrow X'$ is an isomorphism, and $C_D$ moves in a family of curves dominating $D$. \item Let $\varphi\colon X\dasharrow \widetilde{X}$ be a SQM, and $E$ a fixed prime divisor in $\widetilde{X}$. We define the type of $E$ to be the type of its transform in $X$. \end{enumerate} \end{thmdefi} \noindent We will frequently use the notation $C_D\subset D$ introduced in the Theorem - Definition above. The next property of fixed divisors of type $(3,2)$ will be crucial in the sequel. \begin{lemma}\label{prop32} Let $X$ be a smooth Fano $4$-fold with $\rho_X\geq 7$, or $\rho_X=6$ and $\delta_X\leq 2$, $X\dasharrow\widetilde{X}$ a SQM, and $D\subset \widetilde{X}$ a fixed divisor of type $(3,2)$. If $\mathcal{N}_1(D,\widetilde{X})\subsetneq\mathcal{N}_1(\widetilde{X})$, then either $\rho_X\leq 12$, or $X$ is a product of surfaces. \end{lemma} \begin{proof} If $\delta_X\geq 2$, we have the statement by Th.~\ref{buonconsiglio}, so let us assume that $\delta_X\leq 1$. Let $D_X$ be the transform of $D$ in $X$, so that $D_X$ is the exceptional divisor of an elementary divisorial contraction of $X$, of type $(3,2)$. By \cite[Rem.~2.17(2)]{blowup}, $D_X$ cannot contain exceptional planes, hence $\dim\mathcal{N}_1(D_X,X)=\dim\mathcal{N}_1({D},\widetilde{X})$ by \cite[Cor.~3.14]{eff}. Then $\rho_X\leq 12$ by \cite[Prop.~5.32]{blowup}. \end{proof} \begin{lemma}\label{2faces} Let $X$ be a smooth Fano $4$-fold with $\rho_X\geq 7$, or $\rho_X=6$ and $\delta_X\leq 2$, and let $D_1,D_2\subset X$ be two distinct fixed prime divisors. We have the following: \smallskip \begin{enumerate}[$(a)$] \item $ \dim\langle [D_1],[D_2]\rangle\cap\operatorname{Mov}(X)=\dim\langle [C_{D_1}],[C_{D_2}]\rangle\cap\operatorname{mov}(X)=$\\ $\qquad\qquad\qquad\qquad=\begin{cases} 0\quad\text{ if }\ D_1\cdot C_{D_2}=0\text{ or }D_2\cdot C_{D_1}=0;\\ 1\quad\text{ if }\ D_1\cdot C_{D_2}=D_2\cdot C_{D_1}=1;\\ 2\quad\text{ if }\ (D_1\cdot C_{D_2})(D_2\cdot C_{D_1})\geq 2.\end{cases}$ \smallskip \item If $D_1\cdot C_{D_2}=D_2\cdot C_{D_1}=1$, then $\langle [D_1],[D_2]\rangle\cap\operatorname{Mov}(X)=\langle[D_1+D_2]\rangle$ and $\langle [C_{D_1}],[C_{D_2}]\rangle\cap\operatorname{mov}(X)=\langle[C_{D_1}+C_{D_2}]\rangle$. Moreover $(D_1+D_2)\cdot (C_{D_1}+C_{D_2})=0$ and $D_1+D_2$ is not big. \smallskip \item If $D_1\cdot C_{D_2}=0$ or $D_2\cdot C_{D_1}=0$, then $\langle [D_1],[D_2]\rangle$ is a face of $\operatorname{Eff}(X)$, and $\langle [C_{D_1}],[C_{D_2}]\rangle$ is a face of $\operatorname{Mov}(X)^{\vee}$. \end{enumerate} \end{lemma} For the proof, we need the following elementary property in convex geometry. \begin{lemma}\label{cone} Let $\sigma$ be a convex polyhedral cone, of maximal dimension, in a finite dimensional real vector space $\mathcal{N}$. Let $\tau_1$ be a one-dimensional face of $\sigma$, and let $\alpha\in\mathcal{N}^{*}$ (the dual vector space) be such that $\alpha\cdot\tau_1<0$ and $\alpha\cdot \eta\geq 0$ for every one-dimensional face $\eta\neq\tau_1$ of $\sigma$. If $\tau_2$ is a one-dimensional face of $\sigma$ such that $\alpha\cdot\tau_2=0$, then $\tau_1+\tau_2$ is a face of $\sigma$. \end{lemma} \begin{proof} Since $\tau_2$ is a face of $\sigma$, there exists $\beta\in\mathcal{N}^{*}$ such that $\beta\cdot x\geq 0$ for every $x\in\sigma$, and $\beta^{\perp}\cap\sigma=\tau_2$. Let $y\in\tau_1$ be a non-zero element, and set $a:=\alpha\cdot y$ and $b:=\beta\cdot y$. Then $a,b\in\mathbb{R}$, $a<0$, and $b>0$ (because $\tau_2\neq\tau_1$ by our assumptions). Let us consider $\gamma:=b\alpha+|a|\beta \in\mathcal{N}^{*}$. We have $\alpha\cdot\tau_2=\beta\cdot\tau_2=0$, hence $\gamma\cdot\tau_2=0$. Moreover $\gamma\cdot y=b\alpha\cdot y+|a|\beta\cdot y=0$, namely $\gamma\cdot\tau_1=0$. Finally if $\eta$ is a one-dimensional face of $\sigma$, different from $\tau_1$ and $\tau_2$, we have $\alpha\cdot\eta\geq 0$, $\beta\cdot\eta>0$, and hence $\gamma\cdot \eta>0$. Therefore $\gamma\cdot x\geq 0$ for every $x\in\sigma$, and $\gamma^{\perp}\cap\sigma=\tau_1+\tau_2$. This shows the statement. \end{proof} \begin{proof}[Proof of Lemma \ref{2faces}] We compute $\langle [D_1],[D_2]\rangle\cap\operatorname{Mov}(X)$. Set $B:=\lambda_1D_1+\lambda_2D_2$ with $\lambda_i\in\mathbb{R}_{\geq 0}$ for $i=1,2$. By \cite[Lemma 5.29(2)]{blowup}, $B$ is movable if and only if $B\cdot C_D\geq 0$ for every fixed prime divisor $D\subset X$, and this is equivalent to $B\cdot C_{D_i}\geq 0$ for $i=1,2$, namely to: \stepcounter{thm} \begin{equation}\label{system} \begin{cases}-\lambda_1+\lambda_2D_2\cdot C_{D_1}\geq 0\\ \lambda_1D_1\cdot C_{D_2}-\lambda_2\geq 0.\end{cases}\end{equation} Let $\mathcal{S}\subseteq (\mathbb{R}_{\geq 0})^2$ be the set of non-negative solutions $(\lambda_1,\lambda_2)$ of \eqref{system}, so that $\mathcal{S}$ determines the intersection $\langle [D_1],[D_2]\rangle\cap\operatorname{Mov}(X)$. Notice that $(D_1\cdot C_{D_2})(D_2\cdot C_{D_1})$ is always non-negative, because $D_1\neq D_2$. It is elementary to check that: \begin{enumerate}[$\bullet$] \item $\mathcal{S}=\{(0,0)\}$ $\ \Longleftrightarrow\ $ $1-(D_1\cdot C_{D_2})(D_2\cdot C_{D_1})>0$ $\ \Longleftrightarrow\ $ $D_1\cdot C_{D_2}=0$ or $D_2\cdot C_{D_1}=0$; \item $\mathcal{S}$ is a half-line $\ \Longleftrightarrow\ $ $1-(D_1\cdot C_{D_2})(D_2\cdot C_{D_1})=0$ $\ \Longleftrightarrow\ $ $D_1\cdot C_{D_2}=D_2\cdot C_{D_1}=1$, moreover in this case $\mathcal{S}=\{(\lambda,\lambda)\,|\,\lambda\geq0\}$; \item $\mathcal{S}$ is a $2$-dimensional cone $\ \Longleftrightarrow\ $ $1-(D_1\cdot C_{D_2})(D_2\cdot C_{D_1})<0$$\ \Longleftrightarrow\ $ $(D_1\cdot C_{D_2})(D_2\cdot C_{D_1})\geq 2$. \end{enumerate} Similarly, we compute $\langle [C_{D_1}],[C_{D_2}]\rangle\cap\operatorname{mov}(X)$. We have $$\operatorname{mov}(X)^{\vee}=\operatorname{Eff}(X)=\langle[D]\rangle_{D\text{\,fixed}}+\operatorname{Mov}(X).$$ Set $\gamma:=\lambda_1C_{D_1}+\lambda_2C_{D_2}$ with $\lambda_1,\lambda_2\in\mathbb{R}_{\geq 0}$. We have $\gamma\cdot M\geq 0$ for every movable divisor $M$ in $X$ (see \cite[Lemma 5.29(2)]{blowup}). Hence $\gamma\in\operatorname{mov}(X)$ if and only if $\gamma\cdot D\geq 0$ for every fixed prime divisor $D\subset X$, and this is equivalent to $\gamma\cdot D_i\geq 0$ for $i=1,2$, namely to: $$ \begin{cases}-\lambda_1+\lambda_2D_1\cdot C_{D_2}\geq 0\\ \lambda_1D_2\cdot C_{D_1}-\lambda_2\geq 0,\end{cases}$$ which is the same system as \eqref{system}, but with $\lambda_1$ and $\lambda_2$ interchanged. Thus the previous discussion yields $(a)$ and $(b)$. We show $(c)$. Suppose for instance that $D_1\cdot C_{D_2}=0$. To see that $\langle [D_1],[D_2]\rangle$ is a face of $\operatorname{Eff}(X)$, we apply Lemma \ref{cone} with $\sigma=\operatorname{Eff}(X)$, $\tau_1=\langle[D_2]\rangle$, $\alpha=[C_{D_2}]$, and $\tau_2=\langle[D_1]\rangle$. It is enough to remark that $D\cdot C_{D_2}\geq 0$ for every prime divisor $D\neq D_2$. Similarly, to see that $\langle [C_{D_1}],[C_{D_2}]\rangle$ is a face of $\operatorname{Mov}(X)^{\vee}$, we apply Lemma \ref{cone} with $\sigma=\operatorname{Mov}(X)^{\vee}$, $\tau_1=\langle[C_{D_1}]\rangle$, $\alpha=[D_1]$, and $\tau_2=\langle[C_{D_2}]\rangle$. Indeed $\langle[C_{D_1}]\rangle$ and $\langle[C_{D_2}]\rangle$ are one-dimensional faces of $\operatorname{Mov}(X)^{\vee}$ by \cite[Lemma 5.29(1)]{blowup}. Moreover $D_1\cdot\gamma\geq 0$ for every $\gamma\in\operatorname{mov}(X)$, and $D_1\cdot C_D\geq 0$ for every fixed prime divisor $D\neq D_1$. By \cite[Lemma 5.29(2)]{blowup} we have $$\operatorname{Mov}(X)^{\vee}=\langle[C_D]\rangle_{D\text{\,fixed}}+\operatorname{mov}(X),$$ therefore $D_1\cdot\eta\geq 0$ for every one-dimensional face $\eta$ of $\operatorname{Mov}(X)^{\vee}$ different from $\langle[C_{D_1}]\rangle$. Thus the hypotheses of Lemma \ref{cone} are satisfied, and we get $(c)$. \end{proof} \begin{lemma}\label{description} Let $X$ be a smooth Fano $4$-fold with $\rho_X\geq 7$, and let $D_1,D_2\subset X$ be two distinct fixed prime divisors such that $\langle[D_1],[D_2]\rangle\cap\operatorname{Mov}(X)=\{0\}$. Then, up to exchanging $D_1$ and $D_2$, one of the following holds: \begin{enumerate}[$(a)$] \item $D_1\cdot C_{D_2}=D_2\cdot C_{D_1}=0$ and $D_1\cap D_2=\emptyset$; \item $D_1\cdot C_{D_2}=D_2\cdot C_{D_1}=0$ and $D_1\cap D_2$ is a disjoint union of exceptional planes; \item $D_1\cdot C_{D_2}=D_2\cdot C_{D_1}=0$, $D_1$ is of type $(3,2)$, and $D_2$ is not of type $(3,0)^{sm}$; \item $D_1\cdot C_{D_2}>0$, $D_2\cdot C_{D_1}=0$, $D_1$ is of type $(3,2)$, and $D_2$ is of type $(3,1)^{sm}$ or $(3,0)^Q$. \end{enumerate} \end{lemma} \begin{proof} By \cite[Th.~5.1]{blowup} there is a diagram $$X\dasharrow \widetilde{X}\stackrel{f}{\longrightarrow}Y$$ where the first map is a SQM and $f$ is an elementary divisorial contraction with exceptional divisor the transform $\widetilde{D}_2\subset\widetilde{X}$ of $D_2$. Let $\widetilde{D}_1\subset\widetilde{X}$ be the transform of $D_1$. By \cite[Lemma 2.21]{blowup}, $D_1$ is the transform of a fixed prime divisor $B_1\subset Y$. If $\widetilde{D}_1\cap\widetilde{D}_2=\emptyset$, then $D_1\cap D_2$ is contained in the indeterminacy locus of the map $X\dasharrow\widetilde{X}$, which is a disjoint union of exceptional planes by Lemma \ref{basic1}$(a)$. Therefore either $D_1\cap D_2=\emptyset$ and we get $(a)$, or $D_1\cap D_2$ has pure dimension $2$ and we get $(b)$. We assume from now on that $\widetilde{D}_1\cap\widetilde{D}_2\neq\emptyset$. \medskip Suppose that $D_2$ is of type $(3,1)^{sm}$. Then $Y$ is a smooth Fano $4$-fold by \cite[Th.~5.1]{blowup}, $f$ is the blow-up of a smooth curve $C\subset Y$, and $B_1\cap C\neq\emptyset$. Then \cite[Lemma 5.11]{blowup} yields that $B_1$ is the exceptional divisor of an elementary divisorial contraction of type $(3,2)$, and either $B_1\cdot C>0$, or $B_1\cdot C<0$. Thus $B_1$ is generically a $\mathbb{P}^1$-bundle over a surface, and the general fiber $F$ of this $\mathbb{P}^1$-bundle satisfies $B_1\cdot F=K_Y\cdot F=-1$. Using Lemma \ref{basic1}$(a)$ and \cite[Lemma 2.18]{blowup}, one sees that $D_1$ must be of type $(3,2)$. Moreover $C\cap F=\emptyset$ implies that $\widetilde{D}_2$ is disjoint from the transform $\widetilde{F}$ of $F$ in $\widetilde{X}$, and $\widetilde{D}_1$ is still generically a $\mathbb{P}^1$-bundle with fiber $\widetilde{F}$. The indeterminacy locus of the map $\widetilde{X}\dasharrow X$ has dimension at most one (see Lemma \ref{basic1}$(a)$), hence $\widetilde{F}$ is contained in the open subset where this map is an isomorphism, and in $X$ we get $D_2\cdot C_{D_1}=\widetilde{D}_2\cdot \widetilde{F}=0$. Finally it is easy to check that $D_1\cdot C_{D_2}=0$ if $B_1\cdot C>0$ (and we have $(c)$), while $D_1\cdot C_{D_2}>0$ if $B_1\cdot C<0$ (and we have $(d)$). So we get the statement. \medskip We can assume now that neither $D_1$ nor $D_2$ are of type $(3,1)^{sm}$. Suppose that $D_2$ is of type $(3,0)^{sm}$ or $(3,0)^Q$. Then $\widetilde{D}_2$ is isomorphic to $\mathbb{P}^3$ or to an irreducible quadric; let $\Gamma\subset \widetilde{D}_2$ be a curve corresponding to a line. We have $\widetilde{D}_1\cdot\Gamma>0$, and since $\Gamma$ is contained in the open subset where the map $\widetilde{X}\dasharrow X$ is an isomorphism (see Th.-Def.~\ref{long}$(e)$), we also have $D_1\cdot C_{D_2}>0$. This yields $D_2\cdot C_{D_1}=0$ by Lemma \ref{2faces}. Therefore $D_1$ cannot be of type $(3,0)^{sm}$ nor $(3,0)^Q$, and the only possibility is that $D_1$ is of type $(3,2)$. Moreover, since $f(\widetilde{D}_2)$ is contained in $B_1$, \cite[Lemma 5.41]{blowup} yields that $D_2$ cannot be of type $(3,0)^{sm}$, so we get again $(d)$. \medskip We are left with the case where both $D_1$ and $D_2$ are of type $(3,2)$, and we can assume that $D_1\cdot C_{D_2}=0$ by Lemma \ref{2faces}. If $\delta_X\geq 3$, then Th.~\ref{buonconsiglio} implies that $X$ is a product of surfaces; in this case it is easy to check directly that $D_2\cdot C_{D_1}=0$. If $\delta_X\leq 2$, then we get $D_2\cdot C_{D_1}=0$ by \cite[Lemma 2.2(b)]{cdue}. So we have $(c)$. \end{proof} \subsection{Special rational contractions of Fano $4$-folds with $\rho_X\geq 7$}\label{fabri} \noindent Given a Fano $4$-fold $X$ with $\rho_X\geq 7$, and a special rational contraction of fiber type $f\colon X\dasharrow Y$, in this subsection we show that, for every prime divisor $B$ of $Y$, $f^*B$ has at most two irreducible components. Moreover we give conditions on the type of the fixed prime divisors in $f^*B$, when $f^*B$ is reducible. \begin{lemma}\label{montenero} Let $X$ be a smooth Fano $4$-fold with $\rho_X\geq 7$, or $\rho_X=6$ and $\delta_X\leq 2$, and $f\colon X\dasharrow Y$ a special rational contraction; notation as in \ref{notation}. Let $i\in\{1,\dotsc,m\}$. If $\dim Y=3$, then every fixed divisor in $f^*B_i$ is of type $(3,2)$. If $\dim Y=2$, then every fixed divisor in $f^*B_i$ is of type $(3,2)$ or $(3,1)^{sm}$. \end{lemma} \begin{proof} Let $E_0$ be an irreducible component of $f^*B_i$. By Lemma \ref{unosolo} there are a SQM $X\dasharrow\widetilde{X}$ and an elementary divisorial contraction $\sigma\colon\widetilde{X}\to Z$ such that $\operatorname{Exc}(\sigma)$ is the transform of $E_0$, and $\dim\sigma(\operatorname{Exc}(\sigma))\geq\dim Y-1$. Th.-Def.~\ref{long} yields the statement. \end{proof} \begin{lemma}\label{r_i=2} Let $X$ be a smooth Fano $4$-fold with $\rho_X\geq 7$, and $f\colon X\dasharrow Y$ a special rational contraction; notation as in \ref{notation}. Then $r_i=2$ for every $i=1,\dotsc,m$. \end{lemma} \begin{proof} We consider for simplicity $i=1$. \begin{claim} For every irreducible component $D$ of $f^*B_1$, there exists another component $E$ of $f^*B_1$ such that $E\cdot C_D>0$. \end{claim} Let us first show that the Claim implies the statement. Assume by contradiction that $r_1>2$, and let us consider a component $D_1$ of $f^*B_1$. By the Claim, there exists a second component $D_2$ with $D_2\cdot C_{D_1}>0$, and since $r_1\geq 3$, we have $\langle [D_1],[D_2]\rangle\cap\operatorname{Mov}(X)=\{0\}$ by Cor.~\ref{face}. Applying Lemma \ref{description}, we conclude that $D_1$ is not of type $(3,2)$, and $D_2$ is of type $(3,2)$. Now we restart with $D_2$, and we deduce that $D_2$ is not of type $(3,2)$, a contradiction. Hence $r_1=2$. \medskip We prove the Claim. By Lemma \ref{unosolo}, there exists a diagram: $$\xymatrix{{X}\ar@{-->}[d]_{f}\ar@{-->}[r]^{\varphi}&{\widetilde{X}}\ar[d]^{\sigma} \\ Y& {Z}\ar[l]^{g} }$$ where $\varphi$ is a SQM and $\sigma$ is an elementary divisorial contraction with $\operatorname{Exc}(\sigma)=\widetilde{D}$, the transform of $D$ in $\widetilde{X}$. Since $g\circ\sigma$ is special, we have $g(\sigma(\widetilde{D}))=B_1$ and hence $\sigma(\widetilde{D})\subset g^{-1}(B_1)$; let $E_Z\subset Z$ be an irreducible component of $g^{-1}(B_1)$ containing $\sigma(\widetilde{D})$. Let $\widetilde{E}\subset \widetilde{X}$ and $E\subset X$ be the transforms of $E_Z$, so that $E$ is an irreducible component of $f^*B_1$. Note that $\widetilde{E}\cdot\operatorname{NE}(\sigma)>0$ by construction. Now let $\Gamma\subset \widetilde{D}$ be a general minimal irreducible curve contracted by $\sigma$; by Th.-Def.~\ref{long}$(d)$ and $(e)$, the transform of $\Gamma$ in $X$ is the curve $C_D$, and $\Gamma$ is contained in the open subset where $\varphi^{-1}\colon\widetilde{X}\dasharrow X$ is an isomorphism. Therefore $E\cdot C_D=\widetilde{E}\cdot\Gamma>0$. \end{proof} \section{Fano $4$-folds to surfaces}\label{sec_surf} \noindent In this section we study rational contractions from a Fano $4$-fold to a surface, and show the following. \begin{thm}\label{surf} Let $X$ be a smooth Fano $4$-fold having a rational contraction $f\colon X\dasharrow S$ with $\dim S=2$. Then one of the following holds: \begin{enumerate}[$(i)$] \item $X$ is a product of surfaces; \item $\rho_X\leq 12$; \item $13\leq \rho_X\leq 17$, $S$ is a smooth del Pezzo surface, the general fiber $F$ of $f$ is a smooth del Pezzo surface with $4\leq\dim\mathcal{N}_1(F,X)\leq \rho_F\leq 8$, and $\rho_X\leq 9+\dim\mathcal{N}_1(F,X)$. \item $S\cong\mathbb{P}^2$ and $f$ is special. \end{enumerate} \end{thm} \begin{lemma}\label{chitarre} Let $X$ be a smooth Fano $4$-fold with $\rho_X\geq 7$, and $f\colon X\dasharrow S$ a special rational contraction with $\dim S=2$; notation as in \ref{notation}. Then for every $i=1,\dotsc, m$ the divisor $f^*B_i$ has two irreducible components, one a fixed divisor of type $(3,2)$, and the other one of type $(3,2)$ or $(3,1)^{sm}$. \end{lemma} \begin{proof} We consider for simplicity $i=1$. By Lemma \ref{r_i=2} $f^*B_1$ has two irreducible components, and by Lemma \ref{montenero} they are of type $(3,2)$ or $(3,1)^{sm}$. We have to show that they cannot be both of type $(3,1)^{sm}$. Let us choose a SQM $\varphi\colon X\dasharrow\widetilde{X}$ such that $\tilde{f}:=f\circ\varphi^{-1}\colon \widetilde{X}\to S$ is regular, $K$-negative, and special (see Lemma \ref{basic2}). Let $E,\widehat{E}\subset\widetilde{X}$ be the irreducible components of $\tilde{f}^*(B_1)$, and $F\subset\widetilde{X}$ a general fiber of $\tilde{f}$ over the curve $B_1$. Suppose that $E$ is of type $(3,1)^{sm}$. By Lemma \ref{unosolo} and Th.-Def.~\ref{long}, we have a diagram: $$\xymatrix{X\ar@{-->}[rrd]_f\ar@{-->}[r]^{\varphi}&{\widetilde{X}}\ar[dr]^{\tilde{f}}\ar@{-->}[r]^{\psi}&{\widehat{X}} \ar[d]^{\hat{f}}\ar[r]^k&{\widetilde{X}_1}\ar[dl]^{f_1}\\ &&S& }$$ where $\psi$ is SQM and $k$ is the blow-up of a smooth irreducible curve $C\subset \widetilde{X}_1$, with exceptional divisor the transform of $E\subset\widetilde{X}$, and $f_1(C)=B_1$. Recall from the proof of Lemma \ref{unosolo} that $\psi$ arises from a MMP for $E$, relative to $\tilde{f}$. Since $\tilde{f}$ is $K$-negative, one can use a MMP with scaling of $-K_{\widetilde{X}}$ (see \cite[\S 3.10]{BCHM}, and for this specific case \cite[Prop.~2.4]{codim} which can be adapted to the relative setting), so that $\psi$ factors as a sequence of $K$-negative flips, relative to $\tilde{f}$. Then by Lemma \ref{basic1}$(b)$ and $(c)$, the indeterminacy locus of $\psi$ is a disjoint union of exceptional planes, and is disjoint from the indeterminacy locus of $\varphi^{-1}$. In particular, the indeterminacy locus of $\psi$ is contracted to points by $\tilde{f}$. Since $F$ is a general fiber of $\tilde{f}$ over $B_1$, it must be contained in the open subset where $\psi$ is an isomorphism, and $\widehat{F}:=\psi(F)\subset\widehat{X}$ is a general fiber of $\hat{f}$ over $B_1$. We also note that $F$ is contained in the open subset where $\varphi^{-1}$ is an isomorphism: otherwise there should be an exceptional line contained in $E$, and this would give an exceptional line contained in $\operatorname{Exc}(k)$, contradicting \cite[Rem.~5.6]{blowup}. Every irreducible component of $\operatorname{Exc}(k)\cap\widehat{F}$ is a fiber of $k$ over $C$. We deduce that the transform in $X$ of any curve in $E\cap F$ has class in $\mathbb{R}_{\geq 0}[C_{E}]$. We have $\dim F\cap E\cap \widehat{E}\geq 1$, let $\Gamma$ be an irreducible curve in $F\cap E\cap \widehat{E}$. If $\widehat{E}$ were of type $(3,1)^{sm}$ too, the transform of $\Gamma$ in $X$ should have class in both $\mathbb{R}_{\geq 0}[C_{E}]$ and $\mathbb{R}_{\geq 0}[C_{\widehat{E}}]$. This would imply that the classes of $C_{E}$ and $C_{\widehat{E}}$ are proportional, and this is impossible by Th.-Def.~\ref{long}$(e)$. Therefore $E$ and $\widehat{E}$ cannot be both of type $(3,1)^{sm}$. \end{proof} \begin{proof}[Proof of Th.~\ref{surf}] We can assume that $\rho_X\geq 13$, otherwise we have $(ii)$. By Prop.~\ref{factorization1} $f$ factors as a special rational contraction $g\colon X\dasharrow T$ followed by a birational map $T\to S$. There exists a SQM $\varphi\colon X\dasharrow \widetilde{X}$ such that $\widetilde{X}$ is smooth and the composition $\tilde{g}:=g\circ\varphi^{-1}\colon \widetilde{X}\to T$ is regular, $K$-negative and special (see Lemma \ref{basic2}); in particular $T$ is a smooth surface by Lemma \ref{2}. $$\xymatrix{X\ar@{-->}[r]^{\varphi}\ar@{-->}[d]_f\ar@{-->}[dr]^{g} &{\widetilde{X}}\ar[d]^{\tilde{g}}\\S&T\ar[l] }$$ Finally $g$ has $r_i=2$ for every $i=1,\dotsc,m$ (notation as in \ref{notation}) by Lemma \ref{r_i=2}. \medskip Suppose that $m=0$, equivalently that $\tilde{g}$ is quasi-elementary. If $g$ is regular, then \cite[Th.~1.1(i)]{fanos} together with $\rho_X\geq 13$ yield that $X$ is a product of surfaces, so we have $(i)$. Assume instead that $g$ is not regular, and let $F\subset X$ be a general fiber of $f$, which is also a general fiber of $g$. Since the indeterminacy locus of $\varphi^{-1}$ has dimension $1$ (see Lemma \ref{basic1}$(a)$), it does not meet a general fiber of $\tilde{g}$. This means that $F$ is contained in the open subset where $\varphi$ is an isomorphism, and $\varphi(F)$ is a general fiber of $\tilde{g}$. By Lemma \ref{stephane} and \cite[Cor.~3.9 and its proof]{eff} we have that $F$ is a smooth del Pezzo surface with $\rho_F\leq 8$ and $$\rho_X=\dim\mathcal{N}_1(F,X)+\rho_T\leq\rho_F+\rho_T\leq 8+\rho_T.$$ In particular $\rho_T\geq 13-8=5$. Then \cite[Prop.~4.1 and its proof]{eff} imply that $g$ is not elementary and that $T$ is a del Pezzo surface. Therefore $\rho_X\leq 17$, $\dim\mathcal{N}_1(F,X)=\rho_X-\rho_T\geq 13-9=4$, and $S$ is a smooth del Pezzo surface too. So we have $(iii)$. \medskip Suppose now that $m\geq 1$. By Lemma \ref{chitarre}, $(\tilde{g})^*B_1$ has an irreducible component $E$ which is a fixed divisor of type $(3,2)$. We have $(\tilde{g})_*\mathcal{N}_1(E,\widetilde{X})=\mathbb{R}[B_1]$, so that $\operatorname{codim}\mathcal{N}_1(E,\widetilde{X})\geq\rho_T-1$. If $\rho_T>1$, then we get $(i)$ by Lemma \ref{prop32}. Let us assume that $\rho_T=1$. Then $T\cong\mathbb{P}^2$, because $T$ is a smooth rational surface. Moreover the birational map $T\to S$ must be an isomorphism, hence $S\cong\mathbb{P}^2$ and $f$ is special, and we get $(iv)$. \end{proof} \section{Fano $4$-folds to $3$-folds}\label{sec_3folds} \noindent In this section we study rational contractions from a Fano $4$-fold to a $3$-dimensional target, and show the following. \begin{thm}\label{3folds} Let $X$ be a smooth Fano $4$-fold. If there exists a rational contraction $X\dasharrow Y$ with $\dim Y=3$, then either $X$ is a product of surfaces, or $\rho_X\leq 12$. \end{thm} \begin{proof} If $\delta_X\geq 3$ the statement follows from Th.~\ref{buonconsiglio}, so we can assume that $\delta_X\leq 2$; we also assume that $\rho_X\geq 7$. By Prop.~\ref{factorization1}, we can suppose that the map $X\dasharrow Y$ is special. Moreover by Lemma \ref{basic2} we can factor it as $$X\stackrel{\varphi}{\dasharrow}\widetilde{X}\stackrel{f}{\longrightarrow}Y,$$ where $\varphi$ is a SQM, $\widetilde{X}$ is smooth, and $f$ is regular, $K$-negative and special. By Lemmas \ref{klt} and \ref{gor} we have $\rho_X=\rho_Y+m+1$, $r_1=\cdots=r_m=2$, and the divisors $B_1,\dotsc,B_m$ are pairwise disjoint in $Y$ (notation as in \ref{notation}). For $i=1,\dotsc,m$ the irreducible components of $f^*B_i$ are fixed divisors of type $(3,2)$ by Lemma \ref{montenero}. If $\rho_X-\rho_Y\geq 3$, then $m\geq 2$. Let $E_1,E_2$ be the irreducible components of $f^*B_1$, and $W$ an irreducible component of $f^*B_2$. Since $B_1\cap B_2=\emptyset$, we have $E_1\cap W=\emptyset$, so that $\mathcal{N}_1(E_1,\widetilde{X})\subsetneq\mathcal{N}_1(\widetilde{X})$ by Rem.~\ref{caffe}, and this implies the statement by Lemma \ref{prop32}. If instead $\rho_X-\rho_Y=1$, then $f$ is elementary, and $\rho_X\leq 11$ by \cite[Th.~1.1]{eff}. \bigskip We are left with the case where $\rho_X-\rho_Y=2$ and $m=1$, which we assume from now on. We will adapt the proof of \cite[Th.~1.1]{eff} of the elementary case to the case $\rho_X-\rho_Y=2$, and divide the proof in several steps. Since $m=1$, we set for simplicity $B:=B_1$. \begin{parg}\label{prel} If $\mathcal{N}_1(E_1,\widetilde{X})\subsetneq\mathcal{N}_1(\widetilde{X})$ we conclude as before, so we can assume that $\mathcal{N}_1(E_1,\widetilde{X})=\mathcal{N}_1(\widetilde{X})$; this implies that $\mathcal{N}_1(B,Y)=\mathcal{N}_1(Y)$. By Lemma \ref{klt}, $E_1\cup E_2$ is covered by curves of anticanonical degree $1$. Since an exceptional line cannot meet such curves (see Lemma \ref{basic1}$(b)$), we deduce that $\ell\cap (E_1\cup E_2)=\emptyset$ for every exceptional line $\ell\subset\widetilde{X}$. Notice that even if $f$ is not elementary, by speciality it does not have fibers of dimension $3$, and has at most isolated fibers of dimension $2$. Moreover $Y$ is locally factorial and has (at most) isolated canonical singularities, by Lemma \ref{2}. More precisely, $\operatorname{Sing}(Y)$ is contained in the images of the $2$-dimensional fibers of $f$ (this is due to Ando, see \cite[Th.~4.1 and references therein]{AWaview}). Since $\widetilde{X}$ is smooth and $Y$ is locally factorial, it is easy to see that $f^*B=E_1+E_2$. Finally, since $X$ is Fano, by \cite[Lemma 2.8]{prokshok} there exists a $\mathbb{Q}$-divisor $\Delta_Y$ on $Y$ such that $(Y,\Delta_Y)$ is a klt log Fano, so that $-K_Y$ is big. \end{parg} \begin{step}\label{small} Let $g\colon Y\to Y_0$ be a small elementary contraction. Then $\operatorname{Exc}(g)$ is the disjoint union of smooth rational curves lying in the smooth locus of $Y$, with normal bundle $\mathcal{O}_{\mathbb{P}^1}(-1)^{\oplus 2}$; in particular $K_Y\cdot\operatorname{NE}(g)=0$. \end{step} \begin{proof} Exactly the same proof as the one of \cite[Lemma 4.5]{eff} applies, with the only difference that, in the notation of \cite[Lemma 4.5]{eff}, $\dim\mathcal{N}_1(\widetilde{U}/U)$ could be bigger than $2$. We take $\tau$ to be any extremal ray of $\operatorname{NE}(\widetilde{U}/U)$ not contained $\operatorname{NE}(g_{|\widetilde{U}})$. \end{proof} \begin{step}\label{divisorial} Let $g\colon Y\to Y_0$ be an elementary divisorial contraction. Then $g$ is the blow-up of a smooth point of $Y_0$; in particular $-K_Y\cdot\operatorname{NE}(g)>0$. \end{step} \begin{proof} Set $G:=\operatorname{Exc}(g)\subset Y$. Since $g$ is elementary and $\dim g(G)\leq 1$, we have $\dim\mathcal{N}_1(G,Y)\leq 2$; on the other hand $\dim\mathcal{N}_1(B,Y)=\rho_Y=\rho_X-2\geq 5$ (see \ref{prel}), so $G\neq B$, and $D:=f^*G$ is a prime divisor in $\widetilde{X}$, different from $E_1$ and $E_2$, with $\dim\mathcal{N}_1(D,\widetilde{X})\leq \dim\ker f_*+\dim\mathcal{N}_1(G,Y)\leq 2+2=4$. Since $G$ is fixed, also $D$ is a fixed divisor in $\widetilde{X}$; let $D_X\subset X$ be the transform of $D$. \begin{pargtwo}\label{no32} We show that $D$ is not of of type $(3,2)$. Otherwise, as in the proof of Lemma \ref{prop32} we see that $\dim\mathcal{N}_1(D_X,X)=\dim\mathcal{N}_1({D},\widetilde{X})\leq 4$. On the other hand we have $\delta_X\leq 2$ and $\rho_X\geq 7$, a contradiction. \end{pargtwo} \begin{pargtwo} We show that $g$ is of type $(2,0)$. By contradiction, suppose that $g$ is of type $(2,1)$. As in \cite[proof of Lemma 4.6]{eff}, we show that there is an open subset $\widetilde{U}\subseteq\widetilde{X}$ such that $D\cap\widetilde{U}$ is covered by curves of anticanonical degree $1$. By \cite[Lemma 2.8(3)]{blowup}, $D_X$ still has a non-empty open subset covered by curves of anticanonical degree $1$; this implies that $D_X$ and $D$ are of type $(3,2)$ by \cite[Lemma 2.18]{blowup}, a contradiction to \ref{no32}. \end{pargtwo} \begin{pargtwo}\label{frankfurt} Thus $g$ is of type $(2,0)$; set $p:=g(G)\in Y_0$. Since $\mathcal{N}_1(B,Y)=\mathcal{N}_1(Y)$ by \ref{prel}, we must have $G\cap B\neq \emptyset$ by Rem.~\ref{caffe}. Therefore $p\in g(B)$, hence $g^*(g(B))=B+aG$ with $a>0$, and $(g\circ f)^*(g(B)) =E_1+E_2+aD$ (see again \ref{prel}). As in \cite[proof of Lemma 4.6]{eff}, we get a diagram: $$\xymatrix{{\widetilde{X}}\ar[d]^f\ar@{-->}[r]^{\psi}&{\widehat{X}}\ar[r]^k&{\widetilde{X}_1}\ar[dl]^{f_1} \\Y\ar[r]^g&{Y_0}& }$$ where $\psi$ is a sequence of $D$-negative flips relative to $g\circ f$, $k$ is an elementary divisorial contraction with exceptional divisor the transform $\widehat{D}\subset\widehat{X}$ of $D$, and $f_1$ is a contraction of fiber type with $\dim\ker (f_1)_*=2$. By \ref{no32} and Th.-Def.~\ref{long}, $k$ is of type $(3,0)^{sm}$, $(3,0)^Q$, or $(3,1)^{sm}$; in particular $\widetilde{X}_1$ has at most one isolated locally factorial and terminal singularity. Moreover $f_1$ is special, so that $Y_0$ has locally factorial, canonical singularities by Lemma \ref{lf}. \end{pargtwo} \begin{pargtwo}\label{induction} Let us consider the factorization of $\psi$ as a sequence of $D$-negative flips relative to $g\circ f$: $$\xymatrix{{\widetilde{X}=Z_0}\ar@{-->}[r]^{\sigma_1}\ar[drr]_{g\circ f}&{\cdots}\ar@{-->}[r] &{Z_{i-1}}\ar[d]_{\zeta_{i-1}}\ar@{-->}[r]^{\sigma_i}&{Z_{i}}\ar@{-->}[r]\ar[dl]_{\zeta_{i}}&{\cdots}\ar@{-->}[r]^{\sigma_n} & {Z_n=\widehat{X}}\ar[dlll]^{f_1\circ k}\\ &&{Y_0}&&}$$ With a slight abuse of notation, we still denote by $D,E_1,E_2$ the transforms of these divisors in $Z_i$, for $i=0,\dotsc,n$. We show by induction on $i=0,\dotsc,n$ that $\sigma_i$ is $K$-negative and that $(E_1+E_2)\cdot\ell\leq 0$ for every exceptional line $\ell\subset Z_i$. For $i=0$, this holds by \ref{prel}. Suppose that the statement is true for $i-1$. Let $R$ and $R'$ be the small extremal rays of $\operatorname{NE}(Z_{i-1})$ and $\operatorname{NE}(Z_i)$ respectively corresponding to the flip $\sigma_i$. By the commutativity of the diagram above and by \ref{frankfurt}, we have $E_1+E_2+aD=\zeta_{i-1}^*(g(B))$, hence $(E_1+E_2+aD)\cdot R=0$, where $a>0$. On the other hand $D\cdot R<0$, thus $(E_1+E_2)\cdot R>0$ and $(E_1+E_2)\cdot R'<0$. If $-K_{Z_{i-1}}\cdot R\leq 0$, then by \cite[Rem.~3.6(2)]{eff} there exists an exceptional line $\ell_0\subset Z_{i-1}$ such that $[\ell_0]\in R$, therefore $(E_1+E_2)\cdot\ell_0>0$, contradicting the induction assumption. Hence $-K_{Z_{i-1}}\cdot R> 0$ and $\sigma_i$ is $K$-negative. Finally if $\ell\subset Z_i$ is an exceptional line, by \cite[Rem.~4.2]{eff} we have either $\ell\subset\operatorname{dom}\sigma_i^{-1}$, or $\ell\cap\operatorname{dom}\sigma_i^{-1}=\emptyset$. In the first case $\sigma_i^{-1}(\ell)$ is an exceptional line in $Z_{i-1}$, and we deduce that $(E_1+E_2)\cdot\ell\leq 0$. In the second case, we must have $[\ell]\in R'$ and hence $(E_1+E_2)\cdot\ell< 0$. \end{pargtwo} \begin{pargtwo}\label{flights} By \ref{induction}, $\psi$ factors as a sequence of $K$-negative flips, and Lemma \ref{basic1}$(c)$ yields that the indeterminacy locus of $\psi^{-1}$ is a disjoint union of exceptional lines $\ell_1,\dotsc,\ell_s$. \end{pargtwo} \begin{pargtwo}\label{fiber} Set $F_p:=f_1^{-1}(p)$. We show that $\dim F_p=1$. Note that $\widetilde{X}$ and $\widehat{X}$ are isomorphic outside the fibers of $g\circ f$ and $f_1\circ k$ over $p$, respectively. In $\widetilde{X}$ we have $(g\circ f)^{-1}(p)=D$, and the indeterminacy locus of $\psi$ must be contained in $D$. In $\widehat{X}$ we have $(f_1\circ k)^{-1}(p)=k^{-1}(F_p)=\widehat{D}\cup\overline{F}_p$, where $\overline{F}_p$ is the transform of the components of $F_p$ not contained in $k(\widehat{D})$. On the other hand, by \ref{flights} we also have $k^{-1}(F_p)=\widehat{D}\cup \ell_1\cup\cdots\cup\ell_s$. This shows that $\overline{F}_p\subseteq \ell_1\cup\cdots\cup\ell_s$, in particular $\dim\overline{F}_p\leq 1$, and since $\dim k(\widehat{D})\leq 1$ (see \ref{frankfurt}), we conclude that $\dim F_p=1$. We have also shown that the transform in $\widehat{X}$ of any irreducible component of $F_p$ not contained in $k(\widehat{D})$ must be one of the $\ell_i$'s. \end{pargtwo} \begin{pargtwo}\label{f1} We show that $f_1$ is $K$-negative. Since $f$ is $K$-negative and $f_{|\widetilde{X}\smallsetminus D}\cong (f_1)_{|\widetilde{X}_1\smallsetminus F_p}$, we only have to check the fiber $F_p$. Let $\Gamma$ be an irreducible component of $F_p$. If $\Gamma\not\subseteq k(\widehat{D})$, then by \ref{fiber} we can assume that the transform of $\Gamma$ in $\widehat{X}$ is $\ell_1$. Since $k^{-1}(F_p)$ is connected and $\ell_1,\dotsc,\ell_s$ are pairwise disjoint, we have $\widehat{D}\cdot\ell_1>0$; notice also that $K_{\widehat{X}}\cdot\ell_1=1$. Thus $-K_{\widetilde{X}_1}\cdot\Gamma> 0$ because $k^*(-K_{\widetilde{X}_1})=-K_{\widehat{X}}+b\widehat{D}$ with $b\in\{2,3\}$ (see \ref{frankfurt}). If instead $\Gamma\subseteq k(\widehat{D})$, then by \ref{frankfurt} $k$ must be of type $(3,1)^{sm}$ and $\Gamma=k(\widehat{D})$. By \cite[Lemma 5.25]{blowup} there is a SQM $\varphi_1\colon \widetilde{X}_1\dasharrow X_1$ where $X_1$ is a Fano $4$-fold, and $\Gamma$ is contained in the open subset where $\varphi_1$ is an isomorphism, so that $-K_{\widetilde{X}_1}\cdot \Gamma=-K_{X_1}\cdot\varphi_1(\Gamma)>0$. \end{pargtwo} \begin{pargtwo} By \ref{frankfurt}, \ref{fiber}, and \ref{f1}, $\widetilde{X}_1$ has isolated locally factorial and terminal singularities, $Y_0$ has locally factorial canonical singularities, $f_1$ is $K$-negative, and $\dim F_p=1$. Then \cite[Lemma 5.5]{ou} yields that $p$ is a smooth point of $Y_0$ (note that in \cite{ou} the contraction is supposed to be elementary, but this is used only to conclude that $Y_0$ is locally factorial, which here we already know). In particular $p$ is a terminal singularity, hence $g$ is $K$-negative. The possibilities for $(G,-K_{\widetilde{X}_1|G})$ are given in \cite[Th.~1.19]{AWaview}; moreover we know that $G$ is Gorenstein, and by adjunction that $-K_{G}\cdot C\geq 2$ for every curve $C\subset G$. Going through the list, it is easy to see that the possibilities for $G$ are $\mathbb{P}^2$, $\mathbb{P}^1\times\mathbb{P}^1$, and the quadric cone. In the first two cases, $G\subset Y_{reg}$, and it follows from \cite[Cor.~3.4]{moriannals} that $G\cong\mathbb{P}^2$ and $g$ is the blow-up of $p$. Suppose instead that $G$ is isomorphic to a quadric cone $Q$. Then the normal bundle of $G$ has to be $\mathcal{O}_Q(-1)$, and as in \cite[p.~164]{moriannals} and \cite[proof of Th.~5]{cutkosky} one sees that $\mathcal{I}_p\mathcal{O}_Y=\mathcal{O}_Y(-G)$ where $\mathcal{I}_p$ is the ideal sheaf of $p$ in $Y_0$, so that $g^{-1}(p)=G$ scheme-theoretically. Then $g$ factors through the blow-up of $p$, and being $g$ elementary, it must be the blow-up of $p$, which yields $G\cong\mathbb{P}^2$ and hence a contradiction. \qedhere \end{pargtwo} \end{proof} \begin{parg}\label{nofibertype} If $Y$ has an elementary rational contraction of fiber type $Y\dasharrow Z$, then $\rho_Z=\rho_X-3\geq 4$, in particular $Z$ is a surface. The composition $X\dasharrow Z$ is a rational contraction with $\rho_X-\rho_Z=3$, and we can apply Th.~\ref{surf}. If $(i)$ or $(ii)$ hold, we have the statement. If $(iii)$ holds, then $\rho_X\geq 13$ and $Z$ is a del Pezzo surface, so that $\rho_Z\leq 9$, which is impossible. Finally $(iv)$ cannot hold because $\rho_Z>1$. Therefore we can assume that $Y$ does not have elementary rational contractions of fiber type. \end{parg} \begin{parg} Let $R$ be an extremal ray of $\operatorname{NE}(Y)$. By \ref{nofibertype} the associated contraction cannot be of fiber type, thus it is birational, either small of divisorial. By \ref{small} and \ref{divisorial}, $-K_Y\cdot R\geq 0$. Since $Y$ is log Fano, $\operatorname{NE}(Y)$ is closed and polyhedral, and we conclude that $-K_Y$ is nef and $Y$ is a weak Fano variety (see \ref{prel}). \end{parg} \begin{parg}\label{zero} Let $Y\dasharrow \widetilde{Y}$ be a SQM. Then the composition $X\dasharrow \widetilde{Y}$ is again a special rational contraction with $\rho_X-\rho_{\widetilde{Y}}=2$, so all the previous steps apply to $\widetilde{Y}$ as well. As in \cite[p.~622]{eff}, using \ref{small} and \ref{divisorial} one shows that if $E\subset Y$ is a fixed prime divisor, then $E$ can contain at most finitely many curves of anticanonical degree zero. \end{parg} \begin{parg} Let us consider all the contracting birational maps $Y\dasharrow Y_1$ with $\mathbb{Q}$-factorial target, and choose one with $\rho_{Y_1}$ minimal. Suppose that $\rho_{Y_1}\geq 3$. By minimality, $Y_1$ has an elementary rational contraction of fiber type $Y_1\dasharrow Z$, and $Z$ must be a surface with $\rho_Z=\rho_{Y_1}-1\geq 2$. The composition $X\dasharrow Z$ is a rational contraction, let $F\subset X$ be a general fiber. The general fiber of $Y\dasharrow Z$ is a smooth rational curve $\Gamma\subset Y$, and $\dim\mathcal{N}_1(F,X)\leq\dim\mathcal{N}_1(\Gamma,Y)+(\rho_X-\rho_Y)=3$. Thus we get the statement by Th.~\ref{surf}. Therefore we can assume that $\rho_{Y_1}\leq 2$. \end{parg} \begin{parg} By \cite[Lemma 4.18]{blowup}, we can factor the map $Y\dasharrow Y_1$ as $Y\dasharrow Y'\to Y_1$, where $Y\dasharrow Y'$ is a SQM, and $Y'\to Y_1$ is a sequence of elementary divisorial contractions. Now notice that the composition $X\dasharrow Y'$ is again a special rational contraction with $\rho_X-\rho_{Y'}=2$, so up to replacing $Y$ with $Y'$, we can assume that the map $a\colon Y\dasharrow Y_1$ is regular and is a sequence of $r:=\rho_Y-\rho_{Y_1}$ elementary divisorial contractions: $$Y=W_0\stackrel{a_1}{\longrightarrow}W_1\stackrel{a_2}{\longrightarrow} W_2\longrightarrow\cdots\longrightarrow W_r=Y_1.$$ Let us show that the exceptional loci of these maps are all disjoint, so that $a$ is just the blow-up of $r$ distinct smooth points of $Y_1$. We know by \ref{divisorial} that $a_1$ is the blow-up of a smooth point $w_1\in W_1$, and since $-K_Y$ is nef, it is easy to see that if $C\subset W_1$ is an irreducible curve containing $w_1$, then $-K_{W_1}\cdot C\geq 2$. Suppose that $\operatorname{Exc}(a_2)$ contains $w_1$. Then $a_2$ is $K$-negative, and $\operatorname{Exc}(a_2)$ cannot be covered by curves of anticanonical degree one. By \cite[Th.~1.19]{AWaview} this implies that $\operatorname{Exc}(a_2)\cong\mathbb{P}^2$ and $(-K_{W_1})_{|\operatorname{Exc}(a_2)}\cong\mathcal{O}_{\mathbb{P}^2}(2)$. Then the transform of $\operatorname{Exc}(a_2)$ would be a fixed prime divisor covered by curves of anticanonical degree zero, which is impossible by \ref{zero}. Proceeding in the same way, we conclude that the exceptional loci of the maps $a_i$ are all disjoint. Now $Y_1$ is weak Fano with isolated locally factorial, canonical singularities, and we have $(-K_{Y_1})^3\leq 72$ by \cite{prok}. Therefore $$0<(-K_Y)^3=(-K_{Y_1})^3-8r,$$ which yields $r\leq 8$ and $\rho_X=\rho_{Y_1}+r+2\leq 12$.\qedhere \end{parg} \end{proof} Th.~\ref{main} is a straightforward consequence of Theorems \ref{surf} and \ref{3folds}. \begin{proof}[Proof of Th.~\ref{rationalfibration}] Let $X_0\subseteq X$ and $Y_0\subseteq Y$ be open subsets such that $f_0:=f_{_|X_0}\colon X_0\to Y_0$ is a projective morphism. Up to taking the Stein factorization, we can assume that $f_0$ is a contraction. Let $A\in\operatorname{Pic}(Y)$ be ample and consider $H:=f^*A\in\operatorname{Pic}(X)$. Then $H$ is a movable divisor, hence it yields a rational contraction $f'\colon X\dasharrow Y'$. It is easy to see that $f'_{|X_0}=f_0$, in particular $\dim Y'=3$. Then the statement follows from Th.~\ref{3folds}. \end{proof} \section{Fano $4$-folds to $\mathbb{P}^1$} \noindent Let $X$ be a Fano $4$-fold and $f\colon X\dasharrow\mathbb{P}^1$ be a rational contraction; notice that $f$ is always special. In the following proposition we collect the information that we can give on $f$. \begin{proposition} Let $X$ be a smooth Fano $4$-fold and $f\colon X\dasharrow\mathbb{P}^1$ be a rational contraction. Let $F_1,\dotsc,F_m$ be the reducible fibers of $f$. Then one of the following holds: \begin{enumerate}[$(i)$] \item $\rho_X\leq 12$; \item $X$ is a product of surfaces; \item $\rho_X\leq m+10$, $f$ is not regular, and every $F_i$ has two irreducible components, which are fixed divisors of type $(3,1)^{sm}$ or $(3,0)^Q$. \end{enumerate} \end{proposition} \begin{proof} We can assume that $\rho_X\geq 7$, so that $r_i=2$ for $i=1,\dotsc,m$ by Lemma \ref{r_i=2}. By Lemma \ref{basic2} we can factor $f$ as $X\stackrel{\varphi}{\dasharrow}X'\stackrel{f'}{\to}\mathbb{P}^1$ where $\varphi$ is a SQM, $X'$ is smooth, and $f'$ is regular and $K$-negative. If some $F_i$ has a component of type $(3,0)^{sm}$, then we get $(i)$ by \cite[Th.~5.40]{blowup}. If some $F_i$ has a component of type $(3,2)$, let $E\subset X'$ be its transform. Then $\mathcal{N}_1(E,X')\subseteq\ker(f')_*\subsetneq\mathcal{N}_1(X')$, so we get $(i)$ or $(ii)$ by Lemma \ref{prop32}. We are left with the case where every component of every $F_i$ is of type $(3,1)^{sm}$ or $(3,0)^Q$. The general fiber $F$ of $f'$ is a smooth Fano $3$-fold, so that $\rho_F\leq 10$ by Mori and Mukai's classification (see \cite[Coroll.~7.1.2]{fanoEMS}). If $f$ is regular, then $\varphi$ is an isomorphism, and $\rho_X\leq \rho_F+\delta_X$, so we get $(i)$ or $(ii)$ by Th.~\ref{buonconsiglio}. If insteaf $f$ is not regular, then as in \cite[proof of Cor.~3.9]{eff} one shows that in fact $\rho_F\leq 9$. Therefore Cor.~\ref{boundrho} yields $\rho_X\leq m+10$, and we have $(iii)$. \end{proof} \providecommand{\noop}[1]{} \providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace} \providecommand{\MR}{\relax\ifhmode\unskip\space\fi MR } \providecommand{\MRhref}[2]{% \href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2} } \providecommand{\href}[2]{#2}
\section{Introduction} For any fixed $q\in \mathbb{C}$ ($|q|<1$), the sum of the bivariate series $\theta (q,x):=\sum _{j=0}^{\infty}q^{j(j+1)/2}x^j$ is an entire function in $x$ called the {\em partial theta function}. We remind that the Jacobi theta function equals $\Theta (q,x):=\sum _{j=-\infty}^{\infty}q^{j^2}x^j$ and that $\theta (q^2,x/q)=\sum _{j=0}^{\infty}q^{j^2}x^j$. We consider the case when $q$ is real. In the present note we prove the following theorem: \begin{tm}\label{maintm} (1) For any $q\in (0,1)$, all complex conjugate pairs of zeros of $\theta (q,.)$ belong to the set $\{$~{\rm Re}\,$x\in (-5792.7,0),$~$|${\rm Im}\,$x|<132~\}$ $\cup$ $\{ ~|x|<18~\}$. (2) For any $q\in (-1,0)$, all complex conjugate pairs of zeros of $\theta (q,.)$ belong to the set $\{$~$|${\rm Re}\,$x|< 364.2,$~$|${\rm Im}\,$x|<132~\}$. \end{tm} One of the most recent applications of $\theta$ is connected with a problem on {\em section-hyperbolic polynomials}, i.e. real univariate polynomials with all roots real and such that all their truncations of positive degree have also all their roots real. Inspired by classical results of Hardy, Petrovitch and Hutchinson (see \cite{Ha}, \cite{Pe} and \cite{Hu}), the study of the problem was continued in \cite{Ost}, \cite{KaLoVi} and \cite{KoSh}. Other areas of application of $\theta$ are modularity and asymptotics of regularized characters and quantum dimensions of the $(1,p)$-singlet algebra modules (see \cite{BFM} and \cite{CMW}), the theory of (mock) modular forms (see \cite{BrFoRh}), Ramanujan-type $q$-series (see \cite{Wa}), asymptotic analysis (see \cite{BeKi}) and statistical physics and combinatorics (see \cite{So}); see also~\cite{AnBe}. The following properties of $\theta$ are proved in \cite{KoBSM1}: {\em For each $q\in (0,1)$, the function $\theta (q,.)$ has infinitely-many negative and no nonnegative zeros. There exists a sequence of values of $q$ (tending to $1^-$) $0=:\tilde{q}_0<\tilde{q}_1=0.3092\ldots <\tilde{q}_2=0.5169\ldots <\cdots <1$ for which $\theta$ has exactly one multiple zero. This is the rightmost of its (negative) zeros; it is a double one. For $q\in (\tilde{q}_j,\tilde{q}_{j+1}]$, $\theta (q,.)$ has exactly $j$ complex conjugate pairs of zeros counted with multiplicity.} Analogous properties for $q\in (-1,0)$ read (see~\cite{KoPRSE2}): {\em For each $q\in (-1,0)$, the function $\theta (q,.)$ has infinitely-many negative and infinitely-many positive zeros. There exists a sequence of values $\bar{q}_j$ of $q$ (tending to $-1^+$, the largest of which is $\bar{q}_1=-0.727133\ldots$) for which $\theta$ has exactly one multiple zero; it is a double one. This is the rightmost of its negative zeros for $j$ odd and the second from the left of its positive zeros for $j$ even. For $q\in [\bar{q}_1,0)$, all zeros of $\theta$ are real.} \section{Proof of Theorem~\protect\ref{maintm}} \begin{proof}[Proof of part (1)] We write ``CCP'' for ``complex conjugate pair (of zeros of $\theta (q,.)$)''. We use a result of \cite{KoPMD}: {\em For any $q\in (0,1)$, all zeros of $\theta (q,.)$ belong to the domain $\{ {\rm Re}~x<0, |{\rm Im}~x|<132\}$$\cup$$\{ {\rm Re}~x\geq 0, |x|<18\}$.} To prove part (1) of Theorem~\ref{maintm} means to show that the real parts of the CCPs are $>-5792.7$. The proof is based on a comparison between the functions $\theta$, $\Theta ^*:=\sum _{j=-\infty}^{\infty}q^{j(j+1)/2}x^j$ and $G:=\sum _{j=-\infty}^{-1}q^{j(j+1)/2}x^j$. Obviously, $\theta =\Theta ^*-G$. For the function $\Theta ^*$ we use the following formula (derived from the Jacobi triple product, see~\cite{KoFAA}): $$\Theta ^*(q,x)=QPR~~~\,{\rm ,~where}~~~\, Q:=\prod _{m=1}^{\infty}(1-q^m)~~~,~~~P:=\prod _{m=1}^{\infty}(1+xq^m)~~~ {\rm and}~~~R:=\prod _{m=1}^{\infty}(1+q^{m-1}/x)~.$$ Consider the functions $\theta$, $\Theta ^*$ and $G$ restricted to the vertical line in the $x$-plane $\mathcal{L}_{\nu}(q)~:~$Re\,$x=-q^{-\nu -1/2}$, $\nu \in \mathbb{N}$ which avoids the zeros of $\Theta ^*$. The product $|Q|\cdot |P|\cdot |R|$ is minimal for $x=-q^{-\nu -1/2}$ (because for $g:=q^{m-1}$, $u<-1$ and $v\in \mathbb{R}^*$, one has $|1+g/(u+iv)|^2-|1+g/u|^2=-(2u+g)v^2g/(u^2(u^2+v^2))>0$ and $|1+(u+iv)q^m|>|1+uq^m|$). Obviously, \begin{equation}\label{majorizeG} |G|\leq \sum _{j=0}^{\infty}|q|^{j(j-1)/2}|x|^{-j-1}\leq \sum _{j=0}^{\infty}|x|^{-j-1}=1/(|x|-1)~. \end{equation} When $x\in \mathcal{L}_{\nu}(q)$, the right-hand side is maximal for $x=-q^{-\nu -1/2}$. If for given $q$ and $\nu$ one has \begin{equation}\label{ineqThetaG} |\Theta ^*(q,-q^{-\nu -1/2})|>|G(q,-q^{-\nu -1/2})|~, \end{equation} then the inequality $|\Theta ^*|>|G|$, hence $\Theta ^*-G\neq 0$, holds true along $\mathcal{L}_{\nu}(q)$ and the function $\theta$ has no zeros on the line $\mathcal{L}_{\nu}(q)$. We set $[\tilde{q}_1,1)=\cup _{n=1}^{\infty}K_n$, where $K_n:=[\tilde{q}_1,1-1/(n+1)]$. We set also $\ell _1:=4$ and $\ell _n:=4(n+1)$, if $n\geq 2$. \begin{lm}\label{lmLnu} For $q\in K_n$, $\nu \geq \ell _n$ and $x\in \mathcal{L}_{\nu}(q)$, one has $|\Theta ^*|>|G|$ (hence $\theta \neq 0$). \end{lm} \begin{proof}For $n=1$, one has $Q\geq \prod _{j=1}^{\infty}(1-2^{-j})= 0.288\ldots$ and for $\nu \in \mathbb{N}$, $\nu \geq \ell _1$, $R|_{x=-q^{-\nu -1/2}}>Q$. Denote by $P^{\bullet}$ the product $P|_{x=-q^{-\nu -1/2}}$ and set $P^{\dagger}:=\prod _{j=1}^{\infty}(1-q^{j-1/2})$. Thus $$P^{\bullet}\geq P^{\flat}P^{\dagger}~~~,\, \, {\rm where}~~~ P^{\flat}:=(1-q^{-7/2})(1-q^{-5/2})(1-q^{-3/2})(1-q^{-1/2})$$ with equality only for $\nu =\ell _1=4$. Both factors $P^{\flat}$ and $P^{\dagger}$ can be minorized by their respective values $36.3\ldots$ and $0.129\ldots$ for $q=1/2$, so $P^{\bullet}\geq P^{\bullet}|_{\nu =4,q=1/2}>36.3\cdot 0.129=4.68\ldots$ and $$|\Theta ^*(q,-q^{-\nu -1/2})|>4.68\cdot 0.288^2=0.388\ldots~.$$ At the same time, for $x=-q^{-\nu -1/2}\leq -q^{-9/2}$ and for $q\in [\tilde{q}_1,1/2]$, the majoration $1/(|x|-1)$ of $|G|$ (see (\ref{majorizeG})) is maximal for $q=1/2$, $\nu =4$, in which case it equals $0.046\ldots <0.388\ldots$. For $n\geq 2$, we use the inequality $Q\geq e^{-(\pi ^2/6)n}$ which holds true for $q\in K_n$, see Lemma~4 in~\cite{KoFAA}. As in the case $q\in K_1$, one obtains $R|_{x=-q^{-\nu -1/2}}>Q$, $\mathbb{N}\ni \nu \geq \ell _n$. The product $P$ is represented in the form $P=P^{\triangle}P^{\dagger}$ (with $P^{\dagger}$ as above), where $$P^{\triangle}:=\prod _{m=1}^{\nu}(1-q^{-\nu -1/2+m})= q^{-\nu ^2/2}(-1)^{\nu}P^{\sharp}~~~,~~~ P^{\sharp}:=\prod _{m=1}^{\nu }(1-q^{\nu +1/2-m})~.$$ It is clear that $P^{\sharp}>P^{\dagger}>(1-\sqrt{q})Q$; the rightmost inequality follows from $1-q^{j-1/2}<1-q^j$, $j\in \mathbb{N}$. Set $h:=1-1/(n+1)$, $f^*:=(1-1/x)^{-x}$, and $\tau :=(1-h^{1/2})^2$. The factor $q^{-\nu ^2/2}$ is minorized by $h^{-8(n+1)^2}=((f^*)(n+1))^{8(n+1)}$. The function $f^*$ is decreasing on $[2,\infty )$, with $f^*(2)=4$ and $\lim _{x\rightarrow \infty}f^*(x)=e$, therefore $q^{-\nu ^2/2}\geq ((f^*)(n+1))^{8(n+1)}>e^{8(n+1)}$. Hence $$\begin{array}{c} \tau =((1/(n+1))/(1+h^{1/2}))^2>1/4(n+1)^2~~~~\, {\rm and}\\ \\ |\Theta ^*|=|QPR|>Q^2|P| =Q^2|P^{\triangle}P^{\dagger}|>Q^2(P^{\dagger})^2q^{-\nu ^2/2}> Q^4(1-\sqrt{q})^2q^{-\nu ^2/2}\\ \\ >Q^4\tau e^{8(n+1)}> e^{-4(\pi ^2/6)n}\tau e^{8(n+1)}= e^{(8-2\pi ^2/3)n+8}\tau >e^{n+8}/4(n+1)^2~.\end{array}$$ The function $e^{x+8}/4(x+1)^2$ is increasing on $[2,\infty)$, so $|\Theta ^*|>e^{10}/36$. For $|G|$ one obtains $$\begin{array}{ccccccc} |G|&\leq &1/(q^{-\nu -1/2}-1)&\leq &1/(h^{-\nu -1/2}-1)&\leq& 1/(h^{-4(n+1)-1/2}-1)\\ \\&\leq &1/(e^4h^{-1/2}-1) &\leq &1/(e^4-1)&<&e^{10}/36~.\end{array}$$ \end{proof} \begin{lm}\label{lmI} For $j\in \mathbb{N}$, the double zero of $\theta (\tilde{q}_j,.)$ belongs to the interval $I:=[-1226,0]$. \end{lm} \begin{proof}We use a result of~\cite{KoAA}: {\em Consider the function $\theta$ with $q$, $x\in \mathbb{C}$, $|q|<1$. Set $\alpha _0:=\sqrt{3}/(2\pi )=0.27\ldots$. Then for $k\geq n\geq 5$ and for $|q|\leq 1-1/(\alpha _0n)$, there exists exactly one (and simple) zero $\xi _k$ of $\theta (q,.)$ satisfying the conditions $|q|^{-k+1/2}<|\xi _k|<|q|^{-k-1/2}$, no zero is of modulus $|q|^{-k\pm 1/2}$, and exactly $n-1$ zeros counted with multiplicity are of modulus $<|q|^{-n+1/2}$.} Hence for $|q|\in [1-1/(\alpha _0(n-1)),1-1/(\alpha _0n)]$, for any multiple zero $\xi$ of $\theta$ one has $|\xi |\leq \gamma _n:=(1-1/(\alpha _0(n-1)))^{-n+1/2}$. Indeed, the quantity $|q|^{-n+1/2}$ is maximal for $|q|=1-1/(\alpha _0(n-1))$ and no multiple zero of $\theta$ is of modulus $\geq |q|^{-n+1/2}$. For $n\geq 6$, the sequence $\gamma _n$ is decreasing, $\gamma _6=1225.1\ldots$ and $1-1/(5\alpha _0)=0.27\ldots <\tilde{q}_1$, so for $q\in (0,1)$, any double zero of $\theta$ is in~$I$. \end{proof} Simple zeros of $\theta$ (real or complex) depend continuously on $q$. Two simple real zeros of $\theta (\tilde{q}_j^-,.)$ coalesce for $q=\tilde{q}_j$ to become a complex pair for $q=\tilde{q}_j^+$ (as we say, a pair born from the double zero of $\theta (\tilde{q}_j,.)$), see \cite{KoBSM1}. For each $q$ fixed, the line $\mathcal{L}_{\nu}(q)$ is to the right of $\mathcal{L}_{\nu +1}(q)$. As $q$ increases, the number $-q^{-\nu -1/2}$ increases and $\mathcal{L}_{\nu}(q)$ moves from left to right. For any $q\in K_1$, the line $\mathcal{L}_{\nu}(q)$, $\nu \geq \ell _1=4$, is to the left of the double zero $-7.5\ldots$ of $\theta (\tilde{q}_1,.)$, see \cite{KoSh} or~\cite{KoBSM1}; one has $\mathcal{L}_4(\tilde{q}_1)~:~$Re\,$x=-196.7\ldots$ and $\mathcal{L}_4(1/2)~:~$Re\,$x=-22.6\ldots$. Recall that $\tilde{q}_2=0.51\ldots \not\in K_1$. Hence for $q\in K_1\setminus \tilde{q}_1$, there is exactly one CCP, the one born from the double zero of $\theta (\tilde{q}_1,.)$. For $q\in K_1$, there are no zeros of $\theta$ on $\mathcal{L}_4(q)$, so as $q$ increases from $\tilde{q}_1$ to $1/2$, the line $\mathcal{L}_4(q)$ does not encounter the only CCP of $\theta$ and thus there are no CCPs on and to the left of~$\mathcal{L}_4(q)$. Thus there are no CCPs on and to the left of $\mathcal{L}_{\ell _2}(1/2)=\mathcal{L}_{12}(1/2)$. One has $\mathcal{L}_{12}(1/2)~:~$Re\,$x=-5792.6\ldots$, $\mathcal{L}_{12}(0.56)~:~$Re\,$x=-1404.9\ldots$ and $\mathcal{L}_{14}(0.56)~:~$Re\,$x=-4479.9\ldots$ (here and below the values $0.56$, $0.6$ and $0.63$ of $q$ are chosen for the convenience of computation). As $q$ increases from $1/2$ to $0.56$, the line $\mathcal{L}_{12}(q)$ moves from Re\,$x=-5792.6\ldots$ to Re\,$x=-1404.9\ldots$ and encounters no zeros of $\theta$ on its way. As CCPs can be born only on the interval $I$, for $q\in [1/2,0.56]$, no CCPs are born to the left of $\mathcal{L}_{12}(q)$. For $q=0.56$, there are no CCPs with Re\,$x\leq -4479.9\ldots$, and for $q\in [\tilde{q}_1,0.56]$, there are no CCPs with Re\,$x\leq -5792.6\ldots$. One has $\mathcal{L}_{14}(0.6)~:~$Re\,$x=-1647.4\ldots$ and $\mathcal{L}_{16}(0.6)~:~$Re\,$x=-4576.1\ldots$. For $q\in [\tilde{q}_1,0.6]$, the line $\mathcal{L}_{14}(q)$ encounters no zeros of $\theta$ and it does not intersect $I$, so there are no CCPs on and to the left of it. One has $\mathcal{L}_{16}(0.63)~:~$Re\,$x=-2045.8\ldots$ and $\mathcal{L}_{18}(0.63)~:~$Re\,$x=-5154.6\ldots$. Thus there are no CCPs on and to the left of $\mathcal{L}_{16}(q)$ for $q\in [0.6,0.63]$. One has $\mathcal{L}_{18}(2/3)~:~$Re\,$x=-1810.0\ldots$, therefore there are no CCPs on and to the left of $\mathcal{L}_{18}(q)$ for $q\in [0.63,2/3]$, hence there are no CCPs in Re\,$x\leq -5792.6\ldots$ for $q\in K_2$. Consider the numbers $b_n:=-(1-1/n)^{-4(n+1)-1/2}$, $\mathbb{N}\ni n\geq 2$. These are the values of $-q^{-\ell _n-1/2}$ for $q=1-1/n\in K_n$. The sequence $b_n$ is increasing, with $b_2=-5792.6\ldots$ and $b_3=-804.4\ldots$. Hence for $n\geq 3$, $b_n\in I$. For $q\in [2/3,1)$, there is at least one number $-q^{-\nu _0-1/2}$, $\nu _0\in \mathbb{N}$, in the interval $(-5792.6\ldots ,-1226)$; this follows from $1226\cdot (3/2)<5792.6$. The corresponding line $\mathcal{L}_{\nu _0}(q)$ contains no zeros of $\theta$ for $q\in K_n$; this results from Lemma~\ref{lmLnu} and from $b_n\in I$ for $n\geq 3$. For each line $\mathcal{L}_{\nu}(q)$, $\nu \geq \nu _0$, it is true that for $q\in K_n$, there are no CCPs on and to the left of it. As $q$ increases in $K_n$, the line $\mathcal{L}_{\nu _0}(q)$ might begin to intersect the interval $I$, but it is always true that any line $\mathcal{L}_{\nu _0+k}(q)$, $k\in \mathbb{N}$, which does not intersect $I$ has no CCPs on it and to its left (and there is at least one such line for Re\,$x\geq -5792.6\ldots$). Hence there are no CCPs for $q\in [\tilde{q}_1,1)$ and Re\,$x\leq -5792.6\ldots$. \end{proof} \begin{proof}[Proof of part (2)] We use again a result of \cite{KoPMD}: {\em For any $q\in (-1,0)$, all zeros of $\theta (q,.)$ belong to the strip $\{ |{\rm Im}~x|<132\}$.} We have to show that the real part of any complex zero of $\theta$ belongs to the interval $(-364.2,364.2)$. For $q\in (-1,0)$, we consider in the same way the intervals $J_n:=[-1+1/(n+1),\bar{q}_1]$, $n\geq 3$. We set $\ell _n:=4(n+1)$. For $q\in J_n$, we consider the vertical lines $\mathcal{L}_{\nu}(q)~:~$Re\,$x=-|q|^{-\nu -1/2}$ and $\mathcal{R}_{\nu}(q)~:~$Re\,$x=|q|^{-\nu -1/2}$, $\mathbb{N}\ni \nu\geq \ell _n$. As $|q|$ increases, the line $\mathcal{L}_{\nu}(q)$ moves to the right and $\mathcal{R}_{\nu}(q)$ moves to the left. We compare the factors $\mu :=1-q^m$, $\lambda :=1+xq^m$ and $\chi :=1+q^{m-1}/x$ in cases A) $q=q_*\in (0,1)$, Re\,$x=-(q_*)^{-\nu -1/2}$ and B) $q=-q_*\in (-1,0)$, Re\,$x=\pm |q_*|^{-\nu -1/2}$; we denote them by $\mu _A$, $\mu _B$, $\lambda _A$, $\lambda _B$, $\chi _A$ or $\chi _B$ according to the case. Clearly, $|$Im\,$\lambda _A|=|$Im\,$\lambda _B|$, $|$Im\,$\chi _A|=|$Im\,$\chi _B|$ and either $\mu _B=1-q_*^m=\mu _A\in (0,1)$ or $\mu _B=1+q_*^m>1>\mu _A$, either $|$Re\,$\lambda _B|=|1-q_*^{-\nu -1/2+m}|=|$Re\,$\lambda _A|$ or $|$Re\,$\lambda _B|=|1+q_*^{-\nu -1/2+m}|>|$Re\,$\lambda _A|$ and either $|$Re\,$\chi _B|=|1-q_*^{-\nu -3/2+m}/|x|^2|=|$Re\,$\chi _A|$ or $|$Re\,$\chi _B|=|1+q_*^{-\nu -3/2+m}/|x|^2|>|$Re\,$\chi _A|$. Hence $|\Theta ^*(-q_*,\pm |q_*|^{-\nu -1/2})|> |\Theta ^*(q_*,-(q_*)^{-\nu -1/2})|$. The majoration (\ref{majorizeG}) of $|G|$ remains valid. The quantity $1/(|x|-1)$ takes the same values for $x=\pm |q_*|^{-\nu -1/2}$, so $|\Theta ^*|>|G|$ along $\mathcal{L}_{\nu}(q)$ and $\mathcal{R}_{\nu}(q)$. The double zero $y_j$ of $\theta (\bar{q}_j,.)$, $j\in \mathbb{N}$, belongs to the interval $\tilde{I}:=[-237,237]$ (with $y_1=-2.9\ldots$ and $y_2=2.9\ldots$, see~\cite{KoPRSE2}); this follows from $|\bar{q}_1|>1-1/(12\alpha _0)=0.69\ldots$ and $\gamma _{13}=89.9\ldots<237$, see Lemma~\ref{lmI} and its proof. One has $b_4=-364.1\ldots$, $b_5=-236.7\ldots$, so for $n\geq 5$, $b_n\in \tilde{I}$. For $q\in J_n$, there exists a number $|q|^{-\nu -1/2}\in (237,364)$ with $\nu \geq \ell _n$ (because $237/364<|\bar{q}_1|$) and a line $\mathcal{L}_{\nu}(q)$ (resp. $\mathcal{R}_{\nu}(q)$) with no CCPs on and to the left (resp. right) of it. By analogy with the case $q\in (0,1)$ one shows that for $q\in (-1,\bar{q}_1]$, the moduli of the real parts of the complex zeros of $\theta$ are bounded by $|b_4|<364.2$. \end{proof}
\section{Introduction} Finding cyclic structures is a natural problem in graph theory. A famous result of Dirac~\cite{dirac1952some} states that any $n$-vertex graph $G$ with minimum degree $\delta(G) \ge n/2$ contains a Hamilton cycle if $n \ge 3$. More generally, in extremal graph theory many results are of the form that for a sequence of $n$-vertex graphs $(F_n)_{n \ge 1}$ there exists some $\alpha>0$ such that any $n$-vertex graph $G_\alpha$ with $\delta(G_\alpha) \ge \alpha n$ contains $F_n$. Investigating this type of containment questions for a typical graph gives us a different perspective. In random graph theory properties of the model $G(n,p)$ are studied, which is the $n$-vertex \emph{binomial random graph} with each edge present independently at random with probability $p$. The counterpart to the condition on the minium degree in this setup is a function $\hat{p} = \hat{p}(n) \colon \mathbb{N} \rightarrow [0,1]$ such that for $p=\omega(\hat{p})$ the probability that the $n$-vertex graph $F_n$ is contained in $G(n,p)$ tends to $1$ as $n$ tends to infinity, i.e.~$ \lim_{n \to \infty} \mathbb{P} [F_n \subseteq G(n,p)]=1$. In this case we say that $G(n,p)$ contains $F_n$ asymptotically almost surely (a.a.s.). If $\hat{p}$ is optimal in the sense that $\lim_{n \to \infty} \mathbb{P} [F_n \subseteq G(n,p)]=0$ for $p=o(\hat{p})$, we call $\hat{p}$ the \emph{threshold} for the property of containing $F_n$. Bollobás and Thomason~\cite{BolTho87} proved that monotone properties, as subgraph containment, always admit a threshold. For containing a Hamilton cycle Kor{\v{s}}unov~\cite{Kor76} and Pósa~\cite{Pos76} independently showed that the threshold is $\log n/n$. Note that the expected number of Hamilton cycles already tends to infinity for $p = \omega(1/n)$, but the extra $\log n$-term ist needed to guarantee that the graph has a.a.s.~minimum degree $2$. In the following discussion we will work with $p=\omega(\hat{p})$ even though for many results a stronger variant is proved, where $p \ge C \hat{p}$ for some absolute constant $C$ depending only on $(F_n)_{n \ge 1}$. \subsection{Randomly perturbed graphs} Combining the two models from random and extremal graph theory, Bohman, Frieze, and Martin~\cite{bohman2003many} introduced the model of \emph{randomly perturbed graphs} $G_\alpha \cup G(n,p)$ for any $\alpha >0$, where, as above, $G_\alpha$ is any $n$-vertex graph with minimum degree $\delta(G_\alpha) \ge \alpha n$. They show that $p = \omega(1/n)$ is sufficient to a.a.s.~guarantee a Hamilton cycle in $G_\alpha \cup G(n,p)$ for any $G_\alpha$. When $G_\alpha$ is the complete unbalanced bipartite graph $K_{\alpha n,(1-\alpha)n}$ then at least a linear number of egdes is needed. Using both graphs $G_\alpha$ and $G(n,p)$ this result dramatically improves on the $\alpha\ge1/2$ needed in $G_\alpha$ alone, even though adding $G(n,p)$ is a relatively small random perturbation. On the other hand it is also a $\log n$-term better than the threshold in $G(n,p)$ alone, which is plausible as $G_\alpha$ guarantees a large minimum degree. In recent years this model attracted a lot of attention. For a bounded degree spanning tree Krivelevich, Kwan, and Sudakov~\cite{krivelevich2015bounded} proved that $p=\omega(1/n)$ also is sufficient in $G_\alpha \cup G(n,p)$. In $G_\alpha$ alone $\alpha > 1/2$ is needed~\cite{KSS_AlonYuster} and in $G(n,p)$ only recently Montgomery~\cite{M14a} was able to show that again $\log n /n$ gives the threshold. Similar results were proved for factors in~\cite{BTW_tilings} and for powers of Hamilton cycles and general bounded degree graphs in~\cite{BMPPMinDegree}. Together with Böttcher, Montgomery, and Person in~\cite{BMPPMinDegree} we developed a general method for embeddings in randomly peturbed graphs that also implies the previous results for the Hamilton cycle, factors, and bounded degree trees. For all these graphs $G_\alpha = K_{\alpha n,(1-\alpha)n}$ shows that the results are optimal. Beyond this there are many interesting results for other properties~\cites{bohman2004adding,DT_ramsey}, trees with large degrees~\cite{JK_Trees}, hypergraphs~\cites{krivelevich2015cycles,MM_HyperPeturbed,HZ_perturbedcycles,BHKM_powers}, and with larger bounds on $\alpha$~\cites{RSR08_Dirac,NT_sprinkling}. \subsection{Universality} We call a graph $G$ \emph{universal} for a family of graphs $\mathcal{F}$ (short $\mathcal{F}$-universal) if $G$ contains every $F \in \mathcal{F}$ as a subgraph. In the random graph model when $\mathcal{F}$ is large it requires substantial more work to prove that $G(n,p)$ is a.a.s.~$\mathcal{F}$-universal, then showing that a given $F \in \mathcal{F}$ is a.a.s.~contained in $G(n,p)$. For the family $\mathcal{T}(n,\Delta)$ of all $n$-vertex graphs with maximum degree bounded by $\Delta$, Montgomery~\cite{M14a} managed to prove that a.a.s.~$G(n,p)$ is $\mathcal{T}(n,\Delta)$-universal if $p=\omega(\log n/n)$. Krivelevich, Kwan, and Sudakov~\cite{krivelevich2015bounded} asked if extending on their result also $\mathcal{T}(n,\Delta)$-universality holds in $G_\alpha \cup G(n,p)$ for $p=\omega(1/n)$ and $\alpha>0$. In~\cite{BHKMPPtrees} we proved this together with Böttcher, Han, Kohayakawa, Montgomery, and Person building on the method from~\cite{BMPPMinDegree}. In this note we want to investigate universality with respect to the family $\mathcal{F}(n,2)$, which contains all $n$-vertex graphs with maximum degree at most $2$. Graphs in this family are the disjoint union of paths and cycles. In $G_\alpha$ alone Aigner and Brandt~\cite{AB_maxdegree2} showed that $\alpha\ge 2/3$ ($\delta(G_\alpha) \ge (2n-1)/3$ to be precise) is sufficient to find any graph from $\mathcal{F}(n,2)$. On the other side it was proved by Ferner, Kronenberg, and Luh~\cite{ferber2016optimal} that with $p = \omega(n^{-2/3} \log^{1/3}n)$ a.a.s.~$G(n,p)$ is $\mathcal{F}(n,2)$-universal. The disjoint union of $n/3$ triangles ($K_3$-factor) is seemingly the hardest graph to embed and the threshold, which follows from a famous result of Johannson, Kahn, and Vu~\cite{JohanssonKahnVu_FactorsInRandomGraphs}, shows that this is optimal. In~\cite{BMPPMinDegree} we already proved that for a given $F \in \mathcal{F}(n,2)$ it is a.a.s.~contained in $G_\alpha \cup G(n,p)$ for $p=\omega(n^{-2/3})$ and $\alpha>0$, and in this paper we extend this to $\mathcal{F}(n,2)$-universality. The following is our main result, which is asymptotically optimal when $\alpha < 1/3$. \begin{thm}\label{thm:2-universal} Let $\alpha>0$, $p = \omega(n^{-2/3})$, and $G_\alpha$ an $n$-vertex graph with minimum degree $\delta(G_\alpha) \ge \alpha n$. Then a.a.s.~$G_\alpha \cup G(n,p)$ is $\mathcal{F}(n,2)$-universal. \end{thm} In fact, as in~\cite{ferber2016optimal} we prove a stronger statement when there are no short cycles. Let $\mathcal{F}^\ell(n,2)$ be the family of all graphs with maximum degree at most $2$ and girth at least $\ell$, which implies that there are no cycles of length less than $\ell$. \begin{thm}\label{thm:girth_2-universal} Let $\alpha>0$, $\ell \ge 3$ an integer, $p = \omega(n^{-(\ell-1)/\ell})$, and $G_\alpha$ an $n$-vertex graph with minimum degree $\delta(G_\alpha) \ge \alpha n$. Then a.a.s.~$G_\alpha \cup G(n,p)$ is $\mathcal{F}^{\ell}(n,2)$-universal. \end{thm} Here the bound on $p$ is determined by the threshold of an almost spanning $C_\ell$-factor in $G(n,p)$ (c.f.~Lemma~\ref{lem:cycle}). Theorem~\ref{thm:2-universal} follows from Theorem~\ref{thm:girth_2-universal} with $\ell=3$. When the bound on the girth gets large enough in terms of $\alpha$ we can further improve this and show that $p = \omega (1/n)$ is enough. \begin{thm}\label{thm:large_2-universal} For every $\alpha > 0$ there exists an $\ell_0>0$ such that for any integer $\ell \ge \ell_0$ and $G_\alpha$ an $n$-vertex graph with minimum degree $\delta(G_\alpha) \ge \alpha n$ the following holds. For $p = \omega(1/n)$ a.a.s.~$G_\alpha \cup G(n,p)$ is $\mathcal{F}^\ell(n,2)$-universal. \end{thm} Our proof roughly gives $\ell_0 = 10^6 \alpha^{-3}$, where me make no effort in optimizing the constant in front of $\alpha^{-3}$. The optimal dependence between $\ell_0$ and $\alpha$ remains open, where $\ell_0 \ge \alpha^{-1}$ follows from $G_\alpha = K_{\alpha n,(1-\alpha)n}$. From the proof of Ferber, Kronenberg, and Luh~\cite{ferber2016optimal} together with a connecting result by Montgomery~\cite[Theorem 4.3]{M14b} one can deduce the following in $G(n,p)$ alone. For $\ell \ge 10^4 \log^2 n$ and $p \ge \log^5 n /n$ a.a.s.~$G(n,p)$ is $\mathcal{F}^\ell(n,2)$-universal. For larger $\Delta$ the threshold for the $K_{\Delta+1}$-factor in $G(n,p)$ is $(\log^{1/(\Delta+1)}n /n)^{2/(\Delta+1)}$~\cite{JohanssonKahnVu_FactorsInRandomGraphs} and it is commonly believed that this also gives the threshold for $\mathcal{F}(n,\Delta)$-universality, where here $\mathcal{F}(n,\Delta)$ is the family of all $n$-vertex graphs with maximum degree $\Delta$. But until now not even the single containment case is solved and the best known result is an almost spanning version by Ferber, Luh, and Nguyen~\cite{ferber2016embedding} showing that for $F \in \mathcal{F}((1-\varepsilon)n,\Delta)$ with $\Delta \ge 5$ and $p=\omega(\log^{1/(\Delta+1)}n /n)^{2/(\Delta+1)}$ a.a.s.~$G(n,p)$ contains a copy of $F$. For spanning universality Ferber and Nenadov~\cite{FerbeNenadovSpanning} proved that $p=\omega(\log^3 n / n)^{1/(\Delta-1/2)}$ is sufficient, which is just below a natural barrier of $(\log n/n)^{1/\Delta}$ that was known before~\cite{DKRR15} and still a polynomial away from the lower bound. The fact that an $F \in \mathcal{F}(n,\Delta)$ with $\Delta \ge 5$ and $p=\omega(n^{-2/(\Delta+1)})$ is a.a.s.~contained in $G_\alpha \cup G(n,p)$~\cite{BMPPMinDegree}, together with Theorem~\ref{thm:2-universal}, support the following conjecture. \begin{conj} Let $\alpha>0$, $\Delta \ge 3$ an integer, $p = \omega(n^{-2/(\Delta+1)})$, and $G_\alpha$ an $n$-vertex graph with minimum degree $\delta(G_\alpha) \ge \alpha n$. Then a.a.s.~$G_\alpha \cup G(n,p)$ is $\mathcal{F}(n,\Delta)$-universal. \end{conj} In a subsequent paper we will prove this conjecture for $\Delta=3$. \subsection{Proofsketch} The proof of our results essentially follows the approach in~\cite{BHKMPPtrees} but instead of trees we now have to work with a union of cycles. To obtain a universality result we show that a.a.s.~$G(n,p)$ satisfies certain pseudorandom properties (c.f.~Definition~\ref{def:graphs} and Proposition~\ref{prop:expander}) and, therefore, we can work in a deterministic graph $H=G_\alpha \cup G$. From $F \in \mathcal{F}^\ell(n,2)$ in Step~\ref{step1} we embed a small, but linear sized, subgraph $F'$ of $F$ into $G$ (c.f.~Lemma~\ref{lem:2-partition} and~\ref{lem:embeddingF_1}) with the additional property that for any vertex $v \in V(H)$ there is a linear set $B(v)$ of vertices which can be replaced by $v$ in the embedding of $F'$. Furthermore any other vertex $u \in V(G)$ has linear degree into all the sets $B(v)$. This reservoir property is essential for the final step of our embedding process. In Step~\ref{step2} we extend the embedding of $F'$ to an embedding containing all but $\varepsilon n$ vertices of $F$. This is easy, because we only have to embed small cycles and some longer paths (c.f.~Lemma~\ref{lem:longpath} and~\ref{lem:cycle}). Finally, in Step~\ref{step3}, we can finish the embedding of $F$ by using our switching technique from~\cite{BMPPMinDegree}. The advantage is that instead of embedding into the small left over, we can embed the remaining vertices in some set $B(v)$ of linear size and then afterwards alter the embedding accordingly. The rest of this paper is structured as follows. In Section~\ref{sec:tools} we collect helpful tools that we will use in our proof. Then, in Section~\ref{sec:overview}, we give a more detailed overview of the proof from Theorem~\ref{thm:girth_2-universal}, where we properly define the pseudorandom properties that we require from $G(n,p)$, the reservoir sets and also state the lemmas involving these. In Section~\ref{sec:proof} we give the proof of Theorem~\ref{thm1}, which, together with Proposition~\ref{prop:expander} from Section~\ref{sec:overview}, implies Theorem~\ref{thm:girth_2-universal}. Finally, in Section~\ref{sec:auxiliary}, we prove the remaining statements, Proposition~\ref{prop:expander} and Lemma~\ref{lem:2-partition} and~\ref{lem:embeddingF_1}. \subsection{Notation and tools} \label{sec:tools} Throughout the paper we will use standard graph theoretic notation following~\cites{janson2011random,KF_Random}. We collect the most relevant definitions here and give some more later. Let $G$ and $H$ be graphs. We denote the set of \emph{vertices} by $V(G)$ and the set of \emph{edges} by $E(G)$. For a set $V' \subseteq V$ we denote by $G[V']$ the \emph{subgraph of $G$ induced on $V'$} and by $H \setminus G$ the subgraph of $H$ induced on $V(H) \setminus V(G)$. Also, for $v \in V(G)$ the set of \emph{neighbours} of $v$ in $G$ is $N_{G}(v)$. A sequence of distinct vertices $v_0,\dots,v_k$ with $v_iv_{i+1} \in E(G)$ for $i=0,\dots,k-1$ is called a \emph{path of length $k$} in $G$. We write $d_G(u,v)$ for the \emph{distance} between two vertices $v,u \in V(G)$, which is the length of a shortest path in $G$ between them and $\infty$ if there is no path. Furthermore, we slightly abuse notation by writing $a = b \pm c$ for $a \in [b-c,b+c]$ and $b \pm c$ for some number in the interval $[b-c,b+c]$. We will use the following result by Ben-Eliezer, Krivelevich, and Sudakov~\cite{BKS_SizeRamseyPath} which enables us to find a long path in any graphs that has an edge between any two sets of linear size. \begin{lem} \label{lem:longpath} Let $\varepsilon>0$ and assume that $G$ is a graph on $n$ vertices, containing an edge between any two disjoint subsets $V_1,V_2 \subseteq V$ of size $|V_1|,|V_2| \ge \varepsilon n$. Then $G$ contains a path of length at least $n-2 \varepsilon n$. \end{lem} Finding almost spanning embeddings is much easier, in particular, for factors. The following lemma helps to add further cycles if there is still a linear number of vertices left. \begin{lem} \label{lem:cycle} Let $\ell \ge 3$ be an integer, $\varepsilon > 0$, and $p = \omega(n^{-(\ell-1)/\ell})$. Then a.a.s.~in the random graph $G(n,p)$ for any choice of disjoint sets of vertices $V_1,\dots,V_\ell$ of size at least $\varepsilon n/\ell$ the number of cycles $v_1,\dots,v_\ell$ with $v_i \in V_i$ for $1\le i \le \ell$ is at least $\tfrac{1}{2} \prod_{i=1}^k p \cdot |V_i|$. \end{lem} This is a special case of~\cite[Theorem~4.9]{janson2011random} and the proof is a standard application of Janson's inequality (c.f.~the version in~\cite[Theorem 21.12]{KF_Random}), which proved to be a very useful tool for embedding small graphs. \section{Overview of the proof from Theorem~\ref{thm:girth_2-universal} and~\ref{thm:large_2-universal}} \label{sec:overview} The general approach is similar to~\cite{BHKMPPtrees}, where we are proving universality for bounded degree spanning trees. Here we want to embed every $F \in \mathcal{F}^\ell(n,2)$ into $H=G_\alpha \cup G(n,p)$. For proving this universality statement it is helpful to extract a deterministic graph $G$ from $G(n,p)$, which satisfies the crucial conditions for our embedding. Let $G$ be a graph on $n$ vertices and $T$ a graph on vertices $v_1,\dots,v_t$. We denote by $t_T(G)$ the number of copies of $T$ in $G$. Furthermore, for vertex sets $V_1, \dots, V_k \subseteq V(G)$ we denote by $t_T(V_1,\dots,V_k)$ the number of copies of $T$ in $G$ with $v_i \in V_i$. If there is no labelling of the vertices of $T$ specified, then we fix an arbitrary one. \begin{defn} \label{def:graphs} For $\ell_0>0$, $\ell \ge 3$ integers and $p \in (0,1)$ we say that an $n$-vertex graph $G$ is an \emph{$(n, p, \ell_0, \ell)$-graph} if the following holds: \begin{enumerate}[label={(\bfseries A\arabic*)}] \item \label{def:edges} For any disjoint $V_1, V_2 \subset V(G)$ such that $|V_1|, |V_2|\ge n / \ell_0$, we have $t_{K_2}(V_1, V_2)\ge (p/2) |V_1| |V_2|$. \item \label{def:cherries} For any pairwise disjoint $V_1, V_2, V_3 \subset V(G)$ such that $|V_1|, |V_2|, |V_3| \ge n/\ell_0$, we have $t_{K_{1,2}}(V_1, V_2,V_3) \ge (p^2/4) |V_1| |V_2| |V_3|$. Furthermore, $t_{K_{1,2}}(G) \le p^2 n^3$. \item \label{def:cycles} For all $\ell \le k < \ell_0$ and for any pairwise disjoint sets $V_1,\dots,V_k \subseteq V(G)$ such that $|V_i| \ge n /\ell_0^2$ for $1 \le i \le k$, we have $t_{C_k}(V_1,\dots,V_k) \ge \tfrac{1}{2} p^k \prod_{i=1}^k |V_i|$. Furthermore, for $k=3,4$ we also have $t_{C_k}(G) \le p^k n^k$. \end{enumerate} \end{defn} We denote the family of $(n, p, \ell_0, \ell)$-graphs by $\mathcal{G}(n, p, \ell_0, \ell)$. Basically, the elements from $\mathcal{G}(n, p, \ell_0, \ell)$ are graphs where we can control the number of edges, cherries, and cycles (of size $\ell \le k <\ell_0$) between sets of linear size. To cover Theorem~\ref{thm:girth_2-universal} and~\ref{thm:large_2-universal} simultaneously we define \begin{align*} p_{\ell_0,\ell}(n):= \begin{cases} n^{-(\ell-1)/\ell} \text{ for }\ell < \ell_0,\\ n^{-1} \text{ for } \ell \ge \ell_0. \end{cases} \end{align*} The following two statements will readily imply both theorems. \begin{prop}\label{prop:expander} Let $\ell_0, \ell \ge 3$ be integers and $p = \omega(p_{\ell_0,\ell}(n))$. Then the random graph $G(n,p)$ a.a.s.~is in $\mathcal{G}(n,p,\ell_0, \ell)$. \end{prop} Note that $p = \omega(p_{\ell_0,\ell}) = \omega(n^{-1})$ for all $\ell,\ell_0$, which is sufficient for Condition~\ref{def:edges} and~\ref{def:cherries}, and that for $\ell \ge \ell_0$ Condition~\ref{def:cycles} is obsolete for the graphs in $\mathcal{G}(n,p,\ell_0,\ell)$ and . \begin{thm} \label{thm1} For any $\alpha>0$ there exist an $\ell_0>0$ and $n_0$ such that the following holds for any $\ell \ge 3$ and $n\ge n_0$. Suppose $p = \omega(p_{\ell_0,\ell}(n))$, $G \in \mathcal{G}(n, p, \ell_0, \ell)$, and $G_\alpha$ an $n$-vertex on the same vertex set as $G$ with $\delta(G_\alpha) \ge \alpha n$. Then $H:=G_\alpha \cup G$ is $\mathcal{F}^\ell(n, \Delta)$-universal. \end{thm} \begin{proof}[Proof of Theorem~\ref{thm:girth_2-universal} and~\ref{thm:large_2-universal}] Given $\alpha$, let $\ell_0$ and $n_0$ be given by Theorem~\ref{thm1}. Let $\ell \ge 3$ for Theorem~\ref{thm:girth_2-universal} and $\ell \ge \ell_0$ for Theorem~\ref{thm:large_2-universal}. We apply Proposition~\ref{prop:expander} with this $\ell$, $\ell_0$, and $p$. Since a.a.s.~the random graph $G(n,p)$ is in $\mathcal{G}(n,p,\ell_0,\ell)$ we have, by Theorem~\ref{thm1}, that $G_\alpha\cup G(n,p)$ is a.a.s.~$\mathcal{F}^\ell(n,2)$-universal as desired. \end{proof} Since in Theorem~\ref{thm1} $H$ is a deterministic graph we can fix some $F \in \mathcal{F}^\ell(n,2)$ and it remains to show that there is an embedding of $F$ into $H$. Given $\alpha>0$ we will work with constants $\beta, \varepsilon >0$ and an integer $\ell_0$ such that \begin{align} \label{eq:parameters} 20 \beta \le \alpha, \qquad \varepsilon \le 10^{-4} \alpha^3 \beta/2, \quad\text{and}\quad \ell_0 \ge 10/\varepsilon, \end{align} For Theorem~\ref{thm1} the size of cycles, which we can embed directly into $G \in \mathcal{G}(n,p,\ell_0,\ell)$, is bounded by $\ell_0$. We decompose the vertex set of $F$ into three parts. It is convenient to work with a collection of cycles. For this let $\mathcal{F}^\ell_*(n,2)$ be the subset of the edgewise maximal graphs from $\mathcal{F}^\ell(n,2)$. Then $F \in \mathcal{F}^\ell_*(n,2)$ consists of the disjoint union of cycles and possibly one path of length $k$ with $0 \le k \le \ell-2$. \begin{lem} \label{lem:2-partition} Let $\alpha>0$, $\ell \ge 3$ be an integer, $F \in \mathcal{F}^\ell_*(n,2)$, and $\beta$, $\varepsilon$, and $\ell_0$ be such that~\eqref{eq:parameters} holds. Then there exist sets of vertices $U$ and $W$ with $U \subseteq W \subseteq V:=V(F)$ such that $ |U| = 10 \beta n \pm 2$, $ |V \setminus W| = \varepsilon n \pm 2$ and the following holds for the induced subgraphs: \begin{enumerate}[label={(\bfseries P\arabic*)}] \item \label{prop:pathscycles} $F[W \setminus U]$ only contains cycles of length less than $\ell_0$ and arbitrarily long paths . \item \label{prop:K3K2} $F[V\setminus W]$ only contains isolated edges and $C_3$'s. \item \label{prop:neighbours} In $F$ there are no edges between $U$ and $W \setminus U$ and at most two edges between $U$ and $V \setminus W$. \end{enumerate} \end{lem} While Property~\ref{prop:pathscycles} is essential for the embedding, Property~\ref{prop:K3K2} and~\ref{prop:neighbours} mostly are there to simplify the proof. To prove this lemma we greedily partition cycles (of length at least $\ell_0$) into paths and put aside some edges. For the proof of Theorem~\ref{thm1} we first embed $F[U]$ into $G$ with an additional reservoir property. We now define these reservoir sets and show that we can force them to be suitably large. These sets will be helpful when finishing the embedding of~$F$, since they will allow us to locally alter our partial embeddings. Let $V$ be a set of $n$ vertices. Let $H$ be a graph on $V$ and let $F$ be a graph with $V(F)\subset V$. For $v\in V$, let \begin{align*} B_{F,H}(v):=\big\{w\in V(F): N_F(w)\subseteq N_{H}(v)\big\}. \end{align*} For distinct vertices~$u$ and~$v\in V$, we define their \emph{reservoir set}~$B_{F,H}(u, v)$ as follows: \begin{align*} B_{F,H}(u, v):= B_{F,H}(v)\cap N_{H}(u). \end{align*} Recall that the idea is that we can free up any $w\in B_{F,H}(u,v)$ used already in the embedding, by moving the vertex embedded to~$w$ to~$v$. This then allows us to use~$w$ for embedding any remaining neighbours of the vertex embedded to~$u$. The following lemma gives us the desired embedding of $F[U]$, which will be Step~\ref{step1} below. \begin{lem} \label{lem:embeddingF_1} For $\alpha>0$, $\ell \ge 3$ an integer, and $\varepsilon$, $\beta$, and $\ell_0$ such that~\eqref{eq:parameters} holds, there exist $n_0$ such that the following is true for $n \ge n_0$. Suppose $p = \omega(p_{\ell_0,\ell}(n))$, $G \in \mathcal{G}(n,p,\ell_0, \ell)$, and $G_\alpha$ an $n$-vertex graph on the same vertex as $G$ with $\delta(G) \ge \alpha n$. Then for any $F \in \mathcal{F}^\ell_*(10 \beta n \pm 2,2)$ there exists an embedding $f$ of $F$ into $H=G \cup G_\alpha$ such that $|B_{\tilde{F},H}(u,v)| \ge 10 \varepsilon n$ for any $u,v \in V(G)$, where $\tilde{F}=f(F)$. \end{lem} For the proof we first find a family of roughly $\beta n$ many cherries ($K_{1,2}$'s) in $F$. Next we embed them uniformly at random onto cherries in $G$, which ensures the reservoir property in $H$. Then we finish the embedding by connecting the cherries to cycles in $H$. For Step~\ref{step2} we then find an embedding of $F[W \setminus U]$, so that together we have an embedding containing all but roughly $\varepsilon n$ vertices of $F$. This is easy, because by~Property~\ref{prop:pathscycles} we only have to embed small cycles using Property~\ref{def:cycles} of $G$, and some longer paths using Property \ref{def:edges} of $G$ and Lemma~\ref{lem:longpath}. Finally, we can finish the embedding of $F$ in Step~\ref{step3} by using our switching technique from~\cite{BMPPMinDegree}. For example, suppose that $u \in V(F)$ is already embedded onto $\tilde u$ in the current embedding $\tilde F$ and we want to embed a neighbour $w$ of $u$ in $F$. We choose any uncovered vertex $\tilde v$ in $H$ and any vertex $\tilde w$ in $B_{\tilde F,H}(\tilde u, \tilde v)$. Let $v$ be the preimage of $\tilde w$. In the current embedding $\tilde F$ we replace $\tilde w$ by $\tilde v$ and embed $w$ onto $\tilde w$. This gives us again a valid embedding, because by definition of $B_{\tilde F,H}(\tilde u, \tilde v)$ the pair $\tilde w \tilde u$ is an edge in $H$ and the neighbours of $\tilde w$ in $\tilde F$ are also neighbours of $\tilde v$ in $H$. In view of Property~\ref{prop:K3K2} we will use this for the connection of two vertices with a path of length $3$ and for embedding isolated triangles. We now give the details of the proof. \section{Proof of Theorem~\ref{thm1}} \label{sec:proof} Given $\alpha>0$ we choose constants $\beta, \varepsilon>0$ and an integer $\ell_0$ such that~\eqref{eq:parameters} holds. Let $n_0$ be large enough, suppose that $n\ge n_0$, $G\in \mathcal{G}(n, p, \ell_0 ,\ell)$, and that $G_\alpha$ is an $n$-vertex graph on $V(G)$ with $\delta(G_\alpha) \ge \alpha n$, and let $F\in \mathcal{F}^\ell(n,\Delta)$. We want to find an embedding of $F$ into $H:=G \cup G_\alpha$. We add edges to $F$ while not creating a cycle of length less than $\ell$. Then $F \in \mathcal{F}^\ell_*(n,2)$ and there is at most one path of length $k$ in $F$ with $0 \le k \le \ell-2$. \newcounter{steps} \medskip \noindent \textbf{ Step \refstepcounter{steps}\thesteps\label{step1}.} We apply Lemma~\ref{lem:2-partition} to obtain vertex sets $U \subseteq W \subseteq V=V(F)$ of size $|U| = 20 \beta n \pm 2$ and $|V \setminus W| = \varepsilon n \pm 2$ such that~\ref{prop:pathscycles},~\ref{prop:K3K2}, and~\ref{prop:neighbours} hold. By~\ref{prop:neighbours} there are at most two vertices in $F':=F[U]$ which have degree one. To get $F' \in \mathcal{F}^\ell_*(20 \beta n \pm 2,2)$ we add one edge connecting these two vertices if they are at distance at least $\ell-1$. From Lemma~\ref{lem:embeddingF_1} we then obtain an embedding $f'$ of $F'$ into $H$ with the described property. After removing the edge from $F'$ that we added previously and defining $\tilde{F'} := f'(F')$ we still have $|B_{\tilde F',H}(u,v)| \ge 10 \varepsilon n$ for all $u,v \in V(H)$. \medskip \noindent \textbf{ Step \refstepcounter{steps}\thesteps\label{step2}.} Let $F'' := F[W \setminus U]$ and $G':= G \setminus V(\tilde F')$. Note that by~\ref{prop:neighbours} there are no edges between $F'$ and $F''$. We want to find an embedding $f''$ of $F''$ into $G'$ and start with the empty map $f''$. By Property~\ref{prop:pathscycles} the graph $F''$ only contains cycles of length less than $\ell_0$ and paths of arbitrary length. Using~\ref{def:edges} and Lemma~\ref{lem:longpath} we can find a path of length $(1-\varepsilon) n$ in $G'$. We extend $f''$ by embedding all paths from $F_2$ to consecutive segments from this path. Furthermore, for any cycle $C_k$ in $F''$ we use $|V \setminus W| \ge \varepsilon n -2 \ge n/\ell_0$ to find pairwise disjoint $V_1,\dots,V_k \subset V \setminus W$ with $|V_i| \ge n/\ifmmode\ell\else\polishlcross\fi_0^2$ for $1\le i \le k$. Then using~\ref{def:cycles}, we embed $C_k$ into the uncovered vertices of $G'$. Let $f''$ be the resulting embedding of $F''$ into $G'$. We combine $f'$ and $f''$ to obtain an embedding $f_0$ of $F' \cup F'' = F[W]$ into $H$. Let $\tilde F_0 := f_0 (F_1 \cup F_2)$ and observe that $|B_{\tilde{F}_0,H}(u,v)| \ge 10 \varepsilon n$ for all $u,v \in V(H)$, because $N_{\tilde F_0}(x)=N_{\tilde F'}(x)$ for all $x \in V(\tilde F')$. \medskip \noindent \textbf{ Step \refstepcounter{steps}\thesteps\label{step3}.} It remains to embed the $\varepsilon n \pm 2$ vertices of $V \setminus W$. We achieve this by using the sets $B_{\tilde F_0,H}(u,v)$ and the switching technique explained earlier. By~\ref{prop:K3K2} we only have to embed edges, possibly incident to vertices from $\tilde F_0$, and if $\ell=3$ isolated $C_3$'s. We can obtain $F$ from $F' \cup F''$ by iteratively adding a $C_3$ or a connection via two vertices. Let $F_0 \subseteq F_1 \subseteq \dots \subseteq F_t$ be a sequence like this with $F_0 = F' \cup F''$, $F_t = F$, $\varepsilon n/3 -1 \le t \le \varepsilon n/2 +1$, and for some $t' \in [t+1]$ the graph $F_i \setminus F_{i-1}$ is a triangle if $t' \le i \le t$ and a single edge otherwise. Note that for $\ell \ge 4$ we always have $t'=t+1$. We claim that we can extend the embedding inductively while keeping $|B_{\tilde F_{i}',G}(u,v)|\ge |B_{\tilde F_{i-1}',G}(u,v)| - 10$ for every $i\in [t]$, where each $\tilde F_i$ is the image of $F_i$ in $G$. For $1 \le i \le t'-1$ let $w_1,w_2 \in V(F_i) \setminus V(F_{i-1})$ be the two new vertices added in this step. We assume there are vertices $u_1,u_2$ in $F_{i-1}$, which have been embedded to $\tilde{u}_j := f_{i-1}(u_j)$ for $j=1,2$, such that $u_1,w_1,w_2,u_2$ is a path in $F_i$. Further let $\tilde{v}_1$ and $\tilde{v}_2$ be two vertices in $V(G) \setminus V(\tilde F_{i-1})$. Then for $j=1,2$ we have \begin{align*} |B_{\tilde F_{i-1},G}(\tilde{u}_j, \tilde{v}_j)|\ge |B_{\tilde F_0,G}(\tilde u_j, \tilde{v}_j)| - (i-1)10 \ge 10 \varepsilon n - 10 t' \ge 2 \varepsilon n , \end{align*} and, therefore, there are disjoint sets $V_1, V_2 \subseteq B_{\tilde F_{i-1},G}(\tilde{u}_j, \tilde v_j)$ of size at least $\varepsilon n$. Then, by~\ref{def:edges}, there is an edge $\tilde{w}_1 \tilde{w}_2$ in $E(G)$ with $\tilde{w}_j \in V_j$ for $j=1,2$. Let $v_1,v_2$ be those vertices with $f_{i-1}(v_j) = \tilde{w}_j$ for $j=1,2$. From the embedding $f_{i-1}$ of $F_{i-1}$ we construct the embedding $f_i$ of $F_i$ by defining $f_i(w_j) := \tilde{w}_j$, $f_i(v_j) := \tilde{v}_j$ for $j=1,2$, and $f_i(x) := f_{i-1}(x)$ for all $x \in V(F_{i-1}) \setminus \{ v_1,v_2 \}$. Basically, for $j=1,2$ we swap $v_j$ out of the current embedding and use its previous image $\tilde{w}_j$ to embed $w_j$, and embed $v_j$ to $\tilde{v}_j$ instead. Observe, that $f_i$ is an embedding of $F_i$ because $f_{i-1}$ was an embedding of $F_{i-1}$, $\tilde{w}_j\tilde{u}_j$ is an edge of $G_\alpha$ for $j=1,2$, $w_1w_2$ is an edge of $G$, and the neighbours of $\tilde{v_j}$ in $\tilde F_{i-1}$ are also neighbours of $\tilde{v}_j$ in $G_\alpha$ by the definition of $B_{\tilde F_{i-1},G}(\tilde{u}_j, \tilde{v}_j)$ for $j=1,2$. Let $\tilde{F}_i := f_i(F_i)$. Note that $N_{\tilde F_i}(x) = N_{\tilde F_{i-1}}(x)$ for all but at most $10$ vertices $x$ in $V(\tilde F_{i-1})$, the vertices $\tilde v_1, \tilde v_2, \tilde u_1, \tilde u_2$ and the neighbours of $\tilde w_1, \tilde w_2$ in $\tilde F'_{i-1}$, because these are the vertices that are incident to the edges in $E(\tilde F_i')\setminus E(\tilde F_{i-1})$. Thus, we have $|B_{\tilde F_{i},H}(u,v)|\ge |B_{\tilde F_{i-1},H}(u,v)| - 10$, for any $u,v\in V(H)$. If for some $j \in \{1,2\}$ there is no vertex $u_j$ in $V(F_{i-1})$ with $u_jw_j \in E(F_i)$, we choose any vertex $u_j \in V(F_i)$, proceed as above, and then delete the edge $\tilde w_j \tilde u_j$ afterwards. In the case $\ell=3$ for $t' \le i \le t$ we need to embed the triangle on vertices $w_1,w_2,w_3 \in V(F_i) \setminus V(F_{i-1})$. Let $\tilde v_1,\tilde v_2, \tilde v_3$ be three vertices in $V(H) \setminus V(\tilde F_{i-1})$. Then for $j=1,2,3$ we have for any $u \in V(H)$ \begin{align*} |B_{\tilde F_{i-1},H}(\tilde{v}_j)| \ge |B_{\tilde F_{0},H}(u, \tilde{v}_j)| - (i-1)10 \ge 10 \varepsilon n - 10 t \ge 3 \varepsilon n, \end{align*} and, therefore, there are disjoint sets $V_1, V_2, V_3 \subseteq B_{\tilde F_{i-1},H}(\tilde v_j)$ of size at least $\varepsilon n$. Then, by~\ref{def:cycles}, there is a triangle $\tilde{w}_1 \tilde{w}_2 \tilde{w}_3$ in $G$ with $\tilde{w}_j \in V_j$ for $j=1,2,3$. Let $v_1,v_2,v_3$ be those vertices with $f_{i-1}(v_j) = \tilde{w}_j$ for $j=1,2,3$. From the embedding $f_{i-1}$ of $F_{i-1}$ we construct the embedding $f_i$ of $F_i$ by defining $f_i(w_j) := \tilde{w}_j$, $f_i(v_j) := \tilde{v}_j$ for $j=1,2,3$, and $f_i(x) := f_{i-1}(x)$ for all $x \in V(F_{i-1}) \setminus \{ v_1,v_2 ,v_3 \}$. As before, we swap $v_j$ out of the current embedding for $j=1,2,3$ and use its previous image $\tilde{w}_j$ to embed $w_j$, and embed $v_j$ to $\tilde{v}_j$ instead. Observe, that $f_i$ is an embedding of $F_i$ because $f_{i-1}$ was an embedding of $F_{i-1}$, $\tilde{w}_1 \tilde{w}_2 \tilde{w}_3$ is a triangle in $G$ and the neighbours of $\tilde{v_j}$ in $F_{i-1}$ are also neighbours of $\tilde{v}_j$ in $G_\alpha$ for $j=1,2,3$. Let $\tilde{F}_i := f_i(F_i)$. Note that $N_{\tilde F_i}(x) = N_{\tilde F_{i-1}}(x)$ for all but at most $9$ vertices $x$ in $V(\tilde F_{i-1})$, the vertices $\tilde v_1, \tilde v_2, \tilde v_3$ and the neighbours of $\tilde w_1, \tilde w_2, \tilde w_3$ in $\tilde F_{i-1}$, because they are the vertices that are incident to the edges in $E(\tilde F_i)\setminus E(\tilde F_{i-1})$. Thus, we have $|B_{\tilde F_{i},H}(u,v)|\ge |B_{\tilde F_{i-1},H}(u,v)| - 9$, for any $u,v\in V(H)$. Finally, $f:=f_t$ is a spanning embedding of $F$ into $H$ and we finished the proof. \qed \section{Proof of auxiliary statements} \label{sec:auxiliary} It remains to prove Proposition~\ref{prop:expander} and Lemma~\ref{lem:2-partition} and~\ref{lem:embeddingF_1}. We first show that $G(n,p)$ a.a.s.~satisifes Properties~\ref{def:edges}-\ref{def:cycles} required by $\mathcal{G}(n,p,\ell_0,\ell)$. \begin{proof}[Proof of Proposition~\ref{prop:expander}] Let $G$ be a graph drawn from the distribution $G(n,p)$. By a simple Chernoff bound (c.f.~\cite[Theorem~2.8]{janson2011random}), the probability that, for all $V_1,V_2\subset V(G)$, with $|V_1|,|V_2|\ge n/\ell_0$, we have \begin{align}\label{edgecount} (p/2) |V_1||V_2| \le t_{K_2}(V_1,V_2)\le 2 p |V_1||V_2|. \end{align} is at least $1-2^{2n}e^{-\omega(n)} = 1 - o(1)$, because $p_{\ell_0,\ell} = \omega(n^{-1})$. So we can assume that~\ref{def:edges} holds in $G$. Next, let $V_1,V_2,V_3 \subseteq V(G)$ be disjoint sets with $|V_1|,|V_2|,|V_3| \ge n/\ell_0$. Then by~\eqref{edgecount} we have $t_{K_2}(V_i, V_j)\ge (p/2)|V_i||V_j|$ for all $i \not= j$. Then, by convexity, the number of cherries with centre in $V_1$ and neighbours in $V_2$ and $V_3$ respectively is at least \begin{align*} \sum_{v\in V_1}\deg_{V_2}(v) \cdot \deg_{V_3}(v) \ge |V_1| \left( \sum_{v \in V_1} \deg_{V_2}(v) / |V_1| \right) \cdot \left( \sum_{v \in V_1} \deg_{V_2}(v) / |V_1| \right) \ge (p^2/4) |V_1| |V_2|V_3|. \end{align*} A simple second moment calculation implies that a.a.s.~the number of cherries in $G$ is at most $p^2 n^3$ and so~\ref{def:cherries} holds. Note that alternatively this also follows from Janson's inequality. Finally, if $\ell<\ell_0$ we have $p_{\ell_0,\ell} = \omega(n^{-(\ell-1)/\ell})$. Then for any $\ell \le k < \ell_0$, let $V_1,\dots,V_k \subseteq V(G)$ be disjoint sets such that $|V_i| \ge n/\ell_0^2$ for $1 \le i \le k$. By an application of Lemma~\ref{lem:cycle} a.a.s.~the number of cycles $C_k$ in $G$ with one vertex in each $V_i$ is at least $(p^k/2) \prod_{i=1}^k |V_i|$. And again by simple second moment calculations we get that a.a.s.~the number of $C_3$ and $C_4$ in $G$ is at most $p^3n^3$ and $p^4n^4$ respectively. As this implies that also~\ref{def:cycles} holds a.a.s., the lemma is proved. \end{proof} Next, for an almost $2$-regular graph we obtain a decomposition such that~\ref{prop:pathscycles}-\ref{prop:neighbours} hold. \begin{proof}[Proof of Lemma~\ref{lem:2-partition}] Let $F \in \mathcal{F}^\ell_*(n,2)$. We start with $U = \emptyset$ and greedily add the vertex sets of cycles from $F$ to $U$. We stop once $|U|$ passes $10 \beta n$ and then remove exactly $2$ ($v_1$ and $v_2$) or at least $5$ ($v_1,\dots,v_k$ with $v_iv_{i+1} \in E(F)$) vertices from the last cycle sucht that $|U|=10 \beta n \pm 2$. Now let $W = V$. First we want to ensure Property~\ref{prop:neighbours}. By the previous step there are at most two vertices in $U$ with neighbours outside of $F[U]$. If we removed only $v_1,v_2$ from $U$ than we also remove these two from $W$, which gives us one $K_2$ in $F[V \setminus W]$. Otherwise we remove the pairs $v_1,v_2$ and $v_{k-1},v_k$ from $W$, which gives us two $K_2$'s in $F[V \setminus W]$, because $v_2$ and $v_{k-1}$ are not connected by an edge. To ensure Property~\ref{prop:pathscycles} for any cycle in $F[W \setminus U]$ of length larger than $C$ we remove two neighbouring vertices from $W$. There are at most $n/C$ cycles of length $C$ and as $10/C \le \varepsilon$ we have $|V \setminus W| \le 2 n/C + 4 \le \varepsilon n$. We continue by removing the vertex sets of $K_3$'s from $F[W \setminus U]$, keeping $|V \setminus W| \le \varepsilon n + 2$. If we still have $|V \setminus W| < \varepsilon n - 2$ then we remove additional $K_2$'s from $F[W \setminus U]$ until $|V \setminus W| = \varepsilon n \pm 2$. To ensure Property~\ref{prop:K3K2} we only choose those $K_2$, which are not connected to anything else from $V \setminus W$. This is possible because $\varepsilon \le 1/20$ and finishes our proof. \end{proof} Finally, we arrive at the key ingredient of the proof. We embed a small fraction of the graph such that the sets $B_{\tilde{F},H}(u,v)$ are large for all $u,v \in V(H)$. We stress that it is crucial for universality that we can do this for all choices of $F$. \begin{proof}[Proof of Lemma~\ref{lem:embeddingF_1}] For $\alpha>0$ and $\ell \ge 3$ let $\beta$, $\varepsilon$, and $\ell_0$ such that \eqref{eq:parameters} holds. Further let $n_0$ be large enough, $n \ge n_0$, $p=\omega(p_{\ell_0,\ell}(n))$, $G \in \mathcal{G}(n,p,\ell_0,\ell)$, $G_\alpha$ an $n$-vertex graph on the same vertex set as $G$ with $\delta(G) \ge \alpha n$, $H:= G_\alpha \cup G(n,p)$, and $F \in \mathcal{F}^\ell_*(10 \beta n \pm 2,2)$. We greedily choose vertices $x_1,x_2,\dots,x_t$ in $F$ of degree $2$ with distance $d_F(x_i,x_j) \ge 5$ for all $1 \le i<j \le t$ where $t = \beta n \pm 1$ is an integer. For $\ell=3$ we additionally require that either all of them are contained in a $C_3$ or none. We first want to embed these vertices together with their neighbours. If $\ell \ge 5$ we find a set of disjoint cherries in $H$ where we can embed them to. But if $\ell<5$ some of the vertices might be contained in a $C_3$ or $C_4$ and then we have to embed the whole cycle at once as we can not hope to close it later. If $\ell=4$ there are no $C_3$'s and, therefore, we can embed $x_1,\dots,x_t$ with their neighbours onto a set of disjoint $C_4$'s and close the cycle if necessary. Finally, if $\ell=3$ than either all $x_i$ are contained in a $C_3$ or none. In the former case we embed these onto a set of disjoint $C_3$'s and in the latter case we proceed as for $\ell=4$. We call a graph \emph{centred} if it has one vertex indicated as its centre and refer to the neighbours of the centre as neighbours of the graph. \begin{claim*} Let $T$ be a cherry, if $\ell \le4$ a $C_4$ or if $\ell=3$ a $C_3$. Then there is a choice of $t$ disjoint centred copies $T_1,\dots,T_t$ in $H$ such that the following holds. For any $u, v\in V$ there are at least $2 \varepsilon n$ copies of $T$ in $T_1,\dots,T_t$ with their centres in $N_{G_\alpha}(u)$ and the neighbours in $N_{G_{\alpha}}(v)$. \end{claim*} \begin{claimproof}[Proof of the Claim] We randomly and sequentially want to pick $t$ centred copies $T_1,\dots,T_t$ of $T$ from $G$, where each $T_i$ is picked uniformly at random from the copies of $T$ which are disjoint from $T_1,\ldots,T_{i-1}$. For $u,v\in V(H)$, $i\in [t]$, let $Y_{i}^{u,v}$ be the Bernoulli random variable for the event that $\tilde{x}_i\in N_{G_\alpha}(u)$ and $R_i \subseteq N_{G_{\alpha}}(v)$, where $\tilde{x}_i$ is the centre of $T_i$ and $R_i$ is the set containing the two neighbours of $\tilde{x}_i$ in $T_i$. Since $\delta(G_\alpha) \ge \alpha n$, $|F| = 20 \beta n \pm 2$ and the existing copies of $T$ cover at most $4 t \le 4 \beta n + 4 \le \alpha n/8$ vertices, there are at least $7\alpha n/8$ vertices available in both $N_{G_\alpha}(u)\setminus \bigcup_{j\in [i-1]} V(T_j)$ and $N_{G_\alpha}(v)\setminus \bigcup_{j\in [i-1]} V(T_j)$. Therefore, there are sets $V_1 \subseteq N_{G_\alpha}(u)\setminus \bigcup_{j\in [i-1]} V(T_j)$, $V_2,V_3 \subseteq N_{G_\alpha}(v)\setminus \bigcup_{j\in [i-1]} V(T_j)$, and $V_4 \subseteq V(H) \setminus \bigcup_{j\in [i-1]} V(T_j)$ of size $|V_i| = \alpha n/4$ for $i=1,2,3,4$. We now consider the three cases, where $T$ is a cherry, $C_3$, or $C_4$. \begin{itemize}[leftmargin=17pt] \item In the case $T = K_{1,2}$ we will find cherries with the centre in $V_1$ and the neighbours in $V_2$ and $V_3$. Since $G \in \mathcal{G}(n, p, \ell_0, \ell)$ and $\alpha /4 \ge 1/\ell_0$ by~\ref{def:cherries} the number of cherries that we are interested in is at least $\alpha^3 p^2 n^3/256$. The total number of cherries in $G$ is at most $p^2 n^3$. This allows us to obtain \begin{align*} \mathbb{E} (Y_i^{u,v}\mid Y_1^{u,v},\dots, Y_{i-1}^{u,v}) \ge \frac{\alpha^3 p^2 n^3/256}{p^2 n^3}\ge \alpha^3 /256. \end{align*} \item When $T=C_4$ we embed the centre into $V_1$, both neighbours into $V_2$, $V_3$, and the last vertex into $V_4$. As $\ell \le4$, $G \in \mathcal{G}(n, p, \ell_0, \ell)$, and $\alpha /4 \ge 1/\ell_0$ by~\ref{def:cycles} there are at least $\alpha^4 p^4 n^4/128$ suitable copies of $C_4$. On the other hand the total number of $C_4$ is at most $p^4 n^4$, which gives us \begin{align*} \mathbb{E} (Y_i^{u,v}\mid Y_1^{u,v},\dots, Y_{i-1}^{u,v}) \ge \frac{\alpha^4 p^4 n^4/128}{p^4 n^4}\ge \alpha^4 /512. \end{align*} \item Finally, for $T=C_3$ we embed the centre into $V_1$ and the other two vertices into $V_2$ and $V_3$. As $\ell = 3$, we obtain from~\ref{def:cycles} that there are at least $\alpha^3 p^3 n^3/32$ suitable copies of $C_3$ and at most $p^3 n^3$ copies of $C_3$ in $G$ in total. This implies \begin{align*} \mathbb{E} (Y_i^{u,v}\mid Y_1^{u,v},\dots, Y_{i-1}^{u,v}) \ge \frac{\alpha^3 p^3 n^3/32}{p^3 n^3}\ge \alpha^3 /128. \end{align*} \end{itemize} Let $x:= t \alpha^4 /512 \ge \beta \alpha^4 n /1000 \ge 20 \varepsilon n$ by the choice of $\varepsilon$ in \eqref{eq:parameters}. Thus, by~\cite[Lemma~2.2]{allen2016blow} (the sequential dependence lemma) with $\delta=1/2$, or a simple coupling argument, we get \begin{equation*} \mathbb{P}\big(Y_1^{u,v}+ \cdots + Y_{t}^{u,v} < 10\varepsilon n \big) \le \mathbb{P}\big(Y_1^{u,v}+ \cdots + Y_{t}^{u,v} < x/2 \big) < e^{- x/12} \le e^{-\varepsilon n}\,. \end{equation*} With a union bound, we conclude that there is a choice of $T_1,\dots,T_t$ such that, for each $u, v\in V(H)$, $Y_1^{u,v}+ \cdots + Y_{s}^{u,v} \ge 10\varepsilon n$, i.e., the claim holds for any of the $T$. \end{claimproof} With $T_1,\dots,T_t$ as given by the claim we define the embedding $f$ of the graphs $T$ centred at $x_1,\dots,x_t$ by mapping $x_i$ to the centre $\tilde{x}_i$ of $T_i$ and the remaining vertices of this copy of $T$ accordingly. Note that for $\ell \le 4$ we might embed a cherry onto a $C_4$ and leave one vertex uncovered. This gives us a partial embedding $f$ of $F$. Next we extend this embedding $f$ by embedding additional components of $F$ and extending/connecting existing parts. For $\ell \le 4$ we first embed all $C_3$'s and $C_4$'s from $F$ which do not contain a vertex from $x_1,\dots,x_t$. Let $T$ be a $C_3$ or $C_4$ as a subgraph of $F_1$ which we have not yet embedded. As $|F| \le 10 \beta n +2 \le \alpha n/2$ and $G \in \mathcal{G}(n,p,\ell_0,\ell)$ by \ref{def:cycles} there is a copy $\tilde{T}$ of $T$ in the vertices of $G$ not covered by $f$. We extend $f$ by embedding $T$ onto $\tilde{T}$. If there is some component of $G$ which has not been touched by our embedding so far, we choose an arbitrary vertex $v$ and extend $f$ by embedding it to an arbitrary available vertex $\tilde v$. To extend the existing parts let $u$ be any vertex of $F$, which is not yet embedded and has exactly one neighbour $v$ and at most one vertex at distance two that are already embedded (the second condition ensures that we do not close the gap to much). Then as $|N_{G_\alpha}(f(v))| \ge \alpha n$ and $|F| \le 10 \beta n + 2 \le \alpha n/2$ there are at least $\alpha n/2$ choices in $N_{G_\alpha}(f(v))$ for the image $\tilde{u}$ of $u$. We choose one arbitrarily and define $f(u) = \tilde{u}$. Finally, we want to finish the embedding of $F$ by connecting all existing paths to cycles. Oberserve that by our choice of $x_1,\dots,x_t$ and the previous step, all vertices that are not embedded lie on a path of length $3$ connecting two vertices which are already embeded by $f$. So let $f(u_1)=\tilde{u}_1$ and $f(u_2)=\tilde{u}_2$ be two vertices (which have degree one in the image of $f$) such that from the path $u_1,v_1,v_2,u_2$ in $F$ both vertices $u_1,u_2$ are not yet embedded. Let $V_1$ be the available vertices in $N_{G_\alpha}(\tilde{v}_1)$ and $V_2$ the available vertices in $N_{G_\alpha}(\tilde{v}_2)$ after removing the image of $f$. As before we have $|V_1|,|V_2| \ge \alpha n/2$ and using~\ref{def:edges} we find two vertices $\tilde{u}_1$ and $\tilde{u}_2$ such that $\tilde{v}_1\tilde{u}_1 \in E(G_\alpha)$, $\tilde{u}_1\tilde{u}_2 \in E(G)$, and $\tilde{u}_2\tilde{u}_2 \in E(G_\alpha)$. We extend $f$ by defining $f(u_1)=\tilde{u}_1$ and $f(u_2)=\tilde{u}_2$. We repeat the above until all vertices are embedded. For the final embedding $f$ of $F$ into $H$ let $\tilde{F}=f(F)$. By the claim for any $u, v\in V$, there are at least $10 \varepsilon n$ graphs from $T_1,\dots, T_t$ such that their centres are in $N_{G_\alpha}(u)$ and the neighbours are in $N_{G_{\alpha}}(v)$. Since these graphs are contained in $\tilde{F}$, we conclude that $|B_{\tilde{F},H}(u,v)|\ge 10\varepsilon n$ for any $u, v\in V$, as required. \end{proof} \begin{bibdiv} \begin{biblist} \bib{AB_maxdegree2}{article}{ author={Aigner, M.}, author={Brandt, S.}, title={Embedding arbitrary graphs of maximum degree two}, date={1993}, journal={{Journal of the London Mathematical Society}}, volume={48}, pages={39\ndash 51}, } \bib{allen2016blow}{article}{ author={Allen, Peter}, author={B{\"o}ttcher, Julia}, author={H{\`a}n, Hiep}, author={Kohayakawa, Yoshiharu}, author={Person, Yury}, title={Blow-up lemmas for sparse graphs}, date={2016}, journal={arXiv:1612.00622}, pages={122 pages}, } \bib{BTW_tilings}{article}{ author={Balogh, J\'{o}zsef}, author={Treglown, Andrew}, author={Wagner, Adam~Zsolt}, title={Tilings in randomly perturbed dense graphs}, date={2018}, journal={Combinatorics, Probability and Computing}, pages={1–18}, } \bib{BHKM_powers}{article}{ author={Bedenknecht, Wiebke}, author={Han, Jie}, author={Kohayakawa, Yoshiharu}, author={Mota, Guilherme~Oliveria}, title={Powers of tight {H}amilton cycles in random perturbed hypergraphs}, date={2018}, journal={arXiv:1802.08900}, pages={13 pages}, } \bib{BKS_SizeRamseyPath}{article}{ author={Ben-Eliezer, Ido}, author={Krivelevich, Michael}, author={Sudakov, Benny}, title={The size ramsey number of a directed path}, date={2012}, ISSN={0095-8956}, journal={Journal of Combinatorial Theory, Series B}, volume={102}, number={3}, pages={743 \ndash 755}, url={http://www.sciencedirect.com/science/article/pii/S0095895611001006}, } \bib{bohman2004adding}{article}{ author={Bohman, Tom}, author={Frieze, Alan~M.}, author={Krivelevich, Michael}, author={Martin, Ryan~R.}, title={Adding random edges to dense graphs}, date={2004}, journal={Random Structures {\&} Algorithms}, volume={24}, number={2}, pages={105\ndash 117}, url={https://doi.org/10.1002/rsa.10112}, } \bib{bohman2003many}{article}{ author={Bohman, Tom}, author={Frieze, Alan~M.}, author={Martin, Ryan~R.}, title={How many random edges make a dense graph {H}amiltonian?}, date={2003}, journal={Random Structures {\&} Algorithms}, volume={22}, number={1}, pages={33\ndash 42}, url={https://doi.org/10.1002/rsa.10070}, } \bib{BolTho87}{article}{ author={Bollob{\'{a}}s, B{\'{e}}la}, author={Thomason, Andrew}, title={Threshold functions}, date={1987}, journal={Combinatorica}, volume={7}, number={1}, pages={35\ndash 38}, url={https://doi.org/10.1007/BF02579198}, } \bib{BHKMPPtrees}{article}{ author={B{\"{o}}ttcher, Julia}, author={Han, Jie}, author={Kohayakawa, Yoshiharu}, author={Montgomery, Richard}, author={Parczyk, Olaf}, author={Person, Yury}, title={Universality for bounded degree spanning trees in randomly perturbed graphs}, date={2018}, journal={arXiv:1802.04707}, pages={12 pages}, note={Accepted for publication in Random Structures \& Algorithms}, } \bib{BMPPMinDegree}{article}{ author={B{\"{o}}ttcher, Julia}, author={Montgomery, Richard}, author={Parczyk, Olaf}, author={Person, Yury}, title={Embedding spanning bounded degree subgraphs in randomly perturbed graphs}, date={2018}, journal={arXiv:1802.04603}, pages={25 pages}, } \bib{DT_ramsey}{article}{ author={Das, Shagnik}, author={Treglown, Andrew}, title={Ramsey properties of randomly perturbed graphs: cliques and cycles}, date={2019}, journal={arXiv:1901.01684}, pages={23 pages}, } \bib{DKRR15}{article}{ author={{Dellamonica Jr.}, Domingos}, author={Kohayakawa, Yoshiharu}, author={R{\"{o}}dl, Vojtech}, author={Ruci{\'n}ski, Andrzej}, title={An improved upper bound on the density of universal random graphs}, date={2015}, journal={Random Structures {\&} Algorithms}, volume={46}, number={2}, pages={274\ndash 299}, url={https://doi.org/10.1002/rsa.20545}, } \bib{dirac1952some}{article}{ author={Dirac, Gabriel~Andrew}, title={Some theorems on abstract graphs}, date={1952}, journal={Proceedings of the London Mathematical Society}, volume={3}, number={1}, pages={69\ndash 81}, } \bib{ferber2016optimal}{article}{ author={Ferber, Asaf}, author={Kronenberg, Gal}, author={Luh, Kyle}, title={Optimal threshold for a random graph to be 2 universal}, date={2016}, journal={arXiv:1612.06026}, pages={23 pages}, } \bib{ferber2016embedding}{article}{ author={Ferber, Asaf}, author={Luh, Kyle}, author={Nguyen, Oanh}, title={Embedding large graphs into a random graph}, date={2017}, ISSN={1469-2120}, journal={Bulletin of the London Mathematical Society}, volume={49}, number={5}, pages={784\ndash 797}, url={http://dx.doi.org/10.1112/blms.12066}, } \bib{FerbeNenadovSpanning}{article}{ author={Ferber, Asaf}, author={Nenadov, Rajko}, title={Spanning universality in random graphs}, journal={Random Structures \& Algorithms}, volume={53}, number={4}, pages={604\ndash 637}, } \bib{KF_Random}{book}{ author={Frieze, Alan}, author={Karo{\'n}ski, Micha{\ifmmode\ell\else\polishlcross\fi}}, title={Introduction to random graphs}, publisher={Cambridge University Press}, date={2016}, } \bib{HZ_perturbedcycles}{article}{ author={Han, Jie}, author={Zhao, Yi}, title={Hamiltonicity in randomly perturbed hypergraphs}, date={2018}, journal={arXiv:1802.04586}, pages={16 pages}, } \bib{janson2011random}{book}{ author={Janson, Svante}, author={Łuczak, Tomasz}, author={Ruci{\'n}ski, Andrzej}, title={Random graphs}, publisher={John Wiley {\&} Sons}, date={2000}, } \bib{JohanssonKahnVu_FactorsInRandomGraphs}{article}{ author={Johansson, Anders}, author={Kahn, Jeff}, author={Vu, Van~H.}, title={Factors in random graphs}, date={2008}, journal={Random Structures {\&} Algorithms}, volume={33}, number={1}, pages={1\ndash 28}, url={https://doi.org/10.1002/rsa.20224}, } \bib{JK_Trees}{article}{ author={Joos, Felix}, author={Kim, Jawhoon}, title={Spanning trees in randomly perturbed graphs}, date={2018}, journal={arXiv:1803.04958}, pages={41 pages}, } \bib{KSS_AlonYuster}{article}{ author={Koml{\'o}s, J{\'a}nos}, author={S{\'a}rk{\"o}zy, G{\'a}bor~N.}, author={Szemer{\'e}di, Endre}, title={Proof of the {A}lon-{Y}uster conjecture}, date={2001}, journal={Discrete Mathematics}, volume={235}, number={1-3}, pages={255\ndash 269}, url={https://doi.org/10.1016/S0012-365X(00)00279-X}, } \bib{Kor76}{article}{ author={Kor{\v{s}}unov, A.~D.}, title={Solution of a problem of {P}. {E}rd{\H o}s and {A}. {R}\'enyi on {H}amiltonian cycles in undirected graphs}, date={1976}, journal={Doklady Akademii Nauk SSSR}, volume={228}, number={3}, pages={529\ndash 532}, } \bib{krivelevich2015cycles}{article}{ author={Krivelevich, Michael}, author={Kwan, Matthew}, author={Sudakov, Benny}, title={Cycles and matchings in randomly perturbed digraphs and hypergraphs}, date={2016}, journal={Combinatorics, Probability {\&} Computing}, volume={25}, number={6}, pages={909\ndash 927}, url={https://doi.org/10.1017/S0963548316000079}, } \bib{krivelevich2015bounded}{article}{ author={Krivelevich, Michael}, author={Kwan, Matthew}, author={Sudakov, Benny}, title={Bounded-degree spanning trees in randomly perturbed graphs}, date={2017}, journal={{SIAM} Journal on Discrete Mathematics}, volume={31}, number={1}, pages={155\ndash 171}, url={https://doi.org/10.1137/15M1032910}, } \bib{MM_HyperPeturbed}{article}{ author={McDowell, Andrew}, author={Mycroft, Richard}, title={{H}amilton {$\ell$}-cycles in randomly-perturbed hypergraphs}, date={2018}, journal={The Electronic Journal of Combinatorics}, volume={25}, number={4}, pages={P4.36}, } \bib{M14b}{article}{ author={Montgomery, R.}, title={Embedding bounded degree spanning trees in random graphs}, date={2014}, journal={arXiv:1405.6559}, pages={14 pages}, } \bib{M14a}{article}{ author={Montgomery, R.}, title={Spanning trees in random graphs}, date={2018}, journal={arXiv:1810.03299}, } \bib{NT_sprinkling}{article}{ author={Nenadov, Rajko}, author={Trujić, Miloš}, title={Sprinkling a few random edges doubles the power}, date={2018}, journal={arXiv:1811.09209}, pages={18 pages}, } \bib{Pos76}{article}{ author={P{\'{o}}sa, L.}, title={{H}amiltonian circuits in random graphs}, date={1976}, journal={Discrete Mathematics}, volume={14}, number={4}, pages={359\ndash 364}, url={https://doi.org/10.1016/0012-365X(76)90068-6}, } \bib{RSR08_Dirac}{article}{ author={R{\"{o}}dl, Vojtech}, author={Szemer{\'{e}}di, Endre}, author={Rucinski, Andrzej}, title={An approximate dirac-type theorem for \emph{k} -uniform hypergraphs}, date={2008}, journal={Combinatorica}, volume={28}, number={2}, pages={229\ndash 260}, url={https://doi.org/10.1007/s00493-008-2295-z}, } \end{biblist} \end{bibdiv} \end{document}
\section{Introduction} For $\alpha,\beta>-1$ and $n=0,1,2,\dots$, we consider the sequences $\{a_{n}^{(\alpha,\beta)}\}_{n\in\mathbb{N}}$ and $\{b_{n}^{(\alpha,\beta)}\}_{n\in\mathbb{N}}$ given by \[ a_n^{(\alpha,\beta)}=\frac{2}{2n+\alpha+\beta+2} \sqrt{\frac{(n+1)(n+\alpha+1)(n+\beta+1)(n+\alpha+\beta+1)}{(2n+\alpha+\beta+1)(2n+\alpha+\beta+3)}},\quad n\geq 1, \] \[ a_{0}^{(\alpha,\beta)} = \frac{2}{\alpha+\beta+2}\sqrt{\frac{(\alpha+1)(\beta+1)}{(\alpha+\beta+3)}}, \] \[ b_n^{(\alpha,\beta)}=\frac{\beta^2-\alpha^2}{(2n+\alpha+\beta)(2n+\alpha+\beta+2)},\quad n\geq 1, \] and \[ b_{0}^{(\alpha,\beta)} = \frac{\beta-\alpha}{\alpha+\beta+2}. \] Then, for any given sequence $\{f(n)\}_{n\ge 0}$, we define $\{J^{(\alpha,\beta)}f(n)\}_{n\ge 0}$ by the relations \[ J^{(\alpha,\beta)}f(n)=a_{n-1}^{(\alpha,\beta)}f(n-1)+b_n^{(\alpha,\beta)}f(n)+ a_{n}^{(\alpha,\beta)}f(n+1), \qquad n\ge 1, \] and $J^{(\alpha,\beta)}f(0)=b_0^{(\alpha,\beta)}f(0)+ a_{0}^{(\alpha,\beta)}f(1)$. Note that the sequences $\{a_n^{(\alpha,\beta)}\}_{n\ge 0}$ and $\{b_n^{(\alpha,\beta)}\}_{n\ge 0}$ are the ones involved in the three-term recurrence relation for the normalized Jacobi polynomials. By using the Rodrigues' formula (see \cite[p.~67, eq.~(4.3.1)]{Szego}), the Jacobi polynomials $P^{(\alpha,\beta)}_n(x)$, $n\ge 0$, are defined as \[ (1-x)^{\alpha}(1+x)^{\beta}P_n^{(\alpha,\beta)}(x)=\frac{(-1)^n}{2^n \, n!}\frac{d^n}{dx^n}\left((1-x)^{\alpha+n}(1+x)^{\beta+n}\right). \] They are orthogonal on the interval $[-1,1]$ with respect to the measure \[ d\mu_{\alpha,\beta}(x)=(1-x)^\alpha(1+x)^{\beta}\,dx. \] The family $\{p_n^{(\alpha,\beta)}(x)\}_{n\ge 0}$, given by $p_n^{(\alpha,\beta)}(x)=w_n^{(\alpha,\beta)}P_n^{(\alpha,\beta)}(x)$, where \begin{equation*} \begin{aligned} w_n^{(\alpha,\beta)}& = \frac{1}{\|P_n^{(\alpha,\beta)}\|_{L^2((-1,1),d\mu_{\alpha,\beta})}} \\&= \sqrt{\frac{(2n+\alpha+\beta+1)\, n!\,\Gamma(n+\alpha+\beta+1)}{2^{\alpha+\beta+1}\Gamma(n+\alpha+1)\,\Gamma(n+\beta+1)}},\quad n\geq1, \end{aligned} \end{equation*} and \[ w_{0}^{(\alpha,\beta)} = \frac{1}{\|P_{0}^{(\alpha,\beta)}\|_{L^2((-1,1),d\mu_{\alpha,\beta})}} = \sqrt{\frac{\Gamma(\alpha+\beta+2)}{2^{\alpha+\beta+1}\Gamma(\alpha+1)\Gamma(\beta+1)}}, \] is a complete orthonormal system in the space $L^2([-1,1],d\mu_{\alpha,\beta})$. Furthermore, we have that \[ J^{(\alpha,\beta)}p^{(\alpha,\beta)}_n(x)=xp_n^{(\alpha,\beta)}(x),\qquad x\in [-1,1]. \] Throughout this paper we will work with the operator \[ \mathcal{J}^{(\alpha,\beta)}f(n)=(J^{(\alpha,\beta)}-I)f(n), \] where $I$ denotes the identity operator, instead of $J^{(\alpha,\beta)}$. Due to this translation by the identity $I$, the operator $-\mathcal{J}^{(\alpha,\beta)}$ is nonnegative and its spectrum is the interval $[0,2]$. In this paper we continue the study of the discrete harmonic analysis associated with $\mathcal{J}^{(\alpha,\beta)}$ initiated in \cite{ACL-JacI}, where the heat semigroup was exhaustively analyzed. Our work on these kind of problems pretends to be an extension of the research done in \cite{Ciau-et-al} for the discrete Laplacian \begin{equation} \label{eq:dis-lap} \Delta_d f(n)=f(n-1)-2f(n)+f(n+1) \end{equation} and in \cite{Bet-et-al} for ultraspherical expansions, which corresponds with the case $\alpha=\beta=\lambda-1/2$ of $J^{(\alpha,\beta)}$. Our target here is the study of a classical operator on harmonic analysis: the Riesz transform. For $\Delta_d$ this operator corresponds with classical discrete Hilbert transform and it was analyzed in \cite{Ciau-et-al}. For ultraspherical expansions this operator has not been treated yet, so our result is completely new even in that particular case. Although the powers of $\mathcal{J}^{(\alpha,\beta)}$ will be studied deeply in a forthcoming paper, we have to state them at this point in order to define the Riesz transform. For our present purpose, it is enough to say that the fractional integrals (also known as negative powers) of $\mathcal{J}^{(\alpha,\beta)}$ are defined, for an appropriate sequence $\{f(n)\}_{n\ge 0}$, by \[ (-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}f(n)=\frac{1}{\Gamma(\sigma)}\int_{0}^{\infty}W_t^{(\alpha,\beta)}f(n)\,\frac{dt}{t^{1-\sigma}}, \qquad \sigma>0, \] where \[ W_t^{(\alpha,\beta)}f(n)=\sum_{m=0}^\infty f(m)K_t^{(\alpha,\beta)}(m,n), \] is the heat semigroup associated to $\mathcal{J}^{(\alpha,\beta)}$ (see \cite{ACL-JacI}), whose kernel is \[ K_t^{(\alpha,\beta)}(m,n)=\int_{-1}^{1}e^{-(1-x)t}p_m^{(\alpha,\beta)}(x)p_n^{(\alpha,\beta)}(x)\, d\mu_{\alpha,\beta}(x). \] As we will show in Proposition \ref{prop:well-def} below, for $\alpha,\beta\geq -1/2$, the operator $(-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}$ is only well defined for $0<\sigma <1/2$. We have that (see \cite[Section 3.1]{ACL-JacI}) \begin{equation*} \mathcal{J}^{(\alpha,\beta)} = -\delta^{\star}\delta, \end{equation*} where \begin{equation*} \delta f(n) = d_{n}f(n) - e_{n}f(n+1),\quad n\geq 0, \end{equation*} \begin{equation*} \delta^{\star} f(n) = d_n f(n) - e_{n-1}f(n-1),\quad n\geq 1, \end{equation*} and $\delta^{\star} f(0) = d_{0}f(0)$, with the sequences $\{d_n\}_{n\ge 0}$ and $\{e_n\}_{n\ge 0}$ defined by $d_{0} = \sqrt{\frac{2(\alpha+1)}{\alpha+\beta+2}}$, \begin{equation*} d_{n} = \sqrt{\frac{2(n+\alpha+\beta+1)(n+\alpha+1)}{(2n+\alpha+\beta+1)(2n+\alpha+\beta+2)}},\quad n\geq 1, \end{equation*} and \begin{equation*} e_{n} = \sqrt{\frac{2(n+\beta+1)(n+1)}{(2n+\alpha+\beta+2)(2n+\alpha+\beta+3)}}\quad n\geq 0. \end{equation*} Note that, $\delta$ and $\delta^{\star}$ are adjoint operators in $\ell^2(\mathbb{N})$. Following a standard procedure, for a given sequence $\{f(n)\}_{n\ge 0}$, the Riesz transform should be defined via composition by $\delta (-\mathcal{J}^{(\alpha,\beta)})^{-1/2}f(n)$. Unfortunately, this procedure does not work in our case because the operator $(-\mathcal{J}^{(\alpha,\beta)})^{-1/2}$ is not well defined so we need an alternative way to define the Riesz transform. In our situation, this operator is given by \begin{equation} \label{eq:Riesz-def} \mathcal{R}f(n)=\lim_{\sigma\to \frac{1}{2}^{-}}\delta (-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}f(n). \end{equation} This is a natural way to proceed and, in fact, it was used in \cite{Ciau-et-al} to define the Riesz transform for the discrete Laplacian \eqref{eq:dis-lap}. The Riesz transform is a classical operator in harmonic analysis and it has been analyzed in several settings. For example, the conjugate function and the Hilbert transform are the Riesz transform for the trigonometric Fourier series and for the one-dimensional Fourier transform, respectively, and both of them were analyzed by M. Riesz in his celebrated paper \cite{Riesz}. In the case of the $n$-dimensional Fourier transform the multiplier $\text{p.\,v.\,}\frac{x_j}{|x|^{n+1}}$ defines the $j$-th Riesz transform and such one is a prototype of singular integral. For non-trigonometric Fourier expansions this operator has been studied in many situations (see \cite{N-S} and the references therein). The Riesz transform has also been treated in very abstract settings as for example Riemannian manifolds or compact Lie groups. In the main result of this paper we prove some weighted inequalities for $\mathcal{R}$. Before stated it, we need some preliminaries. A weight on $\mathbb{N}$ will be a strictly positive sequence $w=\{w(n)\}_{n\ge 0}$. We consider the weighted $\ell^{p}$-spaces \[ \ell^p(\mathbb{N},w)=\left\{f=\{f(n)\}_{n\ge 0}: \|f\|_{\ell^{p}(\mathbb{N},w)}:=\Bigg(\sum_{m=0}^{\infty}|f(m)|^p w(m)\Bigg)^{1/p}<\infty\right\}, \] $1\le p<\infty$, and the weak weighted $\ell^{1}$-space \[ \ell^{1,\infty}(\mathbb{N},w)=\left\{f=\{f(n)\}_{n\ge 0}: \|f\|_{\ell^{1,\infty}(\mathbb{N},w)}:=\sup_{t>0}t\sum_{\{m\in \mathbb{N}: |f(m)|>t\}} w(m)<\infty\right\}, \] and we simply write $\ell^p(\mathbb{N})$ and $\ell^{1,\infty}(\mathbb{N})$ when $w(n)=1$ for all $n\in \mathbb{N}$. Furthermore, we say that a weight $w(n)$ belongs to the discrete Muckenhoupt $A_p(\mathbb{N})$ when \[ \sup_{\begin{smallmatrix} 0\le n \le m \\ n,m\in \mathbb{N} \end{smallmatrix}} \frac{1}{(m-n+1)^p}\Bigg(\sum_{k=n}^mw(k)\Bigg)\Bigg(\sum_{k=n}^mw(k)^{-1/(p-1)}\Bigg)^{p-1} <\infty, \] for $1<p<\infty$, \[ \sup_{\begin{smallmatrix} 0\le n \le m \\ n,m\in \mathbb{N} \end{smallmatrix}} \frac{1}{m-n+1}\Bigg(\sum_{k=n}^mw(k)\Bigg)\max_{n\le k \le m}w(k)^{-1} <\infty, \] for $p=1$. \begin{thm} \label{th:main} Let $\alpha,\beta\ge -1/2$ and let $\mathcal{R}$ be the Riesz transform defined in \eqref{eq:Riesz-def}. \begin{enumerate} \item[(a)] If $1<p<\infty$ and $w\in A_p(\mathbb{N})$, then \begin{equation*} \|\mathcal{R}f\|_{\ell^p(\mathbb{N},w)}\le C \|f\|_{\ell^p(\mathbb{N},w)}, \qquad f\in\ell^2(\mathbb{N})\cap\ell^{p}(\mathbb{N},w), \end{equation*} where $C$ is a constant independent of $f$. Consequently, the operator $\mathcal{R}$ extends uniquely to a bounded linear operator from $\ell^p(\mathbb{N},w)$ into itself. \item[(b)] If $w\in A_1(\mathbb{N})$, then \begin{equation*} \|\mathcal{R}f\|_{\ell^{1,\infty}(\mathbb{N},w)}\le C \|f\|_{\ell^1(\mathbb{N},w)}, \qquad f\in \ell^2(\mathbb{N})\cap\ell^{1}(\mathbb{N},w), \end{equation*} where $C$ is a constant independent of $f$. Consequently, the operator $\mathcal{R}$ extends uniquely to a bounded linear operator from $\ell^1(\mathbb{N},w)$ into $\ell^{1,\infty}(\mathbb{N},w)$. \end{enumerate} \end{thm} The paper is organized as follows. The proof of Theorem \ref{th:main} will be a consequence of a discrete Calder\'on-Zygmund theory which is given in the next section. In Section \ref{sec:frac-int} we show that, effectively, the fractional integrals $(-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}$ are only well defined for $0<\sigma<1/2$. Section \ref{sec:proof} contains the proof of Theorem \ref{th:main} and Section \ref{sec:estimates} is focused on the proof of the main estimates to apply Calder\'on-Zygmund theory. In the last section some technical results used along the paper are proved. \section{Local theory for discrete Banach space valued Calder\'on-Zygmund operators} As we have already mentioned, the proof of Theorem \ref{th:main} relies on an appropriate local theory for discrete Banach space valued Calder\'on-Zygmund operators which is presented in \cite{Bet-et-al}. For the reader's convenience, it is appropriate to recall some of the basic aspects of this local theory. Suppose that $\mathbb{B}_1$ and $\mathbb{B}_2$ are Banach spaces. We denote by $\mathcal{L}(\mathbb{B}_1,\mathbb{B}_2)$ the space of bounded linear operators from $\mathbb{B}_1$ into $\mathbb{B}_2$. Let us suppose that \[ K:(\mathbb{N}\times\mathbb{N})\setminus D \longrightarrow \mathcal{L}(\mathbb{B}_1,\mathbb{B}_2), \] where $D:=\{(n,n):n\in \mathbb{N}\}$, is measurable and that for certain positive constant $C$ and for each $n$, $m\in \mathbb{N}$, the following conditions hold. \begin{enumerate} \item[(a)] The size condition: \[ \|K(n,m)\|_{\mathcal{L}(\mathbb{B}_1,\mathbb{B}_2)}\le \frac{C}{|n-m|}, \] \item[(b)] the regularity properties: \begin{enumerate} \item[(b1)] \[ \|K(n,m)-K(l,m)\|_{\mathcal{L}(\mathbb{B}_1,\mathbb{B}_2)}\le C \frac{|n-l|}{|n-m|^2},\quad |n-m|>2|n-l|, \frac{m}{2}\le n,l\le \frac{3m}{2}, \] \item[(b2)] \[ \|K(m,n)-K(m,l)\|_{\mathcal{L}(\mathbb{B}_1,\mathbb{B}_2)}\le C \frac{|n-l|}{|n-m|^2},\quad |n-m|>2|n-l|, \frac{m}{2}\le n,l\le \frac{3m}{2}. \] \end{enumerate} \end{enumerate} A kernel $K$ satisfying conditions (a) and (b) is called a local $\mathcal{L}(\mathbb{B}_1,\mathbb{B}_2)$-standard kernel. For a Banach space $\mathbb{B}$ and a weight $w=\{w(n)\}_{n\ge 0}$, we consider the space \[ \ell^{p}_{\mathbb{B}}(\mathbb{N},w)=\left\{ \text{$\mathbb{B}$-valued sequences } f=\{f(n)\}_{n\ge 0}: \{\|f(n)\|_{\mathbb{B}}\}_{n\ge 0}\in \ell^p(\mathbb{N},w)\right\} \] for $1\le p<\infty$, and \[ \ell^{1,\infty}_{\mathbb{B}}(\mathbb{N},w)=\left\{ \text{$\mathbb{B}$-valued sequences } f=\{f(n)\}_{n\ge 0}: \{\|f(n)\|_{\mathbb{B}}\}_{n\ge 0}\in \ell^{1,\infty}(\mathbb{N},w)\right\}. \] As usual, we simply write $\ell_{\mathbb{B}}^r(\mathbb{N})$ and $\ell^{1,\infty}_{\mathbb{B}}(\mathbb{N})$ when $w(n)=1$ for all $n\in \mathbb{N}$. Also, by $\mathbb{B}_0^{\mathbb{N}}$ we represent the space of $\mathbb{B}$-valued sequences $f=\{f(n)\}_{n\ge 0}$ such that $f(n)=0$, with $n>j$, for some $j\in \mathbb{N}$. \begin{thm}[Theorem 2.1 in \cite{Bet-et-al}] \label{thm:CZ} Let $\mathbb{B}_1$ and $\mathbb{B}_2$ be Banach spaces. Suppose that $T$ is a linear and bounded operator from $\ell_{\mathbb{B}_1}^r(\mathbb{N})$ into $\ell_{\mathbb{B}_2}^r(\mathbb{N})$, for some $1<r<\infty$, and such that there exists a local $\mathcal{L}(\mathbb{B}_1,\mathbb{B}_2)$-standard kernel $K$ such that, for every sequence $f\in (\mathbb{B}_1)_0^{\mathbb{N}}$, \[ Tf(n)=\sum_{m=0}^{\infty}K(n,m)\cdot f(m), \] for every $n\in \mathbb{N}$ such that $f(n)=0$. Then, \begin{enumerate} \item[(i)] for every $1< p <\infty$ and $w\in A_p(\mathbb{N})$ the operator $T$ can be extended from $\ell_{\mathbb{B}_1}^r(\mathbb{N})\cap \ell_{\mathbb{B}_1}^p(\mathbb{N},w)$ to $\ell_{\mathbb{B}_1}^p(\mathbb{N},w)$ as a bounded operator from $\ell_{\mathbb{B}_1}^p(\mathbb{N},w)$ into $\ell_{\mathbb{B}_2}^p(\mathbb{N},w)$; \item[(ii)] for every $w\in A_1(\mathbb{N})$ the operator $T$ can be extended from $\ell_{\mathbb{B}_1}^r(\mathbb{N})\cap \ell_{\mathbb{B}_1}^1(\mathbb{N},w)$ to $\ell_{\mathbb{B}_1}^1(\mathbb{N},w)$ as a bounded operator from $\ell_{\mathbb{B}_1}^p(\mathbb{N},w)$ into $\ell_{\mathbb{B}_2}^{1,\infty}(\mathbb{N},w)$. \end{enumerate} \end{thm} \section{The fractional integrals $(-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}$} \label{sec:frac-int} As we have commented in the introduction, in this section we will show that $(-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}$ can only be defined for $0<\sigma <1/2$. In the following proposition we will use by the first time an estimate for the Jacobi polynomials that will be used frequently along the paper (see \cite[eq.~(2.6) and (2.7)]{Muckenhoupt}). If $-1<x<1$, $a,b>-1$, the estimate \begin{multline}\label{eq:unif-bound-trozos} |p_n^{(a,b)}(x)|\\\le C \begin{cases} (n+1)^{a+1/2}, & 1-1/(n+1)^{2}<x<1, \\ (1-x)^{-a/2-1/4}(1+x)^{-b/2-1/4}, & -1+1/(n+1)^{2}\leq x\leq 1-1/(n+1)^{2},\\ (n+1)^{b+1/2}, & -1<x<-1+1/(n+1)^{2}, \end{cases} \end{multline} holds, where $C$ is a constant independent of $n$ and $x$. Note that for $a,b\ge -1/2$ the previous bound can be replaced by the simpler one \begin{equation} \label{eq:unif-bound} |p_n^{(a,b)}(x)|\le C (1-x)^{-a/2-1/4}(1+x)^{-b/2-1/4}. \end{equation} \begin{propo} \label{prop:well-def} Let $\alpha,\beta\ge -1/2$, $\sigma>0$, and $f\in(\mathbb{C})^{\mathbb{N}}_0$. Then $(-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}$ is well defined if and only if $\sigma<1/2$. \end{propo} \begin{proof} First of all, we have that $W_t^{(\alpha,\beta)}f$ is well defined for $f\in \ell^{\infty}(\mathbb{N})$ (see~\cite{ACL-JacI}). Then, we will prove that $(-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}$ is finite if and only if $0<\sigma<1/2$. The sufficient argument is as follows. It is clear that \begin{align*} \left|(-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}f(n)\right|&\le \frac{1}{\Gamma(\sigma)}\int_{0}^{\infty}|W_t^{(\alpha,\beta)}f(n)|\, \frac{dt}{t^{1-\sigma}}\\ &\le \frac{1}{\Gamma(\sigma)} \left(\int_{0}^{1} |W_{t}^{(\alpha,\beta)}f(n)|\frac{dt}{t^{1-\sigma}} + \int_{1}^{\infty} |W_{t}^{(\alpha,\beta)}f(n)|\frac{dt}{t^{1-\sigma}}\right)\\&:=\frac{I_1+I_2}{\Gamma(\sigma)}. \end{align*} For $I_1$ we use the estimate (see \cite[Lemma~3.2]{ACL-JacI} for the case $m\not=n$ and note that for $m=n$ is obvious) \[ |K_t^{(\alpha,\beta)}(m,n)|\le C\begin{cases}t^{1/2}|m-n|^{-2}, & m\not=n,\\ 1, & m=n,\end{cases} \] to obtain that \begin{equation*} I_1\le C \left( \sum_{\begin{smallmatrix} m=0 \\ m\not=n \end{smallmatrix}}^{\infty} \frac{|f(m)|}{|m-n|^{2}}\int_{0}^{1}\frac{dt}{t^{1/2-\sigma}} + |f(n)|\int_{0}^{1}\frac{dt}{t^{1-\sigma}}\right) \end{equation*} and both terms are finite for $\sigma>0$. To deduce the convergence $I_2$, using that $f\in (\mathbb{C})_0^{\mathbb{N}}$ and the bound \eqref{eq:unif-bound}, it is enough to show that \begin{equation*} \int_{1}^{\infty}\int_{-1}^{1} \frac{e^{-(1-x)t}}{\sqrt{1-x^{2}}}\,dx\frac{dt}{t^{1-\sigma}}<\infty. \end{equation*} Since \[ \int_{-1}^{1}\frac {e^{-(1-x)t}}{\sqrt{1-x^2}}\, dx\le C \int_{0}^{1}\frac {e^{-(1-x)t}}{\sqrt{1-x}}\, dx = \frac{C}{\sqrt{t}}\int_{0}^{t}\frac{e^{-s}}{\sqrt{s}}\, ds\simeq \frac{C}{\sqrt{t}}, \] we have \[ \int_{1}^{\infty}\int_{-1}^{1} \frac{e^{-(1-x)t}}{\sqrt{1-x^{2}}}\,dx\frac{dt}{t^{1-\sigma}}\le C\int_{1}^{\infty}t^{\sigma-3/2}\, dt\le C, \] where we have used that $\sigma<1/2$. To show the necessity of the condition $\sigma<1/2$, we will use the inequality \[ \int_{-1}^{1}\frac{e^{-(1-x)t}}{\sqrt{1-x^2}}\, dx < \pi\liminf_{n\to \infty} \int_{-1}^{1}e^{-(1-x)t}(p_n^{(\alpha,\beta)}(x))^2\, d\mu_{\alpha,\beta}(x). \] This is a particular case of a classical result due to A. M\'at\'e, P. Nevai, and V. Totik, see \cite[Theorem~2]{MNT}. From this fact, there exists $N\in\mathbb{N}$ such that for every $n\geq N$, \begin{equation*} C \int_{-1}^{1}\frac{e^{-(1-x)t}}{\sqrt{1-x^2}}\, dx < \int_{-1}^{1}e^{-(1-x)t}(p_n^{(\alpha,\beta)}(x))^2\, d\mu_{\alpha,\beta}(x). \end{equation*} Then, taking $j\in\mathbb{N}$ such that $j\geq N$ and the sequence $\{f_j(m)=\delta_{jm}\}_{m\ge 0}$, where $\delta_{jm}$ stands for the Kronecker's delta, we have \begin{equation}\label{eq:div-int} \begin{aligned} (-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}f_j(j)&\ge \int_{1}^{\infty} K_{t}^{(\alpha,\beta)}(j,j)\frac{dt}{t^{1-\sigma}} \\&= \int_{1}^{\infty}\int_{-1}^{1} e^{-(1-x)t}(p_{j}^{(\alpha,\beta)}(x))^{2}\,d\mu_{\alpha,\beta}(x)\frac{dt}{t^{1-\sigma}} \\&> C \int_{1}^{\infty} \int_{-1}^{1}\frac{e^{-(1-x)t}}{\sqrt{1-x^{2}}}\,dx \frac{dt}{t^{1-\sigma}}. \end{aligned} \end{equation} Now, using that $t>1$, we obtain that \[ \int_{-1}^{1}\frac{e^{-(1-x)t}}{\sqrt{1-x^2}}\, dx \ge \int_{0}^{1}\frac{e^{-(1-x)t}}{\sqrt{1-x}}\, dx = \frac{C}{\sqrt{t}}\int_{0}^{t}\frac{e^{-s}}{\sqrt{s}}\, ds\simeq \frac{C}{\sqrt{t}}. \] Then, since $(-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}f_j(j)$ is well defined, from \eqref{eq:div-int} we deduce that $\sigma<1/2$. \end{proof} \section{Proof of Theorem \ref{th:main}} \label{sec:proof} We devote this section to prove Theorem \ref{th:main}. We will use the discrete Calder\'on-Zygmund theory so we first express the Riesz transform as in the form of Theorem~\ref{thm:CZ}. From Proposition \ref{prop:well-def}, for $\alpha,\beta\geq-1/2$, $0<\sigma<1/2$, and $f\in(\mathbb{C})_{0}^{\mathbb{N}}$, applying Fubini's theorem we obtain that \begin{multline*} (-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}f(n)=\sum_{m=0}^{\infty}f(m)\frac{1}{\Gamma(\sigma)}\int_{0}^{\infty}K_t^{(\alpha,\beta)}(m,n)\, \frac{dt}{t^{1-\sigma}}\\ \begin{aligned} &=\frac{1}{\Gamma(\sigma)}\sum_{m=0}^{\infty}f(m)\int_{-1}^{1}p_m^{(\alpha,\beta)}(x)p_n^{(\alpha,\beta)}(x)\int_{0}^{\infty}t^{\sigma-1}e^{-(1-x)t}\, dt\, d\mu_{\alpha,\beta}(x)\\&=\sum_{m=0}^{\infty}f(m)\int_{-1}^{1}\frac{p_m^{(\alpha,\beta)}(x)p_n^{(\alpha,\beta)}(x)}{(1-x)^{\sigma}}\, d\mu_{\alpha,\beta}(x). \end{aligned} \end{multline*} By \cite[18.9.6]{NIST}, it is easy to check that \[ \delta p_n^{(\alpha,\beta)}(x)=(1-x)p_n^{(\alpha+1,\beta)}(x), \] and therefore, for each sequence in $f\in (\mathbb{C})_0^{\mathbb{N}}$, \begin{align} \label{eq:def-R} \mathcal{R}f(n)&=\lim_{\sigma\to \frac{1}{2}^{-}}\delta (-\mathcal{J}^{(\alpha,\beta)})^{-\sigma}f(n)\notag\\&=\lim_{\sigma \to \frac{1}{2}^{-}}\sum_{m=0}^{\infty} f(m)\int_{-1}^{1}\frac{p_m^{(\alpha,\beta)}(x)p_n^{(\alpha+1,\beta)}(x)}{(1-x)^{\sigma-1}}\, d\mu_{\alpha,\beta}(x)\notag\\&= \sum_{m=0}^{\infty} f(m)R(m,n), \end{align} with \[ R(m,n)=\int_{-1}^{1}(1-x)^{1/2}p_m^{(\alpha,\beta)}(x)p_n^{(\alpha+1,\beta)}(x)\, d\mu_{\alpha,\beta}(x). \] Now, the following propositions allow us to obtain conditions (a) and (b) for some kernels that will be defined later. \begin{propo} \label{propo:Riesz-size} Let $n,m\in\mathbb{N}$, $n\neq m$, $\alpha,\beta\ge -1/2$. Then \begin{equation} \label{eq:Riesz-size} |R(m,n)|\le \frac{C}{|m-n|}. \end{equation} \end{propo} \begin{propo}\label{propo:Riesz-smooth} Let $n,m\in\mathbb{N}$, $n\neq m$, $m/2\leq n\leq 3m/2$, $\alpha,\beta\ge -1/2$. Then \begin{equation} \label{eq:Riesz-smooth-1} |R(m+2,n)-R(m,n)|\le \frac{C}{|m-n|^{2}} \end{equation} and \begin{equation} \label{eq:Riesz-smooth-2} |R(m,n+2)-R(m,n)|\le \frac{C}{|m-n|^{2}}. \end{equation} \end{propo} The proofs of the previous propositions are the most delicate points of the paper and they are postponed to the next section. Finally, we state the next lemma concerning $A_p(\mathbb{N})$ weights, see \cite[Lemma 2.2]{ACL-Trans}, before giving the proof of Theorem \ref{th:main}. \begin{lem} \label{lem:weight} Let $1\le p <\infty$ and $w\in A_p(\mathbb{N})$. Then, $w(n)\simeq w(n+1)$. \end{lem} \begin{proof}[Proof of Theorem \ref{th:main}] First, we will see that $\mathcal{R}$ is bounded operator from $\ell^2(\mathbb{N})$ into itself. To this end, by denseness, it is enough to consider sequences in $(\mathbb{C})_0^{\mathbb{N}}$, so \eqref{eq:def-R} can be used. As it is well known, for each function $f\in L^2([-1,1],d\mu_{\alpha,\beta})$ its Fourier-Jacobi coefficients are given by \[ c_m^{(\alpha,\beta)}(f)=\int_{-1}^{1}f(x)p_m^{(\alpha,\beta)}(x)\,d\mu_{\alpha,\beta}(x) \] and \[ f(x)=\sum_{m=0}^{\infty}c_m^{(\alpha,\beta)}(f)p_m^{(\alpha,\beta)}(x), \] where the equality holds in $ L^2([-1,1],d\mu_{\alpha,\beta})$. Moreover, $\{c_m^{(\alpha,\beta)}(f)\}_{m\ge 0}$ is a sequence in $\ell^{2}(\mathbb{N})$. Conversely, for each sequence $f\in \ell^2(\mathbb{N})$, the function \begin{equation} \label{eq:Jac-transform} F(x)=\sum_{m=0}^{\infty}f(m)p_m^{(\alpha,\beta)}(x) \end{equation} belongs to $L^2([-1,1],d\mu_{\alpha,\beta})$ and Parseval's identity \begin{equation} \label{eq:parse} \|f\|_{\ell^2(\mathbb{N})}=\|F\|_{L^2([-1,1],d\mu_{\alpha,\beta})} \end{equation} holds. Therefore, noting that \begin{align*} \mathcal{R}f(n)¨&=\int_{-1}^{1}(1-x)^{1/2}p_n^{(\alpha+1,\beta)}(x)F(x)\, d\mu_{\alpha,\beta}(x)\\&=c_n^{(\alpha+1,\beta)}((1-\cdot)^{-1/2}F), \end{align*} where $F$ is defined as in \eqref{eq:Jac-transform}, by \eqref{eq:parse} we have \begin{align*} \|\mathcal{R}f\|_{\ell^{2}(\mathbb{N})}&=\|c_n^{(\alpha+1,\beta)}((1-\cdot)^{-1/2}F)\|_{\ell^{2}(\mathbb{N})}\\ &=\|(1-\cdot)^{-1/2}F\|_{L^2([-1,1],d\mu_{\alpha+1,\beta})}=\|F\|_{L^2([-1,1],d\mu_{\alpha,\beta})}=\|f\|_{\ell^2(\mathbb{N})} \end{align*} and then $\mathcal{R}$ is a bounded operator from $\ell^2(\mathbb{N})$ into itself. Now, we note that it is possible to split the $m$ variable into its even and odd parts, so we have \begin{equation*} \mathcal{R} f(n) = \sum_{m=0}^{\infty} f(2m) R(2m,n) + \sum_{m=0}^{\infty} f(2m+1) R(2m+1,n), \end{equation*} which motivates the following definitions \begin{align*} {}^{\text{e,e}}\mathcal{R}f(n) &= \sum_{m=0}^{\infty} f(m) {}^{\text{e,e}}R(m,n), & {}^{\text{e,e}}R(m,n) &= R(2m,2n),\\ {}^{\text{e,o}}\mathcal{R}f(n) &= \sum_{m=0}^{\infty} f(m) {}^{\text{e,o}}R(m,n), & {}^{\text{e,o}}R(m,n) &= R(2m+1,2n),\\ {}^{\text{o,e}}\mathcal{R}f(n) &= \sum_{m=0}^{\infty} f(m) {}^{\text{o,e}}R(m,n), & {}^{\text{o,e}}R(m,n) &= R(2m,2n+1), \intertext{and} {}^{\text{o,o}}\mathcal{R}f(n) &= \sum_{m=0}^{\infty} f(m) {}^{\text{o,o}}R(m,n), & {}^{\text{o,o}}R(m,n) &= R(2m+1,2n+1). \end{align*} Hence, we obtain that \begin{equation*} \mathcal{R}f(2n) = {}^{\text{e,e}}\mathcal{R} \tilde{f}(n) + {}^{\text{e,o}}\mathcal{R} \hat{f}(n), \end{equation*} and \begin{equation*} \mathcal{R} f(2n+1) = {}^{\text{o,e}}\mathcal{R} \tilde{f}(n) + {}^{\text{o,o}}\mathcal{R} \hat{f}(n), \end{equation*} with $\tilde{f}(n) = f(2n)$ and $\hat{f}(n) = f(2n+1)$, $n\in\mathbb{N}$. In addition, note that $^{\text{e,e}}\mathcal{R}$, $^{\text{e,o}}\mathcal{R}$, $^{\text{o,e}}\mathcal{R}$, and $^{\text{o,o}}\mathcal{R}$ are bounded operators in $\ell^{2}(\mathbb{N})$ because so is $\mathcal{R}$. Indeed, let us define the functions \begin{equation*} g(n) = f(n/2)\chi_{\mathcal{E}}(n) \qquad \text{ and } \qquad h(n) = f((n-1)/2)\chi_{\mathcal{O}}(n), \end{equation*} where $\mathcal{E}$ and $\mathcal{O}$ denotes the sets of even and odd numbers respectively. We have then that ${}^{\text{e,e}}\mathcal{R} f(n) = \mathcal{R} g(2n)$, ${}^{\text{e,o}}\mathcal{R} f(n) = \mathcal{R} h(2n)$, ${}^{\text{o,e}}\mathcal{R} f(n) = \mathcal{R} g(2n+1)$, and ${}^{\text{o,o}}\mathcal{R} f(n) = \mathcal{R} h(2n+1)$, so the boundedness in $\ell^2(\mathbb{N})$ of each operator follows immediately. Therefore, it is enough to prove that the kernels ${}^{\text{e,e}}R$, ${}^{\text{e,o}}R$, ${}^{\text{o,e}}R$, and ${}^{\text{o,o}}R$ satisfy properties (a) and (b). These facts are immediate consequences of Propositions \ref{propo:Riesz-size} and \ref{propo:Riesz-smooth}. In this way, by Theorem \ref{thm:CZ} and taking the weights $w_e(n)=w(2n)$ and $w_o(n)=w(2n+1)$ (note that both of them belongs to $A_p(\mathbb{N})$ because $w\in A_p(\mathbb{N})$), for $1<p<\infty$ we have \[ \|{}^{\text{e,e}}\mathcal{R} \tilde{f}\|_{\ell^p(\mathbb{N},w_e)}\le \|\tilde{f}\|_{\ell^p(\mathbb{N},w_e)}, \] \[ \|{}^{\text{e,o}}\mathcal{R} \hat{f}\|_{\ell^p(\mathbb{N},w_e)}\le \|\hat{f}\|_{\ell^p(\mathbb{N},w_e)}, \] \[ \|{}^{\text{o,e}}\mathcal{R} \tilde{f}\|_{\ell^p(\mathbb{N},w_o)}\le \|\tilde{f}\|_{\ell^p(\mathbb{N},w_o)}, \] \[ \|{}^{\text{o,o}}\mathcal{R} \hat{f}\|_{\ell^p(\mathbb{N},w_o)}\le \|\hat{f}\|_{\ell^p(\mathbb{N},w_o)}, \] and the corresponding weak inequalities for $p=1$. To complete the proof, it is enough to observe that, by Lemma \ref{lem:weight}, \[ \|\hat{f}\|_{\ell^p(\mathbb{N},w_e)}\le C \|\hat{f}\|_{\ell^p(\mathbb{N},w_o)}\le C\|f\|_{\ell^p(\mathbb{N},w)} \] and \[ \|\tilde{f}\|_{\ell^p(\mathbb{N},w_o)}\le C \|\hat{f}\|_{\ell^p(\mathbb{N},w_e)}\le C\|f\|_{\ell^p(\mathbb{N},w)}.\qedhere \] \end{proof} \section{Proof of Propositions \ref{propo:Riesz-size} and \ref{propo:Riesz-smooth}} \label{sec:estimates} \begin{proof}[Proof of Proposition \ref{propo:Riesz-size}] First we note that \[ L^{a,b}p_n^{(a,b)}(x)=\lambda_n^{(a,b)}p_n^{(a,b)}(x), \] with $\lambda_{n}^{(a,b)}=n(n+a+b+1)$ and \[ L^{a,b}=-(1-x^2)\frac{d^2}{dx^2}-(b-a-(a+b+2)x)\frac{d}{dx}. \] It is well known that $L^{a,b}$ is a symmetric operator in $L^2([-1,1],d\mu_{a,b})$, but for some interval $[r,s]\subset [-1,1]$, $r<s$, it is verified that \begin{equation} \label{eq:L-parts} \int_{r}^{s}f(x)L^{a,b}g(x)\, d\mu_{a,b}(x)=U_{a,b}(f,g)(x)\Big|_{x=r}^{x=s}+\int_{r}^{s}g(x)L^{a,b}f(x)\, d\mu_{a,b}(x), \end{equation} with \[ U_{a,b}(f,g)(x)=(1-x)^{a+1}(1+x)^{b+1}\Big(g(x)\frac{df}{dx}(x)-f(x)\frac{dg}{dx}(x)\Big). \] Moreover, \begin{multline} \label{eq:L-product} L^{a,b}(h_1h_2)(x)=h_2(x)L^{a+1,b}h_1(x)-(1+x)h_2(x)\frac{dh_1(x)}{dx}-2(1-x^2)\frac{dh_1(x)}{dx}\frac{dh_2(x)}{dx}\\-(1-x^2)h_1(x)\frac{d^2h_2(x)}{dx^2}- (b-a-(a+b+2)x)h_1(x)\frac{dh_2(x)}{dx} \end{multline} and \begin{multline} \label{eq:L-product-2} L^{a+1,b}(h_1h_2)(x)=h_2(x)L^{a,b}h_1(x)+(1+x)h_2(x)\frac{dh_1}{dx}(x)-2(1-x^2)\frac{dh_1}{dx}(x)\frac{dh_2}{dx}(x)\\-(1-x^2)h_1(x)\frac{d^2h_2}{dx^2}(x)-(b-a-1-(a+b+3)x)h_1(x)\frac{dh_2}{dx}(x). \end{multline} First, we suppose that $n>m$. We decompose $R(m,n)$ according to the intervals $I_1=(-1,-1+1/(n+1)^2)$, $I_2=[-1+1/(n+1)^2, 1-1/(n+1)^2]$, and $I_3=(1-1/(n+1)^2,1)$ and denote the corresponding integrals by $R_1(m,n)$, $R_2(m,n)$, and $R_3(m,n)$. From \eqref{eq:unif-bound-trozos}, for $\alpha,\beta\ge -1/2$, we have \[ |R_1(m,n)|\le C (n+1)^{\beta+1/2}(m+1)^{\beta+1/2}\int_{I_1} (1+x)^\beta\, dx\le \frac{C}{n+1} \] and \[ |R_3(m,n)|\le C (n+1)^{\alpha+3/2}(m+1)^{\alpha+1/2}\int_{I_3}(1-x)^{\alpha+1/2}\, dx\le \frac{C}{n+1}, \] and these estimates are enough to prove \eqref{eq:Riesz-size}. Let us focus on $R_2(m,n)$. We consider the notation \[ J(m,n)=\int_{I_2}H_{\alpha,\beta}(x)p_n^{(\alpha+1,\beta)}(x)p_m^{(\alpha,\beta)}(x)\,d\mu_{\alpha,\beta}(x), \] with \begin{equation} \label{eq:H.function} H_{\alpha,\beta}(x)=\frac{2\beta-2\alpha+1-(2\alpha+2\beta+3)x}{4(1-x)^{1/2}}, \end{equation} and \[ S(m,n)=U_{\alpha,\beta}((1-(\cdot))^{1/2}p_n^{(\alpha+1,\beta)},p_m^{(\alpha,\beta)})(x)\Big|_{x=-1+1/(n+1)^2}^{x=1-1/(n+1)^2}. \] To give a proper expression for the integral $R_2(m,n)$, we use \eqref{eq:L-parts}, with $f(x)=(1-x)^{1/2}p_n^{(\alpha+1,\beta)}(x)$ and $g(x)=p_m^{(\alpha,\beta)}(x)$, and \eqref{eq:L-product}, with $h_1(x)=p_n^{(\alpha+1,\beta)}(x)$ and $h_2(x)=(1-x)^{1/2}$. Then, we get that \begin{align*} \lambda_m^{(\alpha,\beta)}R_2(m,n)&=\int_{I_2}(1-x)^{1/2}p_n^{(\alpha+1,\beta)}(x)L^{\alpha,\beta}p_m^{(\alpha,\beta)}(x)\,d\mu_{\alpha,\beta}(x) \\&=S(m,n)+\int_{I_2}L^{\alpha,\beta}((1-(\cdot))^{1/2}p_n^{(\alpha+1,\beta)})(x)p_m^{(\alpha,\beta)}(x)\,d\mu_{\alpha,\beta}(x) \\&=S(m,n)+\lambda_n^{(\alpha+1,\beta)}R_{2}(m,n)+J(m,n). \end{align*} Therefore, noting that $\lambda_m^{(\alpha,\beta)}\not= \lambda_n^{(\alpha+1,\beta)}$, \begin{equation} \label{eq:R-size} R_{2}(m,n)=\frac{S(m,n)+J(m,n)}{\lambda_m^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)}}. \end{equation} Now, we use the identities (see~\cite[18.9.15]{NIST}) \begin{equation} \label{eq:Jaco-der} \frac{d P_n^{(a,b)}}{dx}(x)=\frac{n+a+b+1}{2}P_{n-1}^{(a+1,b+1)}(x),\qquad n> 0, \end{equation} and \begin{equation} \label{eq:Jaco-der0} \frac{d P_0^{(a,b)}}{dx}(x)=0, \end{equation} the estimate \eqref{eq:unif-bound-trozos}, and the restrictions $\alpha,\beta\geq -1/2$ to obtain that \begin{equation} \label{eq:S} |S(m,n)|\le C (n+1). \end{equation} In order to estimate the term $J(m,n)$ we decompose it according to the intervals $V_1=[-1+1/(n+1)^2,-1+1/(m+1)^2)$, $V_2=[-1+1/(m+1)^2,1-1/(m+1)^2]$, and $V_3=(1-1/(m+1)^2,1-1/(n+1)^2]$. We denote the corresponding integrals by $J_1(m,n)$, $J_2(m,n)$, and $J_3(m,n)$. In this way, using \eqref{eq:unif-bound-trozos}, the estimate $|H_{\alpha,\beta}(x)|\le C (1-x)^{-1/2}$ for $-1<x<1$, and the condition $\alpha,\beta\ge -1/2$, we deduce the bounds \begin{align*} |J_1(m,n)|&\le C (m+1)^{\beta+1/2}\int_{V_1}(1+x)^{\beta/2-1/4}\, dx\\&\le C\int_{V_1}(1+x)^{-1/2}\,dx\le C, \end{align*} \begin{align*} |J_2(m,n)|&\le C \int_{V_2}(1+x)^{-1/2}(1-x)^{-3/2}\, dx\\&\le C (m+1), \end{align*} and \begin{align*} |J_3(m,n)|&\le C (m+1)^{\alpha+1/2}\int_{V_3}(1-x)^{\alpha/2-5/4}\, dx\\&\le C \int_{V_3}(1-x)^{-3/2}\,dx\le C (n+1). \end{align*} Then, we have \begin{equation} \label{eq:J} |J(m,n)|\le C (n+1), \end{equation} and, from \eqref{eq:R-size}, \eqref{eq:S}, and \eqref{eq:J}, we obtain that $|R_2(m,n)|\le C|n-m|^{-1}$ and the estimate \eqref{eq:Riesz-size} is proved for $n>m$. The case $n<m$ follows from the above argument by interchanging the roles of $n$ and $m$ but we include some details for the sake of completeness. We decompose $R(m,n)$ according to the intervals $I'_1=(-1,-1+1/(m+1)^2)$, $I'_2=[-1+1/(m+1)^2, 1-1/(m+1)^2]$, and $I'_3=(1-1/(m+1)^2,1)$ and denote the corresponding integrals by $R'_1(m,n)$, $R'_2(m,n)$, and $R'_3(m,n)$. By similar arguments than above we obtain that \[ |R'_1(m,n)|\le \frac{C}{m+1}\qquad \text{ and }\qquad |R'_3(m,n)|\le \frac{C}{m+1}. \] Now, for $R_2'(m,n)$, by using \eqref{eq:L-product-2} and noting again that $\lambda_m^{(\alpha,\beta)}\not= \lambda_n^{(\alpha+1,\beta)}$, we deduce the identity \begin{equation} \label{eq:R'-size} R'_{2}(m,n)=\frac{S'(m,n)-J'(m,n)}{\lambda_n^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)}}, \end{equation} where \[ J'(m,n)=\int_{I'_2}H_{\alpha,\beta}(x)p_n^{(\alpha+1,\beta)}(x)p_m^{(\alpha,\beta)}(x)\,d\mu_{\alpha,\beta}(x), \] with $H_{\alpha,\beta}$ as in \eqref{eq:H.function}, and \[ S'(m,n)=U_{\alpha+1,\beta}((1-(\cdot))^{-1/2}p_m^{(\alpha,\beta)},p_n^{(\alpha+1,\beta)})(x)\Big|_{x=-1+1/(m+1)^2}^{x=1-1/(m+1)^2}. \] As in the previous case, we deduce the estimate \begin{equation} \label{eq:Sprim} |S'(m,n)|\leq (m+1). \end{equation} To analyze $J'(m,n)$ we decompose it according to the intervals $V'_1=[-1+1/(m+1)^2,-1+1/(n+1)^2)$, $V'_2=[-1+1/(n+1)^2,1-1/(n+1)^2]$, and $V'_3=(1-1/(n+1)^2,1-1/(m+1)^2]$. The corresponding integrals are denoted by $J_{1}'(m,n)$, $J_{2}'(m,n)$, and $J_{3}'(m,n)$, and we have \begin{equation*} |J_{1}'(m,n)|\leq C,\qquad |J_{2}'(m,n)|\le C(n+1),\qquad \text{ and }\qquad |J_{3}'(m,n)|\leq C (m+1). \end{equation*} Therefore \begin{equation} \label{eq:J'} |J'(m,n)|\leq C(m+1). \end{equation} Then \eqref{eq:Riesz-size} is also proved for $n<m$ and the proof of the proposition is finished. \end{proof} In the proof of the Proposition \ref{propo:Riesz-smooth} we will use the following lemmas. \begin{lem} \label{lem:bound-diff} Let $n\in\mathbb{N}$ and $a,b> -1$, then \begin{multline*} |p_{n+2}^{(a,b)}(x)-p_{n}^{(a,b)}(x)|\\\le C \begin{cases} (n+1)^{a-1/2}, & 1-1/(n+1)^2<x<1,\\ (1-x)^{-a/2+1/4}(1+x)^{-b/2+1/4}, & -1+1/(n+1)^2\le x\leq1-1/(n+1)^{2},\\ (n+1)^{b-1/2}, & -1<x<-1+1/(n+1)^2. \end{cases} \end{multline*} \end{lem} \begin{lem} \label{lem:bound-diff-der} Let $n\in\mathbb{N}$, $a,b> -1$, then \begin{multline*} |(p_{n+2}^{(a,b)}-p_{n}^{(a,b)})'(x)|\le C (n+1)\\ \times \begin{cases} (n+1)^{a+1/2}, & 1-1/(n+1)^2<x<1,\\ (1-x)^{-a/2-1/4}(1+x)^{-b/2-1/4}, & -1+1/(n+1)^2\le x \leq 1-1/(n+1)^{2},\\ (n+1)^{b+1/2}, & -1<x<-1+1/(n+1)^2. \end{cases} \end{multline*} \end{lem} We postpone the proof of these two lemmas to the last section of the paper. \begin{proof}[Proof of Proposition \ref{propo:Riesz-smooth}] We will prove the estimate \eqref{eq:Riesz-smooth-1} for $n>m$ and \eqref{eq:Riesz-smooth-2} for $n<m$. The remaining two cases can be treated in a similar way and we omit the details. In this way, we first assume that $n>m$ and prove \eqref{eq:Riesz-smooth-1}. We decompose the difference $R(m+2,n)-R(m,n)$ into three integrals $\mathcal{R}_1(m,n)$, $\mathcal{R}_2(m,n)$, and $\mathcal{R}_3(m,n)$ over the intervals $I_1=(-1,-1+1/(n+1)^2)$, $I_2=[-1+1/(n+1)^2, 1-1/(n+1)^2]$, and $I_3=(1-1/(n+1)^2,1)$. From \eqref{eq:unif-bound-trozos} and Lemma \ref{lem:bound-diff} (note that by hypothesis $m/2\leq n\leq 3m/2$), we have \[ |\mathcal{R}_1(m,n)|\le C (m+1)^{\beta-1/2}(n+1)^{\beta+1/2}\int_{I_1} (1+x)^\beta\, dx\le \frac{C}{(n+1)^{2}} \] and \[ |\mathcal{R}_3(m,n)|\le C (n+1)^{\alpha+3/2}(m+1)^{\alpha-1/2}\int_{I_3}(1-x)^{\alpha+1/2}\, dx\le \frac{C}{(n+1)^{2}}, \] which are enough to prove \eqref{eq:Riesz-smooth-1}. We deal now with the most delicate integral $\mathcal{R}_2(m,n)$. We recover some notation from the proof of Proposition~\ref{propo:Riesz-size} and denote \begin{equation*} \mathcal{J}(m,n)=\int_{I_2}H_{\alpha,\beta}(x)p_n^{(\alpha+1,\beta)}(x) (p_{m+2}^{(\alpha,\beta)}(x)-p_m^{(\alpha,\beta)}(x))\,d\mu_{\alpha,\beta}(x), \end{equation*} and \[ \mathcal{S}(m,n)=U_{\alpha,\beta}((1-(\cdot))^{1/2}p_n^{(\alpha+1,\beta)},p_{m+2}^{(\alpha,\beta)}-p_m^{(\alpha,\beta)})(x) \Big|_{x=-1+1/(n+1)^2}^{x=1-1/(n+1)^2}. \] By \eqref{eq:R-size}, using that $\lambda_{m+2}^{(\alpha,\beta)}\not= \lambda_n^{(\alpha+1,\beta)}$ and $\lambda_{m}^{(\alpha,\beta)}\not= \lambda_n^{(\alpha+1,\beta)}$, we obtain that \begin{multline} \label{eq:R-smooth} \mathcal{R}_2(m,n)=\frac{S(m+2,n)+J(m+2,n)}{\lambda_{m+2}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)}} -\frac{S(m,n)+J(m,n)}{\lambda_{m}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)}}\\ =\frac{\mathcal{S}(m,n)+\mathcal{J}(m,n)}{\lambda_{m+2}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)}} -\frac{2(2m+\alpha+\beta+3)(S(m,n)+J(m,n))} {(\lambda_{m+2}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)})(\lambda_{m}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)})}. \end{multline} We use \eqref{eq:S} and \eqref{eq:J} to obtain that \begin{equation} \label{eq:smooth-aux-1} \left|\frac{2(2m+\alpha+\beta+3)(S(m,n)+J(m,n))} {(\lambda_{m+2}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)})(\lambda_{m}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)})}\right|\le \frac{C}{|n-m|^2}. \end{equation} From \eqref{eq:unif-bound-trozos}, \eqref{eq:Jaco-der}, Lemmas \ref{lem:bound-diff} and \ref{lem:bound-diff-der}, we have \[ |\mathcal{S}(m,n)|\le C \] and hence \begin{equation} \label{eq:smooth-aux-2} \left|\frac{\mathcal{S}(m,n)}{\lambda_{m+2}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)}}\right|\le \frac{C}{|n-m|^2}. \end{equation} Now, to analyse the term $\mathcal{J}(m,n)$ we will use \eqref{eq:L-product-2}. Therefore, taking the notation \[ \overline{\mathcal{S}}(m,n)=U_{\alpha+1,\beta}\Big(\mathcal{H}_{\alpha,\beta}(p_{m+2}^{(\alpha,\beta)}-p_m^{(\alpha,\beta)}), p_n^{(\alpha+1,\beta)}\Big)(x)\Big|_{x=-1+1/(n+1)^2}^{x=1-1/(n+1)^2}, \] where \[ \mathcal{H}_{\alpha,\beta}(x)=\frac{H_{\alpha,\beta}(x)}{1-x}, \] \begin{multline*} T_1(m,n)=\int_{I_2}((1+x)\mathcal{H}_{\alpha,\beta}(x)-2(1-x^2)\mathcal{H}'_{\alpha,\beta}(x))\\(p_{m+2}^{(\alpha,\beta)}-p_m^{(\alpha,\beta)})'(x)p_n^{(\alpha+1,\beta)}(x)\, d\mu_{\alpha+1,\beta}(x), \end{multline*} and \begin{multline*} T_2(m,n)=\int_{I_2}((1-x^2)\mathcal{H}''_{\alpha,\beta}(x)+(\beta-\alpha-1-(\alpha+\beta+3)x)\mathcal{H}'_{\alpha,\beta}(x)) \\(p_{m+2}^{(\alpha,\beta)}(x)-p_m^{(\alpha,\beta)}(x)) p_n^{(\alpha+1,\beta)}(x)\, d\mu_{\alpha+1,\beta}(x), \end{multline*} we have \begin{multline*} \lambda_{n}^{(\alpha+1,\beta)}\mathcal{J}(m,n)\\ \begin{aligned} &= \int_{I_2}\mathcal{H}_{\alpha,\beta}(x)(p_{m+2}^{(\alpha,\beta)}(x)-p_m^{(\alpha,\beta)}(x)) L^{\alpha+1,\beta}p_n^{(\alpha+1,\beta)}(x)\,d\mu_{\alpha+1,\beta}(x)\\ &=\overline{\mathcal{S}}(m,n)+\int_{I_2}L^{\alpha+1,\beta}(\mathcal{H}_{\alpha,\beta}(p_{m+2}^{(\alpha,\beta)} -p_m^{(\alpha,\beta)}))(x)p_n^{(\alpha+1,\beta)}(x)\,d\mu_{\alpha+1,\beta}(x)\\ &=\overline{\mathcal{S}}(m,n)+\int_{I_2}H_{\alpha,\beta}(x)L^{\alpha,\beta}(p_{m+2}^{(\alpha,\beta)}-p_m^{(\alpha,\beta)}))(x) p_n^{(\alpha+1,\beta)}(x)\,d\mu_{\alpha,\beta}(x)\\&\kern25pt +T_1(m,n)-T_2(m,n). \end{aligned} \end{multline*} We use now the identity \begin{equation}\label{eq_Lpols} L^{\alpha,\beta}(p_{m+2}^{(\alpha,\beta)}-p_m^{(\alpha,\beta)})(x) =\lambda_{m+2}^{(\alpha,\beta)}(p_{m+2}^{(\alpha,\beta)}(x)-p_m^{(\alpha,\beta)}(x))+(\lambda_{m+2}^{(\alpha,\beta)} -\lambda_m^{(\alpha,\beta)})p_m^{(\alpha,\beta)}(x) \end{equation} to deduce that \begin{multline*} \lambda_{n}^{(\alpha+1,\beta)}\mathcal{J}(m,n)=\overline{\mathcal{S}}(m,n)+\lambda_{m+2}^{(\alpha,\beta)}\mathcal{J}(m,n)\\+2(2m+\alpha+\beta+3)J(m,n) +T_1(m,n)-T_2(m,n) \end{multline*} In this way, \begin{equation} \label{eq:smooth-aux-3} \frac{\mathcal{J}(m,n)}{\lambda_{m+2}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)}}= \frac{-\overline{\mathcal{S}}(m,n)-2(2m+\alpha+\beta+3)J(m,n)-T_1(m,n)+T_2(m,n)}{(\lambda_{m+2}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)})^2}. \end{equation} From \eqref{eq:J}, we deduce the estimate \[ \left|\frac{2(2m+\alpha+\beta+3)J(m,n)}{(\lambda_{m+2}^{(\alpha,\beta)}-\lambda_n^{(\alpha+1,\beta)})^2}\right|\le \frac{C}{|n-m|^2}. \] Then, it suffices to show that \begin{equation} \label{eq:aux-prop} |\overline{\mathcal{S}}(m,n)|+|T_1(m,n)|+|T_2(m,n)|\le C (n+1)^2 \end{equation} because using \eqref{eq:R-smooth}, \eqref{eq:smooth-aux-1}, \eqref{eq:smooth-aux-2}, and \eqref{eq:smooth-aux-3}, the proof of \eqref{eq:Riesz-smooth-1} for $n>m$ will be completed. From \eqref{eq:unif-bound-trozos}, \eqref{eq:Jaco-der}, Lemmas \ref{lem:bound-diff} and \ref{lem:bound-diff-der}, and using the bounds $|\mathcal{H}_{\alpha,\beta}(x)|\leq C(1-x)^{-3/2}$ and $|\mathcal{H}_{\alpha,\beta}'(x)|\leq C(1-x)^{-5/2}$, for $-1<x<1$, we obtain the estimate \begin{equation*} |\overline{\mathcal{S}}(m,n)|\le C (n+1)^2. \end{equation*} Now we decompose $T_1(m,n)$ and $T_2(m,n)$ according the intervals $V_1=[-1+1/(n+1)^2,-1+1/(m+1)^2)$, $V_2=[-1+1/(m+1)^2,1-1/(m+1)^2]$, and $V_3=(1-1/(m+1)^2,1-1/(n+1)^2]$. Using \eqref{eq:unif-bound-trozos}, Lemma \ref{lem:bound-diff-der}, and the estimate \[ |(1+x)\mathcal{H}_{\alpha,\beta}(x)-2(1-x^2)\mathcal{H}'_{\alpha,\beta}(x)|\le C (1+x)(1-x)^{-3/2}, \qquad -1<x<1, \] for $m/2\leq n\leq 3m/2$ and $\alpha\ge -1/2$ we have \begin{align*} |T_1(m,n)|\le &C\left((m+1)^{\beta+3/2}\int_{V_1}(1+x)^{\beta/2+3/4}\, dx\right.\\& \kern 20pt +(m+1)\int_{V_2}(1+x)^{1/2}(1-x)^{-3/2}\, dx\\&\left.\kern20pt+(m+1)^{\alpha+3/2}\int_{V_3}(1-x)^{\alpha/2-5/4}\, dx\right)\le C(n+1)^2. \end{align*} Finally, by \eqref{eq:unif-bound-trozos}, Lemma \ref{lem:bound-diff}, and the bound \[ |(1-x^2)\mathcal{H}''_{\alpha,\beta}(x)+2(\beta-\alpha-1-(\alpha+\beta+3)x)\mathcal{H}'_{\alpha,\beta}(x)|\le C (1-x)^{-5/2}, \quad -1<x<1, \] we can show that for $m/2\leq n\leq 3m/2$ and $\alpha\ge -1/2$, \begin{multline*} |T_2(m,n)|\le C\left((m+1)^{\beta-1/2}\int_{V_1}(1+x)^{\beta/2-1/4}\, dx+\int_{V_2}(1-x)^{-2}\, dx\right.\\\left.+(m+1)^{\alpha-1/2}\int_{V_3}(1-x)^{\alpha/2-9/4}\, dx\right)\le C(n+1)^2, \end{multline*} and the proof of \eqref{eq:aux-prop} is completed. Now we will prove the estimate \eqref{eq:Riesz-smooth-2} for $n<m$. Again, we decompose the difference $R(m,n+2)-R(m,n)$ into three integrals $\mathcal{R}_{1}'(m,n)$, $\mathcal{R}_{2}'(m,n)$, and $\mathcal{R}_{3}'(m,n)$, over the intervals $I_{1}'=(-1,-1+1/(m+1)^{2})$, $I_{2}'=[-1+1/(m+1)^{2},1-1/(m+1)^{2}]$, $I_{3}'=(1-1/(m+1)^{2},1)$. We use \eqref{eq:unif-bound-trozos} and Lemma~\ref{lem:bound-diff} and we deduce the estimates \[ |\mathcal{R}_{1}'(m,n)|\le C (m+1)^{\beta+1/2}(n+1)^{\beta-1/2}\int_{I'_1} (1+x)^\beta\, dx\le \frac{C}{(m+1)^{2}} \] and \[ |\mathcal{R}_{3}'(m,n)|\le C (m+1)^{\alpha+1/2}(n+1)^{\alpha+1/2}\int_{I'_3}(1-x)^{\alpha+1/2}\, dx\le \frac{C}{(m+1)^{2}}. \] We analyse now the term $\mathcal{R}_{2}'(m,n)$. By \eqref{eq:R'-size}, using that $\lambda_{n+2}^{(\alpha+1,\beta)}\not= \lambda_m^{(\alpha,\beta)}$ and $\lambda_{n}^{(\alpha+1,\beta)}\not= \lambda_m^{(\alpha,\beta)}$, it is possible to prove the identity \begin{multline*} \mathcal{R}'_2(m,n)=\frac{S'(m,n+2)-J'(m,n+2)}{\lambda_{n+2}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)}} -\frac{S'(m,n)-J'(m,n)}{\lambda_{n}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)}}\\ =\frac{\mathcal{S}'(m,n)-\mathcal{J}'(m,n)}{\lambda_{n+2}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)}} -\frac{2(2n+\alpha+\beta+4)(S'(m,n)-J'(m,n))} {(\lambda_{n+2}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)})(\lambda_{n}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)})}, \end{multline*} where \begin{equation*} \mathcal{J}'(m,n)=\int_{I'_2}H_{\alpha,\beta}(x)p_m^{(\alpha,\beta)}(x) (p_{n+2}^{(\alpha+1,\beta)}(x)-p_n^{(\alpha+1,\beta)}(x))\,d\mu_{\alpha,\beta}(x) \end{equation*} and \[ \mathcal{S}'(m,n)=U_{\alpha+1,\beta}\Big((1-(\cdot))^{-1/2}p_{m}^{(\alpha,\beta)}, p_{n+2}^{(\alpha+1,\beta)}-p_n^{(\alpha+1,\beta)}\Big)(x)\Big|_{x=-1+1/(m+1)^2}^{x=1-1/(m+1)^2}. \] By \eqref{eq:Sprim} and \eqref{eq:J'} we obtain that \begin{equation*} \left|\frac{2(2n+\alpha+\beta+4)(S'(m,n)-J'(m,n))} {(\lambda_{n+2}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)})(\lambda_{n}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)})}\right|\le \frac{C}{|n-m|^2}. \end{equation*} Now, from \eqref{eq:unif-bound-trozos}, \eqref{eq:Jaco-der}, and Lemmas \ref{lem:bound-diff} and \ref{lem:bound-diff-der}, we deduce the estimate \begin{equation*} |\mathcal{S}'(m,n)| \leq C \end{equation*} and therefore \[ \left|\frac{\mathcal{S}'(m,n)}{\lambda_{n+2}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)}}\right|\le \frac{C}{|n-m|^2}. \] We deal now with the term $\mathcal{J}'(m,n)$. By using \eqref{eq:L-product} we have that \begin{multline*} \lambda_{m}^{(\alpha,\beta)}\mathcal{J}'(m,n)\\ \begin{aligned} &= \int_{I'_2}H_{\alpha,\beta}(x)(p_{n+2}^{(\alpha+1,\beta)}(x)-p_n^{(\alpha+1,\beta)}(x)) L^{\alpha,\beta}p_m^{(\alpha,\beta)}(x)\,d\mu_{\alpha,\beta}(x)\\ &=\overline{\mathcal{S}}'(m,n)+\int_{I'_2}L^{\alpha,\beta}(H_{\alpha,\beta}(p_{n+2}^{(\alpha+1,\beta)}-p_n^{(\alpha+1,\beta)}))(x)p_m^{(\alpha,\beta)}(x)\,d\mu_{\alpha,\beta}(x)\\ &=\overline{\mathcal{S}}'(m,n)+\int_{I'_2}H_{\alpha,\beta}(x)L^{\alpha+1,\beta}(p_{n+2}^{(\alpha+1,\beta)}-p_n^{(\alpha+1,\beta)}))(x) p_m^{(\alpha,\beta)}(x)\,d\mu_{\alpha,\beta}(x)\\&\kern25pt -T'_1(m,n)-T'_2(m,n), \end{aligned} \end{multline*} where \[ \overline{\mathcal{S}}'(m,n)=U_{\alpha,\beta}\Big(H_{\alpha,\beta}(p_{n+2}^{(\alpha+1,\beta)}-p_n^{(\alpha+1,\beta)}), p_m^{(\alpha,\beta)}\Big)(x)\Big|_{x=-1+1/(m+1)^2}^{x=1-1/(m+1)^2}, \] \begin{multline*} T_1'(m,n)=\int_{I_2'}((1+x)H_{\alpha,\beta}(x)+2(1-x^2)H'_{\alpha,\beta}(x))\\(p_{n+2}^{(\alpha+1,\beta)}-p_n^{(\alpha+1,\beta)})'(x) p_m^{(\alpha,\beta)}(x)\, d\mu_{\alpha,\beta}(x), \end{multline*} and \begin{multline*} T_2'(m,n)=\int_{I_2'}((1-x^2)H''_{\alpha,\beta}(x)+(\beta-\alpha-(\alpha+\beta+2)x)H'_{\alpha,\beta}(x)) \\(p_{n+2}^{(\alpha+1,\beta)}(x)-p_n^{(\alpha+1,\beta)}(x)) p_m^{(\alpha,\beta)}(x)\, d\mu_{\alpha,\beta}(x). \end{multline*} Applying \eqref{eq_Lpols} we get \begin{multline*} \frac{\mathcal{J}'(m,n)}{\lambda_{n+2}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)}}\\= \frac{-\overline{\mathcal{S}}'(m,n)-2(2n+\alpha+\beta+4)J'(m,n)+T'_1(m,n)+T'_2(m,n)}{(\lambda_{n+2}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)})^2}. \end{multline*} From \eqref{eq:J'}, it is easy to show that \[ \left|\frac{2(2n+\alpha+\beta+4)J'(m,n)}{(\lambda_{n+2}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)})^2}\right|\le \frac{C}{|n-m|^2}. \] To estimate the term $\overline{\mathcal{S}}'(m,n)$ we use \eqref{eq:unif-bound-trozos}, \eqref{eq:Jaco-der}, Lemmas \ref{lem:bound-diff} and \ref{lem:bound-diff-der}, and the estimates $|H_{\alpha,\beta}(x)|\leq C(1-x)^{-1/2}$, $|H_{\alpha,\beta}'(x)|\leq C(1-x)^{-3/2}$, for $-1<x<1$. Then, \begin{equation*} |\overline{\mathcal{S}}'(m,n)| \leq C (m+1)^{2} \end{equation*} and \[ \left|\frac{\overline{\mathcal{S}}'(m,n)}{(\lambda_{n+2}^{(\alpha+1,\beta)}-\lambda_m^{(\alpha,\beta)})^2}\right|\le \frac{C}{|n-m|^2}. \] Finally, we estimate the terms $T_{1}'(m,n)$ and $T_{2}'(m,n)$. We split both of them according to the intervals $V'_1=[-1+1/(m+1)^2,-1+1/(n+1)^2)$, $V'_2=[-1+1/(n+1)^2,1-1/(n+1)^2]$, and $V'_3=(1-1/(n+1)^2,1-1/(m+1)^2]$. Thus, using \eqref{eq:unif-bound-trozos}, Lemma \ref{lem:bound-diff-der}, and the estimate \[ |(1+x) H_{\alpha,\beta}(x)-2(1-x^2) H'_{\alpha,\beta}(x)|\le C (1+x)(1-x)^{-1/2}, \qquad -1<x<1, \] for $m/2\leq n\leq 3m/2$ and $\alpha\ge -1/2$ we have \begin{align*} |T'_1(m,n)|&\le C\left((n+1)^{\beta+3/2}\int_{V'_1}(1+x)^{\beta/2+3/4}\, dx\right. \\&\kern20pt+(n+1)\int_{V'_2}(1+x)^{1/2}(1-x)^{-3/2}\, dx \\&\kern20pt\left.+(n+1)^{\alpha+5/2}\int_{V'_3}(1-x)^{\alpha/2-3/4}\, dx\right)\le C(m+1)^2. \end{align*} Moreover, by \eqref{eq:unif-bound-trozos}, Lemma \ref{lem:bound-diff}, and the estimate \[ |(1-x^2) H''_{\alpha,\beta}(x)+2(\beta-\alpha-(\alpha+\beta+2)x) H'_{\alpha,\beta}(x)|\le C (1-x)^{-3/2}, \quad -1<x<1, \] we conclude that for $m/2\leq n\leq 3m/2$ and $\alpha,\beta \ge -1/2$, \begin{multline*} |T'_2(m,n)|\le C\left((n+1)^{\beta-1/2}\int_{V'_1}(1+x)^{\beta/2-1/4}\, dx+\int_{V'_2}(1-x)^{-2}\, dx\right.\\\left.+(n+1)^{\alpha+1/2}\int_{V'_3}(1-x)^{\alpha/2-7/4}\, dx\right)\le C(m+1)^2 \end{multline*} and the proof of the proposition is finished. \end{proof} \section{Proofs of Lemmas \ref{lem:bound-diff} and \ref{lem:bound-diff-der}} \begin{proof}[Proof of Lemma \ref{lem:bound-diff}] First of all, note that it is enough to proof that \begin{equation} \label{eq:bound-diff-2} |p_{n+2}^{(a,b)}(x)-p_{n}^{(a,b)}(x)|\le C \begin{cases} (n+1)^{a-1/2}, & 1-1/(n+1)^2<x<1,\\ (1-x)^{-a/2+1/4}, & 0\le x\leq1-1/(n+1)^2, \end{cases} \end{equation} because the bound for $-1<x<0$ is obtained immediately from latter by using the relation $P_n^{(a,b)}(-z)=(-1)^nP_n^{(b,a)}(z)$, $-1<z<1$. It is straightforward to check that \begin{equation} \label{eq:lem-1} p_{n+2}^{(a,b)}(x)-p_n^{(a,b)}(x)=\left(\frac{w_{n+2}^{(a,b)}}{w_n^{(a,b)}}-1\right)p_n^{(a,b)}(x)+w_{n+2}^{(a,b)}(P_{n+2}^{(a,b)}(x)-P_{n}^{(a,b)}(x)). \end{equation} From the estimate \begin{equation*} \left|\frac{w_{n+2}^{(a,b)}}{w_n^{(a,b)}}-1\right| \leq \frac{C}{n+1} \end{equation*} and the uniform estimate \eqref{eq:unif-bound-trozos} (note that if $0\le x<1-1/(n+1)^2$, then $\frac{1}{n+1}\le (1-x)^{1/2} $), we conclude that \begin{equation} \label{eq:lem-2} \left|\left(\frac{w_{n+2}^{(a,b)}}{w_n^{(a,b)}}-1\right)p_n^{(a,b)}(x)\right| \\\le C\begin{cases} (n+1)^{a-1/2}, & 1-1/(n+1)^2<x<1,\\ (1-x)^{-a/2+1/4}, & 0\le x\leq1-1/(n+1)^2. \end{cases} \end{equation} Now we apply the following identity (obtained from \cite[18.9.6]{NIST}) \[ -\frac{2n+a+b+2}{2}(1-z)P_n^{(a+1,b)}(z)+aP_n^{(a,b)}(z)=(n+1)(P_{n+1}^{(a,b)}(z)-P_{n}^{(a,b)}(z)), \] $0\leq z<1$, $a,b>-1$, to deduce the estimate \begin{multline*} w_{n+2}^{(a,b)}|P_{n+1}^{(a,b)}(x)-P_{n}^{(a,b)}(x)|\\ \le \frac{(2n+a+b+2)}{2(n+1)}(1-x)\frac{w_{n+2}^{(a,b)}}{w_{n}^{(a+1,b)}}|p_n^{(a+1,b)}(x)|+\frac{|a|}{n+1}\frac{w_{n+2}^{(a,b)}}{w_{n}^{(a,b)}}|p_n^{(a,b)}(x)|. \end{multline*} Therefore, the uniform estimate \eqref{eq:unif-bound-trozos} implies that \begin{multline} \label{eq:lem-3} w_{n+2}^{(a,b)}|P_{n+1}^{(a,b)}(x)-P_{n}^{(a,b)}(x)|\\\le C\begin{cases} (n+1)^{a-1/2}, & 1-1/(n+1)^2<x<1,\\ (1-x)^{-a/2+1/4}, & 0\le x\leq1-1/(n+1)^2, \end{cases} \end{multline} and the same bound holds for the term $w_{n+2}^{(a,b)}|P_{n+2}^{(a,b)}(x)-P_{n+1}^{(a,b)}(x)|$. Then, \eqref{eq:bound-diff-2} follows from \eqref{eq:lem-1}, \eqref{eq:lem-2}, and \eqref{eq:lem-3}. \end{proof} \begin{proof}[Proof of Lemma \ref{lem:bound-diff-der}] First, we assume that $n\neq 0$. By \eqref{eq:Jaco-der}, it is easy to check that \begin{multline*} (p_{n+2}^{(a,b)}-p_{n}^{(a,b)})'(x)=\frac{w_{n+2}^{(a,b)}}{w_{n+1}^{(a+1,b+1)}}\frac{n+a+b+3}{2}(p_{n+1}^{(a+1,b+1)}(x)-p_{n-1}^{(a+1,b+1)}(x))\\+ \left(\frac{w_{n+2}^{(a,b)}}{w_{n+1}^{(a+1,b+1)}}\frac{n+a+b+3}{2}-\frac{w_{n}^{(a,b)}}{w_{n-1}^{(a+1,b+1)}}\frac{n+a+b+1}{2}\right)p_{n-1}^{(a+1,b+1)}(x). \end{multline*} Then, using that \[ \left|\frac{w_{n+2}^{(a,b)}}{w_{n+1}^{(a+1,b+1)}}\frac{n+a+b+3}{2}-\frac{w_{n}^{(a,b)}}{w_{n-1}^{(a+1,b+1)}}\frac{n+a+b+1}{2}\right|\leq C, \] and the estimate \eqref{eq:unif-bound-trozos} and Lemma \ref{lem:bound-diff}, the result follows. If $n=0$, we proceed in a similar way using \eqref{eq:Jaco-der0} instead of \eqref{eq:Jaco-der}. \end{proof}
\section{Motivation and objectives} Turbulence is the primary example of a highly nonlinear phenomenon. However, there is evidence that some processes of shear turbulence are controlled by linear dynamics, in particular the mechanism by which energy is transferred from the mean velocity component of the flow to the spatially and temporally evolving perturbations \citep[e.g.,][]{Farrell-Ioannou-1998a, Kim2000, Jimenez2013a}. The goal of the present work is to investigate the mechanism dominating the energy transfer from the mean flow to the fluctuating field in wall-bounded turbulence. It is agreed that the streamwise rolls and streaks are ubiquitous in wall-shear flow \citep{Klebanoff1962, Kline1967} and that they are involved in a quasi-periodic regeneration cycle \citep{Panton2001, Adrian2007, Smits2011, Jimenez2012, Jimenez2018}. The space-time structure of rolls and streaks is believed to play an important role in sustaining and carrying shear-driven turbulence \citep[e.g.,][]{Kim1971, Jimenez1991, Hamilton1995, Waleffe1997, Schoppa2002, Jimenez2012}. The ultimate cause maintaining this self-sustaining cycle, and hence turbulence, is the energy extraction from the flow mean shear. Within the fluid mechanics community, there have been several mechanisms proposed as plausible scenarios for how this energy extraction occurs. Conceptually, we can divide these mechanisms into three categories: (i)~modal inflectional instability of the mean cross-flow, (ii)~non-modal transient growth, and (iii)~non-modal transient growth assisted by parametric instability of the time-varying mean cross-flow. In the first mechanism, it is hypothesized that the energy is transferred from the cross-flow mean profile $U(y,z,t)$ ($y$ and $z$ are the wall-normal and spanwise directions, respectively) to the flow fluctuations through a modal inflectional instability \citep{Waleffe1997} in the form of a corrugated vortex sheet \citep{Kawahara2003} or of intense localized patches of low-momentum fluid \citep{Hack2018}. The second mechanism involves the collection of fluid near the wall by streamwise vortices that is subsequently organized into streaks via the lift-up mechanism \citep{Landahl1975, Butler1992, Jimenez2012}. In this case, the mean flow, while modally stable, it is able to support the growth of perturbations for a transient time owing to the non-normality of the linear operator that governs the evolution of fluctuations. This process is referred to as non-modal transient growth \citep[e.g.,][]{Schmid2007}. Additional studies suggest that the generation of streaks are due to the structure-forming properties of the linearized Navier--Stokes operator, independent of any organized vortices \citep{Chernyshenko2005}, but the non-modal transient growth is still invoked. The transient growth scenario gained even more popularity since the work by \citet{Schoppa2002}, who argued that transient growth may be the most relevant mechanism not only for streak formation but also for their eventual breakdown. \citet{Schoppa2002} showed that most streaks detected in actual wall-turbulence simulations are indeed modally stable. Instead, the loss of stability of the streaks is better explained by transient growth of perturbations that leads to vorticity sheet formation and nonlinear saturation. Finally, a third mechanism has been proposed in recent years by \citet{Farrell2012} and \citet{Farrell2016}. Farrell and co-workers adopted the perspective of statistical state dynamics (SSD) to develop a theory for the maintenance of wall turbulence. Through the SSD framework, it is revealed that the perturbations are maintained by an essentially time-dependent, parametric, non-normal interaction with the streak, rather than by the inflectional instability of the streaky flow discussed above \citep[see also][]{Farrell2017}. The three different mechanisms, each capable of leading to the observed turbulence structure, are rooted in theoretical or conceptual arguments. Whether the energy transfer from the mean cross-flow to fluctuations in wall-bounded turbulence occurs through any or a combination of these mechanisms remains unclear. Most of the theories stem from linear stability theory, which has proven very successful in providing a theoretical framework to explain the lengths and time scales observed in the flow. However, an appropriate base flow for the linearization must be selected \emph{a-priori} depending on the flow state of interest; this introduces some degree of arbitrariness. Moreover, quantitative results are known to be sensitive to the details of the base state \citep{Vaughan2011}. For example, there have been considerable efforts to explain and control turbulent structure and length scales by linearizing around the turbulent mean profile obtained by averaging in homogeneous directions and time \citep[e.g.,][]{Hogberg2003,DelAlamo2006,Hwang2010b}. However, the turbulent mean profile is known to be always modally stable, and thus mechanisms~(i) and~(iii) are precluded. The self-sustained turbulent state is intimately related to the roll--streak structure \citep[e.g.,][]{Waleffe1997}, and this suggests that the rolls--streaks should be part of the base flow, as pointed out by the SSD theory. Another criticism of linear studies is that turbulence is a highly nonlinear phenomenon, and a full self-sustained cycle cannot be uncovered from a single set of linearized equations. For example, in turbulent channel flows, the classic linearization around the mean velocity profile does not account for the redistribution of energy from the streamwise velocity component to the cross-flow, which is the prevailing energy transfer on average \citep{Mansour1988}. In order to capture different energy transfer mechanisms, the base state for linearization should be selected accordingly. In this regard, eigenmodes or optimal solutions should not be taken as representative of the actual flow and, if they are considered valid, the time and length scales for which linearization remains meaningful become relevant issues that are barely discussed in the literature. Here, we attempt to assess the relative importance of the three proposed mechanisms for energy extraction from the mean flow in wall turbulence. For now, we mainly focus on whether we can obtain a self-sustained turbulent-like flow when a particular mechanism is inhibited. First, we present some diagnostics from direct numerical simulations of wall turbulence. Second, we designed three numerical experiments each of which is dominated by the energy extraction from modal instability, non-modal transient growth, or transient growth with parametric instability. The proposed experiments are fully nonlinear systems to close the feedback loop between mean cross-flow and perturbations, enabling in this manner the possibility of sustained turbulence. The experiments are accompanied by some preliminary results. The Brief is organized as follows: Section~\ref{sec:numerical} contains the numerical details of the simulations and the stability analysis of the mean cross-flow. The results are presented in Section~\ref{sec:results}, which is further subdivided into three subsections describing the details of the flow set-up and the corresponding results. Finally, conclusions and future directions are offered in Section~\ref{sec:conclusions}. \section{Numerical experiments of turbulent channel flow}\label{sec:numerical} \subsection{Numerical setup}\label{subsec:numerical} The baseline case is a plane turbulent channel flow at $Re_\tau=184$, with streamwise, wall-normal, and spanwise domain sizes equal to $L_x^+ \approx 337$, $L_y^+ \approx 368$, and $L_z^+ \approx 168$, respectively, where~$+$ denotes wall units defined in terms of the kinematic viscosity $\nu$ and friction velocity at the wall $u_\tau$. The channel half-height is denoted by $h$. \citet{Jimenez1991} showed that simulations in this domain constitute an elemental structural unit containing a single streamwise streak and a pair of staggered quasi-streamwise vortices, which reproduce fairly well the statistics of the flow in larger domains. We refer to this case as CH180. We consider three additional numerical set-ups by solving \begin{eqnarray} \label{eq:NS} \frac{\partial u_i}{\partial t} = -\frac{\partial u_i u_j}{\partial x_j} - \frac{\partial p}{\partial x_i} + \nu \frac{\partial^2 u_i }{\partial x_k \partial x_k} + f_i, \quad \frac{\partial u_i}{\partial x_i} = 0, \end{eqnarray} where repeated indices imply summation, $(u_1,u_2,u_3)=(u,v,w)$ are streamwise, wall-normal, and spanwise velocities with respective coordinates $(x_1,x_2,x_3)=(x,y,z)$, $p$ is the pressure, and $f_i=f_i(x,y,z,t)$ is a forcing term aiming to prevent one or several of the proposed energy injection mechanisms. The functional form of $f_i$ is discussed below for each particular case. The simulations are performed with a staggered, second-order, finite differences scheme \citep{Orlandi2000} and a fractional-step method \citep{Kim1985} with a third-order Runge-Kutta time-advancing scheme \citep{Wray1990}. The solution is advanced in time using a constant time step such that the Courant--Friedrichs--Lewy condition is below 0.5. The streamwise and spanwise resolutions are $\Delta x^+\approx 6.5$ and $\Delta z^+\approx3.3$, respectively, and the minimum and maximum wall-normal resolutions are $\Delta y_{\mathrm{min}}^+\approx0.2$ and $\Delta y_{\mathrm{max}}^+\approx6.1$. All the simulations were run for at least $100h/u_\tau$ after transients. The code has been validated in previous studies in turbulent channel flows \citep{Lozano2016_Brief, Bae2018b, Bae2018}, and flat-plate boundary layers \citep{Lozano2018}. We introduce the averaging operators $\langle \,\cdot\, \rangle_{x}$, $\langle \,\cdot\, \rangle_{xz}$, and $\langle \,\cdot\, \rangle_{xzt}$ which denote averaging in $x$ direction, $x$ and $z$ directions, and $x$, $z$ and $t$, respectively. The mean velocity profile is defined as $\langle u \rangle_{xzt}$, the mean cross-flow velocity profile as $U=\langle u \rangle_{x}$, and the fluctuating velocities (or perturbations) as $u_1'= u_1 - U$, $u_2'= u_2$, and $u_3'= u_3$. \subsection{Linear stability of the mean cross-flow for case CH180}\label{subsec:CH180} We investigate the stability of $A(U)$ that governs the linear evolution of the fluctuating velocity $\boldsymbol{u}'=(u',v',w')$, i.e., \begin{equation} \frac{\partial \boldsymbol{u}'}{\partial t} = A(U) \boldsymbol{u}'. \end{equation} The analysis is performed for different times $t_0$ by assuming a constant-in-time mean cross-flow $U(y,z,t_0)$. Occasionally, we refer to the stability of operator $A(U)$ simply as the stability of $U$. The details of the analysis are provided in the Appendix. Figure~\ref{fig:CH180}(a) shows the time evolution of the maximum growth rate of $A$ denoted by $\sigma_{\mathrm{max}}$ (largest real part of the eigenvalues of $A$). The flow is modally unstable 90\% of the time ($\sigma_{\mathrm{max}}>0$). Since we have assumed that $U$ does not evolve in time, it is pertinent to discuss the validity of such an assumption. The time auto-correlation of $U$ is plotted in Figure \ref{fig:CH180}(b), which reveals that 50\% and 100\% de-correlation times are attained about $h/u_\tau$ and $4h/u_\tau$, respectively. Rigorously, only growth rates with characteristic times $1/\sigma_{\mathrm{max}}$ much shorter than the characteristic de-correlation time of the mean cross-flow should be taken as representative of the linear stability of $U$. The results in Figure \ref{fig:CH180} show that the flow is modally unstable 80\% of the time history if we account for growth rates larger than $u_\tau/(4h)$, and 40\% of the time for growth rates larger than $u_\tau/h$. A complementary metric to assess the validity of frozen-in-time $U$ is the characteristic growth rate of $U$ defined as $\sigma_U = (\mathrm{d}E_U/\mathrm{d}t)/(2E_U)$ with $E_U = \langle U^2/2 \rangle_{yz}$. The ratio $\sigma_{\mathrm{max}}/\sigma_U$ was found to be on average $\approx 10$, i.e., the rate of change of $U$ is on average ten times slower than the maximum growth rate predicted by linear stability analysis. A tentative conclusion is that the stability analysis of $U$ may not be quantitatively valid, but the observed stability trends are probably correct and, hence, $U$ supports exponential growth of disturbances for a non-negligible fraction of the flow history. \begin{figure} \begin{center} \subfloat[][\phantom{a}]{\includegraphics[width=0.45\textwidth]{sigma_DNS_Q.eps} } \hspace{0.1cm} \subfloat[]{\includegraphics[width=0.50\textwidth]{Umean_correlation.eps} } \end{center} \caption{(a) The evolution of the maximum growth rate of the mean cross-flow $U(y,z,t)$. (b) The auto-correlation of the cross-flow $\langle U(y,z,t) \rangle_z$. The different lines are for $y/h=0.01,0.04,0.10,0.22,0.45,0.80$. The arrow indicates increasing $y/h$. \label{fig:CH180}} \end{figure} \section{Experiments for discerning energy transfer mechanisms and preliminary results} \label{sec:results} \subsection{Primary energy injection by modal instability}\label{subsec:numerical:modal} The effect of modal instability is assessed by freezing in time the mean cross-flow for case CH180 at time~$t_0$ when $U(y,z,t)$ is modally unstable. At each time step, $f_1$ is computed such that $U(y,z,t)=U(y,z,t_0)$ with $f_2=f_3=0$. Additionally, $\langle u \rangle_{xzt}$ is set to the same value as in case CH180. The lack of time evolution in $U$ eliminates the ability of energy extraction through parametric instability. The cross-flow can still support transient growth, but the algebraic growth of perturbations is expected to be overcome by the faster exponential growth provided by the modal instability of~$U$. A total number of~100 uncorrelated flow fields with modally unstable $U(y,z,t_0)$ were selected to run simulations. Note that as the base flow is frozen in time, the assumption of constant $U$ invoked for the stability analysis is rigorously satisfied. As an example, Figure~\ref{fig:snap_modal} shows the instantaneous velocity field for one case after transients. The resulting root-mean-squared (rms) fluctuating velocities for the statistical steady state are shown in Figure~\ref{fig:stats_modal}(a), together with those from CH180. Unsurprisingly, turbulent channel flows with persistent modally unstable mean cross-flow are capable of sustaining turbulence. The new flow reaches statistical equilibrium at a higher level of turbulence intensities owing to the additional mean tangential stress introduced by $f_1$, but the trends observed in Figure~\ref{fig:stats_modal}(a) are consistent with CH180 in terms of relative magnitude and wall-normal behavior. The transition to the new steady state is evidenced by Figure~\ref{fig:stats_modal}(b), which shows the time evolution of a selection of streamwise Fourier components before and after freezing the mean cross-flow. The adaptation time of turbulence upon imposition of constant $U$ is roughly $h/u_\tau$, consistent with the lifespan of large eddies in the flow \citep{Lozano2014b}. \begin{figure} \vspace{0.2cm} \begin{center} \includegraphics[width=1\textwidth]{snap_12.eps} \end{center} \caption{ Experiment with fixed, unstable $U$: (a) Instantaneous velocity field in a $z-y$ plane at $x=0h$. (b) Instantaneous streamwise velocity in a $x-z$ plane at $y=0.1h$. Colors represent streamwise velocity and arrows are cross-flow velocities. Velocities are scaled in wall units of the baseline case. \label{fig:snap_modal}} \begin{center} \subfloat[]{ \includegraphics[width=0.45\textwidth]{rms_12.eps} } \hspace{0.1cm} \subfloat[]{ \includegraphics[width=0.47\textwidth]{modes_12.eps} } \end{center} \caption{ Experiment with fixed, unstable $U$: (a) Root-mean-squared fluctuating velocities for case CH180 (lines) and channel with frozen-in-time modally unstable mean cross-flow (symbols). Lines and symbols are: dashed and squares, streamwise; dash-dotted and circles, wall-normal; dotted and triangles, spanwise velocity fluctuations. (b) Time evolution of the energy associated with streamwise Fourier modes, $\hat u_{ik} \hat u^*_{ik}$, for $i=1,2,3$ and $k=0,1,2$ at $y=0.1h$, where $*$ denotes complex conjugation. The mean cross-flow is frozen at $t u_\tau/h = 10$ (dashed black line). \label{fig:stats_modal}} \end{figure} The results reported above correspond to one particular $U(y,z,t_0)$, but the conclusions are found to be robust for all mean cross-flows examined. Finally, it is important to highlight that while maintaining mean cross-flow in a modally unstable state does lead to sustained turbulence, whether this new state is similar in nature to unforced wall turbulence is an important question that is not investigated here and should be carefully addressed in future studies. \subsection{Energy injection by transient growth}\label{subsec:numerical:nonmodal} The effect of non-modal transient growth as a main cause for energy injection is assessed by following a similar approach to that in Section~\ref{subsec:numerical:modal}. In this case, the cross-flow $U$ from CH180 is frozen at the instant~$t_0$, when the flow is modally stable. The mean flow $\langle u \rangle_{xzt}$ is set to the same value as in case CH180. The set-up disposes of energy transfers that are due to both modal and parametric instabilities, while maintaining the transient growth of perturbations. The expected scenario consistent with sustained turbulence \citep[e.g.,][]{Schoppa2002} is the non-modal amplification of perturbations until saturation followed by nonlinear scattering and generation of new disturbances. However, plain visual inspection of the velocity field in Figure~\ref{fig:snap_nonmodal} reveals that this is not the case, and turbulence is distinctly lessened. The rms fluctuating velocities for one experiment are shown in Figure~\ref{fig:stats_nonmodal}(a). Turbulence reaches a quasi-laminar state with residual cross-flow turbulence intensities and non-negligible streamwise fluctuations required to support the prescribed $U(y,z,t_0)$. The exponential decay of Fourier modes after freezing the mean cross-flow is clearly seen in Figure \ref{fig:stats_nonmodal}(b). The simulation was repeated for 20 different modally stable mean cross-flows $U(y,z,t_0)$ and all cases decayed similarly to the example discussed above. \begin{figure} \vspace{0.2cm} \begin{center} \includegraphics[width=1\textwidth]{snap_13.eps} \end{center} \caption{ Experiment with fixed, stable $U$: (a) Instantaneous velocity field in a $z-y$ plane at $x=0h$. (b) Instantaneous streamwise velocity in a $x-z$ plane at $y=0.1h$. Colors represent streamwise velocity and arrows are cross-flow velocities. Velocities are scaled in wall units of the baseline case. Arrows in panel (a) are amplified by a factor of 10. \label{fig:snap_nonmodal}} \begin{center} \subfloat[]{ \includegraphics[width=0.45\textwidth]{rms_13.eps} } \hspace{0.1cm} \subfloat[]{ \includegraphics[width=0.45\textwidth]{modes_13.eps} } \end{center} \caption{ Experiment with fixed, stable $U$: (a) Root-mean-squared fluctuating velocities for case CH180 (lines) and channel with frozen-in-time modally stable mean cross-flow (symbols). Lines and symbols are: dashed and squares, streamwise; dash-dotted and circles, wall-normal; dotted and triangles, spanwise velocity fluctuations. (b) Time evolution of the energy associated to streamwise Fourier modes, $\hat u_{ik} \hat u^*_{ik}$, for $i=1,2,3$ and $k=0,1,2$ at $y=0.1h$, where $*$ denotes complex conjugate. The mean cross-flow is frozen in time at $t u_\tau/h = 29$ (dashed black line). \label{fig:stats_nonmodal}} \end{figure} \subsection{Energy injection by transient growth with parametric instability}\label{subsec:numerical:parametric} The maintenance of turbulence exclusively by transient growth with parametric instability is analyzed by a time-dependent mean cross-flow that is altered to be free of modal instabilities. To that end, we introduce the linear damping $f_1=-\mu ( U - \langle u\rangle_{xz})$, $f_2=f_3=0$, where the parameter $\mu$ is a coefficient to be determined such that $U$ is modally stable for all times. The goal is to investigate the existence of self-sustained wall turbulence without any energy extraction from the mean cross-flow via modal instabilities. Ideally, if $\partial \boldsymbol{u}' \big/ \partial t = A(\mu) \boldsymbol{u}'$ is the linear equation governing the fluctuating velocities, the drag coefficient~$\mu$ should be adjusted at each time step to bring the most unstable eigenvalue of $A$ to neutrality. In the present preliminary version of the work, we adopted a simplified approach where the value of $\mu$ is set constant in time. Then, a campaign of channel flow simulations driven by a constant streamwise mass flux was performed for values of $\mu$ ranging from $0$ up to $\mu_c \approx 1.3 u_\tau/h$, above which the flow laminarizes. \begin{figure} \begin{center} \subfloat[]{ \includegraphics[width=0.31\textwidth]{Umean_16.eps} } \hspace{0.05cm} \subfloat[]{ \includegraphics[width=0.31\textwidth]{rms_16.eps} } \hspace{0.05cm} \subfloat[]{ \includegraphics[width=0.31\textwidth]{sigma_0.08U_U00_Q.eps} } \end{center} \begin{center} \subfloat[]{ \includegraphics[width=0.31\textwidth]{Umean_15.eps} } \hspace{0.05cm} \subfloat[]{ \includegraphics[width=0.31\textwidth]{rms_15.eps} } \hspace{0.05cm} \subfloat[]{ \includegraphics[width=0.31\textwidth]{sigma_0.07U_U00_Q.eps} } \end{center} \caption{ Experiment with linear drag on $U$: (a,d) Mean velocity profile for case CH180 (black dashed line) and channel with linear damping $-\mu (U - \langle u\rangle_{xz})$ (solid red line). (b,e) Root-mean-squared fluctuating velocities for case CH180 (lines) and channel with $-\mu (U - \langle u\rangle_{xz})$ (symbols). Lines and symbols are: dashed and squares, streamwise; dashed-dotted and circles, wall-normal; dotted and triangles, spanwise velocity fluctuations. (c,g) Time evolution of the maximum growth rate of $A$ for channel flow with linear damping $-\mu (U - \langle u\rangle_{xz})$. (a,b,c) are for $\mu=1.4 u_\tau/h>\mu_c$ and (d,e,f) are for $\mu=1.2 u_\tau/h<\mu_c$. \label{fig:stats_parametric_1}} \end{figure} The mean and rms velocity profiles for $\mu=1.4 u_\tau/h>\mu_c$ are shown in Figures~\ref{fig:stats_parametric_1}(a,b). The flow is laminar with zero velocity fluctuations. Figure~\ref{fig:stats_parametric_1}(c) shows the time history of the most unstable growth rate of $A$, which is constant and negative after transients. Figures~\ref{fig:stats_parametric_1}(d,e,f) are equivalent to Figures~\ref{fig:stats_parametric_1}(a,b,c) but for $\mu=1.2 u_\tau/h<\mu_c$, which is the maximum value of $\mu$ that allows for sustained turbulence in a statistical steady state. The rms velocities are weaker with respect to case CH180, but they still resemble qualitatively those encountered in real turbulence. Although not shown, the de-correlation times for $U$ are similar to those for case CH180. Figure~\ref{fig:stats_parametric_1}(f) shows that $U(z,y,t)$ is modally unstable $\sim$60\% of the time based on $\sigma_{\mathrm{max}}>u_\tau/h/4$. The percentage is below the value obtained for case CH180 ($\sim$80\%), which suggests that not all the modal instabilities are necessary to maintain turbulence with realistic one-point statistics. Finally, a different numerical experiment is performed by including a linear damping into the equation for the fluctuating velocities, i.e.,~$f_i=-\mu' u_i'$, $i=1,2,3$. In this new set-up, we directly target the eigenvalues of $A$, whose real parts are reduced exactly by $\mu'$ compared to the eigenvalues of $A$ for CH180. The maximum value of $\mu'$ that allows for sustained turbulence is found to be $\mu'_c \approx 1 u_\tau/h$. The resulting flow statistics for $\mu'$ that is marginally above and marginally below $\mu'_c$ (Figure \ref{fig:stats_parametric_2}) yield similar conclusions as those reported above: turbulence only survives when $A$ is modally unstable (based on $\sigma_{\mathrm{max}}>u_\tau/h/4$) for a substantial fraction of the time simulated, in this case for $\sim$50\% of the time when $\mu' = 0.9 h/u_\tau < \mu'_c$. \begin{figure} \begin{center} \subfloat[]{ \includegraphics[width=0.31\textwidth]{Umean_19.eps} } \hspace{0.05cm} \subfloat[]{ \includegraphics[width=0.31\textwidth]{rms_19.eps} } \hspace{0.05cm} \subfloat[]{ \includegraphics[width=0.31\textwidth]{sigma_0.06uvwp_Q.eps} } \end{center} \begin{center} \subfloat[]{ \includegraphics[width=0.31\textwidth]{Umean_18.eps} } \hspace{0.05cm} \subfloat[]{ \includegraphics[width=0.31\textwidth]{rms_18.eps} } \hspace{0.05cm} \subfloat[]{ \includegraphics[width=0.31\textwidth]{sigma_0.05uvwp_Q.eps} } \end{center} \caption{ Experiment with linear drag on $\boldsymbol{u}'$: (a,d) Mean velocity profile for case CH180 (black dashed line) and channel with linear damping $-\mu' u'_i$ (solid red line). (b,e) Root-mean-squared fluctuating velocities for case CH180 (dashed lines) and channel with $-\mu' u'_i$ (symbols). Lines and symbols are: dashed and squares, streamwise; dashed-dotted and circles, wall-normal; dotted and triangles, spanwise velocity fluctuations. (c,g) Time evolution of the maximum growth rate of $A$ for channel flow with linear damping $-\mu' u'_i$. (a,b,c) are for $\mu'=1.1 u_\tau/h>\mu_c'$ and (d,e,f) are for $\mu'= 0.9 u_\tau/h<\mu_c'$. \label{fig:stats_parametric_2}} \end{figure} \section{Conclusions}\label{sec:conclusions} We have studied the mechanism of energy injection from the mean flow to the fluctuating velocity necessary to maintain wall turbulence. This process is believed to be correctly represented by the linearized Navier--Stokes equations, and three potential linear mechanisms have been considered, namely, modal instability of the streamwise mean cross-flow $U(y,z,t)$, non-modal transient growth, and non-modal transient growth supported by parametric instability. We have designed three numerical experiments of plane turbulent channel flow with additional forcing terms aiming to neutralize one or various linear mechanisms for energy extraction. To assess the effect of modal instabilities and non-modal transient growth of $U(y,z,t)$, we have computed turbulent channel flows with prescribed modally stable/unstable mean cross-flows frozen in time. In addition, transient growth with parametric instability was evaluated by adding a linear damping to the momentum equation of the mean cross-flow or to the fluctuation equations. This additional linear damping was chosen accordingly to render any modal instabilities stable and thus preclude energy transfer to the fluctuations from modal instabilities. From our preliminary experiments, only cases with mean cross-flows capable of supporting modal instabilities were found to sustain turbulence. However, the question whether such a new turbulence complies with the same physical mechanisms as those occurring in actual (unforced) turbulence remains unanswered. On the other hand, cases exclusively supported by transient growth decayed until laminarization. For this preliminary study, this outcome should not be taken as a demonstration that transient growth alone aided or not by parametric instability is unable to maintain turbulence in actual flows, but just as an indication that we could not find a self-sustained turbulent system without the contribution of modal instabilities. Future work will be devoted to the careful design of modified turbulent channel flows providing clear causal inference and quantification of the energy injection mechanisms in wall turbulence. Moreover, if indeed modal instability (or other) is the dominant mechanism responsible for transferring energy from the mean flow to the fluctuations, it should be detectable from unforced wall-turbulence simulation (e.g., CH180), and additional efforts will be carried on to analyze DNS data using non-intrusive techniques. \section*{Acknowledgments} The work was supported by NASA under Grant~\#NNX15AU93A and ONR under Grant~\#N00014-16-S-BA10. \section*{Appendix: Stability analysis} \vspace{0.1in} \setcounter{saveequation}{\value{equation}} \stepcounter{saveequation}\setcounter{equation}{0} \renewcommand{\theequation}{A \arabic{equation}} This appendix describes the linear stability analysis of a base mean cross-flow, which is inhomogeneous in two spatial directions. We assume the following velocity field \begin{equation} \bu=\left(U(y,z),0,0\right)+\varepsilon\bu_d, \end{equation} where the base flow $U$ is assumed parallel, steady, and streamwise independent, and $\bu_d$ is the disturbance. Substituting the velocity field into the incompressible Navier--Stokes equations and neglecting the nonlinear terms, we obtain \begin{subequations}\label{ns} \begin{align} \frac{\partial u_d}{\partial x}+\frac{\partial v_d}{\partial y}+\frac{\partial w_d}{\partial z} & =0, \\ \frac{\partial u_d}{\partial t} + U\frac{\partial u_d}{\partial x}+v_d\frac{\partial U}{\partial y} + w_d\frac{\partial U}{\partial z} &= -\frac{\partial p_d}{\partial x} + \nu\nabla^2 u_d, \\ \frac{\partial v_d}{\partial t} + U\frac{\partial v_d}{\partial x} &= -\frac{\partial p_d}{\partial y} + \nu\nabla^2 v_d, \\ \frac{\partial w_d}{\partial t} + U\frac{\partial w_d}{\partial x} &= -\frac{\partial p_d}{\partial z} + \nu\nabla^2 w_d, \end{align} \end{subequations} where $p_d$ is the disturbance pressure. The boundary conditions are no slip and impermeability on the channel walls. In the current study, the stability analysis has been performed only on a half-channel. Therefore, no slip and impermeability were imposed on the channel center, as we are interested only in the instabilities close to the wall. The base flow is periodic along the spanwise direction, and it is often useful to describe it in terms of a truncated Fourier expansion. In such cases, a Floquet analysis is performed with respect to the span \citep[see, e.g.,][]{Karp2014}. Nevertheless, for an arbitrary base flow, such as the one considered here, it is not beneficial to invoke Floquet theory. Therefore, we assume the following form for the disturbance, \begin{equation} \bq_d=\hat{\bq}_d(y,z)e^{\lambda t + i\alpha x}, \end{equation} where $\bq_d=(u_d,v_d,w_d,p_d)^\mathsf{T}$, $\alpha$ is the streamwise wavenumber, and $\lambda$ is the temporal complex eigenvalue. The eigenvalue can be written as $\lambda=\sigma+i\omega$, where $\sigma$ is the growth rate and $\omega$ is the frequency. The linearized equations above are discretized along both inhomogeneous directions using spectral methods. Along the wall-normal direction, a Chebyshev grid is used for $y\in[0,h]$, and along the spanwise direction a Fourier grid is used for $z\in[0,L_z]$. Substituting the disturbance into the linearized equations, they can be rearranged as a generalized eigenvalue problem for the calculation of $\lambda$, \begin{equation} \begin{pmatrix} \mathsfbi{D_x}~&\mathsfbi{D_y}~&\mathsfbi{D_z}~&\mathsfbi{O}\\ \mathsfbi{C}~&\mathsfbi{U_y}~&\mathsfbi{U_z}~&\mathsfbi{D_x}\\ \mathsfbi{O}~&\mathsfbi{C}~&\mathsfbi{O}~&\mathsfbi{D_y}\\ \mathsfbi{O}~&\mathsfbi{O}~&\mathsfbi{C}~&\mathsfbi{D_z} \end{pmatrix} \begin{pmatrix} \ba{c}\tilde{u}_d\\\tilde{v}_d\\\tilde{w}_d\\\tilde{p}_d \ea \end{pmatrix} = \lambda \begin{pmatrix}\mathsfbi{O}~&\mathsfbi{O}~&\mathsfbi{O}~&\mathsfbi{O}\\ -\mathsfbi{I}~&\mathsfbi{O}~&\mathsfbi{O}~&\mathsfbi{O}\\ \mathsfbi{O}~&-\mathsfbi{I}~&\mathsfbi{O}~&\mathsfbi{O}\\ \mathsfbi{O}~&\mathsfbi{O}~&-\mathsfbi{I}~&\mathsfbi{O} \end{pmatrix} \begin{pmatrix}\tilde{u}_d\\\tilde{v}_d\\\tilde{w}_d\\\tilde{p}_d \end{pmatrix}. \end{equation} Here, $\mathsfbi{I}$ is the identity matrix, $\mathsfbi{O}$ is a zero matrix, $\tilde{u}_d$ (and similarly $\tilde{v}_d,\tilde{w}_d,\tilde{p}_d$) is a one-dimensional representation of a two-dimensional vector \begin{equation} \tilde{u}_d=\big(\hat{u}_d(y,z_1),\hat{u}_d(y,z_2),\dots,\hat{u}_d(y,z_{N_z})\big)^\mathsf{T}, \end{equation} and the matrices $\mathsfbi{C}$, $\mathsfbi{U_y}$, $\mathsfbi{U_z}$, $\mathsfbi{D_x}$, $\mathsfbi{D_y}$, and $\mathsfbi{D_z}$ are given by \begin{subequations}\begin{align} \mathsfbi{C} &= i\alpha\;\textnormal{diag}\left(\mathsfbi{U}\right) - \nu\left(\mathsfbi{\bar{I}_z}\otimes\mathsfbi{\bar{D}^2_y} + \mathsfbi{\bar{D}^2_z}\otimes\mathsfbi{\bar{I}_y} - \alpha^2\mathsfbi{\bar{I}_z}\otimes\mathsfbi{\bar{I}_y}\right),\\ \mathsfbi{U_y} &=\textnormal{diag}\left\{\left( \mathsfbi{\bar{I}_z}\otimes\mathsfbi{\bar{D}_y}\right)\mathsfbi{U}\right\},\\ \mathsfbi{U_z} &=\textnormal{diag}\left\{\left( \mathsfbi{\bar{D}_z}\otimes\mathsfbi{\bar{I}_y}\right)\mathsfbi{U}\right\},\\ \mathsfbi{D_x} &=i\alpha\;\mathsfbi{\bar{I}_z}\otimes\mathsfbi{\bar{I}_y},\\ \mathsfbi{D_y} &=\mathsfbi{\bar{I}_z}\otimes\mathsfbi{\bar{D}_y},\\ \mathsfbi{D_z} &=\mathsfbi{\bar{D}_z}\otimes\mathsfbi{\bar{I}_y}, \end{align} \end{subequations} where $\otimes$ is the Kronecker product and $\mathsfbi{U}$ is a one-dimensional representation of $U$ (similarly to $\tilde{u}_d$). The matrices $\mathsfbi{\bar{I}_y}$ and $\mathsfbi{\bar{I}_z}$ are identity matrices of dimensions $N_y\times N_y$ and $N_z\times N_z$, respectively, and $\mathsfbi{\bar{D}_y}$ and $\mathsfbi{\bar{D}_z}$ are matrices that represent derivation with respect to the $y$ and $z$ coordinates, respectively. The eigenvalue problem is solved numerically using the software \textsc{Matlab}, with $N_y=101$ and $N_z=32$. All the calculations were conducted for $\alpha = 2\pi/L_x$. \bibliographystyle{ctr}
\section{Introduction} Lead-acid batteries are the most widely used electrochemical storage technology, with applications including car batteries and off-grid energy supply. Models can improve battery management---for example, by minimising overcharge to extend cycle life. The most rigorous mechanistic approach to battery-cell modelling begins with a detailed microscopic description, wherein the electrolyte and electrodes occupy discrete spatial domains; volume averaging is then performed to produce a macroscopic model \cite{richardson2012multiscale, schmuck2015homogenization, trainham2011flow}. The details are beyond the present scope, but such a homogenization underpins the model presented below. Our development of a detailed macrohomogeneous model of a typical lead-acid battery augments standard approaches by explicitly considering the balance of water, the variation of acid density with molarity, and the distribution of pressure. As well as ensuring thermodynamic consistency and retaining model closure when systems span multiple spatial dimensions~\cite{liu2014solute}, this reveals novel convective phenomena that may occur at high discharge currents. Nondimensionalization of the model helps to assess the relative importances of different multiphysical phenomena within it. This facilitates numerical implementation because it greatly improves the conditioning of the system, and hence improves the speed of computations, by making most dependent variables close to unity. This paper focuses on the development of a detailed nonisobaric physical model of battery discharge. A novel nondimensionalization is presented, which helps to identify the key dimensionless parameters that control the battery's transient response. Finally, a numerical procedure is developed to solve the nonlinear system of partial differential equations comprising the model. The results are fit against experimental discharge data and used to show how discharge capacity depends on C-rate. The nonlinear model shows that the battery response does not satisfy Peukert's law. Instead, the capacity follows one power law at low C-rates, where average acid concentration controls the response, and a different power law at at high C-rates, where overpotentials control the response. We show below that some of the excluded-volume and pressure effects can be neglected in the detailed physical model, on the basis that certain dimensionless factors are small for the particular materials used in the battery considered here. In cases where dimensionless parameters in a model are small or large, asymptotic analysis can be employed, producing simplified, more computationally efficient models that achieve the same level of physical accuracy. The full nonlinear model presented here serves as the baseline for testing a hierarchy of computationally efficient reduced-order models, which will be developed by perturbation expansion in part II. \section{Model} \label{sec:model} \subsection{Unscaled governing system} \label{sec:dim_model} \paragraph{Battery configuration and chemistry} Typically, a valve regulated lead-acid battery comprises six 2 V {cells} wired in series. Figure \ref{fig:lead-acid_geometry} depicts one such {cell}, which consists of five lead ($\ce{Pb}$) electrodes and four lead dioxide ($\ce{PbO_2}$) electrodes, sandwiched alternatingly around a porous, electrically insulating separator to produce eight {electrode pairs}, wired in parallel at the top edge of the electrode pile. \begin{figure} \centering \includegraphics{geometry} \caption{Geometry of a lead-acid cell. {(a)} macroscopic shape and dimensions; {(b)} (half-)widths of electrodes and separator; (c) schematic of a volume element of the porous electrode. The total width of the cell is $8L+l_\text{n}+l_\text{p}$ because $l_\text{n}$ and $l_\text{p}$ are electrode half-widths. Photograph by Ashley Grealish (BBOXX).} \label{fig:lead-acid_geometry} \end{figure} The pile has height $H$, depth $W$, and cross-sectional area $A_\text{cs} = HW$. The negative ($\ce{Pb}$) and positive ($\ce{PbO_2}$) electrodes have half-widths~$l_\text{n}$ and $l_\text{p}$ respectively, and the separator has width $l_\text{sep}$, giving each internal electrode pair total width $L = {l_\text{n}+l_\text{sep}+l_\text{p}}$. The layers repeat periodically, allowing the whole pile to be modelled via analysis of one electrode pair. Some thermal effects have been documented experimentally~\cite{culpin2004thermal, vaccaro1991experiments} and considered theoretically~\cite{gu2002modeling, srinivasan2003analysis}; we assume an isothermal system for simplicity. The electrodes are porous, permeated by an aqueous sulfuric acid ($\ce{H_2SO_4}$) electrolyte that also permeates the separator. The negative and positive half-reactions are \begin{equation}\label{eq:halfreactions} \begin{array}{l} \ce{Pb + HSO_4^- <=>[\text{\tiny discharge}][\text{\tiny charge}] ${\ce{PbSO_4 + H^+ + 2 e^-}}$ }~~\text{and} \\ \ce{PbO_2 + HSO_4^- + 3H^+ + 2e^- <=>[\text{\tiny discharge}][\text{\tiny charge}] ${\ce{PbSO_4 + 2H_2O}}$, } \end{array} \end{equation} respectively. In both reactions, solid lead sulfate ($\ce{PbSO_4}$) forms as bisulfate anions ($\ce{HSO_4^-}$) leave the liquid. Without competitive chemistry, reactions \eqref{eq:halfreactions} would simply reverse during recharge, as indicated. However, some authors~\cite{bernardi1995mathematical, cugnet2011effect, gu2002modeling, newman1997simulation} have observed that {gas evolution} can become important when recharging. To avoid the need for considering such side reactions, the present analysis is limited to discharges. \paragraph{Liquid thermodynamics} In water ($\ce{H_2O}$), $\ce{H_2SO_4}$ dissociates mainly to hydrogen cations ($\ce{H^+}$) and $\ce{HSO_4^-}$; in keeping with prior models~\cite{bernardi1995mathematical, bernardi1993two, gu1987mathematical, gu1997numerical}, speciation to sulfate is neglected. Thus the pore-filling liquid comprises $\ce{H_2O}$, $\ce{HSO_4^-}$, and $\ce{H^+}$, with partial molar volumes $\bar{V}_\text{w}$, $\bar{V}_-$ and $\bar{V}_+$, molar masses $M_\text{w}$, $M_-$, and $M_+$, and equivalent charges $0$, $-1$, and $+1$, respectively. Unscaled variables are denoted with a hat: for example, the species molarities are $\di{c}_\text{w}$, $\di{c}_-$, and $\di{c}_+$. On any scale much larger than the Debye length, local electroneutrality holds in the liquid phase. Both ion concentrations then relate to the $\ce{H_2SO_4}$ molarity $\di{c}$ through \begin{equation}\label{eq:electroneut} \di{c} = {\di{c}_+} = {\di{c}_-}. \end{equation} In an isothermal state, thermodynamic consistency of the liquid volume requires that $\di{c}_\text{w}$ depends on $\di{c}$ alone if the bulk modulus of the liquid is very large~\cite{goyal2017new}, through \begin{equation}\label{eq:cw} \di{c}_\text{w} = \frac{1-\bar{V}_\text{e}\di{c}}{\bar{V}_\text{w}}, \end{equation} where $\bar{V}_\text{e} = \bar{V}_+ + \bar{V}_-$ is the partial molar volume of the acid. Consequently the total liquid molarity $\di{c}_\text{T} = 2\di{c} + \di{c}_\text{w}$ also depends only on $\di{c}$. Acid molarity further determines the mass density $\di{\rho}$ of the liquid, because \begin{equation} \di{\rho} = \di{c}_\text{w} M_\text{w} + \di{c} M = \frac{M_\text{w}}{\bar{V}_\text{w}} + \left( \frac{M_\text{e}}{\bar{V}_\text{e}} - \frac{M_\text{w}}{\bar{V}_\text{w}} \right) \bar{V}_\text{e} \di{c}, \end{equation} in which $M_\text{e} = M_+ + M_-$ stands for the acid's molar mass. Experiments show that $\di{\rho}$ varies almost linearly with $\di{c}$~\cite{chapman1968compilation}, so the partial molar volumes can be assumed constant. The mechanical state of the liquid is described by the external pressure $\di{p}$, while its mixing free energy is parameterized by a thermodynamic Darken factor $\di{\chi} \left( \di{c} \right)$. \paragraph{Balances} The position $\di{x}$ within each electrode pair traverses three subdomains: the negative electrode ($0<\di{x}<l_\text{n}$), separator ($l_\text{n}<\di{x}<L-l_\text{p}$), and positive electrode ($L-l_\text{p}<\di{x}<L$). The model structure is identical in each subdomain. Parameters describing the electrolyte are similar everywhere, while those describing pore geometry generally differ among subdomains; quantities that parameterise reactions differ in the negative- and positive-electrode subdomains, and vanish in the separator. Liquid volume fraction $\di{\varepsilon}$ and reactive solid area per volume $\mathcal{A}$ characterize the homogenized geometry within the electrode pair. In electrode subdomains, deposition (removal) of solid $\ce{PbSO_4}$ on pore surfaces is accompanied by removal (deposition) of solid $\ce{Pb}$ or $\ce{PbO_2}$, so these geometric parameters can generally vary locally. Solid $\ce{PbSO_4}$ does not tend to deposit as a compact thin film, so mechanistic lead-acid battery models usually let $\mathcal{A}$ vary with state of charge~\cite{bernardi1995mathematical, bernardi1993two, gu1987mathematical, gu1997numerical, newman1997simulation}. Since the functionality of this variation is disputed, we instead let the area be constant, following the approach of Liu \textit{et al.}, who showed this is sufficient to model Li/air-battery discharge~\cite{liu2016capacity}. From this perspective $\mathcal{A}$ describes an immobile Gibbs dividing surface that partitions the layers of Pb or $\ce{PbO_2}$ that contribute to the battery's charge state from the current-collecting Pb layer beneath them, which does not. Thus the time change in pore volume relates to the molar volumes of the solid species in scheme \eqref{eq:halfreactions} through \begin{equation}\label{eq:dim_depsdt} \frac{1}{\mathcal{A}} \pd{\di{\varepsilon}}{\di{t}} = - \bar{V}_{\text{PbSO}_4} \di{S}_{\text{PbSO}_4} - \bar{V}_{\text{Pb}} \di{S}_{\text{Pb}} - \bar{V}_{\text{PbO}_2} \di{S}_{\text{PbO}_2}, \end{equation} in which $\bar{V}_k$ is the partial molar volume of species $k$ and $\di{S}_k$ is the rate at which $k$ is generated by interfacial reactions per unit of pore area. After homogenization, the local mass balance of species $k \in \left\{ \text{w}, -, + \right\}$ in the pore-filling liquid phase implies that \begin{equation}\label{eq:dim_cons_c} \pd{}{\di{t}}(\di{\varepsilon} \di{c}_k) = -\di{\nabla}\cdot\di{\bm{N}}_k + \mathcal{A} \di{S}_k, \end{equation} where $\di{\bm{N}}_k$ represents the molar flux of $k$. With electroneutrality condition \eqref{eq:electroneut} and equation of state \eqref{eq:cw}, all three balances \eqref{eq:dim_cons_c} combine to show liquid-volume continuity, \begin{equation}\label{eq:dim_vbox0} \frac{\partial \di{\varepsilon} }{\partial \di{t} } = - \di{\nabla}\cdot\di{\bm{v}}^\square + \mathcal{A} \left( \bar{V}_\text{w} \di{S}_\text{w} +\bar{V}_- \di{S}_- +\bar{V}_+ \di{S}_+ \right), \end{equation} in which $\di{\bm{v}}^\square = \bar{V}_\text{w} \di{\bm{N}}_\text{w} + \bar{V}_- \di{\bm{N}}_- +\bar{V}_+ \di{\bm{N}}_+$ signifies the volume-averaged liquid velocity. Under Faraday's law, ion balances \eqref{eq:dim_cons_c} also combine to demonstrate charge continuity in the liquid, \begin{equation}\label{eq:dim_divi} \di{\nabla}\cdot\di{\bm{i}} = \mathcal{A}\di{j}. \end{equation} Letting $F$ be Faraday's constant, the liquid-phase current density is $\di{\bm{i}} = F ( \di{\bm{N}}_+ - \di{\bm{N}}_- )$ and the current density associated with interfacial charge exchange is $\di{j} = F ( \di{S}_+ - \di{S}_- )$. (Positive $\di{j}$ flows into pores.) Note that any current leaving the liquid at a given location enters the solid there. Thus \begin{equation}\label{eq:dim_divis} \di{\nabla}\cdot\di{\bm{i}}_{\text{s}} = -\mathcal{A} \di{j}, \end{equation} where $\di{\bm{i}}_\text{s}$ is the solid-phase current density. In a general isothermal setting, liquid convection is determined by a momentum balance, such as Cauchy's equation~\cite{liu2014solute,goyal2017new}. This governs the distribution of momentum density $\di{\rho} \di{\bm{v}}$, naturally expressed in terms of the mass-averaged velocity $\di{\bm{v}}$. The kinematic relation \begin{multline}\label{eq:dim_kinematic} \di{\bm{v}} - \di{\bm{v}}^\square = \frac{\bar{V}_\text{e} }{\di{\rho}} \left( \frac{M_\text{e} }{\bar{V}_\text{e} } - \frac{M_\text{w} }{\bar{V}_\text{w} } \right) \left( \di{\bm{N}}_+ - \di{c} \di{\bm{v}}^\square \right) \\ + \frac{\bar{V}_-}{\di{\rho}} \left( \frac{M_\text{w} }{\bar{V}_\text{w}} - \frac{M_- }{\bar{V}_-} \right) \frac{\di{\bm{i}} }{F}, \end{multline} specifies how $\di{\bm{v}}$ must relate to $\di{\bm{v}}^\square$. \paragraph{Flux constitutive laws} Two Onsager--Stefan--Maxwell flux laws govern transport in the liquid phase. The law for the thermodynamic force on water~\cite{goyal2017new} can be inverted \cite{monroe2013continuum} to give \begin{equation}\label{eq:dim_N+} \di{\bm{N}}_+ = -\di{D}^\text{eff} \left(\di{\nabla} \di{c} -\frac{\di{\psi}\di{\nabla} \di{p}}{RT \di{\chi}} \right) + \frac{t_+^\text{w} \di{\bm{i}} }{F} + \di{c} \di{\bm{v}}^\square, \end{equation} where $R$ is the gas constant, $T$ is the absolute temperature, $t^\text{w}_+$ is the cation transference number relative to the water velocity, and $\di{D}^\text{eff}$ is the effective diffusivity of acid in water; the pressure-diffusion factor $\di{\psi}$ depends on $\di{c}$ through \begin{equation} \di{\psi} = \frac{\bar{V}_\text{w} \di{c}_\text{T} M_\text{w} \di{c}_\text{w} M_\text{e} \di{c} }{2 \di{\rho} } \left( \frac{\bar{V}_\text{w}}{M_\text{w}} - \frac{\bar{V}_\text{e} }{M_\text{e} } \right). \end{equation} (To put equation \eqref{eq:dim_N+} in the form given, one must have that $\bar{V}_+ = ( 1 - t^\text{w}_+)\bar{V}_\text{e}$ and $\bar{V}_- = t^\text{w}_+ \bar{V}_\text{e}$~\cite{newman1973restricted}.) The law for the thermodynamic force on cations can be linearly transformed to produce a current/voltage relation: \begin{multline}\label{eq:dim_i} \di{\bm{i}} = - \di{\kappa}^\text{eff} \di{\nabla} \di{\Phi} + \frac{2RT\di{\chi}(1-t^\text{w}_+) \di{\kappa}^\text{eff}}{F\bar{V}_\text{w} \di{c}_\text{T}}\di{\nabla} \ln \di{c} \\ + \frac{\di{\kappa}^\text{eff}}{F \di{c} } \left[ \frac{M_+ \di{c} }{\di{\rho} } - \frac{2 \di{\psi} (1-t^\text{w}_+) }{ \bar{V}_\text{w} \di{c}_\text{T} } \right] \di{\nabla} \di{p}. \end{multline} Here $\di{\kappa}^\text{eff}$ is the effective conductivity; $\di{\Phi}$ is the potential measured by a reversible hydrogen electrode at $\di{p}$~\cite{bizeray2016resolving}. Effective properties appear in equations \eqref{eq:dim_N+} and \eqref{eq:dim_i} because pore connectivity affects apparent transport rates. We let \begin{equation} \di{D}^\text{eff} = \di{D}(\di{c})\di{\varepsilon}^{3/2}~~~\text{and}~~~\di{\kappa}^\text{eff} = \di{\kappa}(\di{c})\di{\varepsilon}^{3/2}, \end{equation} following Bruggeman's tortuosity correlation. The solid phase is electronically but not ionically conductive. Thus the current density there relates to the solid-phase potential, $\di{\Phi}_\text{s}$, through Ohm's law, \begin{equation} \di{\bm{i}}_{\text{s}} = -\sigma^\text{eff} \di{\nabla}\di{\Phi}_{\text{s}}, \end{equation} where $\sigma^\text{eff}$ is the effective conductivity, \begin{equation} \sigma^\text{eff} = \sigma \di{\varepsilon}_{\text{s}}^{3/2}. \end{equation} Here $\sigma^\text{eff}$ is constant because $\di{\varepsilon}_\text{s}$, the volume fraction of nonreacting Pb bounded within electron-exchange surface $\mathcal{A}$, does not vary. Note that $\di{\varepsilon}_\text{s}$ does not count the volume fraction occupied by solid reactants, so $\di{\varepsilon}_\text{s} \neq 1-\di{\varepsilon}$. A constitutive law for liquid stress closes the model \cite{liu2014solute}. Below, terms involving momentum will be shown to be negligible in the first approximation. To analyse the scale of these terms, it will suffice to assume that current density induces a flow with low Reynolds number, in which case the homogenization of Cauchy's equation produces Darcy's law, \begin{equation}\label{eq:dim_Darcy} \di{\bm{v}} = -\frac{\di{\mathcal{K}}}{\di{\mu}}\di{\nabla}\di{p}, \end{equation} in which $\di{\mu}$ is the liquid viscosity; pore geometry determines the Kozeny--Carman permeability $\di{\mathcal{K}}$. \paragraph{Interfacial constitutive laws} Electrons are the only solid-phase charge carrier in scheme \eqref{eq:halfreactions}, making interfacial electronic current a proxy for the half-reaction rates. No interfacial reactions occur in the separator domain, so $\di{j} = 0$ uniformly there and the reactive area $\mathcal{A}$ does not need to be defined there. In an electrode subdomain where a single half-reaction involving $n_\text{e}$ electrons occurs, the molar flux of reactants is $\di{j} / n_\text{e} F$ and hence every $\di{S}_k$ is given by \begin{equation}\label{eq:dim_S+} \di{S}_k = - \frac{s_k \di{j}}{n_\text{e} F}, \end{equation} where $s_k$ is the signed stoichiometric coefficient of species $k$ in the half-reaction. (For a reduction half-reaction, $s_k$ is positive for a product and negative for a reactant.) Relationship \eqref{eq:dim_S+} permits simpler expressions to be used in place of the general material balances \eqref{eq:dim_cons_c}. First, equations \eqref{eq:dim_depsdt}, \eqref{eq:dim_cons_c}, \eqref{eq:dim_vbox0} and \eqref{eq:dim_S+} combine to give \begin{equation}\label{eq:dim_vbox} \di{\nabla}\cdot\di{\bm{v}}^\square = - \frac{ \Delta \bar{V} \mathcal{A} j }{F} . \end{equation} This liquid-phase volume balance introduces the volume of reaction $\Delta \bar{V}$, related to half-reaction stoichiometry by \begin{multline} n_\text{e} \Delta \bar{V} = \bar{V}_\text{w} s_\text{w} + \bar{V}_- s_- + \bar{V}_+ s_+ + \bar{V}_{\text{PbSO}_4} s_{\text{PbSO}_4} \\ + \bar{V}_{\text{Pb}} s_{\text{Pb} } + \bar{V}_{\text{PbO}_2} s_{\text{PbO}_2 }. \end{multline} Second, one can combine equations \eqref{eq:electroneut}, \eqref{eq:dim_depsdt}, \eqref{eq:dim_cons_c}, \eqref{eq:dim_divi}, \eqref{eq:dim_N+}, \eqref{eq:dim_S+}, and \eqref{eq:dim_vbox} to show that the acid is governed by a form of the convective diffusion equation: \begin{multline}\label{eq:dim_saltbal} \pd{}{\di{t}}\left(\di{\varepsilon} \di{c} \right) + \di{\bm{v}}^\square \cdot \di{\nabla} \di{c} = \di{\nabla} \cdot \left[ D^{\text{eff} } \left( \di{\nabla} \di{c} - \frac{\di{\psi} \di{\nabla} \di{p} }{\di{\chi} RT} \right) \right] \\ + \left( s + \di{c} \Delta \bar{V} \right) \frac{\mathcal{A} \di{j} }{F} . \end{multline} The generation term here includes a single additional parameter, \begin{equation} s = -\frac{s_+ + n_\text{e} t_+^\text{w} }{n_\text{e}}. \end{equation} Three aspects of the acid balance \eqref{eq:dim_saltbal} are new. First, the convection term, and second, the volume of reaction $\Delta \bar{V}$, appear because state equation \eqref{eq:cw} imposes constraints on balances \eqref{eq:dim_cons_c}. Finally, a pressure-diffusion term appears because the flux laws are based on thermodynamic forces. To complete the model, the current density $\di{j}$ across the surface $\mathcal{A}$ is governed by a chemical-kinetic constitutive law. Generally such laws involve the voltage difference between the liquid and solid, the equilibrium potential of the half-reaction, and the chemical activities of the reactants. We assume the half-reactions in scheme \eqref{eq:halfreactions} are elementary, following Butler--Volmer kinetics. Butler--Volmer laws naturally include a symmetry factor, which we take to be one half~\cite{gu1987mathematical}, yielding \begin{equation}\label{eq:dim_Butler-Volmer} \di{j} = 2 \di{j}_0\sinh \left( \frac{F \di{\eta} }{RT} \right) + C_{\text{dl}} \frac{\partial ( \di{\Phi}_\text{s} - \di{\Phi} ) }{\partial \di{t} } , \end{equation} where $\di{j}_0$ is the concentration-dependent exchange-current density, \begin{equation}\label{eq:dim_j0} \di{j}_0 = j^{\text{ref}} \left( \frac{\di{c} }{c^{\text{ref}} } \right)^{ \left| \frac{s_+}{n_{\text{e}}} \right| + \left| \frac{s_-}{n_{\text{e}}} \right| } \left( \frac{\di{c}_{\text{w}} }{c_{\text{w}}^{\text{ref}} } \right)^{\left| \frac{s_\text{w}}{n_{\text{e}}} \right| } , \end{equation} and $\di{\eta}$ is the surface overpotential \begin{equation}\label{eq:eta} \di{\eta} = \di{\Phi}_{\text{s}} - \di{\Phi} - \di{U}. \end{equation} Here $\di{U}$ stands for the half-reaction's open-circuit potential (OCP) relative to a particular reference electrode. (The reference must be the same for all half-reactions.) Terms involving interfacial capacitance $C_{\textrm{dl}}$ help to smooth out numerics, but have a negligible effect on model predictions because the capacitive time-scale is very short~\cite{srinivasan2003mathematical}. \paragraph{Boundary conditions} Equations \eqref{eq:dim_depsdt}, \eqref{eq:dim_divi} to \eqref{eq:dim_kinematic}, and \eqref{eq:dim_i} to \eqref{eq:eta} comprise a three-dimensional model with closure at every interior point in an electrode pair. Symmetry and insulating boundary conditions demand that no species in the liquid phase flows through the centers, sides, and bottom of the electrode pair, so \begin{multline}\label{eq:no-flux_sides} \di{\bm{N}}_+\cdot\bm{n} = \di{\bm{i}}\cdot\bm{n} = \di{\bm{v}}^\square\cdot\bm{n} = 0 \\ \text{ at $\di{x}=0,L$, $\di{y}=0,W$ and $\di{z}=0$.} \end{multline} Kinematic relation \eqref{eq:dim_kinematic} shows that $\di{\bm{v}}\cdot\bm{n} = 0$ at these boundaries too. Flux laws \eqref{eq:dim_N+}, \eqref{eq:dim_i}, and \eqref{eq:dim_Darcy} further require the surface-normal gradients $\partial \di{c}/\partial n$, $\partial \di{p}/\partial n$ and $\partial \di{\Phi}/\partial n$ to vanish at these boundaries. Above the electrodes, there is a region of free electrolyte, with height $\di{h}(\di{t})$. At the top surface of this region, we impose a known external pressure $\di{p}_\text{ext}$, and the absence of flux relative to the surface, which moves with velocity ${\bm{\di{v}}^\text{head} = \left(\partial\di{h}/\partial\di{t}\right)\bm{e}_z}$: \begin{multline}\label{eq:top_bcs} \left(\bm{\di{N}}_+-\bm{\di{v}}^\text{head}\di{c}\right)\cdot\bm{n}=\bm{\di{i}}\cdot\bm{n}=\left(\bm{\di{v}^\square}-\bm{\di{v}}^\text{head}\right)\cdot\bm{n}=0, \\\di{p} = \di{p}_\text{ext}, \quad \text{ at $\di{z} = H+\di{h}(\di{t})$}. \end{multline} Note the final condition in \eqref{eq:top_bcs} determines the \textit{a priori} unknown height $\di{h}(\di{t})$. Hereafter, subscripts $\text{n}$ and $\text{p}$ denote property values in the negative- and positive-electrode subdomains. We choose the negative electrode to be the ground state, and define the cell voltage to be the potential at the positive electrode tab: \begin{equation} \di{\Phi}_{\text{s}} = \begin{cases} 0 &\quad \hat{\bm{x}} \in \text{tab}_\text{n}, \\ \di{V}(\di{t}) &\quad \hat{\bm{x}} \in \text{tab}_\text{p}. \end{cases} \end{equation} One can either control the voltage, or consider a current-controlled discharge where the voltage is determined by \begin{equation}\label{eq:is_BC} - \myint{\text{tab}_\text{n}}{}{\di{\bm{i}}_{\text{s}}\cdot\bm{n}}{S} = \myint{\text{tab}_\text{p}}{}{\di{\bm{i}}_{\text{s}}\cdot\bm{n}}{S} = \mathrm{\di{I}}_\text{circuit}(\di{t})/8, \end{equation} where $\di{\mathrm{I}}_\text{circuit}$ is the current drawn from the battery, which is positive for a discharge; the factor of 8 appears because the cell comprises eight electrode pairs in parallel. This paper focuses on experiments under `galvanic control', following condition \eqref{eq:is_BC}, which allow $\di{\mathrm{I}}_\text{circuit} \left( \di{t} \right)$ to be any function of time. Since six cells are connected in series, the voltage in the external circuit is $\di{V}_\text{circuit} =6\di{V}$. \paragraph{Relationships between subdomains} The liquid phase permeates all three subdomains. Therefore scalar variables $\di{c}$, $\di{p}$, and $\di{\Phi}$, as well as the normal components of all flux vectors, are continuous across electrode/separator boundaries. There is no solid-phase current at either edge of the separator subdomain or pore-surface charge exchange within it, so $\di{{i}}_\text{s}$ vanishes uniformly there. Since the separator subdomain electronically isolates the positive and negative electrodes, $\di{\Phi}_\text{s}$ is not continuous across it. Integrating the interfacial current distributions in equation \eqref{eq:dim_divis} and applying the divergence theorem, boundary conditions \eqref{eq:is_BC} and the fact that $\di{{i}}_\text{s}$ vanishes at the electrode/separator interfaces leads to integral constraints, \begin{multline}\label{eq:dim_j_BC} \myint{0}{H}{ \!\myint{0}{W}{ \!\myint{0}{l_\text{n}}{\mathcal{A}_\text{n}\di{j}_\text{n}}{\di{x}} }{\di{y}} }{\di{z}} \\ = -\myint{0}{H}{ \!\myint{0}{W}{ \!\myint{L-l_\text{p}}{L}{\mathcal{A}_\text{p}\di{j}_\text{p}}{\di{x}} }{\di{y}} }{\di{z}} = \di{\mathrm{I}}_\text{circuit}/8. \end{multline} In short, these say that the total current leaving the negative electrode domain must enter the positive electrode domain. Expressions~\eqref{eq:dim_j_BC} will help to analyze the scales of pressure and velocity in \eqref{eq:v_p_scales}. \paragraph{Initial conditions} The initial electrolyte concentration and electrode porosities are spatially uniform, but depend on the state of charge, $q$, which we define as \begin{equation}\label{eq:SOC_defn} q = q^0 - \frac{1}{q^\text{max}}\myint{0}{\di{t}}{\mathrm{I}_\text{circuit}(s)}{s}. \end{equation} Let $c^\text{max}$, $\varepsilon^\text{max}_\text{n}$ and $\varepsilon^\text{max}_\text{p}$ be the values of electrolyte concentration, negative electrode porosity, and positive electrode porosity, respectively, at full state of charge. In a lead-acid battery, the state of charge is closely linked to the concentration of the electrolyte. Hence $q$ is chosen to be unity when the concentration of the electrolyte is at its maximum value, $c^\text{max}$, and zero when the concentration of the electrolyte is zero, so that the initial conditions are \begin{equation}\label{eq:dim_ICs} \di{c} = \di{c}^0 = c^\text{max}q^0, \quad \di{\varepsilon} = \di{\varepsilon}^0 = \varepsilon^\text{max}-\varepsilon^\Delta(1-q^0) \quad \text{ at $\di{t}=0$}. \end{equation} Parameters $q^\text{max}$ and $\varepsilon^\Delta$ are chosen to make \eqref{eq:SOC_defn} and \eqref{eq:dim_ICs} consistent with \eqref{eq:dim_saltbal} and \eqref{eq:dim_depsdt} (see \ref{app:params} for details): \begin{align} q^\text{max} &= \frac{8FA_\text{cs}\left(l_\text{n}\varepsilon_\text{n}^\text{max} + l_\text{sep}\varepsilon_\text{sep}^\text{max} + l_\text{p}\varepsilon_\text{p}^\text{max}\right) c^\text{max}}{s_\text{p}-s_\text{n}}, \label{eq:Qmax}\\ \varepsilon^\Delta &= \frac{\Delta\bar{V}^\text{surf}q^\text{max}}{16FA_\text{cs}l} \end{align} Finally, because interfacial capacitance effects are included, initial conditions are needed for the potentials; we choose spatially homogeneous values such that $\di{j}=0$ at $\di{t}=0$: \begin{subequations} \begin{align} &\di{\Phi} = - \di{U}_{\ce{Pb}}(\di{c}^0), \\ &\di{\Phi}_{\text{s}} = \begin{cases} 0, \quad &0<\di{x}<l_\text{n}\\ \di{U}_{\ce{PbO_2}}(\di{c}^0) - \di{U}_{\ce{Pb}}(\di{c}^0), \quad &L-l_\text{p}<\di{x}<L. \end{cases} \end{align} \end{subequations} \subsection{Dimensionless model} \label{sec:nondim} Nondimensionalization of the system presented in the Unscaled governing system section helps to determine the dominant effects in the system. If $\partial \di{h}/\partial \di{t}$ is sufficiently small and the electrode conductivity is sufficiently high, one can assume uniformity in the plane normal to $\di{x}$, reducing the problem to one spatial dimension. In this case, the tabs cover the whole electrodes at $\di{x}=0$ and $\di{x}=L$, and so the boundary condition \eqref{eq:is_BC} becomes \begin{equation}\label{eq:is_BC_1D} \di{\bm{i}}_{\text{s}}\cdot\bm{e}_x = \mathrm{\di{i}}_\text{cell}(\di{t}) = {\mathrm{\di{I}}_\text{circuit}}/{8A_\text{cs}} \quad \text{ at } \di{x} = 0, L, \end{equation} which introduces the variable $\di{i}_\text{cell}$ to stand for the total current density at the cell level. Let $\di{N}_+$, $\di{i}$, $\di{i}_\text{s}$, $\di{v}^\square$ and $\di{v}$ represent the $\di{x}$-components of vectors $\di{\bm{N}}_+$, $\di{\bm{i}}$, $\di{\bm{i}}_\text{s}$, $\di{\bm{v}}^\square$ and $\di{\bm{v}}$. A first set of dimensionless variables is formed by the natural rescalings \begin{subequations}\label{eq:nondimensionalization_scales} \begin{equation}\label{eq:main_nondimensionalization_scales} {{x}} = \di{{x}}/L, \quad ({{i}},{{i}}_\text{s}) = (\di{{i}}, \di{{i}}_\text{s})/\bar{i}, \quad c = \di{c}/c^\text{max}, \quad {\varepsilon} = \di{\varepsilon}, \end{equation} where $\bar{i} = \max\limits_{\di{t}}\left(\di{\mathrm{i}}_\text{cell}(\di{t})\right)$. Reduce the number of parameters by identifying the scale of interfacial current density, $\bar{i}/\mathcal{A}L$, and discharge time-scale, $c^\text{max}FL/\bar{i}$. Hence nondimensionalize interfacial current density, exchange-current density, and time as \begin{align} (j_\text{n}, {j}_{0,\text{n}}) &= (\di{j}_\text{n}, \di{j}_{0,\text{n}}) \left/\frac{\bar{i}}{\mathcal{A}_\text{n}L}\right., \\ (j_\text{p}, {j}_{0,\text{p}}) &= (\di{j}_\text{p}, \di{j}_{0,\text{p}}) \left/\frac{\bar{i}}{\mathcal{A}_\text{p}L}\right., \\ t &= \di{t}\left/\frac{c^\text{max}FL}{\bar{i}}\right.. \end{align} \end{subequations} After nondimensionalization, ${j}_{0,\text{n}}$ and ${j}_{0,\text{p}}$ are $\mathcal{O}(1)$ functions. To nondimensionalize the potentials, note that the dominant exponents in the hyperbolic-sine terms of \eqref{eq:dim_Butler-Volmer} should be $\mathcal{O}(1)$, since the terms multiplying the {sinh} functions are all $\mathcal{O}(1)$. Equation \eqref{eq:OCPs_split} can be exploited to define the dimensionless open-circuit potentials \begin{subequations} \begin{align} {U}_{\ce{Pb}}(c) &= \frac{F}{RT}\left(\di{U}_{\ce{Pb}}(\di{c}) - U^\ominus_{\ce{Pb}}\right)~~~\textrm{and} \\ {U}_{\ce{PbO_2}}(c) &= \frac{F}{RT}\left(\di{U}_{\ce{PbO_2}}(\di{c}) - U^\ominus_{\ce{PbO_2}}\right). \end{align} \end{subequations} Then, to ensure that the exponents in equation \eqref{eq:dim_Butler-Volmer} are $\mathcal{O}(1)$ and noting that $\di{\Phi}_\text{s} = 0$ at $\di{x} = 0$, introduce the dimensionless potentials \begin{subequations} \begin{align}\label{eq:potential_nondimensionalization_scales} \Phi &= \frac{F}{RT}\left(\di{\Phi} + U_{\ce{Pb}}^\ominus\right), \\ {\Phi}_{\text{s}} &= \begin{cases} \frac{F}{RT}\di{\Phi}_{\text{s}}, \quad &0<\di{x}<l_\text{n}\\ \frac{F}{RT}\left(\di{\Phi}_{\text{s}} - U_{\ce{PbO_2}}^\ominus + U_{\ce{Pb}}^\ominus\right), \quad &L-l_\text{p}<\di{x}<L. \end{cases} \end{align} \end{subequations} Quantities $\di{D}$ (and hence $\di{D}^\text{eff}$) and $\di{c}_\text{w}$ are appropriately scaled with their values at $c=c^\text{max}$: \begin{align} D(c) = \di{D}(\di{c})/D^\text{max}, \quad c_\text{w}(c) = \di{c}_\text{w}(\di{c})/c_\text{w}^\text{max}, \end{align} where $D^\text{max} = \di{D}(c^\text{max})$ and $c_\text{w}^\text{max} = \di{c}_\text{w}(c^\text{max})$. The conductivity and Darken thermodynamic factor rescale as \begin{align} &\kappa(c) = \frac{RT\hat{\kappa}(\hat{c})}{F^2{D}^\text{max}{c}^\text{max}},\quad \chi(c) = \frac{ 2(1-t^\text{w}_+)\hat{\chi}(\hat{c}) }{ 1 -\alpha c }, \end{align} where the quantity ${\alpha = -(2\bar{V}_\text{w} - \bar{V}_\text{e})c^\text{max}}$ is defined by Liu \textit{et al.}~\cite{liu2014solute} as the excluded-volume number. In equation \eqref{eq:dim_j0} for the exchange-current density, the reference concentrations are taken to be ${\di{c}^\text{ref} = \di{c}^\text{max}}$ and ${\di{c}_{\text{w}}^{\text{ref}} = \di{c}_\text{w}^\text{max}}$. The dimensionless widths of the negative electrode, separator and positive electrode become $\ell_\text{n} = l_\text{n}/L$, $\ell_\text{sep} = l_\text{sep}/L$, and $\ell_\text{p} = l_\text{p}/L$, respectively. In the velocity equations \eqref{eq:dim_vbox}, \eqref{eq:dim_Darcy} and \eqref{eq:dim_kinematic}, $\di{\rho}$ and $\di{\mu}$ are scaled with their values at $c^\text{max}$, and $\di{\mathcal{K}}$, with $d^2$, where $d$ is the characteristic pore size. The reaction velocity scale is $v^\text{rxn} = \bar{i}/c^\text{max}F$, and the Darcy pressure scale $\mu^\text{max}v^\text{rxn}L/d^2$, so that \begin{subequations} \begin{align}\label{eq:v_p_scales} \left(v^\square,v\right) &= \left(\di{v}^\square, \di{v}\right)\left/\frac{\bar{i}}{c^\text{max}F}\right., \\ \quad p &= \left(\di{p}-p^\text{ref}\right)\left/\frac{\mu^\text{max}v^\text{rxn}L}{d^2}\right., \end{align} \end{subequations} where $p^\text{ref}$ is a reference pressure (e.g. atmospheric). This scaling transforms the equations governing $v^\square$, $v$ and $p$ to \begin{subequations} \begin{align} \pd{v^\square}{x} &= \beta j, \label{eq:vbox}\\ v &= -\frac{\mathcal{K}}{\mu}\pd{p}{x}, \label{eq:Darcy} \\ {\rho}\left({{v}} - {{v}}^\square\right) &= - \frac{\omega_c}{\mathcal{C}_\text{d}}D^\text{eff}\pd{c}{x}+ \omega_ii,\label{eq:kinematic} \end{align} \end{subequations} in which the dimensionless parameters $\beta$, $\omega_c$ and $\omega_i$ are defined in Table \ref{tab:dimless_params}. Further, the effect of pressure gradients in equations \eqref{eq:dim_i} and \eqref{eq:dim_saltbal} is smaller than the effect of concentration gradients (ignoring the $\mathcal{O}(1)$ functions of concentration $\chi$ and $\psi$) by a factor of \begin{equation} \pi_\text{os} = \frac{\mu^\text{max}v^\text{rxn}L}{d^2RTc^\text{max}}. \end{equation} Since $\beta$ takes different values in the two electrodes, equation \eqref{eq:vbox} does not admit a solution where $v^\square$ vanishes at both electrode centers. However, as can be seen in Table \ref{tab:dimless_params}, the dimensionless parameters $\beta$ and $\pi_\text{os}$ are small. We assume a limit where both of these parameters are zero (and hence $\partial \di{h}/\partial \di{t} = 0$), in which case $v^\square$ vanishes everywhere, and $v$ and $p$ decouple from the other variables. The full model can then be solved to find the voltage without needing the velocity and pressure.\footnote{The limit of finite $\beta$ will be explored in a future, two-dimensional, model.} Having decoupled flow velocity and pressure from the rest of the model, the following dimensionless system for $c$, $j$, $\varepsilon$, ${i}$, $\Phi$, ${i}_\text{s}$ and $\Phi_\text{s}$ results: \begin{subequations}\label{eq:summary} \begin{align} \pd{}{t}(\varepsilon c) &= \frac{1}{\mathcal{C}_\text{d}}\pd{}{x}\left(D^\text{eff}\pd{c}{x}\right) + sj, \label{eq:dcdt}\\ \pd{\varepsilon}{t} &= -\beta^\text{surf}j, \label{eq:depsdt}\\ \pd{i}{x} &= j, \label{eq:didx}\\ \mathcal{C}_\text{d}\,{i} &= \kappa^\text{eff}\left(\chi\pd{\ln(c)}{x} - \pd{\Phi}{x}\right), \label{eq:i}\\ \pd{i_{\text{s}}}{x} &= -j, \label{eq:disdx}\\ {i}_{\text{s}} &= -\iota_{\text{s}}\pd{\Phi_{\text{s}}}{x}, \label{eq:is}\\ j &= 2{j}_0\sinh\left(\Phi_\text{s}-\Phi-U(c)\right) + \gamma_{\text{dl}}\pd{}{t}\left(\Phi_\text{s}-\Phi\right), \label{eq:j} \end{align} with boundary conditions \begin{align} \Phi_{\text{s}} = \pd{c}{x} = i = 0, \quad i_\text{s} = \mathrm{i}_\text{cell} \quad &\text{ at } x = 0, 1, \label{eq:BCs_collectors}\\ i_\text{s} = 0 \quad &\text{ at } x = \ell_\text{n}, 1-\ell_\text{p}.\label{eq:BCs_separator} \end{align} and initial conditions \begin{align}\label{eq:ICs} c &= q^0, \\ {\varepsilon} &= \varepsilon^\text{max}-\varepsilon^\Delta(1-q^0), \\ {\Phi} &= - {U}_{\ce{Pb}}(q^0), \\ {\Phi}_{\text{s}} &= \begin{cases} 0, \quad &0<{x}<\ell_\text{n}\\ {U}_{\ce{PbO_2}}\left({c}^0\right) - {U}_{\ce{Pb}}\left({c}^0\right), \quad &1-\ell_\text{p}<{x}<1. \end{cases} \end{align} Integral condition \eqref{eq:dim_j_BC} nondimensionalizes to \begin{equation}\label{eq:j_bc} \myint{0}{\ell_\text{n}}{{j}_\text{n}}{\di{x}} = -\myint{1-\ell_\text{p}}{1}{{j}_\text{p}}{\di{x}} = i_\text{cell}. \end{equation} \end{subequations} Composition dependences of the properties $D^\textrm{eff}$, $\chi$, $\kappa^\textrm{eff}$, $j_0$, $U_{\textrm{Pb}}$, and $U_{\textrm{PbO}_2}$ are established through the functions listed in table \ref{tab:dim_functions}. The four dominant dimensionless parameters, $\mathcal{C}_\text{d}$, $\iota_\text{s}$, $\beta^\text{surf}$ and $\gamma_\text{dl}$, are defined in Table \ref{tab:dimless_params}, which also states physical interpretations and typical values. In particular, the diffusional C-rate can be written as \begin{equation} \mathcal{C}_\text{d} ={L^2/D^\text{max}}\times\frac{Q}{8A_\text{cs}c^\text{max}FL}\times\frac{8A_\text{cs}\bar{i}}{Q}, \end{equation} where ${8A_\text{cs}c^\text{max}FL}$ is the volumetric capacity of the battery (in Ah), $Q$ is the capacity of the battery (in Ah), and ${\mathcal{C} = 8A_\text{cs}\bar{i}/Q}$ is the C-rate of operation. Alternatively, one can identify $\mathcal{C}_\text{d}$ to be the ratio between the applied current scale, $\bar{i}$, and the scale of the liquid-phase limiting current, $i_\text{L} = c^\text{max}D^\text{max}F/L$. In the Results section, $q^0$ will be taken to be unity (the battery starts from a fully charged state) unless explicitly stated. \renewcommand{\arraystretch}{2.5} \begin{table*}[t] \centering \begin{tabular}{|c|c|c|c c c|} \hline \multirow{2}{*}{Parameter} & \multirow{2}{*}{Definition} & \multirow{2}{*}{Interpretation} & \multicolumn{3}{c|}{Value} \\ \cline{4-6} & & & n & sep & p \\ \hline $\mathcal{C}_\text{d}$ & \(\displaystyle \frac{\bar{i}}{c^\text{max}D^\text{max}F/L} \) & \tablewordfrac{applied current density}{limiting current density} & \multicolumn{3}{c|}{$0.60\mathcal{C}$} \\ $\iota_\text{s}$ & \(\displaystyle \frac{\sigma^\text{eff} RT/FL}{\bar{i}} \) & \tablewordfrac{Ohmic current scale}{applied current density} & $3.8\times10^4/\mathcal{C}$ & - & $55/\mathcal{C}$ \\ $\beta^\text{surf}$ & \(\displaystyle -\frac{c^\text{max}}{n_\text{e}}\sum_{k\in\{\ce{PbSO_4}, \ce{Pb}, \ce{PbO_2}\}}\bar{V}_ks_k \) & \makecell{Change in porosity \\ associated with local half-reaction \\ going to completion} & $0.084$ & - & $-0.064$ \\ $\beta$ & \(\displaystyle -c^\text{max}\Delta \bar{V} \) & \makecell{Change in acid volume fraction \\ associated with local half-reaction \\ going to completion} & $0.033$ & - & $0.040$ \\ $\gamma_\text{dl}$ & \(\displaystyle \frac{C_\text{dl}RT\mathcal{A}L/F\bar{i}}{c^\text{max}FL/\bar{i}} \) & \tablewordfrac{capacitance time-scale}{discharge time-scale} & $2.1\times10^{-5}$ & - & $1.7\times10^{-4}$ \\ $\omega_c$ & \(\displaystyle \frac{c^\text{max}M_\text{e}}{\rho^\text{max}}\left(1-\frac{M_\text{w}\bar{V}_\text{e}}{M_\text{e}\bar{V}_\text{w}}\right)\) & \makecell{Diffusive kinematic \\ relationship coefficient} & \multicolumn{3}{c|}{$0.70$}\\ $\omega_i$ & \(\displaystyle \frac{c^\text{max}M_\text{e}}{\rho^\text{max}}\left(t_+^\text{w}+\frac{M_-}{M_\text{e}}\right)\) & \makecell{Migrative kinematic \\ relationship coefficient} & \multicolumn{3}{c|}{$0.41$}\\ $\pi_\text{os}$ & \(\displaystyle \frac{\mu^\text{max}v^\text{rxn}L/d^2}{RTc^\text{max}} \) & \tablewordfrac{viscous pressure scale}{osmotic pressure scale} & \multicolumn{3}{c|}{$3.6\times10^{-5}\mathcal{C}$}\\ \hline \end{tabular} \caption{Dimensionless parameters, relative to the C-rate, $\mathcal{C} = 8A_\text{cs}\bar{i}/Q$. $\mathcal{C}_\text{d}$ is the diffusional C-rate.} \label{tab:dimless_params} \end{table*} \section{Numerical solution} \label{sec:sol_num} The system of equations \eqref{eq:summary} was solved numerically. Code used to solve the model and generate the results below is available publicly on GitHub \cite{valentin_sulzer_2019_2554000}. To facilitate numerical solution, the model was first manipulated into a form suitable for application of the Finite Volume Method. Letting $\phi = \Phi_\text{s}-\Phi$ and noting that $i_\text{s} = \mathrm{i}_\text{cell} - i$, one can replace equations \eqref{eq:i} to \eqref{eq:is} with \begin{subequations}\label{eq:is_Delta_substitution} \begin{align} {\mathcal{C}_\text{d}\,{i}} &= \kappa^\text{eff}\left(\chi\pd{\ln(c)}{x} - \pd{\Phi}{x}\right), \\ \mathrm{i}_\text{cell} - i &= -\iota_\text{s}\pd{}{x}(\phi + \Phi). \end{align} \end{subequations} We also eliminate $\partial \Phi/\partial x$ from equation \eqref{eq:is_Delta_substitution} to find $i$ as a functional of $c$ and $\phi$: \begin{subequations}\label{eq:numerical_summary} \begin{equation}\label{eq:i_functional_c_xi} i = \kappa^\text{eff}\frac{\chi\pd{\ln(c)}{x} + \pd{\phi}{x} + \mathrm{i}_\text{cell}/\iota_\text{s}}{\mathcal{C}_\text{d} + \kappa^\text{eff}/\iota_\text{s}}. \end{equation} The result is a closed system of PDEs for $c$, $\varepsilon$ and $\phi$: \begin{align} \pd{}{t}\left(\varepsilon c\right) &= \frac{1}{\mathcal{C}_\text{d}}\pd{}{x}\left(D^\text{eff}\pd{c}{x}\right) + sj,\\ \pd{\varepsilon}{t} &= -\beta^\text{surf}j, \\ \pd{\phi}{t} &= \frac{1}{\gamma_{\text{dl}}}\left(j - 2{j}_0\sinh\left[\phi - {U}(c)\right]\right) \end{align} where $j = \partial i/\partial x$ is given by equation \eqref{eq:i_functional_c_xi} in each electrode and vanishes in the separator, with boundary conditions \begin{align} \pd{c}{x} = i = 0 \quad &\text{ at } x = 0, 1. \\ i = \mathrm{i}_\text{cell} \quad &\text{ at } x = \ell_\text{n}, 1-\ell_\text{p}, \end{align} and initial conditions derived from \eqref{eq:ICs}. Equation system \eqref{eq:numerical_summary} is solved by discretising the spatial domain using Finite Volumes, choosing the spatial discretisation to be uniform within each subdomain and as uniform as possible across subdomains The results are robust to the total number of points chosen Having discretised in space, the resulting system of transient ordinary differential equations is solved using \texttt{scipy.integrate} in Python \cite{scipy}. Finally, $\Phi$ is calculated as \begin{equation} \Phi = \myint{0}{x}{\left({\chi}\pd{\ln(c)}{x} - \mathcal{C}_\text{d}\frac{i}{\kappa^\text{eff}}\right)}{x} - \left.\phi\right\rvert_{x=0}, \end{equation} where the final term comes from the fact that $\Phi = -\phi$ at $x=0$. The voltage drop across the electrode pair is computed with \begin{equation} V = \left.\Phi_\text{s}\right\rvert_{x=1} = \left.\left(\phi + \Phi\right)\right\rvert_{x=1}. \end{equation} \end{subequations} Crucially, the system of partial differential equations \eqref{eq:numerical_summary} is much easier to solve than the differential-algebraic system \eqref{eq:summary}. \section{Results} \label{sec:results} \begin{figure} \centering \includegraphics{compare_voltages_numerical} \caption{Comparing voltages for a constant-current discharge using the parameters from literature (Table \ref{tab:dim_params}), for a range of C-rates.} \label{fig:voltages_numerical} \end{figure} Figure \ref{fig:voltages_numerical} shows the (dimensional) voltage against capacity used for a range of C-rates. As is to be expected, the total capacity available decreases as the C-rate increases. This dependence is further elucidated by exploring the total capacity of the battery for constant-current discharges across a higher range of C-rates, summarized on Figure \ref{fig:Peukert}. By Peukert's Law, one would expect the graph to be linear on this log-log axis. However, in this case deviations from linearity occur because there are two distinct capacity-limiting mechanisms. At low C-rates (below 1C), the battery capacity is concentration-limited, with full discharge occurring when the electrolyte concentration reaches zero. At high C-rates, the battery is voltage-limited, because the cut-off voltage of 10.5V is achieved before the bulk concentration falls to zero. \begin{figure} \centering \includegraphics{capacities} \caption{Battery capacity against C-rate, using the parameters from literature (Table \ref{tab:dim_params}).} \label{fig:Peukert} \end{figure} \def 0.1C {0.1C} \def 0.5C {0.5C} \def 2C {2C} \begin{figure*}[t] \centering \includegraphics{compare_concentrations_numerical} \caption{Electrolyte and water concentrations at various States of Charge (SOCs) for a constant-current discharge using the parameters from literature (Table \ref{tab:dim_params}), for a range of C-rates. Opacity increases with decreasing SOC.} \label{fig:compare_concentrations_numerical} \end{figure*} The model also allows internal variables to be explored, particularly the local water concentration. Electrolyte and water concentrations are depicted in Figure \ref{fig:compare_concentrations_numerical}. At a very low C-rate of 0.1C~(Figure \ref{fig:compare_concentrations_numerical}a), both concentrations remain almost uniform throughout the discharge; electrolyte concentration decreases, and water concentration increases proportionally. At a higher C-rate of 0.5C~(Figure \ref{fig:compare_concentrations_numerical}b) and 2C~(Figure \ref{fig:compare_concentrations_numerical}c), the concentrations become spatially inhomogeneous, which leads to concentration overpotentials that limit the accessible capacity. \begin{figure} \centering \includegraphics{fits_numerical} \caption{Comparing data (dots) with results from full numerical model (lines) for a range of currents, with parameters fitted using DFO-GN. \label{fig:fits} \end{figure} A Derivative-Free Gauss-Newton method~\cite{cartis2017derivative} was also used to fit the model to data from a series of constant-current discharges of a 17 Ah BBOXX Solar Home battery at intervals of 0.5 A from 3 A to 0.5 A (Figure \ref{fig:fits}). Each constant-current discharge is followed by a two-hour rest period during which the current is zero. The fit is good, but this approach is slow since it requires solving the full PDE system at each iteration. A faster approach will be developed in part II. \section{Conclusions} \label{sec:conc} Three novel phenomena were included in a porous-electrode model for lead-acid batteries. First, the mass-averaged and volume-averaged velocities of the electrolyte were both considered, the former associated with momentum transport, and the latter with kinematics. Due to density variation in the liquid, and volume changes associated with the electrode reactions, neither of these velocities remains solenoidal after homogenisation. Second, an extra convective term, associated with the volume-averaged velocity, drives cation transport. Third, a pressure-diffusion term drives cation transport, and appears also in the MacInnes equation (modified Ohm's law) describing the liquid. Although these terms are small in magnitude for lead-acid batteries, they could be important for other chemistries where large volume changes occur during charge/discharge, such as lithium-ion batteries with silicon anodes \cite{ bower2011finite, chon2011real, sethuraman2011situbiaxial, sethuraman2010situstress, sethuraman2010situpotential, sethuraman2011increased}, or to understand the impedance signature of electromechanical/transport coupling \cite{goyal2017exploring}. Nondimensionalisation of this model allows us to identify key parameter groupings, and could also easily be extended to other models and chemistries. Two distinct mechanisms determine the total cell capacity: concentration limitation at low C-rates, and voltage limitation at high C-rates. In addition to capacity-limitation and voltage-limitation, there may be additional capacity limitations from additional physical effects, such as pore occlusion at very high C-rates \cite{liu2016capacity}. The model developed in this paper provides physical detail about the electrochemical processes occurring in a lead-acid battery during discharge, but is ultimately too computationally intensive to be used for advanced battery management systems. In part II, asymptotic analysis is used to derive three simplified models valid at low-to-moderate discharge rates. These can be solved much faster than the detailed model developed here, while giving additional physical insights. \section*{Acknowledgements} \label{sec: ack} This publication is based on work supported by the EPSRC center For Doctoral Training in Industrially Focused Mathematical Modelling (EP/L015803/1) in collaboration with BBOXX. JC, CP, DH and CM acknowledge funding from the Faraday Institution (EP/S003053/1). \section*{List of symbols} \noindent\textbf{Variables} \begin{description}[leftmargin=!, labelwidth=1cm, font=\normalfont] \item[$c$] concentration \hfill mol m$^{-3}$ \item[$\varepsilon$] porosity \hfill - \item[$j$] interfacial current density \hfill A m$^{-2}$ \item[$\bm{i}$] current density (3D) \hfill A m$^{-2}$ \item[$i$] current density in $x$-direction \hfill A m$^{-2}$ \item[$\bm{v}$] velocity (3D) \hfill m s$^{-1}$ \item[$v$] velocity in $x$-direction \hfill m s$^{-1}$ \item[$\bm{N}$] ion flux (3D) \hfill mol m$^{-2}$ s$^{-1}$ \item[$p$] pressure \hfill Pa \item[$\Phi$] potential \hfill V \end{description} \noindent\textbf{Subscripts} \begin{description}[leftmargin=!, labelwidth=1cm, font=\normalfont] \item[n] in negative electrode \item[sep] in separator \item[p] in positive electrode \item[$+$] of cations \item[$-$] of anions \item[w] of solvent (water) \item[e] of electrolyte \item[s] of solid (electrodes) \end{description} \noindent\textbf{Superscripts} \begin{description}[leftmargin=!, labelwidth=1cm, font=\normalfont] \item[$0$] initial \item[max] maximum \item[eff] effective \item[surf] surface \item[$\square$] convective \end{description} \noindent\textbf{Accents} \begin{description}[leftmargin=!, labelwidth=1cm, font=\normalfont] \item[$\di{}$] dimensional \end{description} \begin{appendix} \section{Parameters} \label{app:params} \setcounter{table}{0} The dimensional parameters are given in Table \ref{tab:dim_params}, and the concentration dependences of coefficients are laid out in Table \ref{tab:dim_functions}. Formulae for open-circuit potentials were obtained empirically by Bode \cite{bode1977lead}. Note that these could be written as \begin{subequations}\label{eq:OCPs_split} \begin{align} \di{U}_{\ce{Pb}}(\di{c}) &= U^\ominus_{\ce{Pb}} + \frac{RT}{F}{U}_{\ce{Pb}}({c}), \\ \di{U}_{\ce{PbO_2}}(\di{c}) &= U^\ominus_{\ce{PbO_2}} + \frac{RT}{F}{U}_{\ce{PbO_2}}({c}), \end{align} \end{subequations} to reflect their relation to the Nernst equation (e.g.~\cite{treptow2002lead}), with $U^\ominus_{\ce{Pb}} = -0.295$ and $U^\ominus_{\ce{PbO_2}} = 1.628$. \renewcommand{\arraystretch}{1} \begin{table*}[t] \centering \begin{tabular}{|c|c c c|c|c|} \hline \multirow{2}{*}{Parameter} & \multicolumn{3}{c|}{Value} & \multirow{2}{*}{Units} & \multirow{2}{*}{Reference} \\ \cline{2-4} & n & sep & p & & \\ \hline $l$ & $0.9\times10^{-3}$ & $1.5\times10^{-3}$ & $1.25\times10^{-3}$ & m & Private communication \\ $\hat{\varepsilon}^\text{max}$ & $0.53$ & $0.92$ & $0.57$ & - & ~\cite{srinivasan2003mathematical}\\ $H$ & \multicolumn{3}{c|}{$11.4\times10^{-2}$} & m & Measured \\ $W$ & \multicolumn{3}{c|}{$6.5\times10^{-2}$} & m & Measured \\ $s_{+}$ & $-1$ & - & $-3$ & - & \eqref{eq:halfreactions} \\ $s_{-}$ & $1$ & - & $-1$ & - & \eqref{eq:halfreactions} \\ $s_\text{w}$ & $0$ & - & $2$ & - & \eqref{eq:halfreactions} \\ $n_\text{e}$ & $2$ & - & $2$ & - & \eqref{eq:halfreactions} \\ $\bar{V}_\text{w}$ & \multicolumn{3}{c|}{$1.75\times 10^{-5}$} & m$^3$ mol$^{-1}$ &~\cite{bernardi1995mathematical} \\ $\bar{V}_\text{e}$ & \multicolumn{3}{c|}{$4.50\times 10^{-5}$} & m$^3$ mol$^{-1}$ &~\cite{bernardi1995mathematical}\\ $\bar{V}_+$ & \multicolumn{3}{c|}{$1.35\times 10^{-5}$} & m$^3$ mol$^{-1}$ &~\cite{boovaragavan2009mathematical}\\ $\bar{V}_-$ & \multicolumn{3}{c|}{$3.15\times 10^{-5}$} & m$^3$ mol$^{-1}$ &~\cite{boovaragavan2009mathematical}\\ $\bar{V}_{\ce{Pb}}$ & \multicolumn{3}{c|}{$1.83\times 10^{-5}$} & m$^3$ mol$^{-1}$ &~\cite{lide1992crc}\\ $\bar{V}_{\ce{PbO_2}}$ & \multicolumn{3}{c|}{$2.55\times 10^{-5}$} & m$^3$ mol$^{-1}$ &~\cite{lide1992crc}\\ $\bar{V}_{\ce{PbSO_4}}$ & \multicolumn{3}{c|}{$4.82\times 10^{-5}$} & m$^3$ mol$^{-1}$ &~\cite{lide1992crc}\\ $M_\text{w}$ & \multicolumn{3}{c|}{$1.8\times 10^{-2}$} & kg mol$^{-1}$ &~\cite{lide1992crc}\\ $M_+$ & \multicolumn{3}{c|}{$0.1\times 10^{-2}$} & kg mol$^{-1}$ &~\cite{lide1992crc}\\ $M_-$ & \multicolumn{3}{c|}{$9.7\times 10^{-2}$} & kg mol$^{-1}$ &~\cite{lide1992crc}\\ $F$ & \multicolumn{3}{c|}{$96485$} & C mol$^{-1}$ & Faraday constant \\ $R$ & \multicolumn{3}{c|}{$8.314$} & J mol$^{-1}$ K$^{-1}$ & Ideal gas constant \\ $T$ & \multicolumn{3}{c|}{$298.15$} & K & Room temperature \\ $t^\text{w}_+$ & \multicolumn{3}{c|}{$0.72$} & - &~\cite{chapman1968compilation, gu1987mathematical} \\ $\sigma$ & $4.8\times10^6$ & - & $8\times10^4$ & S m$^{-1}$ &~\cite{gu1997numerical}\\ $j^\text{ref}$ & $8\times10^{-2}$ & - & $6\times10^{-3}$ & A m$^{-2}$ &~\cite{tiedemann1979battery} (reported by~\cite{gu1997numerical}) \\ $c^\text{max}$ & \multicolumn{3}{c|}{$5.6\times10^{3}$} & mol m$^{-3}$ & Private communication \\ $\mathcal{A}$ & $2.6\times10^6$ & - & $2.05\times10^7$ & m$^{-1}$ &~\cite{tiedemann1979battery} (reported by~\cite{gu1997numerical}) \\ $d$ & $10^{-7}$ & - & $10^{-7}$ & m &~\cite{gu1997numerical} \\ $C_\text{dl}$ & $0.2$ & - & $0.2$ & F m$^{-2}$ &~\cite{srinivasan2003mathematical}\\ $q^0$ & \multicolumn{3}{c|}{$1$} & - & Full initial SOC \\ $Q$ & \multicolumn{3}{c|}{$17$} & Ah & Manufacturer-specified \\ \hline \end{tabular} \caption{Dimensional parameters from the literature. Parameters with several values indicate different values in negative electrode (n), separator (s) and positive electrode (p).} \label{tab:dim_params} \end{table*} \begin{table*}[t] \centering \begin{tabular}{|c|c|c|c|c|} \hline Function & Formula & \makecell[c]{Value at \\ $\di{c}=c^\text{max}$} & Units & Reference \\ \hline $\di{D}$ & $(1.75+2.6\times10^{-4}\di{c})\times10^{-9}$ & $3.02\times10^{-9}$ &m$^2$ s$^{-1}$& (\textdagger) \\ $\di{\chi}$ & $0.49 + 4.1\times10^{-4}\di{c}$ & $2.8$ & - &~\cite{chapman1968compilation, pitzer1977thermodynamics} (*)\\ $\di{\kappa}$ & \makecell[l]{$\di{c}\exp\left(6.23 - 1.34\times10^{-4}\di{c}\right.$\\\hspace{2cm}$\left. - 1.61\times10^{-8}\di{c}^2\right)\times10^{-4}$} & $77$ & S m$^{-1}$ & (\textdagger) \\ \hline $\di{\rho}$ & $M_\text{w}/\bar{V}_\text{w}\left(1+\left(M_e\bar{V}_\text{w}/M_\text{w} - \bar{V}_e\right)\di{c}\right)$ & $1.32\times10^3$ & kg m$^{-3}$& Linear function of $\di{c}$~\cite{newman2012electrochemical} \\ $\di{\mathcal{K}}$ & $\di{\varepsilon}^3d^2/180(1-\di{\varepsilon})^2$ & - & m$^2$ &~\cite{gu1997numerical} \\ $\di{\mu}$ & $0.89\times10^{-3} + 1.11\times10^{-7}\di{c} + 3.29\times10^{-11}\di{c}^2$ & $2.5\times10^{-3}$ & Pa s &~\cite{chapman1968compilation} (*) \\ $\di{c}_\text{w}$ & $(1-\di{c}\bar{V}_\text{e})/\bar{V}_\text{w}$ &$4.27\times10^4$ & mol m$^{-3}$ & \eqref{eq:cw}\\ \hline $\di{j}_0$ & $j^{\text{ref}} \left( \frac{\di{c} }{c^{\text{ref}} } \right)^{ \left| \frac{s_+}{n_{\text{e}}} \right| + \left| \frac{s_-}{n_{\text{e}}} \right| } \left( \frac{\di{c}_{\text{w}} }{c_{\text{w}}^{\text{ref}} } \right)^{\left| \frac{s_\text{w}}{n_{\text{e}}} \right| }$ & $j^{\text{ref}}$ & A m$^{-2}$ & Approach of~\cite{liu2016capacity} \\ $\di{U}_{\ce{Pb}}$ & \makecell[l]{$-0.295 - 0.074\log m- 0.030\log^2m$ \\\hspace{.9cm}$- 0.031\log^3m - 0.012\log^4m$ (\textdaggerdbl)} & $-0.41$ & V &~\cite{bode1977lead} \\ $\di{U}_{\ce{PbO_2}}$ & \makecell[l]{$1.628 + 0.074\log m+ 0.033\log^2m$ \\\hspace{.9cm}$+ 0.043\log^3m + 0.022\log^4m$ (\textdaggerdbl)} & $1.76$ & V &~\cite{bode1977lead} \\ \hline \end{tabular} \caption{Dimensional functions of concentration, $\di{c}$ (measured in mol/m$^3$) and $\di{\varepsilon}$ (dimensionless). (\textdagger) Empirical formulae are given by~\cite{gu1997numerical}, citing~\cite{tiedemann1979battery}, and agree with data of~\cite{chapman1968compilation}. (*) Our fit to data of given reference(s). (\textdaggerdbl) $m(\di{c}) = \di{c}\bar{V}_\text{w}/[(1-\di{c}\bar{V}_\text{e})M_\text{w}]$.} \label{tab:dim_functions} \end{table*} \paragraph{Consistent initial conditions} For consistent initial conditions, we take `starting at $x\%$ SOC' to mean an internally equilibrated (i.e. spatially homogeneous) initial state at uniform concentration corresponding to this charge. The following determines initial conditions for $\di{c}$ and $\di{\varepsilon}$ consistent with this choice. Considering a one-dimensional model and integrating \eqref{eq:dim_saltbal} in $\di{x}$ across the whole electrode pair and using the no-flux conditions \eqref{eq:no-flux_sides}, and the integral condition \eqref{eq:dim_j_BC}, \begin{multline}\label{eq:inits_find_qmax} {\myint{0}{L}{\left(\di{\varepsilon} \di{c}\right)}{\di{x}}} = A_\text{cs}\left(l_\text{n}\varepsilon_\text{n}^\text{max} + l_\text{sep}\varepsilon_\text{sep}^\text{max} + l_\text{p}\varepsilon_\text{p}^\text{max}\right) c^\text{max} \\ + \frac{(s_\text{n}-s_\text{p})q^\text{max}(1-q)}{8F}. \end{multline} Both sides of \eqref{eq:inits_find_qmax} should be zero when $q=0$; hence choose \begin{equation} q^\text{max} = \frac{8FA_\text{cs}\left(l_\text{n}\varepsilon_\text{n}^\text{max} + l_\text{sep}\varepsilon_\text{sep}^\text{max} + l_\text{p}\varepsilon_\text{p}^\text{max}\right) c^\text{max}}{s_\text{p}-s_\text{n}}, \end{equation} which, with the parameter values in Table \ref{tab:dim_params}, gives a maximum capacity of $26.1$ Ah for the battery. This compares favourably to the stated battery capacity of $17$ Ah. Now, integrating \eqref{eq:dim_depsdt} in $\di{x}$ across the whole negative electrode and using the integral condition \eqref{eq:dim_j_BC}, \begin{equation}\label{eq:inits_find_epsDelta} {\myint{0}{l_\text{n}}{\di{\varepsilon}_\text{n}}{\di{x}}} = A_\text{cs}l_\text{n}\varepsilon_\text{n}^\text{max} + \frac{\Delta\bar{V}^\text{surf}_\text{n}q^\text{max}(1-q)}{16F}. \end{equation} Then, assuming that $\varepsilon^0_\text{n}$ is spatially uniform, \begin{equation} \di{\varepsilon}^0_\text{n} = \di{\varepsilon}_\text{n}^\text{max} - \di{\varepsilon}^\Delta_\text{n}(1-q^0), \quad \text{where} \quad \varepsilon^\Delta_\text{n} = \frac{\Delta\bar{V}^\text{surf}_\text{n}q^\text{max}}{16FA_\text{cs}l_\text{n}}. \end{equation} Similarly, \begin{equation} \di{\varepsilon}^0_\text{p} = \di{\varepsilon}_\text{p}^\text{max} - \di{\varepsilon}^\Delta_\text{p}(1-q^0), \quad \text{where} \quad \varepsilon^\Delta_\text{p} = \frac{\Delta\bar{V}^\text{surf}_\text{p} q^\text{max}}{16FA_\text{cs}l_\text{p}}. \end{equation} \section{Velocity} \label{app:velocity} Integrating \eqref{eq:vbox} for the volume-averaged velocity from $x=0$ to $x=1$ and using the integral condition \eqref{eq:dim_j_BC} for the interfacial current density and \eqref{eq:BCs_collectors} for $v^\square$ at $x=0$, one finds that \begin{equation} \left.v^\square\right\rvert_{x=1} = \left(\beta^\text{surf}_\text{n} + \beta^\text{liq}_\text{n} + \beta^\text{surf}_\text{p} + \beta^\text{liq}_\text{p}\right)i_\text{cell}, \end{equation} which contradicts \eqref{eq:BCs_collectors} for $v^\square$ at $x=1$ since the sum of the volume changes across the whole cell is non-zero. It follows that the model can have no exact solution in a one-dimensional setting. This can be resolved by considering a multi-dimensional problem with a free electrolyte surface; this solution is beyond the present scope. \end{appendix} \bibliographystyle{unsrt}
\section{Preface} The detailed story of the discovery of the atmospheric neutrino anomaly has been told before~\cite{Pers}. Due to length limitations in these proceedings, this article will concentrate on responding to questions that have been raised about the discovery and subsequent work to understand the physical origin of the anomaly. In their talks at the conference Paolo Lipari and John Learned reviewed the discovery as told in reference~\cite{Pers}. \section{Synopsis of Reference 1} The goal of the IMB-1 (Irvine-Michigan-Brookhaven) experiment was to discover proton decay. It was expected that the dominant background would come from atmospheric neutrino interactions. Estimated neutrino fluxes and cross sections were used to simulate this expected background. Reconstruction of events in the experiment was based on the flight time of Cerenkov photons. A modest modification to the timing circuits let us record activity for 10 $\mu$sec after a trigger. This gave a delayed signal in events containing a muon. The efficiency of the method was determined by observing stopping cosmic ray muons from the surface, and agreed very well with expectations. From the very beginning the IMB-1 experiment measured fewer muon decay events than expected from atmospheric neutrinos. 26$\pm$2\% of the events were observed to have a muon decay while the expected value was 34$\pm$1\%. Numerous checks were performed to determine the detector response to muons was well understood. The expected value was studied by varying the production model using explicit $\nu_{\mu}$ interactions on $CF_{3}Br$, neon and deuterium as well as the Rein and Seghal model of neutrino interactions~\cite{ReinSehgal}. The muon deficiency was published in several PhD thesis~\cite{IMB1983}, a couple of conference proceedings~\cite{LL} and a Physical Review Letter~\cite{IMB2}. The February 1986 Lake Louise proceedings~\cite{LL} explicitly noted that IMB had measured $\nu_{e}/\nu_{\mu}$=1.3 while at that time Nusex and Kamiokande were reporting $\nu_{e}/\nu_{\mu}$=0.28$\pm$0.11 and $\nu_{e}/\nu_{\mu}$=0.36$\pm$0.08 respectively. The IMB evidence was strong, $3.5 \sigma$, but confirmation was needed. Shortly after the 1986 PRL article had been submitted, I asked Kamiokande to confirm the anomaly, pointing out a muon decay deficiency in their own data. After a substantial delay, while they redesigned their particle classification algorithm, confirmation was provided~\cite{Conf}. \section{Summary of the Poster} \noindent In general, the poster (see Fig.~\ref{poster}) summarized the published history article~\cite{Pers} with a few additional details. The additions included a discussion of the IMB management and biases (lower left), my realization in August 1985 that Kamiokande also had a muon decay deficiency (upper center) and a brief survey of how some of the history has been overlooked by others to promote followup work (lower right). These additions had been left out of reference~\cite{Pers} for two reasons. Reference~\cite{Pers} was celebration of a colleague's career and such negative material would not have been appropriate. Also, while well documented, the information in these additions comes from private archives of the IMB experiment which has had limited public access. The IMB collaboration had a secrecy rule to limit rumors of the expected discovery of proton decay. The rules were enforced by a senior management team that had a record of prior mistakes. At the ICRC in 1985 Nusex showed evidence of an excess $\nu_{\mu}$ rate as determined by comparing showering and non-showering tracks in an iron calorimeter. This was confusing since IMB had solid evidence that we were seeing too few muon decays. A few months later I realized that Kamiokande had information that spanned both possibilities. That $\mu$ $e$ based pattern identification supporting the Nusex result but I noticed that their muon decay was compatible with the IMB anomaly. I could not discuss this at the time due to IMB secrecy rules. \begin{figure}[h] \centerline{\includegraphics[width=0.95\linewidth]{LoSeccoNuHist2018Posterembed.pdf}} \caption[]{Summary of the published history article~\protect\cite{Pers}.The full size copy of the poster is available at the address http://neutrinohistory2018.in2p3.fr/programme.html, for easier reading.} \label{poster} \end{figure} The blue text at the bottom of the upper left section of the poster shows the atmospheric neutrino E/L plot from the 1985 ICRC where the discrepancy, a dip in the bin centered at E/L\,=\,5.8$\times$10$^{-3}$ MeV/meter, was clearly noted in the original. \section{Cautionary Wording} In his talk at the conference Paolo Lipari was critical of the language used in the first IMB journal article~\cite{IMB2} to explicitly mention the atmospheric muon deficit. The Physical Review Letter~\cite{IMB2} did not give a strong interpretation to the missing muons. Most of the collaboration was quite cautious to claim neutrino oscillations for several reasons. The text~\cite{IMB2} read ``This discrepancy could be a statistical fluctuation or a systematic error due to (i) an incorrect ratio of muon $\nu$'s to electron $\nu$'s in the atmospheric fluxes, or (ii) an incorrect estimate of the efficiency for our observing a muon decay, or (iii) some other as-yet-unaccounted-for physics.'' Which makes explicit what any cautious reader should be thinking. The atmospheric neutrino flux calculations were not our own. There was no guarantee that all of the data events were caused by neutrinos of atmospheric origin but that was the model to which we compared the sample. An efficiency check with cosmic rays worked because the $\mu^{-}$ to $\mu^{+}$ ratio of that sample was known. So we knew it was not a detector problem. At the time of the IMB publication two other experiments sensitive to atmospheric neutrinos, Nusex and Kamiokande, using different methods, were reporting an excess of muon type events in their data samples. This is why IMB's observation was a discovery. We were the first to report the correct value. I had provided an interpretation of the anomaly in an earlier conference paper~\cite{LL} as a $\nu_{e}$ to $\nu_{\mu}$ ratio of 1.3, with a muon detection efficiency of 60\%. Earlier attempts to fit the neutrino oscillations hypothesis~\cite{IMB1,ICRC} to the data only placed limits since the oscillation parameters were not in a range to which the experiment was sensitive. Those attempts were motivated by the, at the time unpublished, anomaly. Many senior authors were scared by the anomaly and there was a strong bias against neutrino oscillations due to prior mistakes on other projects. To get the correct result published by the collaboration required patience, great attention to detail, redundancy and tenacity. \section{Significance} The statistical significance of the evidence published by IMB in 1986 was 3.5 $\sigma$. The published observed value of the muon decay fraction was 26$\pm$3\%. Drafts of the paper distributed to the collaboration for approval had the correct 26$\pm$2\%. The $\pm$2 is based on binomial statistics. An event had a muon decay or it did not. I do not know how the $\pm$3 got in the paper. \section{Later Papers -- The 1992 IMB Exclusion Plot} In his talk at the conference Maury Goodman mentioned an IMB paper~\cite{NoOsc} from 1992 that ruled out regions of neutrino oscillations parameter space that are now believed to be the correct physical ones. This was my response at the meeting. After the discovery (1986) and confirmation (1988) work on atmospheric neutrinos intensified. Many people and groups joined in. IMB-3 had 4 times the light collection as IMB-1 and several pattern based muon-electron discrimination algorithms were developed (and checked against the observed muon decay rates). To prove neutrino oscillations one needed to show clear evidence of an L/E dependence. While atmospheric neutrinos have flight paths from a few km to 12,700 km due to the modest solid angle near the horizon the path length distribution is dominated by two distance scales, dozens of km for the downward component and about 10,000 km for the upward. The neutrino energy seems to be predominately below 1 GeV. One must be creative to extend the range of energies one can observe. To get more events at higher energies required a much larger detector. Resources for a larger detector were not available but if one only needed the larger detector to observe higher energies one can utilize neutrino interactions in the rock below these underground detectors. The paper in question~\cite{NoOsc} used the fraction of stopping upward going muons, relative to upward going muons that exit the detector, to constrain neutrino oscillations. Upward going muons are caused by neutrino interactions in the rock surrounding the detector. While a very nice idea it must be cautiously executed. There are no reliable energy estimates for entering tracks so one is integrating over a broad range of $\nu_{\mu}$ energies assuming the theoretical spectrum has been calculated correctly. The stopping fraction should be insensitive to the flux normalization since it is the ratio of two parts of the same spectrum. But in this case~\cite{NoOsc} there was no single flux estimate that could span the range of neutrino energies needed so two different flux estimates were used: Volkova~\cite{Volkova} for the high energy part and Lee and Koh~\cite{LKFlux} for the low energy part. The Lee and Koh flux~\cite{LKFlux} was later shown to be wrong due to a programming bug~\cite{LKBad}, but this was not realized until years later in a general review of all atmospheric flux estimates. It underestimated the low energy flux, which made its prediction look more like the correct flux with neutrino oscillations. \section{Independent Discovery?} As mentioned above, in June 1986 I asked Kamiokande to confirm our evidence of a muon deficit. At the time they were reporting a 1.6$\sigma$ muon excess. At the 2018 conference, I asked Takaaki Kajita to confirm the time line. In his response he indicated that Kamiokande had relied on scanning to classify events as muon or electron. It wasn't until Fall of 1986 that an automated method was developed. This confirms what is indicated in Takita's 1989 PhD thesis~\cite{Takita}. But the thesis doesn't give specific dates. Kajita indicated there had been no formal particle identification in Kamiokande before I mentioned the muon deficit. The Kamiokande work was not independent. It was a confirmation of the IMB result. \section{Apology} At the meeting, I asked Kajita why Kamiokande had cited the earlier 1986 work from IMB but that Super-Kamiokande never cited the earlier IMB paper. His immediate reply was ``I'm sorry''~\cite{NuHK}. He went on to explain that Super-Kamiokande cited later IMB-3 papers~\cite{IMB3} that used pattern based particle identification methods. All IMB-3 contained atmospheric neutrino comparisons are inaccurate since they were modeled with the Lee and Koh neutrino spectrum~\cite{LKFlux} which is flawed by a programming bug which underestimates the muon neutrino flux. \section{Video of Conference Discussions} The talks and discussions at the conference were recorded and are available at the address: \\ http://neutrinohistory2018.in2p3.fr/programme.html. Many of the new material in this article is documented in recordings of discussions. \section*{Acknowledgments} I would like to thank the conference organizers for inviting me to participate. In particular Daniel Vignaud and Michel Cribier were quite adaptable to my requests. I thank the other participants for making it a lively meeting and for their candor. I thank the physics department at Notre Dame for their partial support. \section*{References}
\section{Introduction} The gravitational disturbances resulting from interactions between the Large Magellanic Cloud (LMC) and the Small Magellanic Cloud (SMC) and between these galaxies and the Milky Way (MW) are probably imprinted on their star formation histories, as strong tidal effects are known to trigger star formation across dwarf galaxies \citep{Kennicutt:1996}. Gas dynamics simulations of galaxy collision and merging have shown that the properties of tidally induced features such as the Magellanic Stream and Bridge can be used to gather information about the collision processes and to infer the history of the colliding galaxies \citep{Olson:1990}. When applied to model the Magellanic System, present-day simulations have been able to reproduce several of the observed features of the interacting galaxies such as shape, mass and the induced star formation rates. However, it is still not clear whether the Magellanic Clouds are on their first passage, or if they have been orbiting the MW for a longer time \citep[e.g.][]{Mastropietro:2005, besla+07, Diaz:2012, kallivayalil+13}. \cite{putman+98} confirmed the existence of the Leading Arm, which is the counterpart of the trailing Magellanic Stream. The existence of both gas structures most likely has a tidal origin. Because of that, it is also expected that the Magellanic Stream, the Leading Arm and the Magellanic Bridge should have a stellar counterpart of the tidal effects within the Magellanic System \citep[e.g.][]{Diaz:2012}. Besides, the close encounters among SMC, LMC and the MW should trigger star formation at specific epochs \citep{Harris:09}, presumably imprinted in the age and metallicity distribution of field and cluster stars. In the context of interacting galaxies, it is well known that the tidal forces have a direct impact over the dynamical evolution and dissolution of stellar clusters and that the intensity of these effects typically scale with galactocentric distances \citep{Bastian:2008}. The outcome of these gravitational stresses imprinted on the stellar content of these systems can be diagnosed by means of the clusters structural parameters \citep{Werchan:2011,Miholics:2014} and mass distribution \citep{Glatt:2011}. In a similar fashion, the effects of the galactic gravitational interactions in the Magellanic System should also be seen in the structural, kinematical and spatial properties of their stellar clusters, particularly on those on the peripheries of the LMC and SMC. Whether or not they are affected by significant disruption during their lifetime is an open question and subject of current debate \citep{Casetti-Dinescu:2014}. Comparing these properties at different locations across the Magellanic Clouds is the key to unveiling the role of tidal forces over the cluster's evolution and to map crucial LMC and SMC properties at projected distances usually not covered by previous surveys. Given the complexity of the cluster dynamics in the outer LMC and SMC, additional kinematic information might be required (e.g. radial velocities) to constraint their orbits and address the issue of possible cluster migration, both in a galactic context and between the Clouds, as such behaviour has already been seen in their stellar content \citep{Olsen:11}. Fortunately, most of the star clusters fundamental parameters such as age, metallicity, distance, reddening and structural parameters can be inferred from photometry using well established methodologies such as simple stellar population models, N-body simulations, stellar evolution models and colour-magnitude diagrams (CMDs). These parameters, in turn, can be used to probe the 3D structure of the Magellanic Clouds and Bridge, to sample local stellar populations and also to map their chemical gradients and evolutionary history. When combined with proper motions from \citet{Gaia:2018} and with radial velocities and metallicities from a spectroscopic follow-up they can provide a wealth of additional information such as the radial metallicity gradients, still under discussion for these galaxies, the internal dynamical status and evolutionary timescales of the clusters and their 3D motions and orbits, which constrain the mass of the LMC and SMC. Some efforts have been made to collect heterogeneous data from the literature and study the topics above (e.g. \citealp{Pietrzynski+00}, \citealp{rafelski+05}, \citealp{glatt+10}, \citealp{piatti+11}, \citealp{palma+16}, \citealp{perren+17}, \citealp{parisi+09,parisi+14,parisi+15}, \citealp{Dias:2014,Dias:2016}, \citealp{nayak+16}, \citealp{pieres+16} etc). However, the dispersion in the parameters due to different data qualities, analysis techniques and photometric bands used do not put hard constraints on the history of the SMC and LMC star cluster populations. This is usually one of the most compelling arguments to carry out a survey in the Magellanic Clouds. After \citet{putman+98}, the investigation of some of these subjects has greatly benefited from several photometric surveys, some dedicated exclusively to the Magellanic Clouds. We describe the main surveys covering the Magellanic Clouds in Table \ref{tab:surveys}. It can be seen that they complement each other in terms of sky coverage, filters, photometric depth, and spatial resolution. All of them give preference to large sky coverage over photometric depth at the expense of good photometry of low-mass stars in star clusters. The Hubble Space Telescope (HST) is suitable to explore this niche, but only for a few selected massive clusters given the time limitations implied in observing hundreds of low-mass ones. Our VISCACHA (VIsible Soar photometry of star Clusters in tApii and Coxi HuguA\footnote{LMC and SMC names in the Tupi-Guarani language}) survey exploits the unique niche of deep photometry of star clusters and a good spatial resolution throughout the LMC, SMC, and Magellanic Bridge. In order to observe a large sample, including the numerous low-mass clusters we need large access to a suitable ground-based facility. These conditions are met at the 4.1-m Southern Astrophysical Research (SOAR) telescope combined with the SOAR Telescope Adaptive Module (SAM) using ground-layer adaptive optics (GLAO). The VISCACHA team can access a large fraction of nights at SOAR (Brazil: 31\%, Chile: 10\%) to cover hundreds of star clusters in the Magellanic System during a relatively short period, with improved photometric depth and spatial resolution. This combination allows us to generate precise CMDs especially for the oldest, compact clusters immersed in dense fields, which is not possible with large surveys. A more detailed description of the survey is given in Section \ref{sec:viscacha}. \begin{table*} \centering \scriptsize \caption{Summary of photometric surveys covering the Magellanic System. Future surveys (LSST, Euclid), the ones with marginal cover of the Magellanic System or that are photometrically shallow are not listed (DSS, 2MASS, Pan-STARRS, MagLiteS, ATLAS, MAGIC). Spectroscopic surveys are not listed either (APOGEE-2, Local Volume Mapper, {\it Gaia}, 4MOST).} \label{tab:surveys} \setlength{\tabcolsep}{5pt} \begin{tabular}{p{1.7cm} p{1.3cm} p{2.5cm} p{1.1cm} p{0.9cm} p{1cm} p{0.8cm} p{2cm} p{2.5cm} p{0.8cm}} \noalign{\smallskip} \hline \noalign{\smallskip} survey & period & telescope/ & typical & filters & mag.lim. & scale & total sky & main goals & main\\ (PI) & (observ.) & instrument & seeing & & & ($\arcsec$/px) & coverage & & refs.\\ \noalign{\smallskip} \hline \hline \noalign{\smallskip} MCPS (Zaritsky) & 1996-1999 (+2001) & 1m Swope @ LCO, Great circle camera (drift-scan) & 1.2-1.8$\arcsec$ & UBVI & $V<$21$^a$ & 0.7 & 64$\deg^2$ (LMC) 18$\deg^2$ (SMC) & field SFH SMC/LMC, cluster census, reddening map & 1, 2, 3, 4\\ \noalign{\smallskip} \hline \noalign{\smallskip} VMC (Cioni) & 2009-2018 & 4m VISTA @ ESO, VIRCAM (1$^{\circ}$x1$^{\circ}$) & 0.8-1.2$\arcsec$ & YJK$_{\rm s}$ & $J<$21.9$^a$ & 0.34 & 116$\deg^2$ (LMC) 45$\deg^2$ (SMC) 20$\deg^2$ (Bridge) 3$\deg^2$ (Stream) & spatially-resolved SFH, 3D structure, stellar variability & 5, 6, 7, 8, 9\\ \noalign{\smallskip} \hline \noalign{\smallskip} OGLE-IV (Udalski) & 2010-2014 & 1.3m Warsaw @ LCO ($\diameter\sim$ 1.5$^{\circ}$) & 1.0-2.0$\arcsec$ & (B)VI & $I<$21.7 ($I<$20.5$^b$) & 0.26 & 670$\deg^2$ (SMC, LMC, Bridge) & Stellar variability & 10, 11, 12, 13 \\ \noalign{\smallskip} \hline \noalign{\smallskip} STEP (Ripepi) & 2011+ & 2.6m VST @ ESO OmegaCAM (1$\deg^2$) & 1.0-1.5$\arcsec$ & griH$\alpha$ & $g<$23.5$^a$ & 0.21 & 74$\deg^2$ (SMC main body) 30$\deg^2$ (Bridge) 2$\deg^2$ (Stream) & visible complement of VMC, SFH of SMC down to oldest populations & 14 \\ \noalign{\smallskip} \hline \noalign{\smallskip} SMASH (Nidever) & 2013-2016 & 4m Blanco @ CTIO DECam, NOAO (3$\deg^2$) & 1.0-1.2$\arcsec$ & ugriz & $g<$22.5$^a$ & 0.27 & 480$\deg^2$ (Leading arm, SMC, LMC cores) & stellar counterpart of Leading Arm, spatially resolved SFH LMC/SMC & 15, 16, 17, 18 \\ \noalign{\smallskip} \hline \noalign{\smallskip} DES (Frieman$^c$) & 2013-2018 & 4m Blanco @ CTIO DECam, NOAO (3$\deg^2$)& 0.8-1.2$\arcsec$ & grizY & $g<$23.7$^b$ & 0.27 & 5000$\deg^2$ (Stream plus large area unrelated to SMC/LMC) & Magellanic Stream, tidal dwarf galaxies & 19, 20, 21\\ \noalign{\smallskip} \hline \noalign{\smallskip} {\it Gaia} (Prusti$^d$) & 2013-2019 & 1.49m$\times$0.54m ($\times 2$) {\it Gaia} @ ESA (space) & $>0.1\arcsec^{ e}$ & G (blue, red photometer) & $G<$20.7$^f$ & 0.06 $\times$ 0.18 & all sky & proper motion of brightest stars, stellar variability, SFH & 22, 23, 24, 25 \\ \noalign{\smallskip} \hline \noalign{\smallskip} Skymapper (Da Costa) & 2014-2020 & 1.35m SSO @ ANU (2.4$\times$2.3$\deg^2$) & 1.2-1.8$\arcsec$ & uvgriz & $g<$18$^f$ (g$<22^g$) & $\sim$0.5 & all Southern sky & outskirts of LMC/SMC, origin of Stream at the Bridge & 26 \\ \noalign{\smallskip} \hline \noalign{\bigskip} {\bf VISCACHA} (Dias) & 2015+ & 4.1m SOAR @ Cerro Pachon / SAMI with GLAO ($3\arcmin\times3\arcmin$) & 0.8-1.0$\arcsec$ {\bf (AO$\sim$0.5$\arcsec$)} & (B)VI & $V<24^a$ & {\bf 0.09} (binned) & only star clusters & star clusters of all ages, LMC, SMC, bridge, tidal effects on clusters, precise CMDs & 27, 28, 29, 30 \\ \noalign{\bigskip} \hline \noalign{\smallskip} \end{tabular} \begin{flushleft} Based on the presentation by M.R. Cioni at ESO2020 workshop in 2015, updated with more surveys and details: \url{https://www.eso.org/sci/meetings/2015/eso-2020/program.html} (a) Completeness at 50\% using artificial star tests in the crowded regions. (b) Completeness at 95-100\%. (c) Director. (d) Project scientist. (e) {\it Gaia} is able to separate two point sources that are $>0.1\arcsec$ apart, but this is only a reference, it cannot be directly compared with ground-based telescope FWHM or resolving power. Another parameter is that {\it Gaia} can resolve stars up to a density of 0.25 star/$\arcsec^2$. (f) Hard limit, large uncertainty, low completeness. (g) DR1 only contains shallow survey. The full survey is expected to reach 4 mag deeper. (1) \cite{zaritsky+96}; (2) \cite{Zaritsky:1997}; (3) \cite{Zaritsky:2002}; (4) \cite{Zaritsky:2004}; (5) \cite{Cioni:2011}; (6) \cite{piatti+15vmc}; (7) \cite{subramanian+17}; (8) \cite{niederhofer+18}; (9) \cite{rubele+18}; (10) \cite{udalski+15}; (11) \cite{skowron+14}; (12) \cite{Jacyszyn-Dobrzeniecka+16}; (13) \cite{Sitek+17}; (14) \cite{ripepi+14} (15) \cite{Nidever+2017} (16) \cite{nidever+18} (17) \cite{choi+18a} (18) \cite{choi+18b} (19) \cite{abbott+18} (20) \cite{pieres+16} (21) \cite{Pieres:2017} (22) \cite{prusti+16} (23) \cite{brown+16} (24) \cite{vandermarel+16} (25) \cite{helmi+18} (26) \cite{wolf+18} (27) \cite{Dias:2014} (28) \cite{Dias:2016} (29) \cite{Maia:2014} (30) \cite{Bica:2015}. \end{flushleft} \end{table*} Among the topics that the VISCACHA data shall allow to address and play an important role, we list: (i) position dependence structural parameters of clusters, (ii) age-metallicity relations of star clusters and radial gradients, (iii) 3D structure of the Magellanic System in contrast with results from variable stars, (iv) star cluster formation history, (v) dissolution of star clusters, (vi) initial mass function for high- and low-mass clusters, (vii) extended main-sequence turnoffs in intermediate-age clusters, (viii) combination with kinematical information to calculate orbits, among others. This paper is organized as follows. In Section \ref{sec:viscacha} we present an overview of the VISCACHA survey. In Sections \ref{sec:obs} and \ref{sec:data} we describe the observations and data reduction. The analysis we will perform on the whole data set is presented in Section \ref{sec:analysis}, and the first results are shown in Section \ref{sec:results}. Conclusions and perspectives are summarised in Section \ref{sec:conclusions}. \section{The VISCACHA survey} \label{sec:viscacha} Photometric studies of Magellanic Clouds clusters are usually limited to those with the main sequence turn-off above the detection limits \citep{Chiosi:2006}, which is directly related to the depth of the observations. Furthermore, crowding can also hamper the studies of many compact clusters and those immersed in rich backgrounds such as the LMC bar. This limits the sample to massive, young to intermediate-age clusters, while leaving the much more numerous low mass ones largely unexplored. The VISCACHA survey\footnote{\url{ http://www.astro.iag.usp.br/~viscacha/}} is performing a comprehensive study of the outer regions of the Magellanic Clouds by collecting deep, high quality images of its stellar clusters using the 4.1~m SOAR telescope and its SAM Imager (SAMI). When compared with other surveys on the Magellanic Clouds, the VISCACHA survey is reaching $>$2mag deeper than previous studies (largely based on the 2MASS, MCPS or the VMC surveys), attaining S/N $\approx$ 10 at V $\approx$ 24, which is slightly better than those achieved by SMASH ($z \sim 23.5$, $g \sim 22.5$). Furthermore, while SMASH aims to search and identify low surface brightness stellar populations across the Magellanic Clouds, the VISCACHA survey will provide local high quality data of specific targets enabling the most complete characterization of their populations. Due to the employment of the adaptive optics system, the spatial resolution achieved by VISCACHA (FWHM $\approx$ 0.5\arcsec, $V$ band) is higher than that of any other survey on the Magellanic Clouds, enabling the deblending of the stellar sources down to very crowded scenarios. Even though HST photometry \citep[e.g.][]{Glatt:2008} is still deeper than ground based photometry, the spatial coverage of the VISCACHA survey greatly surpasses those with appropriate field of view and resolution, allowing for a larger cluster sample and a more complete understanding of these galaxy properties. On a short term, the VISCACHA survey will deliver a high quality, homogeneous database of star clusters in the Magellanic Clouds, providing reliable physical parameters such as core and tidal radii, ellipticities, distances, ages, metallicities, mass distributions as derived from standard data reduction and analysis processes. The effects of the local tidal field over their evolution will be quantified through the analysis of their structural parameters, dynamical times, and positions within the Galactic system. Comparison of these results with models \citep[e.g.][]{Marel:2009, Baumgardt:2013} will provide important constraints to understand the evolution of the Magellanic Clouds. Once a significant sample has been collected, a study of the star formation history and chemical enrichment of the star clusters located at the periphery of these galaxies will be carried out to probe the local galactic properties. Based on this dataset, several aspects concerning the evolution of these galaxies will be revisited, such as spatial dependence of age-metallicity relationship \citep{Dobbie:2014}, the ``V"-shaped metallicity and age gradients found in the SMC \citep{Dias:2014, Dias:2016, parisi+09, parisi+15}, the 3D cluster distribution, the inclination of the LMC disc, among others. Finally, our catalogues will be matched against others (e.g. MCPS, VMC, OGLE) comprising a more complete panchromatic data set that will serve as reference for future studies of star clusters in the Magellanic Clouds. Even though this is not a public survey, it has a legacy value, therefore we intend to eventually compile an easily accessible on-line database, including photometric tables, parameter catalogues, and reduced images. \section{Observations} \label{sec:obs} Historically, the VISCACHA team originated from the merging of two Brazilian teams, one of them observing star clusters in the periphery of the LMC looking for structural parameters, and the other one observing clusters in the periphery of the SMC looking for age-metallicity relation and radial gradients. Both teams started observing with the SOAR optical imager (SOI) since its commissioning in 2006, and joined forces to found the VISCACHA collaboration observing with the recently commissioned SAMI in 2015. We broadened the science case and the collaboration team, having members based in Brazil, Chile, Argentina, and Colombia so far. Considering the observing runs 2015A, 2015B, 2016B and 2017B we have observed about 130 clusters. In order to demonstrate the methods concerning CMDs and cluster structure we use in the present study a subsample of 4 SMC and 5 LMC clusters illustrating different concentration, total brightness and physical parameters. Their $V$ images are shown in Fig.~\ref{fig:visclu} and their observation log in Tab.~\ref{tab:log}. A list containing the full sample of all observed clusters up to the 2017B run is given in the appendix (Table~\ref{tab:clulist}). \begin{figure*} \includegraphics[width=\linewidth]{fig_visclu3.eps} \caption{Central panel: present VISCACHA sample, including $\sim$130 clusters observed through 2015-2017 (red circles). Small black dots correspond to the catalogued objects in the Magellanic System by \citet{Bica:2008}. Surrounding panels: $V$ image of selected targets, representing the variety of cluster types in the survey.} \label{fig:visclu} \end{figure*} \begin{table*} \caption{Log of observations only for the clusters analysed in this paper.} \begin{tabular}{lcccccccccc} \hline Name & RA & Dec & date & filter & exptime & airmass & seeing & IQ & $\tau_0$ & AO? \\ & [h:m:s] & [$^\circ$:$\arcmin$:$\arcsec$] & [DD.MM.YYYY] & & [sec] & & [arcsec] & [arcsec] & [ms] & \\ \hline \hline \multicolumn{11}{c}{SMC}\\ \hline AM3 & 23:48:59 & -72:56:43 & 04.11.2016 & V, I & $6\times200$, $6\times300$ & 1.38 & 1.2, 1.1 & 0.5, 0.4 & 7.2, 5.7 & ON \\ HW20 & 00:44:47 & -74:21:46 & 27.09.2016 & V, I & $6\times200$, $6\times300$ & 1.40 & 1.2, 0.9 & 0.6, 0.5 & 4.8, 6.8 & ON \\ K37 & 00:57:47 & -74:19:36 & 04.11.2016 & V, I & $4\times200$, $4\times300$ & 1.44 & 0.8, 0.8 & 0.5, 0.4 & 7.0, 7.2 & ON \\ NGC796 & 01:56:44 & -74:13:10 & 04.11.2016 & V, I & $3\times100$, $4\times100$ & 1.78 & 1.0, 0.9 & 0.6, 0.5 & 5.4, 6.3 & ON \\ \hline \multicolumn{11}{c}{LMC}\\ \hline KMHK228 & 04:53:03 & -74:00:14 & 11.01.2016 & V, I & $3\times375$, $3\times560$ & 1.42 & 1.1, 1.0 & 1.1, 1.0 & 3.9, 3.1 & ON \\ OHSC3 & 04:56:36 & -75:14:29 & 02.12.2016 & V, I & $3\times375$, $3\times560$ & 1.45 & 1.0, 1.0 & 1.0, 1.0 & 2.0, 2.0 & OFF\\ SL576 & 05:33:13 & -74:22:08 & 29.11.2016 & V, I & $3\times375$, $3\times560$ & 1.48 & 1.3, 1.0 & 1.2, 1.0 & 4.3, 3.4 & ON \\ SL61 & 04:50:45 & -75:31:59 & 09.01.2016 & V, I & $3\times375$, $3\times560$ & 1.64 & 0.9, 0.8 & 0.7, 0.6 & 7.5, 6.9 & ON \\ SL897 & 06:33:01 & -71:07:40 & 23.02.2015 & V, I & $3\times375$, $3\times560$ & 1.34 & 1.5, 1.4 & 1.1, 0.9 & 3.5, 4.3 & ON \\ \hline \end{tabular} \label{tab:log} \end{table*} \subsection{Strategy} The overall primary goal of VISCACHA is to further investigate clusters in the outer LMC ring, and to explore the SMC halo and Magellanic Bridge clusters. A panorama of these external LMC and SMC structures and the already collected VISCACHA targets are given in Fig.~\ref{fig:visclu}. In the first outer LMC cluster catalogue \citep{Lynga:1963}, the outer LMC ring could be inferred. It appears to be a consequence of a nearly head-on collision with the SMC, similarly to the Cartwheel scenario \citep{Bica:1998}. This interaction is also responsible for the inflated SMC halo (Fig.~\ref{fig:visclu}). In \citet{Bica:2008} these structures can be clearly seen. In that study they found 3740 star clusters in the Magellanic System. However, this number does not account for other cluster types such as embedded clusters, small associations \citep{Hodge:1986}, and other types of objects. The north-east outer LMC cluster distribution has also been recently discussed by \citet{Pieres:2017}. The outer ring is located from 5 kpc to 7 kpc from the dynamical LMC centre, but well inside its tidal radius \citep[$\gtrsim$ 16 kpc -][]{Marel:2014}. Since there is a tendency for older clusters to be located in the LMC outer disk regions \citep{Santos:2006}, these objects are ideal candidates to be remnants from the LMC formation epoch. In particular, such clusters may belong to a sample without a counterpart in our Galaxy due to the different tidal field strengths, persisting as bound structures for longer times than in the Milky Way. In the SMC, the galaxy main body can be represented by an inner ellipsoidal region, while its outer part can be sectorised as proposed by \cite{Dias:2014,Dias:2016}: (i) a wing/bridge, extending eastward towards the Magellanic Bridge connecting the LMC and SMC; (ii) a counter-bridge in the northern region, which could represent the tidal counterpart of the Magellanic Bridge; (iii) a west halo on the opposite side of the bridge. These groups had also been predicted in the stellar distribution of \citet{Besla:2011} and \citet{Diaz:2012} models and most likely have a tidal origin tied to the dynamical history of the Magellanic Clouds. The wing/bridge clusters present distinct age and metallicity gradients \citep{parisi+15,Dias:2016} which could be explained by tidal stripping of clusters beyond 4.5 deg, radial migration, or merging of galaxies. The age and metallicity gradients in the west halo were used to propose that these clusters are moving away from the main body \citep{Dias:2016}, as confirmed later by proper motion determinations from VMC survey \citep{niederhofer+18}, HST and {\it Gaia} measurements \citep{zivick+18}. These radial trends are crucial to charaterise the SMC tidal structures and to define a more complete picture of its history. Photometric images with $BVI$ filters were obtained for approximately 130 clusters\footnote{ Eventually, the data acquired between 2006-2013 with the previous generation imager (SOI) will also be integrated in our database.} in the LMC, SMC and Bridge so far, during the semesters of 2015A, 2015B, 2016B and 2017B. Their distribution in the Magellanic System is shown in Fig.~\ref{fig:visclu}. \subsection{Instrumentation: SAMI data} Observation of our targets include short exposures to avoid saturation of the brightest stars ($V \sim 16$) and deep exposures to sample $V \sim 24$ stars with S/N~$\sim$~10. Photometric calibration of individual nights have been done by observing both \citet{Stetson:2000} (for extinction evaluation) and MCPS fields (for colour calibration) over the $B$, $V$ and $I$ filters. SAM is a GLAO module using a Rayleigh laser guide star at $\sim$7 km from the telescope. SAM was employed with its internal CCD detector, SAMI (4K$\times$ 4K CCD), set to a gain of 2.1\, e$^-$/ADU and a readout noise of 4.7\,e$^-$ and binned to 2$\times$2 factor, resulting in a plate scale of 0.091\,arcsec/pixel with the detector covering a field-of-view of 3.1$\times$3.1 arcmin$^2$ on the sky. Peak performance of the system produce FWHM $\sim$0.4 arcsec in the $I$ band and $\sim$0.5 arcsec in the $V$ band, which still allows for adequate sampling of the point spread function (PSF), reaching a minimum size of $\sim$4.4 pixels (FWHM) in those occasions. SAM operates at a maximum rate of 440Hz which means it can only correct the effects of ground-layer atmospheric turbulence if the coherence time is $\tau_0 > 2.3$ms. The closer the $\tau_0$ is to this limit the worse is the AO correction. In fact, Table \ref{tab:log} shows that although all clusters were observed under similar seeing and airmass, the delivered image quality (IQ) varied from target to target. The variation is explained by the free-atmosphere seeing variations (above 0.5km) that are not corrected by GLAO. The SMC clusters were observed under better conditions of the free-atmosphere and as a consequence have deeper photometry reaching the goals of the ideal performance for the VISCACHA data. For the last observation period (2017B), we only took short exposures in the B filter since SAM has optimal performance in $V$ and $I$ bands, which decreases towards blue wavelengths. This strategy allowed us to increase our number of targets observed with AO, improving the efficiency of the survey. It is worth noticing that even for observations with relatively high airmass ($X\sim 1.3-1.7$) the instrument performed well, improving the image quality, whenever the atmospheric seeing was around 1 arcsec. \section{Data Reduction} \label{sec:data} \subsection{Processing} The data were processed in a standard way with IRAF, using automated scripts designed to work on SAM images. Pre-reduction included bias subtraction and division by skyflats using the {\sc ccdred} package and cosmic rays removal with the {\sc crutil} package. Correction of the camera known optical distortion was also done, as it is large enough ($\sim$10\%) to shift stellar positions by more than 1 arcsec in some image areas. Subsequent astrometric calibration was performed with the {\sc imcoords} package, using astrometric references from 2MASS, GSC-2.3 and MCPS catalogues, and ensuring a typical accuracy better than $\sim0.1$ arcsec for all our images. See \citet{Fraga:2013} for further details in the processing and astrometric calibration procedures. The final processing step was to register the repeated long exposures in each filter to a common WCS frame and to stack them into a deeper mosaic using the IRAF {\sc immatch} package. To preserve image quality of our mosaics the co-added images were weighted according to their individual seeing ($\propto FWHM^{-2}$). This, allied with the good quality of our astrometric solutions, resulted in very little degradation of the stellar PSF ($<$ 10\%) in the resulting mosaics. \subsection{Photometry} \label{sec:psf} Stellar photometry was done using a modified version of the Starfinder code \citep{Diolaiti:2000}, which performs isoplanatic high resolution analysis of crowded fields by extracting an empirical PSF from the image and cross-correlating it with every point source detected above a defined threshold. The modifications were aimed mainly at automatising the code, minimising the user intervention. Modelling of each image PSF was carried out by using 20 to 50 bright, unsaturated stars presenting no bright neighbour closer than 6 FWHM. This initial PSF was used to model and remove faint neighbours around the initially selected stars, which were then reprocessed to generate a definitive PSF. Fig.~\ref{fig:psf} shows the resulting PSF of the deep $I$ mosaic of the cluster Kron 37 after the subtraction of secondary sources around the model stars. Even though the FWHM is only about 5 pixels, the PSF profile is clearly defined up to a distance of 30 pixels ($\sim$6 FWHM), well into the sky region. \begin{figure} \includegraphics[width=\linewidth]{fig_psf2.eps} \caption{Empirical PSF of Kron 37 in the I-band as shown by its image (top-left), marginal profile along the X-axis (bottom-left), Y-axis (top-right) and as a function of radius (bottom-right). The FWHM of this PSF is about 5 pixels (0.49 arcsec).} \label{fig:psf} \end{figure} Quality assessment of the PSF throughout the image was performed with the IRAF {\sc psfmeasure} task to derive the empirical FWHM and ellipticity of several bright stars over the image. Fig.~\ref{fig:psfqual} shows that the PSF shape parameters (e.g. FWHM, ellipticity), and consequently the AO performance, are very stable through the image, indicating that higher order terms (e.g. quadratically varying PSF) are not necessary to properly describe the stellar brightness profile on SAM images. \begin{figure} \includegraphics[width=\linewidth]{fig_psfqual2.eps} \caption{PSF quality assessment of Kron 37 I-band image. The stars are represented by asterisks with sizes proportional to their brightness on the central sky chart. Marginal distributions of the stellar FWHM (left and bottom panels) and ellipticity (right and top panels) are also shown. Stars presenting FWHM above the median value are represented by the bigger blue circles; all the other ones are marked with smaller red circles.} \label{fig:psfqual} \end{figure} \subsection{Performance: SAMI vs SOI} The members of the VISCACHA project have been acquiring SOAR data for a long time. Before the commissioning of the SAM imager, we have extensively used the previous generation imager SOI, establishing a considerable expertise with the instrument. The migration to the new imager after 2013, was an obvious choice given its performance increase over the older instrument. Therefore, we compare the performance of a typical optical imager without AO, such as SOI, with SAMI as we observed the cluster HW20 in the night 27/09/2016 with both instruments. Exposure times were (6$\times$200)\,s in the $V$ filter and (6$\times$300)\,s in $I$ filter. Although the Differential Image Motion Monitor (DIMM) reported a $0.85\arcsec$ seeing for the observations, the SOI $I$ image attained a stellar FWHM of $1.19\arcsec$ and the SAM image reached FWHM of $0.44\arcsec$ on closed loop. Fig.~\ref{fig:soisam} compares a section of the SAM and SOI $I$ images around the centre of HW20 and shows how the decrease of the seeing by the AO system reduces the crowding and effectively improves the depth of the image. \begin{figure} \centering \includegraphics[width=0.47\linewidth]{fig_SAMchart.eps}\hspace{0.2cm} \includegraphics[width=0.47\linewidth]{fig_SOIchart.eps} \caption{$I$ filter images of the centre of HW20 taken with SAM in closed loop (left panel) and with SOI (right panel) under comparable conditions. The stellar FWHM in the images are 0.44\arcsec and 1.19\arcsec respectively.} \label{fig:soisam} \end{figure} In addition, SOI presents relatively intense fringing in the $I$ filter, requiring correction for precision photometry. Since fringe correction requires at least a dozen dithered exposures of non-crowded fields, we have used a fringe pattern image we derived from 2012B data to correct the fringes in HW20. On the other hand, SAMI $I$ images show negligible to null fringing. Finally, to empirically compare the instruments, we have performed PSF photometry (see Sect.~\ref{sec:psf}) in the fringe-corrected SOI images and SAM images of HW20, subject to the same constraints and relative detection thresholds. Given the different fields of view of these instruments, we have restricted the analysis to an area of $3\arcmin \times 3\arcmin$ near the cluster centre, equally sampled by both instruments. Fig.~\ref{fig_soiphot} compares the photometric errors and depth reached by each instrument. It can be seen that with the AO system working at its best, SAM images reach more than one magnitude deeper than SOI under the same sky conditions. Furthermore, the improved resolution also helped detect and deblend more than twice the number of sources found by SOI, particularly in the fainter regime ($I \geq 22.0$). \begin{figure} \centering \includegraphics[width=0.9\linewidth]{fig_SOIlum.eps} \includegraphics[width=0.9\linewidth]{fig_SOIerror.eps} \caption{Comparison between SOI and SAM photometry of the HW20 cluster in the $I$ filter, showing the detected objects (top panel) and photometric errors (bottom panel) as function of magnitude. Under the same conditions SAM exposure reaches about 1.2 mag deeper on a photometric night.} \label{fig_soiphot} \end{figure} \subsection{Calibration} Transformation of the instrumental magnitudes to the standard system was done using at least two populous photometric standard fields from \citet{Stetson:2000} (e.g. SN1987A, NGC1904, NGC2298, NGC2818), observed at 2 to 4 different airmass through each night. Following the suggestions given in \citet{Landolt:2007}, the calibration coefficients derived from these fields were calculated in a two-step process: \begin{enumerate} \item[i)] airmass ($X_j$), instrumental ($m_j$) and catalogue ($M_j$) magnitudes in each band ($j$) were employed in a linear fit given by Eq.~\ref{eq:calext} to evaluate the extinction coefficients ($e_j$); \begin{equation} m_j - M_j = cte + e_{j} X_j \quad ; \label{eq:calext} \end{equation} \item[ii)] the extra-atmospheric magnitudes ($m_j^\prime = m_j - e_j X_j$) were then used to derive colour transformation coefficients ($c_j$) and zero-point coefficients ($z_j$) according to Eq.~\ref{eq:calcol}: \begin{eqnarray} \label{eq:calcol} v^\prime - V &=& z_v + c_v(V - I)\nonumber \\ (b^\prime -v^\prime) - (B-V) &=& z_{bv} + c_{bv}(B-V) \\ (v^\prime -i^\prime) - (V-I) &=& z_{vi} + c_{vi}(V-I) \nonumber \end{eqnarray} \end{enumerate} Figure~\ref{fig:calib} shows the fit of Eqs. \ref{eq:calext} and \ref{eq:calcol} to determine the $V$ filter extinction, zero-point and colour coefficients for stars in the NGC2818 and NGC2298 standard fields in the night of February 22, 2015. Since the stars in each standard field were observed more than once (typically at 3 different airmass), the fit of Eq.~\ref{eq:calext} was made in a star-by-star basis and the final extinction coefficient and its uncertainty determined from the average and deviation of the slopes found. This approach offers a better precision than a single global fitting (i.e. carried out over all stars simultaneously) such as done by {\sc iraf}, because the intrinsic brightness difference between the standard stars (i.e. the spread in the $y-$axis on the upper panel) is factored out. On the other hand, the colour and zero-point coefficients were found from a global solution using the extra-atmospheric magnitudes for all stars in the two standard fields by means of a robust linear fitting method. At this point, the combination of several standard fields in a single fit is advantageous as it provides a larger sample and wider colour range to help constrain the fit. These fitting procedures were applied to the data calibration from 18 nights observed through semesters 2015A$-$2016B, resulting in the mean coefficient values and deviations shown in Table~\ref{tab:coef}. These values are in excellent agreement with those reported by \citet{Fraga:2013}. \begin{figure} \centering \includegraphics[width=0.85\linewidth]{fig_calib1.eps} \includegraphics[width=0.85\linewidth]{fig_calib2.eps} \caption{Fits in the $V$ filter to determine the extinction coefficients (top) and the colour and zero-point coefficients (bottom) for the night of 22-02-2015, using the NGC2818 and NGC2298 standard fields. About 70 stars in both fields were used in the determination of the mean extinction coefficient and twice that number in the global fit to determine the colour coefficient. The resulting coefficients and their 6-$\sigma$ uncertainty level are represented by the solid and dashed lines respectively.} \label{fig:calib} \end{figure} \begin{table} \caption{Mean calibration coefficients through 2015A$-$2016B} \begin{tabular}{c r@{$\,\pm\,$}l r@{$\,\pm\,$}l r@{$\,\pm\,$}l r@{$\,\pm\,$}l} Coef. &\multicolumn{2}{c}{$B$} &\multicolumn{2}{c}{$V$} &\multicolumn{2}{c}{$I$} \\ \hline $e$ & $0.177$&$0.011$ & $0.106$&$0.006$ & $0.022$&$0.006$ \\ $c$ & $-0.193$&$0.008$ & $0.064$&$0.005$ & $-0.063$&$0.005$ \\ $z^*$ & $-0.138$&$0.006$ & $-0.549$&$0.005$ & $-0.582$&$0.005$ \\ \hline \end{tabular} $^*$ relative to the adopted zero point magnitude of 25. \label{tab:coef} \end{table} In order to calculate the photometric errors, we first write the colour calibration equations given by Eq.~\ref{eq:calcol} as the following system: \begin{equation} \begin{pmatrix} v - e_v X_v - z_v \\ b-v - e_b X_b + e_v X_v - z_{bv} \\ v-i - e_v X_v + e_i X_i - z_{vi} \end{pmatrix} = \begin{pmatrix} 1 & 0 & c_v \\ 0 & 1+c_{bv} & 0 \\ 0 & 0 & 1+c_{vi} \end{pmatrix} \cdot \begin{pmatrix} V \\ B-V \\ V-I \end{pmatrix} \label{eq:syscol} \end{equation} \noindent which can be more easily expressed in matrix notation by: \begin{equation} \boldsymbol{m}-\boldsymbol{e}-\boldsymbol{z} = \boldsymbol{C} \cdot \boldsymbol{M} \quad , \label{eq:matcol} \end{equation} \noindent where the instrumental quantities ($v$, $b-v$, $v-i$) and the corrections due to the zero point ($z$) and extinction ($e$) are now represented by vectors. The calibrated quantities vector ($V$, $B-V$, $V-I$) can be found by inverting this linear system, which requires only calculating the inverse of the colour coefficients matrix ($C$): \begin{equation} \boldsymbol{M} = \boldsymbol{C}^{-1} \cdot (\boldsymbol{m}-\boldsymbol{e}-\boldsymbol{z}) \quad . \label{eq:solcol} \end{equation} However, propagating the errors through this solution is more subtle, given that the matrix inversion is a nonlinear operation and that the resulting cofactors are often correlated with each other. Following the formalism in \citet{Lefebvre:00}, the total uncertainties on the calibrated quantities ($\boldsymbol{\sigma_M}$) can be derived analytically from the uncertainties of the instrumental quantities ($\boldsymbol{\sigma_m}$), zero point ($\boldsymbol{\sigma_z}$), extinction ($\boldsymbol{\sigma_e}$) and colour coefficients ($\boldsymbol{\sigma_C}$) as: \begin{multline} \boldsymbol{\sigma_M}^2 = (\boldsymbol{C}^{-1})^2 \cdot [\boldsymbol{\sigma_m}^2 + \boldsymbol{\sigma_e}^2 + \boldsymbol{\sigma_z}^2]\ + \\ + \boldsymbol{\sigma_{C^{-1}}}^2 \cdot (\boldsymbol{m} - \boldsymbol{e} - \boldsymbol{z})^2 \label{eq:calerr} \end{multline} \noindent where the uncertainties in the inverted colour coefficients matrix ($\boldsymbol{\sigma_{C^{-1}}}$) are calculated directly from the individual colour coefficients uncertainties as: \begin{multline} \boldsymbol{\sigma_{C^{-1}}}^2 = (\boldsymbol{C}^{-1})^2 \cdot \boldsymbol{\sigma_{C}}^2 \cdot (\boldsymbol{C}^{-1})^2 \\ = (\boldsymbol{C}^{-1})^2 \cdot \begin{pmatrix} 0 & 0 & \sigma_{c_v}^2 \\ 0 & \sigma_{c_{bv}}^2 & 0 \\ 0 & 0 & \sigma_{c_{vi}}^2 \end{pmatrix} \cdot (\boldsymbol{C}^{-1})^2 \label{eq:materr} \end{multline} According to this prescription the total photometric uncertainty of a source, defined by Eq.~\ref{eq:calerr}, can be understood as being composed of three components arising from: (i) the PSF photometry (first right hand term), (ii) the extinction correction (second right hand term) and (iii) the colour transformation to the standard system (remaining right hand terms), as shown in Fig.~\ref{fig:calerr}. In our data these uncertainties are typically dominated by the extinction correction and colour calibration contributions for stars brighter than $V\sim$19.5, which is about the red clump level of the SMC and LMC clusters, and by the photometric errors for stars fainter than that. Typically, we reached a final error of $\sim$0.1 mag for $V$=24 mag, which is more accurate than those obtained by surveys without the AO system (e.g SMASH, MCPS). A Monte-Carlo simulation was also employed to propagate the uncertainties through the calibration process. In each step, each coefficient (i.e. zero-point, extinction and colour ones) and instrumental magnitude were individually deviated from its assumed value using a random normal distribution of the respective uncertainty and the calibrated magnitudes calculated through Eq.~\ref{eq:solcol}. At the end of $10^6$ steps, the standard deviation of each calibrated magnitude was computed and assigned as its total photometric uncertainty. It can be seen in Fig.~\ref{fig:calerr} that the two solutions for propagating the uncertainties are equivalent, with only minor deviations. However, while the Monte-Carlo solution can be computing intensive, the analytical solution presented in Eq.~\ref{eq:calerr} requires negligible computational time. \begin{figure} \centering \includegraphics[width=0.75\linewidth]{fig_calerr.eps} \caption{Photometric uncertainties as function of $V$ for Kron 37. Contributions from the photometry (thin line), the extinction correction (dashed line) and the colour calibration (dotted line) compose the total photometric uncertainty (solid line), which was also derived using a Monte-Carlo simulation (dot-dashed line).} \label{fig:calerr} \end{figure} \subsection{Completeness} \label{sec:compl} Artificial star tests were performed in each image of the present sample in order to derive completeness levels as function of magnitude and position. The empirical PSF model was used to artificially add stars with a fixed magnitude to the image in a homogeneous grid, with a fixed spacing of 6 FWHM to prevent overlapping of the artificial star wings and overcrowding the field. Several grids with slightly different positioning and with stellar magnitudes ranging from 16 to 25 were simulated, generating more than 100 artificial images for each original one. Photometry was carried out over the artificial images using the same PSF and detection thresholds as in the original one, and the local recovery fraction of the artificially added stars used to construct spatially resolved completeness maps, as shown in Fig.~\ref{fig:compl} for Kron\,37 at $V=23$mag. It can be seen that incompleteness can severely hamper the analysis of the low mass content of the cluster, as the local completeness value near the centre ($\lesssim 15\%$) falls much more rapidly than the overall field value ($\sim 85\%$). The same trend is clear in Fig.~\ref{fig:complmag} where average completeness curves are shown for three regions: the whole image, the cluster core region and the region outside it. It can be seen that completeness assessments based on an average of the whole image are too optimistic by a factor of 20-50\% towards the inner regions of the cluster for stars fainter than the main sequence turnoff level. Usually, the RGB stars have 100\% completeness and it starts to decrease from the turnoff towards fainter stars. Because of that we consider the dependence on the magnitude and on the position when applying photometric completeness corrections, before RDP and CMD fitting. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{fig_k37_ast2.eps} \caption{Completeness map for Kron\,37, constructed by artificially adding $V = 23$ stars over the original image in uniform grids with 6 FWHM spacing, covering the entire image. Even though the average completeness over the image is $\sim$85\%, near the centre of the cluster it drops nearly to zero ($<$ 15\%).} \label{fig:compl} \end{figure} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{fig_k37_ast1.eps} \caption{Completeness as a function of $V$ magnitude for Kron\,37 over three different regions: the region inside the core radius (down facing red triangles), the one outside it (up facing green triangles) and the whole image (filled black diamonds).} \label{fig:complmag} \end{figure} \section{Analysis and Methodology} \label{sec:analysis} \subsection{Radial profile fitting} \label{sec:analysis_rdp} Given the nature of stellar clusters, it is expected that photometry incompleteness will be higher toward their central regions (see Sect.~\ref{sec:compl}). Therefore, if stellar counts are employed to build radial profiles, reliable structural parameters can only be derived after a spatially resolved completeness correction is carried out \citep[e.g. as in][]{Maia:2016,Dias:2016}. Alternatively, brightness profiles measured directly over the clusters' images can also be used \citep{Piatti:2018b}. Once a reliable radial profile is built, cluster parameters are usually inferred by fitting an analytic model which describes its stellar distribution. Although the \citet{King:1962} model has long been used in describing Galactic clusters, the EFF model \citep{Elson+87} arguably provides better results for young clusters in the LMC, presenting very large halos. In addition, it has the advantage of also encompassing the \citet{Plummer:1911} profile, largely used in simulations. Nevertheless, we preferred the \citet{King:1962} model as it provides a truncation radius to the cluster, effectively defining its size, whereas the EFF model cluster has no such parameter. Also, it generally yields best fits than the EFF model for intermediate-age and old clusters in the Clouds \citep{Werchan:2011, hill+06}. We note that dynamical models such as the \citet{King:1966} and \citet{Wilson:75} have also been successfully used to describe finite Magellanic Clouds clusters with extended halos \citep{McLaughlin:05}, being excellent alternatives. Following this reasoning we have adopted two methods to infer the structural parameters of the present sample. First, surface brightness profiles (SBPs) were derived directly from the calibrated $V$ and $I$ images. Stellar positions and fluxes were extracted from the reduced frames using {\sc DAOPHOT} \citep{Stetson:1987}, considering only sources brighter than 3 $\sigma$ above the sky level. The centre was then determined iteratively by the stars' coordinates centroid within a visual radius\footnote{A circular region defined by visual inspection that encompasses a relevant portion of the cluster.}, starting with an initial guess and adjusted for the new centre at each step. Thereafter, the flux median and dispersion were calculated from the total flux measured in eight sectors per annular bin around this centre. The sky level, obtained from the whole image, was subtracted before the fitting procedure. Although the $I$ band provides the best image quality compared with the $V$ band, its enhanced background makes the resulting profiles noisier. Since smaller uncertainties were achieved for the $V$ band, it was the one used in the present analysis. The King model \citep{King:1962} parameters --- central surface brightness ($\mu_0$), core radius ($r_c$) and tidal radius ($r_t$) --- were estimated by fitting the following function to the SBPs: \begin{equation} \mu(r)=\mu'_0+5\log\left[\frac{1}{\sqrt{1+(r/r_c)^2}}-\frac{1}{\sqrt{1+(r_t/r_c)^2}} \right] \label{eq:king_sbp} \end{equation} \noindent where \begin{equation} \mu'_0=\mu_0+5\log\left[1-\frac{1}{\sqrt{1+(r_t/r_c)^2}} \right] . \end{equation} \noindent The fitting range was restricted to the cluster limiting radius, defined as the point where the flux profile reaches an approximately constant level. From the limiting radius outward, the flux measurements were used to compute the stellar background/foreground, which was subtracted from the profile before fitting. There were cases for which it was not possible to obtain $r_t$ because background fluctuations dominate the outer profile. Fig.~\ref{fig:king} (top panel) shows the fit of Eq.~\ref{eq:king_sbp} to the SBP of Kron 37. The results for the other clusters in our sample can be found in the appendix (Figs.~\ref{fig:SBPs_LMC_king} and \ref{fig:SBPs_SMC_king}). \begin{figure} \centering \includegraphics[width=\linewidth]{fig_sbp_k37.eps} \includegraphics[width=\linewidth]{fig_rdp_k37.eps} \caption{Top panel: fit to the SBP of Kron 37 in the $V$ band along with the residuals of the fit (bottom sub-panel) and the derived parameters: $\mu_{0}$, $r_c$ and $r_t$. Bottom panel: fit to the completeness corrected stellar density profile of Kron 37 (filled diamonds), for the determination of the parameters $\rho _{0}$, $r_c$ and $r_t$. Residuals of the fit (bottom sub-panel) and the RDP prior to the completeness correction (open diamonds) are also shown. } \label{fig:king} \end{figure} As a second approach, we have derived the clusters structural parameters from classical radial density profiles (RDPs) built from completeness corrected stellar counts \citep[e.g][] {Maia:2016}, using the King analytical profile: \begin{equation} \rho (r) = \rho_0 \left[ \frac{1}{\sqrt{1+(r/r_c)^2}} - \frac{1}{\sqrt{1+(r_t/r_c)^2}} \right]^2 + \rho_\mathrm{bg}. \label{eq:king_rdp} \end{equation} \noindent Four different bin sizes were used to build the density profile, keeping the smallest bin size at about the cluster core radius. The fit for Kron 37 is shown in Fig.~\ref{fig:king} (bottom panel). It should be noted that a radial profile without any completeness correction (open diamonds) also fits a King profile perfectly well. Although the fit converges, the results obtained are not astrophysically meaningful; the tidal radii can be recovered because incompleteness is not severe there, but the core radii are always in error, usually overestimated by a factor of 2 or higher. The fits for the remaining clusters are shown in Figs.~\ref{fig:RDPs_LMC} and \ref{fig:RDPs_SMC}. The SBP and the RDP are complementary measurements of cluster structure. While SBPs are less sensitive to incompleteness than RDPs, a critical issue towards the clusters' centre, stochasticity and heterogeneity of field stars towards the outer cluster regions make the fluctuations on the SBP background much higher than those of the RDP background. Even if this can hinder or even make impossible the determination of the tidal radius in SBPs, the problem is mitigated in the RDPs, allowing reliable determination of this parameter even without completeness correction. While the SBP uncertainties grow from the cluster centre to its periphery due to progressive flux depletion, the RDP uncertainties decrease in this sense as a consequence of the steadily rise of the number of stars. By combining the structural parameters obtained from King (1962) model fitting to the SBP and to the RDP of the clusters, we expect to minimize such uncertainties across the entire profile. The parameters' weighted average and uncertainty were calculated as: $$ \bar{x}=\dfrac{\sum(x_i/\sigma_i^2)}{\sum(1/\sigma_i^2)} ,$$ \noindent $$ \sigma_{\bar{x}}=\sqrt{\dfrac{1}{\sum(1/\sigma_i^2)}} .$$ The tidal radii of the clusters K\,37, HW\,20 and KMHK\,228 come only from the RDP because their fits did not converge for the SBP. Based on the resulting $r_c$ and $r_t$ values, the clusters concentration parameter $c \equiv \log{(r_t/r_c)}$ \citep{King:1962} was also derived. Table \ref{tab:structpar} compiles the resulting structural parameters for the present clusters. \begin{table*} \caption{Structural parameters of target clusters} \begin{tabular}{lccc r@{$\pm$}l r@{$\pm$}l r@{$\pm$}l r@{$\pm$}l} \hline Name & RA & Dec & $\mu_0$ & \multicolumn{2}{c}{$r_c$} & \multicolumn{2}{c}{$r_t$} & \multicolumn{2}{c}{$c$} & \multicolumn{2}{c}{$\sigma_\mathrm{bg}$} \\ & [h:m:s] & [\,$^\circ$\,:\,$\arcmin$\,:\,$\arcsec$\,] & [mag$\cdot$arcsec$^{-2}$] & \multicolumn{2}{c}{[arcsec]} & \multicolumn{2}{c}{[arcsec]} & \multicolumn{2}{c}{ } & \multicolumn{2}{c}{[$10^{-3}\cdot$arcsec$^{-2}$]} \\ \hline AM3 & 23:48:59 & -72:56:43 & 22.7$\pm$0.3 & 5.6&0.8 & 54&8 & 0.9&0.1 & 1.0&0.1 \\ HW20 & 00:44:47 & -74:21:46 & 22.6$\pm$0.3 & 10.8&2.0 & 37&11 & 0.5&0.2 & 30.7&9.5 \\ K37 & 00:57:47 & -74:19:36 & 20.8$\pm$0.2 & 11.3&1.5 & 83&17 & 0.8&0.1 & 23.6&6.7 \\ NGC796 & 01:56:44 & -74:13:10 & 18.4$\pm$0.3 & 3.2&0.5 & 97&9 & 1.2&0.1 & 1.5&0.5 \\ KMHK228 & 04:53:03 & -74:00:14 & 23.8$\pm$0.4 & 19.8&5.9 & 68&16 & 0.6&0.2 & 25.6&2.9 \\ OHSC3 & 04:56:36 & -75:14:29 & 19.4$\pm$0.7 & 4.3&0.7 & 42&6 & 0.9&0.1 & 12.9&3.7 \\ SL576 & 05:33:13 & -74:22:08 & 20.0$\pm$0.2 & 10.6&1.3 & 43&5 & 0.6&0.1 & 30&14 \\ SL61 & 04:50:45 & -75:31:59 & 22.1$\pm$0.2 & 26.5&2.6 & 162&44 & 0.8&0.2 & 0.1&6.2 \\ SL897 & 06:33:01 & -71:07:40 & 21.2$\pm$0.2 & 12.0&1.7 & 87&9 & 0.9&0.1 & 2.8&0.9 \\ \hline \end{tabular} \label{tab:structpar} \end{table*} \subsection{Isochrone fitting} \label{sec:analysis_iso} For the analysis of the photometric data, we initially used the structural parameters to define the cluster and field samples within each observed field. Usually all stars inside the cluster tidal radius were assigned to the cluster sample and the ones outside it to the field sample. For a few clusters presenting $r_t$ close to or larger than the image boundaries (i.e. leaving no field sample), half the tidal radius was employed as a cluster limit instead. Integration of the King profiles have shown that depending on the concentration parameter, 75\% ($c\sim$ 0.5) to 99\% ($c \gtrsim$ 1.0) of the cluster population lies within that radius, ensuring sufficient source counts in both cluster and field samples. The implications of this choice are discussed and accounted for in Sect~\ref{sec:analysis_mf}. Then, a decontamination procedure \citep{Maia:2010} was applied to statistically probe and remove the most probable field contaminants from the cluster region, based on both the positional and the photometric characteristics of the stars, comparing the cluster and field regions defined above. The field decontaminated CMD of the clusters were then used to derive their astrophysical parameters via the Markov-Chain Monte-Carlo technique in a Bayesian framework. The likelihood function was derived using PARSEC isochrones \citep{Bressan:2012} to build synthetic CMDs of simple stellar populations, spanning a wide range of parameters \citep[e.g.][]{Dias:2014}. Figure~\ref{fig:bayes} shows the posterior distribution of the determined parameters for Kron 37. Typical uncertainties of the method are about $0.15$ dex in metallicity, $10$-$20\%$ in age, $\sim$2 kpc in distance and $\sim$0.02 mag in colour excess. Figure~\ref{fig:syntcmd} shows the best model isochrone and the synthetic population superimposed over the Kron 37 decontaminated CMD. Respective figures for all other SMC and LMC clusters can be found in Appendix \ref{sec:app2}. The distance estimates were used to convert the core and tidal radii previously derived in Sect.~\ref{sec:analysis_rdp} to physical sizes, thus allowing a more meaningful comparison of their values. Most of our targets present core sizes of 2-3 pc, with the exceptions of NGC796 and OHSC3 which showed more compact cores and SL61 presenting a very inflated one. Tidal sizes were mainly found in the range of 10-20 pc, except for K37, NGC796 and SL61, presenting larger tidal domains. Table \ref{tab:results} compiles the resulting astrophysical parameters. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{fig_corner_k37.eps} \caption{Posterior distribution of parameters derived for Kron 37 using a MCMC bayesian framework. The derived parameters and their uncertainties are also shown.} \label{fig:bayes} \end{figure} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{fig_iso_k37.eps} \caption{Best model isochrone (solid line) and synthetic population (gray dots) corresponding to the Kron 37 parameters, superimposed over its field decontaminated CMD. } \label{fig:syntcmd} \end{figure} \begin{table*} \centering \caption{Astrophysical parameters from isochrone and mass function fits.} \begin{tabular}{lcccccccccc} \hline Name & galaxy & $r_c$ & $r_t$ & Age & [Fe/H] & E(B-V) & dist. & M$_\mathrm{obs}$ & M$_\mathrm{int}$ & $\alpha$ \\ & & [pc] & [pc] & [Gyr] & & & [kpc] & [10$^3$ M$_\odot$] & [10$^3$ M$_\odot$] & \\ \hline AM3 & SMC & 1.76$\pm$0.26 & 17.0$\pm$2.6 & $5.48^{+0.46}_{-0.74}$ & $-1.36^{+0.31}_{-0.25}$ & $0.06^{+0.01}_{-0.02}$ & $64.8^{+2.1}_{-2.0}$ & 0.23$\pm$0.05 & $--$ & $-$0.27$\pm$0.98 \\ HW20 & SMC & 3.26$\pm$0.61 & 11.2$\pm$3.3 & $1.10^{+0.08}_{-0.14}$ & $-0.55^{+0.13}_{-0.10}$ & $0.07^{+0.02}_{-0.01}$ & $62.2^{+2.5}_{-1.2}$ & 0.56$\pm$0.10 & 2.06$\pm$0.43 & $-$2.51$\pm$0.61 \\ K37 & SMC & 3.42$\pm$0.47 & 25.1$\pm$5.2 & $1.81^{+0.24}_{-0.21}$ & $-0.81^{+0.13}_{-0.14}$ & $0.05^{+0.01}_{-0.02}$ & $62.4^{+2.3}_{-1.8}$ & 2.58$\pm$0.19 & 9.20$\pm$2.03 & $-$1.97$\pm$0.22 \\ NGC796 & Bridge & 0.94$\pm$0.15 & 28.4$\pm$2.9 & $0.04^{+0.01}_{-0.02}$ & $-0.31^{+0.09}_{-0.12}$ & $0.02^{+0.01}_{-0.01}$ & $60.3^{+2.7}_{-2.4}$ & 1.12$\pm$0.22 & 3.60$\pm$0.70 & $-$2.31$\pm$0.17 \\ KMHK228 & LMC & 5.8$\pm$1.7 & 19.8$\pm$4.7 & $0.88^{+0.33}_{-0.16}$ & $-0.20^{+0.06}_{-0.06}$ & $0.05^{+0.03}_{-0.01}$ & $60.0^{+1.9}_{-2.4}$ & 0.23$\pm$0.05 & 1.35$\pm$0.30 & $-$2.48$\pm$0.52 \\ OHSC3 & LMC & 1.01$\pm$0.17 & 9.8$\pm$1.5 & $1.79^{+0.22}_{-0.20}$ & $-0.70^{+0.13}_{-0.24}$ & $0.07^{+0.02}_{-0.02}$ & $48.3^{+2.0}_{-1.8}$ & 0.44$\pm$0.10 & $--$ & $-$1.18$\pm$0.45 \\ SL576 & LMC & 2.64$\pm$0.34 & 10.7$\pm$1.3 & $0.97^{+0.10}_{-0.11}$ & $-0.39^{+0.08}_{-0.12}$ & $0.02^{+0.03}_{-0.01}$ & $51.3^{+1.9}_{-2.4}$ & 1.81$\pm$0.22 & 5.83$\pm$1.09 & $-$2.14$\pm$0.39 \\ SL61 & LMC & 6.55$\pm$0.68 & 40$\pm$11 & $2.08^{+0.27}_{-0.21}$ & $-0.44^{+0.14}_{-0.19}$ & $0.10^{+0.02}_{-0.02}$ & $51.0^{+1.5}_{-1.7}$ & 3.02$\pm$0.25 & 7.00$\pm$1.19 & $-$1.72$\pm$0.30 \\ SL897 & LMC & 2.65$\pm$0.39 & 19.2$\pm$2.2 & $1.19^{+0.14}_{-0.12}$ & $-0.32^{+0.11}_{-0.14}$ & $0.09^{+0.02}_{-0.02}$ & $45.6^{+2.4}_{-1.6}$ & 1.17$\pm$0.14 & 5.11$\pm$1.07 & $-$2.49$\pm$0.36 \\ \hline \end{tabular} \label{tab:results} \end{table*} \subsection{Stellar mass function fitting} \label{sec:analysis_mf} The distribution of mass in a stellar cluster can yield important information on its evolutionary state and on the external environment. As none of the studied objects show any sign of their pre-natal dust or gas given their ages, their stellar components are the only source of their gravitational potential \citep[e.g.][]{lada+03}. Thus, the number of member stars and their concentration will determine, in addition to the galaxy potential, for how long clusters survive. To derive the stellar mass distribution of the target clusters, a completeness corrected $M_I$ luminosity function (LF) was first built by applying the distance modulus and extinction corrections to the stars' magnitudes. Afterwards, the LF was converted to a mass function (MF) employing the mass-$M_I$ relation from the clusters' best-fitted model isochrone, using the procedure described in \citet{Maia:2014}. The observed cluster mass ($M_\mathrm{obs}$) is then obtained by adding up the contributions of individual bins across the MF. The MF slope was determined by fitting a power law over the cluster mass distribution. Following the commonly used notation, our power law can be written as: \begin{equation} \xi(m) = \frac{dN}{dm} = Am^{\alpha}, \label{eq:mf} \end{equation} \noindent where $\alpha$ is the MF slope and $A$ is a normalisation constant. To avoid discontinuities and multiple values in the $M_I$-mass relationships, the MF slope fitting procedure was restricted to main sequence stars, thus excluding giants beyond the turn-off. The masses and the stellar MF slopes obtained for all clusters are shown in Table~\ref{tab:results}. Fig.~\ref{fig:mf} shows the luminosity function, the resulting mass function and the fit of Eq.~\ref{eq:mf} for Kron 37. Figs.~\ref{fig:MFs_SMC} and \ref{fig:MFs_LMC} show the resulting LF and MF for the remaining samples clusters. We typically reach stellar masses as low as 0.8 $M_{\odot}$ under good AO performance, and about 1.0 $M_{\odot}$ otherwise. This limit is deeper than that reached by large surveys in the crowded regions of star clusters (e.g. MCPS will reach $\sim$2.5 $M_\odot$ at 50\% completeness level for a typical main sequence star in the SMC). We note that the spatially resolved completeness correction employed is crucial in probing the low-mass regime. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{fig_lf_k37.eps} \includegraphics[width=0.9\linewidth]{fig_mf_k37.eps} \caption{Top panel: $M_I$ luminosity function for Kron 37 built with the observed (filled histogram) and completeness corrected (open histogram) samples. Bottom panel: resulting mass function of Kron 37 from observed (open symbols) and completeness corrected (filled symbols) samples. The turn-off magnitude and mass are indicated by a vertical dashed line and the best fitting power-law is represented by the solid line. Total observed mass and resulting MF slope are also indicated.} \label{fig:mf} \end{figure} Whenever it could be assumed that a cluster stellar content follows the IMF, i.e. it presents a (high mass) MF slope that is compatible with the expected value of $\alpha=-2.30 \pm 0.36$ given by \citet{Kroupa:2013}, its total mass was estimated by integrating this analytical IMF down to the theoretical mass limit of 0.08 M$_\odot$. Uncertainties on the IMF analytical parameters and the normalization constant $A$, derived in the MF fit, were properly propagated into the total integrated mass (M$_\mathrm{int}$), shown in Table~\ref{tab:results}. Since clusters K37, NGC796, SL61 and SL897 presented sizes ($r_t$) outside or very close to the image boundaries, their mass functions were estimated using only stars inside their inner region (within half $r_t$). Their total observed masses were later corrected to their full spatial extent based on integrations of their King profiles. Given the way the stars are distributed in each cluster, the correction factors amounted to 1.01-1.35, being higher for less concentrated clusters like SL61 and almost negligible to the concentrated ones like NGC796. This was also reflected on the MF slope of these two clusters, which were found slightly flatter than the IMF, indicating a deficit of low mass content in their inner region. This could be interpreted as a sign of mass segregation or preferential loss of the low mass content, depending on whether these stars are found in the periphery of these clusters or not. Both hypotheses have implications regarding the clusters dynamical evolution and the external tidal field acting on them. Similarly, AM3 and OHSC3 presented MF slopes significantly flatter than expected by the IMF. Since their full extent was sampled by the images, it is possible to assert that severe depletion of their lower mass content took place. Their low mass budget and advanced ages makes them specially susceptible to stellar evaporation and tidal stripping effects. The remaining clusters showed no such signs of depletion of their stellar content. In most cases the total integrated mass is 2-4 times the observable mass of the cluster. This can be explained by the shape of the IMF which peaks around 0.5 M$_\odot$, below the minimum observed mass of $\sim$0.8--1.0 M$_\odot$, implying that most of the cluster mass lies in the less massive stellar content, unseen by our observations. The errors of the integrated masses are larger than those of the observed masses because they include (and are dominated by) the uncertainty in the exponents of the adopted IMF \citep{Kroupa:2013} in this lower mass regime. \section{First Results} \label{sec:results} Tables \ref{tab:structpar} and \ref{tab:results} summarize the parameters determined for a sample of 9 clusters from the present data set. These were chosen to represent the large variety of cluster types found, in terms of richness, ages, metal content and density. In this section, we discuss our results in comparison with those provided in the literature. Many clusters had their ages previously derived from integrated photometry and ours are the first estimates based on stellar isochrone fitting. Similarly, distances and/or metallicities were often assumed constant in previous photometric studies, making our values the first set of simultaneously derived, self-consistent parameters. In addition, determinations of most of the clusters' mass budgets and mass distributions were done for the first time in this work. Particularly, we derived for the first time the considered astrophysical parameters for HW20 and KMHK228. We discuss below the results for each cluster and compare them with the available literature. \subsubsection*{OHSC\,3 (LMC)} From integrated spectroscopy, \cite{Dutra:2001} obtained an age of 1-2\,Gyr for OHSC\,3, in agreement with our determination, and reddening $E(B-V)$=0.12 from \cite{Schlegel:1998} dust maps, a little over our estimate from isochrone fitting. \subsubsection*{SL\,576 (LMC)} \cite{Bica:1996} derived for SL\,576 an age in the range 200-400\,Myr from the measured integrated colours ($U-B$)=0.08 and ($B-V$)=0.38 and their calibration with \cite{Searle:1980} SWB type. Our analysis gave an age consistent with a much older cluster (0.97\,Gyr). Integrated colours may be affected by stochastic effects from bright field stars superimposed on the cluster direction, specifically in this case a non-member blue star would contribute to lower the cluster integrated colours, and so mimicking a younger cluster. On the other hand, in our photometry this issue was accounted for with the decontamination procedure where any outsider is excluded before the isochrone fitting. \subsubsection*{SL\,61 (LMC)} Among the LMC clusters in our sample, SL\,61 (=LW\,79) is the most studied. \cite{Geisler:1997} determined an age of 1.8\,Gyr by measuring the magnitude difference between main sequence turnoff and red clump and using a calibration of this parameter with age. Its integrated colours, ($U-B$)=0.27 and ($B-V$)=0.59, place SL\,61 in the age range 0.6-2.0\,Gyr \citep{Girardi:1995,Bica:1996}. By adopting ($m-M$)$_\circ$ = 18.31 and $E(B-V)$ = 0.08 from independent measurements, \cite{Mateo:1988} performed isochrone fits to the clusters' cleaned CMD built from $BVR$ photometry \citep{Mateo:1987}, obtaining [Fe/H]=0.0 and an age of 1.8\,Gyr or 1.5\,Gyr depending on the stellar models used, with or without overshooting, respectively. \cite{Grocholski:2007} redetermined an age of 1.5\,Gyr based on the cluster photometry by \cite{Mateo:1987} and updated isochrones. Using the red clump $K$ magnitude, they obtained a distance of $49.9\pm 2.1$\,kpc, and considering \cite{Burstein:1982} extinction maps, a reddening of $E(B-V)=0.11$ was adopted. From a calibration of the Ca\,II triplet with metallicity, \cite{Grocholski:2006} derived [Fe/H]$=-0.35\pm0.04$ from 8 stars and \cite{Olszewski:1991}, using the same technique, obtained [Fe/H]=-0.50 based on a single cluster star. In general, our results are in agreement with those of the literature, which are compatible among themselves. Regarding the cluster age, our value (2.08\,Gyr) is consistent with literature upper estimates given the uncertainties quoted in Table~\ref{tab:results}. Since our deep photometry resolves stars some magnitudes below the turnoff, we are confident of the age derived, because the CMD region most sensitive to age was assessed and thus a reliable isochrone match was possible. Our derived metallicity is intermediate between those determined from Ca\,II triplet spectra. The same conclusion can be drawn for the reddening and distance derived. \subsubsection*{SL\,897 (LMC)} Integrated photometry of SL\,897 (=LW\,483) yielded colours ($U-B$)=0.24 and ($B-V$)=0.56, that are compatible with an intermediate-age (400-800\,Myr) cluster \citep{Bica:1996}. \cite{Piatti:2016} investigated the cluster by means of $gi$ photometry using the 8-m Gemini-S telescope obtaining a deep, high quality CMD. Isochrone fits to a cleaned CMD determined an age of $1.25\pm0.15$\,Gyr by adopting initial values of metallicity ([Fe/H]=-0.4), reddening ($E(B-V)$=0.075) and distance modulus (($m-M$)$_\circ=18.49\pm0.09$) from previous observational constraints. Recalling that in our analysis all parameters were free in the search for the best solution, we found similar age, metallicity and reddening (see Table~\ref{tab:results}). As for the distance, our study places the cluster closer than the LMC average, the value used by \cite{Piatti:2016}. This is also the only cluster in our LMC sample that had its structural properties previously investigated, allowing a direct comparison with our results. \cite{Piatti:2016} derived $r_c=2.7\pm0.5$\,pc and $r_t=36.4\pm2.4$\,pc from star counts. While our determined core radius is similar ($r_c=2.6\pm0.4$\,pc), our tidal radius ($r_t=19.2\pm2.2$\,pc) is considerably smaller, but comparable to their value for the cluster radius ($r_{cls}=21.8\pm1.2$\,pc). Besides the distance difference, we identified two possible reasons for this discrepancy: (i) while \cite{Piatti:2016} RDP extends to $\sim 160\,\arcsec$, ours is restricted to $\sim 80\,\arcsec$ and (ii) their photometry being slightly deeper, it may catch lower mass stars which occupy cluster peripheral regions as a consequence of evaporation and mass segregation. We postpone a detailed analysis of this issue for a forthcoming paper dealing with structural parameters of VISCACHA clusters. \subsubsection*{KMHK\,228 (LMC)} For KMHK\,228 we provide astrophysical parameters for the first time. \subsubsection*{AM\,3 (SMC)} This is one of the three clusters discovered by \cite{madore+79} who indicated it as the possible westernmost cluster of the SMC. It is also in the west halo group classified by \cite{Dias:2014}. The reddening was derived only by \cite{Dias:2014} as E(B-V)=0.08$\pm$0.05 which agrees very well with our derived value of E(B-V)=0.06$^{+0.01}_{-0.02}$. Distance was only derived by \cite{Dias:2014} as 63.1$^{+1.8}_{-1.7}$ kpc in good agreement with our result of 64.8$^{+2.1}_{-2.0}$ kpc. The age of AM\,3 was derived by \cite{Dias:2014} as 4.9$^{+2.1}_{-1.5}$ Gyr, and also by \cite{piatti+15wash,piatti+11,dacosta99} as 4.5$\pm$0.7 Gyr, 6.0$\pm$1.0 Gyr, and 5-6 Gyr respectively, but the last three fixed distance and reddening values to derive the age. Nevertheless all age estimates agree with ours of 5.5$^{+0.5}_{-0.7}$ Gyr. Metallicity was only derived from photometry so far: [Fe/H] = -0.75$\pm$0.40, -0.8$^{+0.2}_{-0.6}$, -1.25$\pm$0.25, -1.0 by \cite{piatti+15wash,Dias:2014,piatti+11,dacosta99} respectively, and now we derived [Fe/H] = -1.36$^{+0.31}_{-0.25}$. This rather large uncertainty in metallicity is owing to the low number of RGB stars to properly trace its slope. We are carrying out a spectroscopic follow-up to better constrain the AM3 metallicity. The structural parameters were only derived by \cite{Dias:2014}: $r_c=18.1\pm1.1\arcsec$ and $r_t=62\pm6\arcsec$. The tidal radius agrees with our value of $r_t=54\pm8\arcsec$ and with the estimated size of 0.9$\arcmin$ from the Bica catalogue \citep{bica+95}. The core radius is larger than that derived by us, $r_c=5.6\pm0.8\arcsec$. The difference comes from the unresolved stars in the centre of the cluster using SOI photometry by \cite{Dias:2014}, who derived only the RDP and were limited by some bright stars in the inner region. We could resolve the central stars using AO with SAMI and we confirmed the core radius using the SBP. \cite{dacosta99} estimated M$_{\rm V}=-3.5\pm0.5$ mag as the total luminosity of AM\,3, which corresponds to M$\sim2.5\times10^3$M$_{\odot}$. We refrained from calculating a total integrated mass for AM3, given that its MF slope showed heavy depletion of its lower mass stellar content. This behavior implies a smaller contribution from the unseen low mass content, meaning that its integrated mass would be closer to the observed mass budget. \subsubsection*{HW\,20 (SMC)} This cluster belongs to the wing/bridge group in the classification of \cite{Dias:2014}. We derive accurate age, metallicity, distance, and reddening for the first time and found 1.10$^{+0.08}_{-0.14}$ Gyr, [Fe/H] = -0.55$^{+0.13}_{-0.10}$, E(B-V) = 0.07$^{+0.02}_{-0.01}$, d = 62.2$^{+2.5}_{-1.2}$ kpc. The only previous estimatives of age and metallicity were done by \cite{rafelski+05} fitting integrated colours to two models and different metallicities. The combination with smaller error bars is using STARBURST: [Fe/H] $\approx$ -1.3 and age 5.7$^{+0.8}_{-4.3}$ Gyr, which is very different from our determinations. Another combination agrees better with our results but with larger error bars using GALEV: [Fe/H] $\approx$ -0.7, age 1.2$^{+9.1}_{-0.5}$ Gyr. The structural parameters were derived before by \cite{hill+06}: $r_c = 3.05$ pc and the 90\% light radius as 18.28 pc. The core radius agrees well with our determination of $r_c = 3.26\pm0.61$ pc, but their 90\% radius is significantly larger than the tidal radius derived here: $r_t = 11.2\pm3.3$ pc. The size estimated in the Bica catalogue \citep{bica+95} of 0.75$\arcmin$ agrees better with our tidal radius of 37$\pm$11$\arcsec$. \cite{hill+06} used photometry from the MCPS that is limited to $V<21$ mag while we included also fainter stars down to $V<24$ mag. Figs. \ref{fig:SBPs_SMC_king} and \ref{fig:RDPs_SMC} show that the sky background is high, and that a tidal radius much larger than 11-12$\arcsec$ would not fit the profile. It is possible that the fitting by \cite{hill+06} was limited by a poor determination of the sky background based only on bright stars in a crowded region. \cite{rafelski+05,hill+06} derived $M_{\rm V}$ = 14.97 and 16.2, which corresponds to $M \sim$ 4.3$\times10^3$M$_{\odot}$ and $\sim$ 1.2$\times10^3 M_{\odot}$. Our mass determination is within this range: $M = 2.06\pm 0.43\times10^3 M_{\odot}$. \subsubsection*{K\,37 (SMC)} This is also a wing/bridge cluster in the classification of \cite{Dias:2014}. SIMBAD classifies it as an open Galactic cluster, but based on its position and distance, it is probably an SMC cluster. Accurate age was derived only by \cite{piatti+11} as 2.0$\pm$0.3 Gyr based on the magnitude difference between MSTO and RC. \cite{glatt+10} estimated $\sim$1.0 Gyr with error bars larger than 1-2 Gyr based on MCPS photometry that is limited to clusters younger than 1 Gyr. \cite{rafelski+05} derived ages based on integrated colours, and the combination of model, metallicity, and age with smaller error bars led to an age of 1.13$^{+0.05}_{-0.10}$ Gyr for a metallicity of [Fe/H] $\sim$ -0.7. Accurate spectroscopic metallicity was derived by \cite{parisi+15} as [Fe/H] = -0.79$\pm$0.11 based on CaII triplet lines. \cite{piatti+11} derived [Fe/H] = -0.90$\pm$0.25 based on the RGB slope. Although both values agree with ours [Fe/H] = -0.81$^{+0.13}_{-0.14}$ within uncertainties, we call attention to the fact, that the very good agreement with the spectroscopic value gives strength to the VISCACHA metallicities whenever the cluster has enough RGB stars. The structure parameters from previous works do not agree very well. \cite{hill+06} and \cite{kontizas+85} derived $r_c = 3.36_{-0.92}^{+2.14}$ pc and $r_c = 1.3$ pc, respectively, and our result of $r_c = 3.42\pm0.47$ pc agrees well with the most recent value. The same authors derived $r_{90} = 11.07_{-3.29}^{2.2}$ pc and $r_t = 40.3$ pc and none of them are close to our derived value of $r_t = 25.1\pm5.2$ pc. As the case of HW\,20, our photometry is deeper and our images have better spatial resolution, therefore we are not biased by bright stars only as it may be the case of the previous works. In fact, our $r_t = 83\pm 17\arcsec$ agrees with the cluster size by \cite{piatti+11} and \cite{bica+95} of r=70$\pm$10$\arcsec$ and 1.0$\arcmin$, respectively, but not with \cite{glatt+10} who derived r=0.5$\arcmin$. The difference is probably because of their shallow MCPS photometry. All previous integrated magnitudes agree between M$_{\rm V}$=14.1-14.2 \citep{hill+06,rafelski+05,bica+86,gascoigne66}, which means 9-10$\times10^3$M$_{\odot}$, in good agreement with our determination of M=9.2$\pm2.0\times10^3$M$_{\odot}$. \subsubsection*{NGC\,796 (SMC)} This is another wing/bridge cluster based on the classification of \cite{Dias:2014}. It is possibly the youngest cluster in the Magellanic Bridge, the only one with an IRAS counterpart, defined by Herbig Ae/Be and OB stars \citep{nishiyama+07}. Accurate age was derived by \cite{kalari+18} who observed the cluster in the very same night as we did using SAMI@SOAR, but using griH$\alpha$ filters. They derived 20$^{+12}_{-5}$ Myr assuming a metallicity of [Fe/H] $< -0.7$. \cite{Bica:2015} derived 42$^{+24}_{-15}$ Myr, which agrees with our determination of 0.04$^{+0.01}_{-0.02}$ Gyr and with the estimates of a young age based on integrated spectroscopy ranging from 3-50Myr \citep{santos+95,ahumada+02}. The older age derived by \cite{piatti+07} of 110$^{+50}_{-20}$ Myr (assuming $d=$56.8\,kpc, $E(B-V)=0.03$, [Fe/H] = -0.7 to -0.4) was explained by \cite{Bica:2015}: their CMD did not include some saturated stars. Metallicity was only derived by \cite{Bica:2015} as [Fe/H] = -0.3$^{+0.2}_{-0.3}$ which agrees very well with our value of [Fe/H] = -0.31$^{+0.09}_{-0.12}$. Reddening is very similar: 0.03 derived by \cite{ahumada+02}, \cite{Bica:2015} and \cite{kalari+18} in agreement with ours of 0.02$^{+0.01}_{-0.01}$. The distance derived by \cite{kalari+18} of 59$\pm$0.8 kpc agrees very well with ours (60.3$^{+2.7}_{-2.4}$ kpc), and the much closer distance of 40.6$\pm$1.1 kpc derived by \cite{Bica:2015} was considered very unlikely by \cite{kalari+18} based on spectroscopic parallax. The structural parameters were derived by \cite{kontizas+86} and \cite{kalari+18}: $(r_c,r_t) = (0.2, 36.5)$ pc and $ (1.4\pm0.3, 13.9\pm1.2)$ pc, respectively. These values do not agree with each other and our determinations lie in between: $(r_c,r_t) = (0.94\pm0.15, 28.4\pm2.9)$ pc. The photometric quality obtained by \cite{kalari+18} is very similar to ours, but they used rings of similar density instead of circles around the cluster centre as we did, and they found anomalies in their fit, possibly because of this choice. Another difference is that they fit \cite{Elson+87} profiles and we fit King profiles. \cite{kalari+18} found an MF slope of $\alpha = -1.99\pm0.2$, similar to the value we found $\alpha = -2.31\pm0.17$. Their derived integrated mass of 990$\pm$220 $M_{\odot}$ considered only stars more massive than 0.5 $M_\odot$, and used their derived MF slope, which is slightly flatter than ours, for integration. In our experience, the stellar content less massive than 0.5 $M_\odot$ usually accounts for roughly half the cluster's integrated mass budget when it can be assumed to follow the IMF. Correcting for this and for the difference in the MF slopes, their reported mass becomes compatible with ours. The integrated magnitude by \cite{gordon+83} of $M_{\rm V} = -0.97\pm0.03$ mag, meaning $M \sim$ 200 M$_{\odot}$, should be taken with caution as the bright stellar content of this young cluster introduces a lot of stochasticity in the integrated magnitudes. Finally the derived mass by \cite{kontizas+86} of $4\times10^3$ $M_{\odot}$ agrees with our determination of $(3.6\pm0.7)\times10^3$ $M_{\odot}$. \section{Conclusions and Perspectives} \label{sec:conclusions} We presented the VISCACHA survey, an observationally homogeneous optical photometric database of star clusters in the Magellanic Clouds, most of them located in their outskirts and having low surface brightness and for this reason largely neglected in the literature. Images of high quality (sub-arcsecond) and depth were collected with adaptive optics at the 4-m SOAR telescope. Our goals are: (i) to investigate Magellanic Cloud regions as yet unexplored with such comprehensive, detailed view, in order to establish a more complete chemical enrichment and dynamical evolutionary scenario for the Clouds, since their peripheral clusters are the best witnesses of the ongoing gravitational interaction among the Clouds and the MW; (ii) to assess relations between cluster structural parameters and astrophysical ones, aiming at studying evolutionary effects on the clusters' structure associated with the tidal field (location in the galaxy); (iii) to map the outer cluster population of the Clouds and identify chemical enrichment episodes linked to major interaction epochs; (iv) to evaluate the cluster distribution of both galaxies with the purpose of establishing the 3D structures of the SMC and the LMC. In this first paper, the methods used to explore the cluster properties and their connections with the Clouds were detailed. We have shown that the careful image processing, PSF extraction and calibration methods employed, delivered high quality photometric data, unmatched by previous studies. Furthermore, a detailed spatially resolved completeness treatment allied with a robust analysis methodology proved crucial in deriving corrections to the most commonly used techniques in cluster analysis, such as the ones used to determine density profiles, CMDs and luminosity and mass functions. A reliable and homogeneously derived compilation of astrophysical parameters was provided for a sample of 9 clusters. Enlargement of this sample will allow us to better understand the galactic environment at the Magellanic Clouds periphery and to address our longer term goals. In future work we intend to present a more detailed analysis of the whole cluster sample on each topic described in this paper, and present more general results concerning both Clouds. Then, we shall study the mass function and possible mass segregation, as well as constrain the star formation and tidal history in both Clouds. \section*{Acknowledgements} We thank the anonymous referee for the suggestions and critics which helped to improve this manuscript. It is a pleasure to thank the SOAR staff for the efficiency and pleasant times at the telescope, and thus contributing to the accomplishment of VISCACHA. F.F.S.M. acknowledge FAPESP funding through the fellowship n$^o$ 2018/05535-3. J.A.H.J. thanks the Brazilian institution CNPq for financial support through postdoctoral fellowship (project 150237/2017-0) and Chilean institution CONICYT, Programa de Astronom\'ia, Fondo ALMA-CONICYT 2017, C\'odigo de proyecto 31170038. A.P.V. acknowledges FAPESP for the postdoctoral fellowship no. 2017/15893-1. This study was financed in part by the Coordena\c c\~ao de Aperfei\c coamento de Pessoal de N\'ivel Superior - Brasil (CAPES) - Finance Code 001. The authors also acknowledge support from the Brazilian Institutions CNPq, FAPESP and FAPEMIG. \bibliographystyle{mnras}
\section{Introduction} \label{sec:Introduction} As physicists and engineers seek to model increasingly complex electromagnetic systems, from radio-frequency power sources to integrated photonics, the need for efficient and robust full-wave, first-principles numerical field solvers is growing. Finite element (FE) methods, which solve partial differential equations over a discretized problem domain (often a spatial mesh), are a natural solution enjoying widespread use in disciplines from fluid dynamics to structural mechanics. In electromagnetic problems, the variational formulation driving the FE method presents unique challenges which impede the computational efficiency and accuracy of existing solvers, however. For time harmonic problems where the fields oscillate at angular frequency $\omega$, $\vec{\mathcal{E}}(\vec{r},t) = \mathrm{Re}[\vec{E}(\vec{r}) e^{i \omega t}]$, this variational expression is given by eq.~\ref{eq:CC}. Here, $\mu_r$ and $\epsilon_r$ are the relative permeability and permitivitty, $k_0$ is the wave number in free space, $Z_0$ is the intrinsic impedance of free space and $\vec{J}$ is the current density. For a more detailed treatment see, for example, ref. \onlinecite{FEMtextbook}. \begin{equation} F=\int_{\Omega} \frac{1}{\mu_r} | \nabla \times \vec{E}|^2 - k_0^2 \epsilon_r |\vec{E_r}|^2 + i k_0 Z_0 (\vec{E}^{*} \cdot \vec{J}-\vec{E} \cdot \vec{J}^{*} ) ~\mathrm{d}V \label{eq:CC} \end{equation} The primary challenge consists in enforcing the divergence constraint associated with Gauss's law, $\nabla \cdot \vec{E} =0$ (in the source-free case) while ensuring adequate freedom in the basis functions used to expand the approximate solution so as to be able to model discontinuities in the fields \cite{ARreview,ICGreview}. Alternatively, when working with the magnetic vector potential, $\vec{A}$, the divergence requirement is necessary to enforce the Coulomb gauge, $\nabla \cdot \vec{A} = 0$. These two requirements conflict in standard nodal element based finite element (FE) methods, employed successfully in other fields such as fluid mechanics and structural mechanics. In problems with charge and current density, $\rho$ and $\vec{J}$, there is the added dilemma of how best to satisfy both the Ampere-Maxwell equation and Gauss's law. In particle-in-cell codes, used in plasma and accelerator physics, this is critical as discrete charge conservation is not automatically guaranteed. Correction schemes must be applied to either the field calculation or the source deposition to bound the error in $\nabla \cdot \vec{E}$ and avoid any resulting numerical instabilities. \cite{marder,LangdonGaussLaw,CiarletGaussLaw,GeneralizedFormulationForVlasovMaxwell,EdgeElementCiarlet} For stationary and low-frequency or broadband problems, such as in electro-quasistatics and integrated circuit design, mixed finite-element solutions combined with tree-cotree splitting of the mesh and/or Lagrange multipliers are commonly applied to account for the contributions from $\rho$ and $\vec{J}$ in the static limit separately \cite{LorenzGaugedMixed, hiptmair,GeneralizedFormulationForVlasovMaxwell}. Historically, the application of differential geometry in three dimensional (3D) Euclidean space has sucessfully resolved the first issue, providing a theoretical motivation for the use of edge elements in the expansion of the fields. Despite this success, to the authors' knowledge, the full four dimensional (4D) covariant framework has not been investigated within the context of numerical electromagnetism. We demonstrate herein that such an extension is not only more naturally suited to numerical analysis, the field theory Lagrangian providing a variational form directly applicable to the finite element method, but resolves entirely the two significant issues discussed above. We propose a formulation for the finite element solution of electromagnetic systems based on the classical field theory Lagrangian with a gauge fixing term adapted from quantum electrodynamics. This is given in the framework of differential geometry by eq.~\ref{eq:dfGFA}, where we adopt the standard terminology given by introductory texts such as ref. \onlinecite{diffGeoTextbook}. As will be introduced in greater detail shortly, the first two terms constitute the classical Lagrangian and the final term, multiplied by the scalar $\frac{1}{2\xi}$, is the gauge fixing addition. \begin{equation} \mathcal{L}=-\frac{1}{2 \mu} \mathrm{d} \mathbf{A} \wedge \star \mathrm{d}\mathbf{A} + \mathbf{A} \wedge \mathbf{J} - \frac{1}{2 \xi \mu } \mathrm{d}\star \mathbf{A} \wedge \star \mathrm{d}\star \mathbf{A} \label{eq:dfGFA} \end{equation} Here $\mu$ is the magnetic permeability, $\mathbf{A}=A_{\nu} \mathrm{d}x^{\nu}$ is the 4D differential 1-form, $A^{\nu}=(\frac{\phi}{c},\vec{A})$ is the four-potential comprised of the electrostatic potential $\phi$ and magnetic vector potential $\vec{A}$, and $\mathbf{J}$ is the electric current 3-form. In this paper we use the metric signature ($+---$). Instead of taking the variation of eq.~\ref{eq:CC} to obtain $\vec{E}$, we propose taking the variation of the action $ S[\mathbf{A}]=\int \mathcal{L}$. This formulation fully accounts for the charge density, $\rho$ in addition to the current $\vec{J}$ through $\mathbf{J}$ and facilitates a return to the widely used nodal FE framework. The paper is organized as follows: section \ref{sec:3DEuclidean} provides the background for this work, including a more in depth discussion of the edge elements and their benefits and challenges. We then move from 3D Euclidean space into 4D Minkowski space, presenting the classical field theory Lagrangian in section \ref{sec:4DMinkowski}. We demonstrate how this formulation is related to existing $\vec{A}-\phi$ approaches obtained by substituting the potentials into eq. \ref{eq:CC} yet differs in a few critical points which ensures a fully 4D formulation and enables the use of nodal elements instead of edge elements. Finally, in section \ref{sec:Implementation} and \ref{sec:Results} we introduce a proof of concept implementation and demonstrate the validity of the formulation, benchmarking it against a state of the art edge element field solver in terms of accuracy, numerical robustness and flexibility. \section{Background} \label{sec:3DEuclidean} We motivate this idea by considering how the challenges inherent to eq.~\ref{eq:CC} are currently resolved. Enforcing the divergence constraint was initially addressed by adding a regularization term of the form $s (\nabla \cdot \vec{E})^2$ to eq.~\ref{eq:CC}, with limited success\cite{penaltymethod1983,penaltymethod,FEMmaxwellChapter,ETHEigenSolver}. While the regularization term eliminates spurious non-solenoidal modes in the solution spectrum, the regularized formulation fails to converge to the correct solution for problem geometries with sharp or re-entrant corners. The explanation for this failing was only recently understood: when nodal basis functions are used in conjunction with the regularization term, the approximate solution space spanned is overly restrictive on non-convex domains \cite{CDlong}. When singularities in the field exist such as at sharp corners, it can be shown that the missing subspace consists of the gradients of solutions to Laplace's equation on the same domain\cite{CDarticle,AssousSingularDecomp}. Instead of converging to the correct solution with field singularities, the solution obtained will be the projection of the correct fields on the smooth approximate solution space. Two approaches exist to resolve this issue. One can either supplement the nodal basis functions with additional singular or non-conforming functions \cite{SingFieldMethod,AssousSingular,bubbleElements}, or relax the regularization term near the singularity \cite{CDweighted, CiarletWeighted, otin2010regularized}. The former requires computing the coupling between the nodal basis and the additional singular functions and is challenging to extend to three dimensions while the latter is a compromise between enforcing the divergence constraint over the problem domain and not completely restricting the subspace spanned by gradients. A more robust solution arises by formulating electromagnetism in the language of differential geometry. In 3D Euclidean space, $\vec{E}$ (and $\vec{A}$ in the Coulomb gauge) are both differential 1-forms which should be expanded not on nodes but on edges. This led to the development and widespread adoption of the ``edge elements'' for electromagnetic problems, as developed separately by Whitney \cite{WhitneyBook} and N\'ed\'elec \cite{NedelecElements}. By their construction, only tangential continuity is imposed at the faces between elements, resolving the issue of modeling field discontinuities at interfaces and boundaries. However, while the edge elements are divergence-free locally, the discontinuity in the normal field at element interfaces allows for solutions that are not divergence-free globally. The space spanned by edge elements divides into the desired space of weakly divergence-free fields and its co-domain, the kernel of the curl operator (purely gradient functions in topologically trivial domains) \cite{WhitneyForms, BossavitTextbook}. There are methods to extract the gradient field so as to span only the divergence-free fields, such as the tree-cotree method \cite{AlbaneseRubinacciTCT,TrappEigenvalueTCT,WangTimeDomainTCT,magnesTCToverview}. However, choosing an optimal tree is challenging and poor conditioning of the resulting linear system is a common issue \cite{TicarBiro,GoliasTreeChoice,PreisNodalEdgeTbad,AhagonKameari}. \section{Covariant 4D Field Theory Formulation} \label{sec:4DMinkowski} \subsection{Insight from Differential Geometry} Compared to the 3D formulation, electromagnetic theory is encoded much more succinctly by differential geometry in 4D Minkowski space, where deeper underlying structure is made explicit, such as gauge and Lorenz invariance. For Lorenzian manifolds, the equations for the electromagnetic field tensor, $\mathbf{F}=\mathrm{d} \mathbf{A}$, are given by eqs.~\ref{eq:fieldDiff1}-\ref{eq:fieldDiff2}. As defined in section \ref{sec:Introduction}, $\mathbf{A}=A_{\nu} \mathrm{d}x^{\nu}$ is the four dimensional (4D) differential 1-form, $A^{\nu}=(\frac{\phi}{c},\vec{A})$ is the four-potential, and $\mathbf{J} = - \rho \mathrm{d}x \wedge \mathrm{d}y \wedge \mathrm{d}z + j_x \mathrm{d}t \wedge \mathrm{d}y \wedge \mathrm{d}z + j_y \mathrm{d}t \wedge \mathrm{d}z \wedge \mathrm{d}x + j_z \mathrm{d}t \wedge \mathrm{d}x \wedge \mathrm{d}y $ is the current 3-form. \noindent\begin{minipage}{0.4\columnwidth} \begin{equation} \mathrm{d} \mathbf{F} = 0 \label{eq:fieldDiff1} \end{equation} \end{minipage}% \begin{minipage}{0.2\columnwidth}\centering \end{minipage}% \begin{minipage}{0.4\columnwidth} \begin{equation} \mathrm{d} \star \mathbf{F} = \mathbf{J} \label{eq:fieldDiff2} \end{equation} \end{minipage}\vskip1em The classical field theory Lagrangian which encodes these equations, written in terms of $\mathbf{A}$, is given by eq.~\ref{eq:fieldLag}. \begin{equation} \mathcal{L}=-\frac{1}{2 \mu} \mathrm{d} \mathbf{A} \wedge \star \mathrm{d}\mathbf{A} + \mathbf{A} \wedge \mathbf{J} \label{eq:fieldLag} \end{equation} In the covariant treatment it is natural to work with $\mathbf{A}$ as opposed to $\mathbf{E}$ and $\mathbf{B}$, the 3D components of the two-form $\mathbf{F}$. In this case, eq.~\ref{eq:fieldDiff1} is automatically satisfied as $\mathrm{d}^2=0$. Additionally, the charge density, $\rho$, which does not enter into the conventional variational expression for the fields given by eq. \ref{eq:CC}, is accounted for in eq. \ref{eq:fieldLag} through $\mathbf{J}$. Applying the variational formulation given by the action of eq. \ref{eq:fieldLag} in the finite element method, we first consider the appropriate elements over which to expand the solution, $\mathbf{A}$. As in 3D Euclidean space, where there is a duality between 1-forms and edges, in a 4D mesh the 1-form $\mathbf{A}$ should be expanded using edge elements. This is an intriguing idea to pursue for transient numerical analysis, where one could envision using this formulation on a 4D mesh. However, in the case of time harmonic problems, the focus of this paper, we pursue a different course. The time dimension of the mesh is collapsed and edges of the 4D mesh become points in a 3D mesh. As such, \emph {nodal} elements should be employed to expand $\mathbf{A}$ rather than edge elements. \subsection{Gauge Invariance and Ill-Conditioned Systems} \label{GIsection} The linear systems resulting from employing eq.~\ref{eq:fieldLag} in the finite element method are, unfortunately, highly ill-conditioned. This should come as no surprise when considering that unlike the fields, the four potential is not uniquely defined. The Lagrangian is invariant to gauge transformations of the form $\mathbf{A} \rightarrow \mathbf{A} + d\psi$ where $\psi$ is a scalar 0-form. To resolve this issue, we apply a solution used to address a similar challenge in quantum electrodynamics (QED). In the field discretization in QED, the resulting symbolic matrices are singular due to gauge invariance. One approach to overcome this issue is through the addition of a gauge fixing term to the Lagrangian \cite {QFTSchwartz}: \begin{equation} \mathcal{L}_\mathrm{GF}= - \frac{1}{2 \mu \xi} \mathrm{d}\star \mathbf{A} \wedge \star \mathrm{d}\star \mathbf{A} \label{eq:dfGF1} \end{equation} The resulting action integral for time harmonic problems, integrated over the time dimension already, is given by eq. \ref{eq:THaction}. Here we have expanded $\mathbf{A}$ into the conventional three-plus-one notation ($\vec{A}$ + $\phi$) for ease of comparison to existing formulations and to expose some implementation challenges which will be discussed in section \ref{sec:Implementation}. Note also that as we are now working in the frequency domain, $\phi$ and $\vec{A}$ as given below are complex quantities. The strong problem corresponding to eq.~\ref{eq:THaction}, obtained by taking the variation of this action integral, is derived in the appendix. \begin{multline} S(\phi, \vec{A}) = \frac{1}{2} \int \epsilon |\nabla \phi + i \omega \vec{A}|^2 - \frac{1}{\mu} |\nabla \times \vec{A}|^2 \\-\frac{1}{\mu \xi} |\nabla \cdot \vec{A} - \frac{i \omega}{c^2} \phi|^2 - \rho \phi^{*} -\rho^{*} \phi + \vec{A} \cdot \vec{J}^{*} + \vec{A}^{*} \cdot \vec{J} ~\mathrm{d}V \label{eq:THaction} \end{multline} In QED, the gauge fixing term imposes different gauges depending on the value of $\xi$. In our classical context, any $\xi \neq 0$ imposes the Lorenz gauge with residual gauge freedom, $\mathbf{A} \rightarrow \mathbf{A} +\mathrm{d}\psi$ for $\psi$ satisfying the wave equation $\nabla^2 \psi + k_0^2 \psi = 0$. By setting the components of $\mathbf{A}$ or their derivatives explicitly on the boundary, $\psi$ is forced to zero on the boundary, and hence everywhere, and $\mathbf{A}$ will be unique. Tempting as this may be, doing so in the most straight-forward way (setting $\vec{A}_t$ =0 and $\phi=0$ on the boundary for a perfect electric conductor, or $\vec{A}_n$ =0 and $\nabla_n \phi =0$ for a perfect magnetic conductor) in fact decouples $\phi$ from $\vec{A}$. This reduces the problem to two separate wave equations: eq.~\ref{eq:phiOnly} amenable to nodal elements and eq.~\ref{eq:AOnly} which reduces to the curl-curl equation for $\vec{A}$ and must be solved via edge elements. \begin{align} \nabla^2 \phi + k_0^2 \phi = -\frac{\rho}{\epsilon} \label{eq:phiOnly}\\ \nabla^2 \vec{A} + k_0^2 \vec{A} = -\mu j \label{eq:AOnly} \end{align} On this note, we have since discovered the work of Boyse and Paulsen, who had started to develop a nodal element based formulation by substituting the potentials into Maxwell's equations and applying the Lorenz gauge. \cite{BoyseMainPaperOnNodalPotentialFormulation,BoyseTheoretical}. Their weak formulation is missing some of the coupling terms that appear in the Lagrangian formulation with gauge fixing and the resulting strong form of the problem has no direct coupling between $\vec{A}$ and $\phi$ in the volume. However, the main issue in their original formulation is precisely the application of the boundary condition scheme suggested above, decoupling $\vec{A}$ and $\phi$. While not mentioned in the original works, a nodal implementation of the formulation will fail on non-convex domains, as noted in ref. \onlinecite{PotentialNotWorking}. Nonetheless, it is perfectly acceptable to adopt such an approach, as long as a mixed formulation is employed, with $\vec{A}$ expanded by the edge elements. This decoupled, mixed formulation approach has been adopted by some low-frequency solvers. In these implementations the Lorenz gauge simplifies to the usual divergence free condition on $\vec{A}$ and the two components are coupled only in the sense that their excitations are related through the charge continuity equation, $\nabla \cdot \vec{J} = i \omega \rho$.\cite{LorenzGaugedMixed} In this sense, it is not a fully four dimensional solution. Instead, we allow the residual gauge freedom to persist by imposing boundary conditions solely through surface integrals instead of explicit Dirichlet boundary conditions. This is not a significant drawback, as surface integrals are commonly used to implement impedance or absorbing boundary conditions in any case. The natural boundary condition in our formulation corresponds to a perfect magnetic boundary. An impedance boundary condition can be imposed through the additional surface integral given by eq.~\ref{eq:surfImp}. A perfect electric boundary is imposed in the limit where the conductance, directly proportional to $\gamma$ is large. For further discussion of the boundary condition imposed by eq.~\ref{eq:surfImp} and for a definition of $\gamma$ in the context of our implementation, please see the appendix. \begin{equation} S_\mathrm{Z} = \gamma \int_{\partial \Omega} \left|\hat{n} \times \left(-\nabla \phi - i\omega \vec{A} \right) \right|^2 dS \label{eq:surfImp} \end{equation} In contrast to the mixed formulations, the resulting solution is not a simple superposition of independent solutions for $\vec{A}$ and $\phi$, but a self-consistent solution for $\mathbf{A}$ in its entirety, as is demonstrated in section \ref{sec:Results}. This, in conjunction with the gauge fixing term which regularizes the problem, is what enables the use of nodal elements in the four-potential formulation compared to existing $\vec{A} - \phi$ formulations \cite{LorenzGaugedMixed,H1MixedDuan,FullFITEMBaumanns, AmroucheNonSmooth,WangTimeDomainTCT}. Boyse and Paulsen arrived at a similar conclusion with their Maxwell based $\vec{A} + \phi$ formulation, implementing an impedance boundary condition in a later paper which they then demonstrated working on a 2D wedge geometry. \cite{BoyseNonConvex} Finally, we conclude this section by introducing a new coefficient for the gauge fixing term: \begin{equation} \alpha = \frac{1}{\xi} \label{adef} \end{equation} This is both for the sake of brevity as the coefficient of the gauge fixing terms is referred to often in the implementation and results section, and also as we are interested in plotting solution properties as a function of $\alpha$ near 0. \subsection{Gauss' Law} While the ability to use nodal elements is a nice benefit, the primary motivation for our adoption of the Lagrangian formulation is the fully general treatment of the source terms provided. In the appendix, we provide the full derivation of the strong form corresponding to eq.~\ref{eq:THaction} or, in the language of variational calculus, the Euler-Lagrange equations resulting from the variation of the Lagrangian. Equations \ref{eq:GL} and \ref{eq:AL} give the resulting equations imposed in the volume (there are also surface terms which are provided in the appendix). \begin{align} \alpha n^2 k_0^2 \phi+ \nabla^2 \phi - i k_0 (\alpha-1) \nabla \cdot \vec{A} &= -\frac{\rho}{\epsilon} \label{eq:GL} \\ n^2 k_0^2 \vec{A} +\nabla^2 \vec{A} + (\alpha -1) \nabla (\nabla \cdot \vec{A} + i \frac{\omega}{c^2} \phi) &= -\mu \vec{J} \label{eq:AL} \end{align} Equation \ref{eq:GL} is the result of the variation with respect to $\phi$ while eq. \ref{eq:AL} arises through the variation with respect to $\vec{A}$. With the Lorenz gauge implicitly imposed through the gauge fixing term, regardless of the residual gauge these equations reduce to Gauss' law and Ampere's law in this gauge. Thus, unlike in eq.~\ref{eq:CC}, both equations are independently satisfied by the solution which minimizes eq.~\ref{eq:THaction}, even in the case where discrete charge conservation is not guaranteed. Not only does the solution explicitly satisfy Gauss' law, but the use of the nodal elements means it can do so element-wise as well as globally. This is in contrast to the lowest order edge elements, which are divergence-free within each element: any non-zero divergence in the fields arises only through discontinuities in the normal component of the field between elements of the mesh. Furthermore, there is significant flexibility offered by the fact that both $\rho$ and $\vec{J}$ can be used to drive the fields. Both of these features are beneficial in modeling problems with significant space charge, whether for low-frequency applications where $\rho$ becomes important in the static limit or, as in our motivation for pursuing this approach, in the modeling of high frequency power sources where time harmonic components of the space charge contribute strongly to the fields even at high frequencies. \section{Computational Implementation} \label{sec:Implementation} As a proof of concept, we have implemented this formulation for 2.5D azimuthally symmetric fields, solving on a 2D mesh and accounting for the azimuthal dependance of the fields, of the form $e^{i m \theta}$, a-priori. A few unique challenges arise in the implementation of the Lagrangian finite element formulation. The issue of enforcing boundary conditions through surface integrals instead of having the option of explicitly setting Dirichlet boundary conditions was discussed in section \ref{GIsection}. The other significant difference relative to the curl-curl formulation is the presence of terms linear in $k_0$. In finite element electromagnetic analysis, there are two types of problems which are of interest: eigenmode analysis and driven problems. In driven problems, the driving frequency is known so that only the fields need to be computed. In the eigenmode analysis, the resonant frequencies (eigenvalues) and corresponding four-potentials (eigenvectors) are calculated. The discretized Lagrangian is composed of three finite element matrices, $\mathrm{\mathbf{M}},\mathrm{\mathbf{C}},\mathrm{\mathbf{K}}$ and the resulting matrix equation is a generalized quadratic eigenvalue problem (QEP) where we solve for $\tilde{k_0}$ , the approximate resonant frequency, and $\mathbf{a}$, the coefficients of the approximate solution over the discretized space. \begin{equation} \left(\mathrm{\mathbf{M}}\tilde{k_0}^2 + \mathrm{\mathbf{C}} \tilde{k_0} + \mathrm{\mathbf{K}} \right).\mathbf{a} = 0 \end{equation} It is the coupling between $\vec{A}$ and $\phi$, appearing in the matrix $\mathrm{\mathbf{C}}$, that results in a quadratic eigenvalue problem instead of the regular generalized eigenvalue problem of the curl-curl equation. QEPs are common in finite element problems, for example in modeling damped structural resonances \cite{} and a significant body of work exists on the topic, including a comprehensive review paper \cite{TisseurQEP}. We implemented the sparse non-linear eigenvalue solver, NLFEAST \cite{NLFEAST}, a contour integral based solver where we constructed the kernel specifically for our QEP. Our implementation has proven robust, agreeing with the direct solver for small problem sizes where a comparison was possible, and scalable up to matrix sizes on the order of 1E6 (we did not test beyond this as for a 2D mesh, this is a very dense mesh). The condition number of the eigenvalues, as defined in ref. \onlinecite{TisseurQEP}, are reasonable and uncorrelated to problem size. The conditioning does depend weakly on the gauge fixing term and the need for the gauge fixing term becomes immediately clear from the singularity in the condition number when it is not included, as will be shown in sec.~\ref{sec:Results}. The driven problem employs the same $\mathrm{\mathbf{M}},\mathrm{\mathbf{C}}$ and $\mathrm{\mathbf{K}}$ matrices, but $\tilde{k_0}$ is set by the frequency of the driving source terms and $\mathbf{a}$ is determined by solving the resulting linear system. \begin{equation} \left(\mathrm{\mathbf{M}} \tilde{k_0}^2 + \mathrm{\mathbf{C}} \tilde{k_0} + \mathrm{\mathbf{K}} \right).\mathbf{a} = \mathrm{\mathbf{j}} \end{equation} For this, we use the Intel Math Kernel Libraries, and in particular, the PARDISO solver. We have tried direct and iterative solvers and found both to be equally effective for the moderate problem sizes we have been working with so far. Future work will look to scale the implementation to 3D meshes and thus much large matrices. Here, a more advanced solver and the employment of a preconditionner will likely be beneficial. We expect NLFEAST or a similar contour integral solver will still be the optimal choice for the eigenmode analysis. \section{Numerical Results and Benchmarking} \label{sec:Results} We have benchmarked the Lagrangian formulation with respect to the edge element curl-curl formulation over a broad range of examples. The following subsections focus particularly on numerical results demonstrating the accuracy, robustness and flexibility of this formulation. The examples shown are azimuthally symmetric, solved in a cylindrical coordinate system $(r,\theta,z)$ with an azimuthal dependence of the form $e^{i m \theta}$, as given by eq.~\ref{eq:mdep}. As this dependence is known a-priori these modes can be solved on a 2D mesh with $\theta$ out of plane. In the following, all figures of mode profiles are thus cross sectional views of the full structure in the ($z,r$) plane. \begin{equation} \vec{\mathcal{E}}(\vec{r},t) = \mathrm{Re}[\vec{E}(\vec{r}) e^{i \omega t+i m \theta}] \label{eq:mdep} \end{equation} For monopole modes ($m=0$) the fields split into modes which can be represented by $A_\theta$ alone (transverse electric or TE), or as a combination of $A_z, A_r$, and $\phi$ (transverse magnetic or TM). The TE modes are not susceptible to the challenges discussed previously and are already often solved using nodal basis functions so we focus only on TM modes for $m=0$. To fully prove the suitability of the Lagrangian formulation, particularly in regards to eventual extension to a full 3D finite element implementation, we also demonstrate some examples of dipole ($m=1$) and quadrupole modes ($m=2$). In this case, the problem is fully four-dimensional and all components of the four-potential couple to each other. For comparison we used COMSOL, a commercially available multi-physics finite element software which includes an edge-element electromagnetic field solver. It is capable of solving axisymmetric in-plane fields on a 2D mesh, allowing for a comparison with our computational implementation in terms of accuracy and problem size. We refer the reader to the COMSOL user manual for exact implementation details\cite{COMSOL}. While our implementation uses nodal Lagrange elements and COMSOL is using edge elements, in both cases the elements are second order. Finally, in the convergence plots that follow, we define the error as follows: for the frequency, the error is computed as $\Delta f = \frac{f-f_\mathrm{theor}}{f_\mathrm{theor}}$ if a theoretical solution exists, or for the ridge waveguide, by the frequency of the problem on a finer mesh than those plotted. For the fields, we calculate the $S_0$ (Sobolev Zero) norm of the field error over the entire problem domain: $\Delta E = \left| \frac{E-E_\mathrm{theor}}{E_\mathrm{theor}} \right|_{S0}$. To keep the plots legible, instead of showing the error of all six fields, we use the averaged error norm, $\Delta F = \frac{1}{6}(|\Delta E_r|_{S0} + |\Delta E_z|_{S0}+...)$. \subsection{Accuracy} The cylindrical pillbox cavity is a good initial test case as results can be compared to the analytical solution. Figure \ref{fig:PillboxComp} shows the cross sectional problem geometry and the mode profiles for the TM$_{011}$ mode with a perfect magnetic boundary condition on the walls. Only the components of $E_r$ and the full vector field plot are shown for the sake of brevity. Two distinct solutions for the four-potential are shown, however, corresponding to different values of the gauge fixing coefficient $\alpha$ defined in eq.~\ref{adef}. Changing $\alpha$ numerically perturbs the system, producing a solution with a different residual gauge, $\psi$. Nonetheless, the resonant frequencies and fields calculated from the different solutions for the four-potential correspond to the same mode. \begin{figure} \begin{subfigure}{0.5\columnwidth} \includegraphics[width=\columnwidth]{PilboxPMA1.png} \caption{$\alpha= 1$} \label{fig:Pillbox1} \end{subfigure}\begin{subfigure}{0.5\columnwidth} \includegraphics[width=\columnwidth]{PilboxPMA2.png} \caption{$\alpha = -1$} \label{fig:Pillbox2} \end{subfigure} \caption{Finite element solution for the TM$_{011}$ mode of a cylindrical cavity with perfect magnetic boundary for two different values of $\alpha$. The mesh used to compute the solution is overlayed in the top left figure.} \label{fig:PillboxComp} \end{figure} \begin{figure} \includegraphics[width=\columnwidth]{PillboxPMfreq.png} \caption{Error in the frequency, $\Delta f = \frac{f_{FE}-f_{theor}}{f_{theor}}$ for various values of $\alpha$. The variation in solved frequency decreases as the mesh is refined.} \label{fig:freqPillbox} \end{figure} \begin{figure} \includegraphics[width=\columnwidth]{PillboxPMConvergenceWM.png} \caption{Convergence of the frequency for the mode in fig.~\ref{fig:PillboxComp} with mesh size, $h_\mathrm{mesh}$. The slopes of the linear fits are 3.93 (COMSOL), 3.86 ($\alpha=0.1$), 4.00 ($\alpha =1$ and 3.89 ($\alpha=10$).} \label{fig:convergencePillbox} \end{figure} An interesting consequence of calculating different $\mathbf{A}$ for the same mode is that the numerical error is different in each case, as demonstrated by fig.~\ref{fig:freqPillbox}. As the mesh is refined, all solutions converge to the same frequency and fields. Plotting this convergence, now for only a few values of $\alpha$, fig. \ref{fig:convergencePillbox} demonstrates similar convergence characteristics for both the nodal and edge elements. The slopes of the linear fits match that predicted from theory for second order elements, converging as O($h^4$) where $h$ is the maximum mesh edge length. A possible downside in solving for the four-potential is that the desired end results are the electromagnetic fields, not the potentials. As the fields are obtained through derivatives of the potential, they are not expected to converge at the same rate as the solution itself. This is also an issue with the curl-curl formulation, as the magnetic field must be calculated from the solution for the electric field or vice-versa. There are methods to resolve or mitigate this issue, for example the superconvergent patch recovery technique often employed to compute stress in structural mechanics problems.\cite{spr} However, here we take the simplest approach, taking derivatives of the second order basis functions to compute the fields at the mesh nodes, which still produces comparable results with those computed by COMSOL. The convergence of the fields for the mode in fig.~\ref{fig:PillboxComp} are given by fig.~\ref{fig:convergenceFieldsPillbox}. \begin{figure} \includegraphics[width=\columnwidth]{PillboxPMFieldConvergenceWM.png} \caption{Convergence of the fields, using the average error of $E_r$, $E_z$ and $H_\theta$, for the TM$_011$ mode with mesh size, $h_\mathrm{mesh}$. The slopes of the linear fits are 2.00 (COMSOL), 1.97 ($\alpha=0.1$), 2.18 ($\alpha=1$) and 2.01 ($\alpha=10$).} \label{fig:convergenceFieldsPillbox} \end{figure} \subsection{Flexibility} Moving on to problems where nodal element based solvers using the conventional curl-curl equation fail, fig.~\ref{fig:RidgedWaveguide} plots the solution for a notched pillbox cavity with a perfect electric boundary. There is a singularity in the fields on the corner which conventional nodal field solvers cannot resolve, converging to the incorrect solution even as the mesh is refined. While the solution for the four-potential is continuous, the discontinuity in the fields at the notch is fully captured by $\nabla \phi$ in the Lagrangian formulation, as demonstrated in the figure. In this case, the frequency computed by COMSOL and the four-potential formulation is 120.0 MHz. If instead, we set $\phi=0$ either on the boundary or the entire volume, decoupling the four-potential, we find that instead the frequency computed is 127.1 MHz. The field profile for this (incorrect) mode is shown in fig.~\ref{fig:RidgedWaveguideNoPhi}, now with no singularity at the re-entrant corner. \begin{figure} \includegraphics[width=0.8\columnwidth]{MonopoleRidgeCavityPE.png} \caption{FE solution for the fundamental TM mode of a notched pillbox cavity, f=120.0 MHz. $\phi$, $A_r$ are continuous but the singularity is captured in the computed fields through $\nabla \phi$.} \label{fig:RidgedWaveguide} \end{figure} \begin{figure} \includegraphics[width=0.8\columnwidth]{MonopoleRidgeCavityPENoPhi.png} \caption{FE solution for the fundamental TM mode of a notched pillbox cavity where $\phi$ is set to zero, f=127.1 MHz. $\vec{A}$ alone does not resolve the singularity.} \label{fig:RidgedWaveguideNoPhi} \end{figure} In fig.~\ref{fig:convergenceRidgeWaveguide}, the convergence of the frequency is plotted as a function of the number of degrees of freedom solved for. Instead of plotting as a function of mesh size, where we do not expect to obtain a theoretical rate of convergence due to the singularity in any case, we plot as a function of problem size to illustrate another perhaps counter-intuitive result. The absolute accuracy relative to problem size is comparable despite the additional degree of freedom used in the four-potential formulation. This is because edge elements require roughly twice as many degrees of freedom as nodal elements for the same convergence order\cite{GMurAdvDis,FEMtextbook}. This is in part due to the additional degrees of freedom per mesh element and in part because there are many more edges than nodes in a mesh. \begin{figure} \includegraphics[width=\columnwidth]{RidgeWaveguidePEConvergenceWN.png} \caption{Convergence of the frequency, $f_0$, for the mode in fig.~\ref{fig:RidgedWaveguide} with problem size, $n_{DOF}$.} \label{fig:convergenceRidgeWaveguide} \end{figure} \begin{figure} \includegraphics[width=\columnwidth]{RidgeWaveguidePEFieldConvergenceWN.png} \caption{Convergence of the fields (average error over all field components), $f_0$, for the mode in fig.~\ref{fig:RidgedWaveguide} with problem size, $n_{DOF}$.} \label{fig:convergenceRidgeWaveguide} \end{figure} Spherical cavities can also be modeled in 2.5D, presenting another example with re-entrant corners (when approximated as a polygon) but one with a theoretical solution to which we can compare. As we have not yet implemented curvilinear or isoparametric elements, the convergence rate in this case is dominated by the extent to which the curved boundary is approximated by a polygon. The results shown are for the TM$_{331}$ mode but note that in this case, TM refers to transverse magnetic with respect to $\rho= \sqrt{r^2+z^2}$, the convention for spherical cavities, and not with respect to $\theta$ so all components of the four-potential must be solved for. \begin{figure} \includegraphics[width=0.8\columnwidth]{SphereZPotential.png} \caption{Mode profile for the four-potential for the TM$_{331}$ mode of a spherical cavity with an impedance boundary.} \label{fig:sphereZDipole} \end{figure} \begin{figure} \includegraphics[width=\columnwidth]{SphereZE.png} \caption{Computed fields for the mode in fig~\ref{fig:sphereZDipole}} \label{fig:SphereZDipoleF} \end{figure} \begin{figure} \includegraphics[width=\columnwidth]{SphereZConvergenceWM.png} \caption{Convergence of the frequency for the mode in fig.~\ref{fig:sphereZDipole} with mesh size, $h_{mesh}$. The slopes of the linear fits are 1.97 (COMSOL), 2.16 ($\alpha=0.1$), 1.89 ($\alpha=1$) and 1.93 ($\alpha=10$).} \label{fig:convergenceSphereDipole} \end{figure} \begin{figure} \includegraphics[width=\columnwidth]{SphereZFieldConvergenceWM.png} \caption{Convergence of the fields (average error over all field components) for the mode in fig.~\ref{fig:sphereZDipole} with mesh size, $h_{mesh}$. The slopes of the linear fits are 1.35 (COMSOL), 3.23 ($\alpha=0.1$), 2.04 ($\alpha=1$) and 1.84 ($\alpha=10$).} \label{fig:convergenceESphereDipole} \end{figure} Finally, in addition to field singularities due to singular boundaries and re-entrant corners, the four-potential formulation can model discontinuities at material interfaces without the special treatment typically required to accommodate the jump in the normal field\cite{FEMtextbook}. Figure \ref{fig:dielFields} shows the field profile for a tapered dielectric lined cavity, for example. $\phi$ and $\vec{A}$ are continuous but $\nabla \phi$ captures the discontinuity in the fields due to the change in $\epsilon_r$. \begin{figure} \includegraphics[width= \columnwidth]{DielectricWaveguide.png} \caption{FE solution for the fundamental TM mode of a dielectric lined cavity with $\epsilon_r=1.5$ above the thick back line. The resonant frequency is $f_0=214.051$ MHz compared to $214.054$ MHz in COMSOL.} \label{fig:dielFields} \end{figure} \subsection{Robustness} There are two particular aspects to robustness that we consider here: numerical conditioning and the question of spurious modes. A rigorous theoretical analysis is beyond the scope of this paper but we have investigated these issues experimentally. For the eigenmode analysis, we use the definition of condition number for a quadratic eigenvalue given in ref. \onlinecite{TisseurQEP}. Figures \ref{fig:condNumbPM} and \ref{fig:condNumbPE} plot the condition number for the quadratic eigenvalue of the notched pillbox with a perfect magnetic and electric boundary condition, respectively. Plotted as a function of $\alpha$, the need for the gauge fixing coefficient is clear from the singularity in the condition number as $\alpha \rightarrow 0$. There is a similar singularity in conditioning at $\alpha = 0$ for the linear system in the driven problem. \begin{figure} \begin{subfigure}{\columnwidth} \includegraphics[width=0.75\columnwidth]{ConditionNumberRidgeWaveguidePM.png} \caption{Condition number as a function of gauge fixing.} \label{fig:condNumberPMa} \end{subfigure} \begin{subfigure}{\columnwidth} \includegraphics[width=0.75\columnwidth]{RidgeWaveguidePMCondNumb.png} \caption{Condition number as a function of mesh resolution.} \label{fig:condNumberPMm} \end{subfigure} \caption{Condition number, $\kappa$ for the eigenvalue corresponding to the fundamental TM mode of the cavity shown in fig.~\ref{fig:RidgedWaveguide} with perfect magnetic boundary.} \label{fig:condNumbPM} \end{figure} The condition number is reasonable for the perfect magnetic boundary condition and there is no strong variation with $\alpha$ or $h_\mathrm{mesh}$. The same cannot be said for the impedance or (in the limit of large conductance) perfect electric boundary condition. The addition of the surface integral to impose the perfect electric boundary negatively impacts the condition number. We have found the condition number for a given eigenvalue to scale linearly with the conductance, $Y = \frac{1}{Z}$ and as O($h_\mathrm{mesh}^{-2}$) when the impedance boundary is applied. The condition number can be mitigated to some extent by refining the mesh on the boundary while maintaining constant mesh in the interior, but future work will focus on resolving this issue more efficiently by modifying the surface integral or its implementation. \begin{figure} \begin{subfigure}{\columnwidth} \includegraphics[width=0.75\columnwidth]{ConditionNumberRidgeWaveguidePE.png} \caption{Condition number as a function of gauge fixing.} \label{fig:condNumberPEa} \end{subfigure} \begin{subfigure}{\columnwidth} \includegraphics[width=0.75\columnwidth]{RidgeWaveguidePECondNumb.png} \caption{Condition number as a function of mesh resolution.} \label{fig:condNumberPEm} \end{subfigure} \caption{Condition number, $\kappa$ for the eigenvalue corresponding to the fundamental TM mode of the cavity shown in fig.~\ref{fig:RidgedWaveguide} with perfect electric boundary.} \label{fig:condNumbPE} \end{figure} Up to this point, we have focused on specific modes to demonstrate the convergence and stability of the Lagrangian formulation. It is equally important to ensure that in addition to obtaining correct modes, the solved spectrum is free of unphysical modes. Figure ~\ref{fig:sphereSpectrum} plots the spectrum for the first several solved monopole modes of the spherical cavity. Comparing with the theoretically expected modes, we note the presence of two unexpected modes. These are not spurious modes in the conventional sense, however, but rather are pure gauge modes. As can be seen from the mode profiles, these are valid solutions for the four potential which result in zero field (to within numerical noise). Unlike spurious modes in the nodal curl-curl formulation, these modes converge as the mesh is refined in a similar manner to the expected modes. Most importantly, the number of these pure gauge modes in a given frequency interval does not increase with problem size. In the driven problem, these modes are not excited by sources, as can be seen in fig.~\ref{fig:sphereDriven} (note, only modes with Az on axis are excited so not all resonant modes are present in spectrum). \begin{figure} \begin{subfigure}{\columnwidth} \includegraphics[width=\columnwidth]{ZeroSolution.png} \caption{Eigenmode} \label{fig:sphereSpectrum} \end{subfigure} \begin{subfigure}{\columnwidth} \includegraphics[width=\columnwidth]{ZeroSolutionDriven.png} \caption{Driven: Relative amplitude of $E_z$ at the origin with an applied current, $J_z$, on axis.} \label{fig:sphereDriven} \end{subfigure} \caption{Spectrum showing the first several modes of a spherical cavity with 1m radius as computed through the eigenmode analysis (a) and by scanning the frequency of a driving current and observing the field amplitude (b). The driven spectrum was excited using a current in the $\hat{z}$ direction thus not all resonant modes are reflected in the spectrum. There are two modes in the eigenmode spectrum which are pure gauge modes - valid solutions for the four-potential resulting in vanishing fields. These modes are not excited in the driven problem, as can be seen by the lack of a peak at their respective frequencies.} \label{fig:sphereZeroSols} \end{figure} \section{Conclusion} Concluding, we have demonstrated a new finite element formulation to solve time harmonic electromagnetic fields. By encoding the physics of electromagnetism in a different mathematical formulation, the Lagrangian formulation does not suffer from the challenges inherent to the conventional curl-curl equation for $\vec{E}$. In contrast to the curl-curl equation, where $\vec{J}$ is the only driving term, our formulation completely accounts for both $\vec{J}$ and $\rho$. Both Gauss' law and Ampere's law are satisfied, not just globally but over individual elements, in contrast to the commonly employed N\'ed\'elec edge elements. This is of importance in the analysis of beam driven radiation sources, for example, where the contribution to the fields from the space charge, $\rho$, can be significant even at high frequency. We show through both theory and experimental results that the nodal elements are the correct basis choice for our 4D formulation. Indeed, our implementation demonstrates that the four-potential formulation easily handles field singularities and discontinuities unlike nodal element curl-curl implementations. We have benchmarked a proof of concept implementation against COMSOL, a state of the art edge element solver, showing that comparable performance can be obtained. Currently, our surface integral for imposing an impedance or perfect electric boundary condition produces accurate results for problem sizes up to around $n_{DOF}=10^5$. However, the scaling of the condition number with mesh size and conductance needs to be addressed. Finally, we have demonstrated that this approach is not susceptible to spurious modes though pure gauge modes with zero fields do appear in the eigenmode spectrum. The Lagrangian formulation provides unique opportunities for the numerical analysis of electromagnetic fields. While here we present some initial results confirming the accuracy, flexibility and robustness of this idea, we believe there is much yet to explore, particularly in the time domain. From a practical point of view, the adoption of the four-potential also offers a straightforward solution for those interested in a nodal field solver. This is not only beneficial in terms of the computational efficiency and simplicity of nodal elements, but given the widespread use of nodal elements in fields from structural mechanics to fluid dynamics, allows for a common framework for multi-physics problems. \begin{acknowledgments} This project was funded by U.S. Department of Energy under Contract No. DE-AC02-76SF00515. \end{acknowledgments} \bibliographystyle{apsrev4-1}
\section{Introduction} The capacity of multipe-input multiple-output (MIMO) channels is commonly evaluated under a total average power constraint~\cite{cover,tse,bps98} in order to account for the limited availability of transmission power to be sent to the transmitting antennas. Under the assumption of known channel matrix at both the transmitter and receiver endpoints, i.e., with perfect Channel State Information at the Transmitter (CSIT) and at the Receiver (CSIR), the capacity is obtained by applying the water-filling algorithm~\cite{cover} to the equivalent eigen-channels describing the MIMO channel itself. The resulting solution is very simple and elegant and its derivation is quite straightforward after the application of a singular value decomposition (SVD) to the channel matrix itself. The water-filling algorithm implementation is very simple and efficient and it solves completely the optimization problem behind the evaluation of the channel capacity. However, some implementations of MIMO transmitters rely on separate RF chains feeding the different transmit antennas so that the average transmit power from every antenna is subject to a specific constraint~\cite{loyka17,vu11}. Also in he case of distributed MIMO systems, where transmitting antennas are located at different places, power limitations affect different antennas separately and there is no overall power constraint~\cite{vu11}. These scenarios are opposite, for example, to the case of an implementation based on a common amplifier followed by a passive beamforming network. To summarize, power limitation on a MIMO transmitter can be of two different types: $i)$ total average power (TP) constrained or $ii)$ per-antenna average power (PAP) constrained. We can also figure out a hybrid situation where both constraints have to be enforced (TP and PAP): the individual antenna power amplifiers may trade-off some of their available power or may drain their power supply from a common source~\cite{loyka17,kl12}. This motivates the study of the MIMO channel capacity under TP and PAP constraints. The existing literature offers many works on the MIMO channel capacity with TP and/or PAP constraints. One of the earliest results is due to Vu, who developed an iterative algorithm for the PAP-only MIMO case in~\cite{vu11,vupatent}. Her approach is based on the solution of the KKT equations relevant to the PAP constrained optimization problem addressing the maximization of the MIMO channel's mutual information. The approach is ingenious and relies on the particular structure of the optimizing covariance matrix, which is split into different signature components leading to an efficient iterative algorithm. Nevertheless, the TP constraint is not considered and there is limited discussion of complexity and convergence issues. More recently, in~\cite{tuni14}, the PAP-only constrained MIMO capacity has also been considered and a closed-form solution for the optimal input covariance matrix has been derived when the channel matrix and the optimal input covariance matrix have full rank. This result was anticipated in~\cite[eq.~(23)]{vu11} in an equivalent form without giving the explicit conditions required. Finally, Loyka~\cite{loyka17} and~\cite{cao16} considered the joint TP and PAP constrained capacity problem in the multiple-input single-output (MISO) case and obtained a closed-form solutions for the capacity-achieving input covariance matrix in this case. In this work we address the evaluation of the capacity of a MIMO channel with perfect CSIT/CSIR under a joint TP and PAP constraint. The paper extends in a nontrivial way the results of~\cite{vu11} and provides an algorithmic solution for this problem, which is still open for MIMO channels under a joint TP and PAP constraint (see~\cite{loyka17}). The contributions of the paper can be summarized as follows. We emphasize the different type of optimization problems arising when the channel matrix has full rank (equal to the number of transmit antennas) or not. We refer to the former as the \emph{full-rank} case and to the latter as the \emph{singular} case. In both cases we show that the capacity-achieving covariance matrix has a specific form depending on a number of real positive parameters not greater than the number of transmit antennas and on the Gramian of the channel matrix. Moreover, we show that in the full-rank case the TP constraint is active at the optimum (i.e., the constraint is met with equality) while it may be inactive in the singular case. The solution of the KKT equations leading to the main results discussed above is different from~\cite{vu11} for several reasons: $i)$ the Lagrangian function is extended to encompass the TP constraint; $ii)$ we provide a robust justification of the positivity of the diagonal Lagrange multiplier matrix $\bm{D}$, corresponding to the set of real positive parameters determining the optimum covariance matrix.% \footnote{ The argument used in~\cite{vu11} to show that the Lagrange multipliers $d_i$ are real and positive is incorrect. The paper claims that the positivity of the $d_i$'s derives from the complementary slackness condition and the fact that the optimum solution corresponds to active constraints (inequalities met as equalities). However, if $d_i\ge0$, $d_i((\bm{Q})_{ii}-P_i)=0$, and $(\bm{Q})_{ii}=P_i$, we cannot be sure that $d_i>0$ because $d_i=0$ is also compatible with all the equations. This property is crucial to the existence of $\check{\bm{D}}\triangleq\bm{D}^{-1}$. } $iii)$ we simplify the derivation of the optimality conditions and obtain a specific relationship between the matrix $\bm{F}$ to the matrix $\bm{R}$ (matrix notation is consistent with~\cite{vu11}). The derivation of a specific structure of the capacity-achieving covariance matrix is a key contribution of this work. This reduces dramatically the complexity of the optimization problem. In fact, we are considering the minimization of a strictly convex function (the negative mutual information) over a convex set (intersection of the TP, PAP, and positive semidefiniteness constraints on the input covariance matrix), which corresponds to a \emph{convex optimization problem}. As such, its solution is global and unique~\cite{boyd}. Then, any standard optimization algorithm (\emph{e.g.}, interior point) provides the capacity over the variable space corresponding to the input covariance matrix. A general closed-form solution appears to be out of question, except in the case when specific conditions are satisfied, as also evidences in~\cite{tuni14} for the PAP-only case. We derive specific conditions for the existence of a closed-form solution in the joint TP and PAP case. Since we resort to numerical algorithms for the derivation of the channel capacity, a metric of interest is complexity. We note that the proposed algorithm for the full-rank case reduces dramatically complexity because $i)$ the optimization is based on a diagonal matrix determined by ${\mathsf{n_T}}$ real parameters instead of the $\mathsf{n_T^\mathrm{2}}$ real parameters characterizing the input covariance matrix; and $ii)$ positive semidefiniteness of the input covariance matrix is automatically enforced. We also deal extensively with the \emph{singular case} (when the channel matrix rank is lower than the number of transmit antennas). It is worth mentioning that this case was not addressed in~\cite{vu11} for the PAP-only case though some progress was made in an unpublished work by the same author~\cite{vuarxiv}. The singular case was addressed, only in the MISO case, in~\cite{cao16,loyka17}. The remainder of the paper is organized as follows. Section~\ref{ch.sec} introduces the channel model along with the definition of TP and PAP constraints. A basic form of the general optimization problem based on real variables is reported in \eqref{basic.opt.problem}. Section~\ref{opt.sec} derives the equivalent optimization problems in the full-rank and singular cases (Theorems \ref{opt.full.th} and \ref{opt.singular.th}, respectively). Here, \emph{full-rank} means that the channel matrix rank is equal to the number of transmit antennas and \emph{singular} corresponds to the opposite condition. Explicit conditions for the existence of a closed-form solution are given in Corollary \ref{special.th}. A general complexity measure defined in terms of the number of equivalent real variables required by the optimization problem is provided in Corollary \ref{complexity.th}. The rank of the capacity-achieving covariance matrix is shown to be smaller than the channel matrix rank in Corollary \ref{Q.rank.th}. Finally, Theorem \ref{unit.rank.singular.th} provides an explicit solution for the joint TP and PAP case applicable to the case of unit rank channel matrix. This theorem extends the results from \cite{loyka17} applicable to the MISO case. Algorithm~\ref{wf.algo} describes how to solve the optimization problem in this case and obtain the corresponding capacity-achieving input covariance matrix. Section \ref{numerical.sec} provides numerical results to illustrate the capacity evaluation. First, to validate the methods, numerical results are reported to reproduce results from \cite{vu11} and \cite{loyka17}. Next, a few MIMO scenarios are presented to illustrate the applicability of the optimization proposed, in particular concerning the PAP constraint increase required to attain the water-filling capacity corresponding to the TP-only constraint. Then, complexity evaluation is reported by considering a large number of channel matrix instances and measuring the complexity of the proposed form of the optimization problem~\eqref{opt.full.problem} against the basic general form~\ref{basic.opt.problem}. Concluding remarks are reported in Section \ref{conclusions.sec}. \subsection{Notation} We denote matrices by uppercase boldface letters (\emph{e.g.}, $\bm{A}$) and column vectors by lowercase boldface letters (\emph{e.g.}, $\bm{a}$). We denote the entry at the $i$th row and $j$th column of $\bm{A}$ as $(\bm{A})_{ij}$. We denote by $\bm{a}_i$ and $\bm{A}_i$ the $i$th column and the $i$th row of the matrix $\bm{A}$, respectively, unless otherwise explicitly stated. We denote by $\bm{0}_{m\times n}$ an all-zero matrix of dimensions $m\times n$. We denote by $\bm{I}_n$ the $n\times n$ identity matrix. Matrix inequalities imply that the matrices involved are Hermitian and follow the standard definitions from~\cite{horn}: $\bm{A}>\bm{B}\Leftrightarrow(\bm{A}-\bm{B})$ is positive definite; $\bm{A}\ge\bm{B}\Leftrightarrow(\bm{A}-\bm{B})$ is positive semidefinite. The Frobenius norm of a matrix $\bm{A}$ is denoted by $\|\bm{A}\|$ (similarly for a vector). Notation ${\mathsf{diag}}(a_1,\dots,a_n)$ denotes a diagonal matrix whose elements on the main diagonal are $a_1,\dots,a_n$; ${\mathsf{diag}}(\bm{a})$ denotes a diagonal matrix whose elements on the main diagonal are taken from the vector $\bm{a}$; ${\mathsf{diag}}(\bm{A})$ denotes a diagonal matrix whose elements are taken from the diagonal elements of the matrix $\bm{A}$. $\mathcal{U}(\bm{A})$ and $\mathcal{L}(\bm{A})$ are the upper and lower triangular matrices corresponding to $\bm{A}$, i.e., $(\mathcal{U}(\bm{A}))_{ij}=(\bm{A})_{ij}$ if $i<j$ and $0$ otherwise and $(\mathcal{L}(\bm{A}))_{ij}=(\bm{A})_{ij}$ if $i>j$ and $0$ otherwise. We denote the minimum and maximum eigenvalues of a Hermitian matrix $\bm{A}$ as $\lambda_\mathsf{min}(\bm{A})$ and $\lambda_\mathsf{max}(\bm{A})$, respectively. We denote $(x)_+\triangleq\max(0,x)$ and extend this definition to diagonal matrices by applying the scalar definition to each diagonal entry. We also define $(\bm{A})_+$ for Hermitian matrices $\bm{A}$ in the following way: if $\bm{A}$ has the unitary factorization $\bm{A}=\bm{U}\bm{D}\bm{U}^\mathsfbf{H}$ for some unitary matrix $\bm{U}$ and diagonal matrix $\bm{D}$, then $(\bm{A})_+\triangleq\bm{U}(\bm{D})_+\bm{U}^\mathsfbf{H}$. \section{Channel Model}\label{ch.sec} We consider an ${\mathsf{n_T}}\times{\mathsf{n_R}}$ MIMO channel with ${\mathsf{n_T}}$ transmit and ${\mathsf{n_R}}$ receive antennas, characterized by the standard channel equation $$\bm{y}={\bm{H}}\bm{x}+\bm{z}$$ where ${\bm{H}}$ is the ${\mathsf{n_R}}\times{\mathsf{n_T}}$ channel matrix, $\bm{x}$ is the transmitted symbol vector, $\bm{z}$ is the received noise sample vector with joint circularly symmetric complex Gaussian distribution $\bm{z}\sim\mathcal{CN}(0,\bm{I}_{\mathsf{n_R}})$, and $\bm{y}$ is the received signal sample vector. The channel matrix is assumed to be known exactly at both the transmitter and the receiver endpoints (i.e., we have perfect CSIT/CSIR). Every column of ${\bm{H}}$ contains at least one nonzero element and hence has positive norm (otherwise the corresponding transmitted signal would be useless). In accordance with the previous assumptions, the mutual information corresponding to an input covariance matrix $\bm{Q}$ is given by~\cite{cover} $$I(\bm{x};\bm{y})=\log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})$$ when $\bm{x}\sim\mathcal{CN}(\bm{0},\bm{Q})$, and represents the maximum achievable rate over the MIMO channel under the input covariance constraint. Hereafter, we consider the joint TP and PAP constrained MIMO channel capacity \begin{equation}\label{basic.opt.problem} C = \max_{\bm{Q}:\bm{Q}\ge\bm{0},\mathop{\mathsf{tr}}(\bm{Q})\le P_\mathsf{tot},{\mathsf{diag}}(\bm{Q})\le\bm{P}}\log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}) \end{equation} where $P_\mathsf{tot}$ characterizes the TP constraint, i.e., the maximum average transmitted power from all the antennas, which is represented by the trace of the input covariance matrix $\bm{Q}$. Moreover, $\bm{P}$ is a diagonal matrix containing the PAP upper bounds to the average power transmitted by every antenna. If $\bm{P}={\mathsf{diag}}(P_1,\dots,P_{\mathsf{n_T}})$, the constraints are given by $(\bm{Q})_{ii}\le P_i,i=1,\dots,{\mathsf{n_T}}$, individually, or by ${\mathsf{diag}}(\bm{Q})\le\bm{P}$ in compact matrix form. We shall assume that \begin{align}\label{P.ineq} \sum_{i=1}^{{\mathsf{n_T}}}P_i\ge P_\mathsf{tot}. \end{align} because otherwise the TP constraint would be unattainable. The function $\log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})$ is strictly concave over the convex set of positive semidefinite matrices $\bm{Q}\ge\bm{0}$~\cite{cover}. Since also the TP and PAP constraints lead to convex sets, the optimization problem is convex and can be solved by solving the KKT equations. Moreover, since the objective function is strictly concave and the optimization problem is convex, its solution is global and unique~\cite{boyd}. \begin{remark} Optimization problem \eqref{basic.opt.problem} can be solved directly by using one of the several optimization algorithms proposed in the literature for nonlinear convex optimization (\emph{e.g.}, interior-point, sequential quadratic programming, active-set optimization algorithms)~\cite{bonnans}. Since the matrix $\bm{Q}$ is Hermitian and may have complex elements, one may consider the following equivalent \emph{real} optimization problem: \begin{subequations}\label{X.opt.problem} \begin{align} \min_{\bm{X}}\quad & -\log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})\\ s.t. \quad & \bm{Q}={\mathsf{diag}}(\bm{X})+\mathcal{U}(\bm{X})+\mathcal{U}(\bm{X})^\mathsfbf{T}\nonumber\\ & +\,\mathrm{j}\,[\mathcal{L}(\bm{X})-\mathcal{L}(\bm{X})^\mathsfbf{T}]\ge\bm{0}\\ & {\mathsf{diag}}(\bm{Q})\le\bm{P}={\mathsf{diag}}(P_1,\dots,P_{\mathsf{n_T}})\\ & \mathop{\mathsf{tr}}(\bm{Q})\le P_\mathsf{tot} \end{align} \end{subequations} A closed-form general solution is out of question in the general MIMO case, whereas it is feasible in the MISO case~\cite{loyka17} and in a special full-rank case~\cite{vu11,tuni14}. Nevertheless, the KKT equations can be used to decrease the complexity of the optimization problem itself by turning it into an equivalent one with a smaller number of unknowns. \end{remark} \section{Solution of the Optimization Problem}\label{opt.sec} The optimization problem corresponding to the derivation of the MIMO channel capacity under a joint TP and PAP constraint can be written in the following standard form~\cite{boyd}: \begin{subequations}\label{opt.problem} \begin{align} \min_{\bm{Q}}\quad & -\log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})\\ s.t. \quad & \bm{Q}\ge\bm{0}\\ & {\mathsf{diag}}(\bm{Q})\le\bm{P}={\mathsf{diag}}(P_1,\dots,P_{\mathsf{n_T}})\\ & \mathop{\mathsf{tr}}(\bm{Q})\le P_\mathsf{tot} \end{align} \end{subequations} This optimization problem is convex because of the strict convexity of the objective function $-\log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})$~\cite{cover} and of the convexity of the domain (intersection of convex domains). The solution of the optimization problem \eqref{opt.problem} depends on the rank of the channel matrix, which can be classified in two different cases. \begin{enumerate} \item The \emph{full-rank} case, when the channel matrix rank is equal to the number of transmit antennas. \item The \emph{singular} case, when the channel matrix rank is smaller than the number of transmit antennas. \end{enumerate} The latter case occurs whenever, though not exclusively, ${\mathsf{n_R}}<{\mathsf{n_T}}$, as in the MISO case. Both cases will be addressed in the following sections. \subsection{Full-Rank Case ($\mathsf{rank}({\bm{H}})={\mathsf{n_T}}$)}\label{opt.full.sec} The solution of the optimization problem \eqref{opt.problem} depends on the rank of the channel matrix ${\bm{H}}$. In the case of full rank of ${\bm{H}}$ it can be characterized by the following theorem. \begin{theorem}[$\mathsf{rank}({\bm{H}})={\mathsf{n_T}}$]\label{opt.full.th} The capacity-achieving input covariance matrix for a MIMO channel with a joint TP and PAP constraint is given by \begin{equation}\label{Qopt.full.eq} \bm{Q}_\mathsf{opt} = \bm{K}^{-1}(\bm{K}\check{\bm{D}}_\mathsf{opt}\bm{K}-\bm{I}_{\mathsf{n_T}})_+\bm{K}^{-1}, \end{equation} where $\bm{K}\triangleq({\bm{H}}^\mathsfbf{H}{\bm{H}})^{1/2}$ is the full-rank matrix square root of the Gramian of the channel matrix ${\bm{H}}$ and $\check{\bm{D}}_\mathsf{opt}$ is derived by the solution of the optimization problem \begin{subequations}\label{opt.full.problem} \begin{align} \min_{\check{\bm{D}}}\quad & -\log\det[\bm{I}_{\mathsf{n_T}}+(\bm{K}\check{\bm{D}}\bm{K}-\bm{I}_{\mathsf{n_T}})_+]\\ s.t. \quad & \check{\bm{D}}>0\\ & \mathop{\mathsf{tr}}[\bm{K}^{-1}(\bm{K}\check{\bm{D}}\bm{K}-\bm{I}_{\mathsf{n_T}})_+\bm{K}^{-1}]=P_\mathsf{tot}\\ & {\mathsf{diag}}[\bm{K}^{-1}(\bm{K}\check{\bm{D}}\bm{K}-\bm{I}_{\mathsf{n_T}})_+\bm{K}^{-1}]\le\bm{P} \end{align} \end{subequations} \end{theorem} \begin{IEEEproof} See Appendix \ref{opt.full.app} \end{IEEEproof} This optimization problem can be solved by a standard convex optimization algorithm (\emph{e.g.,} interior point). In order to initialize the matrix $\check{\bm{D}}$ we notice that, from the proof of Theorem \ref{opt.full.th} in Appendix~\ref{opt.full.app}, since $\Lam_\mathsf{F}-\bm{I}_{\mathsf{n_T}}\le(\Lam_\mathsf{F}-\bm{I}_{\mathsf{n_T}})_+$, and hence, from \eqref{Ptot.eq}, we get $$\check{\bm{D}}-\bm{K}^{-2}\le\bm{Q}\Rightarrow\mathop{\mathsf{tr}}(\check{\bm{D}})\le P_\mathsf{tot}+\mathop{\mathsf{tr}}(\bm{K}^{-2}).$$ Thus, we can initialize $\check{\bm{D}}$ by $$\check{\bm{D}}_0\triangleq(P_\mathsf{tot}+\alpha\mathop{\mathsf{tr}}(\bm{K}^{-2})\bm{I}_{\mathsf{n_T}}$$ for some $\alpha<1$. The choice of $\alpha$ affects the convergence properties of the iterative algorithm. As noted in \cite{vu11}, and subsequently in \cite{tuni14}, for the PAP-only case, a special case occurs when it is possible to solve in closed form the optimization problem of Theorem \ref{opt.full.th}. With the joint TP and PAP constraints we have the the following result. \begin{corollary}[$\mathsf{rank}({\bm{H}})={\mathsf{n_T}}$]\label{special.th} The capacity-achieving input covariance matrix for a MIMO channel with joint TP and PAP constraints is \begin{equation}\label{Qopt.special.eq} \bm{Q}_\mathsf{opt} = \frac{P_\mathsf{tot}+\mathop{\mathsf{tr}}(\bm{K}^{-2})}{{\mathsf{n_T}}}\bm{I}_{\mathsf{n_T}}-\bm{K}^{-2}, \end{equation} where $\bm{K}\triangleq({\bm{H}}^\mathsfbf{H}{\bm{H}})^{1/2}$, if the following conditions hold: \begin{subequations} \begin{align} P_\mathsf{tot}&\ge{\mathsf{n_T}}\lambda_\mathsf{max}(\bm{K}^{-2})-\mathop{\mathsf{tr}}(\bm{K}^{-2})\\ P_\mathsf{tot}&\le{\mathsf{n_T}}\min_{1\le i\le{\mathsf{n_T}}}\Big\{(\bm{K}^{-2})_{ii}+P_i\Big\}-\mathop{\mathsf{tr}}(\bm{K}^{-2}) \end{align} \end{subequations} The capacity is \begin{equation} C={\mathsf{n_T}}\log_2\bigg(\frac{P_\mathsf{tot}+\mathop{\mathsf{tr}}(\bm{K}^{-2})}{{\mathsf{n_T}}}\bigg)+\log_2(\bm{K}^2). \end{equation} \end{corollary} \begin{IEEEproof} Assume that $\check{\bm{D}}>\bm{K}^{-2}$ and maximize $\det(\check{\bm{D}})$ by the scaled identity matrix in the proof of Theorem \ref{opt.full.th}. \end{IEEEproof} \subsection{Singular Case ($\mathsf{rank}({\bm{H}})<{\mathsf{n_T}}$)}\label{opt.singular.sec} Here, we consider the case of a channel matrix with rank strictly lower than the number of columns, i.e., the number of transmit antennas ${\mathsf{n_T}}$. The following theorem characterizes the capacity-achieving covariance matrix in the singular case. \begin{theorem}[$\mathsf{rank}({\bm{H}})<{\mathsf{n_T}}$]\label{opt.singular.th} The capacity-achieving input covariance matrix for a MIMO channel with joint TP and PAP constraints and channel matrix with rank $\nu<{\mathsf{n_T}}$, the number of transmit antennas, is obtained by solving the following optimization problem. \begin{subequations}\label{opt.singular.problem} \begin{align} \min_{\check{\bm{D}},\bm{Q}}\quad & -\log\det[\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}]\\ s.t. \quad & \check{\bm{D}}>0,\bm{Q}\ge\bm{0}\\ & {\mathsf{diag}}(\bm{Q})\le\bm{P}\\ & \mathop{\mathsf{tr}}(\bm{Q})\le P_\mathsf{tot}\\ & \Vm_\mathsf{H}^\mathsfbf{H}\bm{Q}\Vm_\mathsf{H}=\Lam_\mathsf{H}^{-1}\Um_\mathsf{H}^\mathsfbf{H}({\bm{H}}\check{\bm{D}}{\bm{H}}^\mathsfbf{H}-\bm{I}_{\mathsf{n_R}})_+\Um_\mathsf{H}\Lam_\mathsf{H}^{-1} \end{align} \end{subequations} where we used the reduced-size SVD of the channel matrix ${\bm{H}}=\Um_\mathsf{H}\Lam_\mathsf{H}\Vm_\mathsf{H}^\mathsfbf{H}$, where $\Lam_\mathsf{H}$ is a $\nu\times\nu$ positive definite diagonal matrix and $\Um_\mathsf{H},\Vm_\mathsf{H}$ are ${\mathsf{n_T}}\times\nu$ and ${\mathsf{n_R}}\times\nu$ partial unitary matrices, such that $\Um_\mathsf{H}^\mathsfbf{H}\Um_\mathsf{H}=\Vm_\mathsf{H}^\mathsfbf{H}\Vm_\mathsf{H}=\bm{I}_\nu$. \end{theorem} \begin{IEEEproof} See Appendix \ref{opt.singular.app} \end{IEEEproof} \begin{remark} Notice that, in the singular case, the TP constraint is not necessarily met with equality because the relative argument used in the case of nonsingular $\bm{K}$ (deriving from the inequality ${\mathsf{diag}}(\bm{Q})\le\bm{P}$) fails to hold in this case where the PAP constraints implies that ${\mathsf{diag}}(\bm{V}_+\tilde{\Qm}_+\bm{V}_+^\mathsfbf{H})\le\bm{P}$. This has a major impact on the capacity, which can be substantially lower in this case because meeting the PAP constraints prevents to exploit the total available power according to the TP constraint. \end{remark} \begin{corollary}[Complexity]\label{complexity.th} The complexity of the equivalent optimization problem derived in Ths.\ \ref{opt.full.th} and \ref{opt.singular.th}, in terms of cardinality of the variable space, is given by \begin{equation}\label{complexity.eq} N_\mathsf{var}=2({\mathsf{n_T}}-\nu)\nu+{\mathsf{n_T}}. \end{equation} \end{corollary} \begin{IEEEproof} See Appendix \ref{opt.singular.app}. \end{IEEEproof} \begin{remark} It is interesting to notice that the worst-case complexity of the optimization algorithm corresponds to the case of rank $\nu={\mathsf{n_T}}/2$ or the closest integer. Compared to the fixed complexity of the basic form of the optimization problem \eqref{X.opt.problem}, the complexity of the optimization algorithm in the full-rank case is ${\mathsf{n_T}}$ times lower. When $\nu={\mathsf{n_T}}/2$, the complexity is still reduced by a factor $2$ and when $\nu=1$, the reduction is by a factor ${\mathsf{n_T}}/3$, approximately. However, in this last case, the use of Algorithm \ref{wf.algo} from Appendix \ref{unit.rank.singular.app} dramatically reduces complexity and provides an exact result without the need of numerical algorithms like interior-point. \end{remark} \begin{corollary}[Rank]\label{Q.rank.th} The capacity-achieving input covariance matrix $\bm{Q}$ for a MIMO channel with joint TP and PAP constraints and channel matrix with rank $\nu<{\mathsf{n_T}}$ satisfies the following inequalities: \begin{equation}\label{Q.rank.eq} 1\le\mathsf{rank}(\bm{Q})\le\nu. \end{equation} \end{corollary} \begin{IEEEproof} See Appendix \ref{opt.singular.app}. \end{IEEEproof} \subsection{Unit-Rank Singular Case} In this section we consider a MIMO channel with channel matrix having unit rank, i.e., $\nu=1$. The MISO channel is a special case where $\nu={\mathsf{n_R}}=1$. More generally, a unit-rank MIMO channel has a channel matrix which can be expressed as \begin{equation}\label{unit.rank.H.eq} {\bm{H}}=\|{\bm{H}}\|\bm{u}\bm{v}^\mathsfbf{H}, \end{equation} where $\bm{u},\bm{v}$ are unit-norm column vectors. The special MISO case has been dealt with in the literature (see, in particular, \cite{cao16,loyka17}) where closed-form expressions have been proposed. Our approach extends these results and our findings are summarized in the following theorem. \begin{theorem}\label{unit.rank.singular.th} Given a MIMO channel with unit-rank channel matrix having SVD ${\bm{H}}=\|{\bm{H}}\|\bm{u}\bm{v}^\mathsfbf{H}$, where $\|\bm{u}\|=\|\bm{v}\|=1$, the channel capacity with joint TP and PAP constraints is given by \begin{equation}\label{unit.rank.singular.cap.eq} C=\log\bigg(1+\|{\bm{H}}\|^2\sum_{i=1}^{{\mathsf{n_T}}}|v_iq_i|^2\bigg) \end{equation} where $v_i,q_i$ are the $i$th elements of the vectors $\bm{v},\bm{q}$, respectively, for $i=1,\dots,{\mathsf{n_T}}$, and the vector $\bm{q}$ is obtained by setting $$q_i\triangleq\sqrt{\min(\alpha|v_i|^2,P_i)}\ \mathsf{e}^{-\,\mathrm{j}\,\angle v_i},i=1,\dots,{\mathsf{n_T}},$$ where $\alpha$ is obtained by solving the equation \begin{equation}\label{alpha.eq} \sum_{i=1}^{{\mathsf{n_T}}}\min(\alpha|v_i|^2,P_i)=P_\mathsf{tot}. \end{equation} The unit-rank capacity-achieving covariance matrix is \begin{equation}\label{unit.rank.singular.Q.eq} \bm{Q}_\mathsf{opt}=\bm{q}\qv^\mathsfbf{H} \end{equation} and the TP constraint is always attained with equality. \end{theorem} \begin{IEEEproof} See Appendix \ref{unit.rank.singular.app}. The appendix reports an algorithm for the solution of \eqref{alpha.eq}, Algorithm~\ref{wf.algo}. \end{IEEEproof} Theorem \ref{unit.rank.singular.th} extends the results of~\cite[Th.1,2]{loyka17} and~\cite{cao16} from the MISO case to the unit-rank MIMO case. It obviously applies to the MISO case, as well. Algorithm~\ref{wf.algo} from Appendix~\ref{unit.rank.singular.app} is more easily implementable than the derivations in~\cite{cao16,loyka17}. It is also closely related to the algorithm used to solve the water-filling equation. \section{Numerical Results}\label{numerical.sec} In this section we report some numerical results obtained by applying the proposed optimization algorithm implemented in Matlab. \subsection{Validation} Fig.~\ref{f1.fig} validates the results of the proposed algorithm against those reported in~\cite{vu11}. The diagrams show the capacity of a $2\times2$ MIMO channel with the channel matrix defined in~\cite[eq.\ (26)]{vu11} in the following cases: {\sf\small PAP}: PAP constraint with $P_1$ from the abscissa and $P_2=1-P_1$; {\sf\small TP}: TP constraint with $P_\mathsf{tot}=1$ (water-filling solution); {\sf\small MC}: $\bm{Q}={\mathsf{diag}}(P_1,1-P_1)$. It can be seen that the curves coincide exactly with those reported in~\cite{vu11}. \insertfig{f1}{Capacity of a $2\times2$ MIMO channel with channel matrix defined in~\cite[eq.\ (26)]{vu11} in the following cases: {\sf\scriptsize PAP}: PAP constraint with $P_1$ from the abscissa and $P_2=1-P_1$; {\sf\scriptsize TP}: TP constraint with $P_\mathsf{tot}=1$; {\sf\scriptsize MC}: $\bm{Q}={\mathsf{diag}}(P_1,1-P_1)$.} Figs.\ \ref{f2a.fig}--\ref{f2b.fig} validate the results from Algorithm \ref{wf.algo} against those of \cite[Figs.1-2]{loyka17}. The former reports the capacity versus the TP constraint $P_\mathsf{tot}$ and the latter reports the ${\mathsf{n_T}}=4$ normalized amplitudes $[(\bm{Q})_{ii}/P^*]^{1/2}$ for $i=1,\dots,{\mathsf{n_T}}$ of the capacity-achieving covariance matrix after defining $P^*\triangleq\min(P_\mathsf{tot},\mathop{\mathsf{tr}}(\bm{P}))$. It can be seen that the curves coincide exactly with those reported in~\cite{loyka17}. \insertfig{f2a}{Capacity of a $4\times1$ MISO channel with matrix from~\cite[Fig.\ 1]{loyka17}.} \insertfig{f2b}{Amplitude distribution from the capacity-achieving covariance matrix normalized with respect to $P^*\triangleq\min(P_\mathsf{tot},\mathop{\mathsf{tr}}(\bm{P}))$ with channel matrix as in Fig.\ \ref{f2a.fig}.} \subsection{Applications} Next, we illustrate the application of the algorithms proposed in Theorem \ref{opt.full.th} and \ref{opt.singular.th} by considering the $3\times4$ and $3\times2$ channel matrices obtained in Matlab by the following commands: \begin{itemize} \item \verb|rng(1);H1=randn(4,3)+1i*randn(4,3);| \item \verb|rng(1);H2=randn(2,3)+1i*randn(2,3);| \end{itemize} The matrices obtained are given in eqs.\ \eqref{H1.eq} and \eqref{H2.eq}. \begin{figure*} \begin{equation}\label{H1.eq} {\bm{H}}_\mathsf{3\times4}=\begin{pmatrix} -0.6490 - 1.5094\,\mathrm{j}\, & -0.8456 - 1.9654\,\mathrm{j}\, & -0.1969 - 0.2752\,\mathrm{j}\, \\ 1.1812 + 0.8759\,\mathrm{j}\, & -0.5727 - 1.2701\,\mathrm{j}\, & 0.5864 + 0.6037\,\mathrm{j}\, \\ -0.7585 - 0.2428\,\mathrm{j}\, & -0.5587 + 1.1752\,\mathrm{j}\, & -0.8519 + 1.7813\,\mathrm{j}\, \\ -1.1096 + 0.1668\,\mathrm{j}\, & 0.1784 + 2.0292\,\mathrm{j}\, & 0.8003 + 1.7737\,\mathrm{j}\, \end{pmatrix} \end{equation} \begin{equation}\label{H2.eq} {\bm{H}}_\mathsf{3\times2}=\begin{pmatrix} -0.6490 - 0.5587\,\mathrm{j}\, & -0.7585 - 0.1969\,\mathrm{j}\, & -0.8456 - 0.8519\,\mathrm{j}\, \\ 1.1812 + 0.1784\,\mathrm{j}\, & -1.1096 + 0.5864\,\mathrm{j}\, & -0.5727 + 0.8003\,\mathrm{j}\, \end{pmatrix} \end{equation} \hrulefill \end{figure*} ${\bm{H}}_1$ corresponds to an instance of full-rank MIMO since $\mathsf{rank}({\bm{H}}_1)={\mathsf{n_T}}=3$ and ${\bm{H}}_1$ corresponds to an instance of singular MIMO since $\mathsf{rank}({\bm{H}}_1)=2<{\mathsf{n_T}}=3$. In both cases we assume $\bm{P}={\mathsf{diag}}(0.1,0.1,1)$ and plot the capacity with respect to $P_\mathsf{tot}$. The results obtained are illustrated in Fig.\ \ref{f3.fig}. We can see that the rank of the capacity-achieving covariance matrices increases with the TP constraint up to the maximum predicted by Corollary \ref{Q.rank.th}. Also, the capacity with the joint constraint saturates when the TP constraint exceeds the sum of the PAP constraints, which is equal to $1.2$ in this example. \insertfig{f3}{Capacity of the $3\times4$ and $2\times4$ MIMO channels corresponding to the channel matrices reported in \eqref{H1.eq} and \eqref{H2.eq} with fixed PAP constraints given by $\bm{P}={\mathsf{diag}}(0.1,0.1,1)$ and variable TP constraint in abscissa. The curves labeled by {\sf\scriptsize H1:cap} and {\sf\scriptsize H2:cap} report the capacity corresponding to the channel matrices ${\bm{H}}_1$ and ${\bm{H}}_2$, respectively. The piecewise horizontal lines labeled by {\sf\scriptsize H1:rank} and {\sf\scriptsize H2:rank} report the rank of the capacity-achieving covariance matrices corresponding to the channel matrices reported in \eqref{H1.eq} and \eqref{H2.eq}, respectively. } Another illustration of the joint TP and PAP constrained capacity calculation is given in Fig.\ \ref{f5a.fig}. The figure considers a $3\times3$ and a $4\times4$ MIMO channel with channel matrices given in \eqref{MIMO3x3.eq} and \eqref{MIMO4x4.eq}, respectively. The TP constraint is $P_\mathsf{tot}=3$ and $4$, respectively, and the PAP constraint is in the abscissa, constant for every antenna. It can be seen that equal power allocation achieves a lower capacity than variable power allocation based on water-filling and the TP constraint, as expected. Increasing the PAP constraint increases the capacity up to the water-filling limit imposed by the TP constraint, as illustrated by the curves of Fig.\ \ref{f5a.fig}. Similarly, Figs.\ \ref{f5b.fig} and \ref{f5c.fig} illustrate the same scenario with TP constraint reduced by a factor $10$ and $100$, respectively. The figures show that, as the TP constraint decreases, the PAP constraint must increase more and more in order to achieve the maximum capacity corresponding to a TP-only constrained system. This is a consequence of the fact that the water-filling power distribution increases its dynamic range as the TP constraint decreases. \begin{figure*} \begin{equation}\label{MIMO3x3.eq {\bm{H}}_\mathsf{3\times3}=\begin{pmatrix} 0.1038 - 0.0877\,\mathrm{j}\, & -0.4125 - 1.6836\,\mathrm{j}\, & 1.9318 + 0.2237\,\mathrm{j}\,\\ -0.0410 - 0.0299\,\mathrm{j}\, & -0.5255 - 0.5724\,\mathrm{j}\, & -0.7740 - 1.4445\,\mathrm{j}\,\\ 0.0074 + 0.1378\,\mathrm{j}\, & -0.6510 + 0.4731\,\mathrm{j}\, & 1.4142 + 0.8371\,\mathrm{j}\, \end{pmatrix} \end{equation} \begin{equation}\label{MIMO4x4.eq {\bm{H}}_\mathsf{4\times4}=\begin{pmatrix} 0.3576 + 0.1914\,\mathrm{j}\, & 0.0614 + 0.1692\,\mathrm{j}\, & -0.7338 + 1.0030\,\mathrm{j}\, & -0.0943 - 0.3671\,\mathrm{j}\,\\ 0.7547 + 0.1277\,\mathrm{j}\, & 0.5032 - 0.2920\,\mathrm{j}\, & -0.4087 - 1.9283\,\mathrm{j}\, & 0.3410 - 0.0309\,\mathrm{j}\,\\ -0.4020 + 1.1647\,\mathrm{j}\, & 0.1404 + 0.3537\,\mathrm{j}\, & 1.6532 + 3.0492\,\mathrm{j}\, & -0.4247 - 0.0599\,\mathrm{j}\,\\ 0.7130 - 2.0329\,\mathrm{j}\, & 0.4724 + 0.5394\,\mathrm{j}\, & -0.2910 + 0.7012\,\mathrm{j}\, & -0.7934 + 0.2927\,\mathrm{j}\, \end{pmatrix} \end{equation} \hrulefill \end{figure*} \insertfig{f5a}{Capacity of the $3\times3$ and $4\times4$ MIMO channels, described by the channel matrices in \eqref{MIMO3x3.eq} and \eqref{MIMO4x4.eq}, respectively, versus a constant PAP constraint $P$ in abscissa and a TP constraint $P_\mathsf{tot}=3$ and $4$, respectively.} \insertfig{f5b}{Same as Fig.\ \ref{f5a.fig}, but with TP constraint $P_\mathsf{tot}=0.3$ and $0.4$, respectively.} \insertfig{f5c}{Same as Fig.\ \ref{f5a.fig}, but with TP constraint $P_\mathsf{tot}=0.03$ and $0.04$, respectively.} \subsection{Complexity} The time complexity of numerical optimization is illustrated in Fig.\ \ref{f4.fig}. The points report the average CPU time to calculate the capacity of an $n\times n$ MIMO channel with iid Rayleigh distributed channel gains. The PAP constraint is set to $$\bm{P}={\mathsf{diag}}(1,\underbrace{0.1,\dots,0.1}_{n-1})$$ and the TP constraint is set to $P_\mathsf{tot}=1$. We can see that the time complexity growth linearly with ${\mathsf{n_T}}$ and the proposed optimization algorithm based on \eqref{opt.full.problem}, which is a consequence of the fact that the variable space is ${\mathsf{n_T}}$-dimensional. The basic optimization algorithm based on problem \eqref{basic.opt.problem} is far more expensive in terms of cpu-time complexity. The simulation results show a more than cubic growth with ${\mathsf{n_T}}$, more than the increased dimension of the variable space, which is $\mathsf{n_T^\mathrm{2}}$ in this case. This excessive growth can be partly explained by noting that the basic algorithm requires a positive definiteness test in the constraint equations, whose complexity is cubic in the matrix size. Needless to say, the analytic complexity evaluation of optimization algorithms is a hard topic and we limit ourselves to make a comparison based on simulation results. In the unit-rank case, Algorithm \ref{wf.algo} attains the minimum time complexity, several orders of magnitude lower than the complexity of solving the optimization problems~\eqref{basic.opt.problem} and~\eqref{opt.singular.problem}. \insertfig{f4}{Average cpu time versus number of antennas based on the optimization problems \eqref{basic.opt.problem} (BASIC) and \eqref{opt.full.problem} (PROPOSED). Random iid Rayleigh $n\times n$ MIMO channel.} \section{Conclusions}\label{conclusions.sec} In this work we addressed the derivation of the capacity of a MIMO channel under joint total and per-antenna average power constraints. We have considered separately the \emph{full-rank} and \emph{singular} cases, which consist, respectively, of having the channel matrix rank equal to or lower than the number of transmit antennas. Closed-form results have been provided in a special full-rank case (Corollary~\ref{special.th}) and for the general unit-rank MIMO case (Theorem~\ref{unit.rank.singular.th}). The unit-rank case is supported by an iterative algorithm similar to the \emph{water-filling} algorithm leading to the unit-rank capacity achieving covariance matrix (Algorithm~\ref{wf.algo}). When the channel rank is greater than one, numerical optimization seems to be the only way to find the channel capacity. Then, we focused on the complexity of numerical optimization, identified by the number of equivaent real variables in the optimization problem. First, we noticed that the general case can be always solved by an optimization problem depending on $\mathsf{n_T^\mathrm{2}}$ real variables, i.e., problem~\eqref{basic.opt.problem}. Then, we derived equivalent optimization problems with a smaller number of equivalent real parameters for the full-rank case (Theorem~\ref{opt.full.th}) and for the singular case (Theorem~\ref{opt.singular.th}). The total number of equivalent real parameters is given by Corollary~\ref{complexity.th}. The range of possible values of the capacity-achieving input covariance matrix rank is derived in Corollary~\ref{Q.rank.th}. Finally, numerical results are reported $i)$ to validate the optimization algorithms against existing literature results; $ii)$ to illustrate the application of the proposed methods to practical MIMO scenarios where the per-antenna constraint is of major interest; and $iii)$ to evaluate the time complexity of the proposed algorithms. \appendices \section{Proof of Theorem \ref{opt.full.th}}\label{opt.full.app} \begin{IEEEproof} The optimization problem leading to the capacity considered in Theorem \ref{opt.full.th} leads to the Lagrangian function given by \begin{align*} \mathcal{L}(\bm{Q})=& -\log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})+\lambda[\mathop{\mathsf{tr}}(\bm{Q})-P_\mathsf{tot}]\\ &+\mathop{\mathsf{tr}}(\bm{\Lambda}(\bm{Q}-\bm{P}))-\mathop{\mathsf{tr}}(\Mmm\bm{Q}). \end{align*} The KKT equations can be written as follows: \begin{subequations}\label{kkt.eq} \begin{align} {\bm{H}}^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})^{-1}{\bm{H}}&=\lambda\bm{I}_{\mathsf{n_T}}+\bm{\Lambda}-\Mmm\\ \lambda&\ge0\\ \text{Diagonal}\ \bm{\Lambda}&\ge\bm{0}\\ \text{Hermitian}\ \Mmm,\bm{Q}&\ge\bm{0}\\ \Mmm\bm{Q}&=\bm{0}\\ \bm{\Lambda}({\mathsf{diag}}(\bm{Q})-\bm{P}))&=\bm{0}\\ \lambda[\mathop{\mathsf{tr}}(\bm{Q})-P_\mathsf{tot}]&=0\\ {\mathsf{diag}}(\bm{Q})&\le\bm{P}\\ \mathop{\mathsf{tr}}(\bm{Q})&\le P_\mathsf{tot} \end{align} \end{subequations} The diagonal matrix $\lambda\bm{I}_{\mathsf{n_T}}+\bm{\Lambda}$ is positive definite since \begin{align*} (\lambda\bm{I}_{\mathsf{n_T}}+\bm{\Lambda})_{ii} &=\lambda+\lambda_i\\ &={\bm{h}}_i^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})^{-1}{\bm{h}}_i+(\Mmm)_{ii}\\ &\ge{\bm{h}}_i^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})^{-1}{\bm{h}}_i\\ &>0. \end{align*} The inequalities depend on the fact that $\Mmm\ge\bm{0}$ (hence $(\Mmm)_{ii}\ge0$) and that $\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}>\bm{0}$ (since $\bm{Q}\ge\bm{0}$). The last inequality holds unless ${\bm{h}}_i=\bm{0}$, which would imply no signal transmission from the $i$-th antenna. Next, we define the diagonal matrix \begin{equation} \bm{D}\triangleq\lambda\bm{I}_{\mathsf{n_T}}+\bm{\Lambda}>0. \end{equation} From the KKT equations \eqref{kkt.eq} we get the following equations: \begin{subequations} \begin{align} {\bm{H}}^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})^{-1}{\bm{H}}\bm{Q}&=\bm{D}\bm{Q}\\ \text{Diagonal}\ \bm{D}&>\bm{0}\\ {\mathsf{diag}}(\bm{Q})&\le\bm{P}\\ \mathop{\mathsf{tr}}(\bm{Q})&\le P_\mathsf{tot}\label{Ptot.ineq} \end{align} \end{subequations} Now, the constraint \eqref{Ptot.ineq} must be met with equality. Assume, on the contrary, that the optimum covariance matrix $\bm{Q}_\mathsf{opt}$ satisfies the inequality $\mathop{\mathsf{tr}}(\bm{Q}_\mathsf{opt})<P_\mathsf{tot}$. Then, we consider a covariance matrix $\bm{Q}(\alpha)$ defined by $$(\bm{Q}(\alpha))_{ij}\triangleq\bigg(\frac{P_i}{(\bm{Q}_\mathsf{opt})_{ii}}\bigg)^{\alpha/2}(\bm{Q})_{ij} \bigg(\frac{P_j}{(\bm{Q}_\mathsf{opt})_{jj}}\bigg)^{\alpha/2}.$$ It is plain to see that $\bm{Q}(\alpha)\ge\bm{0}$. Moreover, $\bm{Q}(0)\equiv\bm{Q}_\mathsf{opt}$ and $\bm{Q}(1)>\bm{Q}_\mathsf{opt}$ since at least for one index $i$ with $1\le i\le{\mathsf{n_T}}$ we have $(\bm{Q}_\mathsf{opt})_{ii}<P_i$ (otherwise, if $(\bm{Q}_\mathsf{opt})_{ii}=P_i$ for every $i=1,\dots,{\mathsf{n_T}}$, it would be $\mathop{\mathsf{tr}}(\bm{Q}_\mathsf{opt})=\sum_{i=1}^{{\mathsf{n_T}}}(\bm{Q})_{ii}=\sum_{i=1}^{{\mathsf{n_T}}}P_i\ge P_\mathsf{opt}$ from \eqref{P.ineq}). Next, we define $$\tau(\alpha)\triangleq\mathop{\mathsf{tr}}[\bm{Q}(\alpha)]=\sum_{i=1}^{{\mathsf{n_T}}}\bigg(\frac{P_i}{(\bm{Q}_\mathsf{opt})_{ii}}\bigg)^{\alpha}(\bm{Q}_\mathsf{opt})_{ii}.$$ We can see that $\tau(\alpha)$ is a continuous monotonically increasing real function of $\alpha$ for $\alpha\ge0$. Moreover, $\tau(0)=\mathop{\mathsf{tr}}(\bm{Q}_\mathsf{opt})<P_\mathsf{tot}$ by assumption, and $$\tau(1)=\sum_{i=1}^{{\mathsf{n_T}}}P_i>P_\mathsf{tot}$$ by inequality \eqref{P.ineq}. Hence, there exists $\hat{\alpha}\in(0,1)$ such that $\tau(\hat{\alpha})=P_\mathsf{tot}$ and $\bm{Q}(\hat{\alpha})>\bm{Q}_\mathsf{opt}$ satisfying the total power constraint with equality and attaining a greater mutual information $\log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}(\hat{\alpha}){\bm{H}}^\mathsfbf{H})>\log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}_\mathsf{opt}{\bm{H}}^\mathsfbf{H})$, contrary to the assumed optimality of $\bm{Q}_\mathsf{opt}$. As a consequence, the optimization problem to be solved to find the capacity is given by: \begin{subequations}\label{opt.xxx.problem} \begin{align} {\bm{H}}^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})^{-1}{\bm{H}}\bm{Q}&=\bm{D}\bm{Q} \label{xxx.eq}\\ \text{Diagonal}\ \bm{D}&>\bm{0}\\ {\mathsf{diag}}(\bm{Q})&\le\bm{P}\\ \mathop{\mathsf{tr}}(\bm{Q})&=P_\mathsf{tot} \label{Ptot.eq} \end{align} \end{subequations} where $(\bm{Q})_{ii}<P_i$ for at least one index $i\in\{1,\dots,{\mathsf{n_T}}\}$. Now we find an equivalent expression of \eqref{xxx.eq}: \begin{subequations} \begin{align} \eqref{xxx.eq}\stackrel{(a)}{\Rightarrow} &{\bm{H}}\bm{D}^{-1}{\bm{H}}^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})^{-1}{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}={\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}\label{yyy1.eq}\\ \stackrel{(b)}{\Rightarrow} &{\bm{H}}\bm{D}^{-1}{\bm{H}}^\mathsfbf{H}{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}={\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})\label{yyy2.eq}\\ \stackrel{(c)}{\Rightarrow} &\bm{F}\bm{R}=\bm{R}+\bm{R}^2 \label{yyy3.eq} \end{align} \end{subequations} where we $(a)$ left-multiplied by ${\bm{H}}\bm{D}^{-1}$ and right-multiplied by ${\bm{H}}^\mathsfbf{H}$ \eqref{xxx.eq}; $(b)$ right-multiplied both sides of \eqref{yyy1.eq} by $(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})>\bm{0}$; $(c)$ left-multiplied by $({\bm{H}}^\mathsfbf{H}{\bm{H}})^{-1/2}{\bm{H}}^\mathsfbf{H}$ and right-multiplied by ${\bm{H}}({\bm{H}}^\mathsfbf{H}{\bm{H}})^{-1/2}$ \eqref{yyy2.eq}, and finally applied the definitions: \begin{align*} \bm{K}&\triangleq({\bm{H}}^\mathsfbf{H}{\bm{H}})^{1/2}\\ \check{\bm{D}}&\triangleq\bm{D}^{-1}\\ \bm{F}&\triangleq\bm{K}\check{\bm{D}}\bm{K}\\ \bm{R}&\triangleq\bm{K}\bm{Q}\bm{K} \end{align*} The matrices $\bm{K},\bm{F},\bm{R}$ are Hermitian, $\bm{K},\bm{F}$ are positive definite and $\bm{Q}\ge\bm{0}$. Since $$\bm{F}\bm{R}=\bm{R}+\bm{R}^2=(\bm{F}\bm{R})^\mathsfbf{H}=\bm{R}\bm{F},$$ we have from \cite[Th.1.3.12]{horn} that $\bm{F},\bm{R}$ are simultaneously unitarily diagonalizable, i.e., \begin{align*} \bm{F}&=\bm{K}\check{\bm{D}}\bm{K}=\bm{U}\Lam_\mathsf{F}\bm{U}^\mathsfbf{H}\\ \bm{R}&=\bm{K}\bm{Q}\bm{K}=\bm{U}\Lam_\mathsf{R}\bm{U}^\mathsfbf{H} \end{align*} for some unitary matrix $\bm{U}$ and diagonal matrices $\Lam_\mathsf{F},\Lam_\mathsf{R}$. Thus, we can rewrite \eqref{yyy3.eq} as \begin{align}\label{Lam.eq} \Lam_\mathsf{F}\Lam_\mathsf{R}=\Lam_\mathsf{R}+\Lam_\mathsf{R}^2. \end{align} Given $\Lam_\mathsf{F}$ we can see that $\Lam_\mathsf{R}=(\Lam_\mathsf{F}-\bm{I}_{\mathsf{n_T}})_+$. In fact, since $\Lam_\mathsf{F}$ and $\Lam_\mathsf{R}$ are diagonal matrices, we can consider any given diagonal position where the scalar equation is $$\lambda_F\lambda_R=\lambda_R+\lambda_R^2=(\lambda_R+1)\lambda_R.$$ Since $\bm{Q}\ge\bm{0}$ and $\check{\bm{D}}>\bm{0}$, $\lambda_R\ge0$ and $\lambda_F\ge0$. If $\lambda_F>1$, the equation has two possible solutions: $\lambda_R=0$ or $\lambda_R=\lambda_F-1$. Since our goal is maximizing the mutual information, we choose the latter. Otherwise, if $\lambda_F\le1$, $\lambda_R=0$ is the only possible solution. Therefore, our chosen solution is $\lambda_R=(\lambda_F-1)_+$. The extension to the matrix solution is direct. Since $\bm{K}$ is nonsingular, we have \begin{align} \bm{Q}_\mathsf{opt} &=\bm{K}^{-1}\bm{U}(\Lam_\mathsf{F}-\bm{I}_{\mathsf{n_T}})_+\bm{U}^\mathsfbf{H}\bm{K}^{-1}\nonumber\\ &=\bm{K}^{-1}(\bm{F}-\bm{I}_{\mathsf{n_T}})_+\bm{K}^{-1}\nonumber\\ &=\bm{K}^{-1}(\bm{K}\check{\bm{D}}\bm{K}-\bm{I}_{\mathsf{n_T}})_+\bm{K}^{-1}, \end{align} which proves eq.\ \eqref{Qopt.full.eq} of the Theorem and leads to the optimization problem \eqref{opt.full.problem}. \end{IEEEproof} \section{Proof of Theorem \ref{opt.singular.th}}\label{opt.singular.app} \begin{IEEEproof} A preliminary part of this proof is equivalent to that of Theorem \ref{opt.full.th} but the sequel is different because in this case the rank of ${\bm{H}}$ is smaller than ${\mathsf{n_T}}$ and hence ${\bm{H}}^\mathsfbf{H}{\bm{H}}$ is singular. As in the proof of Theorem \ref{opt.full.problem}, we obtain the equivalent optimization problem \eqref{opt.xxx.problem}. Then, we have the following equivalent expression of \eqref{xxx.eq}: \begin{align}\label{yyy4.eq} \bm{F}\bm{R}=\bm{R}+\bm{R}^2 \end{align} with a different definition of the matrices $\bm{F},\bm{R}$: \begin{align*} \check{\bm{D}}\triangleq\bm{D}^{-1},\qquad\bm{F}\triangleq{\bm{H}}\check{\bm{D}}{\bm{H}}^\mathsfbf{H},\qquad\bm{R}\triangleq{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}. \end{align*} Again, the matrices $\bm{F},\bm{R},\bm{Q}$ are Hermitian positive semidefinite. From \cite[Th.1.3.12]{horn}, $\bm{F}$ and $\bm{R}$ are simultaneously unitarily diagonalizable as \begin{align*} \bm{F}&={\bm{H}}\check{\bm{D}}{\bm{H}}^\mathsfbf{H}=\bm{U}\Lam_\mathsf{F}\bm{U}^\mathsfbf{H}\\ \bm{R}&={\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}=\bm{U}\Lam_\mathsf{R}\bm{U}^\mathsfbf{H} \end{align*} for some unitary matrix $\bm{U}$ and diagonal matrices $\Lam_\mathsf{F},\Lam_\mathsf{R}$. Thus, we can rewrite \eqref{yyy4.eq} as \begin{align} \Lam_\mathsf{F}\Lam_\mathsf{R}=\Lam_\mathsf{R}+\Lam_\mathsf{R}^2. \end{align} From the same arguments used after \eqref{Lam.eq}, we can see that $\Lam_\mathsf{R}=(\Lam_\mathsf{F}-\bm{I}_\nu)_+$. Then, from the reduced-size SVD ${\bm{H}}=\Um_\mathsf{H}\Lam_\mathsf{H}\Vm_\mathsf{H}^\mathsfbf{H}$, we obtain, for a given matrix $\check{\bm{D}}$, \begin{equation}\label{VQV.eq} \Lam_\mathsf{H}^{-1}\Um_\mathsf{H}^\mathsfbf{H}({\bm{H}}\check{\bm{D}}{\bm{H}}^\mathsfbf{H}-\bm{I}_{\mathsf{n_R}})_+\Um_\mathsf{H}\Lam_\mathsf{H}^{-1}=\Vm_\mathsf{H}^\mathsfbf{H}\bm{Q}\Vm_\mathsf{H}. \end{equation} The proof of the Theorem follows. As far as concerns the rank of the capacity-achieving covariance matrix $\bm{Q}$, we recall two of the KKT equations \eqref{kkt.eq}: \begin{subequations} \begin{align} {\bm{H}}^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})^{-1}{\bm{H}}+\Mmm&=\bm{D}\label{kkt1.eq}\\ \Mmm\bm{Q}&=\bm{0}\label{kkt2.eq} \end{align} \end{subequations} From \eqref{kkt1.eq}, since $\bm{D}>\bm{0}$ (see Proof of Theorem \ref{opt.full.th}), so that $\mathsf{rank}(\bm{D})={\mathsf{n_T}}$, and $\mathsf{rank}({\bm{H}}^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})^{-1}{\bm{H}})=\nu$, we can apply inequality \cite[0.4.5.1]{horn} and obtain \begin{align}\label{M.ineq} \mathsf{rank}(\Mmm) &\ge\mathsf{rank}(\bm{D})-\mathsf{rank}({\bm{H}}^\mathsfbf{H}(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H})^{-1}{\bm{H}})\nonumber\\ &={\mathsf{n_T}}-\nu. \end{align} Moreover, from \eqref{kkt2.eq} the matrices $\Mmm,\bm{Q}$ commute and hence~\cite[Th.1.3.12]{horn} we can write them as $$\Mmm=\bm{U}\Lam_\mathsf{M}\bm{U}^\mathsfbf{H},\bm{Q}=\bm{U}\Lam_\mathsf{Q}\bm{U}^\mathsfbf{H}.$$ Thus, we have $\Lam_\mathsf{M}\Lam_\mathsf{Q}=\bm{0}$ and then inequality \eqref{M.ineq} implies that $$\mathsf{rank}(\bm{Q})=\mathsf{rank}(\Lam_\mathsf{Q})\le\nu.$$ Obviously, $\mathsf{rank}(\bm{Q})\ge1$ otherwise $\bm{Q}$ would be the all-zero matrix. This proves \eqref{Q.rank.eq} of Corollary \ref{Q.rank.th}. Additionally, we note that the covariance matrix $\bm{Q}$ is not determined only by $\check{\bm{D}}$, which is specified by $\nu$ real parameters (the diagonal entries). Since the capacity-achieving $\bm{Q}$ has rank not greater than $\nu$ it can be specified by $(2{\mathsf{n_T}}-\nu)\nu$ real parameters. Conditions \eqref{VQV.eq} correspond to $\nu^2$ independent real equations so that the number of real variables in this optimization problem is given by ${\mathsf{n_T}}+(2{\mathsf{n_T}}-\nu)\nu-\nu^2=2({\mathsf{n_T}}-\nu)\nu+{\mathsf{n_T}}$, which proves \eqref{complexity.eq} in Corollary \ref{complexity.th}. \end{IEEEproof} \section{Proof of Theorem \ref{unit.rank.singular.th}}\label{unit.rank.singular.app} \begin{IEEEproof} We can set $\nu=1,\Um_\mathsf{H}=\bm{u},\Lam_\mathsf{H}=\|{\bm{H}}\|,\Vm_\mathsf{H}=\bm{v}$, with $\|\bm{u}\|=\|\bm{v}\|=1$, so that $${\bm{H}}=\|{\bm{H}}\|\bm{u}\bm{v}^\mathsfbf{H}.$$ Then, from Corollary \ref{Q.rank.th}, the capacity-achieving covariance matrix has unit rank and we set $$\bm{Q}=\bm{q}\qv^\mathsfbf{H}.$$ Then, we notice that \begin{align*} \log\det(\bm{I}_{\mathsf{n_R}}+{\bm{H}}\bm{Q}{\bm{H}}^\mathsfbf{H}) &=\log\det(\bm{I}_{\mathsf{n_R}}+\|{\bm{H}}\|^2\bm{u}\bm{v}^\mathsfbf{H}\bm{Q}\bm{v}\bm{u}^\mathsfbf{H})\\ &=\log(1+\|{\bm{H}}\|^2|\bm{v}^\mathsfbf{H}\bm{q}|^2). \end{align*} Since $$\bm{v}^\mathsfbf{H}\bm{q}=\sum_{i=1}^{{\mathsf{n_T}}}|v_iq_i|\mathsf{e}^{\,\mathrm{j}\,\delta_i},$$ where $v_i\triangleq(\bm{v})_i,q_i\triangleq(\bm{q})_i,\delta_i\triangleq\angle q_i-\angle v_i$, we can see that \begin{align*} |\bm{v}^\mathsfbf{H}\bm{q}|^2 &=\sum_{i=1}^{{\mathsf{n_T}}}\sum_{j=1}^{{\mathsf{n_T}}}|v_iq_i||v_jq_j|\cos(\delta_i-\delta_j)\\ &\le\sum_{i=1}^{{\mathsf{n_T}}}\sum_{j=1}^{{\mathsf{n_T}}}|v_iq_i||v_jq_j|=\bigg\{\sum_{i=1}^{{\mathsf{n_T}}}|v_iq_i|\bigg\}^2. \end{align*} The maximum is attained when $\delta_i$ is any constant so that we can set $\delta_i=0$. This implies that the maximum value of $|\bm{v}^\mathsfbf{H}\bm{q}|$ is attained when $\angle q_i=\angle v_i$. Once we found the phases of the $q_i$ we need the absolute values $w_i\triangleq|q_i|$, which can be found by considering the optimization problem \begin{subequations} \begin{align} \min_{w_i,i=1,\dots,{\mathsf{n_T}}}\quad & -\sum_{i=1}^{{\mathsf{n_T}}}|v_i|w_i\\ s.t. \quad & -w_i\le0,i=1,\dots,{\mathsf{n_T}}\\ \quad & w_i-\sqrt{P_i}\le0,i=1,\dots,{\mathsf{n_T}}\\ \quad & \sum_{i=1}^{{\mathsf{n_T}}}w_i^2-P_\mathsf{tot}\le0 \end{align} \end{subequations} The corresponding Lagrangian function is \begin{align*} \mathcal{L}(\bm{w}) &=-\sum_{i=1}^{{\mathsf{n_T}}}|v_i|w_i-\sum_{i=1}^{{\mathsf{n_T}}}\lambda_iw_i+\sum_{i=1}^{{\mathsf{n_T}}}\mu_i(w_i-\sqrt{P_i})\\ &+\lambda\bigg\{\sum_{i=1}^{{\mathsf{n_T}}}w_i^2-P_\mathsf{tot}\bigg\} \end{align*} The corresponding KKT equations are \begin{subequations} \begin{align} -|v_i|-\lambda_i+\mu_i+2\lambda w_i=0\quad&i=1,\dots,{\mathsf{n_T}}\label{kkt.rank1.eq1}\\ 0\le w_i\le\sqrt{P_i}\quad&i=1,\dots,{\mathsf{n_T}}\\ \lambda_iw_i=\mu_i(w_i-\sqrt{P_i})=0\quad&i=1,\dots,{\mathsf{n_T}}\\ \sum_{i=1}^{{\mathsf{n_T}}}w_i^2\le P_\mathsf{tot}\quad\label{kkt.rank1.eq4}\\ \lambda\bigg\{\sum_{i=1}^{{\mathsf{n_T}}}w_i^2-P_\mathsf{tot}\bigg\}=0\quad\label{kkt.rank1.eq5}\\ \lambda\ge0,\lambda_i,\mu_i\ge0\quad&i=1,\dots,{\mathsf{n_T}}\quad \end{align} \end{subequations} \end{IEEEproof} From \eqref{kkt.rank1.eq1} we get $$w_i=\frac{|v_i|+\lambda_i-\mu_i}{2\lambda}$$ if $\lambda>0$. The case $\lambda=0$ implies that the solution of \eqref{kkt.rank1.eq1} is undefined so that it must be discarded. As a consequence, from \eqref{kkt.rank1.eq5}, the TP constraint \eqref{kkt.rank1.eq4} must be attained with equality. Next, we can see from \eqref{kkt.rank1.eq1} that $w_i=0$ is not possible since $|v_i|>0,\lambda_i\ge0,\mu_i=0$. If $w_i<\sqrt{P_i}$, then $$w_i=\frac{|v_i|}{2\lambda}.$$ If $w_i=\sqrt{P_i}$, then $$w_i=\frac{|v_i|-\mu_i}{2\lambda}.$$ These conditions can be summarized by setting $$w_i=\min\bigg(\frac{|v_i|}{2\lambda},\sqrt{P_i}\bigg).$$ Defining the unknown $\alpha\triangleq1/(2\lambda)^2$, we have $w_i^2=\min(\alpha_i|v_i|^2,P_i)$ and get equation \eqref{alpha.eq}. The lhs of this equation is a monotonically nondecreasing function of $\alpha$, which is equal to $0$ when $\alpha=0$ and is equal to $\sum_{i=1}^{{\mathsf{n_T}}}P_i$ when $\alpha\to\infty$. Thus, we have a single solution for $\alpha$, which can be found by Algorithm \ref{wf.algo}, which is based on rewriting \eqref{alpha.eq} in the equivalent form $$\sum_{i=1}^{{\mathsf{n_T}}}\min(\alpha,\rho_{\pi(i)})|v_{\pi(i)}|^2=P_\mathsf{tot}$$ where $\rho_i\triangleq P_i/|v_i|^2$ and $\pi$ is the permutation of the set $\{1,\dots,{\mathsf{n_T}}\}$ such that $\rho_{\pi(i)}\le\rho_{\pi(i+1)}$ for $i=1,\dots,{\mathsf{n_T}}-1$. The solution is based on successive trials based on the assumption that $\alpha\le\rho_{\pi(i)}$ for $i=1,\dots,{\mathsf{n_T}}$. \begin{algorithm} \caption{Algorithm for the solution of eq.~\eqref{alpha.eq}}\label{wf.algo} \begin{algorithmic}[1] \Procedure{Calculate-$\alpha$}{$v_i,P_i,P_\mathsf{tot},i=1,\dots,{\mathsf{n_T}}$} \State Define $\rho_i\triangleq P_i/|v_i|^2$. \State Sort $\rho_i$ increasingly and let $\pi$ be the permutation such \hspace*{4mm} that $\rho_{\pi(i)}\le\rho_{\pi(i+1)},i=1,\dots,{\mathsf{n_T}}-1$. \For{$i=1,\dots,{\mathsf{n_T}}$} \State $$\alpha=\frac{P_\mathsf{tot}-\sum_{k=1}^{i-1}P_{\pi(k)}}{\sum_{k=i}^{{\mathsf{n_T}}}|v_{\pi(k)}|^2}$$ \If{$\alpha\le\rho_{\pi(i)}$} \State\Return $\alpha$ \EndIf \EndFor \EndProcedure \end{algorithmic} \end{algorithm}
\section{Introduction}\label{sec:intro} When there are no sufficient labeled data available, we need to resort to semi-supervised learning (SSL) in tackling machine learning problems. SSL is essential in real world applications, where labeling is expensive and time-consuming. It attempts to boost the performance by leveraging unlabeled data. Its main challenge is how to use unlabeled data effectively to enhance decision boundaries that have been obtained by a small amount of labeled data. Convolutional neural networks (CNNs) are typically a fully-supervised learning tool since they demand a large amount of labeled data to represent the cost function accurately. As the amount of labeled data is small, the cost function is less accurate and, thus, it is not easy to formulate an SSL framework using CNNs. Model parameters of CNNs are traditionally trained under a certain optimization framework with the backpropagation (BP) algorithm. They are called BP-CNNs. Recently, a feedforward-designed convolutional neural network (FF-CNN) methodology was proposed by Kuo {\em et al.} \cite{kuo2018interpretable}. The model parameters of FF-CNNs at a target layer are determined by statistics of the output from its previous layer. Neither an optimization framework nor the BP training algorithm is utilized. Clearly, FF-CNNs are less dependent on data labels. We propose an SSL system based on FF-CNNs in this work. This work has several novel contributions. First, we apply FF-CNNs to the SSL context and show that FF-CNNs outperforms BP-CNNs when the size of the labeled data set becomes smaller. Second, we propose an ensemble system that fuses the output decision vectors of multiple FF-CNNs so as to achieve even better performance. Third, we conduct experiments in three benchmarking datasets (i.e., MNIST, SVHN, and CIFAR-10) to demonstrate the effectiveness of the proposed solutions as described above. The rest of this work is organized as follows. Both SSL and FF-CNN are reviewed in Sec. \ref{sec:review}. The proposed SSL solutions using a single FF-CNN and ensembles of multiple FF-CNNs are described in Sec. \ref{sec:proposed}. Experimental results are shown in Sec.\ref{sec:experiment}. Finally, concluding remarks are drawn and future work is discussed in Sec. \ref{sec:conclusion}. \section{Review of Related Work}\label{sec:review} {\bf Semi-Supervised Learning (SSL).} There are several well-known SSL methods proposed in the literature. Iterative learning, including self-training \cite{rosenberg2005semi} and co-training \cite{blum1998combining}, learns from unlabeled data that have high confidence predictions. Transductive SVMs \cite{joachims1999transductive} extend standard SVMs by maximizing the margin on unlabeled data as well. Another SSL method is to construct a graph to represent data structures and propagate the label information of a labeled data point to unlabeled ones \cite{zhu2002learning, blum2004semi}. More recently, several SSL methods are proposed based on deep generative models, such as the variational auto-encoder (VAE) \cite{kingma2014semi}, and generative adversarial networks (GAN) \cite{dai2017good, salimans2016improved}. All parameters in these networks are determined by the stochastic gradient descent (SGD) algorithm through BP and they are trained based on both labeled and unlabeled data. {\bf Feedforward-designed CNNs (FF-CNNs).} The BP training is computationally intensive, and the learning model of a BP-CNN is lack of interpretability. New solutions have been proposed to tackle these issues. Examples include: interpretable CNNs \cite{zhang2017interpretable, kuo2016understanding, kuo2017cnn} and feedforward-designed CNNs (FF-CNNs) \cite{chen2017saak, kuo2018data, kuo2018interpretable}. FF-CNNs contain two modules: 1) construction of convolutional (conv) layers through subspace approximations, and 2) construction of fully-connected (FC) layers via training sample clustering and least-squared regression (LSR). They are elaborated below. The construction of conv layers is realized by multi-stage Saab transforms \cite{kuo2018interpretable}. The Saab transform is a variant of the principal component analysis (PCA) with a constant bias vector to annihilate activation's nonlinearity. The Saab transform can reduce feature redundancy in the spectral domain, yet there still exists correlation among spatial dimensions of the same spectral component. This is especially true in low-frequency spectral components. Thus, a channel-wise PCA (C-PCA) was proposed in \cite{chen2019ensembles} to reduce spatial redundancy of Saab coefficients furthermore. Since the construction of conv layers is unsupervised, they can be fully adopted in an SSL system. The construction of FC layers is achieved by the cascade of multiple rectified linear least-squared regressors (LSRs) \cite{kuo2018interpretable}. Let the input and output dimensions of a FC layer be $N_{in}$ and $N_{out}$ (with $N_{in} > N_{out}$), respectively. To construct an FC layer, we cluster input samples of dimension $N_{in}$ into $N_{out}$ clusters, and assign pseudo-labels based on clustering results. Next, all samples are transformed into a vector space of dimension $N_{out}$ via LSR, where the index of the output space dimension defines a pseudo-label. In this way, we obtain a supervised LSR building module to serve as one FC layer. It accommodates intra-class variability while enhancing discriminability gradually. \section{Proposed Methods}\label{sec:proposed} \subsection{Semi-supervised Learning System}\label{subsec:semi} {\bf Problem Formulation and Data Pre-processing.} The semi-supervised classification problem can be defined as follows. We have a set of $M$ unlabeled samples $$ {\bf X}^{ul} = \{{\bf x}^{ul}_1, \cdots , {\bf x}^{ul}_M \}, $$ where ${\bf x}^{ul}_i \in \mathbb{R}^{D_{in}}$ is the $i$th input unlabeled sample, and a set of labeled samples that can be written in form of pairs: $$ ({\bf X}^l, {\bf Y}^{l}) = \{({\bf x}^l_1, y^l_1), \cdots ,({\bf x}^l_N , y^l_N \}, $$ where ${\bf x}^l_i \in \mathbb{R}^{D_{in}}$ is the $i$th input labeled sample and $y_i^{l} \in \{ 1, \cdots , L \}$ is its class label. We omit index $i$ whenever the context is clear. We adopt the multi-stage Saab transforms and C-PCA for unsupervised image feature extraction. They can be expressed as $$ {\bf z}^{l}=T_{saab}({\bf x}^{l}), \mbox{ and } {\bf z}^{ul}=T_{saab}({\bf x}^{ul}), $$ where ${\bf z}^{l}, {\bf z}^{ul} \in \mathbb{R}^{D_{out}}$, and $D_{in} > D_{out}$. This is used to facilitate classification with more powerful image features in a lower dimensional space. \begin{figure}[ht!] \centering \centerline{\includegraphics[width=0.65\linewidth]{figure/b.PNG}} \caption{{The proposed semi-supervised learning (SSL) system.}\label{fig:overview-1}} \end{figure} {\bf Pseudo-Label Assignment.} Next, we propose a semi-supervised method in the design of FC layers using multi-stage rectified LSRs as illustrated in Fig. \ref{fig:overview-1}. The pseudo-labels should be generated for both labeled and unlabeled samples in solving the LSR problem. To achieve this goal, we conduct K-means clustering on labeled samples of the same class. For example, we can cluster samples of a single original class into $M$ sub-classes to generate $M$ pseudo-categories. If there are $N$ original classes, we will generate $M \times N$ pseudo-categories in total. Then, pseudo-labels of labeled data can be generated by representing pseudo categories with one-hot vectors, denoted as $$ {\bf Y}^{p} = \{{\bf y}^{p}_1, \cdots, {\bf y}^{p}_M \}. $$ The centroid of the $j$th pseudo-category, denoted by $c_j$, provides a representative sample for the corresponding original class. We define the probability vector of the pseudo-category for each unlabeled sample as \begin{equation}\label{equ:pv} p(t_k|{\bf z}^{ul}) = \frac{\alpha e^{{d_k}}}{\sum_{j}{\alpha e^{{d_j}}}}; \end{equation} where $t_k$ represents the $k$th pseudo-category and \begin{equation} d_k = \frac{{{\bf z}^{ul}} \cdot {\bf c}_k}{\|{\bf z}^{ul}\|\|{\bf c}_k\|}. \end{equation} Then, the probability vector in (\ref{equ:pv}) can be used as the pseudo-label of each unlabeled sample to set up a system of linear regression equations that relates the input data samples and pseudo-labels, $$ [{\bf Y}^{p},{\bf P}({\bf T}|{\bf Z}^{ul})] = {\bf W}_{fc}[{\bf Z}^{l},{\bf Z}^{ul}], $$ where the parameters of FC layer are denoted by \begin{equation} {\bf W}_{fc} = {\bf (Z^TZ)^{-1}Z^TY}, \end{equation} and where \begin{equation} {\bf Z} = [{\bf Z}^{l}, {\bf Z}^{ul}], \mbox{ and } {\bf Y} = [{\bf Y}^{p}, {\bf P}( {\bf T}|{\bf Z}^{ul})]. \end{equation} The final output of one-stage rectified LSR is \begin{equation} {\bf z}^{l}_{out} = f({\bf W}_{fc} {\bf z}^{l}) \mbox{ and } {\bf z}^{ul}_{out} = f({\bf W}_{fc} {\bf z}^{ul}), \end{equation} where $f(.)$ is a non-linear activation function (e.g. ReLU in our experiments), and ${\bf z}^{l}_{out}$ and ${\bf z}^{ul}_{out}$ denote outputs of labeled and unlabeled data, respectively. The output vectors lie in a lower dimensional space. They are used as features to the next stage rectified LSR. {\bf Unlabeled Sample Selection.} Not every unlabeled sample is suitable for constructing FC layers. We define a quality score for each unlabeled sample ${\bf z}^{ul}$ as \begin{equation}\label{equ:qs} S_{i} ({\bf z}^{ul}) = \frac{\sum_{k \in C_i}{p(t_k|{\bf z}^{ul})}} {\sum_{j}{p(t_j|{\bf z}^{ul})}}, \end{equation} where $C_i$ indicates a set of pseudo-categories that belong to the original $i$th class. A low qualify score indicates that the sample is far away from the representative set of examples of a single original class. We exclude those samples in solving the LSR problems. {\bf Multi-stage LSRs.} We repeat several LSRs and finally provide the predicted class labels. In the last stage, we cluster input data based on their original class labels and the LSR is solved using labeled samples only. The multi-stage setting is needed to remove feature redundancy in the spectral dimension and resolve intra-class variability gradually. \subsection{Ensembles}\label{subsec:eb} \begin{figure}[ht!] \centering \centerline{\includegraphics[width=0.65\linewidth]{figure/a.PNG}} \caption{{An ensemble of multiple SSL decision systems.}\label{fig:overview-2}} \end{figure} Ensembles are often used to combine results from multiple weak classifiers to yield a stronger one \cite{zhang2012ensemble}. We use the ensemble idea to achieve better performance in semi-supervised classification. Although both BP-CNNs and FF-CNNs can be improved by ensemble methods, FF-CNNs have much lower training complexity to justify an ensemble solution. The proposed ensemble system is illustrated in Fig. \ref{fig:overview-2}. Multiple semi-supervised FF-CNNs are adopted as the first-stage base classifiers in an ensemble system. Their output decision vectors are concatenated as new features. Afterwards, we apply the principal component analysis (PCA) technique to reduce feature dimension and then feed the dimension-reduced feature vector to the second-stage ensemble classifier. High input diversity is essential to an effective ensemble system that can reach a higher performance gain \cite{brown2005diversity, kuncheva2003measures}. In the proposed ensemble system, we adopt three strategies to increase input diversity. First, we consider different filter sizes in the conv layers as illustrated in Table \ref{table:set} since different filter sizes lead to different features at the output of the conv layer with different receptive fields. Second, we represent color images in different color spaces \cite{ibraheem2012understanding}. In the experiments, we choose the RGB, YCbCr and Lab color spaces and process three channels separately for the latter two color spaces. Third, we decompose images into a set of feature maps using the 3x3 Laws filters \cite{laws1980rapid}, where each feature map focuses on different characteristics of the input image (e.g., brightness, edginess, etc.) \begin{table}[htb] \begin{center} \caption{Network architectures with respect to different input types and different conv layer parameter settings. The second to fourth columns indicate inputs from MNIST, RGB inputs and the single channel inputs from SVHN and CIFAR-10, accordingly.}\label{table:set} \begin{tabular}{|c|c|c|c|c|} \hline \multicolumn{2}{|c|}{} & Greyscale & RGB & Single Channel\\ \hline \multirow{ 2}{*}{FF-1} &Conv1 & 5$\times$5$\times$1, 6 & 5$\times$5$\times$3, 32 &5$\times$5$\times$1, 16 \\ &Conv2 & 5$\times$5$\times$6, 16 & 5$\times$5$\times$32, 64 &5$\times$5$\times$16, 32 \\ \hline \multirow{ 2}{*}{FF-2} &Conv1 & 3$\times$3$\times$1, 6 & 3$\times$3$\times$3, 24 &3$\times$3$\times$1, 8 \\ &Conv2 & 5$\times$5$\times$6, 16 & 5$\times$5$\times$24, 64 &5$\times$5$\times$8, 32 \\ \hline \multirow{ 2}{*}{FF-3} &Conv1 & 5$\times$5$\times$1, 6 & 5$\times$5$\times$3, 32 &5$\times$5$\times$1, 16 \\ &Conv2 & 3$\times$3$\times$6, 16 & 3$\times$3$\times$32, 64 &3$\times$3$\times$16, 32 \\ \hline \multirow{ 2}{*}{FF-4} &Conv1 & 3$\times$3$\times$1, 6 & 3$\times$3$\times$3, 24 &3$\times$3$\times$1, 8 \\ &Conv2 & 3$\times$3$\times$6, 16 & 3$\times$3$\times$24, 48 &3$\times$3$\times$8, 24 \\ \hline \end{tabular} \end{center} \end{table} \section{Experimental Results}\label{sec:experiment} We conduct experiments on three popular datasets: MNIST \cite{lecun1998gradient}, SVHN \cite{netzer2011reading} and CIFAR-10 \cite{krizhevsky2009learning}. We randomly select a subset of labeled training data from them, and test the classification performance on the entire testing set. Each object class has the same number of labeled data to ensure balanced training. We adopt the LeNet-5 architecture \cite{Lecun98gradient-basedlearning} for the MNIST dataset. Since CIFAR-10 is a color image dataset, we increase the filter numbers of the first and the second conv layers and the first and the second FC layers to 32, 64, 200 and 100, respectively, by following \cite{kuo2018interpretable}. The C-PCA is applied to the output of the second conv layer and the feature dimension per channel is reduced from 25 to 20 (for MNIST) or 15 (for SVHN) or 12 (for CIFAR-10). The probability vectors are computed using Eq. (\ref{equ:pv}), where $\alpha$ is set to 50 for all three datasets. The Radial Basis Function (RBF) SVM classifier is used as the second-stage classifier in the ensemble systems in all experiments. Before training the SVM classifier, PCA is applied to the cascaded decision vectors of first-stage classifiers. The reduced feature dimension is determined based on the correlation of decision vectors of base classifiers in an ensemble. \subsection{Individual Semi-Supervised FF-CNN} We compare the performance of the BP-CNN and the proposed semi-supervised FF-CNN on three benchmark datasets in Fig. \ref{fig:acc_1}. For MNIST and SVHN, 1/2, 1/4, 1/8, 1/16,1/32, 1/64, 1/128, 1/256, 1/512 of the entire labeled training set are randomly selected to train the networks. As to CIFAR-10, 1/2, 1/4, 1/8, 1/16,1/32, 1/64, 1/128, 1/256 of the whole labeled dataset are used to learn network parameters. We use the labeled data to train the BP-CNNs. We select unlabeled training data with quality scores of top 70\%, 70\% and 80\% in MNIST, SVHN and CIFAR-10, respectively, in the training of the corresponding semi-supervised FF-CNN. \begin{table}[h!] \normalsize \centering \caption{Testing accuracy (\%) comparison under three settings: 1) without using unlabeled data; 2) using the entire set of unlabeled data; and 3) using a subset of unlabeled data based on quality scores defined by Eq. (\ref{equ:pv}). 1/256 of the labeled data is used on MNIST and SVHN datasets, and 1/128 of the labeled data is used on CIFAR-10 dataset. }\label{table:accuracy_ab} \vspace{0.3cm} \begin{tabular}{|c|ccc|} \hline & MNIST & SVHN & CIFAR-10 \\ \hline Setting 1 & 57.19 ($\pm$ 3.4) & 25.17 ($\pm$ 1.10) & 24.64 ($\pm$ 0.25) \\ \hline Setting 2 & 92.26 ($\pm$ 0.33) & 53.76 ($\pm$ 0.97) & 41.95 ($\pm$ 0.56) \\ \hline Setting 3 & \bf 92.65 ($\pm$ 0.14) & \bf 58.58 ($\pm$ 0.78) & \bf 42.53 ($\pm$ 0.57) \\ \hline \end{tabular} \end{table} \begin{figure*}[ht!] \begin{minipage}[b]{0.33\linewidth} \centering \centerline{\includegraphics[width=0.97\linewidth]{figure/mnist_1.png}} \end{minipage} \hfill \begin{minipage}[b]{0.33\linewidth} \centering \centerline{\includegraphics[width=0.97\linewidth]{figure/svhn_1.png}} \end{minipage} \hfill \begin{minipage}[b]{0.33\linewidth} \centering \centerline{\includegraphics[width=0.97\linewidth]{figure/cifar10_1.png}} \end{minipage} \caption{The comparisons of testing accuracy (\%) using BP-CNNs, and semi-supervised FF-CNNs on MNIST, SVHN and CIFAR-10 datasets, respectively.} \label{fig:acc_1} \end{figure*} \begin{figure*}[ht!] \begin{minipage}[b]{0.33\linewidth} \centering \centerline{\includegraphics[width=0.97\linewidth]{figure/mnist_2.png}} \end{minipage} \hfill \begin{minipage}[b]{0.33\linewidth} \centering \centerline{\includegraphics[width=0.97\linewidth]{figure/svhn_2.png}} \end{minipage} \hfill \begin{minipage}[b]{0.33\linewidth} \centering \centerline{\includegraphics[width=0.97\linewidth]{figure/cifar10_2.png}} \end{minipage} \caption{The comparisons of testing accuracy (\%) using BP-CNNs, semi-supervised FF-CNNs, and ensembles of semi-supervised FF-CNNs on the small labeled portion against MNIST, SVHN and CIFAR-10 datasets, respectively.} \label{fig:acc_2} \end{figure*} \begin{figure}[ht!] \centering \includegraphics[width=0.8\linewidth]{figure/cifar10_3.png} \caption{The relation between test accuracy (\%) and the number of semi-supervised FF-CNNs in the ensemble, where three diversity types are indicated as T1, T2 and T3, and T0 indicates the individual semi-supervised FF-CNN. The experiments are conducted on CIFAR-10 with 1/16 of the whole labels.} \label{fig:acc_overall} \end{figure} When using the entire labeled training set, the semi-supervised FF-CNN is exactly the same as the FF-CNN. There is a performance gap between FF-CNN and BP-CNN at the beginning of the plots. However, when the number of labeled training data is reduced, the performance degradation of the semi-supervised FF-CNN is not as severe as that of the BP-CNN and we see cross-over points between these two networks in all three datasets. For the extreme cases, we see that semi-supervised FF-CNNs outperform BP-CNNs by 17.1\%, 8.8\%, and 6.9\% in testing accuracy with 110, 120, and 190 labeled data for MNIST, SVHN and CIFAR-10, respectively. The results show that the proposed semi-supervised FF-CNNs can learn from the unlabeled data more effectively than the corresponding BP-CNNs. To evaluate the effectiveness of several unlabeled data usage ideas, we compare three different settings in Table \ref{table:accuracy_ab}. The best results come from using selected unlabeled training data. This is particularly obvious for the SVHN dataset. There is around 5\% performance gain by eliminating low quality unlabeled samples. \subsection{Ensembles of Multiple Semi-Supervised FF-CNNs} The performance of the proposed ensemble system by fusing all diversity types is shown in Fig. \ref{fig:acc_2}. We see that ensembles can boost classification accuracy by a large gain. There are about 2\%, 5\% and 8\% performance improvements against individual semi-supervised FF-CNNs, and the ensemble results with the smallest labeled portion achieve test accuracy of 89.6\%, 49.5\%, and 41.4\% for MNIST, SVHN and CIFAR-10, respectively. We further examine the performance of different diversity types, and show the relation between test accuracy and ensemble complexity in Fig. \ref{fig:acc_overall}, where we test ensemble systems using different diversity types: 1) an ensemble of four semi-supervised FF-CNNs with varied filter sizes and filter numbers in two conv layers as listed in Table \ref{table:set} (T1); 2) an ensemble of color input images in different color spaces (i.e. RGB, YCbCr, and Lab), where three channels separately for the latter two color spaces are treated separately (T2); and 3) an ensemble of nine semi-supervised FF-CNNs obtained by taking different input images computed from filtered greyscale images with 3x3 Laws filters \cite{pratt2007digital} (T3). As shown in the figure, the most efficient ensemble system among all designs is to fuse four different semi-supervised FF-CNNs with T1 diversity which yields a performance gain of 6.4\%. In general, an ensemble of more semi-supervised FF-CNNs provides higher testing accuracy. The best performance achieved is 63.1\% by combining all three diversity types. As compared with that of the single FF-CNN trained with {\em all} labeled data, the performance of the ensemble of semi-supervised FF-CNNs trained with 1/16 labeled data is only slightly lower by 0.6\%. \section{Conclusion and future work}\label{sec:conclusion} A semi-supervised learning framework using FF-CNNs for image classification was proposed. It was demonstrated by experimental results on three benchmark datasets (MNIST, SVHN, and CIFAR-10) that the semi-supervised FF-CNNs offer an effective solution. The ensembles of multiple semi-supervised FF-CNNs can boost the performance furthermore. Two extensions of this work are under current investigation. One is incremental learning. The other is decision fusion in the spatial domain. FF-CNNs provide a more convenient tool than the BP-CNN in both contexts. We will explore them furthermore in the near future. \bibliographystyle{IEEE}
\section*{Introduction} A supercooled liquid is obtained when a system is cooled down, or compressed, beyond its freezing temperature while avoiding crystallization. This metastable state displays slow dynamics but remains ergodic. As the system is further cooled down or compressed, its dynamics slows down by orders of magnitude until the system becomes nonergodic, which means that it can explore only a small part of its potential energy landscape. It is an amorphous solid called a glass. Our understanding of this fundamental state of matter has tremendously progressed in the last decades~\cite{Cavagna2009,CharbonneauReview2017}. Studying the glass transition under nonequilibrium conditions helps us define what are general properties of glassy systems and their emergent behaviors when they are driven out-of-equilibrium. This is where the field of active matter, which emerged as a new frontier of science, meets glassy physics. In the past years, the behavior of assemblies of self-propelled objects stepped up from a mere zoological curiosity to a flourishing field of nonequilibrium physics. Rather dilute assemblies of active particles have been studied extensively by experiments and numerical simulations~\cite{Ballerini2008, Deseigne2010,Theur2012,Bricard2013, Nishi2015, Bechinger_rmp-2016, Marchetti2013}. Exploring the full range of densities including ordered phases has been done in some model systems \cite{Digregorio2018, Briand2018, Fily2012, Wysocki2014} but dense amorphous systems remain largely unexplored experimentally. Dense assemblies of self-propelled particles sit at the convergence of active matter and glassy physics, and should constitute a test bed for other such systems as for example biological tissues \cite{bi2016MotilityDrivenGlassJamming,Fodor2018}. However, it is still unclear how self-propulsion would influence the glass transition. Numerical studies have found either activity-induced fluidization~\cite{Ni2013b,Berthier2014} or arrest~\cite{Szamel2015,Flenner2016}. It was found that the influence of activity could not be captured by a single parameter such as effective temperature, but that the persistence time of the propulsion direction played a major role and shifts the position of the glass transition line in nontrivial ways. For example in Ref.~\cite{Berthier2017} glass transition shifts to higher densities with increasing persistence time at low effective temperature, whereas the opposite effect is observed at higher effective temperatures. Besides, Ref.~\cite{Nandi2018} demonstrates that the monotonicity of the glass transition shift depends on the microscopic details of the activity. Most of the previous numerical studies approached the glass transition from the ergodic supercooled state. They found that despite a quantitative shift of the glass transition line, the qualitative phenomenology of glassiness remained unchanged~\cite{Berthier2017}. However, in the present letter, we show experimentally that a different, nontrivial phenomenology emerges beyond the glass transition line in the nonergodic glass state. We study the influence of self-propulsion on a sediment of Brownian particles, in order to access states on both sides of the nonergodic glass transition. Previous experiments have shown that, in the dilute regime, such active colloids behave like passive colloids with a higher effective temperature~\cite{Ginot2015}. Indeed from the ergodic side, we observe a monotonic shift of the glass transition line with effective temperature at fixed persistent time. However in the nonergodic side, we find that low activity levels slow down relaxation of the glass state, followed by a fluidization at higher activity levels, an observation that cannot be rationalized from the concept of effective temperature. We explain our results by considering how self-propulsion modifies the cage exploration process. We then discuss how this well-characterized experimental observation fits into the state of our theoretical understanding of active glassy systems. \begin{figure} \centering \includegraphics{plot_fig1.pdf} \caption{(a) Experimental image of the sediment showing the slicing to get access to different densities. The glass transition density of the passive case is $\phi\rs{g} \approx 0.67$. (b, c) Relaxation function $F(\Delta t)$ for various activity levels at fixed densities $\phi = 0.65 \pm 0.02$ and $0.72 \pm 0.02$, respectively. Horizontal line at 0.5 shows the definition of the relaxation time $\tau$. The dotted curve in (c) is a stretched exponential fit.} \label{fig:Ft} \end{figure} We study a two-dimensional assembly of gold particles half-coated with platinum~\cite{Howse2007} that behave as soft particles with effective diameter $\sigma_0=\SI{2.2}{\micro\metre}$. Accordingly the hydrodynamic radius we measure is $R_\mathrm{H} \approx \SI{0.94}{\micro\metre}<\sigma_0/2$. We track particles using \textit{trackpy} package~\cite{trackpy2016} and analyze the bond network using \textit{NetworkX} package~\cite{networkX}. We define the area fraction as $\phi=4\varrho/(\pi \sigma_0^2)$, where $\varrho$ is the number density. In the following we normalize distances by $\sigma_0$, and times by rotational Brownian time $\tau_\mathrm{R} = (8\pi\eta R_\mathrm{H}^3)/(k_\mathrm{B}T_0) \approx \SI{5}{\second}$, where $T_0$ is the bath temperature. Upon addition of hydrogen peroxide (\ce{H2O2}), the particles become active and self-propelled~\cite{Paxton2004,Brown2014}. In order to access a high density regime, we make in-plane sedimentation which is obtained by tilting the whole set-up with a small angle $\theta \approx \ang{0.1}$ \cite{Ginot2015}. An experimental image is shown in Fig.~\ref{fig:Ft}a. Since the density profile depends on the activity~\cite{Klongvessa2019b}, we parameterize our results by $\phi$. We slice the density profile perpendicularly to gravity so that each slice contains approximately $1000 \pm 100$ particles and has a constant $\phi$ within $0.02$. We then carry analysis on each slice and show the results function of $\phi$ and the activity. Note that the polydispersity (10\%) is not enough to prevent local crystallization at high densities (see Supplementary Figure 1{} and Ref.~\cite{Nelson1979}). The results presented here exclude crystalline particle and we consider only slices that contains less than 50\% of crystalline particles ($\phi < 0.75 $). From the sedimentation experiment on passive colloids~\cite{Perrin1909}, the competition between diffusive motion and gravity $g$ results in a density profile that has the Boltzmann form at low enough densities: $\phi(x) \sim \exp[mg x/D_0\mu]$, where $m$ is the buoyancy mass, $x$ is the coordinate in the direction of gravity, $D_0=k\rs{B}T_0/\mu$ is the diffusion coefficient and $\mu= 6\pi\eta R_\mathrm{H}$ is the mobility. Following Refs~\cite{Tailleur2009,Palacci2010}, in the case of self-propelled particles $D_0$ can be replaced by the long time effective diffusion coefficient $D_\mathrm{eff}(\phi \rightarrow 0)$. For spherical particles undergoing both Brownian and self-propelled motions in 2D but with two degrees of rotational freedom~\cite{Palacci2010,hagen2011BrownianMotionSelfpropelled}, we have $D_\mathrm{eff}(\phi\rightarrow 0) = D_0 + (F_\mathrm{P}/\mu)^2\tau_\mathrm{R}/6$, where $F_\mathrm{P}$ is the magnitude of the propulsion force. Equivalently $T_0$ can be replaced by an effective temperature such that $k\rs{B}T\rs{eff}\equiv \mu D_\mathrm{eff}(\phi \rightarrow 0)$. This amounts to viewing a dilute active system as ``hot colloids'' with an effective temperature~\cite{Palacci2010}: \begin{equation} \frac{T_\mathrm{eff}}{T_0} = \frac{D_\mathrm{eff}}{D_0} = 1 + \frac{2}{9}\left(\frac{F_\mathrm{P}R_\mathrm{H}}{k_\mathrm{B}T_0}\right)^2. \label{eq:TeffPeH} \end{equation} In our dense experimental system, we assume that the persistence time is fixed by Brownian rotational diffusion and is thus constant with activity, as observed in dilute conditions~\cite{Klongvessa2019b}. Some of us have shown that this hypothesis is sufficient to explain quantitatively the dynamics of locally closed packed clusters of the same particles~\cite{Ginot2018}. Therefore in the following we characterize activity in every density regimes by $T\rs{eff}/T_0$ measured from the sedimentation profile in the dilute regime. To characterize the relaxation within a slice, we compute the overlap function~\cite{Flenner2011}, $F(\Delta t)$, which tells us the ratio of particles that have not moved further than $0.3\sigma_0$ during the lag time $\Delta t$. For instance, in Fig.~\ref{fig:Ft}b and c we show $F(\Delta t)$ at various activities but at two fixed densities $\phi=0.65 \pm 0.02$ and $\phi=0.72 \pm 0.02$, respectively. At both densities, the passive case (the black curve) shows two-step relaxation, with almost complete decay of $F(\Delta t)$ within the experimental time. The plateau at the intermediate $\Delta t$ indicates that each particle is trapped by its neighbors. At long times, the system exits the plateau hinting that the particles manage to diffuse away from their original positions. This is a typical glassy behavior. At high levels of activity ($T\rs{eff}/T_0 = 3.0$ and $4.0$), the plateau disappears and the system completely relaxes. At $\phi=0.65 \pm 0.02$, the second relaxation step of $F(\Delta t)$ decreases as $T\rs{eff}$ increases, showing a monotonic response to activity. By contrast, at $\phi=0.72 \pm 0.02$ the response is nonmonotonic. As we introduce a small amount of activity, the plateau gets longer than the passive case. This surprisingly indicates that the system is less mobile when each particle is weakly self-propelled. However, when we increase further the activity, the plateau shortens again ($T\rs{eff}/T_0 = 1.7$) and finally disappears at high activity levels ($T\rs{eff}/T_0 = 3.0$ and $4.0$), resulting in decays faster than the passive case. We call this nonmonotonic behavior of the decay of $F(\Delta t)$ with $T\rs{eff}$ a ``back and forth" behavior. The ``back'' behavior is when the system relaxes slower than the passive case, whereas in the ``forth'' regime the relaxation is enhanced by activity. We also observe a similar nonmonotonic behavior in the percentage of broken bonds (see Supplementary Figure 5), showing that not only absolute positions but also structure rearrangements are responding in a nonmonotonic way. The ``forth'' behavior seems rather straightforward: it happens when a particle has enough propulsion force to push its neighbors and move inside the dense phase. However the ``back'' behavior is less intuitive and more intriguing. In the following, we will try to understand in which conditions the mobility of the system does depend nonmonotonically on the activity level. \begin{figure} \centering \includegraphics{plot_fig2.pdf} \caption{(a) Density dependence of relaxation time $\tau$ at various activities. For $T\rs{eff}/T_0=1.4$, $\tau$ is longer than the maximum lag time at densities higher than 0.70. Open triangles are obtained by extrapolation of $F(\Delta t)$. Transparent areas around curves show uncertainties that come mostly from the uncertainty of area density ($\pm 0.02$) below $\phi_\mathrm{g}$ or the standard deviation of $\tau$ from different sampling above $\phi_\mathrm{g}$. The solid line is the fit $\tau \propto \exp{(\frac{A}{(\phi^*/\phi)-1})}$ for $T\rs{eff}/T_0 = 1.0$, where $A \approx 0.19$, and $\phi^* (T_\mathrm{eff}) = 0.69$. (b) Dependence on both density and activity of $\tau$, obtained directly from $F(\tau) = 0.5$ (cross symbols), by extrapolation of $F(\Delta t)$ (plus symbols). The solid curve is a guide for the eye materializing the glass transition line. Two vertical dashed lines at $\phi = 0.65$ (blue) and $\phi = 0.72$ (red) correspond to the densities in Fig.~\ref{fig:Ft} b and c. } \label{fig:diagram} \end{figure} We define the relaxation time $\tau$ when half of the particles have already moved, i.e., $F(\tau) = 0.5$. When $F$ does not reach 0.5 but significantly decays from the plateau, the relaxation time can be estimated by extrapolation (see $T_\mathrm{eff}/T_0=1.4$ in Fig.~\ref{fig:Ft}c). Fig.~\ref{fig:diagram}a shows how $\tau$ depends on density for various activities. In the passive case (black circles) $\tau$ rises steeply with $\phi$, following a Vogel–Fulcher-like dependence (solid line) until $\phi \approx 0.67$. Beyond, we observe a saturation of $\tau$, typical of nonergodic glass made of soft particles~\cite{philippeGlassTransitionSoft2018}. In Supplementary Figure 4{}, we confirm that the relaxation in this regime is waiting-time dependent, symptomatic of the aging of a nonergodic system. For nonzero activities, the rise of $\tau$ follows the same dependence in $\phi$, shifted towards higher and higher densities (see companion article~\cite{Klongvessa2019b}). We take the first point that deviates from the fit as the operational glass transition packing fraction $\phi\rs{g} (T_\mathrm{eff})$. We observe that $\phi\rs{g}$ increases monotonically with activity, which is consistent with theoretical expectations for glassy systems with an additional active force at constant persistence time and increasing effective temperature~\cite{Flenner2016,Berthier2017,Nandi2018}. In general for passive soft particles, the saturation value for $\tau$ only depends on the relaxation time in the dilute limit~\cite{philippeGlassTransitionSoft2018}. By contrast, here we observe a nonmonotonic dependence of the saturation value on $T\rs{eff}/T_0$. In our lowest nonzero activity ($T\rs{eff}/T_0 = 1.4$, light blue triangles), $F(\Delta t)$ does not decay within our experimental time for all $\phi>0.70$. It implies relaxation times at least an order of magnitude above the saturated $\tau$ in the passive case. Consistently, the last four values of $\tau$ (open triangles) are obtained by the extrapolations of $F$. At our second activity ($T\rs{eff}/T_0 = 1.7$, violet squares), we are able to measure a saturated relaxation time about twice longer than in the passive case, that is a decrease with respect to $T\rs{eff}/T_0 = 1.4$. Finally, for higher activities ($T\rs{eff}/T_0 = 3.0$, purple diamonds and $4.0$, pink down triangles), the relaxation time never reaches values beyond the passive case and no saturation is observed within accessible densities In Fig.~\ref{fig:diagram}b we map the value of relaxation times on the $(\phi, T\rs{eff}/T_0)$ phase diagram. This representation confirms that the glass transition shifts monotonically toward higher densities with increasing activity. The ``forth'' behavior comes from the crossing of glass transition line to the ergodic phase. The ``back'' behavior is observed only when going from zero to nonzero effective temperature in an already nonergodic state. We stress that this nonmonotonic behavior could not be traced by a simple path in the phase diagram. \begin{figure} \centering \includegraphics{plot_fig3.pdf} \caption{Contrast of activity dependence of $\tau$ between both sides of glass transition. For $\phi=0.72$ (red circles), the first three points are glassy, nonergodic and we observe a nonmonotonic dependence on activity, but not at $\phi=0.65$ (blue triangles) were all points are ergodic. The horizontal dashed line shows $\tau$ in the passive case.} \label{fig:tau_Teff} \end{figure} In Fig.~\ref{fig:diagram}b, we draw two vertical lines corresponding to the two densities in Fig.~\ref{fig:Ft}b and c. We then follow both lines starting from $T\rs{eff}/T_0 = 1$ and illustrate the resulting $\tau$ in Fig.~\ref{fig:tau_Teff}. At $\phi=0.65$ (blue line, triangles), the original passive system is an ergodic supercooled liquid. We observe a monotonic decrease of $\tau$ with increasing $T\rs{eff}$. By contrast, when starting from a passive state that is nonergodic at $\phi = 0.72$ (red line, circles), we observe the nonmonotonic behavior that translates the rise and fall of the saturation level of the relaxation time. $\tau$ increases at low levels of activity and then decreases as the activity increases further. This exemplifies the difference between the respective responses of originally ergodic and nonergodic systems. We have thus confirmed that the addition of self-propulsion onto a nonergodic glass actually hinders its relaxation. In the following we explain by a scaling argument how a glass of weakly active Brownian particles can relax slower than a glass of passive Brownian particles, and why the transition between the two behaviors is so sudden. In general, there are two relaxation mechanisms in any dense systems: (i) isotropic cooperative motion that involves diffuse broken bonds and (ii) collective directed motion that involves no broken bonds inside the correlated region, but at domain boundaries. We know that a passive glass relaxes only by the first mechanism~\cite{Cavagna2009}. When self-propulsion is introduced, particle motion acquires persistence and the second mechanism is made possible by the particle directed motion. At high enough activities, collective motion is dominating: relative positions relax only at very long times (see Supplementary Figure 5) but absolute positions relax faster than in the passive case (Fig.~\ref{fig:Ft}c). This effect is quantified in the companion article~\cite{Klongvessa2019b} within a polycrystal which display the same phenomenology. What is not obvious is the drop of effectiveness of cooperative movement at the very first nonzero activities. For cooperative rearrangements to occur, an energy barrier of height $E$ needs to be crossed, thus the relaxation time is expressed in an Arrhenius form as $\tau = f^{-1}\exp{\left(-E/k_\mathrm{B}T_\mathrm{eff}\right)}$. Here, we suppose that in the limit where $T_\mathrm{eff}$ is close to $T_0$ the extra energy provided by self-propulsion is not altering significantly the argument of the exponential. However, the attempt frequency $f$ might be altered by the process of space exploration. Below, we replace the many particle problem by the simpler problem of a single particle that explores a cage of size $a=0.3\sigma_0$. $f$ is then the frequency at which the test particle is coming close to the lowest barrier in the cage. A Brownian particle explores its cage by translational diffusion in a time $\tau_\mathrm{cage}^\mathrm{B} = \mu a^2/(4k_\mathrm{B}T_0) \approx 0.1\tau_\mathrm{R}$. Recent simulations of glassy active particles consider only a self-propulsion force, without translational diffusion~\cite{Flenner2016,Berthier2017,Nandi2018}. The persistent random walk of such a particle can be characterized by the magnitude of this force $F_\mathrm{P}$ and its persistence time, here $\tau_R/2$~\cite{Howse2007,Palacci2010}. Since the cage size is shorter than the persistent length, the elementary time of cage exploration is the persistence time, $\tau_\mathrm{cage}^\mathrm{P} = \tau_\mathrm{R}/2$. It implies that $\tau_\mathrm{cage}^\mathrm{P}/\tau_\mathrm{cage}^\mathrm{B} = (8/3)(R_\mathrm{H}/a)^2$. This ratio depends only on the softness of the potential and is about 5 in our case. A nonBrownian self-propelled particles explores its cage five times slower than a Brownian particle. Experimentally, our particles are submitted to both translational Brownian motion and propulsion forces. For times shorter than the persistence time, a particle thus undergoes random motion biased in the propulsion direction. This situation is analogous to the sedimentation-diffusion problem~\cite{Perrin1909}, replacing the weight by the propulsion force. Along the propulsion direction, the particle probability density follows an exponential law of characteristic length $\lambda_\mathrm{P} \equiv k_\mathrm{B}T_0/F_\mathrm{P}$, analogous to a sedimentation length. From (Eq.~\ref{eq:TeffPeH}) we get the relevant Peclet number for cage exploration \begin{equation} \mathrm{Pe} \equiv \frac{a}{\lambda_\mathrm{P}} = \frac{3}{\sqrt{2}}\frac{0.3\sigma_0}{R_\mathrm{H}} \left(\frac{T_\mathrm{eff}}{T_0} -1\right)^{1/2}. \end{equation} The propulsion force dominates the cage exploration for $\mathrm{Pe}>1$, that occurs above the effective temperature $T_\mathrm{eff}^*/T_0 = 1 + (2/9)(R_\mathrm{H}/0.3\sigma_0)^2\approx 1.45$, that corresponds to the lowest activity we can achieve experimentally. Therefore, even at our lowest nonzero activity, diffusion is facing an uphill battle to explore the cage in the direction against propulsion. There is thus a practical discontinuity between our passive case, where the cage is explored by translational Brownian motion, and our first active case ruled by the physics of self-propelled particles. Between these two cases, the attempt frequency to cross energy barriers in the glass phase is typically reduced by a factor of 5. To summarize, we have exhibited a dramatic change in the response of dense assemblies of colloids to low levels of self propulsion at the glass transition. While the system is ergodic, the relaxation time decreases monotonically with activity. In the nonergodic glassy state, the relaxation time unexpectedly increases in the very first nonzero activity and then decreases at high enough activity for collective motions to kick in. We attribute the observed slowdown to a drop in efficiency of cooperative relaxation due to the onset of directed motion and name this phenomenon ``Deadlock from the Emergence of Active Directionality'' (DEAD). The magnitude of the slowdown is larger than the factor of 5 found by our scaling argument taking into account space exploration of a single particle. We conjecture that the many-body nature of cooperative motion has to be taken into account to reach quantitative agreement. A reduction in attempt frequency at the single-particle scale may translate non-linearly into a larger relaxation time at the level of the cooperative region. Unfortunately recent extensions of glass theories to active matter rely explicitly on effective single-particle models~\cite{Nandi2018}. Furthermore, we have to take into account that the number of degrees of freedom per particle jumps from 2 in the Brownian case, to 3 in the self-propelled case where orientation become important. In other words, directional motion adds $N$ degrees of orientational freedom that increase even more the complexity of the landscape and slows down relaxation. Our argument on propulsion-induced confinement shows that the switch from isotropic to oriented system is effective at very low activities. Finally, the existence of DEAD opens the door to actively arrested materials where dynamics are even slower than in their passive counterpart. \begin{acknowledgments} The authors thank Ludovic Berthier, Grzegorz Szamel, Chandan Dasgupta and Takeshi Kawasaki for fruitful discussions. N.K. is supported by PhD scholarship from the doctoral school of Physics and Astrophysics, University of Lyon. N.K. an M.L. acknowledge funding from CNRS through PICS No 7464. M.L. acknowledges support from ANR grant GelBreak ANR-17-CE08-0026. C.C.B. and C.Y. acknowledge support from ANR grant TunaMix No. ANR-16-CE30-0028 and from Université de Lyon, within the program Investissements d’Avenir IDEXLyon (Contract No. ANR-16-IDEX-0005) operated by the French National Research Agency (ANR). \end{acknowledgments}
\section{\@startsection{section}{1}{0mm}{-1.5\baselineskip}{\baselineskip}{\normalsize\bfseries\sffamily}} \renewcommand\subsection{\@startsection{subsection}{1}{0mm}{-\baselineskip}{\baselineskip}{\normalsize\bfseries\sffamily}} \makeatother \makeatletter \def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or **\or \dagger\or \ddagger\or \mathsection\or \mathparagraph\or \|\or \dagger\dagger \or \ddagger\ddagger \else\@ctrerr\fi}} \newlength{\preskip} \setlength{\preskip}{11\p@ \@plus.1\p@ minus 1\p@} \newlength{\postskip} \setlength{\postskip}{11\p@ \@plus.1\p@ minus 1\p@} \makeatother \renewcommand\theenumi{\roman{enumi}} \renewcommand\theenumii{\alph{enumii}} \renewcommand\theenumiii{\arabic{enumiii}} \newtheoremstyle{theorem}{\preskip}{\postskip}{\itshape}{}{\bfseries}{} {.5em}{\textbf{\thmname{#1}\thmnumber{ #2} (\thmnote{ #3})}} \newtheoremstyle{definition}{\preskip}{\postskip}{\normalfont}{0pt}{\bfseries}{}{.5em}{} \newtheoremstyle{remark}{\preskip}{\postskip}{\normalfont}{0pt}{\bfseries}{}{.5em}{} \swapnumbers \theoremstyle{theorem} \newtheorem{thm}{Theorem}[section] \theoremstyle{theorem} \newtheorem{lem}[thm]{Lemma} \theoremstyle{theorem} \newtheorem{prop}[thm]{Proposition} \theoremstyle{theorem} \newtheorem{kor}[thm]{Corollary} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition} \theoremstyle{remark} \newtheorem{bem_thm}[thm]{Remark} \theoremstyle{remark} \newtheorem{bems_thm}[thm]{Remarks} \theoremstyle{definition} \newtheorem*{defno}{Definition} \theoremstyle{definition} \newtheorem*{ack}{Acknowledgements} \theoremstyle{remark} \newtheorem{bem}[thm]{Remark} \theoremstyle{remark} \newtheorem{bems}[thm]{Remarks} \theoremstyle{definition} \newtheorem{bsp}[thm]{Example} \theoremstyle{definition} \newtheorem*{bspo}{Example} \theoremstyle{definition} \newtheorem*{thmo}{Theorem} \DeclareMathOperator \cov {cov} \DeclareMathOperator \re {Re} \DeclareMathOperator \im {Im} \DeclareMathOperator \var {Var} \DeclareMathOperator \Int {int} \DeclareMathOperator \cl {cl} \DeclareMathOperator \id {id} \DeclareMathOperator \sgn {sgn} \DeclareMathOperator \law {law} \DeclareMathOperator \lip {Lip} \DeclareMathOperator \spt {supp} \DeclareMathOperator \supp {supp} \DeclareMathOperator \la {\langle} \DeclareMathOperator \hess {Hess} \DeclareMathOperator \ra {\rangle} \DeclareMathOperator \corr {corr} \DeclareMathOperator \Poi {Poi} \DeclareMathOperator \Exp {Exp} \DeclareMathOperator \dv {div} \DeclareMathOperator \tr {tr} \DeclareMathOperator \bv {BV[0,1]} \DeclareMathOperator \sbv {BV} \DeclareMathOperator \disc {Disc} \DeclareMathOperator \loc {loc} \DeclareMathOperator \ucp {UCP} \DeclareMathOperator \dom {Dom} \DeclareMathOperator \epi {epi} \DeclareMathOperator \ri {ri} \newcommand\komp[1]{\langle#1\rangle} \newcommand\sprod[2]{\langle#1,#2\rangle} \newcommand\trace[1]{\text{trace}(#1)} \newcommand\cExp[2]{\mbb{E} \left( #1 \, \middle| \, #2 \right)} \newcommand\cP[2]{\mbb{P} \left[ #1 \, \middle| \, #2\right]} \newcommand{\I}{\mathds{1}} \newcommand\floor[1]{\left\lfloor #1 \right\rfloor} \newcommand\fa{\qquad \text{for all \ }} \newcommand{\firstpara}[1]{ \ \textup{#1\ \ }} \newcommand{\para}[1]{\bigskip\textup{#1\ \ }} \newcommand\as{\qquad \text{as \ }} \newcommand{\cadlag}{c\`adl\`ag } \newcommand{\caglad}{c\`agl\`ad } \newcommand{\als}{\qquad \text{a.\,s.}} \newcommand\mc[1] {\mathcal{#1}} \newcommand\mbb[1] {\mathds{#1}} \newcommand{\borel}{\mathcal{B}} \newcommand{\eps}{\varepsilon} \newcommand{\ac}{AC[0,1]} \newcommand*{\lcdot}{\,\raisebox{-0.25ex}{\scalebox{1.4}{$\cdot$}}\,} \newcommand\T{\rule{0pt}{3.5ex}} \newcommand\B{\rule[-3ex]{0pt}{0pt}} \hyphenation{Ha-bi-li-ta-ti-ons-schrift} \setlength{\parindent}{0pt} \begin{document} \title[Schauder estimates for equations associated with Feller generators]{Schauder estimates for Poisson equations associated with non-local Feller generators} \author[F.~K\"{u}hn]{Franziska K\"{u}hn} \address[F.~K\"{u}hn]{Institut de Math\'ematiques de Toulouse, Universit\'e Paul Sabatier III Toulouse, 118 Route de Narbonne, 31062 Toulouse, France. \emph{On leave from:} TU Dresden, Fachrichtung Mathematik, Institut f\"{u}r Mathematische Stochastik, 01062 Dresden, Germany.} \email{<EMAIL>} \subjclass[2010]{Primary: 60J25. Secondary: 45K05,35B65,60J35, 60J75} \keywords{Feller process, infinitesimal generator, regularity, H\"{o}lder space of variable order, Favard space} \begin{abstract} We show how H\"older estimates for Feller semigroups can be used to obtain regularity results for solutions to the Poisson equation $Af=g$ associated with the (extended) infinitesimal generator of a Feller process. The regularity of $f$ is described in terms of H\"older--Zygmund spaces of variable order and, moreover, we establish Schauder estimates. Since H\"{o}lder estimates for Feller semigroups have been intensively studied in the last years, our results apply to a wide class of Feller processes, e.\,g.\ random time changes of L\'evy processes and solutions to L\'evy-driven stochastic differential equations. Most prominently, we establish Schauder estimates for the Poisson equation associated with the fractional Laplacian of variable order. As a by-product, we obtain new regularity estimates for semigroups associated with stable-like processes. \end{abstract} \maketitle \section{Introduction} \label{intro} Let $(X_t)_{t \geq 0}$ be an $\mbb{R}^d$-valued Feller process with semigroup $P_t f(x) = \mbb{E}^x f(X_t)$, $x \in \mbb{R}^d$. In this paper, we study the regularity of functions in the abstract H\"older space \begin{equation*} F_1 := \left\{f \in \mc{B}_b(\mbb{R}^d); \sup_{t \in (0,1)} \sup_{x \in \mbb{R}^d} \left| \frac{P_t f(x)-f(x)}{t} \right| < \infty \right\}, \end{equation*} the so-called Favard space of order $1$, cf.\ \cite{butzer,engel}. It is known that for any $f \in F_1$ the limit \begin{equation} A_e f(x) := \lim_{t \to 0} \frac{\mbb{E}^x f(X_t)-f(x)}{t} \label{intro-eq2} \end{equation} exists up to a set of potential zero, cf.\ \cite{foellmer74}, and this gives rise to the extended infinitesimal generator $A_e$ which maps the Favard space $F_1$ into the space of bounded Borel measurable functions $\mc{B}_b(\mbb{R}^d)$, cf.\ Section~\ref{def} for details. It is immediate from Dynkin's formula that $A_e$ extends the (strong) infinitesimal generator $A$ of $(X_t)_{t \geq 0}$, in particular $F_1$ contains the domain $\mc{D}(A)$ of the infinitesimal generator. We are interested in the following questions: \begin{itemize} \item What does the existence of the limit \eqref{intro-eq2} tell us about the regularity of $f \in F_1$? In particular: How smooth are functions in the domain of the infinitesimal generator of $(X_t)_{t \geq 0}$? \item If $f \in F_1$ is a solution to the equation $A_e f = g$ and $g$ has a certain regularity, say $g$ is H\"{o}lder continuous of order $\delta \in (0,1)$, then what additional information do we get on the smoothness of $f$? \end{itemize} Our aim is to describe the regularity of $f$ in terms of H\"{o}lder spaces of variable order. More precisely, we are looking for a mapping $\kappa: \mbb{R}^d \to (0,2)$ such that \begin{equation*} f \in F_1 \implies f \in \mc{C}_b^{\kappa(\cdot)}(\mbb{R}^d) \end{equation*} where $\mc{C}_b^{\kappa(\cdot)}(\mbb{R}^d)$ denotes the H\"{o}lder--Zygmund space of variable order equipped with the norm \begin{equation*} \|f\|_{\mc{C}_b^{\kappa(\cdot)}(\mbb{R}^d)} := \|f\|_{\infty} + \sup_{x \in \mbb{R}^d} \sup_{0<|h| \leq 1} \frac{|f(x+2h)-2f(x+h)+f(x)|}{|h|^{\kappa(x)}}, \end{equation*} cf.\ Section~\ref{def} for details. If $A_e f=g \in \mc{C}_b^{\delta}(\mbb{R}^d)$ for some $\delta>0$, then it is natural to expect that $f$ ``inherits'' some regularity from $g$, i.\,e.\ \begin{equation*} f \in F_1, A_e f = g \in \mc{C}_b^{\delta}(\mbb{R}^d) \implies f \in \mc{C}_b^{\kappa(\cdot)+\varrho}(\mbb{R}^d) \end{equation*} for some constant $\varrho=\varrho(\delta)>0$. Moreover, we are interested in establishing Schauder estimates, i.\,e.\ estimates of the form \begin{equation} \|f\|_{\mc{C}_b^{\kappa(\cdot)}(\mbb{R}^d)} \leq C (\|f\|_{\infty} + \|A_e f\|_{\infty}) \quad \text{and} \quad \|f\|_{\mc{C}_b^{\kappa(\cdot)+\varrho}(\mbb{R}^d)} \leq C' (\|f\|_{\infty} + \|A_e f\|_{\mc{C}_b^{\delta}(\mbb{R}^d)}). \label{intro-eq6} \end{equation} Let us mention that the results, which we present in this paper, do \emph{not} apply to Feller semigroups with a roughening effect (see e.\,g.\ \cite{hairer12} for examples of such semigroups); we study exclusively Feller semigroups with a smoothing effect (see below for details). \par The toy example, which we have in mind, is the stable-like Feller process $(X_t)_{t \geq 0}$ with infinitesimal generator $A$, \begin{equation} Af(x) = c_{d,\alpha(x)} \int_{y \neq 0} \left( f(x+y)-f(x)-y \cdot \nabla f(x) \I_{(0,1)}(|y|)\right) \, \frac{1}{|y|^{d+\alpha(x)}} \, dy, \quad f \in C_c^{\infty}(\mbb{R}^d), \label{intro-eq3} \end{equation} which is, rougly speaking, a fractional Laplacian of variable order, i.\,e.\ $A=-(-\Delta)^{\alpha(\bullet)/2}$. Intuitively, $(X_t)_{t \geq 0}$ behaves locally like an isotropic stable L\'evy process but its index of stability depends on the current position of the process. In view of the results in \cite{reg-levy,ihke}, it is an educated guess that any function $f \in \mc{D}(A)$ is ``almost'' locally H\"{o}lder continuous with H\"{o}lder exponent $\alpha(\cdot)$, in the sense that \begin{equation} |f(x+2h)-f(x+h)+f(x)| \leq C_{f,\eps} |h|^{\alpha(x)-\eps}, \qquad x,h \in \mbb{R}^d \label{intro-eq4} \end{equation} for any small $\eps>0$. We will show that this is indeed true and, moreover, we will establish Schauder estimates for the equation $-(-\Delta)^{\alpha(\bullet)/2}f=g$, cf.\ Theorem~\ref{ex-21} and Corollary~\ref{ex-23}. \par Let us comment on related literature. For some particular examples of Feller generators $A$ there are Schauder estimates for solutions to the integro-differential equation $Af=g$ available in the literature; for instance, Bass obtained Schauder estimates for a class of stable-like operators ($\nu(x,dy)=c(x,y) |y|^{-d-\alpha}$ with $c:\mbb{R}^2 \to (0,\infty)$ bounded and $\inf_{x,y} c(x,y)>0$) and Bae \& Kassmann \cite{bae} studied operators with functional order of differentiability ($\nu(x,dy) = c(x,y)/(|y|^d\varphi(y) \,dy)$ for ``nice'' $\varphi$). The recent article \cite{reg-levy} establishes Schauder estimates for a large class of L\'evy generators using gradient estimate for the transition density $p_t$ of the associated L\'evy process. Moreover, we would like to mention the article \cite{ihke} which studies a complementary question -- namely, what are sufficient conditions for the existence of the limit \eqref{intro-eq2} in the space $C_{\infty}(\mbb{R}^d)$ of continuous functions vanishing at infinity -- and which shows that certain H\"older space of variable order are contained in the domain of the (strong) infinitesimal generator. Schauder estimates have interesting applications in the theory of stochastic differential equations (SDES), they can be used to obtain uniqueness results for solutions to SDEs driven by L\'evy processes and to study the convergence of the Euler--Maruyama approximation, see e.g.\ \cite{chen17,euler-maruyama,priola15} and the references therein. \par This paper consists of two parts. In Section~\ref{main} we show how regularity estimates on Feller semigroups can be used to establish Schauder estimates \eqref{intro-eq6} for functions $f$ in the Favard space of a Feller process $(X_t)_{t \geq 0}$. Our first result, Proposition~\ref{feller-7}, states that if the semigroup $P_t u(x) := \mbb{E}^x u(X_t)$ satisfies\begin{equation*} \|P_t u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq c t^{-\beta} \|u\|_{\infty}, \qquad t \in (0,1), \,u \in \mc{B}_b(\mbb{R}^d) \end{equation*} for some $\beta \in [0,1)$ and $\kappa>0$, then $F_1 \subseteq \mc{C}_b^{\kappa}(\mbb{R}^d)$ and \begin{equation*} \|f\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq C \left( \|f\|_{\infty} + \|A_e f\|_{\infty} \right) \fa f \in F_1. \end{equation*} Proposition~\ref{feller-7} has interesting applications but it does, in general, not give optimal regularity results but rather a worst-case estimate on the regularity of $f \in F_1$; for instance, if $(X_t)_{t \geq 0}$ is an isotropic stable-like process with infinitesimal generator $A = -(-\Delta)^{\alpha(\bullet)/2}$, cf.\ \eqref{intro-eq3}, then an application of Proposition~\ref{feller-7} shows \begin{equation*} |f(x+2h)-2f(x+h)+f(x)| \leq C_{f,\eps} |h|^{\alpha_0-\eps}, \qquad x,h \in \mbb{R}^d, \,f \in \mc{D}(A) \end{equation*} where $\alpha_0 := \inf_{x \in \mbb{R}^d} \alpha(x)$, and this is much weaker than the regularity \eqref{intro-eq4} which we would expect. Our main result in Section~\ref{main} is a ``localized'' version of Proposition~\ref{feller-7} which takes into account the local behaviour of the Feller process $(X_t)_{t \geq 0}$ and which allows us to describe the local regularity of a function $f \in F_1$, cf.\ Theorem~\ref{feller-9} and Corollary~\ref{feller-11}. As an application, we obtain a regularity result for solutions to the Poisson equation $A_e f=g$ with $g \in \mc{C}_b^{\delta}(\mbb{R}^d)$, cf.\ Theorem~\ref{feller-12}. \par In the second part of the paper, Section~\ref{ex}, we illustrate the results from Section~\ref{main} with several examples. Applying the results to isotropic-stable like processes, we establish Schauder estimates for the Poisson equation $-(-\Delta)^{\alpha(\bullet)/2}f=g$ associated with the fractional Laplacian of variable order, cf.\ Theorem~\ref{ex-21} and Corollary~\ref{ex-23}. Schauder estimates of this type seem to be a novelty in the literature. As a by-product of the proof, we obtain H\"{o}lder estimates for semigroups of isotropic stable-like processes which are of independent interest, see Section~\ref{iso-reg}. Furthermore, we present Schauder estimates for random time changes of L\'evy processes (Proposition~\ref{ex-9}) and solutions to L\'evy-driven SDEs (Proposition~\ref{ex-5}) and discuss possible extensions. \section{Basic definitions and notation} \label{def} We consider the Euclidean space $\mbb{R}^d$ with the canonical scalar product $x \cdot y := \sum_{j=1}^d x_j y_j$ and the Borel $\sigma$-algebra $\mc{B}(\mbb{R}^d)$ generated by the open balls $B(x,r)$ and closed balls $\overline{B(x,r)}$. As usual, we set $x \wedge y := \min\{x,y\}$ and $x \vee y := \max\{x,y\}$ for $x,y \in \mbb{R}$. If $f$ is a real-valued function, then $\spt f$ denotes its support, $\nabla f$ the gradient and $\nabla^2 f$ the Hessian of $f$. For two stochastic processes $(X_t)_{t \geq 0}$ and $(Y_t)_{t \geq 0}$ we write $(X_t)_{t \geq 0} \stackrel{d}{=} (Y_t)_{t \geq 0}$ if $(X_t)_{t \geq 0}$ and $(Y_t)_{t \geq 0}$ have the same finite-dimensional distributions. \emph{Function spaces:} $\mc{B}_b(\mbb{R}^d)$ is the space of bounded Borel measurable functions $f: \mbb{R}^d \to \mbb{R}$. The smooth functions with compact support are denoted by $C_c^{\infty}(\mbb{R}^d)$, and $C_{\infty}(\mbb{R}^d)$ is the space of continuous functions $f: \mbb{R}^d \to \mbb{R}$ vanishing at infinity. Superscripts $k\in\mbb{N}$ are used to denote the order of differentiability, e.\,g.\ $f \in C_{\infty}^k(\mbb{R}^d)$ means that $f$ and its derivatives up to order $k$ are $C_{\infty}(\mbb{R}^d)$-functions. For $U \subseteq \mbb{R}^d$ and $\alpha: U \to [0,\infty)$ bounded we define H\"{o}lder--Zygmund spaces of variable order by \begin{equation*} \mc{C}^{\alpha(\cdot)}(U) := \bigg\{f \in C(U); \forall x \in U: \, \, \sup_{\substack{0<|h| \leq 1 \\ x \pm h \in U}} \frac{|\Delta_h^k f(x)|}{|h|^{\alpha(x)}} < \infty \bigg\} \end{equation*} and \begin{equation*} \mc{C}_b^{\alpha(\cdot)}(U) := \bigg\{f \in C_b(U); \|f\|_{\mc{C}_b^{\alpha(\cdot)}(U)} := \sup_{x \in U} |f(x)| + \sup_{\substack{x \in U, 0<|h| \leq1 \\ \overline{B(x,k|h|)} \subset U}} \frac{|\Delta_h^k f(x)|}{|h|^{\alpha(x)}} < \infty \bigg\} \end{equation*} where $k \in \mbb{N}$ is the smallest number which is strictly larger than $\|\alpha\|_{\infty}$ and \begin{equation} \Delta_h f(x) := f(x+h)-f(x), \qquad \Delta_h^m f(x) := \Delta_h \Delta_h^{m-1} f(x), \quad m \geq 2, \label{def-eq3} \end{equation} are the iterated difference operators. Moreover, we set \begin{equation*} \mc{C}_b^{\alpha(\cdot)+}(U) := \bigcup_{\eps>0} \mc{C}_b^{\alpha(\cdot)+\eps}(U) \quad \text{and} \quad \mc{C}_b^{\alpha(\cdot)-}(U) := \bigcap_{\eps>0} \mc{C}_b^{\max\{\alpha(\cdot)-\eps,0\}}(U). \end{equation*} Clearly, \begin{equation*} \mc{C}_b^{\alpha(\cdot)+}(U) \subseteq \mc{C}_b^{\alpha(\cdot)}(U) \subseteq \mc{C}_b^{\alpha(\cdot)-}(U) \quad \text{and} \quad \mc{C}_b^{\alpha(\cdot)}(U) \subseteq \mc{C}^{\alpha(\cdot)}(U). \end{equation*} If $\alpha(x)=\alpha$ is constant, then we write $\mc{C}^{\alpha}(U)$ and $\mc{C}_b^{\alpha}(U)$ for the associated H\"{o}lder--Zygmund spaces. For $U=\mbb{R}^d$ and $\alpha \notin \mbb{N}$ the H\"{o}lder--Zygmund space $\mc{C}_b^{\alpha}(\mbb{R}^d)$ is the ``classical'' H\"{o}lder space $C_b^{\alpha}(\mbb{R}^d)$ equipped with the norm \begin{equation*} \|f\|_{C_b^{\alpha}(\mbb{R}^d)} := \|f\|_{\infty} +\sum_{j=0}^{\lfloor \alpha \rfloor} \sum_{\substack{\beta \in \mbb{N}_0^d \\ |\beta| = j}} \|\partial^{\beta} f\|_{\infty} + \max_{\substack{\beta \in \mbb{N}_0^d \\ |\beta| = \lfloor \alpha \rfloor}} \sup_{x \neq y} \frac{|\partial^{\beta} f(x)-\partial^{\beta} f(y)|}{|x-y|^{\alpha-\lfloor \alpha \rfloor}}, \end{equation*} cf.\ \cite[Section 2.7]{triebel78}. For $\alpha=1$ it is possible to show that $\mc{C}_b^1(\mbb{R}^d)$ is strictly larger than the space of bounded Lipschitz continuous functions, cf.\ \cite[p.~148]{stein}, which is in turn strictly larger than $C_b^1(\mbb{R}^d)$. \emph{Feller processes:} A Markov process $(X_t)_{t \geq 0}$ is a \emph{Feller process} if the associated transition semigroup $P_t f(x) := \mbb{E}^x f(X_t)$ is a \emph{Feller semigroup}, see e.\,g.\ \cite{ltp,jacob123} for details. Without loss of generality, we may assume that $(X_t)_{t \geq 0}$ has right-continuous sample paths with finite left-hand limits. Following \cite[II.5.(b)]{engel} we call \begin{equation} F_1 := F_1^X := \left\{ f \in \mc{B}_b(\mbb{R}^d); \sup_{t \in (0,1)} \left\| \frac{P_t f-f}{t} \right\|_{\infty} < \infty \right\} \label{fav} \end{equation} the \emph{Favard space of order $1$}. The \emph{(strong) infinitesimal generator} $(A,\mc{D}(A))$ is defined by \begin{align*} \mc{D}(A) &:= \left\{f \in C_{\infty}(\mbb{R}^d); \exists g \in C_{\infty}(\mbb{R}^d): \, \, \lim_{t \to 0} \left\| \frac{P_tf-f}{t} -g \right\|_{\infty}=0 \right\} \\ Af &:= \lim_{t \to 0} \frac{P_t f-f}{t}, \quad f \in \mc{D}(A). \end{align*} If $\mc{D}(A)$ is rich, in the sense that $C_c^{\infty}(\mbb{R}^d) \subseteq \mc{D}(A)$, then a result by Courr\`ege \& van Waldenfels, see e.\,g.\ \cite[Theorem 2.21]{ltp}, shows that $A|_{C_c^{\infty}(\mbb{R}^d)}$ is a pseudo-differential operator, \begin{equation} Af(x) = -q(x,D) f(x) := - \int_{\mbb{R}^d} q(x,\xi) e^{ix \cdot \xi} \hat{f}(\xi) \, d\xi, \qquad f \in C_c^{\infty}(\mbb{R}^d), \,x \in \mbb{R}^d \label{pseudo} \end{equation} where $\hat{f}(\xi) := (2\pi)^{-d} \int_{\mbb{R}^d} e^{-ix \cdot \xi} f(x) \, dx$ is the Fourier transform of $f$ and \begin{equation} q(x,\xi) = q(x,0) -i b(x) \cdot \xi + \frac{1}{2} \xi \cdot Q(x) \xi + \int_{y \neq 0} \left(1- e^{iy \cdot \xi} +iy \cdot \xi \I_{(0,1)}(|y|) \right) \, \nu(x,dy). \label{symbol} \end{equation} is a continuous negative definite \emph{symbol}. If \eqref{pseudo} holds, then we say that $(X_t)_{t \geq 0}$ is a Feller process with symbol $q$. We assume from now on that $q(x,0)=0$. For each fixed $x \in \mbb{R}^d$, $(b(x),Q(x),\nu(x,dy))$ is a L\'evy triplet, i.\,e.\ $b(x) \in \mbb{R}^d$, $Q(x) \in \mbb{R}^{d \times d}$ is symmetric positive semidefinite and $\nu(x,\cdot)$ is a measure on $\mbb{R}^d \backslash \{0\}$ satisfying $\int_{y \neq 0} \min\{1,|y|^2\} \, \nu(x,dy)<\infty$. The symbol $q$ has \emph{bounded coefficients} if \begin{equation*} \sup_{x \in \mbb{R}^d} \left( |b(x)| + |Q(x)| + \int_{y \neq 0} \min\{1,|y|^2\} \, \nu(x,dy) \right)<\infty; \end{equation*} by \cite[Lemma 6.2]{schnurr}, $q$ has bounded coefficients if, and only if, $\sup_{x \in \mbb{R}^d} \sup_{|\xi| \leq 1} |q(x,\xi)| < \infty$. If $(X_t)_{t \geq 0}$ is a Feller process with symbol $q$, then \begin{equation} \mbb{P}^x \left( \sup_{s \leq t} |X_s-x| > r \right) \leq ct \sup_{|y-x| \leq r} \sup_{|\xi| \leq r^{-1}} |q(y,\xi)|, \qquad r>0, \, t>0, \, x \in \mbb{R}^d\label{max} \end{equation} holds for an absolute constant $c>0$; this maximal inequality goes back to Schilling \cite{rs-growth}, see also \cite[Theorem 5.1]{ltp} or \cite[Lemma 1.29]{matters}. If the symbol $q(\xi)=q(x,\xi)$ of a Feller process $(L_t)_{t \geq 0}$ does not depend on $x \in \mbb{R}^d$, then $(L_t)_{t \geq 0}$ is a \emph{L\'evy process}. By \cite[Theorem 2.6]{ltp} this is equivalent to saying that $(L_t)_{t \geq 0}$ has stationary and independent increments. Later on, we will use that any Feller process $(X_t)_{t \geq 0}$ with infinitesimal generator $(A,\mc{D}(A))$ solves the $(A,\mc{D}(A))$-martingale problem, i.\,e.\ \begin{equation*} M_t := f(X_t)-f(X_0)-\int_0^t Af(X_s) \, ds \end{equation*} is a $\mbb{P}^x$-martingale for any $x \in \mbb{R}^d$ and $f \in \mc{D}(A)$. Our standard reference for Feller processes are the monographs \cite{ltp,jacob123}, and for further information on martingale problems we refer the reader to \cite{ethier,hoh}. \par In the remaining part of this section we define the extended infinitesimal generator and state some results which we will need later on. Following \cite{meyer76} we define the \emph{extended (infinitesimal) generator} $A_e$ in terms of the $\lambda$-potential operator $R_{\lambda}$, that is, \ $f \in \mc{D}(A_e)$ and $g=A_e f$ if, and only if, \begin{enumerate} \item\label{gen-1-i} $f \in \mc{B}_b(\mbb{R}^d)$ and $g$ is a measurable function such that $\|R_{\lambda}(|g|)\|_{\infty}< \infty$ for some (all) $\lambda>0$, \item\label{gen-1-iii} $f = R_{\lambda}(\lambda f-g)$ for all $\lambda>0$. \end{enumerate} The mapping $g=A_e f$ is defined up to a set of potential zero, i.e.\ up to a set $B \in \mc{B}(\mbb{R}^d)$ which satisfies $\mbb{E}^x \int_{(0,\infty)} \I_B(X_t) \, dt = 0$ for all $x \in \mbb{R}^d$. We will often choose a representative with a certain property; for instance, if we write ``$A_e f$ is continuous'', this means that there exists a continuous function $g$ such that \eqref{gen-1-i},\eqref{gen-1-iii} hold. In abuse of notation we set \begin{equation*} \|A_e f\|_{\infty} := \inf\{c>0; |A_e f| \leq c \, \, \text{up to a set of potential zero}\}. \end{equation*} Clearly, the extended infinitesimal generator $(A_e,\mc{D}(A_e))$ extends the (strong) infinitesimal generator $(A,\mc{D}(A))$. The following result is essentially due to Airault \& F\"{o}llmer \cite{foellmer74} and shows the connection to the Favard space of order $1$, cf.\ \eqref{fav}. \begin{thm} \label{gen-3} Let $(X_t)_{t \geq 0}$ be a Feller process with semigroup $(P_t)_{t \geq 0}$ and extended generator $(A_e,\mc{D}(A_e))$. The associated Favard space $F_1$ of order $1$ satisfies \begin{equation*} F_1 = \{f \in \mc{D}(A_e); \|A_e f\|_{\infty}< \infty\}. \end{equation*} If $f \in F_1$ then \begin{equation} \sup_{t \in (0,1)} \frac{1}{t} \|P_t f-f\|_{\infty} = \|A_e f\|_{\infty} \label{gen-eq5} \end{equation} and, moreover, Dynkin's formula \begin{equation} \mbb{E}^x f(X_{\tau})-f(x) = \mbb{E}^x \left( \int_0^{\tau} A_e f(X_s) \, ds \right) \label{gen-eq6} \end{equation} holds for any $x \in \mbb{R}^d$ and any stopping time $\tau$ such that $\mbb{E}^x \tau<\infty$. \end{thm} The next corollary shows how the Favard space can be defined in terms of the stopped process $X_{t \wedge \tau_r^x}$. It plays an important role in our proofs since we will frequently use stopping techniques. \begin{kor} \label{gen-5} Let $(X_t)_{t \geq 0}$ be a Feller process with semigroup $(P_t)_{t \geq 0}$, extended generator $(A_e,\mc{D}(A_e))$ and symbol $q$. Denote by \begin{equation*} \tau_r^x := \inf\{t>0; |X_t-x|>r\} \end{equation*} the exit time of $(X_t)_{t \geq 0}$ from the closed ball $\overline{B(x,r)}$. If $q$ has bounded coefficients, then the following statements are equivalent for any $f \in \mc{B}_b(\mbb{R}^d)$. \begin{enumerate} \item\label{gen-5-i} $f \in F_1$, i.\,e.\ $f \in \mc{D}(A_e)$ and $\sup_{t \in (0,1)} t^{-1} \|P_t f-f\|_{\infty} = \|A_e f\|_{\infty}< \infty$, \item\label{gen-5-iii} There exists $r>0$ such that \begin{equation*} K_r(f) := \sup_{t \in (0,1)} \frac{1}{t} \sup_{x \in \mbb{R}^d} |\mbb{E}^x f(X_{t \wedge \tau_r^x})-f(x)|<\infty. \end{equation*} \end{enumerate} If one (hence both) of the conditions is satisfied, then \begin{equation} A_e f(x) = \lim_{t \to 0} \frac{\mbb{E}^x f(X_{t \wedge \tau_r^x})-f(x)}{t}, \label{gen-eq7} \end{equation} up to a set of potential zero, for any $r>0$. In particular, $\|A_e f\|_{\infty} \leq K_r(f)$ for $r>0$. \end{kor} For the proof of Theorem~\ref{gen-3} and Corollary~\ref{gen-5} and some further remarks we refer to the appendix. \section{Main results} \label{main} Let $(X_t)_{t \geq 0}$ be a Feller process with semigroup $(P_t)_{t \geq 0}$. Throughout this section, \begin{equation*} F_1^X := F_1 := \left\{f \in \mc{B}_b(\mbb{R}^d); \sup_{t \in (0,1)} \left\| \frac{P_tf-f}{t} \right\|_{\infty} < \infty \right\} \end{equation*} is the Favard space of order $1$ associated with $(X_t)_{t \geq 0}$. By Theorem~\ref{gen-3}, we have \begin{equation*} F_1 = \{f \in \mc{D}(A_e); \|A_e f\|_{\infty}< \infty\} \end{equation*} where $A_e$ denotes the extended infinitesimal generator. The results which we present in this section will be proved in Section~\ref{proofs}. \par \medskip Our first result, Proposition~\ref{feller-7}, shows how regularity estimates for the semigroup $(P_t)_{t \geq 0}$ can be used to obtain Schauder estimates of the form \begin{equation*} \|f\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq C (\|f\|_{\infty}+\|A_e f\|_{\infty}), \qquad f \in F_1. \end{equation*} \begin{prop} \label{feller-7} Let $(X_t)_{t \geq 0}$ be a Feller process with semigroup $(P_t)_{t \geq 0}$, extended generator $(A_e,\mc{D}(A_e))$ and Favard space $F_1$. If there exist constants $M>0$, $T>0$, $\kappa \geq 0$ and $\beta \in (0,1)$ such that \begin{equation} \|P_t u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq M t^{-\beta} \|u\|_{\infty} \label{feller-eq15} \end{equation} for all $u \in \mc{B}_b(\mbb{R}^d)$ and $t \in (0,T]$, then \begin{equation*} F_1\subseteq \mc{C}_b^{\kappa}(\mbb{R}^d) \end{equation*} and \begin{equation*} \|f\|_{\mc{C}^{\kappa}_b(\mbb{R}^d)} \leq C (\|f\|_{\infty} + \|A_ef\|_{\infty}), \qquad f \in F_1, \end{equation*} for some constant $C=C(T,M,\kappa,\beta)$. \end{prop} Since the domain $\mc{D}(A)$ of the (strong) infinitesimal generator of $(X_t)_{t \geq 0}$ is contained in $F_1$, Proposition~\ref{feller-7} gives, in particular, $\mc{D}(A) \subseteq \mc{C}_b^{\kappa}(\mbb{R}^d)$. \par Proposition~\ref{feller-7} is a useful tool but it does, in general, not give optimal regularity results. Since Feller processes are inhomogeneous in space, the regularity of $f \in F_1$ will, in general, depend on the space variable $x$, e.\,g.\ \begin{equation} |\Delta_h^2 f(x)| = |f(x+2h)-2f(x+h)+f(x)| \leq C |h|^{\kappa(x)}, \qquad |h| \leq 1, \label{feller-st1} \end{equation} and therefore it is much more natural to use H\"older--Zygmund spaces of variable order to describe the regularity; this is also indicated by the results obtained in \cite{ihke}. \par Our second result, Theorem~\ref{feller-9}, shows how H\"older estimates for Feller semigroups can be used to establish local H\"older estimates \eqref{feller-st1}. Before stating the result, let us explain the idea. Let $(X_t)_{t \geq 0}$ be a Feller process with symbol $q$ and Favard space $F_1^X$, and fix $x \in \mbb{R}^d$. Let $(Y_t)_{t \geq 0}$ be another Feller process which has the same behaviour as $(X_t)_{t \geq 0}$ in a neighbourhood of $x$, in the sense that its symbol $p$ satisfies \begin{equation} p(z,\xi) = q(z,\xi), \qquad z \in B(x,\delta), \,\xi \in \mbb{R}^d \label{feller-eq16} \end{equation} for some $\delta>0$. The aim is to choose $(Y_t)_{t \geq 0}$ in such a way that its semigroup $(T_t)_{t \geq 0}$ satisfies a ``good'' regularity estimate \begin{equation*} \|T_t u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq M t^{-\beta} \|u\|_{\infty}, \qquad u \in \mc{B}_b(\mbb{R}^d); \end{equation*} here ``good'' means that $\kappa$ is large. Because of \eqref{feller-eq16} it is intuitively clear that \begin{equation} |\mbb{E}^z f(X_t)- f(z)| \approx |\mbb{E}^z f(Y_t)-f(z)| \quad \text{for $z$ close to $x$ and ``small'' $t$}. \label{feller-eq17} \end{equation} If $\chi$ is a truncation function such that $\I_{B(x,\eps)} \leq \chi \leq \I_{B(x,2\eps)}$ for small $\eps>0$, then it is, because of \eqref{feller-eq17}, natural to expect that for any $f \in F_1^X$ the truncated mapping $g := f \cdot \chi$ is in the Favard space $F_1^Y$ associated with $(Y_t)_{t \geq 0}$, i.\,e.\ \begin{equation*} \sup_{t \in (0,1)} \sup_{z \in \mbb{R}^d} t^{-1}|\mbb{E}^z(f \cdot \chi)(Y_t)-(f \cdot \chi)(z)| < \infty. \end{equation*} Since, by Proposition~\ref{feller-7}, $g \in F_1^Y \subseteq \mc{C}_b^{\kappa}(\mbb{R}^d)$, and $g = f$ in a neighbourhood of $x$, this entails that $f(\cdot)$ is $\kappa$-H\"older continuous in a neighbourhood of $x$. Since $\kappa=\kappa(x)$ depends on the point $x \in \mbb{R}^d$, which we fixed at the beginning, this localizing procedure allows us to obtain local H\"older estimates \eqref{feller-st1} for $f$. \begin{thm} \label{feller-9} Let $(X_t)_{t \geq 0}$ be a Feller process with extended generator $(A_e,\mc{D}(A_e))$ and Favard space $F_1^X$ such that \begin{equation*} A_e f(z) = -q(z,D) f(z), \qquad f \in C_c^{\infty}(\mbb{R}^d), \,z \in \mbb{R}^d, \end{equation*} for a continuous negative definite symbol $q$, cf.\ \eqref{pseudo}. Let $x \in \mbb{R}^d$ and $\delta \in (0,1)$ be such that there exists a Feller process $(Y_t^{(x)})_{t \geq 0}$ with the following properties: \begin{enumerate}[label*=\upshape (C\arabic*),ref=\upshape C\arabic*] \item\label{C1} The infinitesimal generator $(L^{(x)},\mc{D}(L^{(x)}))$ of $(Y_t^{(x)})_{t \geq 0}$ equals when restricted to $C_c^{\infty}(\mbb{R}^d)$ a pseudo-differential operator with negative definite symbol $p^{(x)}$, \begin{equation*} p^{(x)}(z,\xi) = -i b^{(x)}(z) \cdot \xi + \int_{y \neq 0} \left(1-e^{iy \cdot \xi}+i y \cdot \xi \I_{(0,1)}(|y|) \right) \, \nu^{(x)}(z,dy), \quad z,\xi \in \mbb{R}^d; \end{equation*} $p^{(x)}$ has bounded coefficients and \begin{equation} p^{(x)}(z,\xi) = q(z,\xi) \fa \xi \in \mbb{R}^d, \,|z-x| \leq 4\delta. \label{feller-eq21} \end{equation} \item\label{C2} The $(L^{(x)},C_c^{\infty}(\mbb{R}^d))$-martingale problem is well-posed. \item\label{C4} There exist constants $M(x)>0$, $\kappa(x) \in [0,2]$ and $\beta(x) \in (0,1)$ such that the semigroup $(T_t^{(x)})_{t \geq 0}$ associated with $(Y_t^{(x)})_{t \geq 0}$ satisfies \begin{equation*} \|T_t^{(x)} u\|_{\mc{C}_b^{\kappa(x)}(\mbb{R}^d)} \leq M(x) t^{-\beta(x)} \|u\|_{\infty} \end{equation*} for all $u \in \mc{B}_b(\mbb{R}^d)$, $t \in (0,1)$. \end{enumerate} If $f \in F_1^X$ and $\varrho(x) \in [0,1]$ are such that \begin{equation} \label{feller-eq22} \|f\|_{\mc{C}_b^{\varrho(x)}(\overline{B(x,4\delta)})} < \infty \quad \text{and} \quad \sup_{|z-x| \leq 4 \delta} \int_{|y| \leq 1} |y|^{1+\varrho(x)} \, \nu^{(x)}(z,dy)<\infty, \end{equation} then \begin{equation} |\Delta_h^2 f(x)| \leq C |h|^{\kappa(x)} \left(\|f\|_{\infty}+\|A_ef\|_{\infty}+\|f\|_{\mc{C}_b^{\varrho(x)}(\overline{B(x,4\delta)})}\right) \label{feller-eq23} \end{equation} for all $|h| \leq \delta/2$. The finite constant $C>0$ depends continuously on $M(x) \in [0,\infty)$, $\beta(x) \in [0,1)$ and $K(x) \in [0,\infty)$, \begin{equation*} K(x) := \sup_{z \in \mbb{R}^d} \left( |b^{(x)}(z)| + \int_{y \neq 0} \min\{1,|y|^2\} \, \nu^{(x)}(z,dy) \right)+ \sup_{|z-x| \leq 4 \delta} \int_{y \neq 0} \min\{|y|^{\varrho(x)+1},1\} \, \nu^{(x)}(z,dy). \end{equation*} \end{thm} \begin{bem} \label{feller-10} \begin{enumerate}[wide, labelwidth=!, labelindent=0pt] \item\label{feller-10-i} The assumption $f \in C_b^{\varrho(x)}(\overline{B(x,4\delta)})$ is an a-priori estimate on the regularity of $f$. If the semigroup $(P_t)_{t \geq 0}$ of $(X_t)_{t \geq 0}$ satisfies a regularity estimate of the form \eqref{feller-eq15}, then such an a-priori estimate can be obtained from Proposition~\ref{feller-7}. Note that, by \eqref{feller-eq22}, there is a trade-off between the required a-priori regularity of $f$ and the roughness of the measures $\nu^{(x)}(z,dy)$, $z \in \overline{B(x,4\delta)}$. If the measures $\nu^{(x)}(z,dy)$ only have a weak singularity at $y=0$, in the sense that \begin{equation*} \sup_{|z-x| \leq 4\delta} \int_{|y| \leq 1} |y| \, \nu^{(x)}(z,dy)<\infty, \end{equation*} then we can choose $\varrho(x)=0$, i.\,e.\ it suffices that $f$ is continuous. In contrast, if (at least) one of the measures has a strong singularity at $y=0$, then we need a higher regularity of $f$ (in a neighbourhood of $x$). \item\label{feller-10-iii} It is not very restrictive to assume that $(Y_t^{(x)})_{t \geq 0}$ has bounded coefficients since $(Y_t^{(x)})_{t \geq 0}$ is only supposed to mimic the behaviour of $(X_t)_{t \geq 0}$ in a neighbourhood of $x$, cf.\ \eqref{feller-eq21}. We are, essentially, free to choose the behaviour of the process far away from $x$. In dimension $d=1$ it is, for instance, a natural idea is to consider \begin{equation*} p^{(x)}(z,\xi) := \begin{cases} q(x-4\delta,\xi), & z \leq x-4 \delta, \\ q(z,\xi), & |z-x| < 4 \delta; \\ q(x+4\delta,\xi), & z \geq x+4\delta \end{cases} \end{equation*} note that $p^{(x)}$ has bounded coefficients even if $q$ has unbounded coefficients. \item\label{feller-10-iv} Condition \eqref{C2} is automatically satisfied if $C_c^{\infty}(\mbb{R}^d)$ is a core for the infinitesimal generator of $(Y_t^{(x)})_{t \geq 0}$, see e.\,g.\ \cite[Proposition 3.9.3]{kol} or \cite[Theorem 1.38]{matters}. \item\label{feller-10-ii} It is possible to extend Theorem~\ref{feller-9} to Feller processes with a non-vanishing diffusion part. The idea of the proof is similar but we need to impose stronger assumptions on the regularity on $f$, e.\,g.\ that $f|_{B(x,4\delta)}$ is differentiable. \end{enumerate} \end{bem} As a direct consequence of Theorem~\ref{feller-9} we obtain the following corollary. \begin{kor} \label{feller-11} Let $(X_t)_{t \geq 0}$ be a Feller process with extended generator $(A_e,\mc{D}(A_e))$ and symbol $q$. If there exist $U \subseteq \mbb{R}^d$ open, $\delta>0$ and $\varrho: U \to [0,1]$ such that for any $x \in U$ the assumptions of Theorem~\ref{feller-9} hold, then the Favard space of order $1$ satisfies \begin{equation*} \mc{C}^{\varrho(\cdot)}(U) \cap F_1 \subseteq \mc{C}^{\kappa(\cdot)}(U). \end{equation*} If additionally \begin{equation} \sup_{x \in U} (M(x)+K(x)) <\infty \quad \text{and} \quad \sup_{x \in U} \beta(x)<1, \label{main-eq9} \end{equation} then $\mc{C}_b^{\varrho(\cdot)}(U) \cap F_1 \subseteq \mc{C}_b^{\kappa(\cdot)}(U)$ and there exists a constant $C>0$ such that \begin{equation} \|f\|_{\mc{C}_b^{\kappa(\cdot)}(U)} \leq C \left(\|f\|_{\infty}+\|A_e f\|_{\infty}+\|f\|_{\mc{C}^{\varrho(\cdot)}_b(U)} \right) \fa f \in \mc{C}_b^{\varrho(\cdot)}(U) \cap F_1; \label{main-eq11} \end{equation} in particular, the the infinitesimal generator $(A,\mc{D}(A))$ satisfies $\mc{C}_b^{\varrho(\cdot)}(U) \cap \mc{D}(A) \subseteq \mc{C}_b^{\kappa(\cdot)}(U)$ and \eqref{main-eq11} holds for any $f \in \mc{C}_b^{\varrho(\cdot)}(U) \cap \mc{D}(A)$. \end{kor} In many examples, see e.\,g.\ Section~\ref{ex}, it is possible to choose the mapping $\varrho$ in such a way that $F_1 \subseteq \mc{C}_b^{\varrho(\cdot)}(U)$; in this case, Corollary~\ref{feller-11} shows that $F_1 \subseteq \mc{C}^{\kappa(\cdot)}(U)$ (resp.\ $F_1 \subseteq \mc{C}_b^{\kappa(\cdot)}(U)$) and the Schauder estimate \eqref{main-eq11} holds for any function $f \in F_1$. In our applications we will even have $\|f\|_{\mc{C}_b^{\varrho(\cdot)}(U)} \leq c(\|f\|_{\infty}+\|A_e f\|_{\infty})$ and therefore \eqref{main-eq11} becomes \begin{equation*} \|f\|_{\mc{C}_b^{\kappa(\cdot)}(U)} \leq C' \left(\|f\|_{\infty}+\|A_e f\|_{\infty} \right) \fa f \in F_1. \end{equation*} In Section~\ref{ex} we will apply Corollary~\ref{feller-11} to isotropic stable-like processes, i.\,e.\ Feller processes with symbol of the form $q(x,\xi) = |\xi|^{\alpha(x)}$. The study of the domain $\mc{D}(A)$ of the infinitesimal generator $A$ is particularly interesting since $A$ is an operator of variable order. We will show that any function $f \in \mc{D}(A)$ satisfies the H\"older estimate of variable order \begin{equation*} |\Delta_h^2 f(x)| \leq C_{\eps} |h|^{\alpha(x)-\eps} (\|f\|_{\infty}+\|Af\|_{\infty}), \qquad |h| \leq 1, \,x \in \mbb{R}^d, \end{equation*} for $\eps>0$, cf.\ Theorem~\ref{ex-21} for the precise statement. \par \medskip Our final result in this section is concerned with Schauder estimates for solutions to the equation $A_e f = g$ for H\"{o}lder continuous mappings $g$. To establish such Schauder estimates we need additional assumptions on the regularity of the symbol and improved regularity estimates for the semigroup of the ``localizing'' Feller process $(Y_t^{(x)})_{t \geq 0}$ in Theorem~\ref{feller-9}. \begin{thm} \label{feller-12} Let $(X_t)_{t \geq 0}$ be a Feller process with extended generator $(A_e,\mc{D}(A_e))$ and Favard space $F_1^X$ such that \begin{equation*} A_e f(z) = -q(z,D) f(z), \qquad f \in C_c^{\infty}(\mbb{R}^d), \,z \in \mbb{R}^d, \end{equation*} for a continuous negative definite symbol $q$. Assume that there exists $\delta \in (0,1)$ such that for any $x \in \mbb{R}^d$ there exists a Feller process $(Y_t^{(x)})_{t \geq 0}$ with symbol \begin{equation} p^{(x)}(z,\xi) = -ib^{(x)}(z) \cdot \xi + \int_{y \neq 0} \left(1-e^{iy \cdot \xi} + iy \cdot \xi \I_{(0,1)}(|y|) \right) \, \nu^{(x)}(z,dy), \qquad z, \xi \in \mbb{R}^d, \label{main-eq15} \end{equation} satisfying \eqref{C1}-\eqref{C4} in Theorem~\ref{feller-9}. Assume additionally that the following conditions hold for absolute constants $C_1,C_2>0$. \begin{enumerate}[label*=\upshape (S\arabic*),ref=\upshape S\arabic*] \item\label{S1} For any $x,z \in \mbb{R}^d$ there exists $\alpha^{(x)}(z) \in (0,2)$ such that \begin{equation*} \nu^{(x)}(z,dy) \leq C_1 |y|^{-d-\alpha^{(x)}(z)} \, dy \quad \text{on $B(0,1)$} \end{equation*} and $0<\inf_{x,z \in \mbb{R}^d} \alpha^{(x)}(z) \leq \sup_{x,z \in\mbb{R}^d} \alpha^{(x)}(z) < 2$. \item\label{S2} There exists $\theta \in (0,1]$ such that \begin{equation} |b^{(x)}(z)-b^{(x)}(z+h)| \leq C_2 |h|^{\theta}, \qquad x,z,h \in \mbb{R}^d, \label{main-eq16} \end{equation} and the following statement holds true for any $r \in (0,1)$ and $x,z \in \mbb{R}^d$: If $u: \mbb{R}^d \to \mbb{R}$ is a measurable mapping such that \begin{equation*} |u(y)| \leq c_u \min\{|y|^{\alpha^{(x)}(z)+r},1\}, \qquad y \in \mbb{R}^d, \end{equation*} for some $c_u>0$, then there exist $C_{3,r}>0$ and $H_r>0$ (not depending on $u$, $x,z$) such that \begin{equation} \left| \int u(y) \, \nu^{(x)}(z,dy) - \int u (y) \, \nu^{(x)}(z+h,dy) \right| \leq C_{3,r} c_u |h|^{\theta} \fa |h| \leq H_r. \label{main-eq17} \end{equation} \item\label{S3} There exists $\Lambda>0$ such that the semigroup $(T_t^{(x)})_{t \geq 0}$ of the Feller process $(Y_t^{(x)})_{t \geq 0}$ satisfies \begin{equation} \|T_t^{(x)} u\|_{\mc{C}_b^{\lambda+\kappa(x)}(\mbb{R}^d)} \leq M(x) t^{-\beta(x)} \|u\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)}, \quad u \in \mc{C}_b^{\lambda}(\mbb{R}^d), \,t \in (0,1), \label{main-eq19} \end{equation} for any $x \in \mbb{R}^d$ and $\lambda \in [0,\Lambda]$; here $M(x)$, $\kappa(x)$ and $\beta(x)$ denote the constants from \eqref{C4}. \item\label{S5} The mapping $\kappa:\mbb{R}^d \to (0,\infty)$ is uniformly continuous and bounded away from zero, i.\,e.\ $\kappa_0 := \inf_{x \in \mbb{R}^d} \kappa(x)>0$. \item\label{S4} It holds that \begin{equation*} \sup_{x \in \mbb{R}^d} M(x)< \infty \qquad \sup_{x \in \mbb{R}^d} \beta(x)<1 \qquad \sup_{x,z \in \mbb{R}^d} \left( |b^{(x)}(z)| + \int_{|y| \geq 1} \,\nu^{(x)}(z,dy) \right)< \infty. \end{equation*} \end{enumerate} Let $\varrho: \mbb{R}^d \to [0,2]$ be a uniformly continuous function satisfying \begin{equation} \sigma := \inf_{x \in \mbb{R}^d} \inf_{|z-x| \leq 4 \delta} \left(1+\varrho(x)-\alpha^{(x)}(z) \right) >0. \label{main-eq21} \end{equation} If $f \in F_1^X$ is such that $f \in \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)$ and \begin{equation*} A_e f = g \in \mc{C}_b^{\lambda}(\mbb{R}^d) \end{equation*} for some $\lambda \in [0,\Lambda]$, then $f \in \mc{C}_b^{(\kappa(\cdot)+\min\{\theta,\lambda,\sigma\})-}(\mbb{R}^d)$, i.\,e.\ \begin{equation} f \in \bigcap_{\eps \in (0,\kappa_0)} \mc{C}_b^{\kappa(\cdot)+\min\{\theta,\lambda,\sigma\}-\eps}(\mbb{R}^d). \label{main-eq25} \end{equation} Moreover, the Schauder estimate \begin{equation} \|f\|_{\mc{C}_b^{\kappa(\cdot)+\min\{\theta,\lambda,\sigma\}-\eps}(\mbb{R}^d)} \leq C_{\eps} \left(\|A_ef\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}\right) \label{main-eq27} \end{equation} holds for any $\eps \in (0,\kappa_0)$ and some finite constant $C_{\eps}$ which does not depend on $f$, $g$. \end{thm} \begin{bem} \label{feller-125} \begin{enumerate}[wide, labelwidth=!, labelindent=0pt] \item\label{feller-125-i} In our examples in Section~\ref{ex} we will be able to choose $\varrho$ in such a way that $\alpha^{(x)}(z)-\varrho(z)$ is arbitrarily small for $x \in \mbb{R}^d$ and $z \in \overline{B(x,4\delta)}$, and therefore the constant $\sigma$ in \eqref{main-eq21} will be close to $1$. Noting that $\theta \leq 1$, it follows that we can discard $\sigma$ in \eqref{main-eq25} and \eqref{main-eq27} i.\,e.\ we get \begin{equation} f \in \mc{C}_b^{\kappa(\cdot)+\min\{\theta,\lambda\}-\eps}(\mbb{R}^d), \qquad \eps \in (0,\kappa_0). \label{main-eq29} \end{equation} We would like to point out that it is, in general, \emph{not} possible to improve this estimate and to obtain that $f \in \mc{C}_b^{\kappa(\cdot)+\lambda-\eps}(\mbb{R}^d)$, $\eps \in (0,\kappa_0)$. To see this consider a Feller process $(X_t)_{t \geq 0}$ with symbol $q(x,\xi) = i b(x) \xi$, $x, \xi \in \mbb{R}$, for a mapping $b \in C_b(\mbb{R}^d)$ with $\inf_x b(x)>0$. If we define \begin{equation*} f(x) := \int_0^x \frac{1}{b(y)} \, dy, \qquad x \in \mbb{R}^d, \end{equation*} then $A_e f= b \, f'=1$ is smooth. However, the regularity of $f$ clearly depends on the regularity of $b$, \begin{equation*} \text{regularity of $f$} \, \approx 1 + \, \text{regularity of $b$} \end{equation*} which means that $f$ is \emph{less} regular than $A_e f$. \item\label{feller-125-ii} It suffices to check \eqref{main-eq19} for $\lambda=\Lambda$; for $\lambda \in (0,\Lambda)$ the inequality then follows from the interpolation theorem, see e.\,g. \cite[Section 1.3.3]{triebel78} or \cite[Theorem 1.6]{lunardi}, and the fact that $\mc{C}_b^{\gamma}(\mbb{R}^d)$ can be written as a real interpolation space, see \cite[Theorem 2.7.2.1]{triebel78} for details. \item\label{feller-125-v} \eqref{main-eq17} is an assumption on the regularity of $z \mapsto \nu^{(x)}(z,dy)$. If $\nu^{(x)}(z,dy)$ has a density, say $m^{(x)}(z,y)$, with respect to Lebesgue measure, then a sufficient condition for \eqref{main-eq17} is \begin{equation*} \int_{y \neq 0} \min\{1,|y|^{\alpha^{(x)}(z)+r}\} |m^{(x)}(z,y)-m^{(x)}(z+h,y)| \, dy \leq C_{3,r} |h|^{\theta}. \end{equation*} \item\label{feller-125-iii} Condition \eqref{S1} is not strictly necessary for the proof of Theorem~\ref{feller-12}; essentially we need suitable upper bounds for \begin{equation*} \int_{|y| \leq r} |y|^{\gamma} \, \nu^{(x)}(z,dy) \quad \text{and} \quad \int_{r < |y| \leq R} |y|^{\gamma} \, \nu^{(x)}(z,dy) \end{equation*} where $0<r<R<1$, $x,z \in \mbb{R}^d$ and $\gamma \in (0,3)$. \item\label{feller-125-iv} In \eqref{S2} we assume that $\theta \leq 1$; this assumption can be relaxed. To this end, we have to replace in \eqref{main-eq16} and \eqref{main-eq17} the differences of first order, \begin{equation*} |b^{(x)}(z)-b^{(x)}(z+h)| \quad \text{and} \quad \left| \int u(y) \, \nu^{(x)}(z,dy) - \int u (y) \, \nu^{(x)}(z+h,dy) \right|, \end{equation*} by iterated differences of higher order, cf.\ \eqref{def-eq3}. This makes the proof more technical but the idea of the proof stays the same. \end{enumerate} \end{bem} The proofs of the results, which we stated in this section, will be presented in Section~\ref{proofs}. \section{Applications} \label{ex} In this section we apply the results from the previous section to various classes of Feller processes. We will study processes of variable order (Theorem~\ref{ex-21} and Corollary~\ref{ex-23}), random time changes of L\'evy processes (Proposition~\ref{ex-9}) and solutions to L\'evy-driven SDEs (Proposition~\ref{ex-5}). Our aim is to illustrate the range of applications, and therefore we do not strive for the greatest generality of the examples; we will, however, point the reader to possible extensions of the results which we present. We remind the reader of the notation \begin{equation*} \mc{C}_b^{\alpha(\cdot)+}(\mbb{R}^d) := \bigcup_{\eps>0} \mc{C}_b^{\alpha(\cdot)+\eps}(\mbb{R}^d) \qquad \quad \mc{C}_b^{\alpha(\cdot)-}(\mbb{R}^d) := \bigcap_{\eps>0} \mc{C}_b^{\max\{\alpha(\cdot)-\eps,0\}}(\mbb{R}^d) \end{equation*} which we introduced in Section~\ref{def}.\par \medskip The first part of this section is devoted to isotropic stable-like processes, i.\,e.\ Feller processes $(X_t)_{t \geq 0}$ with symbol of the form $q(x,\xi) = |\xi|^{\alpha(x)}$. A sufficient condition for the existence of such a Feller process is that $\alpha: \mbb{R}^d \to (0,2]$ is H\"{o}lder continuous and bounded from below, cf.\ \cite[Theorem 5.2]{matters}. If $\alpha(\mbb{R}^d) \subseteq (0,2)$ then the infinitesimal generator $A$ of $(X_t)_{t \geq 0}$ satisfies \begin{equation*} Af(x) = c_{d,\alpha(x)} \int_{y \neq 0} \left( f(x+y)-f(x)-y \cdot \nabla f(x) \I_{(0,1)}(|y|) \right) \, \frac{1}{|y|^{d+\alpha(x)}} \,dy, \quad f \in C_c^{\infty}(\mbb{R}^d), \end{equation*} which means that $A$ is a fractional Laplacian of variable order, i.e. $A = - (-\Delta)^{\alpha(\cdot)/2}$. This makes $A$ -- and hence the stable-like process $(X_t)_{t \geq 0}$ -- an interesting object of study. To our knowledge there are no Schauder estimates for the Poisson equation $Af=g$ available in the existing literature. Using the results from the previous section, we are able to derive Schauder estimates for functions $f$ in the Favard space $F_1$ (and, hence in particular, for $f \in \mc{D}(A)$), cf.\ Theorem~\ref{ex-21}, as well as Schauder estimates for solutions to $Af=g$, cf.\ Corollary~\ref{ex-23} below. \begin{thm} \label{ex-21} Let $(X_t)_{t \geq 0}$ be a Feller process with symbol $q(x,\xi) = |\xi|^{\alpha(x)}$ for a H\"{o}lder continuous function $\alpha: \mbb{R}^d \to (0,2)$ such that \begin{equation*} 0< \alpha_L := \inf_{x \in \mbb{R}^d} \alpha(x) \leq \sup_{x \in \mbb{R}^d} \alpha(x)<2 . \end{equation*} The associated Favard space $F_1$ of order $1$, cf.\ \eqref{fav}, satisfies \begin{equation*} F_1 \subseteq \mc{C}_b^{\alpha(\cdot)-}(\mbb{R}^d). \end{equation*} For any $\eps \in (0,\alpha_L)$ there exists a finite constant $C=C(\eps,\alpha)$ such that \begin{equation} \|f\|_{\mc{C}_b^{\alpha(\cdot)-\eps}(\mbb{R}^d)} \leq C (\|f\|_{\infty}+\|A_e f\|_{\infty}), \qquad f \in F_1, \label{ex-eq2} \end{equation} where $A_e$ denotes the extended generator of $(X_t)_{t \geq 0}$. In particular, \eqref{ex-eq2} holds for any $f$ in the domain $\mc{D}(A)$ of the (strong) generator of $(X_t)_{t \geq 0}$, and $\mc{D}(A) \subseteq \mc{C}_b^{\alpha(\cdot)-}(\mbb{R}^d)$. \end{thm} \begin{bem} \label{ex-22} \begin{enumerate}[wide, labelwidth=!, labelindent=0pt] \item\label{ex-22-i} Theorem~\ref{ex-21} allows us to obtain information on the regularity of the transition density $p(t,x,y)$ of $(X_t)_{t \geq 0}$. Since $p(t,\cdot,y) \in \mc{D}(A)$ for each $t>0$ and $y \in \mbb{R}^d$, cf.\ \cite[Corollary 3.6]{matters}, Theorem~\ref{ex-21} shows that $p(t,\cdot,y) \in \mc{C}_b^{\alpha(\cdot)-}(\mbb{R}^d)$; in particular, $x \mapsto p(t,x,y)$ is differentiable at any $x \in \{\alpha>1\}$. Moreover, $(\partial_t-A_x) p(t,x,y)=0$ entails by \cite[Theorem 3.8]{matters} that \begin{equation*} \|p(t,\cdot,y)\|_{\mc{C}_b^{\alpha(\cdot)-\eps}(\mbb{R}^d)} \leq C t^{-1-d/\alpha_L}, \qquad t \in (0,T), \,y \in \mbb{R}^d, \end{equation*} for a finite constant $C=C(\eps,\alpha,T)$. Some related results on the regularity of the transition density were recently obtained in \cite{chen18}. \item\label{ex-22-ii} Theorem~\ref{ex-21} gives a necessary condition for a function $f \in C_{\infty}(\mbb{R}^d)$ to be in the domain $\mc{D}(A)$ of the infinitesimal generator; sufficient conditions were established in \cite[Example 5.5]{ihke}. Combining both results it should be possible to show that $\mc{D}(A)$ is an algebra, i.\,e.\ $f,g \in \mc{D}(A)$ implies $f \cdot g \in \mc{D}(A)$, and that \begin{equation*} A(f \cdot g)= f Ag + g Af + \Gamma(f,g), \qquad f,g \in \mc{D}(A), \end{equation*} see \cite[Proof of Theorem 4.3(iii)]{reg-levy} for the idea of the proof; here \begin{equation*} \Gamma(f,g)(x) := c_{d,\alpha(x)} \int_{y \neq 0} \left( f(x+y)-f(x) \right) \left( g(x+y)-g(x) \right) \frac{1}{|y|^{d+\alpha(x)}} \, dy \end{equation*} is the so-called Carr\'e du Champ operator, cf.\ \cite{bouleau91,meyer4}, and $\nu(x,dy) = c_{d,\alpha(x)} |y|^{-d-\alpha(x)} \, dy$ is the family of L\'evy measures associated with the symbol $|\xi|^{\alpha(x)}$ via the L\'evy--Khintchine representation. \item Theorem~\ref{ex-21} can be generalized to a larger class of ``stable-like'' Feller processes, e.\,g.\ relativistic stable-like processes and tempered stable-like processes, cf.\ \cite[Section 5.1]{matters} or \cite[Example 4.7]{parametrix} for the existence of such processes. In order to apply the results from Section~\ref{main} we need two key ingredients: general existence results -- which ensure the existence of a ``nice'' Feller process $(Y_t)_{t \geq 0}$ whose symbol is ``truncated'' in a suitable way, cf.\ Step 1 in the proof of Theorem~\ref{ex-21} -- and certain heat kernel estimate which are needed to establish H\"older estimates for the semigroup; in \cite{matters} both ingredients were established for a wide class of stable-like processes. \end{enumerate} \end{bem} As a corollary of Theorem~\ref{ex-21} and Theorem~\ref{feller-12} we will establish the following Schauder estimates for the elliptic equation $Af=g$ associated with the infinitesimal generator $A$ of the isotropic stable-like process. \begin{kor} \label{ex-23} Let $(X_t)_{t \geq 0}$ be a Feller process with infinitesimal generator $(A,\mc{D}(A))$ and symbol $q(x,\xi) = |\xi|^{\alpha(x)}$ for a mapping $\alpha: \mbb{R}^d \to (0,2)$ which satisfies \begin{equation} 0 < \alpha_L := \inf_{x \in \mbb{R}^d} \leq \sup_{x \in \mbb{R}^d} \alpha(x)<2 \label{ex-eq0} \end{equation} and $\alpha \in C_b^{\gamma}(\mbb{R}^d)$ for some $\gamma \in (0,1)$. If $f \in \mc{D}(A)$ is such that \begin{equation*} Af = g \in \mc{C}_b^{\lambda}(\mbb{R}^d) \end{equation*} for some $\lambda>0$, then $f \in \mc{C}_b^{(\alpha(\cdot)+ \min\{\lambda,\gamma\})-}(\mbb{R}^d)$. For any $\eps \in (0,\alpha_L)$ there exists a constant $C_{\eps}>0$ (not depending on $f$, $g$) such that \begin{equation} \|f\|_{\mc{C}_b^{\alpha(\cdot)+\min\{\lambda,\gamma\}-\eps}(\mbb{R}^d)} \leq C_{\eps}\left( \|Af\|_{\mc{C}_b^{\min\{\lambda,\gamma\}}(\mbb{R}^d)} + \|f\|_{\infty}\right). \label{ex-eq1} \end{equation} \end{kor} It is possible to extend Corollary~\ref{ex-23} to a larger class of ``stable-like'' processes, see also Remark~\ref{ex-22}\eqref{ex-22-ii}. Let us give some remarks on the assumption that $\alpha \in C_b^{\gamma}(\mbb{R}^d)$ for $\gamma \in (0,1)$. \begin{bem} \label{ex-24} \begin{enumerate}[wide, labelwidth=!, labelindent=0pt] \item\label{ex-24-i} Let $\alpha$ be Lipschitz continuous function satisfying \eqref{ex-eq0}. Since $\alpha \in \mc{C}_b^{1-\eps}(\mbb{R}^d)$ for any $\eps \in (0,1)$, the Schauder estimate \eqref{ex-eq1} holds with $\gamma=1-\eps/2$ and $\eps \rightsquigarrow \eps/2$, and this entails that \eqref{ex-eq1} holds with $\gamma=1$. This means that Corollary~\ref{ex-23} remains valid for Lipschitz continuous functions (with $\gamma=1$ in \eqref{ex-eq1}). \item If $\alpha \in C_b^{\gamma}(\mbb{R}^d)$ for $\gamma>1$, we can apply Corollary~\ref{ex-23} with $\gamma=1$ but this gives a weaker regularity estimate for $f$ than we would expect; this is because we lose some information on the regularity of $\alpha$. The reason why we have to restrict ourselves to $\gamma \in (0,1)$ is that two tools which we need for the proof (Theorem~\ref{feller-12} and Proposition~\ref{app-25}) are only available for $\gamma \in (0,1)$. However, we believe that both results are valid for $\gamma>0$, and that, hence, that the assumption $\gamma \in (0,1)$ in Corollary~\ref{ex-23} can be dropped. \end{enumerate} \end{bem} Since the proofs of Theorem~\ref{ex-21} and Corollary~\ref{ex-23} are quite technical, we defer them to Section~\ref{iso}. The idea is to apply Theorem~\ref{feller-9} and Theorem~\ref{feller-12}. As ``localizing'' process $(Y_t^{(x)})_{t \geq 0}$ we will use a Feller process with symbol \begin{equation*} p^{(x)}(z,\xi) := |\xi|^{\alpha^{(x)}(z)}, \qquad z,\xi \in \mbb{R}^d \end{equation*} where \begin{equation*} \alpha^{(x)}(z) := (\alpha(x)-\eps) \vee \alpha(z) \wedge (\alpha(x)+\eps), \qquad z \in \mbb{R}^d, \end{equation*} for fixed $x \in \mbb{R}^d$ and small $\eps>0$. In order to apply the results from the previous section, we need suitable regularity estimates for the semigroup $(P_t)_{t \geq 0}$ associated with an isotropic stable-like process $(Y_t)_{t \geq 0}$. We will study the regularity of $x \mapsto P_t u(x)$ using the parametrix construction of (the transition density of) $(Y_t)_{t \geq 0}$ in \cite{matters}; the results are of independent interest, we refer the reader to Subsection~\ref{iso-reg}. \par \medskip Next we study Feller processes with symbols of the particular form $q(x,\xi) = m(x) |\xi|^{\alpha}$. They can be constructed as random time changes of isotropic $\alpha$-stable L\'evy processes, see e.\,g.\ \cite[Section 4.1]{ltp} and \cite{perpetual} for further details. This class of Feller processes includes, in particular, solutions to SDEs \begin{equation*} dX_t = \sigma(X_{t-}) \, dL_t, \qquad X_0 = x \end{equation*} driven by a one-dimensional isotropic $\alpha$-stable L\'evy process $(L_t)_{t \geq 0}$, $\alpha \in (0,2]$; for instance, if $\sigma>0$ is continuous and at most of linear growth, then there exists a unique weak solution to the SDE, and the solution is a Feller process with symbol $q(x,\xi) = |\sigma(x)|^{\alpha} |\xi|^{\alpha}$, cf.\ \cite[Example 5.4]{mp}. \begin{prop} \label{ex-9} Let $(X_t)_{t \geq 0}$ be a Feller process with symbol $q(x,\xi)= m(x) |\xi|^{\alpha}$ for $\alpha \in (0,2)$ and a H\"{o}lder continuous function $m: \mbb{R}^d \to (0,\infty)$ such that \begin{equation*} 0 < \inf_{x \in \mbb{R}^d} m(x) \leq \sup_{x \in \mbb{R}^d} m(x) < \infty. \end{equation*} \begin{enumerate} \item\label{ex-9-i} The infinitesimal generator $(A,\mc{D}(A))$ and the Favard space $F_1$ of order $1$ satisfy \begin{equation*} \mc{C}_{\infty}^{\alpha+}(\mbb{R}^d) \subseteq \mc{D}(A) \subseteq F_1 \subseteq \mc{C}_b^{\alpha-}(\mbb{R}^d), \end{equation*} where \begin{equation} \mc{C}_{\infty}^{\alpha+}(\mbb{R}^d) := \mc{C}_b^{\alpha+}(\mbb{R}^d) \cap C_{\infty}^{\floor{\alpha}}(\mbb{R}^d) = \begin{cases} \mc{C}_b^{\alpha}(\mbb{R}^d) \cap C_{\infty}(\mbb{R}^d), & \alpha \in (0,1) \\ \mc{C}_b^{\alpha}(\mbb{R}^d) \cap C_{\infty}^1(\mbb{R}^d), & \alpha \in [1,2). \end{cases} \label{ex-eq30} \end{equation} For any $\kappa \in (0,\alpha)$ there exists a finite constant $C_1>0$ such that \begin{equation} \|f\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq C_1 (\|f\|_{\infty}+\|A_e f\|_{\infty}) \fa f \in F_1; \label{ex-eq31} \end{equation} here $A_e$ denotes the extended infinitesimal generator. \item\label{ex-9-ii} Let $\theta \in (0,1]$ be such that $m \in C_b^{\theta}(\mbb{R}^d)$. If $f \in \mc{D}(A)$ is such that $Af=g \in \mc{C}_b^{\lambda}(\mbb{R}^d)$ for some $\lambda>0$, then $f \in \mc{C}_b^{(\alpha+\min\{\lambda,\theta\})-}(\mbb{R}^d)$ and for any $\kappa \in (0,\alpha)$ there exists a constant $C_2>0$ (not depending on $f$, $Af$) such that \begin{equation*} \|f\|_{\mc{C}_b^{\kappa+\min\{\lambda,\theta\}}(\mbb{R}^d)} \leq C_2 \left( \|f\|_{\infty} + \|Af\|_{\mc{C}_b^{\min\{\lambda,\theta\}}(\mbb{R}^d)} \right). \end{equation*} \end{enumerate} \end{prop} \begin{proof} It follows from \cite[Theorem 3.3]{matters} that there exists a unique Feller process $(X_t)_{t \geq 0}$ with symbol $q(x,\xi)=m(x) |\xi|^{\alpha}$, $x,\xi \in \mbb{R}^d$. Using a very similar reasoning as in the proof of Proposition~\ref{app-1} and Proposition~\ref{app-25}, it follows from the parametrix construction of the transition density $p$ in \cite{matters} that the semigroup $(P_t)_{t \geq 0}$ satisfies \begin{equation*} \|P_t u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq c_{1,\kappa} t^{-\kappa/\alpha} \|u\|_{\infty}, \qquad u \in \mc{B}_b(\mbb{R}^d),\, t \in (0,1), \end{equation*} and \begin{equation*} \|P_t u\|_{\mc{C}_b^{\kappa + \lambda}(\mbb{R}^d)} \leq c_{2,\kappa} t^{-\kappa/\alpha} \|u\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)}, \quad u \in \mc{C}_b^{\lambda}(\mbb{R}^d),\,t \in (0,1), \end{equation*} for any $\kappa \in (0,\alpha)$ and $\lambda \in [0,\theta]$; for the particular case $\alpha \in (0,1]$ the first inequality follows from \cite{wang18-2}. Applying Proposition~\ref{feller-7} we get \eqref{ex-eq31}; in particular $F_1 \subseteq \mc{C}_b^{\alpha-}(\mbb{R}^d)$. The inclusion $\mc{C}_{\infty}^{\alpha+}(\mbb{R}^d) \subseteq \mc{D}(A)$ is a direct consequence of \cite[Example 5.4]{ihke}. The Schauder estimate in \eqref{ex-9-ii} follows Theorem~\ref{feller-12} applied with $Y_t^{(x)} := X_t$ for all $x \in \mbb{R}^d$ (using the regularity estimates for $(P_t)_{t \geq 0}$ from above). \end{proof} \begin{bem}[{Possible extensions of Proposition~\ref{ex-9}}] \label{ex-11} \begin{enumerate}[wide, labelwidth=!, labelindent=0pt] \item\label{ex-11-i} Proposition~\ref{ex-9} can be extended to symbols $q(x,\xi) = m(x) \psi(\xi)$ for ``nice'' continuous negative definite functions $\psi$, e.\,g.\ the characteristic exponent of a relativistic stable or tempered stable L\'evy process, cf.\ \cite[Table 5.2]{matters} for further examples. \item\label{ex-11-ii} The family of L\'evy kernels associated with $(X_t)_{t \geq 0}$ is of the form $\nu(x,dy) = m(x) |y|^{-d-\alpha} \, dy$. More generally, it is possible to consider Feller processes with L\'evy kernels $\nu(x,dy) = m(x,y) \, \nu(dy)$, for instance \cite{bogdan17,wang18-2,szcz18} establish existence results as well as H\"{o}lder estimates under suitable assumptions on $m$ and $\nu$. Combining the results with Proposition~\ref{feller-7} we can obtain Schauder estimates for functions in the domain of the infinitesimal generator of $(X_t)_{t \geq 0}$. Let us mention that for $\nu(x,y) = m(x,y) |y|^{-d-\alpha} \, dy$ Schauder estimates were studied in \cite{bass08}. \end{enumerate} \end{bem} We close this section with some results on solutions to L\'evy-driven SDEs. \begin{prop} \label{ex-5} Let $(L_t)_{t \geq 0}$ be a $1$-dimensional isotropic $\alpha$-stable L\'evy process, $\alpha \in (0,2)$. Consider the SDE \begin{equation} dX_t = b(X_{t-}) \, dt + \sigma(X_{t-}) \, dL_t, \qquad X_0 = x, \label{ex-eq3} \end{equation} for a bounded $\beta$-H\"{o}lder continuous mapping $b: \mbb{R} \to \mbb{R}$ and a bounded Lipschitz continuous mapping $\sigma: \mbb{R} \to (0,\infty)$. If \begin{equation} \beta+\alpha>1 \quad \text{and} \quad \sigma_L :=\inf_{x \in \mbb{R}} \sigma(x)>0, \label{ex-eq4} \end{equation} then there exists a unique weak solution $(X_t)_{t \geq 0}$ to \eqref{ex-eq3}, and it gives rise to a Feller process with infinitesimal generator $(A,\mc{D}(A))$. The associated Favard space $F_1$ of order $1$ satisfies \begin{equation*} \mc{D}(A) \subseteq F_1 \subseteq \bigcap_{k \in \mbb{N}} \mc{C}_b^{\min\{1,\alpha-1/k\}}(\mbb{R}), \end{equation*} and there exists for any $k \in \mbb{N}$ a finite constant $C>0$ such that \begin{equation} \|f\|_{\mc{C}_b^{\min\{\alpha-1/k,1\}}(\mbb{R})} \leq C (\|f\|_{\infty}+\|A_e f\|_{\infty}) \fa f \in F_1 \label{ex-eq7} \end{equation} where $A_e$ denotes the extended generator. In particular, \eqref{ex-eq7} holds for any $f \in \mc{D}(A)$ with $A_e f=Af$. \end{prop} \begin{proof} It follows from \eqref{ex-eq4} that the SDE \eqref{ex-eq3} has a unique weak solution $(X_t)_{t \geq 0}$ for any $x \in \mbb{R}$, cf.\ \cite{kulik15}. By \cite{schnurr}, see also \cite{sde}, $(X_t)_{t \geq 0}$ is a Feller process. Moreover, \cite{wang18} shows that for any $\kappa<\alpha$ there exists a constant $c>0$ such that the semigroup $(P_t)_{t \geq 0}$ satisfies \begin{equation*} \|P_t u\|_{\mc{C}_b^{\kappa \wedge 1}(\mbb{R})}\leq c \|u\|_{\infty} t^{-\kappa/\alpha} \end{equation*} for all $t \in (0,1)$ and $u \in \mc{B}_b(\mbb{R})$. Applying Proposition~\ref{feller-7} proves the assertion. \end{proof} Before giving some remarks on possible extensions of Proposition~\ref{ex-5}, let us mention that sufficient conditions for a function $f$ to be in the domain $\mc{D}(A)$ were studied in \cite{ihke}; for instance if the SDE has no drift part, i.\,e.\ $b=0$, then it follows from Proposition~\ref{ex-5} and \cite[Example 5.6]{ihke} that \begin{equation} \mc{C}^{\alpha+}_{\infty}(\mbb{R}) \subseteq \mc{D}(A) \subseteq \mc{C}_b^{\alpha-}(\mbb{R}) \quad \text{if $\alpha \in (0,1]$} \label{ex-eq11} \end{equation} and \begin{equation} \mc{C}^{\alpha+}_{\infty}(\mbb{R}) \subseteq \mc{D}(A) \subseteq \mc{C}_b^{1}(\mbb{R}) \quad \text{if $\alpha \in (1,2)$;} \label{ex-eq13} \end{equation} see \eqref{ex-eq30} for the definition of $\mc{C}^{\alpha+}_{\infty}(\mbb{R})$. Intuitively one would expect that \eqref{ex-eq11} holds for $\alpha \in (0,2)$. If we knew that the semigroup $(P_t)_{t \geq 0}$ of the solution to \eqref{ex-eq3} satisfies \begin{equation} \|P_t u\|_{\mc{C}_b^{\kappa}(\mbb{R})} \leq c t^{-\kappa/ \alpha} \|u\|_{\infty}, \qquad u \in \mc{B}_b(\mbb{R}), \,t \in (0,1), \,\kappa \in (0,\alpha), \label{ex-eq15} \end{equation} for some constant $c=c(\kappa)>0$, this would immediately follow from Proposition~\ref{feller-7}. We could not find \eqref{ex-eq15} in the literature but we strongly believe that the parametrix construction of the transition density in \cite{kulik15} can be used to establish such an estimate; this is also indicated by the proof of Theorem~\ref{ex-21} (see in particular the proof of Proposition~\ref{app-1}). In fact, we are positive that the parametrix construction in \cite{kulik15} entails estimates of the form \begin{equation*} \|P_t u\|_{\mc{C}_b^{\kappa+\min\{\lambda,\beta\}}(\mbb{R})} \leq c t^{-\kappa/ \alpha} \|u\|_{\mc{C}_b^{\min\{\lambda,\beta\}}(\mbb{R})}, \qquad u \in \mc{C}_b^{\lambda}(\mbb{R}), \,t \in (0,1), \,\kappa \in (0,\alpha), \lambda>0 \end{equation*} (recall that $\beta$ is the H\"older exponent of the drift $b$) which would then allow us to establish Schauder estimates to the equation $Af=g$ for $g \in \mc{C}_b^{\lambda}(\mbb{R})$ using Theorem~\ref{feller-12}. \begin{bem}[{Possible extensions of Proposition~\ref{ex-5}}] \label{ex-7} \begin{enumerate}[wide, labelwidth=!, labelindent=0pt] \item\label{ex-7-i} The gradient estimates in \cite{wang18} were obtained under more general conditions, and (the proof of) Proposition~\ref{ex-5} extends naturally to this more general framework. Firstly, Proposition~\ref{ex-5} can be extended to higher dimensions; the assumption $\sigma_L>0$ in \eqref{ex-eq4} is then replaced by the assumption that $\sigma$ is uniformly non-degenerate in the sense that \begin{equation*} M^{-1} |\xi| \leq \inf_{x \in \mbb{R}^d} \min\{|\sigma(x) \xi|, |\sigma(x)^{-1} \xi|\} \leq \sup_{x \in \mbb{R}^d} \max\{|\sigma(x) \xi|, |\sigma(x)^{-1} \xi|\} \leq M |\xi| \end{equation*} for some absolute constant $M>0$ which does not depend on $\xi \in \mbb{R}^d$. Secondly, Proposition~\ref{ex-5} holds for a larger class of driving L\'evy processes; it suffices to assume that the L\'evy measure $\nu$ satisfies $\nu(dz) \geq c |z|^{-d-\alpha} \I_{\{|z| \leq \eta\}}$ for some $c,\eta>0$ and that the SDE \eqref{ex-eq3} has a unique weak solution. Under the stronger balance condition $\beta+\alpha/2>1$ this is automatically satisfied for a large class of L\'evy processes, e.g.\ if $(L_t)_{t \geq 0}$ is an relativistic stable or a tempered stable L\'evy process, cf.\ \cite{chen17}. \item\label{ex-7-iii} Recently, Kulczycki et al.\ \cite{kulc18} established H\"{o}lder estimates for the semigroup associated with the solution to the SDE \begin{equation*} dX_t = \sigma(X_{t-}) \, dL_t \end{equation*} driven by a $d$-dimensional L\'evy process $(L_t)_{t \geq 0}$, $d \geq 2$, whose components are independent $\alpha$-stable L\'evy processes, $\alpha \in (0,1)$, under the assumption that $\sigma: \mbb{R}^d \to \mbb{R}^{d \times d}$ is bounded, Lipschitz continuous and satisfies $\inf_x \det(\sigma(x))>0$. Combining the estimates with Proposition~\ref{feller-7} we find that the assertion of Proposition~\ref{ex-5} remains valid in this framework, i.e.\ the Favard space $F_1$ associated with the unique solution $(X_t)_{t \geq 0}$ satisfies $F_1 \subseteq \mc{C}_b^{\alpha-}(\mbb{R}^d)$ and \begin{equation*} \|f\|_{\mc{C}_b^{\alpha-1/k}(\mbb{R}^d)} \leq C_k (\|f\|_{\infty}+\|A_e f\|_{\infty}), \qquad f \in F_1. \end{equation*} \item\label{ex-7-iv} Using coupling methods, Liang et. al \cite{wang18-3} recently studied the regularity of semigroups associated with solutions to SDEs with additive noise \begin{equation*} dX_t = b(X_{t-}) \, dt+ dL_t \end{equation*} for a large class of driving L\'evy processes $(L_t)_{t \geq 0}$. The results from \cite{wang18-3} and Section~\ref{main} can be used to obtain Schauder estimates for functions in the domain of the infinitesimal generator of $(X_t)_{t \geq 0}$. \end{enumerate} \end{bem} \section{Proofs of results from Section~\ref{main}} \label{proofs} For the proof of Proposition~\ref{feller-7} we use the following lemma which shows how H\"{o}lder estimates for a Feller semigroup translate to regularity properties of the $\lambda$-potential operator \begin{equation*} R_{\lambda} u := \int_{(0,\infty)} e^{-\lambda t} P_t u \, dt, \qquad u \in \mc{B}_b(\mbb{R}^d), \, \lambda>0. \end{equation*} \begin{lem} \label{feller-3} Let $(X_t)_{t \geq 0}$ be a Feller process with semigroup $(P_t)_{t \geq 0}$ and $\lambda$-potential operators $(R_{\lambda})_{\lambda>0}$. \begin{enumerate} \item\label{feller-3-i} If there exist $T>0$, $M \geq 0$, $\kappa \geq 0$ and $\beta \geq 0$ such that \begin{equation*} \|P_t u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq M t^{-\beta} \|u\|_{\infty} \end{equation*} for all $t \in (0,T)$ and $u \in \mc{B}_b(\mbb{R}^d)$, then \begin{equation} \|P_t u\|_{\mc{C}^{\kappa}_b(\mbb{R}^d)} \leq M e^{mt} t^{-\beta} \|u\|_{\infty} \label{proofs-eq3} \end{equation} for all $t>0$ and $u \in \mc{B}_b(\mbb{R}^d)$ where $m := \log(2) \beta/T$. \item\label{feller-3-ii} If $u \in \mc{B}_b(\mbb{R}^d)$ is such that \eqref{proofs-eq3} holds for some $\beta \in [0,1)$, then $R_{\lambda} u \in \mc{C}_b^{\kappa}(\mbb{R}^d)$ for any $\lambda>m$ and \begin{equation*} \|R_{\lambda} u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq \|u\|_{\infty} \left( \frac{1}{\lambda-m} + \frac{1}{1-\beta} \right) (M+1). \end{equation*} \end{enumerate} \end{lem} \begin{proof} \firstpara{\eqref{feller-3-i}} By the contraction property of $(P_t)_{t \geq 0}$, we have $\|P_{t} u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq \|P_{t/2} u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)}$ for all $t \geq 0$, and so \begin{equation*} \|P_{t} u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq M \left( \frac{t}{2} \right)^{-\beta} = M 2^{\beta} t^{-\beta} \fa t \in (0,2T). \end{equation*} Iterating the procedure, it follows easily that \eqref{proofs-eq3} holds. \para{\eqref{feller-3-ii}} Let $u \in \mc{B}_b(\mbb{R}^d)$ be such that \eqref{proofs-eq3} holds for some $\beta <1$. If we choose $K>\kappa$, then \eqref{proofs-eq3} gives that the iterated difference operator $\Delta_h^K$, cf.\ \eqref{def-eq3}, satisfies \begin{equation*} |\Delta_h^K P_t u(x)| \leq M e^{mt} t^{-\beta} \|u\|_{\infty} |h|^{\kappa} \end{equation*} for any $x \in \mbb{R}^d$ and $|h| \leq 1$. Since, by the linearity of the integral, \begin{equation*} \Delta_h^K R_{\lambda} u(x) = \int_{(0,\infty)} e^{-\lambda t} \Delta_h^K P_t u(x) \, dt \end{equation*} we find that \begin{equation*} |\Delta_h^K R_{\lambda} u(x)| \leq M |h|^{\kappa} \|u\|_{\infty} \int_{(0,\infty)} e^{-t(\lambda-m)} t^{-\beta} \, dt. \end{equation*} On the other hand, we have $\|R_{\lambda} u\|_{\infty} \leq \lambda^{-1} \|u\|_{\infty}$, and therefore we get for all $\lambda>m$ \begin{equation*} \|R_{\lambda} u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq \lambda^{-1} \|u\|_{\infty} + M \|u\|_{\infty} \left( \int_0^1 t^{-\beta} \, dt + \int_1^{\infty} e^{-t(\lambda-m)} \, dt \right) \end{equation*} which proves the assertion. \end{proof} We are now ready to prove Proposition~\ref{feller-7}. \begin{proof}[Proof of Proposition~\ref{feller-7}] It follows from Lemma~\ref{feller-3}\eqref{feller-3-i} that \eqref{proofs-eq3} holds with $m := \log(2) \beta/T$ for any $u \in \mc{B}_b(\mbb{R}^d)$. If we set $\lambda := 2m$ and $u := \lambda f-A_ef$ for $f \in F_1$, then $f = R_{\lambda} u$. Applying Lemma~\ref{feller-3}\eqref{feller-3-ii} we find that \begin{equation*} \|f\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} = \|R_{\lambda} u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq K \|u\|_{\infty} \leq \lambda K \|f\|_{\infty} + K \|A_ef\|_{\infty} \end{equation*} for $K := 2m^{-1} + (1-\beta)^{-1}$. \end{proof} For the proof of Theorem~\ref{feller-9} we need two auxiliary results. \begin{lem} \label{feller-13} Let $(X_t)_{t \geq 0}$ and $(Y_t)_{t \geq 0}$ be Feller processes with infinitesimal generator $(A,\mc{D}(A))$ and $(L,\mc{D}(L))$, respectively, such that \begin{equation*} Af(z) = -q(z,D) f(z) \quad \text{and} \quad Lf(z) = -p(z,D) f(z) \fa f \in C_c^{\infty}(\mbb{R}^d), \,z \in \mbb{R}^d, \end{equation*} cf.\ \eqref{pseudo}, and assume that the $(A,C_c^{\infty}(\mbb{R}^d))$-martingale problem is well-posed. Let $U \subseteq \mbb{R}^d$ be an open set such that \begin{equation*} p(z,\xi) = q(z,\xi) \fa z \in U, \,\xi \in \mbb{R}^d. \end{equation*} If $x \in U$ and $r>0$ are such that $\overline{B(x,r)} \subseteq U$, then for the stopping times \begin{equation} \tau^X := \inf\{t>0; |X_t-x|>r \} \qquad \tau^Y := \inf\{t>0; |Y_t-x|>r\} \label{feller-eq25} \end{equation} the random variables $X_{t \wedge \tau^X}$ and $Y_{t \wedge \tau^Y}$ are equal in distribution with respect to $\mbb{P}^x$ for any $t \geq 0$.\footnote{Here and below we are a bit sloppy in our notation. The Feller processes $(X_t)_{t \geq 0}$ and $(Y_t)_{t \geq 0}$ each come with a family of probability measures, i.e.\,their semigroups are of the form $\int f(X_t) \, \mbb{P}^x(dy)$ and $\int f(Y_t) \, \tilde{\mbb{P}}^x(dy)$, respectively, for families of probability measures $(\mbb{P}^x)_{x \in \mbb{R}^d}$ and $(\tilde{\mbb{P}}^x)_{x \in \mbb{R}^d}$. To keep the notation simple, we will not distinguish these two families. Formally written, the assertion of Lemma~\ref{feller-12} reads $\mbb{P}^x(X_{t \wedge \tau^X} \in \cdot) = \tilde{\mbb{P}}^x(Y_{t \wedge \tau^Y} \in \cdot)$.} \end{lem} \begin{proof} Set \begin{equation*} \sigma^X := \inf\{t>0; X_{t} \notin U \, \, \text{or} \, \, X_{t-} \notin U\} \qquad \sigma^Y := \inf\{t>0; Y_{t} \notin U \, \, \text{or} \, \, Y_{t-} \notin U\} \end{equation*} It follows from the well-posedness of the $(A,C_c^{\infty}(\mbb{R}^d))$-martingale problem that the local martingale problem for $U$ is well-posed, cf.\ \cite[Theorem 4.6.1]{ethier} or \cite{hoh} for details. On the other hand, Dynkin's formula shows that both $(X_{t \wedge \sigma^X})_{t \geq 0}$ and $(Y_{t \wedge \sigma^Y})_{t \geq 0}$ are solutions to the local martingale problem, and therefore $(X_{t \wedge \sigma^X})_{t \geq 0}$ equals in distribution $(Y_{t \wedge \sigma^Y})_{t \geq 0}$ with respect to $\mbb{P}^x$ for any $x \in U$. If $x \in U$ and $r>0$ are such that $\overline{B(x,r)} \subseteq U$, then it follows from the definition of $\tau^X$ and $\tau^Y$ that $\tau^X \leq \sigma^X$ and $\tau^Y \leq \sigma_U^Y$; in particular, \begin{equation*} X_{t \wedge \tau^X} = X_{t \wedge \tau^X \wedge \sigma^X} \quad \text{and} \quad Y_{t \wedge \tau^Y} = Y_{t \wedge \tau^Y \wedge \sigma^Y}. \end{equation*} Approximating $\tau^X$ and $\tau^Y$ from above by sequences of discrete-valued stopping times, we conclude from $(X_{t \wedge \sigma^X})_{t \geq 0} \stackrel{d}{=} (Y_{t \wedge \sigma^Y})_{t \geq 0}$ that $X_{t \wedge \tau^X} \stackrel{d}{=} Y_{t \wedge \tau^Y}$. \end{proof} \begin{lem} \label{feller-15} Let $(Y_t)_{t \geq 0}$ be a Feller process with infinitesimal generator $(A,\mc{D}(A))$ and symbol \begin{equation*} p(x,\xi) = -i b(x) \cdot \xi + \int_{y \neq 0} \left( 1- e^{iy \cdot \xi} + i y \cdot \xi \I_{(0,1)}(|y|) \right) \, \nu(x,dy), \qquad x,\xi \in \mbb{R}^d. \end{equation*} If $\alpha>1$ and $U \in \mc{B}(\mbb{R}^d)$ are such that \begin{equation*} \sup_{z \in U} \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^{\alpha}\} \, \nu(z,dy) \right)<\infty, \end{equation*} then there exists an absolute constant $c>0$ such that the stopped process $(Y_{t \wedge \tau_U})_{t \geq 0}$, \begin{equation*} \tau_U := \inf\{t \geq 0; Y_t \notin U\}, \end{equation*} satisfies \begin{align} \mbb{E}^x(|Y_{t \wedge \tau_U}-x|^{\alpha} \wedge 1) \leq c t \sup_{z \in U} \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^{\alpha}\} \, \nu(z,dy) \right) \label{feller-eq28} \end{align} for all $x \in U$, $t \geq 0$. \end{lem} Note that \eqref{feller-eq28} implies, by Jensen's inequality, that the moment estimate \begin{equation} \mbb{E}^x(|Y_{t \wedge \tau_U}-x|^{\beta} \wedge 1) \leq c' t^{\beta/\alpha} \sup_{z \in U} \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^{\alpha}\} \, \nu(z,dy) \right)^{\beta/\alpha} \end{equation} holds for any $\beta \in [0,\alpha]$, $x \in U$ and $t \geq 0$. If $(Y_t)_{t \geq 0}$ has a compensated drift, in the sense that $b(z) = \int_{|y|<1} y \, \nu(z,dy)$ for all $z \in U$, then Lemma~\ref{feller-15} holds also for $\alpha \in (0,1]$. Let us mention that estimates for fractional moments of Feller processes were studied in \cite{moments}; it is, however, not immediate how Lemma~\ref{feller-15} can be derived from the results in \cite{moments}. \begin{proof}[Proof of Lemma~\ref{feller-15}] Let $(f_k)_{k \in \mbb{N}} \subseteq \mc{C}_b^{\alpha}(\mbb{R}^d) \cap C_c(\mbb{R}^d)$ be such that $f_k \geq 0$, $f_k(z)=\min\{1,|z|^{\alpha}\}$ for $|z| \leq k$ and $M:=\sup_k \|f_k\|_{\mc{C}_b^{\alpha}}<\infty$. Pick a function $\chi \in C_c^{\infty}(\mbb{R}^d)$, $\chi \geq 0$ such that $\int_{\mbb{R}^d} \chi(x) \, dx=1$ and set $\chi_{\eps}(z) := \eps^{-1} \chi(\eps^{-1}z)$. If we define for fixed $x \in U$ \begin{equation*} f_{k,\eps}(z) := (f_k(\cdot -x) \ast \chi_{\eps})(z) := \int_{\mbb{R}^d} f_k(z-x-y) \chi_{\eps}(y) \, dy, \qquad z \in \mbb{R}^d, \end{equation*} then $f_{k,\eps} \to f_k(\cdot-x)$ uniformly as $\eps \to 0$ and $\|f_{k,\eps}\|_{\mc{C}_b^{\alpha}(\mbb{R}^d)} \leq M$. As $f_{k,\eps} \in C_c^{\infty}(\mbb{R}^d) \subseteq \mc{D}(A)$ an application of Dynkin's formula shows that \begin{equation*} \mbb{E}^x f_{k,\eps}(Y_{t \wedge \tau_U})-f_{k,\eps}(x) = \mbb{E}^x \left( \int_{(0,t \wedge \tau_U)} Af_{k,\eps}(Y_s) \, ds \right) \end{equation*} for all $t \geq 0$. Since $\alpha>1$ there exists an absolute constant $C>0$ such that \begin{equation*} |\nabla f_{k,\eps}(z)| \leq C \|f_{k,\eps}\|_{\mc{C}_b^{\alpha}(\mbb{R}^d)} \leq C M \end{equation*} and \begin{align*} \left| f_{k,\eps}(z+y)-f_{k,\eps}(z)-y \cdot \nabla f_{k,\eps}(z) \I_{(0,1)}(|y|)\right| \leq C \|f_{k,\eps}\|_{\mc{C}_b^{\alpha}(\mbb{R}^d)} \min\{1,|y|^{\alpha}\} \end{align*} for all $z \in \mbb{R}^d$. This implies \begin{align*} |Af_{k,\eps}(z)| &\leq |b(z)| \, |\nabla f_{k,\eps}(z)| + \int_{y \neq 0} \left| f_{k,\eps}(z+y)-f_{k,\eps}(z)-y \cdot \nabla f_{k,\eps}(z) \I_{(0,1)}(|y|) \right| \, \nu(z,dy) \\ &\leq C M \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^{\alpha}\} \, \nu(z,dy) \right) \end{align*} for any $z \in U$. Hence, \begin{equation*} \mbb{E}^x f_{k,\eps}(Y_{t \wedge \tau_U}) \leq f_{k,\eps}(x)+ 2C Mt \sup_{z \in U} \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^{\alpha}\} \, \nu(z,dy) \right) \end{equation*} for $x \in U$. Applying Fatou's lemma twice we conclude that \begin{align*} \mbb{E}^x \min\{1,|Y_{t \wedge \tau_U}-x|^{\alpha}\} &\leq \liminf_{k \to \infty} \liminf_{\eps \to 0} \mbb{E}^x f_{k,\eps}(Y_{t \wedge \tau_U}) \\ &\leq 2C Mt \sup_{z \in U} \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^{\alpha}\} \, \nu(z,dy) \right). \qedhere \end{align*} \end{proof} We are now ready to prove Theorem~\ref{feller-9}. \begin{proof}[Proof of Theorem~\ref{feller-9}] Since $x \in \mbb{R}^d$ is fixed throughout this proof, we will omit the superscript $x$ in the notation which we used in the statement of Theorem~\ref{feller-9}, e.g.\, we will write $(Y_t)_{t \geq 0}$ instead of $(Y_t^{(x)})_{t \geq 0}$, $L$ instead of $L^{(x)}$ etc. \par Denote by $(L_e,\mc{D}(L_e))$ the extended generator of $(Y_t)_{t \geq 0}$, and fix a truncation function $\chi \in C_c^{\infty}(\mbb{R}^d)$ such that $\I_{\overline{B(x,\delta)}} \leq \chi \leq \I_{\overline{B(x,2\delta)}}$ and $\|\chi\|_{C_b^2(\mbb{R}^d)} \leq 10 \delta^{-2}$. To prove the assertion it suffices by \eqref{C4} and Proposition~\ref{feller-7} to show that $v:=f \cdot \chi \in \mc{D}(L_e)$ and \begin{equation} \|L_e v\|_{\infty} \leq C \left(\|A_e f\|_{\infty}+\|f\|_{\infty}+\|f\|_{\mc{C}_b^{\varrho(x)}(\overline{B(x,4\delta)})}\right) \label{feller-eq30} \end{equation} for a suitable constant $C>0$. The first -- and main-- step is to estimate \begin{equation} \sup_{t \in (0,1)} \frac{1}{t} \sup_{z \in \mbb{R}^d} |\mbb{E}^z v(Y_{t \wedge \tau_{\delta}^z})-v(z)| \label{feller-eq31} \end{equation} for the stopping time \begin{equation*} \tau_{\delta}^z := \inf\{t>0; |Y_t-z|> \delta\}. \end{equation*} We consider separately the cases $z \in B(x,3\delta)$ and $z \in \mbb{R}^d \backslash B(x,3\delta)$. For $z \in \mbb{R}^d \backslash B(x,3\delta)$ it follows from $\spt \chi \subseteq \overline{B(x,2\delta)}$ that $v=0$ on $\overline{B(z,\delta)}$, and so \begin{equation*} v(Y_{t \wedge \tau_{\delta}^z}(\omega))-v(z)=0 \fa \omega \in \{\tau_{\delta}^z > t\}. \end{equation*} Hence, \begin{equation*} |\mbb{E}^z v(Y_{t \wedge \tau_{\delta}^z})-v(z)| \leq 2\|v\|_{\infty} \mbb{P}^z(\tau_{\delta}^z \leq t). \end{equation*} Applying the maximal inequality \eqref{max} for Feller processes we find that there exists an absolute constant $c_1>0$ such that \begin{align*} |\mbb{E}^z v(Y_{t \wedge \tau_{\delta}^z})-v(z)| &\leq c_1 t \|f\|_{\infty} \sup_{y \in \mbb{R}^d} \sup_{|\xi| \leq \delta^{-1}} |p(y,\xi)| \end{align*} for all $z \in \mbb{R}^d \backslash B(x,3\delta)$; the right-hand side is finite since $p$ has, by assumption, bounded coefficients. \par For $z \in B(x,3\delta)$ we write \begin{equation*} |\mbb{E}^z v(Y_{t \wedge \tau_{\delta}^z})-v(z)| \leq I_1+I_2+I_3 \end{equation*} for \begin{align*} I_1 &:= |\chi(z) \mbb{E}^z(f(Y_{t \wedge \tau_{\delta}^z})-f(z))| \\ I_2 &:= |f(z) \mbb{E}^z(\chi(Y_{t \wedge \tau_{\delta}^z})-\chi(z))| \\ I_3 &:= \left| \mbb{E}^z \left[ \big( f(Y_{t \wedge \tau_{\delta}^z})-f(z) \big) \big( \chi(Y_{t \wedge \tau_{\delta}^z})-\chi(z) \big) \right] \right|. \end{align*} We estimate the terms separately. By \eqref{feller-eq21} and \eqref{C2}, it follows from Lemma~\ref{feller-13} that\begin{equation*} \mbb{E}^z f(X_{t \wedge \tau_{\delta}^z(X)}) = \mbb{E}^z f(Y_{t \wedge \tau_{\delta}^z}) \fa t \geq 0 \end{equation*} where $\tau_{\delta}^z(X)$ is the exit time of $(X_t)_{t \geq 0}$ from $\overline{B(z,\delta)}$. As $0 \leq \chi \leq 1$ we thus find \begin{align*} I_1 \leq |\mbb{E}^z(f(X_{t \wedge \tau_{\delta}^z(X)})-f(z))| . \end{align*} Since $f \in F_1^X$ an application of Dynkin's formula \eqref{gen-eq6} shows that \begin{equation*} I_1 \leq \|A_e f\|_{\infty} \mbb{E}^z(t \wedge \tau_{\delta}^z(X)) \leq \|A_e f\|_{\infty} t. \end{equation*} We turn to $I_2$. As $\chi \in C_c^{\infty}(\mbb{R}^d) \subseteq \mc{D}(L)$ we find from the (classical) Dynkin formula that \begin{align*} |I_2| \leq \|f\|_{\infty} |\mbb{E}^z(\chi(Y_{t \wedge \tau_{\delta}^z})-\chi(z))| &= \|f\|_{\infty} \left| \mbb{E}^z \left( \int_{(0,t \wedge \tau_{\delta}^z)} L\chi(Y_s) \, ds \right) \right| \leq t \|f\|_{\infty} \sup_{|z-x| \leq 4 \delta} |L\chi(z)| \end{align*} A straight-forward application of Taylor's formula shows that \begin{equation*} |L\chi(z)| \leq 2 \|\chi\|_{C_b^2(\mbb{R}^d)} \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^2\} \, \nu(z,dy) \right). \end{equation*} Since $0 \leq \varrho(x) \leq 1$ and $\chi$ is chosen such that $\|\chi\|_{C_b^2(\mbb{R}^d)} \leq 10 \delta^{-2}$ we thus get \begin{equation*} I_2 \leq 20 \delta^{-2} t \|f\|_{\infty} \sup_{|z-x| \leq 4 \delta} \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^{1+\varrho(x)}\} \, \nu(z,dy) \right). \end{equation*} It remains to estimate $I_3$. Because of the assumptions on the H\"{o}lder regularity of $f$ on $\overline{B(x,4\delta)}$, we have \begin{equation*} I_3 \leq 16 \delta^{-2} (\|f\|_{\mc{C}_b^{\varrho(x)}(\overline{B(x,4\delta)})}+\|f\|_{\infty}) \|\chi\|_{C_b^1(\mbb{R}^d)} \mbb{E}^z (|Y_{t \wedge \tau_{\delta}^z}-z|^{1+\varrho(x)} \wedge 1). \end{equation*} It follows from Lemma~\ref{feller-15} that there exists an absolute constant $c_2>0$ such that \begin{align*} I_3 &\leq c_2 \delta^{-4} t (\|f\|_{\mc{C}_b^{\varrho(x)}(\overline{B(x,4\delta)})}+\|f\|_{\infty}) \sup_{|z-x| \leq 4 \delta} \left( |b(z)|+ \int_{y \neq 0} \min\{|y|^{\varrho(x)+1},1\} \, \nu(z,dy) \right). \end{align*} Combining the estimates and applying Corollary~\ref{gen-5} we find that $v=\chi \cdot f \in \mc{D}(L_e)$ and \begin{align*} \|L_e v\|_{\infty} \leq C' \left(\|A_{\eps} f\|_{\infty} + \|f\|_{\infty} + \|f\|_{\mc{C}_b^{\varrho(x)}(\overline{B(x,4\delta)})} \right) \end{align*} where \begin{align*} C' &:= c_3 \sup_{z \in \mbb{R}^d} \sup_{|\xi| \leq \delta^{-1}} |p(z,\xi)| +c_3 \delta^{-4} \sup_{|z-x| \leq 4 \delta} \left( |b(z)| + \int_{y \neq 0} \min\{|y|^{1+\varrho(x)},1\} \, \nu(z,dy) \right) \end{align*} for some absolute constant $c_3>0$. Since there exists an absolute constant $c_4>0$ such that \begin{equation*} \sup_{z \in \mbb{R}^d} \sup_{|\xi| \leq \delta^{-1}} |p(z,\delta)| \leq c_4 \sup_{z \in \mbb{R}^d} \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^2\} \, \nu(z,dy) \right) \delta^{-2} \end{equation*} for $\delta \in (0,1)$, cf.\ \cite[Lemma 6.2]{schnurr} and \cite[Theorem 2.31]{ltp}, we obtain, in particular, that \begin{align*} \|L_e v\|_{\infty} \leq C'' \left(\|A_{\eps} f\|_{\infty} + \|f\|_{\infty} + \|f\|_{\mc{C}_b^{\varrho(x)}(\overline{B(x,4\delta)})}\right) \end{align*} for \begin{align*} C'' &:= c_5 \delta^{-4} \sup_{z \in \mbb{R}^d} \left( |b(z)| +\int_{y \neq 0} \min\{1,|y|^2\} \, \nu(z,dy) \right) + c_5 \delta^{-4} \sup_{|z-x| \leq 4 \delta} \int_{|y| \leq 1} \min\{|y|^{1+\varrho(x)},1\} \, \nu(z,dy). \end{align*} This finishes the proof of \eqref{feller-eq30}. The continuous dependence of the constant $C>0$ in \eqref{feller-eq23} on the parameters $\beta(x) \in [0,1)$, $M(x) \in [0,\infty)$, $K(x) \in [0,\infty)$ follows from the fact that each of the constants in this proof depends continuously on these parameters, see also Lemma~\ref{feller-3}. \end{proof} The remaining part of this section is devoted to the proof of Theorem~\ref{feller-12}. We need the following auxiliary result. \begin{lem} \label{feller-21} Let $(Y_t)_{t \geq 0}$ be a Feller process with infinitesimal generator $(L,\mc{D}(L))$, symbol $p$ and characteristics $(b(x),Q(x),\nu(x,dy))$. For $x \in \mbb{R}^d$ and $r>0$ denote by \begin{equation*} \tau_r^x = \inf\{t>0; |Y_t-x|>r\} \end{equation*} the exit time from the closed ball $\overline{B(x,r)}$. For any fixed $x \in \mbb{R}^d$ and $r>0$ the family of measures \begin{equation*} \mu_t(x,B) := \frac{1}{t} \mbb{P}^x(Y_{t \wedge \tau_r^x}-x \in B), \qquad t>0,\, B \in \mc{B}(\mbb{R}^d \backslash \{0\}), \end{equation*} converges vaguely to $\nu(x,dy)$, i.\,e.\ \begin{equation*} \lim_{t \to 0} \frac{1}{t} \mbb{E}^x f(Y_{t \wedge \tau_r^x}-x) = \int_{y \neq 0} f(y) \, \nu(x,dy) \fa f \in C_c(\mbb{R}^d \backslash \{0\}). \end{equation*} \end{lem} The main ingredient for the proof of Lemma~\ref{feller-21} is \cite[Theorem 4.2]{ihke} which states that the family of measures $p_t(x,B) :=t^{-1} \mbb{P}^x(Y_t - x \in B)$, $t>0$, converges vaguely to $\nu(x,dy)$ as $t \to 0$. \begin{proof}[Proof of Lemma~\ref{feller-21}] By the Portmanteau theorem, it suffices to show that \begin{equation} \limsup_{t \to 0} \mu_t(x,K) \leq \nu(x,K) \label{proofs-eq21} \end{equation} for any compact set $K \subseteq \mbb{R}^d \backslash \{0\}$. For given $K \subseteq \mbb{R}^d \backslash \{0\}$ compact there exists by Urysohn's lemma a sequence $(\chi_n)_{n \in \mbb{N}} \subseteq C_c^{\infty}(\mbb{R}^d)$ and a constant $\delta>0$ such that $\spt \chi_n \subseteq B(0,\delta)^c$ for all $n \in \mbb{N}$ and $\I_K = \inf_{n \in \mbb{N}} \chi_n$. It follows from \cite[Theorem 4.2]{ihke} that \begin{equation*} \lim_{t \to 0} \frac{\mbb{E}^x \chi_n(Y_t-x)}{t} = \int_{y \neq 0} \chi_n(y) \, \nu(x,dy) \end{equation*} for all $n \in \mathbb{N}$. On the other hand, an application of Dynkin's formula yields that \begin{align*} |\mbb{E}^x \chi_n(Y_{t \wedge \tau_r^x}-x)-\mbb{E}^x \chi_n(Y_t-x)| &\leq \|L\chi_n\|_{\infty} \mbb{E}^x(t-\min\{t,\tau_r^x\}) \leq t \|L\chi_n\|_{\infty} \mbb{P}^x(\tau_r^x \leq t). \end{align*} Since $(Y_t)_{t \geq 0}$ has right-continuous sample paths, we have $\mbb{P}^x(\tau_r^x \leq t) \to 0$ as $t \to 0$, and therefore we obtain that \begin{align*} \lim_{t \to 0} \frac{\mbb{E}^x \chi_n(Y_{t \wedge \tau_r^x}-x)}{t} = \int_{y \neq 0} \chi_n(y) \, \nu(x,dy). \end{align*} Hence, \begin{align*} \limsup_{t \to 0} \mu_t(x,K) \leq \limsup_{t \to 0} \frac{1}{t} \mbb{E}^x \chi_n(Y_{t \wedge \tau_r^x}-x) = \int_{y \neq 0} \chi_n(y) \, \nu(x,dy). \end{align*} As $\I_K = \inf_{n \in \mbb{N}} \chi_n$, the monotone convergence theorem gives \eqref{proofs-eq21}. \end{proof} \begin{proof}[Proof of Theorem~\ref{feller-12}] For fixed $x \in \mbb{R}^d$ let $(Y_t^{(x)})_{t \geq 0}$ be the Feller process from Theorem~\ref{feller-12}. Let $\chi_0 \in C_c^{\infty}(\mbb{R}^d)$ be a truncation function such that $\I_{\overline{B(0,\delta)}} \leq \chi_0 \leq \I_{\overline{B(0,2\delta)}}$, and set $\chi^{(x)}(z) := \chi_0(z-x)$, $z \in \mbb{R}^d$. Since $x \in \mbb{R}^d$ is fixed throughout Step 1-3 of this proof, we will often omit the superscript $x$ in our notation, i.e.\ we will write $(Y_t)_{t \geq 0}$ instead of $(Y_t^{(x)})_{t \geq 0}$, $\chi(z)$ instead of $\chi^{(x)}(z)$, etc. \par \textbf{Step 1:} Show that $v := \chi \cdot f$ is in the domain $\mc{D}(L_e)$ of the extended generator of $(Y_t)_{t \geq 0}$ and determine $L_e(v)$. \par First of all, we note that $(X_t)_{t \geq 0}$, $(Y_t)_{t \geq 0}$ and $f$ satisfy the assumptions of Theorem~\ref{feller-9}. Since we have seen in the proof of Theorem~\ref{feller-9} that $v=\chi \cdot f$ is in the Favard space $F_1^Y$ of order $1$ associated with $(Y_t)_{t \geq 0}$, it follows that $v \in \mc{D}(L_e)$ and $\|L_e(v)\|_{\infty}<\infty$. Applying Corollary~\ref{gen-5} we find that \begin{equation*} L_e v(z) = \lim_{t \to 0} \frac{\mbb{E}^z v(Y_{t \wedge \tau_{\delta}^z})-v(z)}{t} \end{equation*} (up to a set of potential zero) where \begin{equation*} \tau_{\delta}^z := \inf\{t>0; |Y_t-z|>\delta\}. \end{equation*} On the other hand, the proof of Theorem~\ref{feller-9} shows that \begin{align*} \frac{\mbb{E}^z v(Y_{t \wedge \tau_{\delta}^z})-v(z)}{t} = I_1(t)+I_2(t)+I_3(t) \end{align*} where \begin{align*} I_1(t) &:=t^{-1} f(z) (\mbb{E}^z \chi(Y_{t \wedge \tau_{\delta}^z})-\chi(z)) \\ I_2(t) &:= t^{-1} \chi(z) (\mbb{E}^z f(X_{t \wedge \tau_{\delta}^z(X)})-f(z)) \\ I_3(t) &:= t^{-1} \mbb{E}^z \big[ (f(Y_{t \wedge \tau_{\delta}^z})-f(z))( \chi(Y_{t \wedge \tau_{\delta}^z})-\chi(z)) \big]; \end{align*} here $\tau_{\delta}^z(X)$ denotes the exit time of $(X_t)_{t \geq 0}$ from $\overline{B(z,\delta)}$. Since $\chi \in C_c^{\infty}(\mbb{R}^d)$ is in the domain of the (strong) infinitesimal generator $L$ of $(Y_t)_{t \geq 0}$ and $f$ is the Favard space $F_1^X$ associated with $(X_t)_{t \geq 0}$, another application of Corollary~\ref{gen-5} shows that \begin{equation*} \lim_{t \to 0} I_1(t) = f(z) L\chi(z) \quad \text{and} \quad \lim_{t \to 0} I_2(t) = \chi(z) A_e f(z) \end{equation*} for all $z \in \mbb{R}^d$. We claim that \begin{equation} \lim_{t \to 0} I_3(t) = \Gamma(f,\chi)(z) := \int_{y \neq 0} (f(z+y)-f(z))(\chi(z+y)-\chi(z)) \, \nu(z,dy) \label{proofs-eq27} \end{equation} for all $z \in \mbb{R}^d$ where $\nu(z,dy)= \nu^{(x)}(z,dy)$ denotes the family of L\'evy measures associated with $(Y_t)_{t \geq 0} = (Y_t^{(x)})_{t \geq 0}$, cf.\ \eqref{main-eq15}. Once we have shown this, it follows that \begin{equation} L_e v = f L \chi + \chi A_e f + \Gamma(f,\chi). \label{proofs-eq29} \end{equation} To prove \eqref{proofs-eq27} we fix a truncation function $\varphi \in C_c^{\infty}(\mbb{R}^d)$ such that $\I_{B(0,1)} \leq \varphi \leq \I_{B(0,2)}$ and set $\varphi_{\eps}(y) := \varphi(\eps^{-1} y)$ for $\eps>0$, $y \in \mbb{R}^d$. Since $y \mapsto (1-\varphi_{\eps}(y))$ is zero in a neighbourhood of $0$, we find from Lemma~\ref{feller-21} that \begin{align*} &\frac{\mbb{E}^z\big[ (1-\varphi_{\eps}(Y_{t \wedge \tau_{\delta}^z}-z)) (f(Y_{t \wedge \tau_{\delta}^z})-f(z))( \chi(Y_{t \wedge \tau_{\delta}^z})-\chi(z)) \big]}{t} \\ &\xrightarrow[]{t \to 0} \int_{y \neq 0} (1-\varphi_{\eps}(y)) (f(y+z)-f(z)) (\chi(z+y)-\chi(z)) \, \nu(z,dy). \end{align*} If $z \in \mbb{R}^d \backslash B(x,3\delta)$ then $\chi=0$ on $B(z,\delta)$, and therefore the integrand on the right hand side equals zero for $|y|< \delta$. Applying the dominated convergence theorem we thus find that the right-hand side converges to $\Gamma(f,\chi)(z)$, defined in \eqref{proofs-eq27}, as $\eps \to 0$. For $z \in B(x,3\delta)$ we note that $\chi \in C_b^1(\mbb{R}^d)$ and $f \in \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)$ for $\varrho$ satisfying \eqref{main-eq21}; it now follows from \eqref{S1} and the dominated convergence theorem that the right-hand side converges to $\Gamma(f,\chi)(z)$ as $\eps \to 0$. To prove \eqref{proofs-eq27} it remains to show that \begin{equation*} J(\eps,t,z) := \left|\mbb{E}^z\big[ \varphi_{\eps}(Y_{t \wedge \tau_{\delta}^z}-z) (f(Y_{t \wedge \tau_{\delta}^z})-f(z))( \chi(Y_{t \wedge \tau_{\delta}^z})-\chi(z)) \big] \right| \end{equation*} satisfies \begin{equation*} \limsup_{\eps \to 0} \limsup_{t \to 0} \frac{1}{t} J(\eps,t,z)=0 \fa z \in \mbb{R}^d. \end{equation*} By \eqref{main-eq21} and \eqref{S1}, there exists some constant $\gamma>0$ such that \begin{equation} 1+\min\{\varrho(z),1\} \geq \alpha(z)+2 \gamma \fa z \in \overline{B(x,3\delta)}. \label{proofs-eq31} \end{equation} Indeed: On $\{\varrho \geq 1\}$ this inequality holds since $\alpha$ is bounded away from $2$, cf.\ \eqref{S1}, and on $\{\varrho<1\}$ this is a direct consequence of \eqref{main-eq21}. Now fix some $z \in \overline{B(x,3\delta)}$. As $\spt \varphi_{\eps} \subseteq \overline{B(0,2\eps)}$ it follows from $f \in \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)$ and $\chi \in C_b^1(\mbb{R}^d)$ that \begin{align*} J(\eps,t,z) &\leq c_1 \eps^{\gamma} \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \|\chi\|_{C_b^1(\mbb{R}^d)} \mbb{E}^z \min\{|Y_{t \wedge \tau_{\delta}^z}-z|^{\alpha(z)+\gamma},1\} \end{align*} with $\gamma$ from \eqref{proofs-eq31} and some constant $c_1>0$ (not depending on $f$, $x$, $z$). An application of Lemma~\ref{feller-15} now yields \begin{align*} J(\eps,t,z) \leq c_2 \eps^{\gamma} t \sup_{|z-x| \leq 4 \delta} \left( |b(z)| + \int_{y \neq 0} \min\{|y|^{\alpha(z)+\gamma},1\} \nu(z,dy) \right) \end{align*} which is finite because of \eqref{S1} and \eqref{S4}. Hence, \begin{equation*} \limsup_{t \to 0} \limsup_{\eps \to 0} \frac{1}{t} J(\eps,t,z)=0 \fa |z-x| \leq 3 \delta. \end{equation*} If $z \in \mbb{R}^d \backslash B(x,3\delta)$ then it follows from $\chi|_{B(z,\delta)}=0$ and $\spt \varphi \subseteq B(0,2\eps)$ that \begin{equation*} J(\eps,t,z) \leq 4 \eps \|f\|_{\infty} \|\chi\|_{C_b^1(\mbb{R}^d)} \mbb{P}^z(\tau_{\delta}^z \leq t). \end{equation*} Applying the maximal inequality \eqref{max} for Feller processes we conclude that \begin{equation*} \limsup_{\eps \to 0} \limsup_{t \to 0} t^{-1} J(\eps,t,z) = 0 \fa z \in \mbb{R}^d \backslash B(x,3\delta). \end{equation*} \textbf{Step 2:} If $\varrho: \mbb{R}^d \to [0,2]$ is a uniformly continuous function satisfying \eqref{main-eq21} and $\varrho_0 := \inf_z \varrho(z)>0$, then \begin{equation*} f \in F_1^X \cap \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d), A_e f = g \in \mc{C}_b^{\lambda}(\mbb{R}^d) \implies \forall \eps>0: \, \, L_e(f \chi) \in \mc{C}_b^{(\varrho_0 \wedge \lambda \wedge \theta \wedge \sigma)-\eps}(\mbb{R}^d) \end{equation*} for any $\lambda \in [0,\Lambda]$ where $\chi=\chi^{(x)}$ is the truncation function chosen at the beginning of the proof; see \eqref{S2}, \eqref{S3} and \eqref{main-eq21} for the definition of $\theta$, $\Lambda$ and $\sigma$. \par \emph{Indeed:} We know from Step 1 that \begin{equation*} L_e (f \chi) = f L \chi + \chi A_e f + \Gamma(f,\chi) =: I_1+I_2+I_3. \end{equation*} As $\theta \leq 1$ we have $\varrho_0 \wedge \lambda \wedge \theta \wedge \sigma \leq 1$, and therefore it suffices to estimate \begin{equation*} \sup_{z \in \mbb{R}^d} |I_k(z)| + \sup_{z,h \in \mbb{R}^d} |I_k(z+h)-I_k(z)| \end{equation*} for $k=1,2,3$. \par \textbf{Estimate of $I_1=f L \chi$:} First we estimate the H\"{o}lder norm of $L\chi$. As $\chi \in C_c^{\infty}(\mbb{R}^d)$ a straight-forward application of Taylor's formula shows that \begin{equation*} \|L \chi\|_{\infty} \leq 2 \|\chi\|_{C_b^2(\mbb{R}^d)} \sup_{z \in \mbb{R}^d} \left( |b(z)| + \int_{y \neq 0} \min\{1,|y|^2\} \, \nu(z,dy) \right). \end{equation*} If we set $D_y \chi(z) := \chi(z+y)-\chi(z)-\chi'(z) y \I_{(0,1)}(|y|)$, then \begin{align*} |L\chi(z)-L \chi(z+h)| &\leq |b(z)| \, |\nabla \chi(z+h)-\nabla \chi(z)| + |b(z+h)-b(z)| \, |\nabla \chi(z+h)| \\ &+ \int_{y \neq 0} |D_y \chi(z+h)-D_y \chi(z)| \, \nu(z,dy) + \left| \int_{y \neq 0} D_y \chi(z+h) \, (\nu(z+h,dy)-\nu(z,dy)) \right|. \end{align*} for all $z,h \in \mbb{R}^d$. To estimate the first two terms on the right-hand side we use the H\"{o}lder continuity of $b$, cf.\ \eqref{S2}, and the fact that $\chi \in C_b^2(\mbb{R}^d)$. For the third term we use \begin{equation*} |D_y \chi(z+h)-D_y \chi(z)| \leq \|\chi\|_{C_b^3(\mbb{R}^d)} |h| \min\{|y|^2,1\}, \end{equation*} cf.\ \cite[Theorem 5.1]{bass08} for details, and noting that \begin{equation*} |D_y \chi(z+h)| \leq 2 \|\chi\|_{C_b^2(\mbb{R}^d)} \min\{1,|y|^2\} \end{equation*} we can estimate the fourth term for small $h$ by applying \eqref{S2}. Hence, \begin{equation*} |L\chi(z)-L \chi(z+h)| \leq |h| \|\chi\|_{C_b^3(\mbb{R}^d)} \left(|b(z)|+ \int_{y \neq 0} \min\{1,|y|^2\} \, \nu(z,dy)\right) + 2C |h|^{\theta} \|\chi\|_{C_b^2(\mbb{R}^d)} \end{equation*} for small $h>0$. Hence, \begin{equation*} \|L \chi\|_{\mc{C}_b^{\theta}(\mbb{R}^d)} \leq c_1 \|\chi\|_{C_b^3(\mbb{R}^d)} \sup_{z \in \mbb{R}^d} \left(1+ |b(z)| + \int_{y \neq 0} \min\{1,|y|^2\} \, \nu(z,dy) \right) \end{equation*} for some absolute constant $c_1>0$. Since $f \in \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d) \subseteq \mc{C}_b^{\varrho_0}(\mbb{R}^d)$, this entails that \begin{equation*} \|f L \chi\|_{\mc{C}_b^{\theta \wedge \varrho_0}(\mbb{R}^d)} \leq c_1' \|f\|_{\mc{C}_b^{\varrho_0}(\mbb{R}^d)} \|\chi\|_{C_b^3(\mbb{R}^d)} \sup_{z \in \mbb{R}^d} \left(1+ |b(z)| + \int_{y \neq 0} \min\{1,|y|^2\} \, \nu(z,dy) \right). \end{equation*} \textbf{Estimate of $I_2=\chi A_e f$:} By assumption, $A_e f = g \in \mc{C}_b^{\lambda}(\mbb{R}^d)$ and $\chi \in C_c^{\infty}(\mbb{R}^d)$. Thus, \begin{equation*} \|\chi A_e f\|_{\mc{C}_b^{\lambda}} \leq 2 \|\chi\|_{C_b^{\lambda}} \|A_e f\|_{\mc{C}_b^{\lambda}} < \infty. \end{equation*} \textbf{Estimate of $I_3 = \Gamma(f,\chi)$:} As $f \in C_b^{\varrho(\cdot)}(\mbb{R}^d)$ and $\chi \in C_b^1(\mbb{R}^d)$, it follows from the definition of $\Gamma(f,\chi)$, cf.\ \eqref{proofs-eq27}, that \begin{equation*} |\Gamma(f,\chi)(z)| \leq 4\|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \|\chi\|_{C_b^1(\mbb{R}^d)} \int_{y \neq 0} \min\{|y|^{1+\min\{1,\varrho(z)\}} \wedge 1,1\} \, \nu(z,dy)<\infty \end{equation*} for all $|z-x| \leq 3\delta$. If $z \in \mbb{R}^d \backslash B(x,3\delta)$, then $\Delta_y \chi(z)=0$ for all $|y| \leq \delta$, and so \begin{equation*} |\Gamma(f,\chi)(z)| \leq 4 \|f\|_{\infty} \int_{|y|>\delta/2} \, \nu(z,dy) \end{equation*} for all $z \in \mbb{R}^d \backslash B(x,3\delta)$. Combining both estimates and using \eqref{main-eq21}, \eqref{S1} and \eqref{S4}, we get \begin{equation*} \|\Gamma(f,\chi)\|_{\infty} \leq c_2 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \end{equation*} for some constant $c_2>0$ not depending on $x$, $z$ and $f$. To study the regularity of $\Gamma(f,\chi)$ we consider separately the cases $\|\varrho\|_{\infty} \leq 1$ and $\|\varrho\|_{\infty}>1$. We start with the case $\|\varrho\|_{\infty} \leq 1$, see the end of this step for the other case. To estimate $\Delta_h \Gamma(f,\chi)$ we note that \begin{equation} |\Delta_h \Gamma(f,\chi)(z)| = |\Gamma(f,\chi)(z+h)-\Gamma(f,\chi)(z)| \leq J_1+J_2+J_3 \label{proofs-eq39} \end{equation} where \begin{align*} J_1(z) &:= \int_{y \neq 0} |\Delta_y f(z+h) - \Delta_y f(z)| \, |\Delta_y \chi(z+h)| \, \nu(z,dy) \\ J_2(z) &:= \int_{y \neq 0} |\Delta_y f(z)| \, |\Delta_y \chi(z+h)-\Delta_y \chi(z)| \, \nu(z,dy) \\ J_3(z) &:= \left| \int_{y \neq 0} \Delta_y f(z+h) \Delta_y \chi(z+h) (\nu(z,dy)-\nu(z+h,dy)) \right|. \end{align*} We estimate the terms separately and start with $J_1$. Fix $\eps \in (0,\min\{\varrho_0,\sigma\}/2)$, cf.\ \eqref{main-eq21} for the definition of $\sigma$. Since $\varrho$ is uniformly continuous there exists $r \in (0,1)$ such that \begin{equation*} |\varrho(z)-\varrho(z+h)| \leq \eps \fa z \in \mbb{R}^d, \,|h| \leq r. \end{equation*} For $|h| \leq r$ and $|y| \leq r$ it then follows from $f \in \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)$ that \begin{align*} |\Delta_y f(z+h)-\Delta_y f(z)| &\leq 2 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \min\{|y|^{\varrho(z) \wedge \varrho(z+h)},|h|^{\varrho(y+z) \wedge \varrho(z)}\} \\ &\leq 2 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \min\{|y|^{\varrho(z) -\eps},|h|^{\varrho(z)-\eps}\}. \end{align*} (Here we use $\|\varrho\|_{\infty} \leq 1$; otherwise we would need to replace $\varrho(z)$ by $\varrho(z) \wedge 1$ etc.) On the other hand, we also have \begin{equation} |\Delta_y f(z+h)-\Delta_y f(z)| \leq 2 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} |h|^{\varrho_0} \label{proofs-eq41} \end{equation} for all $y \in \mbb{R}^d$. Combining both estimates yields \begin{align*} J_1(z) \leq 2 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \|\chi\|_{C_b^1(\mbb{R}^d)} \left( \int_{|y| \leq r} \min\{|y|^{\varrho(z)- \eps},|h|^{\varrho(z)-\eps}\} |y| \, \nu(z,dy) +|h|^{\varrho_0} \int_{|y|>r} \, \nu(z,dy) \right) \end{align*} for $|h| \leq r$. It is now not difficult to see from \eqref{S1} and \eqref{S4} that there exists a constant $c_3>0$ (not depending on $x$, $z$, $f$) such that \begin{equation*} J_1(z) \leq c_3 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} (|h|^{\varrho_0} + |h|^{\varrho(z)+1-\alpha(z)-\eps}) \fa |h| \leq r, z \in B(x,3\delta). \end{equation*} By the very definition of $\sigma$, cf.\ \eqref{main-eq21}, this implies that \begin{equation*} \sup_{z \in B(x,3\delta)} J_1(z) \leq c_3 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} |h|^{\min\{\varrho_0,\sigma\}-\eps} \fa |h| \leq r. \end{equation*} If $z \in \mbb{R}^d \backslash B(x,3\delta)$ then $\Delta_y \chi(z+h)=0$ for $|h| \leq \delta/2$ and $|y| \leq \delta/2$. Using \eqref{proofs-eq41} we get \begin{align*} J_1(z) \leq 2 |h|^{\varrho_0} \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \int_{|y| \geq \delta/2} \, \nu(z,dy) \fa |h| \leq \delta/2. \end{align*} Invoking once more \eqref{S1} and \eqref{S4} we obtain that \begin{equation*} \sup_{z \in \mbb{R}^d \backslash B(x,3\delta)} J_1(z) \leq c_4 |h|^{\varrho_0}\|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}, \qquad |h| \leq \delta/2, \end{equation*} for some constant $c_4$ not depending on $x$, $z$ and $f$. In summary, we have shown that \begin{equation*} \sup_{z \in \mbb{R}^d} J_1(z) \leq c_5 |h|^{\min\{\varrho_0, \sigma\}-\eps}\|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}. \end{equation*} To estimate $J_2$ we consider again separately the cases $z \in B(x,3\delta)$ and $z \in \mbb{R}^d \backslash B(x,3\delta)$. If $z \in \mbb{R}^d \backslash B(x,3\delta)$ then $\Delta_y \chi(z+h) = 0 = \Delta_y \chi(z)$ for all $|y| \leq \delta/2$ and $|h| \leq \delta/2$. Since we also have \begin{equation} |\Delta_y \chi(z+h)-\Delta_y \chi(z)| \leq 2 \|\chi\|_{C_b^2(\mbb{R}^d)} \min\{|y|,|h|\} \label{proofs-eq43} \end{equation} we find that \begin{equation*} J_2(z) \leq 4 \|f\|_{\infty} \|\chi\|_{C_b^2(\mbb{R}^d)} |h| \int_{|y| \geq \delta/2} \, \nu(z,dy) \end{equation*} for $|h| \leq \delta/2$. Because of \eqref{S1} and \eqref{S4} this gives the existence of a constant $c_6>0$ (not depending on $f$, $x$ and $z$) such that \begin{equation*} \sup_{z \in \mbb{R}^d \backslash B(x,3\delta)} J_2(z) \leq c_6 \|f\|_{\infty} |h|. \end{equation*} For $z \in B(x,3\delta)$ we combine \begin{equation*} |\Delta_y f(z)| \leq 2\|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \min\{|y|^{\varrho(z)},1\} \end{equation*} with \eqref{proofs-eq43} to get \begin{equation*} J_2(z) \leq 4 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \|\chi\|_{C_b^2(\mbb{R}^d)} \int_{y \neq 0} \min\{|y|^{\varrho(z)},1\} \min\{|y|,|h|\} \, \nu(z,dy) \end{equation*} which implies, by \eqref{S1}, \eqref{S4} and \eqref{main-eq21}, that \begin{equation*} \sup_{z \in B(x,3\delta)} J_2 \leq c_7 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} |h|^{\sigma \wedge 1}. \end{equation*} We conclude that \begin{equation*} \sup_{z \in \mbb{R}^d} J_2(z) \leq c_8 |h|^{\sigma \wedge 1} \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}. \end{equation*} It remains to estimate $J_3$. By the uniform continuity of $\varrho$ there exists $r \in(0,1)$ such that $|\Delta_h \varrho(z)| \leq \sigma/2$ for all $|h| \leq r$. Since $f \in \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)$ we have \begin{align*} |\Delta_y f(z+h) \Delta_y \chi(z+h)| &\leq 4\|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \|\chi\|_{C_b^1(\mbb{R}^d)} \min\{|y|^{\varrho(z+h)+1},1\} \end{align*} and thus, by \eqref{main-eq21} and our choice of $r \in (0,1)$, \begin{align*} |\Delta_y f(z+h) \Delta_y \chi(z+h)| &\leq 4\|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \|\chi\|_{C_b^1(\mbb{R}^d)} \min\{|y|^{\varrho(z)+1-\sigma/2},1\} \\ &\leq 4\|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \|\chi\|_{C_b^1(\mbb{R}^d)} \min\{|y|^{\sigma/2+\alpha(z)},1\} \end{align*} for all $|z-x| \leq 3\delta$ and $|h| \leq r$. On the other hand, if $z \in \mbb{R}^d \backslash B(x,3\delta)$, then $\chi=0$ on $\overline{B(z,\delta)}$ and so \begin{equation*} |\Delta_y f(z+h) \Delta_y \chi(z+h)| = 0 \fa |h| \leq \delta/2, \,|y| \leq \delta/2. \end{equation*} Consequently, there exists a constant $c_9 = c_9(\delta,r)>0$ such that \begin{equation*} |\Delta_y f(z+h) \Delta_y \chi(z+h)| \leq c_9 \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \|\chi\|_{C_b^1(\mbb{R}^d)} \min\{|y|^{\sigma+\alpha(z)},1\} \end{equation*} for all $z \in \mbb{R}^d$, $y \in \mbb{R}^d$ and $|h| \leq \min\{r,\delta\}/2$. Applying \eqref{S2} we thus find \begin{equation*} \sup_{z \in \mbb{R}^d} J_3(z) \leq c_{10} |h|^{\theta} \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} . \end{equation*} Combining the above estimates we conclude that \begin{equation*} \|\Gamma(f,\chi)\|_{\mc{C}_b^{\varrho_0 \wedge \theta \wedge \sigma - \eps}(\mbb{R}^d)} \leq c_{11} \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \end{equation*} provided that $\|\varrho\|_{\infty} \leq 1$. In the other case, i.\,e.\ if $\varrho$ takes values strictly larger than one, then we need to consider second differences $\Delta_h^2 \Gamma(f,\chi)(z)$ in order to capture the full information on the regularity of $f$. The calculations are very similar to the above ones but quite lengthy (it is necessary to consider nine terms separately) and therefore we do not present the details here. \par \textbf{Conclusion of Step 2:} For any small $\eps>0$ there exists a finite constant $K_{1,\eps}>0$ such that \begin{equation} \|L_e (f \chi)\|_{\mc{C}_b^{\min\{\varrho_0,\lambda,\theta,\sigma\}-\eps}(\mbb{R}^d)} \leq K_{1,\eps} \left( \|A_e f\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \right). \label{proofs-eq59} \end{equation} The constant $K_{1,\eps}$ does not depend on $x$, $z$ and $f$. \par \textbf{Step 3:} If $u \in \mc{D}(L_e)$ is such that $u \in \mc{C}_b^{\lambda}(\mbb{R}^d)$ and $L_e u \in \mc{C}_b^{\lambda}(\mbb{R}^d)$ for some $\lambda \leq \Lambda$ (cf.\ \eqref{S3}), then \begin{equation*} \|u\|_{\mc{C}_b^{\kappa(x)+\lambda}(\mbb{R}^d)} \leq K_2 (\|u\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|L_e u\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)}) \end{equation*} for some constant $K_2>0$ which does not depend on $x$, $z$ and $f$. (Recall that $L_{e}=L_e^{(x)}$ is the extended generator of the Feller process $(Y_t)_{t \geq 0} = (Y_t^{(x)})_{t \geq 0}$; this explains the $x$-dependence of the regularity on the left-hand side of the inequality.) \par \emph{Indeed:} The $\mu$-potential operators $(R_{\mu})_{\mu>0}$ associated with $(Y_t)_{t \geq 0} = (Y_t^{(x)})_{t \geq 0}$ satisfies \begin{equation} \|R_{\mu} v\|_{\mc{C}_b^{\kappa(x)+\lambda}(\mbb{R}^d)} \leq K \|v\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)}, \qquad v \in \mc{C}_b^{\lambda}(\mbb{R}^d), \,\lambda \leq \Lambda \label{proofs-eq61} \end{equation} for $\mu$ sufficiently large and some constant $K=K(\mu)>0$. This is a direct consequence of \eqref{S3} and Lemma~\ref{feller-3}. Now if $u \in \mc{D}(L_e)$ is such that $u \in \mc{C}_b^{\lambda}(\mbb{R}^d)$ and $L_e u \in \mc{C}_b^{\lambda}(\mbb{R}^d)$, then we have $u = R_{\mu}v$ for $v:=\mu u- L_e u \in \mc{C}_b^{\lambda}(\mbb{R}^d)$. Applying \eqref{proofs-eq61} proves the desired estimate. \par \textbf{Conclusion of the proof:} Let $f \in \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d) \cap F_1^X$ for $\varrho$ satisfying \eqref{main-eq21} be such that $A_e f \in \mc{C}_b^{\lambda}(\mbb{R}^d)$ for some $\lambda \leq \Lambda$. Without loss of generality we may assume that $\varrho_0 := \inf_x \varrho(x)>0$. \emph{Indeed}: It follows from Corollary~\ref{feller-11} that $f \in \mc{C}_b^{\kappa(\cdot)-\eps}(\mbb{R}^d)$ for $\eps := \kappa_0/2 := \inf_x \kappa(x)/2>0$, and therefore we may replace $\varrho$ by $\tilde{\varrho}(z) := \max\{\varrho(z),\kappa(z)-\eps\}$ which is clearly bounded away from zero and satisfies the assumptions of Theorem~\ref{feller-12}. \par For fixed $x \in \mbb{R}^d$ denote by $\chi= \chi^{(x)}$ the truncation function chosen at the beginning of the proof, and fix $\eps \in (0,\min\{\varrho_0,\kappa_0\}/2)$. It follows from Step 2 and Step 3 that there exists a constant $c_1>0$ such that \begin{equation*} \|f \chi^{(x)}\|_{\mc{C}_b^{\kappa(x)+\min\{\varrho_0,\sigma,\theta,\lambda\}-\eps}(\mbb{R}^d)} \leq c_1 \left(\|A_e f\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \right) \end{equation*} for all $x \in \mbb{R}^d$. As $\chi^{(x)}=1$ on $B(x,\delta)$ we obtain that \begin{equation*} \|f\|_{\mc{C}_b^{\kappa(\cdot)+\min\{\varrho_0,\sigma,\theta,\lambda\}-\eps}(\mbb{R}^d)} \leq c_1' \left(\|A_e f\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}\right). \end{equation*} Since, by assumption, $f \in \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)$, this implies $f \in \mc{C}_b^{\varrho^1(\cdot)}(\mbb{R}^d)$ for \begin{equation*} \varrho^1(x) := \max\{\varrho(x),\kappa(x)-\eps+\min\{\varrho_0,\sigma,\theta,\lambda\}\}, \qquad x \in \mbb{R}^d, \end{equation*} and we have \begin{equation*} \|f\|_{\mc{C}_b^{\varrho^{1}(\cdot)}(\mbb{R}^d)} \leq (c_1'+1) \left(\|A_e f\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}\right). \end{equation*} As $\varrho^{1}$ satisfies \eqref{main-eq21} (with $\varrho$ replaced by $\varrho^{1}$) we may apply Step 2 with $\varrho$ replaced by $\varrho^{1}$ to obtain that \begin{equation*} \|f \chi^{(x)}\|_{\mc{C}_b^{\kappa(x)+\min\{\varrho_0^1,\sigma,\theta,\lambda\}-\eps}(\mbb{R}^d)} \leq c_2 \left(\|A_e f\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}\right) \end{equation*} where $\varrho_0^1 := \inf_{x \in \mbb{R}^d} \varrho^1(x)$. Repeating the argumentation from above, i.\,e.\ using that $\chi^{(x)}=1$ on $B(x,\delta)$, we obtain $f \in \mc{C}_b^{\varrho^2(\cdot)}(\mbb{R}^d)$ for $\varrho^2(x) := \max\{\varrho(x),\kappa(x)-\eps+\min\{\varrho_0^1,\sigma,\theta,\lambda\}\}$ and \begin{equation*} \|f\|_{\mc{C}_b^{\varrho^2(\cdot)}(\mbb{R}^d)} \leq c_2' \left(\|A_e f\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}\right). \end{equation*} We proceed by iteration, i.\,e.\ we define $\varrho^n(x) := \max\{\varrho(x),\kappa(x)-\eps+\min\{\varrho_0^{n-1},\sigma,\theta,\lambda\}\}$, $n \geq 2$, where $\varrho_0^{n-1} := \inf_x \varrho^{n-1}(x)$. By Step 2 and 3, we then have \begin{equation} \|f\|_{\mc{C}_b^{\varrho^n(\cdot)}(\mbb{R}^d)} \leq c_n \left(\|A_e f\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}\right) \label{proofs-eq63} \end{equation} for some constant $c_n>0$. Since $\kappa_0 = \inf_x \kappa(x)>0$ and $\eps<\kappa_0/2$ it is not difficult to see that we can choose $n \in \mathbb{N}$ sufficiently large such that $\varrho_0^n \geq \min\{\sigma,\theta,\lambda\}$ and so \begin{equation*} \varrho^{n+1}(x) \geq \kappa(x)-\eps + \min\{\sigma,\theta,\lambda\}. \end{equation*} Using \eqref{proofs-eq63} (with $n$ replaced by $n+1$) we conclude that \begin{equation*} \|f\|_{\mc{C}_b^{\kappa(\cdot)+\min\{\sigma,\theta,\lambda\}-\eps}(\mbb{R}^d)} \leq c_{n+1} \left(\|A_e f\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}\right) \end{equation*} which proves the assertion. \end{proof} \section{Proof of Schauder estimates for isotropic stable-like processes} \label{iso} In this section we present the proof of the Schauder estimates for isotropic stable-like processes which we stated in Theorem~\ref{ex-21} and Corollary~\ref{ex-23}. Throughout this section, $(X_t)_{t \geq 0}$ is an isotropic stable-like process, i.\,e.\ a Feller process with symbol of the form $q(x,\xi) = |\xi|^{\alpha(x)}$, $x,\xi \in \mbb{R}^d$, for a mapping $\alpha: \mbb{R}^d \to (0,2]$. We remind the reader that such a Feller process exists if $\alpha$ is H\"{o}lder continuous and bounded away from zero. \par We will apply the results from Section~\ref{main} to establish the Schauder estimates. To this end, we need regularity estimates for the semigroup $(P_t)_{t \geq 0}$ associated with $(X_t)_{t \geq 0}$. The results, which we obtain, are of independent interest and we present them in Subsection~\ref{iso-reg} below. Once we have established another auxiliary statement in Subsection~\ref{iso-aux}, we will present the proof of Theorem~\ref{ex-21} and Corollary~\ref{ex-23} in Subsection~\ref{iso-proofs}. \subsection{Regularity estimates for the semigroup of stable-like processes} \label{iso-reg} Let $(P_t)_{t \geq 0}$ be the semigroup of an isotropic stable-like process $(X_t)_{t \geq 0}$ with symbol $q(x,\xi) = |\xi|^{\alpha(x)}$. In this subsection we study the regularity of the mapping $x \mapsto P_t u(x)$. We will see that there are several parameters which influence the regularity of $P_t u$: \begin{itemize} \item the regularity of $x \mapsto u(x)$, \item the regularity of $x \mapsto \alpha(x)$, \item $\alpha_L := \inf_{x \in \mbb{R}^d} \alpha(x)$; \end{itemize} the larger these quantities are, the higher the regularity of $P_t u$. The regularity estimates, which we present, rely on the parametrix construction of (the transition density of) $(X_t)_{t \geq 0}$ in \cite{matters}. Let us mention that there are other approaches to obtain regularity estimates for the semigroup. Using coupling methods, Luo \& Wang \cite{wang14} showed that for any $\kappa \in (0,\alpha_L)$ there exists $c>0$ such that \begin{equation*} \|P_t u\|_{\mc{C}_b^{\kappa \wedge 1}(\mbb{R}^d)} \leq c \|u\|_{\infty} t^{-(\kappa \wedge 1)/\alpha_L} \fa u \in \mc{B}_b(\mbb{R}^d), \, t \in (0,T]. \end{equation*} For $\alpha_L>1$ this estimate is not good enough for our purpose, we need a higher regularity of $P_t u$. \begin{prop} \label{app-1} Let $(X_t)_{t \geq 0}$ be a Feller process with symbol $q(x,\xi) = |\xi|^{\alpha(x)}$, $x,\xi \in \mbb{R}^d$, for a mapping $\alpha: \mbb{R}^d \to (0,2)$ which is bounded away from zero, i.e.\ $\alpha_L := \inf_{x \in \mbb{R}^d} \alpha(x)>0$, and $\gamma$-H\"{o}lder continuous for $\gamma \in (0,1)$. For any $T>0$ and $\kappa \in (0,\alpha_L)$ there exists a constant $C>0$ such that the semigroup $(P_t)_{t \geq 0}$ satisfies \begin{equation} \|P_t u\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq C \|u\|_{\infty} t^{-\kappa/\alpha_L} \fa u \in \mc{B}_b(\mbb{R}^d), \, t \in (0,T]. \label{app-eq1} \end{equation} In particular, $(P_t)_{t \geq 0}$ has the strong Feller property. The constant $C>0$ depends continuously on $\alpha_L \in (0,2)$, $\alpha_L-\kappa \in (0,\alpha_L)$, $\|\alpha\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)} \in [0,\infty)$ and $T \in [0,\infty)$. \end{prop} For the proof of Proposition~\ref{app-1} we use a representation for the transition density $p$ which was obtained in \cite{matters} using a parametrix construction, see also \cite{parametrix}. For $\varrho \in (0,2)$ denote by $p^{\varrho}(t,x)$ the transition density of an isotropic $\varrho$-stable L\'evy process and set \begin{equation*} p_0(t,x,y) := p^{\alpha(y)}(t,x-y), \qquad t>0, \,x,y \in \mbb{R}^d. \end{equation*} The transition density $p$ of $(X_t)_{t \geq 0}$ has the representation \begin{equation} p(t,x,y) = p_0(t,x,y)+ (p_0 \circledast \Phi)(t,x,y), \qquad t>0,\,x,y \in \mbb{R}^d \label{app-eq3} \end{equation} where $\circledast$ is the time-space convolution and $\Phi$ is a suitable function satisfying \begin{equation} \sup_{x \in \mbb{R}^d} \int_{\mbb{R}^d} |\Phi(t,x,y)| \, dy \leq C_1 t^{-1+\lambda}, \qquad t \in (0,T) \label{app-eq5}, \end{equation} for some constant $\lambda>0$ and $C_1=C_1(T)>0$. For further details we refer the reader to Appendix~\ref{pix} where we collect the material from \cite{matters} which we need in this article. \begin{proof}[Proof of Proposition~\ref{app-1}] Fix $T>0$, $u \in \mc{B}_b(\mbb{R}^d)$ and $\kappa \in (0,\alpha_L)$. Since $\|P_t u\|_{\infty} \leq \|u\|_{\infty}$ it suffices to show that the iterated differences of order $2$, cf.\ \eqref{def-eq3}, satisfy \begin{equation*} \sup_{x \in \mbb{R}^d} |\Delta_h^2 P_t u(x)| \leq C t^{-\kappa/\alpha_L} \|u\|_{\infty} \fa t \in (0,T],\, |h| \leq 1. \end{equation*} Because of the representation \eqref{app-eq3} we have \begin{align*} |\Delta_h^2 P_t u(x)| &\leq |\Delta_h^2 P_t^{(0)} u(x)| + |\Delta_h^2 P_t^{(1)} u(x)| \end{align*} for any $x,h \in \mbb{R}^d$ and $t \in (0,T]$ where \begin{align*} P_t^{(0)} u(z) := \int_{\mbb{R}^d} u(y) p_0(t,z,y) \, dy \quad \text{and} \quad P_t^{(1)} u(z) := \int_{\mbb{R}^d} u(y) (p_0 \circledast \Phi)(t,z,y) \, dy. \end{align*} We estimate the terms separately; we start with $P^{(0)}$. The transition density $p^{\varrho}(t,x)$ of an isotropic $\varrho$-stable L\'evy process is twice differentiable, and by there exists a constant $c_1>0$ such that \begin{equation} |p^{\varrho}(t,x)| \leq c_1 S(x,\varrho,t) \quad |\partial_{x_i} p^{\varrho}(t,x)| \leq c_1 t^{-1/\varrho} S(x,\varrho,t) \quad |\partial_{x_i} \partial_{x_j} p^{\varrho}(t,x)| \leq c_1 t^{-2/\varrho} S(x,\varrho,t) \label{app-eq55} \end{equation} where \begin{equation} S(x,\varrho,t) := \min \left\{ t^{-d/\alpha}, \frac{t}{|x|^{d+\alpha}} \right\}, \label{app-eq56} \end{equation} and $\varrho \in [\alpha_L,\|\alpha\|_{\infty}]$, $t \in (0,T)$, $x \in \mbb{R}^d$ and $i,j \in \{1,\ldots,d\}$, cf.\ Lemma~\ref{pix-3}. For the parametrix $p_0(t,x,y) = p^{\alpha(y)}(t,x-y)$ this implies, by Taylor's formula, that there exists is $c_2>0$ such that \begin{equation*} |p_0(t,x+2h,y)-2p_0(t,x+h,y)+p_0(t,x,y)| \leq c_2 t^{-2/\alpha(y)} |h|^2 S(\eta(x,h)-y,\alpha(y),t), \quad x,h \in \mbb{R}^d \end{equation*} for some intermediate value $\eta(x,h) \in B(x,2h)$. As $t \leq T$ we find that \begin{equation*} |p_0(t,x+2h,y)-2p_0(t,x+h,y)+p_0(t,x,y)| \leq c_3 t^{-2/\alpha_L} |h|^2 S(\eta(x,h)-y,\alpha(y),t), \quad x,h \in \mbb{R}^d \end{equation*} for a suitable constant $c_3 = c_3(T,\alpha_L,\|\alpha\|_{\infty})$. On the other hand, \eqref{app-eq55} gives \begin{align*} |p_0(t,x+2h,y)-&2p_0(t,x+h,y)+p_0(t,x,y)|\\ &\leq c_1 (S(x+2h-y,\alpha(y),t)+2S(x+h-y,\alpha(y),t)+ S(x-y,\alpha(y),t)). \end{align*} Combining both estimates we obtain that there exists a constant $c_4 = c_4(T,\alpha_L,\|\alpha\|_{\infty})$ such that \begin{equation} |p_0(t,x+2h,y)-2p_0(t,x+h,y)+p_0(t,x,y)| \leq c_4 |h|^{\kappa} t^{-\kappa/\alpha_L} U(t,x,y,h) \label{app-eq6} \end{equation} for \begin{equation*} U(t,x,y,h) := S(\eta(x,h)-y,\alpha(y),t) + S(x+h-y,\alpha(y),t)+S(x-h-y,\alpha(y),t)+S(x-y,\alpha(y),t), \end{equation*} cf.\ Lemma~\ref{ineq-1} with $r:=t^{1/\alpha_L}$. Hence, \begin{align*} |P_t^{(0)}u(x+2h)-2P_t^{(0)}u(x+h)+P_t^{(0)}u(x)| \leq c_4 \|u\|_{\infty} t^{-\kappa/\alpha_L} |h|^\kappa \int_{\mbb{R}^d} U(t,x,y,h) \, dy \end{align*} for any $x,h \in \mbb{R}^d$ and $t \in (0,T)$. Since \begin{equation} c_T := \sup_{t \in (0,T)}\sup_{z \in \mbb{R}^d} \int_{\mbb{R}^d} S(z-y,\alpha(y),t) \, dy <\infty, \label{app-eq7} \end{equation} cf.\ Appndix~\ref{pix}, we have \begin{equation} \sup_{t \in (0,T)} \sup_{z \in \mbb{R}^d} \int_{\mbb{R}^d} U(t,z,y,h) \, dy \leq 4 c_T < \infty, \label{app-eq75} \end{equation} and therefore we conclude that \begin{equation*} |P_t^{(0)}u(x+2h)-2P_t^{(0)}u(x+h)+P_t^{(0)}u(x)| \leq 4c_4 c_T \|u\|_{\infty} t^{-\kappa/\alpha_L} |h|^\kappa. \end{equation*} It remains to establish the H\"{o}lder estimate for $P^{(1)}_t$. By \eqref{app-eq6}, we have \begin{align*} &|(p_0 \circledast \Phi)(t,x+2h,y)-2(p_0 \circledast \Phi)(t,x+h,y)+ (p_0 \circledast \Phi)(t,x,y)| \\ &\leq c_4 |h|^{\kappa} \int_0^t \!\! \int_{\mbb{R}^d} (t-s)^{-\kappa/\alpha_L} U(t-s,x,z,h) |\Phi(s,z,y)| \, dz \, ds. \end{align*} Integrating with respect to $y \in \mbb{R}^d$, it follows from \eqref{app-eq5} and \eqref{app-eq75} that \begin{align*} |P_t^{(1)} u(x+2h)-2P_t^{(1)}u(x+h)+P_t^{(1)}u(x)| &\leq c_6 |h|^{\kappa} \|u\|_{\infty} \int_0^t (t-s)^{-\kappa/\alpha_L} s^{-1+\lambda} \, ds \\ &\leq c_7 |h|^{\kappa} t^{-\kappa/\alpha_L} \|u\|_{\infty} \end{align*} for suitable constants $c_6$ and $c_7$. Combining the estimates we find that \eqref{app-eq1} holds for some finite constant $C>0$. The continous dependence of $C$ on the parameters $\alpha_L-\kappa \in (0,\alpha_L)$, $\alpha_L \in (0,2)$, $\|\alpha\|_{C_b^{\gamma}}>0$ and $T>0$ follows from the fact that each of the constants in this proof depends continuously on these parameters. \end{proof} In Proposition~\ref{app-1} we studied the regularity of $x \mapsto P_t u(x)$ for measurable functions $u$. The next result is concerned with the regularity of $P_t u(\cdot)$ for H\"{o}lder continuous functions $u$. It is natural to expect that $P_t u$ ``inherits'' some regularity from $u$. \begin{prop} \label{app-25} Let $(X_t)_{t \geq 0}$ be a Feller process with symbol $q(x,\xi) = |\xi|^{\alpha(x)}$, $x,\xi \in \mbb{R}^d$, for a mapping $\alpha: \mbb{R}^d \to (0,2)$ such that $\alpha_L := \inf_{x \in \mbb{R}^d} \alpha(x)>0$ and $\alpha \in C_b^{\gamma}(\mbb{R}^d)$ for some $\gamma \in (0,1)$ satisfying \begin{equation*} \gamma> \gamma_0 :=\|\alpha\|_{\infty}-\alpha_L. \end{equation*} For any $T>0$, $\kappa \in (0,\alpha_L)$ and $\eps \in (\gamma_0,\min\{\gamma,\alpha_L\})$ there exists a constant $C>0$ such that the semigroup $(P_t)_{t \geq 0}$ of $(X_t)_{t \geq 0}$ satisfies \begin{equation} \|P_t u\|_{\mc{C}_b^{\kappa + \min\{\delta,\gamma\}-\eps}(\mbb{R}^d)} \leq C (1+|\log t|) t^{-\kappa/\alpha_L} \|u\|_{\mc{C}_b^{\min\{\delta,\gamma\}}(\mbb{R}^d)}, \qquad u \in \mc{C}_b^{\delta}(\mbb{R}^d), \label{app-eq31} \end{equation} for all $\delta>0$ and $t \in (0,T]$. The constant $C>0$ depends continuously on $\alpha_L \in (0,2)$, $\kappa-\alpha_L \in (0,2)$, $(\eps-\|\alpha\|_{\infty})/\alpha_L \in (1,\infty)$, $\|\alpha\|_{C_b^{\gamma}(\mbb{R}^d)} \in [0,\infty)$ and $T \in [0,\infty)$. \end{prop} For the proof of the Schauder estimates, Corollary~\ref{ex-23}, we will apply Proposition~\ref{app-25} for an isotropic stable-like process $(X_t)_{t \geq 0}$ with symbol $q(x,\xi)=|\xi|^{\alpha(x)}$ for a ``truncated'' function $\alpha$ of the form \begin{equation*} \alpha(x) := (\varrho(x_0)-\delta) \vee \varrho(x) \wedge (\varrho(x_0)+\delta), \qquad x \in \mbb{R}^d \end{equation*} where $x_0 \in \mbb{R}^d$ is fixed and $\delta>0$ is a constant which we can choose as small as we like; in particular $\gamma_0 :=\|\alpha\|_{\infty}-\alpha_L \leq 2 \delta$ is small and therefore the assumptions $\eps>\gamma_0$ and $\gamma>\gamma_0$ in Proposition~\ref{app-25} are not a restriction. Let us mention that both assumptions, i.\,e.\ $\eps>\gamma_0$ and $\gamma>\gamma_0$, come into play when estimating one particular term in the proof of Proposition~\ref{app-25}, see \eqref{app-eq61} below; a more careful analysis of this term would probably allow us to relax these two conditions. \begin{proof}[Proof of Proposition~\ref{app-25}] Fix $\eps \in (\gamma_0, \gamma \wedge \alpha_L)$, $\kappa \in (0,\alpha_L)$ and $T>0$. First of all, we note that it clearly suffices to show \eqref{app-eq31} for $u \in \mc{C}_b^{\delta}(\mbb{R}^d)$ with $\delta \leq \gamma \leq 1$. Throughout the first part of this proof, we will assume that \begin{equation} \kappa \leq 1. \label{app-eq33} \end{equation} Under \eqref{app-eq33} the assertion follows if we can show that \begin{equation*} |\Delta_h^2 P_t u(x)| \leq C \|u\|_{\mc{C}_b^{\delta}(\mbb{R}^d)} (1+|\log(t)|) t^{-\kappa/\alpha_L} |h|^{\kappa+\delta-\eps}, \qquad x \in \mbb{R}^d, \, |h| \leq 1, \, t \in (0,T] \end{equation*} where $\Delta_h^2$ denotes as usual the iterated difference operator, cf.\ \eqref{def-eq3}. For the proof of this inequality we use again the parametrix construction of the transition density $p$ of $(X_t)_{t \geq 0}$, \begin{equation} p(t,x,y) = p_0(t,x,y) + (p_0 \circledast \Phi)(t,x,y), \qquad t>0, \, x,y \in \mbb{R}^d \label{app-eq35} \end{equation} where \begin{equation} p_0(t,x,y) = p^{\alpha(y)}(t,x-y),\qquad t>0, \, x,y \in \mbb{R}^d, \label{app-eq36} \end{equation} see Appendix~\ref{pix} for details. Since \begin{align*} \Delta_h P_t u(x) &= \int_{\mbb{R}^d} \Delta_h u(y) p(t,x,y) \, dy - \int_{\mbb{R}^d} \left( u(y+h) p(t,x,y) - u(y) p(t,x+h,y) \right) \, dy \\ &= \int_{\mbb{R}^d} \Delta_h u(y) p(t,x,y) \, dy - \int_{\mbb{R}^d} u(y+h) (p(t,x,y)-p(t,x+h,y+h)) \, dy \end{align*} we find that $\Delta_h^2 P_t f(x) = J_1-J_2$ where \begin{align} \label{app-eq40} \begin{aligned} J_1 &:= \int_{\mbb{R}^d} \Delta_h u(y) \left( p(t,x+h,y)-p(t,x,y) \right) \, dy \\ J_2 &:= \int_{\mbb{R}^d} u(y+h) q(t,x,y) \, dy.\end{aligned} \end{align} with \begin{equation*} q(t,x,y) := p(t,x+h,y)-p(t,x+2h,y+h)-p(t,x,y)+p(t,x+h,y+h) \end{equation*} for fixed $h$. We estimate the terms separately. For fixed $h \in \mbb{R}^d$, $|h| \leq 1$, define an auxiliary function $v$ by $v(y) := \Delta_h u(y)$. Proposition~\ref{app-1} gives \begin{equation*} |J_1| \leq |h|^{\kappa} \|P_t v \|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq C_1 |h|^{\kappa} \|v\|_{\infty} t^{-\kappa/\alpha_L}, \qquad t \in (0,T], \end{equation*} and so, by the definition of $v$ and the H\"older continuity of $u$, \begin{equation*} |J_1| \leq C_1 |h|^{\kappa+\delta} \|u\|_{\mc{C}_b^{\delta}(\mbb{R}^d)} t^{-\kappa/\alpha_L}, \qquad t \in (0,T]. \end{equation*} It remains to establish the corresponding estimate for $J_2$, and to this end we use the representation \eqref{app-eq35} for the transition density $p$. \par \textbf{Step 1:} There exists a constant $c_1>0$ such that \begin{equation} q_0(t,x,y):= p_0(t,x+h,y)-p_0(t,x+2h,y+h)-p_0(t,x,y) + p_0(t,x+h,y+h) \label{app-eq47} \end{equation} satisfies \begin{equation*} \int_{\mbb{R}^d} |q_0(t,x,y)| \,dy \leq c_1 |h|^{\kappa+\gamma} (1+|\log(t)|) t^{-\kappa/\alpha_L} \fa x,h \in \mbb{R}^d, \, t \in (0,T]. \end{equation*} \emph{Indeed:} If we denote by $p^{\varrho}$ the transition density of the $d$-dimensional isotropic $\varrho$-stable L\'evy process, $\varrho \in (0,2)$, then there is a constant $c_2>0$ such that \begin{equation} \int_{\mbb{R}^d} \left| \frac{\partial}{\partial \varrho} p^{\varrho}(t,x) \right| \, dx \leq c_2 (1+|\log(t)|) \quad \int_{\mbb{R}^d} \left| \frac{\partial}{\partial x_j} \frac{\partial}{\partial \varrho} p^{\varrho}(t,x) \right| \, dx \leq c_2 (1+|\log(t)|) t^{-1/\alpha_L} \label{app-eq44} \end{equation} for all $t \in (0,T]$, $j \in \{1,\ldots,d\}$ and $\varrho \in [\alpha_L,\|\alpha\|_{\infty}] \subseteq (0,2]$, cf.\ Lemma~\ref{pix-3}. To shorten the notation, we fix $x,h \in \mbb{R}^d$ and $t \in (0,T]$, and write $q_0(y)$ for the function defined in \eqref{app-eq47}. By the very definition of $p_0$, cf.\ \eqref{app-eq36}, we have \begin{equation*} |q_0(y)| = |p^{\alpha(y)}(t,x+h-y) - p^{\alpha(y+h)}(t,x+h-y)-p^{\alpha(y)}(t,x-y) + p^{\alpha(y+h)}(t.x-y)|, \end{equation*} and so, by the fundamental theorem of calculus and the mean value theorem, \begin{align} |q_0(y)| &= \left| \int_{\alpha(y)}^{\alpha(y+h)} \left(\partial_{\varrho} p^{\varrho}(t,x+h-y) - \partial_{\varrho} p^{\varrho}(t,x-y) \right) \, d\varrho \right| \label{app-eq46} \\ &\leq |h| \int_{\alpha(y)}^{\alpha(y+h)} \left| \nabla_x \partial_{\varrho} p^{\varrho}(t,\eta_{\varrho}(x,h)-y) \right| \, d\varrho \notag \end{align} for some intermediate value $\eta_{\varrho}(x,h) \in B(x,h)$. Integrating with respect to $y$ and using \eqref{app-eq44} we obtain that \begin{align} \int_{\mbb{R}^d} |q_0(y)| \, dy &\leq c_3 (1+|\log(t)|) t^{-1/\alpha_L} |h| \sup_{y \in \mbb{R}^d} \int_{\alpha(y)}^{\alpha(y+h)} d\varrho\\ & \leq c_3 \|\alpha\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)} (1+|\log(t)|) t^{-1/\alpha_L} |h|^{1+\gamma}. \label{app-eq48} \end{align} On the other hand, it follows from \eqref{app-eq46} and the H\"older continuity of $\alpha$ that \begin{align*} \int_{\mbb{R}^d} |q_0(y)| \, dy \leq |h|^{\gamma} \|\alpha\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)} \sup_{\varrho \in [\alpha_L,\|\alpha\|_{\infty}]} \sup_{\eta \in \mbb{R}^d} \int_{\mbb{R}^d} |\partial_{\varrho} p^{\varrho}(t,\eta-y)| \, dy. \end{align*} Hence, by \eqref{app-eq44}, \begin{align} \int_{\mbb{R}^d} |q_0(y)| \, dy \leq c_4 |h|^{\gamma} (1+|\log(t)|). \label{app-eq50} \end{align} Combining \eqref{app-eq48} and \eqref{app-eq50} we find that \begin{equation*} \int_{\mbb{R}^d} |q_0(y)| \, dy \leq c_5 |h|^{\kappa+\gamma} (1+|\log(t)|) t^{-\kappa/\alpha_L}, \qquad \kappa \in [0,\alpha_L]; \end{equation*} the reasoning is very similar to the proof of Lemma~\ref{ineq-1}, alternatively we can use an interpolation theorem. \par \textbf{Step 2:} There exists a constant $c>0$ such that \begin{equation*} |J_2| \leq c |h|^{\kappa+\delta-\eps} \|u\|_{\mc{C}_b^{\delta}(\mbb{R}^d)} (1+|\log(t)|) t^{-\kappa/\alpha_L} \fa t\in (0,T], \, |h| \leq 1, \, x \in \mbb{R}^d; \end{equation*} recall that $\eps \in (\gamma_0,\alpha_L \wedge \gamma)$ has been fixed at the beginning of the proof.\par \emph{Indeed:} Because of the decomposition \eqref{app-eq35}, we have $J_2 = J_{2,1} + J_{2,2}$ for \begin{align} \label{app-eq52} \begin{aligned} J_{2,1} &:= \int_{\mbb{R}^d} u(y+h) q_0(t,x,y) \, dy \\ J_{2,2} &:= \int_{\mbb{R}^d} u(y+h) \left((p_0 \circledast \Phi)(t,x+h,y) - (p_0 \circledast \Phi)(t,x+2h,y+h)\right) \, dy \\ &\qquad +\int_{\mbb{R}^d} u(y+h) \left((p_0 \circledast \Phi)(t,x+h,y+h) -(p_0 \circledast \Phi)(t,x,y) \right) \, dy \end{aligned} \end{align} with $q$ defined in \eqref{app-eq47}. It follows from Step 1 that \begin{equation*} |J_{2,1}| \leq c_1 \|u\|_{\mc{C}_b^{\delta}(\mbb{R}^d)} (1+|\log(t)|) t^{-\kappa/\alpha_L} |h|^{\kappa+\delta}, \quad t \in (0,T]. \end{equation*} It remains to estimate $J_{2,2}$. By the definition of the time-space convolution, we have \begin{align*} &(p_0 \circledast \Phi)(t,x+h,y) - (p_0 \circledast \Phi)(t,x+2h,y+h)-(p_0 \circledast \Phi)(t,x,y) + (p_0 \circledast \Phi)(t,x+h,y+h) \\ &= \int_0^t \!\! \int_{\mbb{R}^d} (p_0(t-s,x+h,z)-p_0(t-s,x,z)) \Phi(s,z,y) \, dz \, ds \\ &\quad - \int_0^t \!\! \int_{\mbb{R}^d} (p_0(t-s,x+2h,z)-p_0(t-s,x+h,z)) \Phi(s,z,y+h) \, dz \, ds \\ &= \int_0^t \!\! \int_{\mbb{R}^d}q_0(t-s,x,z) \Phi(s,z,y) \, dz \, ds \\ &\quad - \int_0^t\!\! \int (p_0(t-s,x+2h,z+h)-p_0(t-s,x+h,z+h)) (\Phi(s,z+h,y+h)-\Phi(s,z,y)) \, dz \, ds \\ &=: H_1(t,y)-H_2(t,y). \end{align*} Integrating with respect to $y$ and applying Tonelli's theorem, we obtain that \begin{align*} \left| \int_{\mbb{R}^d} u(y+h) H_1(t,y) \, dy \right| &\leq \|u\|_{\infty} \int_0^t \left( \sup_{\eta \in \mbb{R}^d} \int_{\mbb{R}^d} |\Phi(s,\eta,y)| \, dy \right) \left( \int_{\mbb{R}^d} |q_0(t-s,x,z)| \, dz \right) \, ds. \end{align*} Thus, by \eqref{app-eq5} and Step 1, \begin{align} \left| \int_{\mbb{R}^d} u(y+h) H_1(t,y) \, dy \right| \leq c_6 |h|^{\kappa+\gamma} \|u\|_{\infty} \int_0^t s^{-1+\lambda_1} (1+|\log(t-s)|) (t-s)^{-\kappa/\alpha_L} \, ds \label{app-eq60} \end{align} for a suitable constant $c_6>0$ and $\lambda_1>0$. It remains to estimate $H_2$. We claim that there exist constants $c_7>0$ and $\lambda_2>0$ such that \begin{equation} \sup_{z \in \mbb{R}^d} \int_{\mbb{R}^d} |\Phi(t,z+h,y+h)-\Phi(t,z,y)| \, dy \leq c_7 |h|^{\gamma-\eps} t^{-1+\lambda_2} \label{app-eq61} \end{equation} for all $t \in (0,T]$ and $|h| \leq 1$; here $\eps \in (\gamma_0,\alpha_L \wedge \gamma)$ is the constant which we have chosen at the beginning of the proof. We postpone the proof of \eqref{app-eq61} to the end of this subsection, see Lemma~\ref{app-27} below. Using \eqref{app-eq61} and the fact that \begin{equation*} \int_{\mbb{R}^d} |p_0(t-s,x+2h,z+h)-p_0(t-s,x+h,z+h)| \, dz \leq c_{8} |t-s|^{-\kappa/\alpha_L} |h|^{\kappa} \end{equation*} for some constant $c_{8}>0$, which follows by a similar reasoning as in the first part of the proof of Proposition~\ref{app-1}, we obtain that \begin{align*} \left| \int_{\mbb{R}^d} u(y+h) H_2(t,y) \, dy \right| \leq c_7 c_{8} \|u\|_{\infty} |h|^{\gamma+\kappa-\eps} \int_0^t s^{-1+\lambda_2} (t-s)^{-\kappa/\alpha_L} \, ds. \end{align*} Combining this estimate with \eqref{app-eq60} gives \begin{equation*} |J_{2,2}| \leq (c_6+c_7 c_8) \|u\|_{\infty} |h|^{\gamma+\kappa-\eps} \int_0^t s^{-1+\lambda} (t-s)^{-\kappa/\alpha_L} (1+|\log(t-s)|) \, ds. \end{equation*} Hence, \begin{align*} |J_{2,2}| &\leq c_{9} \|u\|_{\infty}|h|^{\gamma+\kappa-\eps} t^{-\kappa/\alpha_L} \int_0^1 r^{-1+\lambda} (1-r)^{-\kappa/\alpha_L} (1+|\log(1-r)|) \, dr \end{align*} for all $t \in (0,T]$ where $\lambda := \min\{\lambda_1,\lambda_2\}$. This finishes the proof of Step 2 and, hence, of Proposition~\ref{app-25} for the case $\kappa \leq 1$. If $\kappa>1$, we need to estimate the iterated differences of third order $\Delta_h^3 P_t u(x)$. Fix $|h| \leq 1$. Since $\Delta_h^2 P_t f(x) =J_1(x) -J_2(x)$ with $J_1=J_1(x)$, $J_2=J_2(x)$ defined in \eqref{app-eq40}, we have \begin{equation*} \Delta_h^3 P_t u(x) = \Delta_h J_1(x) - \Delta_h J_2(x). \end{equation*} As before, we estimate the terms separately. If we define an auxilary function $v(y) := \Delta_h u(y)$, then, by \eqref{app-eq40}, \begin{align*} \Delta_h J_1(x) &= \int_{\mbb{R}^d} v(y) \left( p(t,x+2h,y)-2p(t,x+h,y) +p(t,x,y) \right) \, dy \\ &= P_t v(x+2h)-2P_t v(x+h)+P_t v(x) = \Delta_h^2 P_t v(x). \end{align*} By Proposition~\ref{app-1}, this gives \begin{align*} |\Delta_h J_1(x)| \leq C_1 |h|^{\kappa} \|v\|_{\infty} t^{-\kappa/\alpha_L}, \quad t \in (0,T],\,x \in \mbb{R}^d, \end{align*} and so, by the definition of $v$ and the H\"{o}lder continuity of $u$, \begin{equation*} |\Delta_h J_1(x)| \leq C_1 \|u\|_{\mc{C}_b^{\delta}(\mbb{R}^d)} |h|^{\kappa+\delta} t^{-\kappa/\alpha_L}, \quad t \in (0,T], x \in \mbb{R}^d. \end{equation*} In order to estimate $\Delta_h J_2$ we use a similar procedure as in the case $\kappa \leq 1$. Denote by $q_0$ the function defined in \eqref{app-eq47}. \textbf{Step 3:} There exists a constant $c_1>0$ such that \begin{equation*} \int_{\mbb{R}^d} |q_0(t,x+h,y)-q_0(t,x,h)| \, dy \leq c_1 |h|^{\kappa+\gamma} (1+|\log(t)|) t^{-\kappa/\alpha_L}, \quad |h| \leq 1, \, x \in \mbb{R}^d, \in (0,T]. \end{equation*} \emph{Indeed:} By definition of $q_0$ and definition of $p_0$, cf.\ \eqref{app-eq36}, \begin{align*} q_0(t,x+h,y)-q_0(t,x,y) &= p_0(t,x,y)-p_0(t,x+3h,y+h)+2p_0(t,x+2h,y+h)\\ &\quad -2p_0(t,x+h,y)-p_0(t,x+h,y+h) + p_0(t,x+2h,y) \\ &= - p^{\alpha(y+h)}(t,x-y+2h) + 2p^{\alpha(y+h)}(t,x-y+h) - p^{\alpha(y+h)}(x-y) \\ &\quad+ p^{\alpha(y)}(t,x-y+2h) - 2p^{\alpha(y)}(t,x-y+h) + p^{\alpha(y)}(t,x-y) \end{align*} where $p^{\varrho}$ denotes as usual the transition density of the L\'evy process with characteristic exponent $|\xi|^{\varrho}$. Hence, \begin{equation} q_0(t,x+h,y)-q_0(t,x,y) = \int_{\alpha(y)}^{\alpha(y+h)} \partial_{\varrho} \left( - p^{\varrho}(t,x-y+2h)+2p^{\varrho}(t,x-y+h) - p^{\varrho}(t,x-y) \right) \, d\varrho. \label{app-eq91} \end{equation} Applying Taylor's formula, integrating with respect to $y$ and using Lemma~\ref{pix-3}, it follows that \begin{align*} \int_{\mbb{R}d} |q_0(t,x+h,y)-q_0(t,x,y)| \, dy &\leq c_2 (1+|\log(t)|) t^{-2/\alpha_L} |h|^2 \sup_{y \in \mbb{R}^d} \int_{\alpha(y)}^{\alpha(y+h)} \, d\varrho \\ &\leq c_2 \|\alpha\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)} (1+|\log(t)|) |h|^{2+\gamma} t^{-2/\alpha_L}. \end{align*} On the other hand, \eqref{app-eq91} gives \begin{align*} |q_0(t,x+h,y)-q_0(t,x,y)| \leq 2 \sum_{j=0}^2 \int_{\alpha(y)}^{\alpha(y+h)} |\partial_{\varrho} p^{\varrho}(t,x-y+jh)| \, d\varrho. \end{align*} Another application of Lemma~\ref{pix-3} (with $k=0$) yields \begin{align*} \int_{\mbb{R}^d} |q_0(t,x+h,y)-q_0(t,x,y)| \, dy \leq c_3 \|\alpha\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)} |h|^{\gamma} (1+|\log(t)|), \end{align*} and combining this with the previous estimate we get the assertion by a standard interpolation argument. \textbf{Step 4:} There exists a constant $c>0$ such that \begin{equation*} |J_2(x+h)-J_2(x)| \leq c |h|^{\kappa+\delta-\eps} \|u\|_{\mc{C}_b^{\delta}(\mbb{R}^d)} (1+|\log(t)|) t^{-\kappa/\alpha_L}, \quad t \in (0,T], \, |h| \leq 1, \, x \in \mbb{R}^d, \end{equation*} with $\eps$ chosen at the beginning of the proof. \emph{Indeed:} As in the first part of this proof, we write $J_2=J_{2,1}+J_{2,2}$ where \begin{align*} J_{2,1}(x) = \int_{\mbb{R}^d} u(y+h) q_0(t,x,y) \, dy \qquad J_{2,2}(x) = \int u(y+h) (H_1(t,x,y)-H_2(t,x,y)) \, dy, \end{align*} cf.\ Step 2. By Step 3, \begin{align*} |J_{2,1}(x+h)-J_{2,1}(x)| \leq c_1 \|u\|_{\infty} |h|^{\kappa+\delta} (1+|\log(t)|) t^{-\kappa/\alpha_L}, \end{align*} and so it just remains to estimate $J_{2,2}(x+h)-J_{2,2}(x)$. It follows from the definition of $H_1$ and Fubini's theorem that \begin{align*} &\left| \int_{\mbb{R}^d} u(y+h) (H_1(t,x+h,y)-H_1(t,x,y)) \, dy \right|\\ &\leq \int_0^t \left( \sup_{\eta \in \mbb{R}^d} |\Phi(s,\eta,y)| \, dy \right) \int_{\mbb{R}^d} |q_0(t-s,x+h,z)-q_0(t-s,x,z)| \, dz \, ds. \end{align*} By \eqref{app-eq5} and Step 3, there exist constants $c_4>0$ and $\lambda_1>0$ such that \begin{align*} \left| \int_{\mbb{R}^d} u(y+h) (H_1(t,x+h,y)-H_1(t,x,y)) \, dy \right| \leq c_4 |h|^{\kappa+\gamma} \int_0^t s^{-1+\lambda_1} (1+|\log(t-s)|) (t-s)^{-\kappa/\alpha_L} \, ds \end{align*} for any $t \in (0,T]$, $x \in \mbb{R}^d$ and $|h| \leq 1$. For $H_2$ we note that \begin{align*} H_2(t,x+h,y)-H_2(t,x,y) = \int_0^t\!\!\int_{\mbb{R}^d} r(t-s,x,z) (\Phi(s,z+h,y+h)-\Phi(s,z,y)) \, dz \, ds \end{align*} where \begin{align*} r(t-s,x,z) &:= p_0(t-s,x+3h,z+h)-2p_0(t-s,x+2h,z+h)+ p_0(t-s,x+h,z+h) \end{align*} for fixed $h$. Applying Taylor's formula and using \eqref{pix-eq11}, we obtain that \begin{align*} \int_{\mbb{R}^d} |r(t-s,x,z)| \, dz \leq c_5 |h|^{\kappa} (t-s)^{-\kappa/\alpha_L}, \end{align*} see the proof of Proposition~\ref{app-1} for a very similar reasoning. Combining this estimate with \eqref{app-eq61}, \begin{equation*} \left| \int_{\mbb{R}^d} u(y+h) (H_2(t,x+h,y)-H_2(t,x,y)) \, dy \right| \leq c_6 \|u\|_{\infty} |h|^{\gamma+\kappa-\eps} \int_0^t s^{-1+\lambda_2} (t-s)^{-\kappa/\alpha_L} \, ds \end{equation*} for suitable constants $\lambda_2>0$ and $c_6>0$. This gives the desired estimates for $J_{2,2}$, see the end of Step 2 for details, and hence for $J_2$. \end{proof} \begin{lem} \label{app-27} Let $(X_t)_{t \geq 0}$ be a Feller process with symbol $q(x,\xi) = |\xi|^{\alpha(x)}$ satisfying the assumptions of Proposition~\ref{app-25}, and denote by \begin{equation*} p(t,x,y) =p_0(t,x,y) + (p_0 \circledast \Phi)(t,x,y) \end{equation*} the parametrix representation of the transition density $p$ of $(X_t)_{t \geq 0}$. For any $T>0$ and any $\eps \in (\gamma_0,\gamma \wedge \alpha_L)$ there exist finite constants $C>0$ and $\lambda>0$ such that \begin{equation*} \int_{\mbb{R}^d} |\Phi(t,x+h,y+h)-\Phi(t,x,y)| \, dy \leq C |h|^{\gamma-\eps} t^{-1+\lambda} \end{equation*} for all $x \in \mbb{R}^d$, $|h| \leq 1$ and $t \in (0,T]$. The constant $C>0$ depends continuously on $\alpha_L \in (0,2)$, $\kappa-\alpha_L \in (0,2)$, $(\eps-\|\alpha\|_{\infty})/\alpha_L \in (1,\infty)$, $\|\alpha\|_{C_b^{\gamma}(\mbb{R}^d)} \in [0,\infty)$ and $T \in [0,\infty)$. The constant $\lambda>0$ depends continuously on $(\eps-\|\alpha\|_{\infty})/\alpha_L \in (1,\infty)$ and $(\gamma-\|\alpha\|_{\infty})/\alpha_L \in (1,\infty)$. \end{lem} \begin{proof} Fix $\eps \in (\gamma_0,\alpha_L \wedge \gamma)$. To keep the calculations as simple as possible we consider $T:=1$. For the proof we use that $\Phi$ has the representation \begin{equation} \Phi(t,x,y) = \sum_{i=1}^{\infty} F^{\circledast i}(t,x,y), \qquad t>0, \, x,y \in \mbb{R}^d \label{app-eq63} \end{equation} where $F^{\circledast i} := F \circledast F^{\circledast (i-1)}$ denotes the $i$-th convolution power of \begin{equation*} F(t,x,y) := (2\pi)^{-d} \int_{\mbb{R}^d} \left( |\xi|^{\alpha(y)}-|\xi|^{\alpha(x)} \right) e^{i \xi \cdot (y-x)} e^{-t |\xi|^{\alpha(y)}} \, d\xi, \qquad t>0, \, x,y \in \mbb{R}^d, \end{equation*} cf.\ Appendix~\ref{pix}. \par \textbf{Step 1:} There exist constants $C>0$ and $\lambda>0$ such that \begin{equation} \int_{\mbb{R}^d} |F(t,x+h,y+h)-F(t,x,y)| \, dy \leq C |h|^{\gamma-\eps} t^{-1+\lambda} \quad \text{for all} \, \, x \in \mbb{R}^d,\, |h| \leq 1, \,t \in (0,1). \label{app-eq65} \end{equation} \emph{Indeed:} For fixed $|h| \leq 1$ we write \begin{equation*} F(t,x+h,y+h)-F(t,x,y) = (2\pi)^{-d} \left(D_1(t,x,y) + D_2(t,x,y)\right) \end{equation*} where \begin{align*} D_1(t,x,y) &:= \int_{\mbb{R}^d} \left( \left( |\xi|^{\alpha(y+h)}-|\xi|^{\alpha(y)} \right)- \left( |\xi|^{\alpha(x+h)}-|\xi|^{\alpha(x)} \right) \right) e^{i \xi \cdot (y-x)} e^{-t |\xi|^{\alpha(y)}} \, d\xi \\ D_2(t,x,y) &:= \int_{\mbb{R}^d} \left( |\xi|^{\alpha(y)}-|\xi|^{\alpha(x)} \right) e^{i \xi \cdot (y-x)} \left( e^{-t |\xi|^{\alpha(y+h)}}-e^{-t |\xi|^{\alpha(y)}} \right) \, d\xi. \end{align*} We estimate the terms separately. As $\alpha \in \mc{C}_b^{\gamma}(\mbb{R}^d)$ it follows that $x \mapsto r^{\alpha(x)} \in \mc{C}_b^{\gamma}(\mbb{R}^d)$ for any fixed $r \geq 0$ and \begin{equation*} \|r^{\alpha(\cdot)}\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)} \leq \left(\|\alpha\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)} |\log(r)| +1 \right) \max\{r^{\alpha_L},r^{\|\alpha\|_{\infty}}\}. \end{equation*} Applying Lemma~\ref{ineq-2} we find that there exists a constant $c_1>0$ such that \begin{align*} \left| \left( r^{\alpha(y+h)} - r^{\alpha(y)} \right)- \left( r^{\alpha(x+h)}- r^{\alpha(x)} \right) \right| &\leq c_1 |h|^{\gamma-\eps} |x-y|^{\eps} \|r^{\alpha(\cdot)}\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)} \\ &\leq c_1' |h|^{\gamma-\eps} |x-y|^{\eps} (|\log(r)|+1) \max\{r^{\alpha_L},r^{\|\alpha\|_{\infty}}\} \end{align*} for all $r \geq 0$, $x,y \in \mbb{R}^d$ and $|h| \leq 1$. By \cite[(proof of) Theorem 4.7]{matters} this implies that there is a constant $c_2>0$ such that \begin{equation*} |D_1(t,x,y)| \leq c_2 |h|^{\gamma-\eps} |x-y|^{\eps} \min \left\{(1+|\log(t)|) t^{-(d+\|\alpha\|_{\infty})/\alpha_L}, \frac{1+|\log(|x-y|)|}{\min\{|x-y|^{d+\alpha_L},|x-y|^{d+\|\alpha\|_{\infty}}\}} \right\} \end{equation*} for all $x,y \in \mbb{R}^d$, $t \in (0,1)$ and $|h| \leq 1$. Splitting up the domain of integration into three parts, \begin{equation*} \{y \in \mbb{R}^d; |x-y| < t^{1/\alpha_L}\} \quad \{y \in \mbb{R}^d; t^{1/\alpha_L} \leq |x-y| \leq 1\} \quad \{y \in \mbb{R}^d; |x-y| >1\} \end{equation*} we obtain that $\int_{\mbb{R}^d} |D_1(t,x,y)| \,dy$ is bounded by \begin{align*} &c_2 |h|^{\gamma-\eps} \left((1+|\log(t)|) t^{-(d+|\alpha\|_{\infty}-\eps)/\alpha_L} \int_{|z| < t^{1/\alpha_L}} \, dz + \int_{t^{1/\alpha_L} \leq |z| \leq 1} \frac{1+|\log(|z|)|}{|z|^{d+\|\alpha\|_{\infty}-\eps}} \, dz + \int_{|z|>1} \frac{1+|\log(|z|)|}{|z|^{d+\alpha_L-\eps}} \, dz \right) \\ &\leq c_2' |h|^{\gamma-\eps} (1+|\log(t)|) t^{-(|\alpha\|_{\infty}-\eps)/\alpha_L}. \end{align*} As $\eps> \gamma_0=\|\alpha\|_{\infty}-\alpha_L$ this means that there exists $\lambda_1>0$ such that \begin{equation*} \int_{\mbb{R}^d} |D_1(t,x,y)| \, dy \leq c_3 t^{-1+\lambda_1} |h|^{\gamma-\eps}, \qquad t \in (0,1), \,x \in \mbb{R}^d. \end{equation*} In order to estimate the second term we note that \begin{align*} D_2(t,x,y) = -t \int_{\alpha(y)}^{\alpha(y+h)} \int_{\alpha(x)}^{\alpha(y)} \int_{\mbb{R}^d} (\log(|\xi|))^2 |\xi|^u e^{i \xi \cdot (y-x)} e^{-t |\xi|^{\varrho}} \, d\xi \, du \, d\varrho. \end{align*} It follows from \cite[Theorem 4.7]{matters} and the H\"{o}lder continuity of $\alpha$ that there exists a constant $c_4>0$ such that \begin{equation*} |D_2(t,x,y)| \leq c_4 t |h|^{\gamma} |x-y|^{\gamma} \min \left\{ (1+|\log(t)|^2) t^{-(d+\|\alpha\|_{\infty})/\alpha_L}, \frac{1+|\log(|x-y|)|^2}{\min\{|x-y|^{d+\alpha_L},\|x-y|^{d+\|\alpha\|_{\infty}}\}} \right\}. \end{equation*} Now we can proceed exactly as in the first part of this step to conclude that \begin{equation*} \int_{\mbb{R}^d} |D_2(t,x,y)| \, dy \leq c_5 |h|^{\gamma} (1+|\log(t)|^2) t^{-(\|\alpha\|_{\infty}-\gamma)/\alpha_L} \leq c_5' |h|^{\gamma} t^{-1+\lambda_2} \end{equation*} for all $x \in \mbb{R}^d$, $|h| \leq 1$ and $t \in (0,1)$ and suitable constants $c_5,c_5',\lambda_2>0$; for the second estimate we used that $\gamma>\gamma_0 = \|\alpha\|_{\infty}-\alpha_L$. \par \textbf{Step 2:} For any $\eps \in (\gamma_0,\min\{\gamma,\alpha_L\})$ there exist constants $C>0$ and $\lambda>0$ such that \begin{equation} \int_{\mbb{R}^d} |F^{\circledast i}(t,x+h,y+h)-F^{\circledast i}(t,x,y)| \, dy \leq 2^{i} C^{i} \frac{\Gamma(\lambda)^{i}}{\Gamma(i \lambda)} t^{-1+i \lambda} |h|^{\gamma-\eps} \label{app-eq67} \end{equation} for all $i \in \mathbb{N}$, $x \in \mbb{R}^d$, $|h| \leq 1$ and $t \in (0,1)$. \par \emph{Indeed:} Fix $\epsilon \in (\gamma_0,\min\{\gamma,\alpha\})$. There exist constants $C>0$ and $\lambda>0$ such that \begin{align} \int_{\mbb{R}^d} |F^{\circledast i}(t,x,y)| \, dy \leq C^{i} \frac{\Gamma(\lambda)^{i}}{\Gamma(i \lambda)} t^{-1+i \lambda} \label{app-eq69} \end{align} for all $x \in \mbb{R}^d$, $i \geq 1$ and $t \in (0,1)$, cf.\ Appendix~\ref{pix}. Without loss of generality, we may assume that $C>0$ and $\lambda>0$ are such that \eqref{app-eq65} holds (otherwise we enlarge $C>0$ and choose $\lambda>0$ smaller). We claim that \eqref{app-eq67} holds for this choice of $C>0$ and $\lambda>0$ and prove this by induction. For $i=1$ the estimate is a direct consequence of \eqref{app-eq65}. Now assume that \eqref{app-eq67} holds for some $i \geq 1$. By the very definition of the time-space convolution, we have \begin{align*} (F \circledast F^{\circledast i})(t,x+h,y+h) &= \int_0^t \int_{\mbb{R}^d} F(t-s,x+h,z) F^{\circledast i}(s,z,y+h) \, dz \, ds \\ &= \int_0^t \int_{\mbb{R}^d} F(t-s,x+h,z+h) F^{\circledast i}(s,z+h,y+h) \, dz \, ds \end{align*} and so \begin{equation*} |(F \circledast F^{\circledast i})(t,x+h,y+h)-(F \circledast F^{\circledast i})(t,x,y)| \leq I_1(t,x,y) + I_2(t,x,y) \end{equation*} for \begin{align*} I_1(t,x,y) &:= \int_0^t\int_{\mbb{R}^d} \left| (F(t-s,x+h,z+h)-F(t-s,x,z)) F^{\circledast i}(s,z+h,y+h) \right| \, dz \, ds \\ I_2(t,x,y) &:= \int_0^t\int_{\mbb{R}^d} \left| (F^{\circledast i}(s,z+h,y+h)-F^{\circledast i}(s,z,y)) F(t-s,x,z) \right| \, dz \, ds. \end{align*} Using first \eqref{app-eq69} and then \eqref{app-eq65} we obtain \begin{align*} \int_{\mbb{R}^d} |I_1(t,x,y)| \, dy \leq C^{i+1} \frac{\Gamma(\lambda)^{i}}{\Gamma(i \lambda)} |h|^{\gamma-\eps} \int_0^t (t-s)^{-1+\lambda} s^{-1+i\lambda} \, ds \end{align*} for all $x \in \mbb{R}^d$, $|h| \leq 1$ and $t \in (0,1)$. In order to estimate the second term, we use \eqref{app-eq69} with $i=1$ and our induction hypothesis to find that \begin{equation*} \int_{\mbb{R}^d} |I_2(t,x,y)| \, dy \leq 2^i C^{i+1} \frac{\Gamma(\lambda)^{i}}{\Gamma(i \lambda)} |h|^{\gamma-\eps} \int_0^t (t-s)^{-1+\lambda} s^{-1+i\lambda} \, ds \end{equation*} for all $x \in \mbb{R}^d$, $|h| \leq 1$ and $t \in (0,1)$. Combining both estimates gives that $F^{\circledast (i+1)} = F \circledast F^{\circledast i}$ satisfies \begin{align*} \int_{\mbb{R}^d} |F^{\circledast (i+1)}(t,x+h,y+h)&-F^{\circledast (i+1)}(t,x,y)| \, dy \\ &\leq (2C)^{i+1} \frac{\Gamma(\lambda)^{i}}{\Gamma(i \lambda)} |h|^{\gamma-\eps} \int_0^t (t-s)^{-1+\lambda} s^{-1+i\lambda} \, ds. \end{align*} Performing a change of variables, $s \rightsquigarrow tr$, and using the product formula for the Beta function, $B(u,v) = \Gamma(u) \Gamma(v)/\Gamma(u+v)$, we get \begin{align*} \int_0^t (t-s)^{-1+\lambda} s^{-1+i\lambda} \, ds = t^{-1+(i+1) \lambda} B(\lambda,i \lambda) = t^{-1+(i+1) \lambda} \frac{\Gamma(i) \Gamma(i \lambda)}{\Gamma((i+1) \lambda)}. \end{align*} Plugging this identity in the previous estimate shows that \eqref{app-eq67} holds for $i+1$, and this finishes the proof of Step 2. \par \textbf{Conclusion of the proof:} Fix $\eps \in (\gamma_0,\gamma \wedge \alpha_L)$. Since, by \eqref{app-eq63}, \begin{equation*} |\Phi(t,x+h,y+h)-\Phi(t,x,y)| \leq \sum_{i=1}^{\infty} |F^{\circledast i}(t,x+h,y+h)-F^{\circledast i}(t,x,y)| \end{equation*} it follows from the monotone convergence theorem that \begin{equation*} \int_{\mbb{R}^d} |\Phi(t,x+h,y+h)-\Phi(t,x,y)| \, dy \leq \sum_{i=1}^{\infty} \int_{\mbb{R}^d} |F^{\circledast i}(t,x+h,y+h)-F^{\circledast i}(t,x,y)| \, dy, \end{equation*} and so, by Step 2, \begin{equation*} \int_{\mbb{R}^d} |\Phi(t,x+h,y+h)-\Phi(t,x,y)| \, dy \leq |h|^{\gamma-\eps} t^{-1+\lambda} \sum_{i \geq 1} 2^i C^i \frac{\Gamma(\lambda)^{i}}{\Gamma(i \lambda)} \end{equation*} for all $x \in \mbb{R}^d$, $|h| \leq 1$ and $t \in (0,1)$ and suitable constants $C>0$ and $\lambda>0$ (not depending on $x$, $h$, $t$). It is not difficult to see that the series on the right-hand side converges, see \cite[Lemma A.6]{matters} for details, and consequently we have proved the desired estimate. \end{proof} \subsection{Auxiliary result for the proof of Theorem~\ref{ex-21}} \label{iso-aux} Let $(X_t)_{t \geq 0}$ be an isotropic stable-like process with symbol $q(x,\xi) = |\xi|^{\alpha(x)}$ for a H\"{o}lder continuous mapping $\alpha: \mbb{R}^d \to (0,2)$ with $\alpha_L := \inf_x \alpha(x)>0$. From Proposition~\ref{app-1} and Proposition~\ref{feller-7} we obtain immediately that any function $f$ in the Favard space $F_1$ associated with $(X_t)_{t \geq 0}$ satisfies the a-priori estimate \begin{equation} \|f\|_{\mc{C}_b^{\kappa}(\mbb{R}^d)} \leq c (\|A_e f\|_{\infty}+\|f\|_{\infty}) \label{ex-eq21} \end{equation} for $\kappa \in (0,\alpha_L)$; in particular, $F_1 \subseteq \mc{C}_b^{\alpha_L-}(\mbb{R}^d)$. For the proof of Theorem~\ref{ex-21} we need the following auxiliary result which will allow us to derive an improved a priori estimate once we have shown that $f \in F_1$ is sufficiently regular on $\{x \in \mbb{R}^d; \alpha(x) \leq 1\}$. \begin{lem} \label{app-3} Let $(X_t)_{t \geq 0}$ be a Feller process with extended infinitesimal generator $(A_e,\mc{D}(A_e))$, Favard space $F_1$ and symbol $q(x,\xi)=|\xi|^{\alpha(x)}$ for a H\"{o}lder continuous mapping $\alpha: \mbb{R}^d \to (0,2)$ such that \begin{equation*} 0 < \alpha_L := \inf_{x \in \mbb{R}^d} \alpha(x) \leq \sup_{x \in \mbb{R}^d} \alpha(x) < 2. \end{equation*} Let $f \in F_1$ be such that for any $\eps \in (0,\alpha_L)$ there exists a constant $M(\eps)>0$ such that \begin{equation} |\Delta_h f(x)|=|f(x+h)-f(x)| \leq M(\eps) |h|^{\alpha(x)-\eps}, \qquad |h| \leq 1, \label{app-eq9} \end{equation} for any $x \in \{\alpha \leq 1\}$. Then there exists for any $\theta \in (0,1)$ a constant $C=C(\alpha,\theta)$ such that \begin{equation*} |\Delta_h^2 f(x)| \leq C |h|^{1-\theta} (\|A_e f\|_{\infty}+\|f\|_{\infty}+M(\theta/12)), \qquad |h| \leq 1, \end{equation*} for any $x \in \{\alpha \geq 1\}$. \end{lem} \begin{proof} The idea of the proof is similar to the proof of Theorem~\ref{feller-9}. For fixed $0<\theta<\min\{\alpha_L,1/4\}$ define $\tilde{\alpha}(x) := \max\{1-3\theta,\alpha(x)\}$. By \cite[Theorem 5.2]{matters} there exists a Feller process $(Y_t)_{t \geq 0}$ with symbol $p(x,\xi) := |\xi|^{\tilde{\alpha}(x)}$ and the $(L,C_c^{\infty}(\mbb{R}^d))$-martingale problem for the generator $L$ of $(Y_t)_{t \geq 0}$ is well-posed. Since $\alpha$ is H\"{o}lder continuous, there exists $\delta>0$ such that \begin{equation} |x-z| \leq 2\delta \implies |\alpha(x)-\alpha(z)| \leq \theta. \label{app-eq11} \end{equation} As usual, we denote by \begin{equation*} \tau_{\delta}^x := \inf\{t>0; |Y_t-x|>\delta\} \end{equation*} the exit time from the closed ball $\overline{B(x,\delta)}$. Pick $\kappa \in C_b^{\infty}(\mbb{R}^d)$, $0 \leq \kappa \leq 1$, such that $\kappa(x)=0$ for any $x \in \{\alpha \leq 1-2\theta\}$ and $\kappa(x)=1$ for $x \in \{\alpha \geq 1-\theta\}$, see Lemma~\ref{app-5} for the existence of such a mapping. \par \textbf{Step 1:} We are going to show that for any $f \in F_1$ the product $v:=f \cdot \kappa$ is in the domain $\mc{D}(L_e)$ of the extended generator of $(Y_t)_{t \geq 0}$; we will use a similar reasoning as in the proof of Theorem~\ref{feller-9}, i.\,e.\ we will estimate \begin{equation*} \frac{1}{t} \sup_{x \in \mbb{R}^d} |\mbb{E}^x v(Y_{t \wedge \tau_{\delta}^x})-v(x)|. \end{equation*} Clearly, \begin{align*} |\mbb{E}^x v(Y_{t \wedge \tau_{\delta}^x})-v(x)| \leq I_1(x)+I_2(x)+I_3(x) \end{align*} where \begin{align*} I_1(x) &:= |\kappa(x) \mbb{E}^x(f(Y_{t \wedge \tau_{\delta}^x})-f(x))| \\ I_2(x) &:= |f(x) \mbb{E}^x(\kappa(Y_{t \wedge \tau_{\delta}^x})-\kappa(x))| \\ I_3(x) &:= \left|\mbb{E}^x \big( (f(Y_{t \wedge \tau_{\delta}^x})-f(x))(\kappa(Y_{t \wedge \tau_{\delta}^x})-\kappa(x)) \big) \right|. \end{align*} We are going to estimate the terms separately; we start with $I_1$. If $x \in \{\alpha \geq 1-2\theta\}$, then it follows from \eqref{app-eq11} that $B(x,2\delta) \subseteq \{\alpha \geq 1-3\theta\}$ and therefore \begin{equation} q(z,\xi) = |\xi|^{\alpha(z)} = |\xi|^{\tilde{\alpha}(z)} = p(z,\xi) \fa z \in B(x,2\delta), \,\xi \in \mbb{R}^d. \label{app-eq13} \end{equation} Applying Lemma~\ref{feller-13} we find that \begin{equation*} I_1(x) = |\kappa(x) \mbb{E}^x(f(X_{t \wedge \tau_{\delta}^x(X)})-f(x))| \end{equation*} where $\tau_{\delta}^x(X)$ is the exit time of $(X_t)_{t \geq 0}$ from $\overline{B(x,\delta)}$. As $f \in F_1$ an application of Dynkin's formula \eqref{gen-eq6} gives \begin{equation*} I_1(x) \leq t \|A_e f\|_{\infty}. \end{equation*} If $x \in \{\alpha<1-2\theta\}$, then $\kappa(x)=0$ by the very definition of $\kappa$, and so $I_1(x)=0$. Hence, \begin{equation*} \sup_{x \in \mbb{R}^d} I_1(x) \leq t \|A_e f\|_{\infty}. \end{equation*} For $I_2$ we note that $\kappa \in C_b^{\infty}(\mbb{R}^d) \subseteq \mc{D}(L)$, and therefore an application of the (classical) Dynkin formula gives \begin{equation*} \sup_{x \in \mbb{R}^d} I_2(x) \leq t \|f\|_{\infty} \|L\kappa\|_{\infty}. \end{equation*} To estimate $I_3$ we consider two cases separately. If $x \in \{\alpha \leq 1\}$, then it follows from our assumption on the regularity of $f$, cf.\ \eqref{app-eq9}, and the Lipschitz continuity of $\kappa$ that \begin{equation*} |f(Y_{t \wedge \tau_{\delta}^x})-f(x)| \cdot |\kappa(Y_{t \wedge \tau_{\delta}^x})-\kappa(x)| \leq 4 (\|f\|_{\infty}+M(\theta/3)) \|\kappa\|_{C_b^1(\mbb{R}^d)} \min\{|Y_{t \wedge \tau_{\delta}^x}-x|^{\alpha(x)-\theta/3+1},1\}. \end{equation*} Applying Lemma~\ref{feller-15} we find that there exists a constant $c_2=c_2(\alpha_L,\|\alpha\|_{\infty})>0$ such that \begin{align} I_3(x) \leq c_2 (\|f\|_{\infty}+M(\theta/3)) \|\kappa\|_{C_b^1(\mbb{R}^d)} \sup_{|z-x| \leq \delta} \int_{y \neq 0} \min\{1,|y|^{\alpha(x)-\theta/3+1}\} \frac{1}{|y|^{d+\tilde{\alpha}(z)}} \, dy. \label{app-eq15} \tag{$\star$} \end{align} For $x \in \mbb{R}^d$ with $\alpha(x) \leq 1-2\theta$ we note that it follows from the definition of $\tilde{\alpha}$ that $\tilde{\alpha}(z) \geq 1-3\theta$ for all $z \in \mbb{R}^d$, and so \begin{align*} \sup_{x \in \{\alpha \leq 1-2\theta\}} I_3(x) \leq c_2 (\|f\|_{\infty}+M(\theta/3)) \left( \int_{|y| \leq 1} |y|^{-d+2\theta/3} \, dy + \int_{|y|>1} |y|^{-d-1+3\theta} \, dy \right)<\infty. \end{align*} If $1-2\theta \leq \alpha(x) \leq 1$, then $\alpha(z) = \tilde{\alpha}(z)$ for all $|z-x| \leq \delta$; using \eqref{app-eq11} we find from \eqref{app-eq15} that \begin{equation*} \sup_{x \in \{1-2\theta \leq \alpha \leq 1\}} I_3(x) \leq c_2 (\|f\|_{\infty}+M(\theta/3)) \left( \int_{|y| \leq 1} |y|^{-d+1-4\theta/3} \, dy + \int_{|y|>1} |y|^{-d-\alpha_L} \, dy \right)<\infty. \end{equation*} Finally, if $x \in \{\alpha>1\}$, then $\overline{B(x,\delta)} \subseteq \{\alpha \geq 1-\theta\}$, and therefore $\kappa(z)=1$ for any $|z-x| \leq \delta$; hence, \begin{equation*} |f(Y_{t \wedge \tau_{\delta}^x})-f(x)| \cdot |\kappa(Y_{t \wedge \tau_{\delta}^x})-\kappa(x)| \leq 2\|f\|_{\infty} \I_{\{\tau_{\delta}^x \leq t\}} \end{equation*} which implies \begin{equation*} I_3(x) \leq 2 \|f\|_{\infty} \mbb{P}^x(\tau_{\delta}^x \leq t). \end{equation*} Applying the maximal inequality \eqref{max} we get \begin{align*} I_3(x) \leq c_3 \|f\|_{\infty} t \sup_{|z-x| \leq \delta} \sup_{|\xi| \leq \delta^{-1}} |p(z,\xi)| \end{align*} for some absolute constant $c_3>0$. As $|p(z,\xi)| \leq |\xi|^2$ for all $\xi \in \mbb{R}^d$ this shows that \begin{align*} \sup_{x \in \{\alpha>1\}} I_3(x) &\leq c_3 \|f\|_{\infty} t \delta^{-2}. \end{align*} Combining the estimates we conclude that \begin{equation*} \sup_{t>0} \frac{1}{t} \sup_{x \in \mbb{R}^d} |\mbb{E}^x v(Y_{t \wedge \tau_{\delta}^x})-v(x)| \leq c_4 (\|f\|_{\infty}+\|A_e f\|_{\infty}+M(\theta/3)) \end{equation*} for some constant $c_4 = c_4(\theta,\delta,\alpha_L,\|\alpha\|_{\infty},\|L\kappa\|_{\infty})$. \par \textbf{Step 2:} Applying Corollary~\ref{gen-5} we find that $v=f \cdot \kappa$ is in the Favard space $F_1^Y$ of order $1$ associated with $(Y_t)_{t \geq 0}$ and \begin{equation*} \|L_e(f \cdot \kappa)\|_{\infty} \leq c_5 (\|f\|_{\infty}+\|A_e f\|_{\infty}+M(\theta/3)). \end{equation*} Since Proposition~\ref{app-1} shows that the semigroup $(T_t)_{t \geq 0}$ associated with $(Y_t)_{t \geq 0}$ satisfies the H\"older estimate \begin{equation*} \|T_t u\|_{\mc{C}_b^{1-4\theta}(\mbb{R}^d)} \leq c_6 \|u\|_{\infty} t^{-(1-4\theta)/(1-3\theta)}, \qquad t \in (0,1], \,u \in \mc{B}_b(\mbb{R}^d) \end{equation*} for $c_6 = c_6(\alpha,\theta)>0$, it follows from Proposition~\ref{feller-7} that \begin{equation*} \|f \cdot \kappa\|_{\mc{C}_b^{1-4\theta}(\mbb{R}^d)} \leq c_7 (\|f\|_{\infty}+\|A_e f\|_{\infty}+M(\theta/3)) \end{equation*} for some constant $c_7>0$ which does not depend on $f$. Finally, we note that for any $x \in \{\alpha \geq 1\}$ we have $\kappa(z)=1$ for $z \in \overline{B(x,\delta)}$, and therefore it follows for all $|h| \leq \delta/2$ that \begin{align*} |f(x+2h)-2f(x+h)+f(x)| &= |\kappa(x+2h) f(x+2h) -2 \kappa(x+h) f(x+h)+ \kappa(x) +f(x)| \\ &\leq c_7 |h|^{1-4\theta} (\|f\|_{\infty}+\|A_e f\|_{\infty}+M(\theta/3)). \qedhere \end{align*} \end{proof} \subsection{Proof of Theorem~\ref{ex-21} and Corollary~\ref{ex-23} } \label{iso-proofs} \begin{proof}[Proof of Theorem~\ref{ex-21}] Fix $\eps \in (0,\alpha_L)$. Since $\alpha$ is H\"{o}lder continuous there exists $\delta>0$ such that \begin{equation} |\alpha(x)-\alpha(y)| \leq \frac{\eps}{2} \fa |x-y| \leq 4 \delta. \label{ex-st3} \tag{$\star$} \end{equation} Moreover, $\|\alpha\|_{\infty}<2$ implies that we can choose $\theta \in (0,\alpha_L)$ such that $\alpha(x)<2-\theta$ for all $x \in \mbb{R}^d$; without loss of generality, we may assume that $\eps \leq \theta$. We divide the proof in two steps. In the first part, we will establish the H\"{o}lder regularity of functions $f \in F_1$ at points $x \in \mbb{R}^d$ such that $\alpha(x)\leq 1+\alpha_L-\theta$. In the second part, we will consider the remaining points. \par \medskip \textbf{Step 1:} There exists a constant $C_1>0$ such that \begin{equation} |\Delta_h^2 f(x)| \leq C_1 |h|^{\alpha(x)-\eps} (\|A_e f\|_{\infty}+\|f\|_{\infty}) \fa f \in F_1, \, |h| \leq \delta, \, x \in \{\alpha \leq \alpha_L+ 1-\theta\}. \label{ex-eq23} \end{equation} \emph{Indeed:} Fix $x \in \mbb{R}^d$ such that $\alpha(x) \leq \alpha_L+1-\theta$ and define \begin{equation*} \alpha^x(z) := \max\{\alpha(z),\alpha(x)-\eps/2\}, \qquad z \in \mbb{R}^d. \end{equation*} It is not difficult to see that $\|\alpha^x\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)} \leq \|\alpha\|_{\mc{C}_b^{\gamma}(\mbb{R}^d)}$ and, moreover, \begin{equation*} \alpha^x_L := \inf_{z \in \mbb{R}^d} \alpha^x(z) \geq \alpha(x)-\frac{\eps}{2}>0. \end{equation*} It follows from \cite[Theorem 5.2]{matters} that there exists a Feller process with symbol $p(z,\xi) := |\xi|^{\alpha^x(z)}$ and that the $(L,C_c^{\infty}(\mbb{R}^d))$-martingale problem for the generator $L$ of $(Y_t)_{t \geq 0}$ is well-posed. Note that, by \eqref{ex-st3}, $\alpha^x(z)=\alpha(z)$ for $|z-x| \leq 4\delta$ and therefore \begin{equation*} q(z,\xi) = |\xi|^{\alpha(z)} = |\xi|^{\alpha^x(z)} = p^{(x)}(z,\xi) \fa \xi \in \mbb{R}^d, \,|z-x| \leq 4 \delta. \end{equation*} Moreover, an application of Lemma~\ref{app-3} shows that there exists a constant $c_1=c_1(\eps,\alpha)$ such that the semigroup $(T_t)_{t \geq 0}$ associated with $(Y_t)_{t \geq 0}$ satisfies \begin{equation} \|T_t u\|_{\mc{C}_b^{\alpha(x)-\eps}(\mbb{R}^d)} \leq c_1 \|u\|_{\infty} t^{-(\alpha(x)-\eps)/(\alpha(x)-\eps/2)} \label{ex-eq25} \end{equation} for any $u \in \mc{B}_b(\mbb{R}^d)$ and $t \in (0,1]$. This shows that the conditions \eqref{C1}-\eqref{C4} in Theorem~\ref{feller-9} are satisfied. By \eqref{ex-eq21} it follows from Theorem~\ref{feller-9} (with $\varrho(x) := \alpha_L-\theta/4$) that there exists a constant $c_2=c_2(\eps,\alpha)$ such that \begin{equation*} |\Delta_h^2 f(x)| \leq c_2 K(x) |h|^{\alpha(x)-\eps} (\|A_e f\|_{\infty}+\|f\|_{\infty}), \qquad f \in F_1, \,|h| \leq \delta \end{equation*} where \begin{equation*} K(x) := \sup_{z \in \mbb{R}^d} \int_{y \neq 0} \min\{1,|y|^2\} \frac{1}{|y|^{d+\alpha^x(z)}} dy + \sup_{|z-x| \leq 4\delta} \int_{y \neq 0} \min\{1,|y|^{1+\alpha_L-\theta/4}\} \frac{1}{|y|^{d+\alpha^x(z)}} \, dy; \end{equation*} if we can show that $K:=\sup_{x \in \{\alpha \leq \alpha_L+1-\theta\}} K(x) < \infty$, this gives \eqref{ex-eq23}. To this end, we note that $\eps \leq \theta$ and \eqref{ex-st3} imply \begin{equation*} \alpha^x(z) = \alpha(z) \leq \alpha(x)+\frac{\eps}{2} \leq (\alpha_L+1-\theta) + \frac{\theta}{2} = \alpha_L+1-\frac{\theta}{2} \fa |z-x| \leq 4 \delta \end{equation*} and so \begin{equation*} K \leq \sup_{\beta \in [\alpha_L,\|\alpha\|_{\infty}]} \int_{y \neq 0} \min\{1,|y|^2\} \frac{1}{|y|^{d+\beta}} \, dy + \sup_{\beta \in [\alpha_L,\alpha_L+1-\theta/2]} \int_{y \neq 0} \min\{1,|y|^{1+\alpha_L-\theta/4}\} \frac{1}{|y|^{d+\beta}} \, dy < \infty. \end{equation*} \textbf{Step 2:} There exists $C_2>0$ such that \begin{equation*} |\Delta_h^2 f(x)| \leq C_2 |h|^{\alpha(x)-\eps} (\|A_e f\|_{\infty}+\|f\|_{\infty}) \fa f \in F_1, \, |h| \leq \delta, \, x \in \{\alpha \geq \alpha_L+1-\theta\}. \end{equation*} \emph{Indeed:} It follows from Lemma~\ref{app-3} and Step 1 that there exists a constant $c_3>0$ such that \begin{equation} |\Delta_h^2 f(x)| \leq c_3 |h|^{1-\theta/2} (\|A_e f\|_{\infty}+\|f\|_{\infty}), \qquad |h| \leq 1, \label{ex-eq27} \end{equation} for any $f \in F_1$ and $x \in \{\alpha \geq 1\}$. Thanks to this improved a priori-estimate for $f \in F_1$ we can use a very similar reasoning as in the first part of the proof to deduce the desired estimate. If we set $\alpha^x(z) := \max\{\alpha(z),\alpha(x)-\eps/2\}$ for fixed $x \in \{\alpha \geq 1+\alpha_L-\theta\}$, then it follows exactly as in Step 1 that the Feller process $(Y_t)_{t \geq 0}$ with symbol $p(z,\xi) := |\xi|^{\alpha^x(z)}$ satisfies \eqref{C1}-\eqref{C4} in Theorem~\ref{feller-9}; in particular, \eqref{ex-eq25} holds for the associated semigroup $(T_t)_{t \geq 0}$. Because of \eqref{ex-eq27} we may apply Theorem~\ref{feller-9} with $\varrho(x) := 1-\theta/2$ to obtain \begin{align*} |\Delta_h^2 f(x)| \leq c_4 K(x) |h|^{\alpha(x)-\eps} (\|A_e f\|_{\infty}+\|f\|_{\infty}), \qquad f \in F_1 \end{align*} for a constant $c_4$ (not depending on $f$ and $x$) and \begin{equation*} K(x) := \sup_{z \in \mbb{R}^d} \int_{y \neq 0} \min\{1,|y|^2\} \frac{1}{|y|^{d+\alpha^x(z)}} \, dy + \sup_{|z-x| \leq 4 \delta} \int_{y \neq 0} \min\{1,|y|^{2-\theta/2}\} \frac{1}{|y|^{d+\alpha^x(z)}} \, dy. \end{equation*} By our choice of $\theta$, we have $\alpha_L \leq \alpha^x(z) \leq \|\alpha\|_{\infty} < 2 - \theta$, and so \begin{equation*} \sup_{x \in \{\alpha \geq 1+\alpha_L-\theta\}} K(x) \leq 2\sup_{\beta \in [\alpha_L,\|\alpha\|_{\infty}]} \int_{y \neq 0} \min\{1,|y|^2\} \frac{1}{|y|^{d+\beta}} \, dy + \int_{|y| \leq 1} |y|^{-d+\theta/2} \, dy < \infty. \qedhere \end{equation*} \end{proof} \begin{proof}[Proof of Corollary~\ref{ex-23}] We are going to apply Theorem~\ref{feller-12} to prove the assertion. To this end, we first need to construct for each $x \in \mbb{R}^d$ a Feller process $(Y_t^{(x)})_{t \geq 0}$ which satisfies \eqref{C1}-\eqref{C4} from Theorem~\ref{feller-9} as well as \eqref{S1}-\eqref{S4} from Theorem~\ref{feller-12}. Recall that $\alpha_L =\inf_x \alpha(x)>0$ and that $\gamma \in (0,1)$ is the H\"{o}lder exponent of $\alpha$. \par Fix $\eps \in (0,\alpha_L \wedge \gamma)$ and $x \in \mbb{R}^d$. Since $\alpha$ is H\"{o}lder continuous there exists $\delta>0$ such that \begin{equation} |\alpha(z+y)-\alpha(z)| \leq \frac{\eps}{4} \fa z \in \mbb{R}^d,\, |h| \leq \delta. \label{ex-eq28} \tag{$\star$} \end{equation} If we define \begin{equation*} \alpha^x(z) := (\alpha(x)-\eps/4) \vee \alpha(z) \wedge (\alpha(x)+\eps/4), \qquad z \in \mbb{R}^d, \end{equation*} then it follows from \cite[Theorem 5.2]{matters} that there exists a Feller process $(Y_t^{(x)})_{t \geq 0}$ with symbol $p^{(x)}(z,\xi) := |\xi|^{\alpha^x(z)}$ such that the martingale problem for its generator is well-posed. Moreover, by our choice of $\delta$, \begin{equation*} q(z,\xi) = |\xi|^{\alpha(z)} = |\xi|^{\alpha^x(z)} = p^{(x)}(z,\xi) \fa \xi \in \mbb{R}^d,\, |z-x| \leq 4 \delta, \end{equation*} and so \eqref{C1} and \eqref{C2} from Theorem~\ref{feller-9} hold. Applying Proposition~\ref{app-1} and Proposition~\ref{app-25}, it follows that the semigroup $(T_t^{(x)})_{t \geq 0}$ associated with $(Y_t^{(x)})_{t \geq 0}$ satisfies \begin{equation*} \|T_t^{(x)} u\|_{\mc{C}_b^{\kappa(x)}(\mbb{R}^d)} \leq c_1 \|u\|_{\infty} t^{-\beta(x)}, \quad u \in \mc{B}_b(\mbb{R}^d), \,t \in (0,1), \end{equation*} and \begin{equation*} \|T_t^{(x)} u\|_{\mc{C}_b^{\kappa(x)+\lambda}(\mbb{R}^d)} \leq c_1 \|u\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} t^{-\beta(x)}, \qquad u \in \mc{C}_b^{\lambda}(\mbb{R}^d), \,t \in (0,1), \end{equation*} for any $\lambda \leq \Lambda:=\gamma$ where $c_1>0$ is some constant (not depending on $u$, $t$, $x$) and \begin{equation*} \kappa(x) := \alpha(x)-\eps \qquad \quad \beta(x) := \frac{\alpha(x)-2\eps}{\alpha(x)-\eps/4}. \end{equation*} Consequently, we have established \eqref{C4} and \eqref{S3}. Since $\kappa$ is clearly uniformly continuous and bounded away from zero, we get immediately that \eqref{S5} holds. Moreover, as $\alpha$ is bounded away from zero and from two, it follows easily that \eqref{S1} and \eqref{S4} hold with $\alpha^{(x)}(z) := \alpha^x(z)$. Finally, we note that the H\"{o}lder condition \eqref{S2} on the symbol $p^{(x)}$ is a consequence of the H\"{o}lder continuity of $\alpha$, see Lemma~\ref{aux-1} below for details. \par We are now ready to apply Theorem~\ref{feller-12}. Let $f \in \mc{D}(A)$ be such that $Af= g \in \mc{C}_b^{\lambda}(\mbb{R}^d)$ for some $\lambda>0$. Without loss of generality, we may assume that $\lambda \leq \gamma$. Since $(X_t)_{t \geq 0}$ satisfies the assumptions of Theorem~\ref{ex-21}, it follows that $f \in \mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)$ for $\varrho(x) := \alpha(x)-\eps/4$ and, moreover, \begin{equation} \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)} \leq C_{\eps} (\|Af\|_{\infty} + \|f\|_{\infty}). \label{ex-eq29} \end{equation} Furthermore, by our choice of $\delta$, cf.\ \eqref{ex-eq28}, we find that \begin{equation*} \sigma := \inf_{x \in \mbb{R}^d} \inf_{|z-x| \leq 4\delta} (1+\varrho(x)-\alpha^x(z)) \end{equation*} satisfies $\sigma \geq 1-\eps/4$. Applying Theorem~\ref{feller-12} we conclude that \begin{equation*} f \in \mc{C}_b^{\kappa(\cdot)+\min\{\gamma,\lambda,1-\eps/4\}-\eps/4}(\mbb{R}^d) \subseteq \mc{C}_b^{\alpha(\cdot)+\min\{\gamma,\lambda\}-2\eps}(\mbb{R}^d) \end{equation*} and \begin{align*} \|f\|_{\mc{C}_b^{\alpha(\cdot)+\min\{\gamma,\lambda\}-2\eps}(\mbb{R}^d)} &\leq C_{\eps}' (\|Af\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\mc{C}_b^{\varrho(\cdot)}(\mbb{R}^d)}) \leq C_{\eps}'' (\|Af\|_{\mc{C}_b^{\lambda}(\mbb{R}^d)} + \|f\|_{\infty}) \end{align*} where we used \eqref{ex-eq29} for the last inequality. \end{proof} \begin{lem} \label{aux-1} For fixed $\alpha \in (0,2)$ denote by $\nu_{\alpha}$ the L\'evy measure of the isotropic $\alpha$-stable L\'evy process, i.\,e.\ \begin{equation} |\xi|^{\alpha} = \int_{y \neq 0} (1-\cos(y \cdot \xi)) \, \nu_{\alpha}(dy), \qquad \xi \in \mbb{R}^d. \label{aux-eq1} \end{equation} Let $\beta: \mbb{R}^d \to (0,2)$ be such that $\beta \in C_b^{\gamma}(\mbb{R}^d)$ for some $\gamma \in (0,1]$ and \begin{equation*} 0 < \beta_L := \inf_{z \in \mbb{R}^d} \beta(z) \leq \sup_{z \in \mbb{R}^d} \beta(z)<2. \end{equation*} If $u: \mbb{R}^d \to \mbb{R}$ is a measurable mapping such that \begin{equation} |u(y)| \leq M \min\{|y|^{\beta(z)+r},1\}, \qquad y \in \mbb{R}^d, \label{aux-eq3} \end{equation} for some $z \in \mbb{R}^d$, $r>0$ and $M>0$, then there exist constants $K>0$ and $H>0$ (not depending on $u$ and $z$) such that \begin{equation*} \left| \int u(y) \, \nu_{\beta(z)}(dy) - \int u(y) \, \nu_{\beta(z+h)}(dy) \right| \leq M K |h|^{\gamma} \fa |h| \leq H. \end{equation*} \end{lem} \begin{proof} It is well known that $\nu_{\alpha}(dy) = c(\alpha) |y|^{-d-\alpha}$ where $c(\alpha)$ is a normalizing constant such that \eqref{aux-eq1} holds. Noting that, by the rotational invariance of $\xi \mapsto |\xi|^{\alpha}$, \begin{equation*} |\xi|^{\alpha} = c(\alpha) \int_{y \neq 0} (1-\cos(y_1 |\xi|)) \frac{1}{|y|^{d+\alpha}} \, dy =|\xi|^{\alpha} c(\alpha) \int_{y \neq 0} (1-\cos(y_1)) \frac{1}{|y|^{d+\alpha}} \, dy \end{equation*} for all $\xi \in \mbb{R}^d$, we find $c(\alpha)=1/h(\alpha)$ for \begin{equation*} h(\alpha) := \int_{y \neq 0} (1-\cos(y_1)) \frac{1}{|y|^{d+\alpha}} \, dy. \end{equation*} Using that \begin{align} \left| \frac{1}{r^{d+\alpha}}- \frac{1}{r^{d+\tilde{\alpha}}}\right| = \frac{1}{r^{2d+\alpha+\beta}} |r^{d+\tilde{\alpha}}-r^{d+\alpha}| \leq |\log(r)| r^{-d} \max\{r^{-\alpha},r^{-\tilde{\alpha}}\} |\alpha-\tilde{\alpha}| \label{aux-eq5} \end{align} for any $r>0$ and $\alpha,\tilde{\alpha} \in I:=[\beta_L,\|\beta\|_{\infty}] \subseteq (0,2)$, it follows easily that \begin{equation*} |h(\alpha)-h(\tilde{\alpha})| \leq C_1 |\alpha-\tilde{\alpha}|, \qquad \alpha,\tilde{\alpha} \in I \end{equation*} for some constant $C_1>0$. As $\inf_{\alpha \in I} h(\alpha)>0$ this implies that $c(\alpha)=1/h(\alpha)$ satisfies \begin{equation} |c(\alpha)-c(\tilde{\alpha})| \leq C_2 |\alpha-\tilde{\alpha}|, \qquad \alpha,\tilde{\alpha} \in I \label{aux-eq7} \end{equation} for some constant $C_2>0$. \par Now let $u: \mbb{R}^d \to \mbb{R}$ be a measurable mapping such that \eqref{aux-eq3} holds for some $z \in \mbb{R}^d$, $M>0$ and $r>0$. Since $\nu_{\alpha}(dy) = c(\alpha) |y|^{-d-\alpha} \, dy$ we have \begin{equation*} \left| \int u(y) \, \nu_{\beta(z)}(dy) - \int u(y) \, \nu_{\beta(z+h)}(dy) \right| \leq I_1+I_2 \end{equation*} where \begin{align*} I_1 &:= |c(\beta(z))-c(\beta(z+h))| \int_{y \in \mbb{R}^d} |u(y)| \frac{1}{|y|^{d+\beta(z)}} \, dy \\ I_2 &:= c(\beta(z+h)) \int_{y \neq 0} |u(y)| \left| \frac{1}{|y|^{d+\beta(z)}}-\frac{1}{|y|^{d+\beta(z+h)}} \right| \, dy. \end{align*} By the first part of the proof, cf.\ \eqref{aux-eq7}, and by \eqref{aux-eq3}, we find \begin{equation*} I_1 \leq C_2 M |\beta(z)-\beta(z+h)| \int_{y \in \mbb{R}^d} \min\{|y|^{\beta(z)+r},1\} \frac{1}{|y|^{d+\beta(z)}} \, dy \end{equation*} and so \begin{equation*} I_1 \leq C_2 M |h|^{\gamma} \|\beta\|_{C_b^{\gamma}(\mbb{R}^d)} \sup_{\alpha \in I} \int_{y \neq 0} \min\{|y|^{\alpha+r},1\} |y|^{d-\alpha} \, dy =: C_{3} M |h|^{\gamma} \end{equation*} for all $h \in \mbb{R}^d$. To estimate $I_2$ we choose $H>0$ such that \begin{equation*} |\beta(x)-\beta(x+h)| \leq \frac{\min\{r,\beta_L\}}{2} \fa x \in \mbb{R}^d, |h| \leq H. \end{equation*} By \eqref{aux-eq3} and \eqref{aux-eq5}, we get \begin{align*} I_2 \leq M |\beta(z)-\beta(z+h)| \sup_{\alpha \in I} c(\alpha) \int_{y \neq 0} \min\{|y|^{\beta(z)+r},1\} |\log(|y|)| \frac{\max\{|y|^{-\beta(z)},|y|^{-\beta(z+h)}\}}{|y|^{d}} \, dy \end{align*} for all $|h| \leq H$. By our choice of $H$, it holds that \begin{equation*} \frac{\beta(z)}{2} \leq \beta(z)-\frac{\beta_L}{2} \leq \beta(z+h) \leq \beta(z) + \frac{r}{2} \fa |h| \leq H, \end{equation*} and therefore \begin{align*} I_2 &\leq M |\beta(z)-\beta(z+h)| \sup_{\alpha \in I} c(\alpha) \left( \int_{|y| \leq 1} |y|^{-d+r/2} |\log(|y|)| \ dy + \int_{|y|>1} |y|^{-d-\beta(z)/2} \log(|y|) \,dy \right) \\ &\leq C_4 M |h|^{\gamma} \end{align*} for all $|h| \leq H$ and \begin{equation*} C_4 := \|\beta\|_{C_b^{\gamma}(\mbb{R}^d)} \sup_{\alpha \in I} c(\alpha) \left( \int_{|y| \leq 1} |y|^{-d+r/2} |\log(|y|)| \ dy + \sup_{\alpha \in I} \int_{|y|>1} |y|^{-d-\alpha/2} \log(|y|) \,dy \right)<\infty. \qedhere \end{equation*} \end{proof}
\section{Introduction} A key feature of physics, which distinguishes it from other areas of human knowledge is that it describes the world in terms of exact physical laws. Dynamics of any system can, in principle, be reduced to dynamics of its components and their interactions, and each physical component can be exactly described in terms of its equations of motion. However, this simple paradigm can be difficult to realize in practice, especially when the number of the consitutent components becomes too large. Statisical physics deals with systems containing close-to-infinity number of elements, which makes it somewhat similar to various statistical problems, where individual laws are not known, but the only known thing is a small sample of the ensemble and its empirical properties. These properties may be, in principle, uncovered by using statistical learning - a way to extract general patterns within the sample and to use them to predict the properties of the whole system. Statistical learning includes various methods \cite{james2014introduction}, and the most prominent of them are neural networks \cite{Goodfellow-et-al-2016}. From this perspective, it seems interesting to use them to get knowledge about statistical physics. Indeed, in the recent years, neural networks were proven to be successful in describing various physical properties, such as magnetic phases and critical temperature of the Ising model \cite{Carrasquilla2017}, as well as other similar lattice models (such as e.g. Hubbard model \cite{PhysRevX.7.031038}, topological phases in various models \cite{PhysRevLett.120.066401, zhang2017machine, beach2018machine}, many body localization \cite{PhysRevLett.120.257204} etc). We also remark that neural networks have also been used in condensed matter physics for other various purposes (e.g. representaion of quantum states \cite{PhysRevB.96.195145} or many-body quantum state tomography \cite{Torlai2018}). However, the key question is: can neural networks give new insights about many body physics, which were not discovered before? To address this question, we consider another well-known model of statistical physics - 3D lattice dimer model, which contains sites forming a lattice and edges connecting the sites, so that every edge can be either empty or occupied by a dimer, provided the total number of dimers at each site is equal to one. This simple model has a long history in condensed matter physics. It has been studied since 1960-s, when it was realized that the total number of dimer coverings on a planar lattice can be computed analytically \cite{doi:10.1063/1.1703953}. Soon after, it was realized that dimer model on a so-called Fisher lattice is dual to 2D Ising model on a square lattice, which made it possible to solve the Ising model analytically \cite{doi:10.1063/1.1704825}. Later on, lattice dimer model has been extensibely probed as a candidate model for high-temperature superconductivity \cite{ANDERSON1196, PhysRevLett.61.2376} - it was suggested that dimers may describe electron singlets formed between neighboring sites. More recently, dimer model on a diamond lattice has been interpreted as a dual to spin system on pyrochlore lattice, which, in turn, hosts exotic spin ice state \cite{PhysRevB.84.115129, PhysRevB.69.064404, doi:10.1146/annurev-conmatphys-020911-125058, RevModPhys.82.53}. The most up-do-date idea to realize lattice dimer model in experiments is a so-called artificial spin ice, i.e. a lattice of nanomagnets \cite{RevModPhys.85.1473, Perrin2016, Lao2018, doi:10.1063/1.4861118, Keller2018}. Dynamics of the lattice dimer model can be described by applying local flips to dimers, i.e. change of orientation for a pair of parallel dimers within one plaquette (see Fig. \ref{DimerFlip}). This definition of dynamics is natural given that all condensed matter systems are local. Moreover, the concept of local flips follows from quantum generalization of the lattice dimer model, known as Rokhsar-Kivelson model \cite{PhysRevLett.61.2376}. The later is known to host a spin liquid phase \cite{PhysRevB.68.184512}, whose excitations spectrum depends on the type of the underlying lattice: on a bipartite lattice gapless $U(1)$ phase is realized, whereas on a non-bipartite lattice, a gapped $Z_2$ phase appears. The difference between bipartite and non-biparite lattices persists on a classical level: on a bipartite lattice, dimer configurations can be described using effective magnetic field (which in 2D case gets reduced to 'weights representation') \cite{PhysRevLett.91.167004}, whereas a similar representation is not known on a non-bipartite lattice. Despite its simplifity, theoretical properties of the classical lattice dimer model are not yet fully explored. For example, one important question about it is: can we use a sequence of local flips in order to transform one given configuration of dimers to another given configuration? This question was in part addressed in the Ref. \cite{PhysRevB.84.245119} - it was pointed out that configurations in lattice dimer model can be characterized by an invariant, which does not change under local flips, a pfaffian of so-called Kasteleyn matrix. It was found that in the case of a planar lattice (e.g. 2D plane), such invariant is always equal to $+1$, whereas in the case of a non-planar (e.g. 3D) lattice, there exist both configurations, where this invariant is equal to $+1$ (such as trivial maximally flippable state, see Fig. \ref{Hopfion_0}), and $-1$ (a 'hopfion' - the name was introduced from a continuum limit of a cubic lattice \cite{PhysRevB.84.245119}, see Fig. \ref{JustHopfion}). The problem of finding distinct topological classes of dimer configurations can be viewed as a classification problem from machine learning point of view, and therefore, it can be addressed by using the most powerful machine learning method - neural networks. Motivated by this, we study dimer configurations in the following way: first, we train the neural network on a dataset of configurations from two known topological classes, and after it, we test the neural network on a different dataset of configurations from various topological classes. We find that the neural network is able to successfully distinguish dimer configurations from the two topological classes used for training, but more interestingly, the neural network is able to distinguish dimer configurations from other classes, thus answering the question of the full topological classification. We obtain that on a bipartite (in our case cubic) lattice, hopfions are characterized by an integer topological invarariant, whereas on a non-bipartite lattice (we consider an example of stacked triangular lattice), dimer configurations are characterized by $\mathtt{Z}_2$ invariant. We remark, that this reasoning gave us a hint that on a bipartite lattice, dimer configurations can be characterized by an exact Hopf number \cite{e1996force, arnold2013topological, PhysRevB.84.184501, PhysRevLett.51.2250, PhysRevB.88.201105, PhysRevB.94.035137, 0256-307X-35-1-013701, PhysRevB.95.161116, PhysRevLett.119.156401, Volovik1977}, which we later verified analytically \cite{MyArticle}. However, on a non-bipartite lattice, the neural network is the only known way to obtain the topological classification of dimer configurations. This is the main idea of the paper: neural networks can successfully identify new topological phases, not known in advance, and as such, they can be used to give 'hints' about unknown properties of physical systems, which can be later verified by other, more rigorous techniques. This paper is organized as follows. In Sec. \ref{Sec:CubicLattice} we introduce 3D lattice dimer model and describe our method in the case of cubic lattice. In Sec. \ref{Sec:TriangularLattice} we repeat our study in the case of stacked triangular lattice. In Sec. \ref{Sec:Discussion} we summarize our findings. In the appendix, we describe technical details of our method (Sec. \ref{Sec:Methods}) and briefly present analytical construction of the Hopf invariant (Sec. \ref{Sec:HopfNumber}). For a more detailed discussion about Hopf invariant in 3D lattice dimer model, we refer to the Ref. \cite{MyArticle}. \section{Dimer model on a cubic lattice} \label{Sec:CubicLattice} We start from revising the basic properties of lattice dimer model. Let us consider a lattice, i.e. a chain of periodically aligned sites, and assume that each pair of the nearest neighboring sites is connected with a bond. We place dimers on some of the bonds, i.e. assume that every bond is either empty, or occupied with a dimer. We also assume that the dimers are placed on a lattice in such a way, that they satisfy a constraint: every site is attached to exactly one dimer. A few possible examples of dimer configurations on a lattice with $4 \times 4 \times 4$ sites are shown on the Fig. \ref{DimerConfigurations}. Indeed, on the Fig. \ref{DimerConfigurations} one can see the bonds filled with dimers, and check that every lattice site is attached to exactly one dimer. We allow dimer configurations to change by applying random local flips. A local flip is a transformation, which simultaneously changes orientation of two parallel dimers within one plaquette (see Fig. \ref{DimerFlip}). We refer to a pair of configurations as equivalent, if they can be trasnsformed into each other by a series of local flips. For example, on the Fig. \ref{Hopfion_0} all dimers are parallel to each other, and therefore it is possible to apply a local flip to any of its plaquettes. Afterwards, one can repeat applying local flips to to any of the plaquettes, whose dimers are parallel, thus generating various equivalent configurations. On the Figs. \ref{Hopfion_1}, \ref{Hopfion_2} not all dimers are parallel to each other, and therefore one can apply local flips to those plaquettes, whose dimers are parallel. Thus from every dimer configuration, it is possible to generate a lot of equivalent configurations by applying local flips. The key question, that we want to answer is: are all dimer configurations on a given lattice are equivalent, i.e. can be obtained from each other by applying local flips, or are there distinct topological classes, such that configurations from different classes cannot be transformed into each other by applying local flips? Previously, in the Ref. \cite{PhysRevB.84.245119}, there was presented an argument that not all configurations in 3D lattice dimer model are equivalent. The idea was the following: the lattice can be characterized by Kasteleyn matrix $M_{ij}$ with the indices $i,j$ enumerating all lattice sites, such that its components take values $\pm i$, and their signs are chosen in such a way, that a product of $M_{ij}$ around each plaquette is equal to $-1$ (see Figs. \ref{MatrixArrangementPlaquette}, \ref{MatrixArrangement} for the precise arrangement). Similarly, each dimer configuration can be characterized by another matrix $n_{ij}$, whose components are equal to $1$ if the sites $i,j$ are connected with a dimer, and zero otherwise. It is straightforward to check that the expression $\mathrm{Pf} (M_{ij} n_{ij})$ is invariant under local flips. On the other hand, one can explicitly compute this invariant for specific dimer configurations and see that it may take different values. For example, this invariant is equal to $1$ for a trivial dimer configuration, shown on the Fig. (\ref{Hopfion_0}). In contrast, a non-trivial configuration, shown on the Figs. (\ref{JustHopfion}, \ref{Hopfion_1}) has $\mathrm{Pf} (M_{ij} n_{ij}) = -1$. Since the invariant $\mathrm{Pf} (M_{ij} n_{ij})$ does not change under local flips, but at the same time it takes different values for two configurations '0' (Fig.\ref{Hopfion_0}) and '1' (Fig.\ref{Hopfion_1}), these configurations cannot be transformed to each other by applying a series of local flips. We refer the configuration shown on the Fig. \ref{JustHopfion} as a \textit{hopfion}, following the Ref. \cite{PhysRevB.84.245119}, where it was given such name, because in the continuum limit, it behaves as a field configuration with a non-trivial Hopf number. The previous argument makes it possible to see that space of all dimer configurations contains different inequivalent classes, but there still remains a question whether a pair of dimer configurations with the same value of $\mathrm{Pf} (M_{ij} n_{ij})$ always belong to the same class. For example, if we 'stack' two hopfions on top of each other (see Fig. \ref{Hopfion_2}), the resulting configuration has $\mathrm{Pf} (M_{ij} n_{ij}) =+1$, i.e. the same as for the trivial dimer configuration (Fig. \ref{Hopfion_0}), but do they belong to the same topological class? To find an answer to this question, we implement one of the most popular machine learning algorithms - a neural network. The main idea is the following: if we train the neural network to distinguish configurations equivalent to the trivial (Fig. \ref{Hopfion_0}) and the hopfion (Fig. \ref{Hopfion_1}), what will it tell us about the unknown configuration containing two hopfions (Fig. \ref{Hopfion_2})? We create our training and test datasets by Monte Carlo method. More specifically, we consider a cubic lattice of the size of $4 \times 4 \times 4$ and with open boundary conditions. We start from configurations from each of the classes, shown on the Figs. (\ref{Hopfion_0} - \ref{Hopfion_2}) and apply a sequence of local flips to each of these two configurations. In particular, to generate the training dataset, we start from two configurations '0' and '1' from each of the classes: the first ('0') has all dimers aligned in $z$ direction (see Fig. \ref{Hopfion_0}), and the second ('1') is a hopfion surrounded by vertically aligned dimers (see Fig. \ref{Hopfion_1}). We apply a sequence of local flips to each of these two configurations, and assign the label '0' or '1' to the outputs by using the fact that local flips preserve the topological class. \begin{figure} \begin{subfigure}[b]{0.2\textwidth} \includegraphics[width=4cm, angle=0] {MatrixArrangementPlaquette_4.pdf} \subcaption{} \label{MatrixArrangementPlaquette} \end{subfigure} \hspace{1cm} \begin{subfigure}[b]{0.2\textwidth} \vspace{0.4cm} \includegraphics[width=4cm,angle=0] {MatrixArrangementSmall_1.pdf} \subcaption{} \label{MatrixArrangement} \end{subfigure} \hspace{1cm} \caption{\small A dimer lattice is parametrized by antisymmetric matrix $M_{ij}$, whose components are equal to $\pm i$ in such a way, that a product of matrix components around a plaquette is equal to $-1$. (\subref{MatrixArrangementPlaquette}) shows arrangement of signs of $i$ along a given plaquette, which are marked by arrows. (\subref{MatrixArrangement}) shows the same arrangement within 3D lattice. \label{KasteleynMatrix} } \end{figure} \begin{figure} \begin{subfigure}[b]{0.2\textwidth} \includegraphics[width=4cm, angle=0] {DimerFlipFancyVertical_2.pdf} \subcaption{} \label{DimerFlip} \end{subfigure} \hspace{1cm} \begin{subfigure}[b]{0.2\textwidth} \includegraphics[width=4cm,angle=0] {JustHopfionFancy_6.pdf} \subcaption{} \label{JustHopfion} \end{subfigure} \hspace{1cm} \begin{subfigure}[b]{0.2\textwidth} \includegraphics[width=4cm,angle=0] {Hopfion_0_3.pdf} \subcaption{} \label{Hopfion_0} \end{subfigure} \hspace{1cm} \begin{subfigure}[b]{0.2\textwidth} \includegraphics[width=4cm,angle=0] {Hopfion_1_3.pdf} \subcaption{} \label{Hopfion_1} \end{subfigure} \hspace{1cm} \begin{subfigure}[b]{0.2\textwidth} \vspace{-0.4cm} \includegraphics[width=4cm,angle=0] {Hopfion_2_3.pdf} \subcaption{} \label{Hopfion_2} \end{subfigure} \caption{ A lattice dimer model consists of a dimer lattice lattice, and dimers placed on its bonds, in such a way that every site is attached to exactly one dimer. (\subref{DimerFlip}) Two dimer configurations are considered equivalent if they can be connected to each other by a series of local flips. (\subref{JustHopfion}) The simplest dimer configuration, which is not equivalent to trivially aligned dimers is a hopfion. To perform our study we used (\subref{Hopfion_0}) $4 \times 4 \times 4$ lattice with trivially aligned dimers, (\subref{Hopfion_1}) a hopfion placed on a lattice of the same size and surrounded by trivially aligned dimers, and (\subref{Hopfion_2}) two hopfions stacked on the same lattice, and also surrounded by trivially aligned dimers. } \label{DimerConfigurations} \end{figure} We train the neural network to distinguish, whether each configuration belongs to the class '0' or '1'. More specifically, we define the neural network in such a way, that it takes a dimer configuration as input, and outputs its topological class. We use a fully-connected neural network with one hidden and output layer, and repeat the procedure for different number of hidden units. In each hidden unit, we use the activation function $relu$, but in the output layer, we do not use any activation function: in other words, the output is simply a linear superposition of the results from hidden units with an added bias. After training, we apply the neural network to a test dataset, which is generated by applying local flips to configurations containing zero, one and two hopfions respectively (see Figs. \ref{Hopfion_0}, \ref{Hopfion_1}, \ref{Hopfion_2}). We find, that our neural network can successfully distinguish all of them. It outputs a real number approximately equal to the number of hopfions (which can be either zero, or one, or two), and its accuracy improves with increasing number of units. Thus, if we assume that the trivial configuration (Fig. \ref{Hopfion_0}) has topological number 0, and configuration with one hopfion (Fig. \ref{Hopfion_1}) has topological number 1, then the neural network tells us that the configuration with two hopfions (Fig. \ref{Hopfion_2}) has topological number 2. In other words, the neural network gives us a hint that the dimer configurations (Fig. \ref{Hopfion_0}, \ref{Hopfion_1}, \ref{Hopfion_2}) are characterized by an integer topological invariant, as we would expect from its continuum limit. Since, we know that in the continuum limit, field configurations are characterized by a Hopf invariant, we believe that our lattice configurations are characterized by the same integer topological invariant. If we believe, that a hopfion is actually described by a Hopf number, then its mirror image has to be described by Hopf number of the opposite sign. We are interested in checking it using our neural network. If we reflect the configurations within our test dataset, and substitute them into the neural network, it outputs negative number, which, for a small training dataset, does not as closely approach $-1$ or $-2$, as it approaches the positive integers describing hopfions without reflection. However, its accuracy increases with increasing number of samples in the training dataset. Thus we believe that at sufficiently large number of samples, the neural network trained on samples with Hopf numbers $0$ or $1$ should successfully recognize samples with Hopf numbers $2$, $-1$ and $-2$, though for the negative Hopf numbers, its accuracy improves slower over the size of the training sample, than for the positive Hopf numbers. We present our results on the Fig. \ref{HopfionPlots}. \begin{figure}[h] \centering \includegraphics[width=8cm,angle=0]{NeuralNetworks_01_ThreePlots_Fancy_3.jpeg} \caption{\small Outputs of the neural network as functions of the number of hidden units applied to trivial configurations ("0"), generated from one hopfion ("1"), two of them ("2"), mirror reflected hopfion ("-1"), mirror reflected pair of hopfions ("-2"). The case of solid line corresponds to the neural network trained on a small dataset ($\sim 10^4$ training samples, 1500 epochs), containing configurations"0" and "1". Its accuracy on configurations with negative Hopf numbers can be improved by either increasing the training dataset (dashed line refers to the case of $\sim 6*10^6$ training samples, 145 epochs), or by retraining the neural network on configurations "0" ,"1" and "-1", as shown by by the dotted line ($\sim 10^4$ samples, 200 epochs). } \label{HopfionPlots} \end{figure} We note that recognizing samples with negative Hopf numbers can be improved by incorporating them into the training algorithm. Particularly, we can repeat our training procedure and to include three kinds of configurations in the training sample: trivial configurations with Hopf number $0$, configurations obtained from one hopfion with assigned Hopf number $+1$, and their mirror images with assigned Hopf number $-1$. In this case, the neural network can equally well recognize all configurations with Hopf numbers between $-2$ and $2$ (see Fig. \ref{HopfionPlots}). We believe that this result is consistent with an idea, that neural network can be successfully applied to samples within the space, where it was trained, but, generally, it poorly extrapolates. \subsection{Cubic lattice with periodic boundary conditions} We are also interested, whether the fact that configurations in lattice dimer model can be characterized by Hopf number, depends on the kind of boundary condidtions imposed on the lattice. To find it out, we repeat our procedure in the case, when the lattice obeys periodic boundary condidtions, and we obtain similar results: if a neural network were trained on configurations with zero or one hopfion, it can successfully distinguish configurations obtained from zero, one, or two hopfions, but it has slightly lower accuracy when distinguishing their mirror reflected images, i.e. configurations with Hopf numbers $-1$ and $-2$. The fact that Hopf number can be defined either on a lattice with open, or periodic boundary conditions is a non-trivial result, because a-priori, one might expect that topological properies of a model depend on topological properties of the manifold, where it is placed. Furthermore, we mention that in the work \cite{MyArticle} we develope a method of computing Hopf number analytically, but the idea presented there works only in the case of open boundary conditions. Thus, neural networks provide us with a qualitatively new result: dimer configurations on a lattice with periodic boundary conditions are characterized by Hopf number in the same way, as on a lattice with open boundary conditions. \begin{figure}[h] \centering \includegraphics[width=8cm,angle=0] {NeuralNetworks_Int_01_Periodic_Batches_500_2_Fancy.jpeg} \caption{\small Outputs of the neural network trained on configurations "0" and "1" for a $4 \times 4 \times 4$ lattice with periodic boundary conditions. ($\sim 6*10^5$ samples, 500 epochs). } \label{Hopfion_Plot_Periodic} \end{figure} \section{Dimer model on a stacked triangular lattice} \label{Sec:TriangularLattice} In the previous section we demonstrated that neural network can succesfully distinguish topological sectors of lattice dimer model on a cubic lattice. However, from previous studies of the lattice dimer model (e.g. \cite{PhysRevB.68.184512}), it is known that it has qualitatively different properties on a bipartite and non-bipartite lattices. For instance, the notion of effective magnetic field exists only if the lattice is bipartite, and furthermore, quantum dimer model has diffrent strongly coupled phases: on a bipartite lattice, it has a gapless $U(1)$ phase, but on a non-bipartite lattice a gapped $Z_2$ phase is realized. Motivated by this, we would like to apply our method to study hopfions on a non-bipartite lattice. We consider the most straightforward generalization of cubic lattice - stacked triangular lattice. It has the same sites and bonds as the cubic, but in addition, it has bonds aligned diagonally. Thus, on a stacked triangular lattice, we can create initial configurations with zero, one or two hopfions in exactly the same way, as we did for a cubic lattice, but when we transform them, we apply more kinds of local flips: six kinds in total (see Fig. \ref{FlipTriangular}). \begin{figure}[h] \begin{subfigure}[t]{0.2\textwidth} \includegraphics[clip=true , trim = 1 1 1 1 , height=1.6cm , width=3cm, angle=0]{TrivialTriangular_2.pdf} \subcaption{} \label{TrivialTriangular} \end{subfigure} \hspace{0.2cm} \begin{subfigure}[t]{0.2\textwidth} \includegraphics[clip=true , trim = 1 1 1 1 , height=1.6cm , width=3cm, angle=0]{JustHopfionTriangular_2.pdf} \subcaption{} \label{JustHopfionTriangular} \end{subfigure} \begin{subfigure}[t]{0.2\textwidth} \includegraphics[clip=true , trim = 1 1 1 1 , height=1.2cm , width=3cm, angle=0]{FlipTriangularOneBold_2.pdf} \subcaption{} \label{FlipTriangularOne} \end{subfigure} \hspace{1cm} \begin{subfigure}[t]{0.2\textwidth} \includegraphics[clip=true , trim = 1 1 1 1 , height=1.2cm , width=3cm, angle=0]{FlipTriangularFourBold_2.pdf} \subcaption{} \label{FlipTriangularTwo} \end{subfigure} \begin{subfigure}[t]{0.2\textwidth} \includegraphics[clip=true , trim = 1 1 1 1 , height=1.2cm , width=3cm, angle=0]{FlipTriangularTwoBold_2.pdf} \subcaption{} \label{FlipTriangularThree} \end{subfigure} \hspace{1cm} \begin{subfigure}[t]{0.2\textwidth} \includegraphics[clip=true , trim = 1 1 1 1 , height=1.2cm , width=3cm, angle=0]{FlipTriangularFiveBold_2.pdf} \subcaption{} \label{FlipTriangularFour} \end{subfigure} \begin{subfigure}[t]{0.2\textwidth} \includegraphics[clip=true , trim = 1 1 1 1 , height=1.2cm , width=3cm, angle=0]{FlipTriangularThreeBold_2.pdf} \subcaption{} \label{FlipTriangularFive} \end{subfigure} \hspace{1cm} \begin{subfigure}[t]{0.2\textwidth} \includegraphics[clip=true , trim = 1 1 1 1 , height=1.2cm , width=3cm, angle=0]{FlipTriangularSixBold_2.pdf} \subcaption{} \label{FlipTriangularSix} \end{subfigure} \caption{\small An example of stacked triangular lattice forming a (\subref{TrivialTriangular}) trivial dimer configuration and (\subref{JustHopfionTriangular}) a hopfion. (\subref{FlipTriangularOne}- \subref{FlipTriangularSix}) six possible local flips on a stacked triangular lattice that preserve $\mathrm{sign} \mathrm{Pf} (M_{ij} n_{ij})$. } \label{FlipTriangular} \end{figure} As previously, we start from two initial configurations: the first with all dimers aligned in the vertical direction, and the second with one hopfion surrounded by vertically aligned dimers, and apply a series of local flips to both of them. In this way, we obtain a large number of configurations, which we use as a training dataset for the neural networks. \begin{figure}[h] \centering \includegraphics[width=8cm,angle=0] {NeuralNetworks_01_Triangular_2.jpeg} \caption{\small Outputs of the neural network trained on configurations "0" and "1" for a $4 \times 4 \times 4$ stacked triangular lattice with open boundary conditions. ($\sim 1.6*10^6$ samples, 400 epochs). One can see that the samples "0", "2", "-2" are indistinguishable. In the same way the samples "1" and "-1" are also indistinguishable. Thus we conclude that the neural network learns $Z_2$ invariant equal to the parity of the number of hopfions. } \label{Hopfion_Plot_Triangular} \end{figure} After it, we create our test dataset by applying local flips to the dimer configurations '0' and '1' (trivial and a hopfion), as well as configurations with two hopfions and mirror reflected images of the configurations with one or two hopfions. We note, that in this setting, the neural network with only one hidden layer cannot be trained successfully, and therefore we have to increase the number of hidden layers, while keeping the number of units in each layer fixed. We obtain that the neural network with three or more layers can successfully distinguish configurations obtained from trivial dimer configuration or with configuration containing one hopfion (see Fig. \ref{Hopfion_Plot_Triangular}). When we test it on configurations generated from two hopfions, it outputs $0$ with a good accuracy. If we test the neural network on mirror reflected images of configurations obtained from one or two hopfions, it outputs a real number very close to the parity of the number of hopfions. Thus, the neural network tells us that on a stacked triangular lattice, hopfion is a topological defect characterized by $Z_2$ invariant, equal to the parity of the number of hopfions. Equivalently, we can conclude that on a non-bipartite lattice, the invariant $\mathrm{sign} \: \mathrm{Pf}( M_{ij}n_{ij} )$ (discussed in the beginning of the Sec. \ref{Sec:CubicLattice}) is a physical topological invariant. \section{Discussion} \label{Sec:Discussion} In this work, we have demonstrated that neural network can be used to distinguish topological phases of lattice dimer model. Using it, we verified that topological defects in the dimer model on a cubic lattice can be characterized by integer Hopf invariant, whereas on a stacked triangular lattice, the same defects are characterized by $Z_2$ invariant. In addition, in the case of the cubic lattice, we have explicitly checked that topological defects are characterized by Hopf invariant both in the case of open and periodic boundary conditions (strictly speaking, in the latter case, we limited our study to the subsector with trivial winding number). In fact, the neural network gave us a hint to the whole idea, that Hopf number can be defined on a lattice dimer model, which we verified analytically afterwards (see \cite{MyArticle}). Thus, our paper can be viewed as the first work, where neural networks were successfully used to identify new topological phases. This is in contrast to the previous works, where machine learning algorithms were only able to identify previously known topological phases. We remark, that we found a qualitative difference between the optimal neural networks used in the cases of cubic and stacked triangular lattices. More specifically, we found that, in the case of cubic lattice, the neural network with just one hidden layer gives reasonably good predictions, whose accuracy increases with increasing number of hidden units. In contrast, in the case of stacked triangular lattice, one hidden layer is insufficient to train the neural network: the minimal required number of layers is three, and the accuracy improves if we take larger number of hidden layers. We suggest, that this difference may be related to complexity of the function, which the neural network approximates. Indeed, on a cubic lattice, configurations are characterized by Hopf number, which can be expressed as a quadratic function of the effective magnetic field, or equivalently, dimer occupation number. However, on a stacked triangular lattice, the physical topological invariant is $\mathrm{sign} \mathrm{Pf}( M_{ij} n_{ij})$, which is a high power function of the dimer occupation number. Thus, probing 3D lattice dimer model with neural networks leads us to conjecture, that the optimal number of hidden layers in a neural network is related to complexity of the function, which the neural network approximates. More generally, we believe that, in the future, it might be of interest to apply machine learning algorithms to simple physical systems in order to better understand the properties of machine learning algorithms themselves. We emphasize that, from our perspective, the main role of machine learning in physics is to provide insights about physical systems rather than rigorous results. In fact, like many other numerical methods, our approach has limitations due to fixed lattice size, finite number of samples in the datasets etc. For example, if one tries to draw conclusions based only on the neural networks, they may face such questions as e.g.: can it be that hopfions belong to a separate topological class on a $4\times 4 \times 4$ lattice, but to the same topological class on a larger lattice? Or, can it be that a hopfion does not belong to a separate topological class from a trivial configuration, but lies in a different part of the same topological class? The answers to these questions have to be found by using other techniques, than machine learning. Indeed, we claim that a hopfion is topologically distinct from a trivial dimer configuration (in both cases of cubic and stacked triangular lattices), because they have different values of a topological invariant $\mathrm{sign} \mathrm{Pf}( M_{ij} n_{ij})$. Furthermore, in Ref. \cite{MyArticle}, we claim that, in the case of cubic lattice, hopfions are characterized by an integer topological invariant based on its analytical derivation. On the other hand, our new result that on a stacked triangular lattice, $\mathrm{sign} \mathrm{Pf}( M_{ij} n_{ij})$ is a physical topological invariant, is suggestive - it has to be checked by other means. We mention that topological defects in lattice dimer model are interesting from physical point of view. In fact, lattice dimer models are known to be dual to various spin systems, many of which indeed have been realized experimentally. For example dimer model on a 3D diamond lattice (which, similarly to cubic, is also bipartite) is dual to spin ice on a pyrochlore lattice. The latter has been widely studied in the context of frustrated magnetism (see \cite{doi:10.1146/annurev-conmatphys-020911-125058, RevModPhys.82.53, 0034-4885-77-5-056501} for review), and have been proven to exist in various materials, such as e.g. $\mathrm{Dy_2 Ti_2 O_7}$ and $\mathrm{Ho_2 Ti_2 O_7}$. We believe that in these systems, it would be interesting to explore the effects resulting from the presence of distinct topological classes and consequently non-ergodicity. We also suggest that hopfions can be experimentally realized in 'artificial spin ice', where lattice dimer model is simulated by nanomagnets (see e.g. \cite{RevModPhys.85.1473}). The simplest scenario of two-dimensional artificial spin ice has been extensively studied, and it has been found to share unique properties of lattice dimer model, such as magnetic monopoles and even Coulomb phase \cite{Perrin2016, Lao2018}. However, in the last years, there have been ongoing efforts to realize three-dimensional artificial spin ice \cite{FernGUndez-Pacheco2017, doi:10.1063/1.4861118, Keller2018}. Since, the existence of hopfions requires only two stacked 2D layers (see Fig. \ref{JustHopfion}), we expect that it should be possible to create hopfions in bilayer artificial spin ice, once it will become possible to realize dynamics through local flips only and to suppress other processes, e.g. monopole creation, longer loop flips etc. This will open wide opportunities both in the context of physics and quantum computing, because hopfions were predicted to host unique properties, such as e.g. non-Abelian anyons \cite{PhysRevLett.51.2250, PhysRevB.84.245119, PhysRevB.84.184501}. \begin{acknowledgments} We would like to thank Roger Melko for proposing this problem and having multiple discussions about it. We would also like to thank L. Sierens, B. Kulchitski , S. Wetzel, J. Rau, C. Nisoli, R. Moessner, L. Balents, L. Wang, A. Smith for the discussions about this problem. Calculations were performed using the supercomputing facilities of Sharcnet. Financial support was provided by NSERC of Canada. \end{acknowledgments}
\section{Introduction} Crystallization of a substance from vapor or melt often implies simultaneous formation of many crystallite seeds on a substrate. These seeds than continue to grow from the substrate competing for the material left in the vapor or melt. Such crystals are subject to geometrical selection---the probability for a given seed to grow into a large crystal depends on its geometrical orientation \cite{lamm,kolm,vdDrift}. In the case of growth of thin needle crystals (see \cite{apatite,GaN,obraz1,obraz2,obraz3} for examples of different substances growing in needles), geometrical selection essentially implies that when two thin needle crystals meet, the less `vertical' needle stops growing while the more vertical needle continues to grow. In this paper we propose a toy model of geometrical selection and analyze its properties in various settings including growth from 1D or 2D substrate with uniform density of initial seeds, growth from a finite set of seeds, and growth from seeds distributed with constant density on a half-line. In the case of infinite 1D substrate we show the problem is closely related to the one-dimensional traffic model \cite{traffic} allowing us to find an exact solution in the totally asymmetric case and to construct exact upper and lower bounds on the probability of a needle survival in the general case. We also solve the Boltzmann equation and show that it gives qualitatively correct decay laws, e.g. the asymptotic density of surviving needles is correct up to an amplitude, while more subtle features like the decay of the needles substantially more tangential to the substrate than the typical surviving needles are wrong. In the 2D case, we analyze the scaling behavior and the Boltzmann equation. When the number of needles growing from the 1D substrate is finite, we show that the exact distribution of the number of ultimately surviving needles is the same as the distribution of the number of surviving clusters in the 1D ballistic aggregation \cite{IBA1,IBA2,IBA3,majumdar}. In the case of the initially occupied half-line, we calculate the large time asymptotic of the average number of needles infiltrating the seed-free half-line. The paper is organized as follows. We define the model in section \ref{sec:model}. In section \ref{sec:VD}, we study the angle distribution for growing needles on an infinite 1D substrate. In section \ref{sec:2D}, we construct a scaling theory for the angle distribution for growing needles on the 2D substrate and we analyze the corresponding Boltzmann equation. In section \ref{sec:in}, we present several exact results and conjectures concerning the needles growing from a finite part of the 1D substrate. In section \ref{sec:conc}, we summarize our results and discuss a few unsolved problems. \section{The Model} \label{sec:model} We mimic a needle by a ray growing from a seed. Seeds are randomly distributed on the one-dimensional horizontal line $y=0$, and the needles grow into the upper half-plane $y>0$. The speed of the growth is assumed to be the same for all needles (we set it equal to unity). The direction of growth is random, and this causes the interaction between the needles---one must define what happens when the tip of one needle hits the body of another one. We postulate that such a collision freezes the first needle, while the second needle is not affected. In the realm of our model the evolution is fully deterministic, the randomness is only in the initial conditions, and the interaction between the needles occurs only in collisions. A number of different needle growth models have been investigated, see \cite{Krug-rev} for a review. In these models the growth mechanism was usually stochastic, and the interactions were also very different (e.g., caused by some kind of screening or shadowing mechanism). For instance, Laplacian needles where the interaction is via a Laplacian field have been studied in Refs.~\cite{Lap-Meakin,Lap-Rossi,Lap-Rossi-2,Lap-Hakim,Lap-Krug}. Needle models in which the growth is caused by ballistic deposition were also studied, particularly by Krug and Meakin \cite{Krug-Meakin,Krug-Meakin-1,Krug-Meakin-2}. \begin{figure}[t] \includegraphics[width=17cm]{Needles_fig1_v3} \vspace{-2in} \caption{(a) Schematic illustration of the formation of a polycrystalline film by geometric selection, in case of crystals growing from seeds of arbitrary polygon shape (adopted from \cite{vdDrift}); (b) similar geometric selection for thin pyramidal crystals (adopted from \cite{obraz2}); (c) the limiting case of arbitrary thin needles considered in this paper. In all cases the selection rule on collisions is that the more vertical line survives while the less vertical perishes.} \label{collision_fig} \end{figure} The analysis of this strongly interacting infinite-needle system simplifies after projection on the one-dimensional horizontal line from which the growth has begun. We then follow the motion of the projections of the tips. Each such projection, a particle, moves with a certain velocity $v$; in terms of the inclination angle $\theta$ of its direction of growth to the vertical axis, $|\theta|\leq \tfrac{\pi}{2}$, the velocity is $v=\sin\theta$. We assume that (i) initial velocities are uncorrelated and drawn from the same velocity distribution $P_0(v)$; (ii) initial positions (the locations of the seeds) are also uncorrelated, without loss of generality we set the density to unity. Many of our results are valid for an arbitrary $P_0(v)$. Symmetric velocity distributions, $P_0(v)=P_0(-v)$, usually arise in applications and some of the results simplify in this case. Therefore, we often consider symmetric velocity distributions. The results also significantly simplify for totally asymmetric velocity distributions, $P_0(v)=0$ for $v<0$, as we shall see below. Let $P(v,t)$ be the velocity distribution of growing needles. This quantity contains the total density \begin{equation} \label{density_def} n(t)=\int_{-1}^1 dv\,P(v,t) \end{equation} and the average velocity \begin{equation} \label{speed_def} \langle |v|\rangle = \frac{1}{n(t)} \int_{-1}^1 dv\,|v|P(v,t)\,. \end{equation} Needless to say, $P_0(v)\equiv P_0(v, t=0)$. Since we set the initial density to unity: $n(t=0)=\int_{-1}^1 dv\,P_0(v)=1$. At first sight, the description in terms of the point particles moving on the one-dimensional line looks simpler than the original description it terms of needles growing in the two-dimensional space. The collision rule becomes more complicated, however: Colliding particles have different positions. Indeed, in a collision of particles with velocities of the same sign, the particles never meet (the fast particle disappears before catching the slow particle); in a collision of particles moving toward each other, they pass through each other (the actual collision of needles occurs later). Overall in every collision, the particle moving with larger speed disappears (see Fig.~\ref{collision_fig}c). Consider two particles with initial coordinates $x_1$ and $x_2$ and velocities $v_1$ and $v_2$ and assume, for definiteness, that $x_1<x_2$ and $v_1>v_2>0$. The tip of the first needle will hit the second needle at a certain time $t$. The tip of the second needle was there at some earlier time $\tau$. We have \begin{equation*} t \cos\theta_1 = \tau \cos\theta_2, \quad t \sin\theta_1 = \tau \sin\theta_2 + x_2 - x_1\,. \end{equation*} Recalling that $v_1 = \sin\theta_1$ and $v_2 = \sin\theta_2$, we find \begin{equation} \label{interval} \tau= t\sqrt{\frac{1-v_1^2}{1-v_2^2}}\,, \quad x_2-x_1= t \!\left(v_1-v_2\sqrt{\frac{1-v_1^2}{1-v_2^2}}\right). \end{equation} The initial distance between the tips is $x_2-x_1$. The final distance between the tips (after the projection on the horizontal line) is \begin{equation} \label{final} x_2-x_1+t(v_2-v_1)=(x_2-x_1)v_2\,\frac{\sqrt{1-v_2^2}-\sqrt{1-v_1^2}}{v_1\sqrt{1-v_2^2}-v_2\sqrt{1-v_1^2}}\,. \end{equation} It is easy to check that the same equations hold when the velocities of the two colliding particles have different sign (i.e., $v_1>0>v_2$, and $|v_1|>|v_2|$. \section{Velocity Distribution} \label{sec:VD} To determine the velocity distribution $P(v,t)$ of growing needles we employ the method developed in the context of traffic model \cite{traffic}, see also a textbook exposition \cite{book}. In the traffic model the collision occurs when two particles (representing cars) are at the same place; in the needle model the tips are at different places, see \eqref{final}. Further, in the traffic problem the proper initial velocity distribution $P_0(v)$ was totally asymmetric, $P_0(v)=0$ for $v<0$. This was crucial in deriving the exact velocity distribution \cite{traffic} \begin{equation} \label{pvt_traffic} P(v,t) = P_0(v)\, \exp\!\left[-t\int_{0}^v dw\,P_0(w)\!\left(v-w\right)\right]. \end{equation} The needle problem with totally asymmetric velocity distribution ($P_0(v)=0$ for $v<0$) is also exactly solvable. The corresponding velocity distribution \begin{equation} \label{pvt_asym} P(v,t) = P_0(v) \exp\!\left[-t\int_{0}^v dw\,P_0(w)\!\left(v-w\sqrt{\frac{1-v^2}{1-w^2}}\right)\right] \end{equation} is the direct generalization of \eq{pvt_traffic} for the non-local rules of needle collision, see the paragraph below \eq{pvt} for the derivation of this result. We have not succeeded in finding $P(v,t)$ for an arbitrary initial velocity distribution, and even for symmetric initial velocity distributions. In the general case it is possible to establish upper and lower bounds on the distribution $P(v,t)$ as we now demonstrate. \subsection{Exact Bounds} Consider a target particle moving with velocity $v$ ($v>0$ for concreteness). This particle can be eliminated in a collision with a slower particle on the right of the target particle. In order for a slower particle with velocity $w, \, |w|<v$, to be able to eliminate the target particle before time $t$, the slow particle should be located within a distance \begin{equation} \label{delta_x} \Delta x (v,w; t) = t\!\left(v-w\sqrt{\frac{1-v^2}{1-w^2}}\right) \end{equation} of the target particle. If for any $|w|<v$ there is no potential `killer' particle in the corresponding interval $\Delta x(v,w; t)$, the target particle is guaranteed to survive up to time $t$. This gives the following lower bound $P_{\ell}$ \cite{plus} \begin{equation} \label{pvt} P(v,t)\! \geq \! P_{\ell}(v,t) \!= \! P_0(v) \exp\!\left[-t\int_{-v}^v dw\,P_0(w)\!\left(v-w\sqrt{\frac{1-v^2}{1-w^2}}\right)\right]. \end{equation} The exponential reflects the assumption that the initial seeds are randomly located (with unit density); the length of the interval around the target particle which must be free of slow particles is given by \eqref{delta_x}. When the velocities of {\it all} particles are positive, the lower bound \eqref{pvt} is simultaneously an upper bound, and hence the exact solution. Indeed, it is possible that the killer particle (blue in Fig.~\ref{Fig:New}a) does not eliminate the target particle (red in Fig.~\ref{Fig:New}a) because there exists another particle (`killer'-2, black in the figure) which eliminates it before it reaches the red one. But if all particle velocities are positive, the black particle is guaranteed to eliminate the red one even earlier than the blue one. As a result, in this case the existence of the blue particle within the interval $\Delta x(v,w; t)$ guarantees that the red one will be dead either at the moment $t$ or earlier. \begin{figure}[t] \vspace{-0.4in} \includegraphics[width=17cm]{needle_figure_survival} \vspace{-2.2in} \caption{Possible interplay of three intersecting needles. (a) In the case of needles with positive inclinations the existence of the third (black) needles leads to the red needle being killed even earlier then it would have been if only the blue one existed; (b) this is not true if needles can have both positive and negative inclinations: in this case the black needle might kill the red one later than the blue one would have done; (c) still, one can write an upper bound on the needle surviving time: the existence of the blue needle guarantees that the red one will be dead beyond the black point (see explanation in the text).} \label{Fig:New} \end{figure} This logic is inapplicable when velocities can be both positive and negative: \fig{Fig:New}b shows an example of a particle which is eliminated {\it later} than it would have been by the initial (blue) killer particle. However, one can still construct an upper bound for the survival probability. Consider the situation with the target (red) and the killer (blue) particles having velocities with different signs (\fig{Fig:New}c). Because of possible interference of other particles, we cannot guarantee that the red particle will be dead after its intersection with the world line of the blue particle. However, the target particle cannot survive beyond the black point in \fig{Fig:New}c, which is the intersection of the world line of the target particle and of a virtual particle which starts in the same point as the blue one, and has the velocity $-w$, i.e., opposite to the velocity of the blue particle. Indeed, it is obvious that any possible third particle which could possibly eliminate the blue one would intersect with the world line of red particle before the black point. The same is true for the possible fourth particle which could eliminate the third, and so on {\it ad infinitum}. Thus, we arrive at the upper bound \begin{equation} \label{pvt2} P(v,t)\! \leq \! P_u(v,t) \! = \! P_0(v)\exp\!\left[-t\int_{-v}^v dw\,P_0(w)\!\left(v-|w|\sqrt{\frac{1-v^2}{1-w^2}}\right)\right] \end{equation} The bounds \eqref{pvt}--\eqref{pvt2} are valid for an arbitrary velocity distribution. For a completely asymmetric velocity distribution, $P_0(v)=0$ for $v<0$, the two bounds coincide giving the announced exact solution \eqref{pvt_asym}. In the remaining part of this subsection we consider only symmetric velocity distributions, $P_0(v)=P_0(-v)$. For such distributions, the bounds \eqref{pvt}--\eqref{pvt2} give \begin{equation} \label{pvt_sym} e^{-2 t \left[I_1(v)- I_2(v)\right]} \geq \frac{P(v,t)}{P_0(v)} \geq e^{-2 t I_1(v)} \end{equation} with \begin{subequations} \begin{align} \label{I_1} I_1 (v) &= v \int_0^v dw\,P_0(w) \\ \label{I_2} I_2 (v)& = \int_0^v dw\, w\sqrt{\frac{1-v^2}{1-w^2}}\,P_0(w) \end{align} \end{subequations} For the uniform initial velocity distribution \begin{equation} \label{uniform} P_0(v)= \begin{cases} \tfrac{1}{2} & |v|<1\\ 0 & |v|>1 \end{cases} \end{equation} which corresponds to the situation when the initial distribution of the inclination angles is given by $\Pi(\theta)=\tfrac{1}{2}\cos\theta$ for $|\theta|\leq \tfrac{\pi}{2}$, the integrals \eq{I_1} and \eq{I_2} are $I_1 = v^2/2$ and $I_2 = \sqrt{1-v^2}\left(1-\sqrt{1-v^2}\right)$, so the bounds become \begin{equation} \label{pvt_uni} \frac{1}{2}\exp \left[- t \left(1- \sqrt{1-v^2}\right)\right] \geq \! P(v,t) \geq \! \frac{1}{2}\exp\left[- v^2t\right] \end{equation} For the uniform initial distribution of the inclination angles, $\Pi(\theta)=\pi^{-1}$ for $|\theta|\leq \tfrac{\pi}{2}$, the initial velocity distribution is $P_0(v)=\pi^{-1}(1-v^2)^{-1/2}$. In this case $I_1 = \pi^{-1} v\, \sin^{-1}v$ and $I_2 = - (2\pi)^{-1} \ln (1-v^2)$ leading to \begin{equation} \label{pvt_2} \exp\!\left[-\frac{2tv\sin^{-1}v}{\pi}\right] (1-v^2)^{-t/\pi}\geq \! \frac{P(v,t)}{P_0(v)} \geq \! \exp\!\left[-\frac{2tv\sin^{-1}v}{\pi}\right] \end{equation} The long-time behavior of the velocity distribution is determined by the small-velocity behavior of the initial velocity distribution. Assuming an algebraic small velocity behavior, \begin{equation} P_0(v)\simeq A |v|^\mu \label{mu} \end{equation} when $|v|\ll 1$, one gets \begin{equation} I_1\simeq \frac{A}{\mu+1} |v|^{\mu+2} ,\quad I_2\simeq \frac{A}{\mu+2} |v|^{\mu+2} \end{equation} allowing one to write the exact bounds \eqref{pvt}--\eqref{pvt2} in the scaling form \begin{equation} \label{Pvt_scaling} A|v|^\mu\, \exp\!\left[-B_1|v|^{\mu+2}t\right] \geq \! P(v,t) \geq \! A|v|^\mu\, \exp\!\left[-B_2|v|^{\mu+2}t\right]\,, \end{equation} where \begin{equation} B_1=\frac{2A}{(\mu+1)(\mu+2)}\,, \qquad B_2 = \frac{2A}{\mu+1} \end{equation} Using \eqref{Pvt_scaling} we find that the density and the average speed exhibit simple algebraic behaviors in the large time limit: \begin{subequations} \begin{align} \label{n-mu} & 2 A(1-\nu)\Gamma(\nu) \left(B_2 t\right) ^{-\nu}\, \geq \,n \,\geq\, 2 A(1-\nu)\Gamma(\nu) \left(B_1 t\right) ^{-\nu}\\ \label{v-mu} &\frac{1}{\Gamma(1-\nu)}\,\left(B_2 t\right)^{\nu-1}\geq \langle |v|\rangle \geq \frac{1}{ \Gamma(1-\nu)}\,\left(B_1 t\right)^{\nu-1} \end{align} \end{subequations} where we used short-hand notation \begin{equation} \nu=\frac{\mu+1}{\mu+2} \label{nu} \end{equation} The velocity distribution is expected to acquire a scaling form \begin{equation} \label{Pvt-scal} P(v,t)=A t^{-\mu/(\mu+2)} V^\mu \mathcal{P}(V), \quad V = |v|\, t^{1/(\mu+2)} \end{equation} in the long-time limit. The bounds \eqref{Pvt_scaling} show that $\mathcal{P}(0)=1$ and imply that $\ln \mathcal{P}(V) \simeq -BV^{\mu+2}$ as $V\gg 1$. The exact value of $B$ is unknown; Eqs.~\eqref{Pvt_scaling} lead to the bounds $B_1\leq B\leq B_2$. The most natural case from the point of view of the needle growth problem is one where initial velocity distribution remains finite at zero velocity, i.e., $\mu=0$. In this case the velocity distribution becomes \begin{equation} \label{Pvt_0} A \exp\!\left[-Av^2t\right]\geq P(v,t) \geq A \exp\!\left[-2Av^2t\right] \end{equation} while the particle density and the average particle speed both decay as $t^{-1/2}$: \begin{equation} \label{nv_exact} \sqrt{\frac{\pi A}{t}} \geq n \geq \sqrt{\frac{\pi A}{2t}}\,, \quad \frac{1}{\sqrt{\pi A t}} \geq \langle |v|\rangle \geq \frac{1}{\sqrt{2\pi A t}}. \end{equation} These asymptotic behaviors agree with predictions of Kolmogorov \cite{kolm} who arrived to them using scaling arguments; Kolmogorov also gave hints about exact amplitudes which he planned to derive in a later (never published) work. The $t^{-1/2}$ decay of the density of needles has been also found in a number of needle models in which the underlying growth mechanism is stochastic, see e.g. \cite{Krug-Meakin,Krug-Meakin-1}. \subsection{Boltzmann Equation Approach} In this subsection we consider only symmetric velocity distributions, $P_0(-v)=P_0(v)$. In this situation, the lower bound \eqref{pvt} simplifies to \begin{subequations} \begin{equation} \label{pvt:L} P_{\ell}(v,t) = P_0(v) \exp\!\left[-vt\int_{-v}^v dw\,P_0(w)\right]. \end{equation} Equivalently, the lower bound can be obtained by solving a linear Boltzmann-like equation \begin{equation} \label{BE_exact} \frac{\partial P_{\ell}(v,t)}{\partial t}=-vP_{\ell}(v,t)\int_{-v}^v dw\,P_0(w). \end{equation} \end{subequations} In turn, the upper bound \eqref{pvt2} which we re-write as \begin{subequations} \begin{equation} \label{pvt2:U} P_u(v,t) = P_0(v)\exp\!\left[-vt\int_{-v}^v dw\,P_0(w)\!\left(1-\sqrt{\frac{v^{-2}-1}{w^{-2}-1}}\right)\right] \end{equation} satisfies a linear Boltzmann-like equation \begin{equation} \label{BE_exact_U} \frac{\partial P_{u}(v,t)}{\partial t} = -v P_{u}(v,t) \int_{-v}^v dw\,P_0(w)\!\left(1-\sqrt{\frac{v^{-2}-1}{w^{-2}-1}}\right) \end{equation} \end{subequations} The Boltzmann equation describing the evolution of $P(v,t)$ has the form \begin{equation} \label{BE-naive} \frac{\partial P(v,t)}{\partial t}=-P(v,t)\int_{-v}^v dw\, \left(v-w\sqrt{\frac{1-v^2}{1-w^2}}\right) P(w,t)=-vP(v,t)\int_{-v}^v dw\,P(w,t), \end{equation} where we have used \eq{interval} and simplified the integral by using the symmetry: $P(-w,t)=P(w,t)$. In contrast to the linear Boltzmann-like equations \eqref{BE_exact} and \eqref{BE_exact_U} for the lower and upper bounds, the Boltzmann equation \eqref{BE-naive} is a non-linear integro-differential equation. One can reduce \eqref{BE-naive} to a non-linear partial differential equation (PDE) \begin{equation} \label{BE-naive-PDE} v\,\frac{\partial^2 P}{\partial v \partial t} - \frac{v}{P}\,\frac{\partial P}{\partial v}\,\frac{\partial P}{\partial t} = \frac{\partial P}{\partial t} - 2 v^2 P^2 \end{equation} which looks even more challenging that \eqref{BE-naive}. The Boltzmann equation \eqref{BE-naive} and its PDE version \eqref{BE-naive-PDE} appear analytically intractable. In the most interesting long-time limit, however, one can derive asymptotically exact results since the solution acquires a scaling form. We now describe the procedure in the most natural case of a continuous symmetric velocity distribution which remains finite at zero velocity, $P(v=0)=A>0$. The structure of Eq.~\eqref{BE-naive} suggests to seek the velocity distribution in the scaled form \begin{equation} \label{scaled} P(v,t) = A F(V), \quad V=v\, \sqrt{2At} \end{equation} Plugging \eqref{scaled} into Eq.~\eqref{BE-naive} we obtain \begin{equation} \label{F} F' = - 2F(V)\int_0^V dW\,F(W) \end{equation} where $(\cdot)'=d(\cdot)/dV$. Writing $\Phi(V) = \int_0^V dW\,F(W)$ one transforms \eqref{F} into $\Phi'' = -2\Phi\Phi'$ which can be further integrated to yield $\Phi' = 1 - \Phi^2$ and then $\Phi = \tanh(V)$ leading to \begin{equation} \label{P_Boltzmann} F_\text{BE}(V) = \frac{1}{\cosh^2(V)} \end{equation} Clearly, this scaled velocity distribution does not lie within the exact bounds $e^{-V^2/2} \geq F_\text{exact}(V) \geq e^{-V^2}$ [see \eqref{Pvt_0}]. Equations \eqref{scaled} and \eqref{P_Boltzmann} predict the following asymptotic decay of the density and the average speed \begin{equation} \label{nv_BE} n_\text{BE} = \sqrt{\frac{2 A}{t}}\,, \quad \langle |v|\rangle_\text{BE} = \frac{\ln 2}{\sqrt{2A t}}. \end{equation} Comparing with the exact bounds \eqref{nv_exact} we conclude that the Boltzmann equation approach gives qualitatively correct $t^{-1/2}$ decay laws. The amplitudes predicted by the Boltzmann equation approach are probably erroneous, although they lie inside the exact bounds \eqref{nv_exact}. \section{Two Dimensions} \label{sec:2D} In this section we consider needles of finite width growing from a two-dimensional substrate. We start with needles of constant width and then consider a more realistic model of conical needles with linearly growing width. \subsection{Cylindrical Needles (Constant Width)} Here we assume that the needles are cylinders with equal radii $a$. Other assumptions are like in the one-dimensional setting, e.g. the speed of the longitudinal growth is assumed to be the same for all needles and the growth begins at the same time $t=0$. In the long time limit the projections of the surviving needles will have small velocities. The molecular chaos assumption underlying the Boltzmann equation is plausible in two dimensions, while in one dimension it is violated as we have seen in the previous section. Within the Boltzmann equation approach, the velocity distribution evolves according to \begin{equation} \label{BE_2d_general} \frac{\partial P(\mathbf v,t)}{\partial t}=-a \int_{|\mathbf w|<|\mathbf v|} P(\mathbf v,t) P(\mathbf w,t) \left|\mathbf v - \mathbf w\sqrt{\frac{1-v^2}{1-w^2}}\right| d\mathbf w. \end{equation} We limit ourselves by the symmetric case when the velocity distribution depends only on the speed $v = |\mathbf v|$. After changing to the polar coordinates, one gets \begin{equation} \frac{\partial P(\mathbf v,t)}{\partial t}=-a \int_{0}^v P(v,t) P(w,t) w dw\, \int_0^{2\pi} d\phi \sqrt{X(v,w) -Y(v,w) \cos \phi}, \label{BE_2d_2} \end{equation} where $\phi$ is the angle between vectors $\mathbf v$ and $\mathbf w$, and \begin{equation} X(v,w) = \frac{v^2+w^2 - 2 w^2 v^2}{1-w^2};\;\; Y(v,w) = 2 v w \sqrt{\frac{1-v^2}{1-w^2}}. \label{XY} \end{equation} In the case of small velocities ($v \ll 1$) which is the only one relevant at large time, one can drop higher order terms in \eq{XY} and rewrite \eq{BE_2d_2} in a more convenient form \begin{equation} \label{BE_2d} \frac{\partial P(v,t)}{\partial t}=- 2\pi a v^3 P (v,t) \int_0^1 dx\,x f(x) P(xv,t) \end{equation} where we have used the shorthand notation \begin{equation} \label{fx:def} f(x) = \frac{1}{2\pi} \int_0^{2\pi} d\phi \,\sqrt{1+x^2-2x \cos \phi}\,. \end{equation} The function $f(x)$ can be expressed through the complete elliptic integral of the second kind. From such an exact expression, or directly from \eqref{fx:def}, one finds that $f(x)$ slowly increases as $x$ increases, more precisely (see Fig.~\ref{Fig:fx}) \begin{equation*} f(x) = \begin{cases} 1+\frac{x^2}{4}+\frac{x^4}{64}+\ldots & 0<x\ll 1\\ \frac{4}{\pi}-\frac{2(1-x)}{\pi}+\ldots & 0<1-x\ll 1 \end{cases} \end{equation*} \begin{figure}[h] \includegraphics[width=0.55\textwidth,clip=]{fx} \caption{The function $f(x)$ appearing in \eqref{BE_2d} is function of $x$ monotonically increasing from $f(0)=1$ to $f(1)=\frac{4}{\pi}$.} \label{Fig:fx} \end{figure} We again assume that $P(v=0)=A>0$ and seek the velocity distribution in the scaling form \eqref{scaled}. The scaling of the velocity should be modified, however. The structure of Eq.~\eqref{BE_2d} shows that $t^{-1}\sim Aav^3$, so the properly scaled velocity distribution is \begin{equation} \label{scaled_2d} P(v,t) = A F(V), \quad V=v \sqrt[3]{2\pi Aat} \end{equation} Making this substitution we transform the Boltzmann equation \eqref{BE_2d} into \begin{equation} \label{F_2d} F' = - 3 F V^2 \int_0^1 dx\,x f(x) F(xV) \end{equation} which should be solved subject to the boundary condition \begin{equation} \label{BC} F(0) = 1 \end{equation} The boundary-value problem \eqref{F_2d}--\eqref{BC} is analytically intractable, so we limit ourselves to asymptotic behaviors. In the small velocity limit, $0<V\ll 1$, the scaled velocity distribution admits an expansion \begin{equation} \label{FV:small} F(V) = 1- \alpha V^3 + \beta V^6+\ldots \end{equation} (Perhaps a bit surprisingly, the scaling function $F(V)$ is non-analytical in the $V=|\mathbf V| \to 0$ limit.) By inserting the expansion \eqref{FV:small} into \eqref{F_2d} we extract the amplitudes \begin{subequations} \begin{align} \label{alpha} &\alpha = \int_0^1 dx\,x f(x) = \frac{16}{9\pi} \\ \label{beta} &\beta = \frac{\alpha}{2}\left[\alpha+\int_0^1 dx\,x^4 f(x)\right] = \frac{128}{81\pi^2}+ \frac{845+18G}{1296\pi^2} \end{align} \end{subequations} where $G = \sum_{k\geq 0}(-1)^k/(2k+1)^{-2}$ is the Catalan constant. In the large velocity limit, $V\gg 1$, one easily establishes an exponential decay \begin{equation} F(V) \propto e^{-CV}, \quad C= 3\int_0^\infty dW\,WF(W). \end{equation} It does not seem possible to find an analytical expression for $C$. The scaling form \eqref{scaled_2d} gives the decay laws for the density and the average speed \begin{equation} \label{nv_2d} n \sim t^{-2/3}\,, \quad \langle |v|\rangle \sim t^{-1/3} \end{equation} \subsection{Conical Needles (Growing Width)} We now assume that needles are (circular) cones with radii growing linearly with time (distance from the seed), as shown in Fig. 1b. There is some similarity with the touch-and-stop model of growth \cite{ABK1,ABK2,Dodds1,Dodds2}, also known as the lilypond model \cite{lily1,lily2,lily3}, although in that model every collision freezes both disks. The Boltzmann equation reads \begin{equation} \label{BE_cone} \frac{\partial P(v,t)}{\partial t}=-\lambda t v^3 P(v,t)\int_0^1 dx\,x P(vx,t) f(x), \end{equation} which is nothing but \eq{BE_2d} with time-dependent $a$. The scaled velocity distribution has the form \begin{equation} \label{scaled_cone} P(v,t) = A F(V), \quad V=(\lambda A t^2)^{1/3} v \end{equation} The decay laws for the density and the average speed are \begin{equation} \label{nv_cone} n \sim t^{-4/3}\,, \quad \langle |v|\rangle \sim t^{-2/3} \end{equation} The scaled velocity distribution satisfies the same equation \eqref{F_2d} (apart from a different numerical factor in the right-hand side), and therefore the large-velocity tail is again exponential \begin{equation} \label{tail} F(V) \sim \exp\left[ - CV\right] \end{equation} One can similarly analyze other growth laws of the radii of cones. Indeed, if the radius of a cone grows as $a \sim t^{\alpha}$ we must replace $\lambda t\rightarrow \lambda t^{\alpha}$ on the RHS of \eqref{BE_cone}. The proper scaling variable is now \begin{equation} V\sim v t^{(1+\alpha)/3}. \end{equation} Hence the decay laws for the particle density and the average particle speed are \begin{equation} n \sim t^{-2(1+\alpha)/3};\;\; \langle |v|\rangle \sim t^{-(1+\alpha)/3}. \label{nv_general} \end{equation} The consideration above implies that a needle (either cylindrical or conical) stops growing immediately after collision with a more vertical one. In a more realistic scenario, such needles do not perish immediately---the side of the needle in touch with a more vertical one stops growing, while the other side `does not know' that a collision happened and continues growing (see \fig{fig_film}). As a result, a continuous film of inosculated needles is formed. Continuity implies that the typical transversal size of the surviving part of the needle scales as $n^{-1/2}$. This in conjunction with \eq{nv_general} yields \begin{equation} a \sim t^{\alpha} \sim \left( t^{-2(1+\alpha)/3}\right)^{-1/2} \; \rightarrow \; \alpha = 1/2. \end{equation} Thus $n \sim t^{-1}$ and $\langle |v|\rangle \sim t^{-1/2}$ for the case of inosculating needles. These scaling laws were stated by Kolmogorov \cite{kolm} who apparently relied on similar scaling arguments. \begin{figure} \centerline{ \includegraphics[width=5cm]{Needles_fig_Film}} \caption{Inosculating needles, i.e. needles which are not dying immediately after collision.} \label{fig_film} \end{figure} \section{Needles growing from an interval or half-line} \label{sec:in} In this section we return to the one-dimensional substrate and consider what happens if the original substrate is not uniformly covered by seeds. First, we consider the evolution of a finite number of needles and calculate the distribution of the number of immortal needles, i.e. needles surviving up to $t = \infty$. Second, we discuss the set-up when needle seeds are located on a half-line and study how they infiltrate the half-line which is initially free of needles. \subsection{Finite number of needles} Consider the evolution of $N$ needle seeds initially located at a certain finite interval. Our aim is to calculate the probability distribution $\Pi(n|N)$ of exactly $n$ of them surviving ad infinitum. We assume that needle velocities are taken independently from the same distribution $P_0(v)$, with symmetric $P_0(v)$ being the most interesting case. \begin{figure} \includegraphics[width=14cm]{needles_Fig3.png} \caption{Recurrence relations for the survival probabilities in the system with finite number of needles. (A): The most vertical needle (thick line) separates the whole set of needles into two domains (shaded differently) which evolve separately; (B) needles in half-line: the most vertical needle separates the set into part confined between itself in the wall (lightly shaded) where all the needles eventually perish, and the outer part (densely shaded) for which it works as an effective new wall. } \label{fig:finite_rec} \end{figure} The set of $N$ needles can be recursively separated into smaller subsets which have almost no interactions with one another and this allows us to construct recursive relations for $\Pi(n|N)$ as we show below. To appreciate this idea, consider the needle with the smallest speed (we call it `slow needle-1' below). Note that, (i) this needle is immortal---there is no other slower needle to kill it, (ii) the needles on the left and on the right of it will never interact, and (iii) the survival of other needles does not depend on the velocity of this slowest needle: any other needle moving towards it will eventually perish. This allows us to write \begin{equation} \Pi(n|N) = \sum_{M=0}^{N-1} \sum_{m=0}^{n-1} \frac{1}{N} \Pi_R(m|M) \Pi_L(n-m-1|N-M-1) , \label{fan_rec} \end{equation} We label needles from right to left and denote by $M$ the number of needles to the right of the slowest; the $1/N$ factor is the probability that $(M+1)$-th needle is the slowest. $\Pi_{R,L}(m|M)$ are the probabilities that exactly $m$ out of $M$ needles to the right (respectively, left) of the slowest needle are ultimate survivors (see \fig{fig:finite_rec} for an illustration). If $P_0(v)$ is symmetric, $\Pi_R(m|M)=\Pi_L(m|M)$. The distributions $\Pi_{R,L}(m|M)$ satisfy similar recurrences. Take for instance $\Pi_R(m|M)$. The slowest needle of the set of $M$ needles (`slow needle-2') separates it into two non-interacting subsets. The subset to the left of it will definitely die out: indeed, it is contained between slow needle-1 and slow needle-2, which work effectively as absorbing walls, while the subset to the right forms a new rightmost subset for which slow needle-2 plays exactly the same role as slow needle-1 for the original set. Finally, the survival of the slow needle-2 itself depends only on the sign of its velocity: if it is positive it will survive ad infinitum, if it is negative it will collide with slow needle-1 and die. Collecting all this, and taking into account that every needle of the set has equal probability to be the slowest, we get \begin{equation} \Pi_R(m|M) = \frac{1}{M} \sum_{K=0}^{M-1} [p_L \Pi_R(m|K) + p_R\Pi_R(m-1|K)]. \label{one-side_rec} \end{equation} Here $p_L$ (respectively, $p_R$) is the probability that the slowest needle has negative (respectively, positive) velocity. The recurrence relation for $\Pi_{L}$ is the same, up to replacement of indexes: $R \to L$. Needless to say, $p_L = p_R = 1/2$ for symmetric $P_0(v)$, and $p_L = 0, p_R = 1$ for the completely asymmetric one. In a more general case when $P_0(-v)/P_0(v)$ is a $v$-independent constant $\lambda$, we have $p_L = \lambda/(\lambda+1)$ and $p_R = 1/(\lambda+1)$. For a generic $P_0(v)$, the probabilities $p_L$ and $p_R$ depend on the velocity of the needle in question. Initial and boundary conditions read \begin{equation} \Pi_R(m|0)=\delta_{m,0}, \quad \Pi_R(-1|M)=0 \end{equation} We introduce generating functions \begin{subequations} \begin{align} \label{G-gen} & G(s,z) = \sum_{M=0}^{\infty} \sum_{m=0}^{\infty} \Pi(m|M) s^m z^M \\ \label{GRL-gen} &G_{R,L}(s,z) = \sum_{M=0}^{\infty} \sum_{m=0}^{\infty} \Pi_{R,L}(m|M) s^m z^M \end{align} \end{subequations} The one-sided recursion \eq{one-side_rec} can be re-written as \begin{equation} \sum_{M=0}^{\infty} \sum_{m=0}^{\infty} M \Pi_R(m|M) s^m z^M= (p_L + s p_R) \sum_{m=0}^{\infty} \sum_{K=0}^{\infty} \Pi_R(m|K) \sum_{M=K+1}^{\infty} s^m z^M, \label{one-side_gen1} \end{equation} which reduces to \begin{equation} z\frac{\partial G_R(s,z)}{\partial z} = (p_L + s p_R) \frac{z}{1-z} G_R(s,z) \label{one-side_gen2} \end{equation} Integrating this equation, one gets for a one-sided generating function \begin{equation} G_R(s,z) = (1-z)^{- (p_L + s p_R)}\,. \label{one-side_gen3} \end{equation} Similarly, $G_L(s,z)=(1-z)^{- (p_R + s p_L)}$. The two-sided recursion equation \eq{fan_rec} turns into equation \begin{equation} z \frac{\partial G(s,z)}{\partial z} = s z G_R(s,z) G_L(s,z) \label{fan_gen1} \end{equation} for the generating functions. Thus \begin{equation} G(s,z) = s \int \frac{dz}{(1-z)^{p_L + s p_R} (1-z)^{p_R + s p_L}}=s \int \frac{dz}{(1-z)^{1 + s}}=(1-z)^{-s}, \label{fan_gen2} \end{equation} which is a well-known \cite{knuth,flajolet} generating function of the Stirling numbers \cite{Stirling} of the first kind: \begin{equation} \sum_{N\geq 0}\sum_{n=0}^N \begin{bmatrix} N\\ n \end{bmatrix} s^n\, \frac{z^N}{N!} = (1-z)^{-s} \label{stirling} \end{equation} Therefore, \begin{equation} \Pi(n|N) = \frac{1}{N!} \begin{bmatrix} N\\ n \end{bmatrix} \label{fan_result} \end{equation} It is now easy calculate the moments of the $\Pi(n|N)$ distribution exploiting the properties of the Stirling numbers. For example, the average and the variance of the number of ultimately surviving needles \begin{equation} \left< n \right> = H_N, \quad \left< n^2 \right> -\langle n \rangle^2 = H_N - H_N^{(2)} \end{equation} are expressed through harmonic numbers $H_N=\sum_{1\leq k\leq N}k^{-1}$ and $H_N^{(2)}=\sum_{1\leq k\leq N}k^{-2}$. The same distribution \eq{fan_result} describes the outcome of the ballistic aggregation process where particles undergo totally inelastic collisions \cite{IBA1,IBA2,IBA3,majumdar}. Another example is a bullet problem \cite{annihilation} where $N$ bullets are shot one after another in the same direction and whenever two bullets collide they both annihilate---in that problem the emerging distribution $\Pi_{ann}(n|N)$ is rather similar to \eq{fan_result}. The distribution \eq{fan_result} also often arises in theory of records \cite{Arnold,Nevzorov}, in studies of lead changes in networks \cite{KR02,JML1}, and in numerous problems in combinatorics \cite{knuth,flajolet,theater}. \subsection {Infiltration} Consider now the situation when the seeds are uniformly distributed on the half-line $x<0$, namely, the probability density $P(x,v, t=0)$ to find a seed at $x$ with velocity $v$ is \begin{equation} P(x,v, t=0) = \begin{cases} P_0(v) & x \leq 0\\ 0 & x>0. \end{cases} \end{equation} In this case, similarly to the case of a finite set of seeds, some needles survive ad infinitum. For the $n^\text{th}$ needle from the boundary, we denote by $s_n$ its ultimate survival probability. The $n^\text{th}$ needle is eternal if it has a positive velocity which is smaller than the speeds of all $n-1$ needles to the right of it. If $P_0(v)$ has a fixed asymmetry, i.e. \begin{equation} \frac{P_0(-v)}{P_0(v)} = \lambda \end{equation} for all $v>0$, the sign and the speed are independent random variables and \begin{equation} s_n = \frac{\Lambda}{n}\,, \quad \Lambda \equiv \frac{1}{1+\lambda} \label{sn} \end{equation} where $\Lambda$ is the probability that velocity is positive, and $n^{-1}$ is a probability that absolute value of velocity is the smallest among $n$ equally distributed ones. In particular, $s_n = 1/(2n)$ for symmetric distributions, and $s_n = 1/n$ for completely asymmetric ones. For more general $P_0(v)$, the ultimate survival probability $s_n$ converges to \eq{sn} when $n\gg 1$ if we define \begin{equation} \lambda = \lim_{v \to 0} \frac{P_0(-v)}{P_0(v)} \,. \label{limlambda} \end{equation} Moreover, given \eq{scaled} one expects that probability of survival at a finite time $\tilde{s}_n(t)$ behaves as \begin{equation} \tilde{s}_n (t) = s_n + a_n t^{-\nu} + o (t^{-\nu}), \end{equation} where $\nu$ is defined by Eq.~\eq{nu}. We also want to determine the probability $r_n$ that the $n^\text{th}$ needle is not only immortal but also becomes the rightmost at infinite time, i.e., that it survives, but all needles on the right of it are eliminated. In the completely asymmetric case the rightmost needle always survives, $r_n = \delta_{1,n}$; in the general case, the rightmost needle always survives only if its velocity is positive. It is instructive to introduce a cumulative distribution \begin{equation} R_0 =1, \quad R_n = 1 - \sum_{k=1}^{n} r_k \quad \text{ for }\quad n\geq 1, \end{equation} which is the probability that all $n$ rightmost needles eventually perish. The $n^\text{th}$ needle will be the rightmost at $t = \infty$, if (i) it survives till infinite time; (ii) needles to the right of it are eliminated. For the distributions with fixed asymmetry these two events are independent---the event (ii) depends only on the sign of the velocities of the first $(n-1)$ needles, which are completely decoupled from absolute values of the velocities in this case. Thus one gets \begin{equation} \label{R-rec} r_n = R_{n-1} - R_{n} = s_n R_{n-1}, \quad R_n = (1-s_n) R_{n-1}. \end{equation} Recalling \eqref{sn} we solve the above recurrence and obtain \begin{equation} R_n = \frac{\Gamma(n+1-\Lambda)}{\Gamma(1-\Lambda)\,\Gamma(n+1)}\,, \quad r_n = \frac{\Lambda}{\Gamma(1-\Lambda)}\, \frac{\Gamma(n-\Lambda)}{\Gamma(n+1)} \end{equation} which show that $R_n \sim n^{-\Lambda}$ and $r_n \sim n^{-1-\Lambda}$ when $n\gg 1$. \begin{figure} \includegraphics[width=14cm]{needles_Fig4.png} \caption{Numerical simulations of the needle infiltration. (A) The survival probability of $n^\text{th}$ needle as a function of time for $n=1...8$ converges to $1/2n$ as $t \to \infty$. (B) The average number $N(t)$ of alive needles infiltrating the positive half-line at time $t$ (open circles), and the total number $M(t)$ of needles which have infiltrated the positive half-line up to time $t$ including those which eventually froze (disks). The straight lines are the guides for the eyes and have slopes $1/4$ and $1/3$.} \label{fig:infiltration} \end{figure} Let us look at needles that infiltrate initially empty half-line $x>0$. One interesting quantity is the total number of such needles which are alive at time $t$: \begin{equation} N(t) = \int_0^{\infty}dx \int_0^{\infty}dv P(x,v, t). \end{equation} Another interesting quantity is the total number of needles which infiltrated the positive half-line {\it up to} time $t$: \begin{equation} M(t)= \int_0^{t} d\tau \int_0^{\infty}dv \left.\frac{\partial P(x,v,\tau)}{\partial x}\right|_{x=0} \end{equation} In \fig{fig:infiltration} we show the numerical results for $N(t)$ and $M(t)$ in the case of symmetric uniform distribution \eq{uniform}. Both quantities grow logarithmically with slopes suspiciously close to 1/4 and 1/3, respectively. We have not determined $N(t)$ or $M(t)$ analytically, but we have computed a similar quantity $I(t)$, the average number of `immortal' needles, which infiltrate the positive half-line at time $t$. Clearly, $I(t) \leq N(t) \leq M(t)$. To determine $I(t)$ we first compute the survival probability $S(v,x)$ of a needle starting at point $-x$ with velocity $v$: \begin{equation} S(v,x) = \Theta(v) \exp \left( - x \int_{-v}^{v} P_0(w) dw \right), \end{equation} where $\Theta (v)$ is the Heaviside function. Then $I(t)$ is simply \begin{equation} I(t) = \int_0^{\infty} dv \int_0^{vt} dx P_0(v) S(v,x) = \int_0^{\infty} dv\,\frac{P_0(v)}{F(v)} \left[ 1- \exp\left(-v F(v) t\right) \right], \label{immortal} \end{equation} where $F(v) = \int_{-v}^{v} dw\, P_0(w)$. The long-time behavior of \eq{immortal} is controlled by the behavior of $P_0(v)$ at small velocities: \begin{equation} P_0(v) \simeq \Lambda \frac{d F}{dv}\,, \quad F(v) \simeq a v^{\mu+1}, \end{equation} where $\mu$ and $\Lambda$ are defined by \eq{mu} and \eq{sn}, and $a$ is a numerical constant. This allows to rewrite \eq{immortal} in the form \begin{equation} I(t) \simeq \Lambda \int_0^{Y(t)} \frac{1-\exp(-y)}{y}dy = \Lambda \frac{\mu+1}{\mu+2} \ln t + O(1), \label{immortal2} \end{equation} where $Y(t) = a^{-1/(\mu+2)} t^{(\mu+1)/(\mu+2)}$. In the most interesting case of symmetric velocity distribution with $P_0(0)>0$ \begin{equation} I(t) = \frac{1}{4} \ln t + O(1), \label{immortal3} \end{equation} Simulation results suggest (see \fig{fig:infiltration}B) that $N(t) - I(t) = O(1)$, i.e. the number of alive but mortal particles in the positive half-line remains finite throughout the evolution. The total number of particles $M(t)$ that penetrated into the positive half-line also grows logarithmically, but with a different pre-factor; when $\mu=0, \lambda=1$ the pre-factor looks suspiciously close to 1/3. Analytical calculation of the amplitude in the general case is an interesting challenge. \section{Discussion} \label{sec:conc} For needles growing from the one-dimensional substrate, we have found upper and lower bounds for the velocity distribution. In the case of completely asymmetrical distributions these bounds coincide, making the problem exactly solvable. We have also solved the Boltzmann equation in the situation when the initial velocity distribution is symmetric and finite at zero velocity. The chief scaling laws for the average speed and the density of the surviving needles predicted by the Boltzmann equation approach are correct. The details are erroneous, e.g., the prediction for the velocity distribution is incompatible with exact bounds. This is not surprising---the Boltzmann equation approach is an uncontrolled approximation and is known to work poorly in the one-dimensional settings. We have also discussed the version of the problem when needles were seeded only on part of the line. In the case when the number of needles is finite, the distribution of the number of ultimately surviving needles is remarkably universal. Specifically, it coincides with the distribution of surviving particles in the ballistic aggregation process where particles undergo totally inelastic collisions \cite{IBA1,IBA2,IBA3,majumdar}. The universality of this answer seems to imply there should be some universal derivation not relying on the details of a particular model. A slightly different distribution arises in the context of the ballistic annihilation problem, although the derivation in this situation is much more involved \cite{annihilation}. It seems plausible that there exist wide classes of the one-dimensional aggregation and annihilation processes in which the distribution of the fan size is given by $\Pi(n|N)$ and $\Pi_{ann}(n|N)$, respectively. Determining the minimal collision rule requirements which lead to these distributions is an interesting problem to address. In two dimensions, we have employed the Boltzmann equation approach. The Boltzmann equation approach is more sound in two dimensions than in one dimension, yet it is still an uncontrolled approximation. For instance, whenever the tip of the faster cone hits the slower one, their radii are different. The temporal scaling is still the same, so the applicability of \eqref{BE_cone} seems plausible. It would be interesting to study the problem numerically and to check the validity of the theoretical prediction \eqref{tail} for the tail. If the lateral size of needles grows linearly in time, the needle model closely resembles the touch-and-stop, or the lilypond, growth model \cite{ABK1,ABK2,Dodds1,Dodds2,lily1,lily2,lily3}. In the case of the strictly vertical growth, whenever two objects touch their tips are at the the same height and hence both objects freeze, the needle model is isomorphic to the 1D lilypond which was exactly solved in \cite{ABK2,lily3}; in the case of the conical needles growing from the 2D substrate the model is isomorphic, again in the case of the strictly vertical growth, to the 2D lilypond model. The growing objects in \cite{ABK1,ABK2,Dodds1,Dodds2,lily1,lily2,lily3} are hyper-balls, but the lilypond model admits various modifications. One such version, a line-segment lilypond model \cite{lily4}, has needles of zero widths and assumes that the seeds are distributed in the plane $\mathbb{R}^2$, while in our model the seeds are on the 1D substrate. For a finite number of seeds studied in \cite{lily4} the distribution of the number of ultimately surviving needles is unknown. It would be also interesting to study the model \cite{lily4} with infinitely many seeds uniformly distributed throughout the plane and to determine the decay law for the fraction of mobile needles. A version of the line-segment lilypond model in which seeds are nucleated uniformly in space and time and grow only vertically or horizontally was proposed in Ref.~\cite{Rao} as a simple model describing martensites formation. The asymptotic behavior of this model is analytically tractable \cite{BK96}, but the analysis substantially uses the anisotropy of the growth. \section*{Acknowledgements} We thank A. N. Obraztsov and A. M. Alekseev for introducing us to the field of needle growth and L. N. Rashkovich for useful comments on the history of the subject. Large part of this work was done during several visits of MT and LN to the Applied Mathematics Research Center (AMRC), Coventry University. MT and LN are very grateful to the AMRC for the warm hospitality and to the project EU-FP7-PEOPLE-IRSES DIONICOS for financial support.
\section{Approximation algorithm}\label{sec:approx} In the previous section we saw that the problems \textsc{MinViol}\xspace and \textsc{MaxTri}\xspace are \ensuremath{\mathbf{NP}}-hard, even for one community, and additionally, \textsc{MinViol}\xspace is hard to approximate to any multiplicative factor. In this section we show that \textsc{MaxTri}\xspace can be approximated with $1 / (k + 1)$ guarantee, where $k$ is the number of communities in the input. As an imporant consequence, if we have one community, we can find a solution with approximation guarantee $1 / 2$. Furthermore, it follows that if all communities are edge-disjoint, our algorithm yields a $1/2$ approximation guarantee. To prove the approximation algorithm we argue that $\ensuremath{\mathit{tri}}(\cdot)$ is submodular with respect to weak edges. Moreover, the connectivity constraint of each communitiy can be viewed as a matroid. Thus, satisfying all the connectivity constraints is an intersection of matroids. These properties allow us to use a classic result of maximizing a submodular function over an intersection of $k$ matroids: Fisher et al.~\cite{fisher1978analysis} showed that a greedy algorithm leads to $1/(k + 1)$ approximation ratio. Here the greedy algorithms starts with none of the edges being weak, that is, all edges are strong. We find a strong edge, say $e$, inducing the most violations. We convert $e$ to a weak edge if the connectivity constraints allow it. Otherwise, we let $e$ being strong. The pseudo-code is given in Algorithm~\ref{alg:greedySConnect}. Note that our problem formulation is agnostic with respect to whether strong edges should be maximized or minimized. In Algorithm~\ref{alg:greedySConnect} strong edges are kept, even if they are not crucial for connectivity, as long as they do not induce any violations. This behavior is in line with the idea of \citet{sintos2014using}, who aim to maximize the number of strong edges. It is in contrast, however, with our second baseline, the algorithm of \citet{angluin13connectivity}, who want to find a minimum set of edges to ensure connectivity. If we wish to obtain a minimal number of strong edges, we can continue the main iteration in Algorithm~\ref{alg:greedySConnect} and convert to weak all edges that are not necessary for connectivity and do not create any {\sc\Large stc}\xspace violations. \begin{algorithm}[t] \caption{Greedy algorithm for \textsc{MaxTri}\xspace} \label{alg:greedySConnect} $S \leftarrow E$; $A \leftarrow E$\; \While{$A\ne \emptyset$} { $e=\operatornamewithlimits{arg\,max}_{e \in A}\ensuremath{\mathit{tri}}(S \setminus \set{e})$\; \If{$S\setminus \{e\}$ satisfies the connectivity constraints} { $S \leftarrow S\setminus\{e\}$\; } $A \leftarrow A\setminus\{e\}$\; } \Return $S$\; \end{algorithm} We now show the properties required by the result of Fisher et al.~\cite{fisher1978analysis} for the greedy algorithm to yield approximation ratio $1/(k + 1)$. We first show that the function $\ensuremath{\mathit{tri}}(\cdot)$ is submodular with respect to weak edges. \begin{proposition} Consider a graph $G = (V, E)$. Let $f(W) = \ensuremath{\mathit{tri}}(E \setminus W)$. The function $f$ is submodular and non-decreasing. \end{proposition} \begin{proof} To prove the submodularity we show that $\ensuremath{\mathit{viol}}(\cdot)$ is supermodular with respect to strong edges. This makes $\ensuremath{\mathit{tri}}(\cdot)$ submodular with respect to strong edges, which in turn makes $f$ submodular with respect to weak edges. For the last implication it is well-known that a function is submodular if and only if its complement is submodular.\!\footnote{see, for example, \url{http://melodi.ee.washington.edu/~bilmes/ee595a_spring_2011/lecture1_presented.pdf} for a proof.} Let $S$ be a set of strong edges. For $a$ vertex $u$, define $N_{X}(u) = \set{ v \mid (u,v)\in X}$ to be the strong-neighbors of $u$. Define also $\overline{N}(u) = \{ v \mid (u,v)\not\in E\}$ to be the non-neighbors or $u$. The number of additional {\sc\Large stc}\xspace violations introduced by labeling edge $e$ as strong is \[ \ensuremath{\mathit{viol}}(S\cup\{ e\}) - \ensuremath{\mathit{viol}}(S) = \abs{ N_{S}(u) \cap \overline{N}(v) } + \abs{ N_{S}(v) \cap \overline{N}(u) }. \] Let $T \subseteq S$. For any $u \in V$ and any edge set $W$, we have \begin{equation} \label{eq:monotone} \abs{ N_{T}(u) \cap W } \le \abs{ N_{S}(u) \cap W }. \end{equation} This implies that for $T\subseteq S\subseteq E$ and any edge $e \notin S$, \[ \ensuremath{\mathit{viol}}(T\cup\{ e\}) - \ensuremath{\mathit{viol}}(T) \le \ensuremath{\mathit{viol}}(S\cup\{ e\}) - \ensuremath{\mathit{viol}}(S), \] which proves the supermodularity of $\ensuremath{\mathit{viol}}(\cdot)$. To prove the monotonicity, we show that $\ensuremath{\mathit{viol}}(\cdot)$ is non-decreasing. This makes $\ensuremath{\mathit{tri}}(\cdot)$ non-increasing, which makes $f$ non-decreasing. Let $T \subseteq S \subseteq E$. The number of violations induced by set $S$ is half of the sum of violations induced by each edge $(u,v)\in S$, \[ \ensuremath{\mathit{viol}}(S) = \frac{1}{2}\sum_{(u,v)\in S} \abs{ N_{S}(u) \cap \overline{N}(v) } + \abs{ N_{S}(v) \cap \overline{N}(u) }. \] One half is needed as each violated triangle is considered twice, because it is caused by two strong edges. Similarly, \[ \ensuremath{\mathit{viol}}(T) = \frac{1}{2}\sum_{(u,v)\in T} \abs{ N_{T}(u) \cap \overline{N}(v) } + \abs{ N_{T}(v) \cap \overline{N}(u) }. \] Since $T \subseteq S$, each edge occuring in the sum occurs also in the sum for $\ensuremath{\mathit{viol}}(S)$. Moreover, Equation~(\ref{eq:monotone}) guarantees that the term corresponding to an edge $(u, v)$ in $\ensuremath{\mathit{viol}}(T)$ is smaller than the than the term corresponding to the same edge $(u, v)$ in $\ensuremath{\mathit{viol}}(S)$. Consequently, $\ensuremath{\mathit{viol}}(\cdot)$ is non-decreasing. \end{proof} Our next step is to argue that the connectivity constraints are matroids with respect to weak edges. Fortunately, this is a known result and these matroids are commonly known as \emph{bond matroids}, see for example, Proposition 3.3~by~\citet{oxley2003matroid}. \begin{proposition} \label{prop:bond} Assume a graph $G = (V, E)$ and a subset $C$ such that $(C, E(C))$ is connected. Define a family of sets \[ \mathcal{M} = \set{W \subseteq E ; (C, E(C) \setminus W(C)) \text{ is connected}}. \] Then $\mathcal{M}$ is matroid. \end{proposition} The two propositions show that we can use the result by~\citet{fisher1978analysis}, and obtain $1 / (k + 1)$ guarantee, where $k$ is the number of communities, i.e., the sets of vertices for which we require a connectivity constraint. We can obtain a better guarantee, $1/2$, if we know that communities are edge-disjoint. This follows from the fact that we can express the connectivity constraints as a single matroid. \begin{proposition} Assume a graph $G = (V, E)$ and family of edge-disjoint subsets $C_1, \ldots, C_k$, such that each $(C_i, E(C_i))$ is connected. Define a family of sets \[ \mathcal{M} = \set{W \subseteq E ; (C_i, E(C_i) \setminus W(C_i)) \text{ is connected, for every }i}. \] Then $\mathcal{M}$ is matroid. \end{proposition} The result follows from immediately Proposition~\ref{prop:bond}. and the following standard lemma which we state without a proof. \begin{lemma} Let $\mathcal{M}_1, \ldots, \mathcal{M}_k$ be $k$ matroids, each matroid $\mathcal{M}_i$ is defined over its own ground set $U_i$. Then a direct sum \[ \mathcal{M} = \set{\bigcup_{i = 1}^k X_i \mid X_i \in \mathcal{M}_i} \] is a matroid over $\bigcup_{i = 1}^k U_i$. \end{lemma} Thus we can use the result by~\citet{fisher1978analysis} but now we have only one matroid instead of $k$ matroids. This gives us an approximation guarantee of $1/2$. \spara{Computational complexity}: Let us finish with the compu\-ta\-tional-complexity analysis of the greedy algorithm. Assume that given a graph $G = (V, E)$, we have already enumerated all open triangles. Let $t$ be the number of such triangles. During the while-loop of the greedy algorithm, we maintain a priority queue for $m$ edges, prioritized with the number of violations induced by a single edge. Whenever, a strong edge is deleted, we visit every open triangle induced by this edge and reduce the number of violations of the strong sister edge by 1. Note that we visit every triangle at most twice, so maintaining the queue requires $\ensuremath{O}(t + m \log n)$ time, if we use Fibonacci heap. To check the connectivity, we can use the technique introduced by~\citet{holm2001poly}, allowing us to do a connectivity check in $\ensuremath{O}(\log^2n)$ amortized time. Thus, in total we need $\ensuremath{O}(t + k m \log^2 n )$ time, plus the time to build the list of open triangles. Building such a list can be done in $\ensuremath{O}\pr{\sum_v \deg^2(v)}$ time. \section{Concluding remarks} \label{sec:conclusions} We presented a novel approach for the problem of inferring the strength of social ties. We assume that social ties can be one of two types, strong or weak, and as a guiding principle for the inference process we use the strong triadic closure property. In contrast to most works that use interaction data between users, which are private and thus, typically not available, we also consider as input a collection of {\em tight} communities. Our assumption is that such tight communities are connected via strong ties. This assumption is valid in cases when being part of a community implies a strong connection to one of the existing members. For instance, in a scientific collaboration network, a student is introduced on a research topic by his/her supervisor who is already working in that topic. Based on the {\sc\Large stc}\xspace principle and our assumption about com\-munity-level connectivity, we formulate two variants of the tie-strength inference problem: \textsc{MinViol}\xspace, where we ask to minimize the number of {\sc\Large stc}\xspace violations, and \textsc{MaxTri}\xspace, where we the goal is to maximize the number of non-violated open triangles. We show that both problems are \ensuremath{\mathbf{NP}}-hard. Furthermore, we show that the \textsc{MinViol}\xspace problem is hard to approximate, while for \textsc{MaxTri}\xspace we develop an algorithm with approximation guarantee. For the approximation algorithm we use a greedy algorithm for maximizing a submodular function on intersection of matroids. There are many interesting directions to explore in the future. An interesting question is to consider alternative problem formulations that combine the strong triadic closure property with other community-level constraints, such as density and small diameter. We would also like to consider formulations that incorporate user features. A different direction is to consider an interactive version of the problem, where the goal is select a small number of edges to query, so that the correct labeling on those edges can be used to maximize the accuracy of inferring the strength of the remaining edges. \section{Experimental evaluation}\label{sec:exp} % \begin{table*}[t] \caption{Network characteristics. $|V|$: number of vertices; $|\ensuremath{E}|$: number of edges in the underlying network; $|V_0|$: number of vertices, which participate in any given set (community); $|\ensuremath{E_0}|$: number of edges induced by communities; $\ell$: number of sets (communities); $\ensuremath{\mathrm{avg}}(\alpha_0)$: average density of subgraphs induced by input communities; $s_{\min}$, $s_{\ensuremath{\mathrm{avg}}}$: minimum and average set size; $t_{\max}$, $t_{\ensuremath{\mathrm{avg}}}$: maximum and average participation of a vertex to a set.} \label{tab:stats} \setlength{\tabcolsep}{0pt} \centering \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}l l rrrrrrrrr} \toprule Dataset & $|V|$ &$|\ensuremath{E}|$& $|V_0|$ &$|\ensuremath{E_0}|$ & $\ell$&$\ensuremath{\mathrm{avg}}(\alpha_0)$ & $s_{\min}$&$s_{\ensuremath{\mathrm{avg}}}$& $t_{\max}$&$t_{\ensuremath{\mathrm{avg}}}$\\ \midrule {{\textsl{DBLP}}\xspace} & 10001& 27687& 10001 & 22264 & 1767 & 0.58 & 6 & 7.46 & 10 & 1.31\\ {{\textsl{Youtube}}\xspace} & 10002 & 72215 & 10001 & 15445 & 5323 & 0.69 & 2 & 4.02 & 82 & 2.14\\ {{\textsl{KDD}}\xspace} & 2891 & 11208 & 1598 &3322 & 5601 &0.96 & 2 & 2.40 & 107 & 8.41\\ {{\textsl{ICDM}}\xspace} & 3140 &10689 & 1720 & 3135 &5937 & 0.96 & 2 & 2.34 & 139 & 8.11\\ {{\textsl{FB-circles}}\xspace} & 4039 & 88234 & 2888 & 55896 & 191 & 0.64 & 2 & 23.15 & 44 & 1.53\\ {{\textsl{FB-features}}\xspace} & 4039 & 88234 & 2261 & 20522 & 1239 & 0.93 & 2 & 3.75 & 13 & 2.05\\ {{\textsl{lastFM-artists}}\xspace} & 1892 & 12717 & 1018 & 2323 & 2820 & 0.89 & 2 & 2.91 & 221 & 8.08\\ {{\textsl{lastFM-tags}}\xspace} & 1892 & 12717 & 855 & 1800 & 651 & 0.88& 2 & 3.43& 20 & 2.61\\ {{\textsl{DB-bookmarks}}\xspace} & 1861& 7664& 932 &1145& 1288 &0.97& 2 & 2.27 & 27 & 3.13\\ {{\textsl{DB-tags}}\xspace} & 1861& 7664 & 1507 & 2752 & 4167& 0.96 & 2 & 2.26 & 68 & 6.25\\ \bottomrule \end{tabular*} \end{table*} In this section we present our experimental evaluation. We describe the datasets used in the evaluation, we discuss the baselines, and then present the evaluation results, including quantitative experiments and a case study. The datasets and the implementation of the methods used in our experimental evaluation are publicly available.\footnote{https://github.com/polinapolina/connected-strong-triadic-closure} \spara{Datasets.} We use $10$ datasets, each dataset consists of a network and a set of communities. We describe these datasets below, while their basic characteristics are shown in Table~\ref{tab:stats}. To ensure connectivity of each community, we selected only one part of each disconnected community, which induces the largest connected component. \smallskip \noindent $\bullet$ {{\textsl{KDD}}\xspace} and {{\textsl{ICDM}}\xspace} are subgraphs of the DBLP co-authorship network, restricted to articles published in the respective conferences. Edges represent co-authorships between authors. Communities are formed by keywords that appear in paper abstracts. \smallskip \noindent $\bullet$ {\textsl{FB-circles}}\xspace and {\textsl{FB-features}}\xspace are Facebook ego-networks available at the SNAP repository~\cite{snapnets}. In {{\textsl{FB-circles}}\xspace} the communities are social-circles of users. In {{\textsl{FB-features}}\xspace} communities are formed by user profile features. \smallskip \noindent $\bullet$ {{\textsl{lastFM-artists}}\xspace} and {{\textsl{lastFM-tags}}\xspace} are friendship networks of last.fm users.\footnote{\url{grouplens.org/datasets/hetrec-2011/}} A community in {{\textsl{lastFM-artists}}\xspace} and {{\textsl{lastFM-tags}}\xspace} is formed by users who listen to the same artist and genre, respectively. \smallskip \noindent $\bullet$ {{\textsl{DB-bookmarks}}\xspace} and {{\textsl{DB-tags}}\xspace} are friendship networks of Delicious users.\footnote{\url{www.delicious.com}} A community in {\textsl{DB-bookmarks}}\xspace and {\textsl{DB-tags}}\xspace is formed by users who use the same bookmark and keyword, respectively. \smallskip Additionally, we use SNAP datasets~\cite{snapnets} with ground-truth communities. To have more focused groups, we only keep communities with size less than~10. To avoid having disjoint communities, we start from a small number of seed communities and iteratively add other communities that intersect at least one of the already selected. We stop when the number of vertices reaches $10\,000$. In this way we construct the following datasets: \smallskip \noindent $\bullet$ {\textsl{DBLP}}\xspace: This is also a co-authorship network. Communities are defined by publication venues. \smallskip \noindent $\bullet$ {\textsl{Youtube}}\xspace: This is a social network of Youtube users. Communities consist of user groups created by users. \spara{Baselines.} There are no direct baselines to our approach since the problem definition is novel. Instead we focus on comparing our method with the two techniques that inspired our approach. The first method is by~\citet{sintos2014using} and it maximizes the number of strong edges while keeping the number of {\sc\Large stc}\xspace violations equal to $0$. The second method is by~\citet{angluin13connectivity} and it minimizes the number of edges needed to connect the communities. We refer to these methods as {\textsl{Angluin}}\xspace and {\textsl{Sintos}}\xspace, respectively, and we call our method~{\textsl{Greedy}}\xspace. Note that {\textsl{Angluin}}\xspace is oblivious to the {\sc\Large stc}\xspace property while {\textsl{Sintos}}\xspace does not use any community information. As we combine both goals, we expect that {\textsl{Greedy}}\xspace results in a compromise of these two baselines. \input{mainresults} \spara{Comparison with the baselines.} We compare the performance of {\textsl{Greedy}}\xspace with the two baselines. We run all algorithms on our datasets and measure the number of edges selected as strong, the number of {\sc\Large stc}\xspace violations, and the number of connected components created by strong edges for each of the input communities (so as to test the fragmentation of the communities). The results are shown in Table~\ref{tab:results}. The number of {\sc\Large stc}\xspace violations and the number of strong edges are reported as ratios (see table) for easy comparison. As expected, {\textsl{Angluin}}\xspace introduces more {\sc\Large stc}\xspace violations than {\textsl{Greedy}}\xspace: typically between 1\%--21\%. Interestingly, {\textsl{Angluin}}\xspace introduces less violations in {\textsl{lastFM-tags}}\xspace and 60 times more violations in {\textsl{lastFM-artists}}\xspace. On the other hand, {\textsl{Sintos}}\xspace results in disconnected communities, ranging from $1.74$ to $8.76$ connected components per community, on average. \begin{table}[t] \caption{Precision and recall of {\textsl{Angluin}}\xspace.} \label{tab:accuracyBLA} \centering \begin{tabular}{ l r r r r } \toprule Dataset & $P_W$ & $R_W$ & $P_S$ & $R_S$ \\ \midrule {{\textsl{KDD}}\xspace} &0.86&0.92&0.63&0.48\\ {{\textsl{ICDM}}\xspace} &0.87&0.93&0.66&0.50 \\ {{\textsl{lastFM-artists}}\xspace} &0.91&0.95&0.54&0.37\\ {{\textsl{lastFM-tags}}\xspace} &0.92&0.95&0.26&0.16\\ {{\textsl{DB-bookmarks}}\xspace} &0.92&0.94&0.36&0.27\\ {{\textsl{DB-tags}}\xspace} &0.82&0.87&0.50&0.41\\ \bottomrule \end{tabular} \end{table} \begin{table}[t] \caption{Precision and recall of {\textsl{Sintos}}\xspace.} \label{tab:accuracyBLS} \centering \begin{tabular}{ l r r r r } \toprule Dataset & $P_W$ & $R_W$ & $P_S$ & $R_S$ \\ \midrule {{\textsl{KDD}}\xspace} &0.78&0.70&0.19&0.26\\ {{\textsl{ICDM}}\xspace} & 0.77&0.66&0.18&0.28\\ {{\textsl{lastFM-artists}}\xspace} & 0.88&0.90&0.14&0.12\\ {{\textsl{lastFM-tags}}\xspace} &0.91&0.89&0.09&0.11\\ {{\textsl{DB-bookmarks}}\xspace} &0.92&0.64&0.13&0.49\\ {{\textsl{DB-tags}}\xspace} &0.75&0.62&0.22&0.35\\ \bottomrule \end{tabular} \end{table} \begin{table}[t] \caption{Precision and recall of {\textsl{Greedy}}\xspace.} \label{tab:accuracy} \centering \begin{tabular}{ l r r r r } \toprule Dataset & $P_W$ & $R_W$ & $P_S$ & $R_S$ \\ \midrule {{\textsl{KDD}}\xspace} &0.85&0.75&0.36&0.51 \\ {{\textsl{ICDM}}\xspace} & 0.85&0.71&0.34&0.55 \\ {{\textsl{lastFM-artists}}\xspace} & 0.91&0.90&0.36&0.39 \\ {{\textsl{lastFM-tags}}\xspace} &0.92&0.90&0.15&0.20 \\ {{\textsl{DB-bookmarks}}\xspace} &0.93&0.67&0.15&0.57 \\ {{\textsl{DB-tags}}\xspace} &0.81&0.66&0.32&0.55 \\ \bottomrule \end{tabular} \end{table} \smallskip In the second experiment we test whether strong and weak ties can predict intra- and inter-community edges, respectively. The rationale of this experiment is to test the hypothesis that weak ties are bridges between different communities. With respect to the different methods, our objective is to further demonstrate that {\textsl{Greedy}}\xspace method results as a middle ground between {\textsl{Angluin}}\xspace and {\textsl{Sintos}}\xspace. We randomly select half of the communities as {\em test communities} and run {\textsl{Greedy}}\xspace and {\textsl{Angluin}}\xspace using as input the underlying network and the other half of the communities. We also run {\textsl{Angluin}}\xspace using as input the underlying network; recall that this algorithm does not use any community information as input. Next, using the test communities we construct a set of intra-community edges $E_{\mathit{intra}}$, consisting of edges that belong to at least one community, and inter-community edges $E_{\mathit{inter}}$, consisting of edges that bridge two communities (but do not belong to any single community). Let us denote all strong edges in the output of a given method as $S$ and the weak edges as $W$. We define precision $P_W$ and recall $R_W$ for weak edges as \[ P_W=\frac{|W\cap E_{\mathit{inter}}|}{|W|} \quad\text{and}\quad R_W=\frac{|W\cap E_{\mathit{inter}}|}{|E_{\mathit{inter}}|}, \] and precision $P_S$ and recall $R_S$ for strong edges as \[ P_S=\frac{|S\cap E_{\mathit{intra}}|}{|S|} \quad\text{and}\quad R_S=\frac{|S\cap E_{\mathit{intra}}|}{|E_{\mathit{intra}}|}. \] \smallskip {\textsl{Angluin}}\xspace selects greedily edges that connect as many communities as possible. In other words, it prefers edges that are in many communities in the training set, and this acts as a strong signal for an edge being also in a community in the test set. The results shown in Tables~\ref{tab:accuracyBLA}--\ref{tab:accuracy} support this intuition, showing that {\textsl{Angluin}}\xspace obtains the best results. We also see that {\textsl{Sintos}}\xspace, which does not use any community information, has the worst results, while our method is able to improve {\textsl{Sintos}}\xspace by incorporating information from communities. \spara{Running time.} Our implementation was done in Python and the bottleneck of the algorithm is constructing the list of wedges. The running times vary greatly from dataset to dataset. At fastest we needed 52 seconds while the at slowest we needed almost 5 hours. We should point out that a more efficient implementation as well using parallelization with constructing the wedges should lead to significant reduction in computational time. \spara{Case study.} To demonstrate a simple use case, we use a snippet of {\textsl{KDD}}\xspace dataset: We picked five recent winners of SIGKDD innovation award: Philip S. Yu, Hans-Peter Kriegel, Pedro Domingos, Jon M. Kleinberg and Vipin Kumar and constructed an underlying network as a union of their ego-nets. We then used 5 common topics, \emph{cluster}, \emph{classif}, \emph{pattern}, \emph{network}, and \emph{distribut} as communities. Figure~\ref{fig:dblp} depicts the discovered edges of {\textsl{Greedy}}\xspace. From the figure we see that showing only strong edges significantly simplifies the graph. The selected strong edges are reasonable: for example a path from Hans-Peter Kriegel to Pedro Domingo was Arthur Zimek, Karsten Borgwardt, and Luc De Raedt, while a path from Pedro Domingo to Jon Kleinberg was Luc De Raedt, Xifeng Yan, Zhen Wen, Ching-Yung Lin, Hang-hang Tong, Spiros Papadimitriou Christos Faloutsos, and Jure Leskovec. A zoom-in version of the graph of Figure~\ref{fig:dblp}, showing the names of all authors, is omitted due to space constraints but can be found in the public code and dataset repository.\footnote{https://github.com/polinapolina/connected-strong-triadic-closure} \section{Introduction} \label{sec:intro} \input{karate_graph/karate} The growth of online social networks has been an important factor in shaping our lives for the 21st century. 68\,\% of adults in the US, also accounting for those who do not use internet at all, are facebook users.\footnote{\url{http://www.pewinternet.org/2016/11/11/social-media-update-2016/}} Over the past few years, an ecosystem of online social-network platforms has emerged, serving different needs and purposes: being connected with close friends, sharing news and being informed, sharing photos and videos, making professional connections, and so on. The emergence of such social-networking platforms has introduced many novel research directions. First, online systems have enabled recording and studying human behavior at a very large scale. Second, the specific features of the different systems are changing the way people interact with each other: new social norms are formed and human behavior is adapting. Consequently, data collected by online social-network systems are used to analyze and understand human behavior and complex social phenomena. Questions of interest include understanding information-diffusion phenomena, modeling network evolution and predicting future behavior, identifying the role of users and network links, and more. A question of particular importance, which is the focus of this paper, is the problem of inferring {\em the strength of social ties} in a network. Quantifying the strength of social ties is an essential task for sociologists interested in understanding complex network dynamics based on pair-wise interactions~\cite{granovetter1973strength}, or for engineers interested in designing applications related to viral marketing~\cite{de2014facebook} or friend recommendation~\cite{lu2010link}. The problem of inferring the strength of social ties in a network has been studied extensively in the graph-mining community~\cite{gilbert2009predicting,gilbert2012predicting,onnela2007structure,sintos2014using,tang2012inferring,xiang2010modeling}. While most approaches use user-level features in order to estimate the social-tie strength between pairs of users, our approach, inspired by the work of Sintos and Tsaparas~\cite{sintos2014using}, relies on the {\em strong triadic closure} ({\sc\Large stc}\xspace) principle~\cite{davis1970clustering,easley2010networks,granovetter1973strength}. The {\sc\Large stc}\xspace principle assumes that there are two types of ties in the social network: {\em strong} and {\em weak}. It then asserts that it is unlikely to encounter a triple of users so that two of the ties are strong while the third is missing. In other words, two users who have a strong tie to a third common friend should be acquainted to each other, i.e., they should have {\em at least} a weak tie to each other. Sintos and Tsaparas~\cite{sintos2014using} address the problem of inferring the strength of social ties (i.e., labeling the links of a given network as {\em strong} or {\em weak}) by leveraging the {\sc\Large stc}\xspace property in an elegant manner. They first assume that users are more interested in establishing and maintaining strong ties, as presumably, this is the reason that they joined the network. Using this assumption they formulate the link-strength inference problem by asking to assign the maximal number of strong ties (or the minimal number of weak ties) so that the {\sc\Large stc}\xspace property holds. They prove that the problem is \ensuremath{\mathbf{NP}}-hard and they devise an approximation algorithm for the variant of minimizing the number of weak ties. In this paper, in addition to the network structure, we also consider as a collection of topical communities $C_1,\ldots, C_k$. We assume that the given communities are {\em tight}, that is, each community $C_i$ represents a set of users with {\em focused} interest at a particular topic. For example, such a tight community may be ($i$) a set of users who have been actively involved in a discussion in the social network about a certain issue, ($ii$) the set of scientists who work on `deep learning,' or ($iii$) the HR team of a company. We then require that each given community $C_i$ should be connected via strong ties. In other words, for every two nodes in $C_i$ there is a path made of {\em strong} ties. This requirement reflects the fact that we consider tight communities, as the examples above. Clearly this constraint is less meaningful if we consider {\em loose} communities, i.e., all facebook users who like the `Friends' TV series. Equipped with these assumptions we now define the problem of inferring the strength of social ties: given a social network $G=(V,E)$, and a set of tight communities $C_1,\ldots, C_k\subseteq V$, we ask to label all the edges in $E$ as either {\em strong} or {\em weak} so that ($i$) each community $C_i$ is connected via strong ties; and ($ii$) the total number of {\sc\Large stc}\xspace violations is minimized. Our problem definition captures two natural phenomena: first, tight communities tend to have a backbone, e.g., being part of a community implies a strong connection to one of the existing members. Second, strong ties tend to close triangles, as postulated by the strong triadic closure principle, and thus, real-world social networks have relatively few {\sc\Large stc}\xspace violations. \vspace{2mm} \noindent {\bf Example.} An illustration of our method on the Karate-club dataset~\cite{zachary1977information} is shown in Figure~\ref{figure:karate}. Our method (right) is contrasted with the algorithm of \citet{sintos2014using} (left). Both approaches use the {\sc\Large stc}\xspace principle, but additionally, our method requires that certain communities provided as input are connected with strong ties. In the example, we consider the two ground-truth communities of the Karate-club dataset. We observe that the sets of strong ties inferred by the two methods are fairly similar. We also observe that our method introduces an {\sc\Large stc}\xspace violation only when it is necessary for ensuring connectivity. On the other hand, the method of \citet{sintos2014using} leaves several disconnected singleton nodes, which is less intuitive. $\Box$ \vspace{2mm} We capture the above intuition using two related problem definitions. For the first problem (\textsc{MinViol}\xspace) we ask to minimize the number of {\sc\Large stc}\xspace violations, while for the second problem (\textsc{MaxTri}\xspace) we ask to maximize the number of non-violated open triangles --- there cannot be a violation on a closed triangle. In both cases we label the network edges so as to satisfy the connectivity constraint, with respect to strong edges, for all input communities. We show that both problems, \textsc{MinViol}\xspace and \textsc{MaxTri}\xspace, are \ensuremath{\mathbf{NP}}-hard, even if the input consists of one community. Furthermore, we show that \textsc{MinViol}\xspace is hard to approximate to any multiplicative factor. On the other hand, the problem \textsc{MaxTri}\xspace is amenable to approximation: its objective function is submodular and non-decreasing, while the connectivity constraints can be viewed as an intersection of matroids. Thus, the classic result of \citet{fisher1978analysis} applies, implying that a greedy algorithm leads to $1/(k + 1)$ approximation ratio. We evaluate our methods on real-world networks and input communities. Our quantitative results show that our method achieves a balance between baselines that optimize {\sc\Large stc}\xspace violations and community connectivity separately, while our case study suggests the strong edges selected by the method are meaningful and intuitive. The remaining paper is as follows. We introduce the notation and give the problem definition in Section~\ref{sec:prel}. We show the computational hardness in Section~\ref{sec:nphard} and present the approximation algorithm in Section~\ref{sec:approx}. The related work is discussed in Section~\ref{sec:related}, and the experimental evaluation is given in Section~\ref{sec:exp}. We conclude the paper with remarks in Section~\ref{sec:conclusions}. \section{Computational complexity} \label{sec:nphard} Our next step is to establish that \textsc{MinViol}\xspace (and \textsc{MaxTri}\xspace) are \textbf{NP}-hard. Moreover, we show that \textsc{MinViol}\xspace cannot have any multiplicative approximation guarantee. \begin{proposition} Deciding whether there is a solution \textsc{MinViol}\xspace with zero violations is \ensuremath{\mathbf{NP}}-complete. Thus, there is no multiplicative approximation algorithm for \textsc{MinViol}\xspace, unless \ensuremath{\mathbf{P}}=\ensuremath{\mathbf{NP}}. The result holds even if we use only one community. \end{proposition} \begin{proof} To prove the result we will reduce \textsc{Clique\-Cover} to \textsc{MinViol}\xspace. In an instance of \textsc{Clique\-Cover}, we are asked to partition a graph $G = (V, E)$ to $k$ subgraphs, each one of them being a clique. Assume a graph $G = (V, E)$, where $V = \enset{v_1}{v_n}$, and an integer $k$. We can safely assume that $G$ contains at least one singleton vertex, say $v_1$. Otherwise, we can add a singleton vertex to $G$ and increase $k$ without changing the outcome of \textsc{Clique\-Cover}. For the reduction of \textsc{Clique\-Cover} to \textsc{MinViol}\xspace, we first define a graph $H = (W, A)$. The vertex set $W$ consists of $2n + k$ vertices grouped in 3 sets: the first set are the original vertices $V$, the second set is $U$ with $n$ vertices, the third set is $X$ containing $k$ vertices. The edges $A$ are as follows: We keep the original edges $E$. For each $i = 1, \ldots, n$ and $j = 1, \ldots, k$, we add $(u_i, v_i)$, $(v_i, x_j)$, and $(u_i, x_j)$. We also fully-connect $X$. We add one community consisting of the whole graph. We claim that there is a 0-solution to \textsc{MinViol}\xspace if and only if there is a clique cover for $G$. Since \textsc{Clique\-Cover} is \textbf{NP}-hard, this automatically proves the inapproximability. Assume first that we are given a clique cover $\mathcal{P}=\{P_1,\ldots,P_k\}$. Define the following set of strong edges. For each vertex $v_i$, let $P_j$ be the clique containing $v_i$; add edges $(u_i, v_i)$, $(v_i, x_j)$ to $S$. Finally, add an edge $(x_1, x_j)$ for each $j = 2, \ldots, k$. It is straightforward to see that the connectivity constraints are satisfied. The strong wedges are \[ \begin{split} u_i\text{--}v_i\text{--}x_j,&\quad\text{for}\quad v_i \in P_j, \\ v_i\text{--}x_j\text{--}x_1,&\quad\text{for}\quad v_i \in P_j, \text{ and } j \neq 1,\\ v_i\text{--}x_1\text{--}x_j,&\quad\text{for}\quad v_i \in P_1, \text{ and } j \neq 1, \\ x_j\text{--}x_1\text{--}x_q,&\quad\text{for}\quad q \neq j, \\ v_i\text{--}x_j\text{--}v_\ell,&\quad\text{for}\quad v_i, v_\ell \in P_j, \text{ and } i \neq \ell. \\ \end{split} \] None of these wedges induce a violation, the last one follows from the fact that $\mathcal{P}$ is a clique cover. Thus $\ensuremath{\mathit{viol}}(S) = 0$. To prove the other direction, let $S$ be the set of strong edges such that $\ensuremath{\mathit{viol}}(S) = 0$. Fix $i = 1, \ldots, n$. To satisfy the connectivity, $(u_i, x_j) \in S$ or $(u_i, v_i) \in S$ (or both) for some $j$. Define $Y = \set{v_i; (u_i, x_j) \in S}$ and $Z = V \setminus Y$. Let $v_i \in Z$. Since $(u_i, v_i) \in S$, all edges adjacent to $v_i$ in $E$ are weak. Thus, to satisfy the connectivity, we must have $(v_i, x_j)$ for some $j$. Define two families $\mathcal{A}$ and $\mathcal{B}$, each of $k$ sets, by \[ \begin{split} A_j & = \set{v_i \in Y; (u_i, x_j) \in S} \quad\text{and}\quad \\ B_j & = \set{v_i \in Z; (v_i, x_j) \in S}. \end{split} \] Write $A_0 = B_0 = \emptyset$, and define a family $\mathcal{P}$ of $k$ disjoint sets by $P_j = (A_j \cup B_j) \setminus P_{j - 1}$. $\mathcal{P}$ covers $V$ since each vertex in $V$ is in $A_j$ or $B_j$ for some $j$. We claim that $\mathcal{P}$ is a clique cover. To see this, let $v_i, v_\ell \in P_j$. If $v_i \in Y$ and $v_\ell \in Z$, then $u_i$--$x_j$--$v_\ell$ is a violation since $i \neq \ell$. If $v_i, v_\ell \in Y$, then $u_i$--$x_j$--$u_\ell$ is a violation, or $i = \ell$. If $v_i, v_\ell \in Z$, then either $i = \ell$ or $(v_i, v_\ell) \in E$. This shows that $\mathcal{P}$ is a clique cover. \end{proof} \begin{corollary} The \textsc{MaxTri}\xspace problem is \ensuremath{\mathbf{NP}}-hard. The result holds even if we use only one community. \end{corollary} \section{Preliminaries and problem definition} \label{sec:prel} The main input for our problem is an undirected graph $G = (V, E)$ with $n$ vertices and $m$ edges. Given a subset of vertices $X\subseteq V$ and a subset of edges $F\subseteq E$, we write $F(X)$ to denote the edges in $F$ that connect vertices in $X$. We are interested in labeling the set of edges $E$. Specifically, we want to label each edge as either {\em strong} or {\em weak}. To specify a labeling of edges $E$ it is sufficient to specify the set of strong edges $S \subseteq E$. To quantify the quality of a labeling $S \subseteq E$, for a given graph $G = (V, E)$, we use the \emph{strong triadic closure} ({{\sc\Large stc}\xspace}) property. Namely, given a triple $(u, v, w)$ of vertices such that $(u, v), (v, w) \in S$, we say that the triple violates the {{\sc\Large stc}\xspace} property if $(u, w) \notin S$. In other words, a strong friend of a strong friend must be connected, possibly with a weak edge. We define $\ensuremath{\mathit{viol}}(S; G)$ to be the number of {{\sc\Large stc}\xspace} violations. Typically, $G$ is known from the context, and we omit it from the notation. let $S \subseteq E$ be the set of edges considered to be strong. Assume a triple $(u, v, w)$ of vertices such that $(u, v), (v, w) \in S$. We say that the triple violates \emph{strong triadic closure} ({{\sc\Large stc}\xspace}) property if $(u, w) \notin S$. In other words, two users who have a common strong friend should be connected, possibly with a weak tie. We define $\ensuremath{\mathit{viol}}(S; G)$ to be the number of {{\sc\Large stc}\xspace} violations. Typically, $G$ is known from the context, and we simply denote the number of violations by $\ensuremath{\mathit{viol}}(S)$. As discussed in the introduction, our goal is to discover a strong backbone of the graph. At simplest we are looking for a set of edges that connect the whole graph with strong ties while minimizing the number of violations. We also consider a more general case, where we are given a \emph{set of communities}, and the goal is to ensure that each community is connected with strong ties. More formally, we have the following problem definition \begin{problem}[\textsc{MinViol}\xspace] \label{problem:stc} Given a graph $G=(V,E)$ and a set of communities $C_1,\ldots, C_k\subseteq V$, find a set of strong edges $S\subseteq E$ such that each $(C_i, S(C_i))$ is connected and the number of {{\sc\Large stc}\xspace} violations, $\ensuremath{\mathit{viol}}(S)$, is minimized. \end{problem} In the above problem definition $(C_i, S(C_i))$ is the subgraph of $G$ induced by the vertices in $C_i$ {\em and} the edges in $S$, that is, $S(C_i) = \{(u,v)\in E \mid u,v\in C_i \mbox{ and } (u,v)\in S\}$. In order for \textsc{MinViol}\xspace to have at least one feasible solution, we assume that $(C_i, E(C_i))$ is connected for each $C_i$. In addition to minimization version, we consider a maximization version of the problem. In order to do that, given a graph $G$, let $T$ be the number of open triangles in $G$. We define $\ensuremath{\mathit{tri}}(S) = T - \ensuremath{\mathit{viol}}(S)$ to be the number of open triangles that are not violated. This leads to the following optimization problem. \begin{problem}[\textsc{MaxTri}\xspace] \label{problem:stc} Given a graph $G=(V,E)$ and a set of communities $C_1,\ldots, C_k\subseteq V$, find a set of strong edges $S$ such that each $(C_i, S(C_i))$ is connected, and the number of non-violated triangles, $\ensuremath{\mathit{tri}}(S)$, is maximized. \end{problem} Note that {\sc\Large stc}\xspace violations can occur only for open triangles. Therefore, $\ensuremath{\mathit{tri}}(S)= T - \ensuremath{\mathit{viol}}(S)$ is nonnegative, while it achieves its maximum value $T$ when there are no {\sc\Large stc}\xspace violations. Obviously, \textsc{MinViol}\xspace and \textsc{MaxTri}\xspace have the same optimal answer. However, we will see that they yield different approximation results: \textsc{MinViol}\xspace cannot have any multiplicative approximation guarantee (constant or non-constant) while a greedy algorithm has $1/(k + 1)$ guarantee for \textsc{MaxTri}\xspace. \section{Related work} \label{sec:related} The study of interpresonal ties has a long history in social psychology. Several researchers have investigated the role of different types of social ties with respect to structural properties of social networks, as well as with respect to information-propagation phenomena. For example, in economics, \citet{montgomery1992job} showed that weak ties are positively correlated to higher wages and higher aggregate employment rates. More recent works considered how different social ties are formed and how they evolve in online social networks, such as email networks~\cite{kossinets2006empirical} and mobile-phone networks~\cite{onnela2007structure}. The strong triadic closure ({\sc\Large stc}\xspace) property, which forms the basis of our inference algorithm, was first formulated in the seminal paper of \citet{granovetter1973strength}, while evidence that this property holds in social networks has appeared in earlier works~\cite{davis1970clustering,newcomb2961acquaintance}. \citet{memic2009testing} have conducted a more recent study confirming that the principle remains valid on more recently-collected datasets~\cite{memic2009testing}. In computer science, there have been several works that study the problem of inferring the strength of social ties in a network. \citet{kahanda2009using} use transactional events, such as communication and file transfers, to predict link strength, by applying techniques from the literature of the link-prediction problem~\cite{liben2007link}. It is shown that the approach can accurately predict strong relationships. \citet{gilbert2009predicting} propose a predictive model for inferring tie strength. The model uses variables describing the interaction of users in a social-media platform. The paper also illustrates how the inferred tie strength can be used to improve social-media features, such as, privacy controls, message routing, and friend recommendation. Likewise, \citet{xiang2010modeling} leverage user-level interaction data. They formulate the problem of inferring hidden relationship strengths using a latent-variable model, which is learned by a coordinate-ascent optimization procedure. A feature of their setting is that social strengths are modeled as real-valued variables, not just binary. \citet{jones2013inferring} examined a large set of features for the task of predicting the strength of social ties on a Facebook interaction dataset, and found that the frequency of online interaction is diagnostic of strong ties, while private communications (messages) are not necessarily more informative than public communications (comments, wall posts, and other interactions). \citet{backstrom2014romantic} consider a particular type of social ties --- romantic relationships --- and they ask whether this can be accurately recognized. They use a large sample of Facebook data to answer the question affirmatively, and on the way they develop a new type of tie strength, {\em the extent to which two people's mutual friends are not themselves well-connected}, which they call ``dispersion.'' In a different direction, \citet{fang2015uncovering} consider only closed triangles and ask whether it is possible to find out which edges are formed last, i.e., which edges closed an open triad. The underlying research question is to recover the dynamic information in the triadic-closure process. They approach this problem using a probabilistic factor-graph model, and apply the proposed model on a large collaboration network. Researchers have also studied the tie-strength inference problem in the presence of more than one social network. \citet{gilbert2012predicting} explore how well a tie strength model developed for one social-media platform adapts to another, while \citet{tang2012inferring} consider a generalization of the problem over multiple heterogeneous networks. Their work uses a transfer-based factor-graph model, and also incorporates features motivated from social-psychology theories, such as social balance \cite{easley2010networks}, structural holes \cite{burt2009structural}, and and social status \cite{davis1972structure}. Most of the above works on tie-strength inference utilize pairwise user-level interaction data, such as email, private messages, public mentions, frequency of interactions, and so on. In many cases such detailed data are not available. Our objective is to address the tie-strength inference problem using non private data, such as the structure of the social network and information about communities and teams that users have participated. Conceptually and methodologically our paper is related to the work of \citet{sintos2014using}, who use as available information only the network structure, to infer strong and weak ties with the means of the strong triadic closure property~\cite{easley2010networks}. We extend that work by introducing community-level information and a corresponding connectivity constraint to account for explaining the observed community structure: namely, we require that each community should be connected via strong ties. Like the work of \citet{sintos2014using}, we follow a combinatorial approach, but the techniques we use are significantly different. A problem related to the inference of tie strength is the problem of predicting edge signs in social networks~\cite{chiang2014prediction,leskovec2010predicting}. The sign of an edge is typically interpreted as `friend' or `foe', and thus, existing algorithms utilize theories from social psychology that are developed for this kind of relationships, in particular social balance~\cite{easley2010networks} and social status theory~\cite{davis1972structure}. In our experiments we are comparing our method with the algorithm of \citet{angluin13connectivity}, which takes as input a set of teams (communities) over a set of entities and seeks to add a minimal number of edges among the entities so that all given teams are connected. The algorithm is greedy and it is shown to have a $\ensuremath{O}(\log n)$ approximation guarantee. In our case, in addition to the set of teams we also have as input an underlying network, and edges are selected only if they are network edges. Selected edges are considered strong, and non-selected edges are considered weak. Thus, the method of \citet{angluin13connectivity} is a combinatorial approach, which aim to satisfy connectivity among the input communities (like our method), but it does not take into account {\sc\Large stc}\xspace violations. On the other hand, it aims to minimize the number of strong edges (while our method is oblivious to this consideration).
\section{Introduction} The purpose of this paper is to extend the method of Rademacher or Gaussian complexities to a more general, nonlinear setting. Suppose that $\mathbf{X =\left( X_{1},...,X_{n}\right) $ is a vector of independent random variables with values in some space $\mathcal{X}$, $\mathbf{X}^{\prime }$ is iid to \mathbf{X}$, and that $\mathcal{H}$ is a finite class of functions $h \mathcal{X}\rightarrow \left[ 0,1\right] $. For $\mathbf{x}\in \mathcal{X ^{n}$ and $h\in \mathcal{H}$ we use $h\left( \mathbf{x}\right) $ to denote the vector $h\left( \mathbf{x}\right) =\left( h\left( x_{1}\right) ,...,h\left( x_{n}\right) \right) \in \left[ 0,1\right] ^{n}$ and $\mathcal{ }\left( \mathbf{x}\right) =\left\{ h\left( \mathbf{x}\right) :h\in \mathcal{ }\right\} \subseteq \mathbb{R}^{n}$. Now let $f:\left[ 0,1\right] ^{n}\rightarrow \mathbb{R}$ be the sample average \begin{equation*} f\left( s_{1},...,s_{n}\right) :=\frac{1}{n}\sum_{i=1}^{n}s_{i}\text{ for s_{i}\in \mathbb{R}. \end{equation* Then it is not hard to show (see \cite{Bartlett 2002}, Theorem 8, or \cit {Ledoux 1991}, Lemma 6.3 and (4.8)) tha \begin{equation} \mathbb{E}\left[ \sup_{h\in \mathcal{H}}\mathbb{E}_{\mathbf{X}^{\prime } \left[ f\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] -f\left( h\left( \mathbf{X}\right) \right) \right] \leq \frac{2}{n}\mathbb{E}\left[ R\left( \mathcal{H}\left( \mathbf{X}\right) \right) \right] \leq \frac{\sqrt 2\pi }}{n}~\mathbb{E}\left[ G\left( \mathcal{H}\left( \mathbf{X}\right) \right) \right] , \label{symmetrization inequalities} \end{equation where the Rademacher and Gaussian averages of a subset $Y\subseteq \mathbb{R ^{n}$ ar \begin{equation*} R\left( Y\right) =\mathbb{E}\sup_{\mathbf{y}\in Y}\left\langle \mathbf \epsilon ,y}\right\rangle \text{ and }G\left( Y\right) =\mathbb{E}\sup_ \mathbf{y}\in Y}\left\langle \mathbf{\gamma ,y}\right\rangle \text{.} \end{equation* Here $\mathbf{\epsilon }=\left( \epsilon _{1},...,\epsilon _{n}\right) $ and $\gamma =\left( \gamma _{1},...,\gamma _{n}\right) $ are vectors of independent Rademacher and standard normal variables respectively. The bounded difference inequality (Theorem \ref{Theorem bounded difference}, often called McDiarmid's inequality) shows that the random variable \sup_{h\in \mathcal{H}}\mathbb{E}_{\mathbf{X}^{\prime }}\left[ f\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] -f\left( h\left( \mathbf X}\right) \right) $ is sharply concentrated about its mean, and the symmetrization inequalities (\ref{symmetrization inequalities}) lead to a uniform bound on the estimation error (see \cite{Koltchinskii 2002} or \cit {Bartlett 2002}): for any $\delta \in \left( 0,1\right) $ with probability at least $1-\delta \begin{equation} \sup_{h\in \mathcal{H}}\mathbb{E}_{\mathbf{X}^{\prime }}\left[ f\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] -f\left( h\left( \mathbf X}\right) \right) \leq \frac{2}{n}\mathbb{E}\left[ R\left( \mathcal{H}\left( \mathbf{X}\right) \right) \right] +\sqrt{\frac{\ln \left( 1/\delta \right) } 2n}}. \label{Uniform bound classical} \end{equation This fact has proven very useful in statistical learning theory, and many techniques have been developed to bound Rademacher and Gaussian averages in various contexts of classification, function learning, matrix completion, multi-task learning and unsupervised learning (see e.g. \cite{Bartlett 2002 , \cite{Meir Zhang}, \cite{Ambroladze 05}, \cite{Kakade 2009}, \cit {KakadeEtAl 2012}, \cite{Biau Lugosi}). The sample average is particularly simple and useful, but there are many other interesting statistics, which are nonlinear, such as U-statistics, quantiles, or M-estimators to estimate other distributional properties. Concrete examples would be estimators of the median for economic applications, or the Wilcoxon two-sample statistic, which plays a role in the evaluation of ranking functions (\cite{Agarwal 2005}). Nonlinear versions of (\ref{symmetrization inequalities}) and (\ref{Uniform bound classical}) could be quite useful and make the abundance of techniques to bound Rademacher and Gaussian averages available in a larger context. Such an extension is possible, also for vector valued function classes, if the statistic $f$ in question has the right kind of Lipschitz property and is not too "far from linearity". To make this precise we make the following definition.\bigskip \begin{definition} Suppose $f:\mathcal{X}^{n}\rightarrow \mathbb{R}$. For $k\in \left\{ 1,...,n\right\} $ and $y,y^{\prime }\in \mathcal{X}$, define the $k$-th partial difference operator as \begin{equation*} D_{yy^{\prime }}^{k}f\left( \mathbf{x}\right) =f\left( ...,x_{k-1},y,x_{k+1},...\right) -f\left( ...,x_{k-1},y^{\prime },x_{k+1},...\right) \text{, for }\mathbf{x}\in \mathcal{X}^{n}. \end{equation* For $\mathcal{U}\subseteq \mathbb{R}^d$ we define seminorms $M_{Lip}$ and J_{Lip}$ on the vector space of real functions $f:\mathcal{U}^{n}\rightarrow \mathbb{R}$ b \begin{eqnarray*} M_{Lip}\left( f\right) &=&\max_{k}\sup_{\mathbf{x}\in \mathcal{U}^{n},y\neq y^{\prime }\in \mathcal{U}}\frac{D_{yy^{\prime }}^{k}f\left( \mathbf{x \right) }{\left\Vert y-y^{\prime }\right\Vert }\text{ and} \\ J_{Lip}\left( f\right) &=&n~\max_{k\neq l}\sup_{\mathbf{x}\in \mathcal{U ^{n},y\neq y^{\prime },z,z^{\prime }\in \mathcal{U}}\frac{D_{zz^{\prime }}^{l}D_{yy^{\prime }}^{k}f\left( \mathbf{x}\right) }{\left\Vert y-y^{\prime }\right\Vert }. \end{eqnarray*} \end{definition} With these definitions we can extend the Gaussian part of the symmetrization inequalities (\ref{symmetrization inequalities}) to nonlinear statistics.\bigskip \begin{theorem} \label{Theorem Main} Let $\mathbf{X}=\left( X_{1},...,X_{n}\right) $ be a vector of independent random variables with values in $\mathcal{X}$, \mathbf{X}^{\prime }$ iid to $\mathbf{X}$, let $\mathcal{U}\subseteq \mathbb R}^{d}$, let $\mathcal{H}$ be a finite class of functions $h:\mathcal X\rightarrow U}$ and let $\mathcal{H}\left( \mathbf{X}\right) =\left\{ h\left( \mathbf{x}\right) :h\in \mathcal{H}\right\} \subseteq \mathbb{R ^{dn} $. Then for $f:\mathcal{U}^{n}\rightarrow \mathbb{R} \begin{equation} \mathbb{E}\left[ \sup_{h\in \mathcal{H}}\mathbb{E}_{\mathbf{X}^{\prime } \left[ f\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] -f\left( h\left( \mathbf{X}\right) \right) \right] \leq \sqrt{2\pi }\left( 2M_{Lip}\left( f\right) +J_{Lip}\left( f\right) \right) ~\mathbb{E}\left[ G\left( \mathcal{H}\left( \mathbf{X}\right) \right) \right] . \label{Main inequality} \end{equation \bigskip \end{theorem} Remarks: \begin{enumerate} \item If $d=1$ and $f$ is the arithmetic mean, then it is easy to see that M_{Lip}\left( f\right) =1/n$ and $J_{Lip}\left( f\right) =0$, so the Gaussian version of (\ref{symmetrization inequalities}) is recovered up to a constant factor of $2$. \item Since the right hand side of (\ref{Main inequality}) is invariant under a sign-change of $f$, the same bounds hold for $\sup_{h\in \mathcal{H }f\left( h\left( \mathbf{X}\right) \right) -\mathbb{E}\left[ f\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] $. \item In many applications the Gaussian average $G\left( \mathcal{H}\left( \mathbf{X}\right) \right) $ can be bounded in the same way as the Rademacher average. In general $G\left( \mathcal{H}\left( \mathbf{X}\right) \right) $ can be bounded by $R\left( \mathcal{H}\left( \mathbf{X}\right) \right) $ with an additional factor of $3\sqrt{\ln \left( n+1\right) }$ (see \cit {Ledoux 1991}, (4.9)). \item Finite cardinality of $\mathcal{H}$ is required to avoid problems of measurability and should not be too disturbing, because the cardinality of \mathcal{H}$ can be arbitrarily large. For infinite $\mathcal{H}$ one can replace expressions like $\mathbb{E}\left[ \sup_{h\in \mathcal{H}}\left( .\right) \right] $ by $\sup_{\mathcal{H}_{0}\subset \mathcal{H},\left\vert \mathcal{H}_{0}\right\vert <\infty }\mathbb{E}\left[ \sup_{h\in \mathcal{H _{0}}\left( .\right) \right] $.\bigskip \end{enumerate} For a given statistic $f$ the key to the application of Theorem \ref{Theorem Main} is the verification that $M_{Lip}\left( f\right) $ and $J_{Lip}\left( f\right) $ are of order $O\left( 1/n\right) $. This is true for the sample average, but also for \begin{itemize} \item U- and V-statistics of all orders with coordinate-wise Lipschitz kernels. This includes multi-sample cases, such as smoothened versions of the Wilcoxon two-sample-statistic. A corresponding application to ranking is sketched in Section \ref{Subsetction Ranking}. \item Lipschitz L-statistics. These are weighted averages of order statistics with Lipschitz weighting functions and include smoothened approximations to medians, or smoothened estimators for quantiles. In Section \ref{Subsection L-statistics} a potential application to robust clustering is discussed. \item a class of M-estimators with strongly convex objectives, in particular error functionals of $\ell _{2}$-regularized classification or function estimation. In Section \ref{Subsection L_2 regularization} we sketch an application to representation learning. \end{itemize} This list is not exhaustive and other examples can be generated using the fact that $M_{Lip}$ and $J_{Lip}$ are seminorms. Also, if $\mathcal{U \subseteq \mathbb{R}^d$ is bounded and $M_{Lip}\left( f\right) $ and J_{Lip}\left( f\right) $ are of order $O\left( 1/n\right) $, then every twice differentiable function with bounded derivatives when composed with $f$ has the same property (see \cite{Maurer 2018}).\bigskip The seminorms $M_{Lip}$ and $J_{Lip}$ are strongly related to the seminorms M$ and $J$ introduced in \cite{Maurer 2018}. For $f:\mathcal{X ^{n}\rightarrow \mathbb{R}$, where $\mathcal{X}$ can be any set, they are defined a \begin{eqnarray*} M\left( f\right) &=&\max_{k}\sup_{\mathbf{x}\in \mathcal{X}^{n},y,y^{\prime }\in \mathcal{X}}D_{y,y^{\prime }}^{k}f\left( \mathbf{x}\right) \text{ and} \\ J\left( f\right) &=&n\text{ }\max_{k,l:k\neq l}\sup_{\mathbf{x}\in \mathcal{ }^{n},y,y^{\prime },z,z^{\prime }\in \mathcal{X}}D_{z,z^{\prime }}^{l}D_{y,y^{\prime }}^{k}f\left( \mathbf{x}\right) . \end{eqnarray* $M$ and $J$ control the nonlinear generalizations of several properties of linear statistics, such as Bernstein's inequality, sample-efficient variance estimation, empirical Bernstein bounds and Berry-Esseen type bounds of normal approximation (see \cite{Maurer 2017} and \cite{Maurer 2018}). If \mathcal{U}$ is bounded with diameter $\Delta $, then clearly $M\left( f\right) \leq M_{Lip}\left( f\right) \Delta $ and $J\left( f\right) \leq J_{Lip}\left( f\right) \Delta $, and the results in \cite{Maurer 2018} can be reformulated in terms of $M_{Lip}$ and $J_{Lip}$. In particular, if \mathcal{U}$ is bounded and $M_{Lip}\left( f\right) $ and $J_{Lip}\left( f\right) $ are of order $O\left( 1/n\right) $, then $f\,$is a weakly interactive function as defined in \cite{Maurer 2018}.\bigskip Theorem \ref{Theorem Main}, the definition of $M\left( f\right) $ and the bounded difference inequality (Theorem \ref{Theorem bounded difference}) applied to the random variable $\sup_{h\in \mathcal{H}}\mathbb{E}\left[ f\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] -f\left( h\left( \mathbf{X}\right) \right) $ yield the nonlinear extension of (\ref{Uniform bound classical}). \begin{corollary} \label{Corollary uniform concentration}Under the conditions of Theorem \re {Theorem Main}, for any $\delta \in \left( 0,1\right) $, with probability at least $1-\delta , \begin{multline*} \sup_{h\in \mathcal{H}}\mathbb{E}\left[ f\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] -f\left( h\left( \mathbf{X}\right) \right) \\ \leq \sqrt{2\pi }\left( 2M_{Lip}\left( f\right) +J_{Lip}\left( f\right) \right) ~\mathbb{E}\left[ G\left( \mathcal{H}\left( \mathbf{X}^{\prime }\right) \right) \right] +M\left( f\right) \sqrt{n\ln \left( 1/\delta \right) }. \end{multline*} \end{corollary} The next section is devoted to applications, then we prove Theorem \re {Theorem Main}. An appendix contains some technical material. \section{Applications} In the sequel we sketch some potential applications and exhibit some generic classes of statistics, to which Theorem \ref{Theorem Main} and Corollary \re {Corollary uniform concentration} can be applied. \subsection{Ranking, U- and V-statistics\label{Subsetction Ranking}} An example for the application of Theorem \ref{Theorem Main} is given by the following variant of the Wilcoxon-two-sample statistic, which we simplify for the purpose of illustration. Let $n$ be an even integer, $\ell :\mathbb{ }\rightarrow \left[ 0,1\right] $ and define $\hat{A}_{\ell }:\mathbb{R ^{n}\rightarrow \mathbb{R}$ b \begin{equation*} \hat{A}_{\ell }\left( x_{1},...,x_{n}\right) =\frac{4}{n^{2} \sum_{i=1}^{n/2}\sum_{j=n/2+1}^{n}\ell \left( x_{i}-x_{j}\right) . \end{equation* Now suppose that $\mu _{+}$ and $\mu _{-}$ are two probability measures on some space $\mathcal{X}$, and we construct a sample $\mathbf{X}=\left( X_{1},...,X_{n}\right) $ by drawing the first half of $\mathbf{X}$ iid from \mu _{+}$ and the second half iid from $\mu _{-}$, that is $\mathbf{X}\sim \mu _{+}^{n/2}\times \mu _{-}^{n/2}$. Now let $h:\mathcal{X}\rightarrow \mathbb{R}$ be some function. If $\ell =1_{\left( 0,\infty \right) }$ is the indicator of the positive reals, then $\hat{A}_{\ell }\left( h\left( \mathbf X}\right) \right) $ is evidently an unbiased estimator for \begin{equation} \Pr_{\left( x,y\right) \sim \mu _{+}\times \mu _{-}}\left\{ h\left( x\right) >h\left( y\right) \right\} , \label{AUC of h} \end{equation the "area under the ROC Curve" (AUC) (as explained in \cite{Agarwal 2005}), and provides a criterion for the evaluation of $h$ as a ranking functions. In this case $\hat{A}_{\ell }$ is the proper Wilcoxon statistic (apart from the fact that we didn't worry about ties and consider a balanced sample for simplicity), but other loss functions $\ell $ come into play if a good ranking function is to be chosen from a set of candidates (see \cite{Ying}). Let us assume that $\ell $ has Lipschitz constant $L$. Applying the partial difference operator to the function $\hat{A}_{\ell }$, at first for $k\leq n/2$, we find for any $y,y^{\prime }\in \mathbb{R} \begin{equation*} D_{y,y^{\prime }}^{k}\hat{A}_{\ell }\left( \mathbf{x}\right) =\frac{4}{n^{2} \sum_{j=n/2+1}^{n}\ell \left( y-x_{j}\right) -\ell \left( y^{\prime }-x_{j}\right) \leq \frac{2L}{n}\left\vert y-y^{\prime }\right\vert . \end{equation* Together with the analogous argument for $k>n/2$ this gives the boun \begin{equation} M_{Lip}\left( \hat{A}_{\ell }\right) =\max_{k}\sup_{\mathbf{x}\in \mathbb{R ^{n},y\neq y^{\prime }\in \mathbb{R}}\frac{D_{y,y^{\prime }}^{k}\hat{A _{\ell }\left( \mathbf{x}\right) }{\left\vert y-y^{\prime }\right\vert }\leq \frac{2L}{n}. \label{First order Lipschitz response AUC} \end{equation In the same way one shows that $M\left( \hat{A}_{\ell }\right) \leq 2/n$. To bound $J_{Lip}\left( \hat{A}_{\ell }\right) $ first let $k\leq n/2$, $l\neq k $ and $y,y^{\prime },z,z^{\prime }\in \mathbb{R}$. The \begin{align*} & \left. D_{z,z^{\prime }}^{l}D_{y,y^{\prime }}^{k}\hat{A}_{\ell }\left( \mathbf{x}\right) =\frac{4}{n^{2}}\sum_{j=n/2+1}^{n}D_{z,z^{\prime }}^{l}\left( \ell \left( y-x_{j}\right) -\ell \left( y^{\prime }-x_{j}\right) \right) \right. \\ & =\left\{ \begin{array}{ccc} 0 & \text{if} & l\leq n/2 \\ \leq \frac{4}{n^{2}}\left( \ell \left( y-z\right) -\ell \left( y^{\prime }-z\right) -\ell \left( y-z^{\prime }\right) +\ell \left( y^{\prime }-z^{\prime }\right) \right) & \text{if} & l>n/ \end{array \right. \leq \frac{8L}{n^{2}}\left\vert y-y^{\prime }\right\vert \text{,} \end{align* and analogous reasoning for $k>n/2$ give \begin{equation} J_{Lip}\left( \hat{A}_{\ell }\right) =n\max_{k,l:k\neq l}\sup_{\mathbf{x}\in \mathbb{R}^{n},y,y^{\prime },z,z^{\prime }\in \mathbb{R}}\frac D_{z,z^{\prime }}^{l}D_{y,y^{\prime }}^{k}\hat{A}_{\ell }\left( \mathbf{x \right) }{\left\vert y-y^{\prime }\right\vert }\leq \frac{8L}{n}. \label{Second order Lipschitz response AUC} \end{equation Now suppose that $\mathcal{H}$ is a set of candidate ranking functions $h \mathcal{X}\rightarrow \mathbb{R}$, for example a ball of linear functionals in a RKHS. We wish to choose $h\in \mathcal{H}$ so as to maximize (\ref{AUC of h}). If we choose $\ell \leq 1_{\left( 0,\infty \right) }$, then Corollary \ref{Corollary uniform concentration} states that for every \delta \in \left( 0,1\right) $ with probability at least $1-\delta $ in \mathbf{X}$ we have for every potential ranking function $h\in \mathcal{H\,\ }$tha \begin{eqnarray*} \Pr_{\left( X,Y\right) \sim \mu _{+}\times \mu _{-}}\left\{ h\left( X\right) >h\left( Y\right) \right\} &=&\mathbb{E}\left[ \hat{A}_{1_{\left( 0,\infty \right) }}\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] \geq \mathbb{E}\left[ \hat{A}_{\ell }\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] \\ &\geq &\hat{A}_{\ell }\left( h\left( \mathbf{X}\right) \right) -\frac{1 \sqrt{2\pi }L~\mathbb{E}\left[ G\left( \mathcal{H}\left( \mathbf{X}^{\prime }\right) \right) \right] }{n}-2\sqrt{\frac{\ln \left( 1/\delta \right) }{n}}, \end{eqnarray* so as to justify the strategy to optimize the AUC by the maximization of the empirical surrogate $\hat{A}_{\ell }\left( h\left( \mathbf{X}\right) \right) $. Similar bounds are obtained in \cite{Clemencon 2008}, even with fast rates under some additional assumptions. The point here is to illustrate the simplicity of only needing to verify the first- and second-order response properties (\ref{First order Lipschitz response AUC}) and (\ref{Second order Lipschitz response AUC}).\bigskip A generalization of this example concerns the generic classes of V- and U-statistics. Let $\mathcal{U}\subseteq \mathbb{R}^{d}$, $m\leq n$ and for each $\mathbf{j}\in \left\{ 1,...,n\right\} ^{m}$ let $\kappa _{\mathbf{j}} \mathcal{U}^{m}\rightarrow \mathbb{R}$. Define $V$,$U:\mathcal{U ^{n}\rightarrow \mathbb{R}$ b \begin{eqnarray*} V\left( \mathbf{x}\right) &=&n^{-m}\sum_{\mathbf{j}\in \left\{ 1,...,n\right\} ^{m}}\kappa _{\mathbf{j}}\left( x_{j_{1}},...,x_{j_{m}}\right) \\ U\left( \mathbf{x}\right) &=&\binom{n}{m}^{-1}\sum_{1\leq j_{1}<...<j_{m}\leq n}\kappa _{\mathbf{j}}\left( x_{j_{1}},...,x_{j_{m}}\right) . \end{eqnarray* The next theorem shows that $V$ and $U$ inherit the seminorm properties of the worst kernel $\kappa _{\mathbf{j}}$, scaled down by a factor of $m/n$ and $m^{2}/n$ respectively. \begin{theorem} \label{Theorem U-statistic}Let $f$ be either $V$ or $U$ and $\mathcal{U \subseteq \mathbb{R}^{d}$. Suppose that for all multi-indices $\mathbf{j}$ we have $M_{Lip}\left( \kappa _{\mathbf{j}}\right) \leq L$. Then M_{Lip}\left( f\right) \leq Lm/n$ and $J_{Lip}\left( f\right) \leq Lm^{2}/n . If $M\left( \kappa _{\mathbf{j}}\right) \leq B$ for all $\mathbf{j}$ then M\left( f\right) \leq Bm/n$ and $J\left( f\right) \leq Bm^{2}/n$. \end{theorem} The easy proof is given in Appendix \ref{Appendix Proof Ustat}. Symmetrization inequalities and uniform bounds are then immediate from Theorem \ref{Theorem Main} and Corollary \ref{Corollary uniform concentration}, without any symmetry assumptions on kernels or variables. \subsection{Lipschitz L-statistics and robust clustering\label{Subsection L-statistics}} Let $\mathcal{U}\subseteq \mathbb{R}$ be a bounded interval of diameter \Delta $ and use $\left( x_{\left( 1\right) },...,x_{\left( n\right) }\right) $ to denote the order statistic of $\mathbf{x}\in \mathcal{U}^{n}$. Let $F:\left[ 0,1\right] \rightarrow \mathbb{R}$ have supremum norm \left\Vert F\right\Vert _{\infty }$ and Lipschitz-constant $\left\Vert F\right\Vert _{Lip}$ and consider the functio \begin{equation} \mathcal{L}_{F}\left( \mathbf{x}\right) =\frac{1}{n}\sum_{i=1}^{n}F\left( i/n\right) x_{\left( i\right) }\text{.} \label{L-statistic} \end{equation The following result is shown in \cite{Maurer 2018}. \begin{theorem} \label{Theorem LstatWeak}For $\alpha ,\beta \in \mathbb{R}$ let $\left[ \left[ \alpha ,\beta \right] \right] $ denote the interval $\left[ \min \left\{ \alpha ,\beta \right\} ,\max \left\{ \alpha ,\beta \right\} \right] . The \begin{eqnarray} \left\vert D_{y,y^{\prime }}^{k}\mathcal{L}_{F}\left( \mathbf{x}\right) \right\vert &\leq &\frac{\left\Vert F\right\Vert _{\infty }\text{diam}\left( \left[ \left[ y,y^{\prime }\right] \right] \right) }{n} \label{Lstat1 conditio} \\ \left\vert D_{z,z^{\prime }}^{l}D_{y,y^{\prime }}^{k}\mathcal{L}_{F}\left( \mathbf{x}\right) \right\vert &\leq &\frac{\left\Vert F\right\Vert _{Lip \text{diam}\left( \left[ \left[ z,z^{\prime }\right] \right] \cap \left[ \left[ y,y^{\prime }\right] \right] \right) }{n^{2}} \label{Lstat2 conditio} \end{eqnarray for any $\mathbf{x}\in \left[ 0,1\right] ^{n},$\textbf{\ }all $k\neq l$ and all $y,y^{\prime },z,z^{\prime }\in \left[ 0,1\right] $. \end{theorem} It follows that $M\left( \mathcal{L}_{F}\right) \leq \Delta \left\Vert F\right\Vert _{\infty }/n,M_{Lip}\left( \mathcal{L}_{F}\right) \leq \left\Vert F\right\Vert _{\infty }/n$ and $J_{Lip}\left( \mathcal{L _{F}\right) \leq \Delta \left\Vert F\right\Vert _{Lip}/n$. For a $\mathcal{U} $-valued function class $\mathcal{H}$ Corollary \ref{Corollary uniform concentration} implies the following uniform bound. For every $\delta \in \left( 0,1\right) $ with probability at least $1-\delta $ in $\mathbf{X}$ tha \begin{multline*} \left\vert \sup_{h\in \mathcal{H}}\mathbb{E}\left[ \mathcal{L}_{F}\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] -\mathcal{L}_{F}\left( h\left( \mathbf{X}\right) \right) \right\vert \\ \leq \frac{\sqrt{2\pi }\left( \Delta \left\Vert F\right\Vert _{Lip}+2\left\Vert F\right\Vert _{\infty }\right) ~\mathbb{E}\left[ G\left( \mathcal{H}\left( \mathbf{X}^{\prime }\right) \right) \right] }{n}+\Delta \left\Vert F\right\Vert _{\infty }\sqrt{\frac{\ln \left( 2/\delta \right) }{ }}. \end{multline*} Lipschitz L-statistics generalize the arithmetic mean, which is obtained by choosing $F$ identically $1$. Other choices of $F$ lead to smoothely trimmed means or smoothened sample-quantiles. A potential use is in robust learning. It often happens that an objective can be minimized very well only if a small proportion of outliers is trimmed away previously. The problem is that minimization must already be performed to identify the outliers, which suggests a procedure to re-sort the sample according to current losses previous to each optimization step which then disregards an upper percentile of losses. Since this generally results in non-convex algorithms, it seems natural to consider problems which are already non-convex to begin with. We illustrate this idea in the case of $K$-means clustering (see \cit {Garcia 2007}). Here we seek a collection $\mathbf{c}=\left( c_{1},...,c_{K}\right) $ of vectors in some ball $\mathbb{B\subseteq }$ \mathbb{R}^{m}$ such that for a given random vector $X$ distributed in \mathbb{B}$ the quantity $\mathbb{E}\left[ \ell \left( \mathbf{c ,X_{i}\right) \right] $ is small, where $\ell \left( \mathbf{c},X\right) =\min_{k\in \left\{ 1,...,K\right\} }\left\Vert X-c_{k}\right\Vert ^{2}$. For a sample $\mathbf{X}=\left( X_{1},...,X_{n}\right) $ the standard strategy tries to find $\mathbf{c}\in \mathbb{B}^{K}$ so as to minimize the arithmetic mean of the vector $\left( \ell \left( \mathbf{c},X_{1}\right) ,...,\ell \left( \mathbf{c},X_{n}\right) \right) $. Uniform bounds on the estimation error have been given in \cite{Biau Lugosi}. Now we assume that a significant portion of the data (say 25\%) consists of noise, which is likely to affect the positions of the centers, but we are happy to cluster only the remaining 75\%, which we expect to cluster well. For $\zeta \in \left[ 0,1/4\right] $ let $F_{\zeta }:\left[ 0,1\right] \rightarrow \mathbb{R}$ be the functio \begin{equation*} F_{\zeta }\left( t\right) =\left\{ \begin{array}{ccc} 4/3 & \text{if} & t\in \left[ 0,3/4-\zeta \right] \\ -\frac{2}{3\zeta }\left( t-3/4-\zeta \right) & \text{if} & t\in (3/4-\zeta ,3/4+\zeta ] \\ 0 & \text{if} & t\in (3/4+\zeta ,0 \end{array \right. . \end{equation* Then $F_{0}$ is the step function which drops from $4/3$ to zero at $t=3/4$ and $\mathcal{L}_{F_{0}}$ is a sample quantile, averaging the lower 75\%. If $\zeta \in (0,1/4]$ then $F_{\zeta }$ is an approximation to $F_{0}$ with Lipschitz constant $2/\left( 3\zeta \right) $ and $\mathcal{L}_{F_{\zeta }}$ is an approximation to the sample quantile. Consider the algorith \begin{equation*} \min_{\mathbf{c\in }\mathbb{B}^{K}}\mathcal{L}_{F_{\zeta }}\left( \ell \left( \mathbf{c},X_{1}\right) ,...,\ell \left( \mathbf{c},X_{n}\right) \right) \text{.} \end{equation* The uniform bound above then provides a statistical performance guarantee for this algorithm with respect to the transductive objective $\mathbb{E \left[ \mathcal{L}_{F_{\zeta }}\left( \ell \left( \mathbf{c},X_{1}\right) ,...,\ell \left( \mathbf{c},X_{n}\right) \right) \right] $ (for a bound on the Gaussian average of $\left\{ \left( \ell \left( \mathbf{c},X_{1}\right) ,...,\ell \left( \mathbf{c},X_{n}\right) \right) :\mathbf{c\in }\mathbb{B ^{K}\right\} $ see \cite{Biau Lugosi}). This method is a smoothened version of the trimmed-$K$-means algorithms as described in \cite{Cuesta 1997} . The idea of replacing the arithmetic mean of the objective function by a smoothened sample-quantile can be applied to other methods of supervised or unsupervised learning. For example the uniform bound would apply to support vector machines, but replacing a convex problem by a non-convex one seems less attractive. \subsection{Differentiation, $\ell _{2}$-regularization and representation learning\label{Subsection L_2 regularization}} For smooth statistics the seminorms $M$, $M_{Lip}$ and $J_{Lip}$ can often be bounded by differentiation. If $\mathcal{U}\subseteq \mathbb{R}^{d}$ is open and $f:\mathcal{U}^{n}\rightarrow \mathbb{R}$ is $C^{2}$ then for k,l\in \left\{ 1,...,n\right\} $ and $i,j\in \left\{ 1,...,d\right\} $ the function $\left( \partial f/\partial x_{ki}\right) \left( \mathbf{x}\right) $ is simply the partial derivative of $f$ in the $\left( k,i\right) -coordinate. Likewise $\left( \partial ^{2}f/\partial x_{ki}\partial x_{lj}\right) \left( \mathbf{x}\right) $ is the partial derivative corresponding to the coordinate pair $\left( \left( k,i\right) ,\left( l,j\right) \right) $. We now introduce the notation $\partial _{k}f$ for the vector valued function $\partial _{k}f:\mathcal{U}^{n}\rightarrow \mathbb{R ^{d}$ \begin{equation*} \partial _{k}f\left( \mathbf{x}\right) =\left( \frac{\partial f}{\partial x_{k1}}\left( \mathbf{x}\right) ,...,\frac{\partial f}{\partial x_{kd} \left( \mathbf{x}\right) \right) \end{equation* and $\partial _{kl}f$ for the matrix valued function $\partial _{kl}f \mathcal{U}^{n}\rightarrow \mathbb{R}^{d\times d} \begin{equation*} \partial _{kl}f=\left( \begin{array}{ccc} \frac{\partial ^{2}f}{\partial x_{k1}\partial x_{l1}}\left( \mathbf{x}\right) & ... & \frac{\partial ^{2}f}{\partial x_{kd}\partial x_{l1}}\left( \mathbf{ }\right) \\ ... & ... & ... \\ \frac{\partial ^{2}f}{\partial x_{k1}\partial x_{ld}}\left( \mathbf{x}\right) & ... & \frac{\partial ^{2}f}{\partial x_{kd}\partial x_{ld}}\left( \mathbf{ }\right \end{array \right) . \end{equation* With $\left\Vert \partial _{k}f\right\Vert =\sup_{\mathbf{x}\in \mathcal{U ^{n}}\left\Vert \partial _{k}f\left( \mathbf{x}\right) \right\Vert $ we denote the supremum of the euclidean norm $\left\Vert \partial _{k}f\left( \mathbf{x}\right) \right\Vert $ of the vector $\partial _{k}f\left( \mathbf{ }\right) $ in $\mathcal{U}^{n}$, and with $\left\Vert \partial _{kl}f\right\Vert =\sup_{\mathbf{x}\in \mathcal{U}^{n}}\left\Vert \partial _{kl}f\left( \mathbf{x}\right) \right\Vert $ the supremum of the operator norm $\left\Vert \partial _{kl}f\left( \mathbf{x}\right) \right\Vert _{op}$ of the matrix $\partial _{k}f\left( \mathbf{x}\right) $ in $\mathcal{U}^{n} .\bigskip \begin{theorem} \label{Theorem Differentiation Seminorm bound}If $\mathcal{U}\subseteq \mathbb{R}^{d}$ is convex and bounded with diameter $\Delta $ and $f \mathcal{U}^{n}\rightarrow \mathbb{R}$ extends to a $C^{2}$-function on an open set $\mathcal{V}$ containing $\mathcal{U}^{n}$ then $M_{Lip}\left( f\right) \leq \max_{k}\left\Vert \partial _{k}f\right\Vert $ and J_{Lip}\left( f\right) \leq n\Delta \max_{k\neq l}\left\Vert \partial _{kl}f\right\Vert $.\bigskip \end{theorem} This is proved in Appendix \ref{Appendix proof differentiation}. The uniform estimation properties of a smooth statistic can therefore be described in terms of bounds on the partial derivatives. Good results are obtained if first order partial derivatives are of order $O\left( 1/n\right) $ and second order derivatives are of order $O\left( 1/n^{2}\right) $. We sketch an application to representation learning. Let $\mathbb{B}$ be the unit ball $\mathbb{R}^{d}$ and let $\mathcal{U}=\mathbb{B\times }\left[ -1, \right] $. Fix $\lambda \in \left( 0,1\right) $. For $\mathbf{x=}\left( \left( z_{1},y_{1}\right) ,...,\left( z_{n},y_{n}\right) \right) \in \mathcal{U}^{n}$ regularized least squares returns the vecto \begin{equation*} w\left( \mathbf{x}\right) =\arg \min_{w\in \mathbb{R}^{d}}\frac{1}{n \sum_{i=1}^{n}\left( \left\langle w,z_{i}\right\rangle -y_{i}\right) ^{2}+\lambda \left\Vert w\right\Vert ^{2}\text{.} \end{equation* The "empirical error" $f$ on $\mathcal{U}^{n}$ is the \begin{equation*} f\left( \mathbf{x}\right) =\frac{1}{n}\sum_{i=1}^{n}\left( \left\langle w\left( \mathbf{x}\right) ,z_{i}\right\rangle -y_{i}\right) ^{2}. \end{equation* Using the well known explicit formula for $w\left( \mathbf{x}\right) $ and f\left( \mathbf{x}\right) $ one can show (see \cite{Maurer 2017}) by differentiation that there are absolute constants $c_{1}$ and $c_{2}$, such that for any $k,l\in \left\{ 1,...,n\right\} $, $k\neq l$ \begin{equation} \left\Vert \partial _{k}f\right\Vert \leq \frac{c_{1}\lambda ^{-2}}{n}\text{ and }\left\Vert \partial _{kl}f\right\Vert \leq \frac{c_{2}\lambda ^{-3}} n^{2}}\text{.} \label{Derivativebound least squares} \end{equation so, taking the diameter of $\mathcal{U}$ into account, we have $M\left( f\right) \leq c_{3}n^{-1}\lambda ^{-2}$, $M_{Lip}\left( f\right) \leq c_{4}n^{-1}\lambda ^{-2}$ and $J_{Lip}\left( f\right) \leq c_{4}n^{-1}\lambda ^{-3}$. Now let $\mathcal{H}$ be a class of representations of some underlying space $\mathcal{X}$ of labeled data, that is functions $h:\mathcal{X\rightarrow U} , which leave the labels invariant, and we wish to find an optimal representation. If we plan to use ridge regression in the top layer, the obvious criterion for the quality of the representation on a sample $\mathbf X}\in \mathcal{X}^{n}$\textbf{\ }is \begin{equation*} \mathbb{E}\left[ f\left( h\left( \mathbf{X}\right) \right) \right] =\mathbb{ }\left[ \left( \left\langle w\left( h\left( \mathbf{X}\right) \right) ,Z\right\rangle -Y\right) ^{2}\right] . \end{equation* Then Corollary \ref{Corollary uniform concentration} combined with Theorem \ref{Theorem Differentiation Seminorm bound} and (\ref{Derivativebound least squares}) gives a high probability bound on \begin{equation*} \sup_{h\in \mathcal{H}}\mathbb{E}\left[ f\left( h\left( \mathbf{X}^{\prime }\right) \right) \right] -f\left( h\left( \mathbf{X}\right) \right) , \end{equation* so as to justify the minimization of $f\left( h\left( \mathbf{X}\right) \right) $ in $h$ if the Gaussian average $\mathbb{E}\left[ G\left( \mathcal{ }\left( \mathbf{X}\right) \right) \right] $ can be bounded.\bigskip \section{Proof of Theorem \protect\ref{Theorem Main}} We prove the theorem for $\mathcal{U}\subseteq \mathbb{R}$, the proof for \mathcal{U}\subseteq \mathbb{R}^{d}$ being the same but with additional notation. We take $f:\mathcal{U}^{n}\rightarrow \mathbb{R}$ as fixed for this section and abbreviate $M=M_{Lip}\left( f\right) $ and $J=J_{Lip}\left( f\right) $, when there is no ambiguity. We also use the following notation. For any $i,j\in \mathbb{N} $ we use $\left[ i,j\right] $ to denote the set of integers $\left[ i, \right] =\left\{ i,...,j\right\} $ if $i\leq j$, or $\left[ i,j\right] =\emptyset $ if $i>j$. Whenever two vectors in $\mathcal{X}^{n}$ or \mathcal{U}^{n}$ are denoted $\mathbf{x}$ and $\mathbf{x}^{\prime }$, and A\subseteq \left[ 1,n\right] $, then we use $\mathbf{x}^{A}$ to denote the vector in $\mathcal{X}^{n}$ defined b \begin{equation} x_{i}^{A}=\left\{ \begin{array}{ccc} x_{i}^{\prime } & \text{if} & i\in A \\ x_{i} & \text{if} & i\notin \end{array \right. , \label{Define XhochA} \end{equation and we use $A^{c}$ to denote the complement of $A$ in $\left[ 1,n\right] $. Also $\left\Vert .\right\Vert $ denotes the euclidean norm, either on \mathbb{R}^{n}$ or $\mathbb{R}^{2n}$, depending on context, and \left\langle .,.\right\rangle $ denotes the corresponding inner product. We will use the following result about Gaussian processes, known as Slepian's lemma (\cite{Boucheron13}, Theorem 13.3). \begin{theorem} \label{Slepian Lemma}Let $\Omega $ and $\Xi $ be mean zero Gaussian processes indexed by a common finite set $\mathcal{H}$, such tha \begin{equation*} \mathbb{E}\left( \Omega _{h}-\Omega _{g}\right) ^{2}\leq \mathbb{E}\left( \Xi _{h}-\Xi _{g}\right) ^{2}\text{ for all }h,g\in \mathcal{H}\text{.} \end{equation* The \begin{equation*} \mathbb{E}\sup_{h\in \mathcal{H}}\Omega _{h}\leq \mathbb{E}\sup_{h\in \mathcal{H}}\Xi _{h}. \end{equation*} \end{theorem} The next lemma is the key to the way in which the interaction-seminorm J=J_{Lip}\left( f\right) $ enters the proof. \begin{lemma} \label{Lemma JLipBound}For any $k\in \left[ 1,n\right] $ and $\mathbf{x} \mathbf{x}^{\prime }\in \mathcal{U}^{n}$ and $a,b\in \mathcal{U} \begin{equation*} D_{a,b}^{k}f\left( \mathbf{x}\right) -D_{a,b}^{k}f\left( \mathbf{x}^{\prime }\right) \leq \frac{J}{n}\sum_{j:j\neq k}\left\vert x_{j}-x_{j}^{\prime }\right\vert . \end{equation*} \end{lemma} \begin{proof} First assume $k=1$. The \begin{eqnarray*} D_{a,b}^{1}f\left( \mathbf{x}\right) -D_{a,b}^{1}f\left( \mathbf{x}^{\prime }\right) &=&\sum_{j=2}^{n}D_{a,b}^{1}f\left( \mathbf{x}^{\left[ 1,j-1\right] }\right) -D_{a,b}^{1}f\left( \mathbf{x}^{\left[ 1,j\right] }\right) \\ &=&\sum_{j=2}^{n}D_{a,b}^{1}D_{x_{j}x_{j}^{\prime }}^{j}f\left( \mathbf{x}^ \left[ 1,j\right] }\right) \leq \frac{J}{n}\sum_{j=2}^{n}\left\vert x_{j}-x_{j}^{\prime }\right\vert . \end{eqnarray* If $k\neq 1$ let $f_{\pi }$ be the function $f_{\pi }\left( x\right) =f\left( \pi x\right) $, where $\pi $ is the permutation exchanging the first and the $k$-th argument, observe that $J_{Lip}\left( f_{\pi }\right) =J_{Lip}\left( f\right) =J$, and apply the above to $f_{\pi }$. \bigskip \bigskip \end{proof} For $k\in \left\{ 1,...,n\right\} $ define a function $F_{k}:\mathcal{U ^{2n}\rightarrow \mathbb{R}$ b \begin{equation*} F_{k}\left( \mathbf{x,x}^{\prime }\right) =\frac{1}{2^{k}}\sum_{A\subseteq \left[ 1,k-1\right] }\left( D_{x_{k},x_{k}^{\prime }}^{k}f\left( \mathbf{x ^{A}\right) +D_{x_{k},x_{k}^{\prime }}^{k}f\left( \mathbf{x}^{A^{c}}\right) \right) . \end{equation* $F_{k}\left( \mathbf{x},\mathbf{x}^{\prime }\right) $ changes sign if we exchange $x_{k}$ and $x_{k}^{\prime }$, but if $i<k$, then $i\in \left[ 1,k- \right] $, so the exchange of $x_{i}$ and $x_{i}^{\prime }$ exchanges just terms in the above sum (see (\ref{Elementary fact}) in Appendix \re {Appendix Proof of Lemma}) and therefore leaves $F_{k}\left( \mathbf{x} \mathbf{x}^{\prime }\right) $ invariant. This is the reason why we use the somewhat complicated representation of $f\left( \mathbf{x}\right) -f\left( \mathbf{x}^{\prime }\right) $, as given by the next lemma.\bigskip \begin{lemma} \label{Lemma F_K Representation}For $\mathbf{x},\mathbf{x}^{\prime }\in \mathcal{U}^{n}$ we hav \begin{equation*} f\left( \mathbf{x}\right) -f\left( \mathbf{x}^{\prime }\right) =\sum_{k=1}^{n}F_{k}\left( \mathbf{x},\mathbf{x}^{\prime }\right) . \end{equation*} \end{lemma} The proof is given in Appendix \ref{Appendix Proof of Lemma}.\bigskip For $\left( \mathbf{x,x}^{\prime }\right) \in \mathcal{U}^{2n}$ and $k\in \left[ 1,n\right] $ we define a vector $v^{k}\left( \mathbf{x,x}^{\prime }\right) \in \mathbb{R}^{2n}$ b \begin{equation*} v_{i}^{k}\left( \mathbf{x,x}^{\prime }\right) =\left\{ \begin{array}{lcl} 2Mx_{k} & \text{if} & i=k \\ Jn^{-1/2}x_{i} & \text{if} & i\neq k,i\leq n \\ 2Mx_{k}^{\prime } & \text{if} & i=n+k \\ Jn^{-1/2}x_{i-n}^{\prime } & \text{if} & i\neq n+k,i> \end{array \right. . \end{equation* \bigskip \begin{lemma} \label{Lemma F_K Difference}For $\left( \mathbf{x,x}^{\prime }\right) ,\left( \mathbf{y,y}^{\prime }\right) \in \mathcal{U}^{2n}$ and $k\in \left[ 1,n\right] $ we hav \begin{equation*} F_{k}\left( \mathbf{x},\mathbf{x}^{\prime }\right) -F_{k}\left( \mathbf{y} \mathbf{y}^{\prime }\right) \leq \sqrt{\pi /2}~\mathbb{E}\left\vert \left\langle \mathbf{\gamma },v^{k}\left( \mathbf{x,x}^{\prime }\right) -v^{k}\left( \mathbf{y,y}^{\prime }\right) \right\rangle \right\vert , \end{equation* where $\mathbf{\gamma }=\left( \gamma _{1},...,\gamma _{n},\gamma _{1}^{\prime },...,\gamma _{n}^{\prime }\right) $ is a vector of $2n$ independent standard normal variables. \end{lemma} \begin{proof} Using the definition of $M=M_{Lip}\left( f\right) $ and Lemma \ref{Lemma JLipBound} we have for any $A\subseteq \left\{ 1,...,n\right\} $ \begin{align*} D_{x_{k},x_{k}^{\prime }}^{k}f\left( \mathbf{x}^{A}\right) -D_{y_{k},y_{k}^{\prime }}^{k}f\left( \mathbf{y}^{A}\right) & =D_{x_{k},y_{k}}^{k}f\left( \mathbf{x}^{A}\right) +D_{y_{k}^{\prime },x_{k}^{\prime }}^{k}f\left( \mathbf{x}^{A}\right) +D_{y_{k},y_{k}^{\prime }}^{k}\left( f\left( \mathbf{x}^{A}\right) -f\left( \mathbf{y}^{A}\right) \right) \\ & \leq M\left( \left\vert x_{k}-y_{k}\right\vert +\left\vert x_{k}^{\prime }-y_{k}^{\prime }\right\vert \right) +\frac{J}{n}\sum_{i:i\neq k}\left\vert x_{i}^{A}-y_{i}^{A}\right\vert \end{align* Define vectors $u$, $w\in \mathbb{R}^{2n}$ by $u_{i}=\left\vert v_{i}^{k}\left( \mathbf{x,x}^{\prime }\right) -v_{i}^{k}\left( \mathbf{y,y ^{\prime }\right) \right\vert $ and $w_{i}=1/2$ if $i=k$ or $i=n+k$ and w_{i}=1/\left( 2\sqrt{n}\right) $ otherwise. Then $\left\Vert w\right\Vert \leq 1$ an \begin{align*} & F_{k}\left( \mathbf{x},\mathbf{x}^{\prime }\right) -F_{k}\left( \mathbf{y} \mathbf{y}^{\prime }\right) \\ & =\frac{1}{2^{k}}\sum_{A\subseteq \left[ 1,k-1\right] }\left( D_{x_{k},x_{k}^{\prime }}^{k}f\left( \mathbf{x}^{A}\right) -D_{y_{k},y_{k}^{\prime }}^{k}f\left( \mathbf{y}^{A}\right) +D_{x_{k},x_{k}^{\prime }}^{k}f\left( \mathbf{x}^{A^{c}}\right) -D_{y_{k},y_{k}^{\prime }}^{k}f\left( \mathbf{y}^{A^{c}}\right) \right) \\ & \leq \frac{1}{2^{k}}\sum_{A\subseteq \left[ 1,k-1\right] }\left( 2M\left( \left\vert x_{k}-y_{k}\right\vert +\left\vert x_{k}^{\prime }-y_{k}^{\prime }\right\vert \right) +\frac{J}{n}\sum_{i:i\neq k}\left\vert x_{i}^{A}-y_{i}^{A}\right\vert +\frac{J}{n}\sum_{i:i\neq k}\left\vert x_{i}^{A^{c}}-y_{i}^{A^{c}}\right\vert \right) \\ & =M\left( \left\vert x_{k}-y_{k}\right\vert +\left\vert x_{k}^{\prime }-y_{k}^{\prime }\right\vert \right) +\frac{J}{2n}\sum_{i\neq k}\left( \left\vert x_{i}-y_{i}\right\vert +\left\vert x_{i}^{\prime }-y_{i}^{\prime }\right\vert \right) =\left\langle w,u\right\rangle \\ & \leq \left\Vert u\right\Vert =\left\Vert v^{k}\left( \mathbf{x,x}^{\prime }\right) -v^{k}\left( \mathbf{y,y}^{\prime }\right) \right\Vert =\sqrt{\pi / }~\mathbb{E}\left\vert \left\langle \mathbf{\gamma },v^{k}\left( \mathbf{x,x ^{\prime }\right) -v^{k}\left( \mathbf{y,y}^{\prime }\right) \right\rangle \right\vert , \end{align* where we used Cauchy-Schwarz and a standard formula following from rotation invariance of the isotropic normal distribution. \bigskip \end{proof} \begin{proof} (Proof of Theorem \ref{Theorem Main}) With $\mathbf{X}^{\prime }$ identically distributed to $\mathbf{X}$ we have \begin{equation*} \mathbb{E}\sup_{h}\mathbb{E}_{\mathbf{X}}\left[ f\left( h\left( \mathbf{X \right) \right) \right] -f\left( h\left( \mathbf{X}^{\prime }\right) \right) \leq \mathbb{E}\sup_{h}f\left( h\left( \mathbf{X}\right) \right) -f\left( h\left( \mathbf{X}^{\prime }\right) \right) , \end{equation* so it suffices to bound the right hand side above. We first prove tha \begin{equation} \mathbb{E}\sup_{h}f\left( h\left( \mathbf{X}\right) \right) -f\left( h\left( \mathbf{X}^{\prime }\right) \right) \leq \sqrt{\pi /2}~\mathbb{E}_{\mathbf{X }^{\prime }}\mathbb{E}_{\mathbf{\gamma }}\sup_{h}\sum_{k=1}^{n}\left\langle \mathbf{\gamma }_{k},v^{k}\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{ }^{\prime }\right) \right) \right\rangle , \label{Claim} \end{equation where the $\mathbf{\gamma }_{k}$ are independent copies of the vector \mathbf{\gamma }$ in Lemma \ref{Lemma F_K Difference}. Then we use Slepian's inequality to bound the right hand side above. To prove (\ref{Claim}) we show by induction on $m\in \left\{ 0,...,n\right\} $ tha \begin{multline*} \mathbb{E}\sup_{h}f\left( h\left( \mathbf{X}\right) \right) -f\left( h\left( \mathbf{X}^{\prime }\right) \right) \\ \leq \mathbb{E}_{\mathbf{XX}^{\prime }}\mathbb{E}_{\mathbf{\gamma }}\left[ \sup_{h}\sqrt{\pi /2}\sum_{k=1}^{m}\left\langle \mathbf{\gamma _{k},v^{k}\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{X}^{\prime }\right) \right) \right\rangle +\sum_{k=m+1}^{n}F_{k}\left( h\left( \mathbf{ }\right) ,h\left( \mathbf{X}^{\prime }\right) \right) \right] . \end{multline* For $m=n$ this is (\ref{Claim}), and for $m=0$ it is just Lemma \ref{Lemma F_K Representation}. Suppose it holds for $m-1$, with some $m\leq n$, and define for each $h\in \mathcal{H}$ a real valued random variable $R_{h}$ by \begin{equation*} R_{h}=\sqrt{\pi /2}\sum_{k=1}^{m-1}\left\langle \mathbf{\gamma _{k},v^{k}\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{X}^{\prime }\right) \right) \right\rangle +\sum_{k=m+1}^{n}F_{k}\left( h\left( \mathbf{ }\right) ,h\left( \mathbf{X}^{\prime }\right) \right) . \end{equation* The expectation $\mathbb{E=E}_{\mathbf{XX}^{\prime }}\mathbb{E}_{\mathbf \gamma }}\left[ .\right] $ is invariant under the simultaneous exchange of X_{m}$ and $X_{m}^{\prime }$ and, for all $k<m$, of $\gamma _{km}$ and \gamma _{km}^{\prime }$, which leaves $R_{h}$ invariant but changes the sign of $F_{m}$. Using this fact and the induction assumptio \begin{align*} & \mathbb{E}\sup_{h}f\left( h\left( \mathbf{X}\right) \right) -f\left( h\left( \mathbf{X}^{\prime }\right) \right) \\ & \leq \mathbb{E}\sup_{h}F_{m}\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{X}^{\prime }\right) \right) +R_{h} \\ & =\frac{1}{2}\mathbb{E}\sup_{h,g}F_{m}\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{X}^{\prime }\right) \right) -F_{m}\left( g\left( \mathbf{X \right) ,g\left( \mathbf{X}^{\prime }\right) \right) +R_{h}+R_{g} \end{align* Using Lemma \ref{Lemma F_K Difference}, with $\left( \mathbf{x,x}^{\prime }\right) $ replaced by $\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{X ^{\prime }\right) \right) $ and $\left( \mathbf{y,y}^{\prime }\right) $ replaced by $\left( g\left( \mathbf{X}\right) ,g\left( \mathbf{X}^{\prime }\right) \right) $, we ge \begin{align*} & \mathbb{E}\sup_{h}f\left( h\left( \mathbf{X}\right) \right) -f\left( h\left( \mathbf{X}^{\prime }\right) \right) \\ & \leq \frac{1}{2}\mathbb{E}\sup_{h,g}\sqrt{\pi /2}~\mathbb{E}_{\gamma _{m}}\left\vert \left\langle \mathbf{\gamma }_{m},v^{m}\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{X}^{\prime }\right) \right) -v^{m}\left( g\left( \mathbf{X}\right) ,g\left( \mathbf{X}^{\prime }\right) \right) \right\rangle \right\vert +R_{h}+R_{g} \\ & \leq \frac{1}{2}\mathbb{E}\sup_{h,g}\sqrt{\pi /2}\left\vert \left\langle \mathbf{\gamma }_{m},v^{m}\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{ }^{\prime }\right) \right) \right\rangle -\left\langle \mathbf{\gamma _{m},v^{m}\left( g\left( \mathbf{X}\right) ,g\left( \mathbf{X}^{\prime }\right) \right) \right\rangle \right\vert +R_{h}+R_{g} \\ & =\frac{1}{2}\mathbb{E}\sup_{h,g}\sqrt{\pi /2}\left\langle \mathbf{\gamma _{m},v^{m}\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{X}^{\prime }\right) \right) \right\rangle -\sqrt{\pi /2}\left\langle \mathbf{\gamma _{m},v^{m}\left( g\left( \mathbf{X}\right) ,g\left( \mathbf{X}^{\prime }\right) \right) \right\rangle +R_{h}+R_{g}. \end{align* Here we could drop the absolute value because the supremum is in both $h$ and $g$, and the remaining sum is invariant under the exchange of $h$ and $g . The symmetry of the standard normal distribution then give \begin{eqnarray*} \mathbb{E}\sup_{h}f\left( h\left( \mathbf{X}\right) \right) -f\left( h\left( \mathbf{X}^{\prime }\right) \right) &\leq &\frac{1}{2}\mathbb{E}\sup_{h \sqrt{\pi /2}\left\langle \mathbf{\gamma }_{m},v^{m}\left( h\left( \mathbf{X \right) ,h\left( \mathbf{X}^{\prime }\right) \right) \right\rangle +R_{h} \\ &&+\frac{1}{2}\mathbb{E}\sup_{g}\sqrt{\pi /2}\left\langle -\mathbf{\gamma _{m},v^{m}\left( g\left( \mathbf{X}\right) ,g\left( \mathbf{X}^{\prime }\right) \right) \right\rangle +R_{g} \\ &=&\mathbb{E}\sup_{h}\sqrt{\pi /2}\left\langle \mathbf{\gamma _{m},v^{m}\left( h\left( \mathbf{X}\right) ,h\left( \mathbf{X}^{\prime }\right) \right) \right\rangle +R_{h}. \end{eqnarray* By definition of $R_{h}$ this completes the induction and proves the claim \ref{Claim}). We now condition on $\mathbf{X}$ and $\mathbf{X}^{\prime }$ and seek to bound \begin{equation*} \mathbb{E}_{\gamma }\sup_{h}\sum_{k=1}^{n}\left\langle \mathbf{\gamma _{k},v^{k}\left( h\left( \mathbf{x}\right) ,h\left( \mathbf{x}^{\prime }\right) \right) \right\rangle =\mathbb{E}_{\gamma }\sup_{h}\Omega _{h}, \end{equation* where $\Omega $ is the Gaussian process indexed by $\mathcal{H}$ \begin{equation*} \Omega _{h}=\sum_{k=1}^{n}\left\langle \mathbf{\gamma }_{k},v^{k}\left( h\left( \mathbf{x}\right) ,h\left( \mathbf{x}^{\prime }\right) \right) \right\rangle \end{equation* Now we hav \begin{eqnarray*} \mathbb{E}\left[ \left( \Omega _{h}-\Omega _{g}\right) ^{2}\right] &=&\sum_{k=1}^{n}\left\Vert v^{k}\left( h\left( \mathbf{x}\right) ,h\left( \mathbf{x}^{\prime }\right) \right) -v^{k}\left( g\left( \mathbf{x}\right) ,g\left( \mathbf{x}^{\prime }\right) \right) \right\Vert ^{2} \\ &=&\sum_{k=1}^{n}\left( 4M^{2}\left( \left\vert h\left( x_{k}\right) -g\left( x_{k}\right) \right\vert ^{2}+\left\vert h\left( x_{k}^{\prime }\right) -g\left( x_{k}^{\prime }\right) \right\vert ^{2}\right) \right. + \\ &&\text{ \ \ \ \ \ \ \ \ \ }\left. +\frac{J^{2}}{n}\sum_{i:i\neq k}\left( \left\vert h\left( x_{i}\right) -g\left( x_{i}\right) \right\vert ^{2}+\left\vert h\left( x_{i}^{\prime }\right) -g\left( x_{i}^{\prime }\right) \right\vert ^{2}\right) \right) \\ &\leq &\left( 4M^{2}+J^{2}\right) \sum_{k=1}^{n}\left( \left\vert h\left( x_{k}\right) -g\left( x_{k}\right) \right\vert ^{2}+\left\vert h\left( x_{k}^{\prime }\right) -g\left( x_{k}^{\prime }\right) \right\vert ^{2}\right) \\ &=&\mathbb{E}\left[ \left( \Xi _{h}-\Xi _{g}\right) ^{2}\right] \end{eqnarray* where $\Xi $ is the Gaussian process \begin{equation*} \Xi _{h}=\sqrt{4M^{2}+J^{2}}\sum_{k=1}^{n}\left( \gamma _{k}h\left( x_{k}\right) +\gamma _{k}^{\prime }h\left( x_{k}^{\prime }\right) \right) \end{equation* It follows from Slepian's inequality (Theorem \ref{Slepian Lemma}) that \mathbb{E}\sup_{h}\Omega _{h}\leq \mathbb{E}\sup_{h}\Xi _{h}.$ Combined with (\ref{Claim}) this give \begin{eqnarray*} \mathbb{E}\sup_{h}f\left( h\left( \mathbf{X}\right) \right) -f\left( h\left( \mathbf{X}^{\prime }\right) \right) &\leq &\sqrt{\pi /2}\mathbb{E}_{\mathbf XX}^{\prime }}\mathbb{E}_{\mathbf{\gamma }}\sup_{h}\Omega _{h}\leq \sqrt{\pi /2}\mathbb{E}_{\mathbf{XX}^{\prime }}\mathbb{E}_{\mathbf{\gamma }\sup_{h}\Xi _{h} \\ &=&\sqrt{\pi /2}\sqrt{4M^{2}+J^{2}}\mathbb{E}_{\mathbf{XX}^{\prime }}\mathbb E}_{\mathbf{\gamma }}\sup_{h}\sum_{k=1}^{n}\gamma _{k}h\left( X_{k}\right) +\gamma _{k}^{\prime }h\left( X_{k}^{\prime }\right) \\ &\leq &\sqrt{2\pi }\left( 2M+J\right) ~\mathbb{E}G\left( \mathcal{H}\left( \mathbf{X}\right) \right) . \end{eqnarray*} \end{proof}
\section{Algorithmic Details} \label{algorithm} We will now represent the input--output relationship in terms of the Hankel and Toeplitz matrices defined before. Fix a $d$, then for any $l$ we have \begin{align} \begin{bmatrix} Y_{l} \\ Y_{l+1} \\ \vdots \\ Y_{l+d-1} \end{bmatrix} &= \mathcal{H}_{0, d, d} \begin{bmatrix} U_{l-1} \\ U_{l-2} \\ \vdots \\ U_{l-d} \end{bmatrix} + \mathcal{T}_{0, d}\begin{bmatrix} U_{l} \\ U_{l+1} \\ \vdots \\ U_{l+d-1} \end{bmatrix} + \mathcal{O}_{0, d, d} \begin{bmatrix} \eta_{l-1} \\ \eta_{l-2} \\ \vdots \\ \eta_{l-d+1} \end{bmatrix} + \mathcal{T}\mathcal{O}_{0, d}\begin{bmatrix} \eta_{l} \\ \eta_{l+1} \\ \vdots \\ \eta_{l+d-1} \end{bmatrix} \nonumber \\ &+ \mathcal{H}_{d, d, l-d-1} \begin{bmatrix} U_{l-d-1} \\ U_{l-d-1} \\ \vdots \\ U_{1} \end{bmatrix} + \mathcal{O}_{d, d, l-d-1} \begin{bmatrix} \eta_{l-d-1} \\ \eta_{l-d-1} \\ \vdots \\ \eta_{1} \end{bmatrix} + \begin{bmatrix} w_{l} \\ w_{l+1} \\ \vdots \\ w_{l+d-1} \end{bmatrix} \label{input-output-eq} \end{align} or, succinctly, \begin{align} \tilde{Y}^{+}_{l, d} &= \mathcal{H}_{0, d, d}\tilde{U}^{-}_{l-1, d} + \mathcal{T}_{0, d}\tilde{U}^{+}_{l, d} + \mathcal{H}_{d, d, l-d-1}\tilde{U}^{-}_{l-d-1, l-d-1} \nonumber\\ &+ \mathcal{O}_{0, d, d}\tilde{\eta}^{-}_{l-1, d} + \mathcal{T}\mathcal{O}_{0, d}\tilde{\eta}^{+}_{l, d} + \mathcal{O}_{d, d, l-d-1}\tilde{\eta}^{-}_{l-d-1, l-d-1} + \tilde{w}^{+}_{l, d}\label{compact-dynamics} \end{align} Here \begin{align*} \mathcal{O}_{k, p, q} &= \begin{bmatrix} CA^{k} & CA^{k+1} & \hdots & CA^{q+k-1} \\ CA^{k+1} & CA^{k+2} & \hdots & CA^{d+k} \\ \vdots & \vdots & \ddots & \vdots \\ CA^{p+k-1} & \hdots & \hdots & CA^{p+q+k-2} \end{bmatrix}, \tilde{Y}^{-}_{l, d} = \begin{bmatrix} Y_{l} \\ Y_{l-1} \\ \vdots \\ Y_{l-d+1} \end{bmatrix}, \tilde{Y}^{+}_{l, d} = \begin{bmatrix} Y_{l} \\ Y_{l+1} \\ \vdots \\ Y_{l+d-1} \end{bmatrix} \end{align*} Furthermore, $\tilde{U}^{-}_{l, d}, \tilde{\eta}^{-}_{l, d}$ are defined similar to $\tilde{Y}^{-}_{l, d}$ and $\tilde{U}^{+}_{l, d}, \tilde{\eta}^{+}_{l, d},÷ \tilde{w}^{+}_{l, d}$ are similar to $\tilde{Y}^{+}_{l, d}$. The $+$ and $-$ signs indicate moving forward and backward in time respectively. This representation will be at the center of our analysis. \subsection{Hankel Matrix Estimation} \label{hankel_est} From the theory of model reduction (described in detail in appendix as Section~\ref{model_reduction}) we know that the system parameters $(C, A, B)$ can be obtained by a singular value decomposition of $\mathcal{H}_{0, \infty, \infty}$. More specifically, the system parameters are equivalent (up to a similarity transformation) to scaled versions of the singular vectors of the doubly infinite Hankel matrix. However, due to the fact that we have access to only finite noisy data we can not estimate the doubly infinite matrix. We argue that we can only learn a lower order approximation of the true model $M$, \textit{i.e.}, only a few singular vectors (and corresponding singular values) of $\mathcal{H}_{0, \infty, \infty}$ can be reliably learned. Instead of estimating the true model parameters, we use the learned singular vectors to estimate approximations of the true model via balanced truncation. The first step is to approximate $\mathcal{H}_{0, \infty, \infty}$ with a finite data version. To this end Algorithm~\ref{alg:learn_ls} estimates the $d \times d$ principal submatrix $\mathcal{H}_{0, d, d}$. \begin{algorithm}[h] \caption{LearnSystem($T, d, m , p$)} \label{alg:learn_ls} \textbf{Input} $T=\text{Horizon for learning}$ \\ $d= \text{Hankel Size}$ \\ $m = \text{Input dimension}$\\ $p=\text{Output dimension}$ \\ \textbf{Output} System Parameters: $\hat{\Hc}_{0, d, d}$ \begin{algorithmic}[1] \STATE Generate $T+d$ i.i.d. inputs $\{U_j \sim {\mathcal{N}}(0, I_{m \times m}) \}_{j=1}^{T+d}$. \STATE Collect $T+d$ input--output pairs $\{U_j, Y_j\}_{j=1}^{T+d}$. \STATE $\hat{\mathcal{H}}_{0, d, d} = \arg \min_{\mathcal{H}} \sum_{l=1}^T ||\tilde{Y}^{+}_{l+d+1, d} - \mathcal{H} \tilde{U}^{-}_{l+d, d}||_2^2$ \\ \RETURN $\hat{\Hc}_{0, d, d}$ \end{algorithmic} \end{algorithm} \begin{lem} \label{energy_conc_main} Define \begin{align*} T_0(\delta, d) &= \mathcal{C} md (d\log{\frac{2}{\delta}} + 2\log{\frac{8dm}{\delta}}) \end{align*} where $\mathcal{C}$ is some universal constant. Define the sample covariance matrix $V_T = \sum_{l=0}^{T-1}\tilde{U}^{-}_{l+d, d}(\tilde{U}^{-}_{l+d, d})^{\top}$. We have with probability $1 - \delta$ and for $T > T_0(\delta, d)$ \begin{align} \label{yt_bnd} \frac{1}{2} T I \preceq V_T \preceq \frac{3}{2} T I \end{align} \end{lem} Using this lemma (which is proven in the appendix as Proposition~\ref{energy_conc}) we provide an upper bound on the estimation error of the $d \times d$ principal submatrix. \begin{thm} \label{hankel_convergence} Fix $d$ and let $\hat{\mathcal{H}}_{0, d, d}$ be the output of Algorithm~\ref{alg:learn_ls}. Then for any $0 < \delta < 1$ and $T \geq T_0(\delta, d)$, we have with probability at least $1-\delta$ \begin{align*} \Big | \Big | \hat{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, d, d} \Big | \Big |_2 &\leq \mathcal{C} \sigma \sqrt{\frac{1}{T}} \sqrt{pd + \log{\frac{d}{\delta}}}. \end{align*} Here $T_0(\delta, d) = \mathcal{C} md (d\log{\frac{2}{\delta}} + 2\log{\frac{8dm}{\delta}}) $, $\mathcal{C}$ is a universal constant and $\sigma \leq \beta R \sqrt{d}$. \end{thm} \begin{proof} We outline the proof here. Recall Eq.~\eqref{input-output-eq}, \eqref{compact-dynamics}. Then for a fixed $d$ $$\hat{\mathcal{H}}_{0, d, d} = \Big(\sum_{l=0}^{T-1} \tilde{Y}^{+}_{l+d+1, d} (\tilde{U}^{-}_{l+d, d})^{\top}\Big) V_T^{\dagger}$$ Then the identification error is \begin{align} \Big | \Big | \hat{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, d, d} \Big | \Big |_2 &= \Big | \Big | V_T^{\dagger} \Big(\sum_{l=0}^{T-1} \tilde{U}^{-}_{l+d, d} \tilde{U}^{+ \top}_{l+d+1, d} \mathcal{T}_{0, d}^{ \top} + \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l, l}\mathcal{H}_{d, d, l}^{\top} + \tilde{U}^{-}_{l+d, d} \tilde{w}^{+ \top}_{l+d+1, d}\nonumber\\ &+ \tilde{U}^{-}_{l+d, d}\tilde{\eta}^{- \top}_{l+d, d} \mathcal{O}_{0, d, d}^{\top} + \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{+ \top}_{l+d+1, d}\mathcal{T}\mathcal{O}^{\top}_{0, d} + \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{- \top}_{l, l} \mathcal{O}_{d, d, l}^{\top} \Big)\Big | \Big |_2 \nonumber \\ &= ||V_T^{\dagger}E||_2 \label{diff_eq} \end{align} with \begin{align*} E &= \sum_{l=0}^{T-1} \tilde{U}^{-}_{l+d, d} \tilde{U}^{+ \top}_{l+d+1, d} \mathcal{T}_{0, d}^{ \top} + \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l, l}\mathcal{H}_{d, d, l}^{\top} + \tilde{U}^{-}_{l+d, d} \tilde{w}^{+ \top}_{l+d+1, d}\nonumber\\ &+ \tilde{U}^{-}_{l+d, d}\tilde{\eta}^{- \top}_{l+d, d} \mathcal{O}_{0, d, d}^{\top} + \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{+ \top}_{l+d+1, d}\mathcal{T}\mathcal{O}^{\top}_{0, d} + \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{- \top}_{l, l} \mathcal{O}_{d, d, l}^{\top} \end{align*} By Lemma~\ref{energy_conc_main} we have, whenever $T \geq T_0(\delta, d)$, with probability at least $1-\delta$ \begin{equation} \frac{TI}{2} \preceq V_T \preceq \frac{3TI}{2}. \label{sample_cov_bnd} \end{equation} This ensures that, with high probability, that $V_T^{-1}$ exists and decays as $O(T^{-1})$. The next step involves showing that $||E||_2$ grows at most as $\sqrt{T}$ with high probability. This is reminiscent of Theorem~\ref{selfnorm_main} and the theory of self--normalized martingales. However, unlike that cases the conditional sub-Gaussianity requirements do not hold here. For example, let $\bm{\mathcal{F}}_l = \sigma(\eta_1, \ldots, \eta_l)$ then $\mathbb{E}[v^{\top}\tilde{\eta}^{-}_{l+1, l+1} | \bm{\mathcal{F}}_l] \neq 0$ for all $v$ since $\{\tilde{\eta}^{-}_{l+1, l+1}\}_{l=0}^{T-1}$ is not an independent sequence. As a result it is not immediately obvious on how to apply Theorem~\ref{selfnorm_main} to our case. Under the event when Eq.~\eqref{sample_cov_bnd} holds (which happens with high probability), a careful analysis of the normalized cross terms, \textit{i.e.}, $V_T^{-1/2}E$ shows that $||V_T^{-1/2}E||_2 = O(1)$ with high probability. This is summarized in Propositions~\ref{error_prob1}-\ref{error_prob3}. The idea is to decompose $E$ into a linear combination of independent subGaussians and reduce it to a form where we can apply Theorem~\ref{selfnorm_main}. This comes at the cost of additional scaling in the form of system dependent constants -- such as the $\mathcal{H}_{\infty}$--norm. Then we can conclude with high probability that $||\hat{\mathcal{H}} - \mathcal{H}_{0, d, d}||_2 \leq ||V_T^{-1/2}||_2 ||V_T^{-1/2}E||_2 \leq T^{-1/2} O(1)$. The full proof has been deferred to Section~\ref{hankel_conv_proof} in Appendix~\ref{appendix_error}. \end{proof} \begin{remark} \label{dcT_equiv} Since \[ d \leq \frac{T}{4\mathcal{C} m(\log{\frac{T}{\delta}})} \wedge \sqrt{\frac{T}{4\mathcal{C} \log{\frac{2}{\delta}} }}\implies T \geq T_0(\delta, d) \] we can restate Theorem~\ref{hankel_convergence} as follows: for a fixed $T$, we have with probability at least $1-\delta$ that $$\Big | \Big | \hat{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, d, d} \Big | \Big |_2 \leq \mathcal{C} \sigma \sqrt{\frac{1}{T}} \sqrt{pd + \log{\frac{d}{\delta}}}$$ when \begin{equation} \label{d_finite_time} d \leq \frac{T}{4\mathcal{C} m(\log{\frac{T}{\delta}})} \wedge \sqrt{\frac{T}{4\mathcal{C} \log{\frac{2}{\delta}} }} \end{equation} In general, $\sigma$ does not depend on $\sqrt{d}$, however the actual bound depends on system parameters that are unknown. Furthermore, one can easily obtain the $d$--finite impulse response (FIR) approximation by selecting the first $p$ rows of $\hat{\mathcal{H}}_{0, d, d}$. \end{remark} \paragraph{Interpretation of $d$:} At a high level, we want to choose $d$ such that $\hat{\Hc}_{0, d, d}$ in Algorithm~\ref{alg:learn_ls} becomes an estimator of $\mathcal{H}_{0, \infty, \infty}$. Since \[ ||\hat{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}||_2 \leq \underbrace{||\hat{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, d, d}||_2}_{=\text{Estimation Error}} + \underbrace{||\mathcal{H}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}||_2}_{=\text{Truncation Error}} \] The key idea will be to choose $d$ (as a function of $T$) such that $$\text{Estimation Error} \geq \text{Truncation Error}$$ For a fixed $T$, estimation error increases as $d$ increases but truncation error decreases and such a $d$ can be found. By balancing the estimation and truncation errors in this way we can control the total error $||\hat{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}||_2$ and obtain $O(T^{-1/2})$ error rate which is the optimal parametric error rate. Although truncation error is unknown we can provide a data--dependent upper bound for the estimation error (Theorem~\ref{hankel_convergence}). Consequently, $||\hat{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}||_2$ is bounded from above by twice this bound for the ideal choice of $d$. \paragraph{Choice of $d$:} In Algorithm~\ref{alg:learn_ls} we use the following rule to pick $d$, motivated by~\citep{goldenshluger1998nonparametric}. A key departure from the case there and other related work is that we allow for process noise, \textit{i.e.}, $\eta_t$ is not identically zero. Our results reflect this by the additional $R$ factor. \begin{algorithm}[H] \caption{Choice of $d$} \label{alg:d_choice} \textbf{Output} $\hd$ \begin{algorithmic}[1] \STATE $\mathcal{D}(T) = \Big\{d \Big| d \leq \frac{T}{4\mathcal{C} m(\log{\frac{T}{\delta}})} \wedge \sqrt{\frac{T}{4\mathcal{C} \log{\frac{2}{\delta}} }}\Big\}, \alpha(h) = \sqrt{h}\Big(\sqrt{\frac{hp + \log{\frac{T}{\delta}}}{T}} \Big)$. \STATE $d_0(T, \delta) =\inf \Big\{ l \Big| ||\hat{\mathcal{H}}_{0, l, l} - \hat{\mathcal{H}}_{0, h, h}||_2 \leq \mathcal{C} \beta R (\alpha(h) + 2\alpha(l) ) \hspace{2mm}\forall h \in \mathcal{D}(T), h \geq l \Big\}$. \STATE $\hat{d} = \max{\Big(d_0(T, \delta), \log{\Big(\frac{T}{\delta}\Big)} \Big)}$ \\ \RETURN $\hd$ \end{algorithmic} \end{algorithm} From Remark~\ref{dcT_equiv} it is clear that $\mathcal{D}(T)$ is the set of $d$ values for which Theorem~\ref{hankel_convergence} holds with probability at least $1-\delta$. We focus on only these values of $d$ for which we can compute $\mathcal{H}_{0, d, d}$ with high accuracy. In Line $2$, while computing $d_0(T, \delta)$, note that $\hat{\mathcal{H}}_{0, l, l}$ are estimates of $\mathcal{H}_{0, l, l}$ for $l \in \mathcal{D}(T)$ and can be obtained from a single stream of data by repeatedly using Algorithm~\ref{alg:learn_ls} for every $l \in \mathcal{D}(T)$. By picking the least $l$ such that for every $h \geq l$ we have \[ ||\hat{\mathcal{H}}_{0, l, l} - \hat{\mathcal{H}}_{0, h, h}||_2 \leq \mathcal{C} \beta R (\alpha(h) + 2\alpha(l)) \] we ensure that \[ ||\hat{\mathcal{H}}_{0, l, l} -{\mathcal{H}}_{0, h, h}||_2 \leq ||\hat{\mathcal{H}}_{0, l, l} - \hat{\mathcal{H}}_{0, h, h}||_2 + ||{\mathcal{H}}_{0, h, h} - \hat{\mathcal{H}}_{0, h, h}||_2 = O (\beta R \alpha(h)) \] This implies that $\hat{\Hc}_{0, h, h}$ does no better in estimating $\mathcal{H}_{0, h, h}$ than $\hat{\Hc}_{0, l, l}$ (in an order sense). Algorithm~\ref{alg:d_choice} chooses the smallest $\hat{\Hc}_{0, l, l}$ that works well in estimating the larger Hankel submatrices. We now state the main estimation result for $\mathcal{H}_{0, \infty, \infty}$ for $d = \hd$ as chosen in Algorithm~\ref{alg:d_choice}. Fix any $\kappa \geq 20$ and define \begin{align} T^{(\kappa)}_{*}(\delta) &= \inf\Big\{T \Big |\frac{T}{4\mathcal{C} m(\log{\frac{T}{\delta}})} \wedge \sqrt{\frac{T}{4\mathcal{C} \log{\frac{2}{\delta}} }} \geq d_{*}(T, \delta), \hspace{2mm} d_{*}(T, \delta) \leq \frac{\kappa d_{*}(\frac{T}{\kappa^2}, \delta)}{8} \Big\} \label{ts_delta} \end{align} where \begin{equation} d_{*}(T, \delta) = \inf\Bigg\{d \Bigg| \mathcal{C} \beta R \sqrt{d} \sqrt{\frac{pd + \log{\frac{T}{\delta}}}{T}} \geq ||\mathcal{H}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}||_2 \Bigg\} \label{ds_delta} \end{equation} \begin{thm} \label{hankel_est_thm} For a fixed $\kappa \geq 20$, whenever we have $T \geq T^{(\kappa)}_{*}(\delta)$ we have with probability at least $1-\delta$ that \[ ||\hat{\Hc}_{0, \hd, \hd} - \mathcal{H}_{0, \infty, \infty}||_2 \leq \Big(\frac{3\kappa \beta \mathcal{C} R}{8}\vee 12 \Big)\Bigg(\sqrt{\frac{p\hat{d}^2+\hd \log{\frac{T}{\delta}}}{T}}\Bigg) \] where $\hd = O(\log{\frac{T}{\delta}})$. \end{thm} The proof of Theorem~\ref{hankel_est_thm} can be found as Proposition~\ref{hd_size} in Appendix~\ref{sec:hankel_est}. Next, we show that the error in Theorem~\ref{hankel_est_thm} is minimax optimal (up to logarithmic factors) and cannot be improved by any estimation method. \begin{prop} \label{lower_bnd_hankel} Let $\sqrt{T} \geq \mathcal{C} \rho^2(A)$. Then for any estimator $\hat{\Hc}$ of $\mathcal{H}_{0, \infty, \infty}$ we have \[ \sup_{\hat{\Hc}}\mathbb{E}[||\hat{\Hc} - \mathcal{H}_{0, \infty, \infty}||_2] = \Omega\Big(\sqrt{\frac{\log{T}}{T}}\Big) \] \end{prop} \begin{proof} Assume the contrary that \[ \sup_{\hat{\Hc}}\mathbb{E}[||\hat{\Hc} - \mathcal{H}_{0, \infty, \infty}||_2] = o\Big(\sqrt{\frac{\log{T}}{T}}\Big) \] Then recall that $[\mathcal{H}_{0, \infty, \infty}]_{1:p, :} = [CB, CAB, \hdots,]$ and $G(z) = z^{-1}CB + z^{-2} CAB + \hdots$. Similarly we have $\hat{G}(z)$. Define \[ ||G - \hat{G}||_2 = \sqrt{\sum_{k=0}^{\infty}||CA^kB||_2^2} \] If $\sup_{\hat{\Hc}}\mathbb{E}[||\hat{\Hc} - \mathcal{H}_{0, \infty, \infty}||_2] = o\Big(\sqrt{\frac{\log{T}}{T}}\Big)$, then since $||\hat{\Hc} - \mathcal{H}_{0, \infty, \infty}||_2 \geq ||G - \hat{G}||_2$ we can conclude that \[ \mathbb{E}[||G - \hat{G}||_2] = o\Big(\sqrt{\frac{\log{T}}{T}}\Big) \] which contradicts Theorem 5 in~\citep{goldenshluger1998nonparametric}. Thus, $\sup_{\hat{\Hc}}\mathbb{E}[||\hat{\Hc} - \mathcal{H}_{0, \infty, \infty}||_2] = \Omega\Big(\sqrt{\frac{\log{T}}{T}}\Big) $. \end{proof} \subsection{Parameter Recovery} \label{params_rec} Next we discuss finding the system parameters. For this we need $k$, \textit{i.e.}, the number of singular vectors that can be reliably learned. The details are summarized in Algorithm~\ref{alg:svd} where $\mathcal{H} = \hat{\Hc}_{0, \hd, \hd}$. \begin{algorithm}[H] \caption{Hankel2Sys($T, \hd, k, m, p$)} \label{alg:svd} \textbf{Input} $T = \text{Horizon for Learning}$ \\ $\hd = \text{Hankel Size}$ \\ $m = \text{Input dimension}$\\ $p=\text{Output dimension}$ \\ $k= \text{Desired model order to learn}$ \\ \textbf{Output} System Parameters: $(\hat{C}_k, \hat{A}_k, \hat{B}_k)$ \begin{algorithmic}[1] \STATE $\mathcal{H} = \text{LearnSystem}(T, \hd, m, p)$ \STATE Pad $\mathcal{H}$ with zeros to make it doubly infinite \STATE $U, \Sigma, V \leftarrow$ SVD of $\mathcal{H}$ \\ \STATE $U_k, V_k \leftarrow$ top $k$ singular vectors\\ \STATE $\hat{C}_k \leftarrow$ first $p$ rows of $U_k \Sigma_k^{1/2}$ \\ \STATE $\hat{B}_k \leftarrow$ first $m$ columns of $ \Sigma_k^{1/2} V^{\top}_k$\\ \STATE $Z_0 = [U_k \Sigma_k^{1/2}]_{1:, :}, Z_1 = [U_k \Sigma_k^{1/2}]_{p+1:, :}$\\ \STATE $\hat{A}_k \leftarrow (Z_0^{\top} Z_0)^{-1} Z_0^{\top}Z_1$. \RETURN $(\hat{C}_k, \hat{A}_k, \hat{B}_k)$ \end{algorithmic} \end{algorithm} \paragraph{Interpretation of $k$:} Our final goal is to find a realization $(C \in \mathbb{R}^{p \times n}, A \in \mathbb{R}^{n \times n}, B \in \mathbb{R}^{n \times m})$ of the underlying model. Since finite data limits the complexity of models that can be learned, $k$ denotes the order of the best lower dimensional approximation that can be learned given data. Specifically, $k$ is the number of singular vectors of $\hat{\Hc}_{0, d, d}$ that are reliably close to the singular vectors (and values) of $\mathcal{H}_{0, \infty, \infty}$. We use these singular values and vectors to obtain model approximations of the true model by balanced truncation. \paragraph{Choice of $k$:} Since $\hat{\Hc}_{0, \hd, \hd}$ is a noisy estimate of $\mathcal{H}_{0, \infty, \infty}$ we need to know which singular vectors of $\hat{\Hc}_{0, \hd, \hd}$ are close to $\mathcal{H}_{0, \infty, \infty}$. The key idea is the following: since a $k$--order approximation requires only top $k$ singular vectors of the true Hankel matrix, we find the largest $k$ such that the top $k$ singular vectors of $\hat{\mathcal{H}}_{0, \hd, \hd}$ are close to the top $k$ singular vectors of $\mathcal{H}_{0, \infty, \infty}$. This is achieved by singular value thresholding. Define the singular value threshold $\tau(\Delta)$ as follows $$\tau(\Delta) = \frac{\kappa \mathcal{C} R \sqrt{\hd}}{\Delta} \sqrt{\frac{p\hd + \log{\frac{T}{\delta}}}{T}} $$ Then the choice of $k$ is given by Algorithm~\ref{alg:k_choice}. \begin{algorithm}[H] \caption{Choice of $k$} \label{alg:k_choice} \textbf{Input } Normalized singular value gap: $\Delta$ \\ \textbf{Output } $k$ \begin{algorithmic}[1] \IF{$\Delta > 0$} \STATE $k = \sup \Bigg\{l \Big | \hspace{2mm} \frac{{\sigma_l(\hat{\mathcal{H}}_{0, \hd, \hd})}}{\beta } \geq 4\tau(\Delta) \Bigg\}$ \ELSE \STATE $ k = \sup \Bigg\{l \Big | \hspace{2mm} \frac{{\sigma_l(\hat{\mathcal{H}}_{0, \hd, \hd})}}{\beta } \geq 4\Bigg(\tau\Bigg(\sqrt{\frac{\beta}{ \sigma_l(\hat{\mathcal{H}}_{0, \hd, \hd})l}}\Bigg)\Bigg)^{1/2} \Bigg\}$ \ENDIF \RETURN $k$ \end{algorithmic} \end{algorithm} Define $\Delta_+$ as follows, let $\sigma_{n+1} = 0$ then \begin{equation} \Delta_{+} = \inf_{\sigma_i \neq \sigma_{i+1}} \Big(1 - \frac{\sigma_{i+1}}{\sigma_i}\Big)\label{delta_def} \end{equation} \begin{remark} \label{delta_0} Here $\Delta_{+}$ is the minimum gap between \textit{unequal} singular values only. For example: if $\sigma_1 = 1, \sigma_2 = 1, \sigma_3 = 1/2$ and $\sigma_4 = 0$ then in this case $\Delta_{+} = 1/2$. The reasons our results hold because $\sigma_1 = \sigma_2$ and both of these can be recovered equally easily: further the learning both singular vectors up to a unitary transformation suffices (See Eq.~\eqref{transform_Q} and its following discussion in the Appendix). \end{remark} This quantity is relevant in many subspace recovery problems. Since system identification via balanced truncation is equivalent to estimating singular vectors of $\mathcal{H}_{0, \infty, \infty}$ the error bounds contain $\Delta_+$ which is the least normalized singular value gap. This is not surprising as similar behavior is also observed in subspace identification literature (See Theorems 2.1-2.2 in~\citep{ma2016subspace}, for example). If a non--zero lower bound on $\Delta_+$ is known, then we use $\Delta = \Delta_+$ in Algorithm~\ref{alg:k_choice}. On the other hand, if $\Delta_+$ is unknown then $\Delta = 0$. Note that the threshold when $\Delta = 0$ is more conservative than when $\Delta > 0$, \textit{i.e.}, the threshold is $O(T^{-1/2})$ when $\Delta_+$ is known and $O(T^{-1/4})$ when $\Delta_+$ is unknown. This is the cost of unknown (or too small) singular value gap. The following theorem provides error guarantees for parameter recovery. \begin{thm} \label{balanced_truncation} Fix any $\kappa \geq 20$. Let $M$ be the true unknown model and $k$ be the output of Algorithm~\ref{alg:k_choice}. Then, whenever $T \geq T^{(\kappa)}_{*}(\delta)$, we have with probability at least $1-\delta$ \begin{itemize} \item If $\Delta_+ > 0$ and known then: \begin{align*} ||(C_k, A_k, B_k) - (\hat{C}_k, \hat{A}_k, \hat{B}_k)||_2 \leq \mathcal{C}\kappa \beta (\gamma + 1) R \underbrace{\Bigg(\sqrt{\frac{p\hat{d}^2+\hd \log{\frac{T}{\delta}}}{\hat{\sigma}^2_k \Delta^2_+ T}}\Bigg)}_{=\mathcal{O}({\frac{\log{T}}{\sqrt{T}}})} (\sqrt{\hat{\sigma}_k \Gamma_k} \vee \sqrt{\Gamma_k}) \end{align*} and $\Gamma_k = \min{(k, \frac{1}{\Delta_+})}$. \item If $\Delta_+$ is unknown then: \begin{align*} ||(C_k, A_k, B_k) - (\hat{C}_k, \hat{A}_k, \hat{B}_k)||_2 \leq \mathcal{C} \beta (\gamma + 1) \sqrt{\frac{\kappa R }{\hat{\sigma}^2_k k}} \Bigg(\frac{p\hat{d}^2+\hd \log{\frac{T}{\delta}}}{T}\Bigg)^{1/4}(\sqrt{\hat{\sigma}_k} \vee 1) \end{align*} \end{itemize} Here $M_k = (C_k, A_k, B_k)$ is the $k$--order balanced truncated approximation of $M$ and $\hat{M}_k = (\hat{C}_k, \hat{A}_k, \hat{B}_k)$ is the output of Algorithm~\ref{alg:svd}. Here ${\hat{\sigma}}_i$ are the singular values of $\hat{\Hc}_{0, \hd, \hd}$ and $||A_k||_2 \leq \gamma$. \end{thm} \begin{proof} By Theorem~\ref{hankel_est_thm} we have that \[ ||\hat{\Hc}_{0, \hd, \hd} - \mathcal{H}_{0, \infty, \infty}||_2 \leq \underbrace{\Big(\frac{3\kappa \beta \mathcal{C} R}{8} \vee 12 \Big)\Bigg(\sqrt{\frac{p\hat{d}^2+\hd \log{\frac{T}{\delta}}}{T}}\Bigg)}_{=\epsilon} \] Following this we will use Proposition~\ref{reduction}. Let $\sigma_i$ be the singular values of $\mathcal{H}_{0, \infty, \infty}$. For simplicity, we will assume that $\sigma_i \neq \sigma_{i+1}$ and we know a lower bound $\Delta_+$ such that $\Delta_+ \leq \Big(1 - \frac{\sigma_{i+1}}{\sigma_i}\Big)$. The full proof with unknown $\Delta_+$ is deferred to Appendix~\ref{appendix_model_select} as Proposition~\ref{prop_known_delta} and \ref{prop_delta_unknown}. Recall that $\beta \tau(\Delta_+) = \frac{4\kappa \mathcal{C} \beta R \sqrt{\hd}}{\Delta_+} \sqrt{\frac{p\hd + \log{\frac{T}{\delta}}}{T}} = \frac{4\epsilon}{\Delta_+} $. Then for every $l \leq k$ (because of the decision rule in Line $2$ in Algorithm~\ref{alg:k_choice}) we have that \[ \sigma_l(\hat{\Hc}_{0, \hd, \hd}) \geq \frac{4\epsilon}{\Delta_+} \implies \frac{\sigma_l(\hat{\Hc}_{0, \hd, \hd}) \Delta_+}{4} \geq \epsilon \implies \frac{\sigma_l(\mathcal{H}_{0, \infty, \infty}) \Delta_+}{2} \geq \epsilon \] Let $U_k, \Sigma_k, V_k$ (and $\hat{U}_k, \hat{\Sigma}_k, \hat{V}_k$) be top $k$ left singular vectors, singular values and right singular vectors respectively of $\mathcal{H}_{0, \infty, \infty}$ (and $\hat{\Hc}_{0, \hd, \hd})$. The $k$--order balanced truncated model can be constructed from $U_k, \Sigma_k, V_k$ (and $\hat{U}_k, \hat{\Sigma}_k, \hat{V}_k$) and then we can use Propositions~\ref{reduction} (and its simplification in Corollary~\ref{subspace_reduction_cor} in the appendix) to upper bound error between $(C_k, A_k, B_k)$ and $(\hat{C}_k, \hat{A}_k, \hat{B}_k)$ as \begin{equation} \label{b_bh} ||C_k - \hat{C}_k||, ||B_k - \hat{B}_k|| \leq C \epsilon\sqrt{\frac{\Gamma_k}{\hat{\sigma}_k \Delta_+^2}}, ||A_k - \hat{A}_k|| \leq \frac{C \epsilon (\gamma + 1)\sqrt{\Gamma_k} }{\hat{\sigma}_k \Delta_+} \end{equation} where $\Gamma_k = \min{(k, \frac{1}{\Delta_+})}$. \end{proof} \section{Error Analysis for Theorem~\ref{hankel_est}} \label{appendix_error} \begin{thm}[Theorem 5.39~\cite{vershynin2010introduction}] \label{539_versh} if $E$ is a $T \times md$ matrix with independent sub--Gaussian isotropic rows with subGaussian parameter $1$ then with probability at least $1 - 2e^{-ct^2}$ we have \[ \sqrt{T} - C \sqrt{md} - t \leq \sigma_{\min}(E) \leq \sqrt{T} + C \sqrt{md} + t \] \end{thm} \begin{thm} \label{toep_norm} Suppose $X_0,X_1,X_2, \hdots$ are independent, $\mathbb{E}[X_j] = 0$ for all $j$, and for some constant $A$, either: \begin{itemize} \item for all $j$, $|X_j| \leq A$ almost surely; or \item for all $j$, $X_j$ satisfies a logarithmic Sobolev inequality with constant $A$. \end{itemize} Then $\mathbb{P}(||T_n|| \geq c \sqrt{\log{2n}} + t) \leq e^{-\frac{t^2}{32A^2 n}}$ where \[ T_n = \begin{bmatrix} X_0 & 0 & \hdots & 0 \\ X_1 & X_0 & \hdots & 0 \\ \vdots & \ddots & \ddots & \vdots \\ X_{n-1} & \hdots & \hdots & X_0 \end{bmatrix} \] \end{thm} \begin{proof} The proof of this exact statement can be combined with Theorem 1 and Page 319 in~\cite{meckes2007spectral}. \end{proof} \begin{lem} \label{selfnorm_VT} Let \begin{align*} \tilde{A}_{md \times md} &= \begin{bmatrix} 0 & 0 & 0 & \hdots & 0 \\ I & 0 & 0 & \hdots & 0 \\ \vdots & \ddots & \ddots & \vdots & \vdots \\ 0 & \hdots & I & 0 & 0 \\ 0 & \hdots & 0 & I & 0 \end{bmatrix}, \tilde{B}_{md \times m} = \begin{bmatrix} I \\ 0 \\ \vdots \\ 0 \end{bmatrix}, \tilde{U}_k = U_{d+k} \end{align*} Define \begin{align*} \tilde{x}(k+1) &= \tilde{A}\tilde{x}(k) + \tilde{B} \tilde{U}(k+1) \end{align*} Define $P_t = \sum_{k=0}^{t-1} \tilde{x}_k \tilde{x}_k^{\prime}$ then we have with probability at least $1-\delta$ \[ \sum_{k=1}^{T-1}\Big(\tilde{A} \tilde{x}_{k-1} \tilde{U}^{\prime}_{k} \tilde{B}^{\prime} + \tilde{B} \tilde{U}_k x^{\prime}_{k-1} A^{\prime}\Big) \succeq -4L\sqrt{\frac{ m\log{\frac{5}{\delta}}}{T}}\Big(AP_{T-1}A^{\prime} + \tilde{B}\sum_{k=1}^{T-1} \tilde{U}_k \tilde{U}_k^{\prime}\tilde{B}^{\prime} \Big) \] when $T \geq \mathcal{C} \Big(md + m\log{\frac{1}{\delta}} \Big)$ and $\{\tilde{U}_k\}_{k=1}^T$ is $L$-subGaussian. \end{lem} \begin{proof} When $T \geq \mathcal{C} \Big(md + m\log{\frac{1}{\delta}} \Big)$, it follows from Theorem~\ref{539_versh} that $\frac{5}{4}T \tilde{B} \tilde{B}^{\prime} \succeq \Big(\sum_{k=1}^{T-1} \tilde{B}\tilde{U}_k \tilde{U}_k^{\prime}\tilde{B}^{\prime}\Big) \succeq \frac{3}{4}T \tilde{B} \tilde{B}^{\prime}$. Let $$V_T = \sum_{k=1}^{T-1} \tilde{B}\tilde{U}_k \tilde{U}_k^{\prime}\tilde{B}^{\prime} + AP_{T-1}A^{\prime}, V = \frac{3T}{4}I, S_{T} = \sum_{k=1}^{T-1}\Big(\tilde{A} \tilde{x}_{k-1} \tilde{U}^{\prime}_{k} \tilde{B}^{\prime} \Big)$$ Furthermore, \begin{align*} \mathbb{P}(||S_T||^2_{(V + V_T)^{-1}} \geq x) &\leq \mathbb{P}\Big(\sup_{v \in {\mathcal{N}}^{o}}||S_T v||^2_{(V + V_T)^{-1}} \geq \frac{x}{2}\Big) \leq 5^{m} \mathbb{P}\Big(||S_T v||^2_{(V + V_T)^{-1}} \geq \frac{x}{2}\Big) \end{align*} Here ${\mathcal{N}}^{o}$ is $\frac{1}{2}$--net covering vectors where only the first $m$ entries of $v$ are non--zero. This is sufficient because if $V_B^{\perp}$ is the subspace perpendicular to $BB^{\top}$ then it is clear that the projection of $S_T$ of $V^{\perp}_B$ is $0$. Now we can use Theorem~\ref{selfnorm_main} on $S_T v$, which gives with probability at least $1-\delta$ that \[ ||S_Tv||^2_{(V + V_T)^{-1}} \leq L^2 \Big(\log{\frac{1}{\delta}} + \log{5}\Big) \] By replacing $\delta \rightarrow 5^{-m} \delta$ we get with probability at least $1-\delta$ \[ ||S_T||^2_{(V + V_T)^{-1}} \leq 2mL^2 \Big(\log{\frac{1}{\delta}} + \log{5}\Big) \] If $V_{||}$ is the projection of $(V+V_T)^{-1}$ on the subspace spanned by $V_T$ and $V_{\perp}$ is the orthogonal subspace, then $||S_T||^2_{(V + V_T)^{-1}} = ||S_T||^2_{V_{||}^{\dagger}}$, by combining this with the fact $V_{||} \preceq 2 V_T$ we get \begin{align*} S_T + S_T^{\prime} \succeq -4L\sqrt{\frac{m}{T}\Big(\log{\frac{1}{\delta}} + \log{5}\Big)}V_T \end{align*} \end{proof} \subsection{Invertibility of Sample Covariance Matrix} \label{invert_sample_cov_appendix} \begin{prop} \label{energy_conc} Define \begin{align*} T_0(\delta) &= \mathcal{C} md ((2+L^2)\log{\Big(\frac{8md}{\delta}\Big)} + d\log{\frac{2}{\delta}}) \end{align*} where $\mathcal{C}$ is some universal constant. We have with probability $1 - \delta$ and for $T > T_0(\delta, d)$ \begin{align} \label{yt_bnd} \frac{1}{2} T I \preceq UU^{\top} \preceq \frac{3}{2} T I \end{align} where \[ U = \begin{bmatrix} U_{d} & U_{d+1} & \hdots & U_{T+d-1} \\ U_{d-1} & U_{d} & \hdots & U_{T+d-2} \\ \vdots & \vdots & \hdots & \vdots \\ U_1 & U_2 & \hdots & U_{T} \end{bmatrix} \] \end{prop} \begin{remark} \label{krahmer_remark} A similar result is proven in Lemma C.2 of~\cite{oymak2018non} by an application of Theorem 4.1 in~\cite{krahmer2014suprema}. Our result here gives optimal dependence between $T$ and $\delta$. On the other hand, the error bounds and the analysis remain unmodified. \end{remark} \begin{proof} The difficulty in the proof comes from the fact that $\{\tilde{U}^{-}_{l+d, d}\}_{l=0}^{T-1}$ is not an independent sequence. Define \[ U = \begin{bmatrix} U_{d} & U_{d+1} & \hdots & U_{T+d-1} \\ U_{d-1} & U_{d} & \hdots & U_{T+d-2} \\ \vdots & \vdots & \hdots & \vdots \\ U_1 & U_2 & \hdots & U_{T} \end{bmatrix} \] Then it is clear that $V_T = UU^{\top}$. The proof then proceeds by showing that $\{\tilde{U}_{l+d}\}_{l=0}^{T-1}$ is generated by a fully observed LTI system ($C= I$) and we use results from~\cite{sarkar2018} to prove Eq.~\eqref{sample_cov_bnd}.\\ It is easy to show that \begin{equation*} \frac{1}{2d} T I \preceq V_T \preceq \frac{3d}{2} T I \end{equation*} However, since we will need $d$ to grow as $T$, this is not sufficient for our case. Define $$\tilde{x}_0 = \begin{bmatrix} U_d \\ U_{d-1} \\ \vdots \\ U_1 \end{bmatrix}_{md \times 1}$$ then let \begin{align*} \tilde{A}_{md \times md} &= \begin{bmatrix} 0 & 0 & 0 & \hdots & 0 \\ I & 0 & 0 & \hdots & 0 \\ \vdots & \ddots & \ddots & \vdots & \vdots \\ 0 & \hdots & I & 0 & 0 \\ 0 & \hdots & 0 & I & 0 \end{bmatrix}, \tilde{B}_{md \times m} = \begin{bmatrix} I \\ 0 \\ \vdots \\ 0 \end{bmatrix}, \tilde{U}_k = U_{d+k} \end{align*} Then \begin{align} \tilde{x}(k+1) &= \tilde{A}\tilde{x}(k) + \tilde{B} \tilde{U}(k+1) \label{dynamical_energy} \end{align} where $\tilde{x}(t) = \tilde{x}_t$ and since $V_T = \sum_{k=0}^{T-1} \tilde{x}_k \tilde{x}_k^{\prime}$ we have \begin{align} V_T &= \tilde{A} V_{T-1} \tilde{A}^{\prime} + {\tilde{B} \Big(\sum_{k=1}^T \tilde{U}_k \tilde{U}_k^{\prime}\Big) \tilde{B}^{\prime} + \sum_{k=1}^{T-1}\Big(\tilde{A} \tilde{x}_{k-1} \tilde{U}^{\prime}_{k} B^{\prime} + B \tilde{U}_k x^{\prime}_{k-1} A^{\prime}\Big)} \label{dynamical_expansion} \end{align} We use Theorem~\ref{539_versh} and let $E = [\tilde{U}_1, \hdots, \tilde{U}_{T}]$. By setting $t = \sqrt{\frac{1}{c} \log{\frac{2}{\delta}}}$ and ensuring \[ T \geq \mathcal{C}\Big(md + \log{\frac{2}{\delta}}\Big) \] for some large enough universal constant $\mathcal{C}$, we have with probability at least $1-\delta$ that \begin{equation} \frac{5}{4}T I \succeq \Big(\sum_{k=1}^T \tilde{U}_k \tilde{U}_k^{\prime}\Big) \succeq \frac{3}{4}T I \label{input_lwrbnd} \end{equation} Then we get by applying Lemma~\ref{selfnorm_VT} that \[ \sum_{k=1}^{T-1}\Big(\tilde{A} \tilde{x}_{k-1} \tilde{U}^{\prime}_{k} B^{\prime} + B \tilde{U}_k x^{\prime}_{k-1} A^{\prime}\Big) \succeq - 4L \sqrt{\frac{\log{m\frac{5}{\delta}}}{T}}\Big(\tilde{A} V_{T-1} \tilde{A}^{\prime} + \tilde{B} \Big(\sum_{k=1}^T \tilde{U}_k \tilde{U}_k^{\prime}\Big) \tilde{B}^{\prime} \Big) \] Then Eq.~\eqref{dynamical_expansion} becomes $V_T \succeq \Big(1 - 4L \sqrt{\frac{m\log{\frac{5}{\delta}}}{T}}\Big)\Big(\tilde{A} V_{T-1} \tilde{A}^{\prime} + \tilde{B} \Big(\sum_{k=1}^T \tilde{U}_k \tilde{U}_k^{\prime}\Big) \tilde{B}^{\prime} \Big)$ and we have \begin{equation} V_{T-1} \succeq \Big(1 - 4L \sqrt{\frac{m\log{\frac{5}{\delta}}}{T}}\Big)\Big(\tilde{A} V_{T-1} \tilde{A}^{\prime} + \tilde{B} \Big(\sum_{k=1}^T \tilde{U}_k \tilde{U}_k^{\prime}\Big) \tilde{B}^{\prime} \Big) - \tilde{x}_{T-1}\tilde{x}_{T-1}^{\prime} \label{v_t_bnd} \end{equation} Furthermore, $V_{T-1} \preceq \frac{5}{4}(T-1)I$. Then Eq.~\eqref{v_t_bnd} reduces to \begin{align*} V_{T-1} &\succeq \tilde{A} V_{T-1} \tilde{A}^{\prime} + \underbrace{\Big(1 - 4L \sqrt{\frac{m\log{\frac{5}{\delta}}}{T}}\Big) \tilde{B} \Big(\sum_{k=1}^T \tilde{U}_k \tilde{U}_k^{\prime}\Big)\tilde{B}^{\prime} - 4L \sqrt{\frac{m\log{\frac{5}{\delta}}}{T}}\tilde{A} V_{T-1} \tilde{A}^{\prime} - \tilde{x}_{T-1}\tilde{x}_{T-1}^{\prime} }_{=Q} \\ V_{T-1} &\succeq \Big(1 - 4L \sqrt{\frac{m\log{\frac{5}{\delta}}}{T}}\Big)\tilde{A} V_{T-1} \tilde{A}^{\prime} + \frac{3T}{4}\Big(1 - 4L \sqrt{\frac{m\log{\frac{5}{\delta}}}{T}}\Big) \tilde{B} \tilde{B}^{\prime} - \tilde{x}_{T-1}\tilde{x}_{T-1}^{\prime}\\ V_{T-1} &\succeq \frac{3T}{4}\sum_{k=1}^d \Big(1 - 4L \sqrt{\frac{m\log{\frac{5}{\delta}}}{T}}\Big)^{k}\tilde{A}^{k-1} \tilde{B} \tilde{B}^{\prime}\tilde{A}^{k-1 \prime} + \sum_{k=1}^d \Big(1 - 4L \sqrt{\frac{\log{m\frac{5}{\delta}}}{T}}\Big)^{k-1}\tilde{A}^{k-1} \tilde{x}_{T-1}\tilde{x}_{T-1}^{\prime}\tilde{A}^{k-1 \prime} \end{align*} If $T \geq {144mL^2 e^2 d^2} \log{\frac{5}{\delta}}$, then $\Big(1 - 4L \sqrt{\frac{m\log{\frac{5}{\delta}}}{T}}\Big)^{k} \geq 1 - \frac{1}{3e}$ and we get \begin{align} V_{T-1} &\succeq \frac{3(1-\frac{1}{3e})}{4}T\sum_{k=1}^d \tilde{A}^{k-1} \tilde{B} \tilde{B}^{\prime}\tilde{A}^{k-1 \prime} + \sum_{k=1}^d \tilde{A}^{k-1} \tilde{x}_{T-1}\tilde{x}_{T-1}^{\prime}\tilde{A}^{k-1 \prime} \nonumber\\ &\succeq \frac{3(1-\frac{1}{3e})}{4}TI + \sum_{k=1}^d \tilde{A}^{k-1} \tilde{x}_{T-1}\tilde{x}_{T-1}^{\prime}\tilde{A}^{k-1 \prime} \label{vT_norm2} \end{align} The sum is up to $d$ because $\tilde{A}$ is that $\tilde{A}^d = 0$. Observe that \begin{align*} ||\sum_{k=1}^{d} \tilde{A}^{k} \tilde{x}_{T-1} \tilde{x}_{T-1}^{\prime} \tilde{A}^{k \prime} ||_2 &= \sigma_1^2([\tilde{A} x_{T-1}, \tilde{A}^2 x_{T-1}, \hdots \tilde{A}^d x_{T-1}]) \end{align*} The matrix $[\tilde{A} x_{T-1}, \tilde{A}^2 x_{T-1}, \hdots \tilde{A}^d x_{T-1}]$ is a random Toeplitz matrix. We will use Theorem~\ref{toep_norm}. \[ \mathbb{P}\Big(||[\tilde{A} x_T, \tilde{A}^2 x_T, \hdots \tilde{A}^d x_T]||_2 \geq \sqrt{2md \log{(md)}} + L\sqrt{md \log{\frac{1}{\delta}}} \Big) \leq \delta \] Then \begin{equation} ||\sum_{k=1}^{d} \tilde{A}^{k} \tilde{x}_{T-1} \tilde{x}_{T-1}^{\prime} \tilde{A}^{k \prime} ||_2 \leq (4+2L^2)md \log{\Big(\frac{md}{\delta}\Big)} \label{trail_norm} \end{equation} with probability at least $1-\delta$. Plugging this in Eq.~\eqref{vT_norm2} we get \begin{align} V_{T-1} &\succeq \frac{3T}{4}\Big(1 - \frac{1}{3e}\Big) I - (4+2L^2)md \log{\Big(\frac{md}{\delta}\Big)} I \nonumber \\ &\succeq \frac{3T}{4} I - \frac{T}{4}I = \frac{T}{2}I \end{align} whenever $T \geq 8(4 + 2L^2) md \log{\Big(\frac{md}{\delta}\Big)} \vee {144mL^2 e^2 d^2} \log{\frac{5}{\delta}}$. \end{proof} \subsection{Proof of Theorem~\ref{hankel_convergence}} \label{hankel_conv_proof} Recall Eq.~\eqref{input-output-eq} and \eqref{compact-dynamics}, \textit{i.e.}, \begin{align} \tilde{Y}^{+}_{l, d} &= \mathcal{H}_{0, d, d}\tilde{U}^{-}_{l-1, d} + \mathcal{T}_{0, d}\tilde{U}^{+}_{l, d} + \mathcal{H}_{d, d, l-d-1}\tilde{U}^{-}_{l-d-1, l-d-1} \nonumber\\ &+ \mathcal{O}_{0, d, d}\tilde{\eta}^{-}_{l-1, d} + \mathcal{T}\mathcal{O}_{0, d}\tilde{\eta}^{+}_{l, d} + \mathcal{O}_{d, d, l-d-1}\tilde{\eta}^{-}_{l-d-1, l-d-1} + \tilde{w}^{+}_{l, d}\label{compact-dynamics1} \end{align} Assume for now that we have $T+2d$ data points instead of $T$. It is clear that \[ \hat{\Hc}_{0, d, d} = \arg \min_{\mathcal{H} \in \mathcal{S}_d} \sum_{l=0}^T ||\tilde{Y}^{+}_{l+d+1, d} - \mathcal{H} \tilde{U}^{-}_{l+d, d}||_2^2 = \Big(\sum_{l=0}^{T-1}\tilde{Y}^{+}_{l+d+1, d} (\tilde{U}^{- }_{l+d, d})^{\top} \Big)V_T^{\dagger} \] where \begin{equation} \label{sample_cov} V_T = \sum_{l=0}^{T-1} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l+d, d} \end{equation} It is show in Proposition~\ref{energy_conc} that $V_T$ is invertible with probability at least $1-\delta$. So in our analysis we can write this as \begin{equation*} (\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l+d, d})^{\dagger} = (\sum_{l=0}^T \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l+d, d})^{-1} \end{equation*} From this one can conclude that \begin{align} \Big | \Big | \hat{\mathcal{H}} - \mathcal{H}_{0, d, d} \Big | \Big |_2 &= \Big | \Big |\Big(\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l+d, d}\Big)^{-1} \Big(\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{+ \top}_{l+d+1, d} \mathcal{T}_{0, d}^{ \top} \nonumber \\ &+ \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l, l}\mathcal{H}_{d, d, l}^{\top} + \tilde{U}^{-}_{l+d, d}\tilde{\eta}^{- \top}_{l+d, d} \mathcal{O}_{0, d, d}^{\top} \nonumber \\ &+ \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{+ \top}_{l+d+1, d}\mathcal{T}\mathcal{O}^{\top}_{0, d} + \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{- \top}_{l, l} \mathcal{O}_{d, d, l}^{\top} + \tilde{U}^{-}_{l+d, d} \tilde{w}^{+ \top}_{l+d+1, d}\Big)\Big | \Big |_2 \label{diff_eq2} \end{align} \vspace{2mm} Here as we can observe $\tilde{U}^{- \top}_{l, l}, \tilde{\eta}^{- \top}_{l, l}$ grow with $T$ in dimension. Based on this we divide our error terms in two parts: \begin{align} E_1 = \Big(\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l+d, d}\Big)^{-1}\Bigg(\tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l, l}\mathcal{H}_{d, d, l}^{\top} + \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{- \top}_{l, l} \mathcal{O}_{d, d, l}^{\top} \Bigg) \label{T_error} \end{align} and \begin{align} E_2 = \Big(\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l+d, d}\Big)^{-1}\Bigg(\tilde{U}^{-}_{l+d, d} \tilde{\eta}^{+ \top}_{l+d+1, d}\mathcal{T}\mathcal{O}^{\top}_{0, d} + \tilde{U}^{-}_{l+d, d} \tilde{U}^{+ \top}_{l+d+1, d} \mathcal{T}_{0, d}^{\top} + \label{d_error} \\ \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{+ \top}_{l+d+1, d}\mathcal{T}\mathcal{O}^{\top}_{0, d} + \tilde{U}^{-}_{l+d, d} \tilde{w}^{+ \top}_{l+d+1, d} \Bigg) \nonumber \end{align} Then the proof of Theorem~\ref{hankel_est} will reduce to Propositions~\ref{error_prob1}--\ref{error_prob3}. We first analyze \[ \Big | \Big | V^{-1/2}_T \Big(\sum_{l=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l, l} \mathcal{H}_{d, d, l}^{\top} \Big) \Big | \Big |_2 \] The analysis of $||V^{-1/2}_T (\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{- \top}_{l, l} O_{d, d, l}^{\top})||$ will be almost identical and will only differ in constants. \begin{prop} \label{error_prob1} For $0 < \delta < 1$, we have with probability at least $1 - 2\delta$ \begin{align*} \Big | \Big | V^{-1/2}_T \Big(\sum_{l=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \top}_{l, l} \mathcal{H}_{d, d, l}^{\top} \Big) \Big | \Big |_2 \leq \mathcal{C} \sigma \sqrt{\log{\frac{1}{\delta}} + pd} \end{align*} where $\sigma = \sqrt{\sigma(\sum_{k=1}^d \mathcal{T}_{d+k, T}^{\top}\mathcal{T}_{d+k, T})}$. \end{prop} \begin{proof} We proved that $\frac{TI}{2} \preceq V_T \preceq \frac{3TI}{2}$ with high probability, then \begin{align} &\mathbb{P}\Big(\Big | \Big | V^{-1/2}_T\Big(\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l, l} \mathcal{H}_{d, d, l}^{\prime} \Big) \Big | \Big |_2 \geq a, \frac{TI}{2} \preceq V_T \preceq \frac{3TI}{2} \Big) \nonumber \\ &\leq \mathbb{P} \Big(\Big | \Big |\sqrt{\frac{2}{T}}\Big(\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l, l} \mathcal{H}_{d, d, l}^{\prime} \Big) \Big | \Big |_2 \geq a, \frac{TI}{2} \preceq V_T \preceq \frac{3TI}{2} \Big) \nonumber\\ &\leq \mathbb{P} \Big(2 \sup_{ v \in {\mathcal{N}}_{\frac{1}{2}}} \Big | \Big |\sqrt{\frac{2}{T}}\Big(\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l, l} \mathcal{H}_{d, d, l}^{\prime} v \Big) \Big | \Big |_2 \geq a\Big) + \mathbb{P}\Big(\frac{TI}{2} \preceq V_T \preceq \frac{3TI}{2} \Big) - 1 \nonumber \\ &\leq 5^{pd} \mathbb{P} \Big(2 \Big | \Big |\sqrt{\frac{2}{T}}\Big(\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l, l} \mathcal{H}_{d, d, l}^{\prime} v \Big) \Big | \Big |_2 \geq a\Big) - \delta \label{normalized_err} \end{align} Define the following $\eta_{l, d} = \tilde{U}^{- \top}_{l, l} \mathcal{H}_{d, d, l}^{\top} v, X_{l, d} = \sqrt{\frac{2}{T}} \tilde{U}^{-}_{l+d, d}$. Observe that $\eta_{l,d}, \eta_{l+1,d}$ have contributions from $U_{l-1}, U_{l-2}$ etc. and do not immediately satisfy the conditions of Theorem~\ref{selfnorm_main}. Instead we will use the fact that $X_{i, d}$ is independent of $U_j$ for all $j \leq i$. \begin{align*} \Big | \Big | V^{-1/2}_T\Big(\sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l, l} \mathcal{H}_{d, d, l}^{\prime} \Big) \Big | \Big |_2 &\leq 2 \sup_{ v \in {\mathcal{N}}_{\frac{1}{2}}} {||\sqrt{\frac{2}{T}} \sum_{l=0}^{T} \tilde{U}^{-}_{l+d, d}\tilde{U}^{- \prime}_{l, l} \mathcal{H}_{d, d, l}^{\prime} v||} \\ &\leq 2 \sup_{ v \in {\mathcal{N}}_{\frac{1}{2}}} {||\sum_{l=0}^{T} X_{l, d}\eta_{l, d}||} \end{align*} Define $\mathcal{H}_{d, d, l}^{\top} v = [\beta_1^{\top}, \beta_2^{\top}, \ldots, \beta_{l}^{\top}]^{\top}$. $\beta_i$ are $m \times 1$ vectors when LTI system is MIMO. Then $\eta_{l,d}= \sum_{k=0}^{l-1} U^{\top}_{l-k} \beta_{k+1}$. Let $\alpha_l = {X_{l,d}}$. Then consider the matrix \begin{align*} \mathcal{B}_{T \times mT}= \begin{bmatrix} \beta_1^{\top} & 0 & 0& \ldots \\ \beta^{\top}_2 & \beta^{\top}_1 & 0 & \ldots\\ \vdots & \vdots & \ddots & \vdots \\ \beta_T^{\top} & \beta_{T-1}^{\top}& \ldots & \beta^{\top}_1 \end{bmatrix} \end{align*} Observe that the matrix $||\mathcal{B}_{T \times mT}||_2 = \sqrt{\sigma(\sum_{k=1}^d \mathcal{T}_{d+k, T}^{\top}\mathcal{T}_{d+k, T})} \leq \sqrt{d} ||\mathcal{T}_{d, \infty}||_2< \infty$ which follows from Proposition~\ref{bound_toeplitz}. Then \begin{align*} \sum_{l=0}^{T} X_{l, d}\eta_{l, d} &= [\alpha_1, \hdots, \alpha_T] \mathcal{B} \begin{bmatrix}U_1 \\ U_2 \\ \vdots \\ U_T \end{bmatrix} \\ &= [\sum_{k=1}^{T} \alpha_k \beta^{\top}_{k}, \sum_{k=2}^{T} \alpha_{k} \beta^{\top}_{k-1}, \hdots, \alpha_{T} \beta^{\top}_{1}]\begin{bmatrix}U_1 \\ U_2 \\ \vdots \\ U_T \end{bmatrix} \\ &= \sum_{j=1}^T \Big(\sum_{k=j}^T \alpha_k \beta^{\top}_{k} U_j\Big) \end{align*} Here $\alpha_i = X_{i, d}$ and recall that $X_{i, d}$ is independent of $U_j$ for all $i \geq j$. Let $\gamma^{\prime} = \alpha^{\prime} \mathcal{B}$. Define $\mathcal{G}_{T+d-k} = \tilde{\sigma}(\{U_{k+1}, U_{k+2}, \ldots, U_{T+d}\})$ where $\tilde{\sigma}(A)$ is the sigma algebra containing the set $A$ with $\mathcal{G}_0 = \phi$. Then $\mathcal{G}_{k-1} \subset \mathcal{G}_k$. Furthermore, since $\gamma_{j-1}, U_j$ are $\mathcal{G}_{T+d+1-j}$ measurable and $U_j$ is conditionally (on $\mathcal{G}_{T+d-j}$) subGaussian, we can use Theorem~\ref{selfnorm_main} on $\gamma^{\prime}U = \alpha^{\prime}\mathcal{B} U$ (where $\gamma_{j} = X_{T+d-j}, U_j = \eta_{T+d-j+1}$ in the notation of Theorem~\ref{selfnorm_main}). Then with probability at least $1-\delta$ we have \begin{equation} \label{selfnorm_ub} \frac{|\gamma^{\prime}U|}{\sqrt{\alpha^{\prime}\mathcal{B}\Bc^{\prime} \alpha + V}} \leq L\sqrt{\Big(\log{\frac{1}{\delta}} + \log{\frac{\alpha^{\prime}\mathcal{B}\Bc^{\prime} \alpha + V}{V}}\Big)} \end{equation} For any fixed $V > 0$. With probability at least $1 - \delta$, we know from Proposition~\ref{energy_conc} that $\alpha^{\prime} \alpha \preceq \frac{3I}{2} \implies \alpha^{\prime}\mathcal{B}\Bc^{\prime} \alpha \preceq \frac{3\sigma_1^2(\mathcal{B})I}{2}$. By combining this event and the event in Eq.~\eqref{selfnorm_ub} and setting $V = \frac{3\sigma_1^2(\mathcal{B})I}{2}$, we get with probability at least $1-2\delta$ that \begin{align} ||\alpha^{\prime} \mathcal{B} U||_2=||\gamma^{\prime}U||_2 \leq \sqrt{3}\sigma_1(\mathcal{B})L\sqrt{\Big(\log{\frac{1}{\delta}} + d\log{3}\Big)} \label{err_1_ub} \end{align} Replacing $\delta \rightarrow 5^{-pd}\frac{\delta}{2}$, we get from Eq.~\eqref{normalized_err} \[ \Big | \Big | V^{-1/2}_T \Big(\sum_{l=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l, l} \mathcal{H}_{d, d, l}^{ \prime} \Big) \Big | \Big |_2 \leq \mathcal{C} L \sigma_1(\mathcal{B}) \sqrt{\log{\frac{1}{\delta}} + pd} \] with probability at least $1-\delta$. Since $L=1$ we get our desired result. \end{proof} Then similar to Proposition~\ref{error_prob1}, we analyze $\Big | \Big | V^{-1/2}_T \Big(\sum_{l=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{+ \top}_{l+d+1, d} \mathcal{T}_{0, d}^{ \top} \Big) \Big | \Big |_2$ \begin{prop} \label{error_prob2} For $0 < \delta < 1$, we have with probability at least $1 - \delta$ \begin{align*} \Big | \Big | V^{-1/2}_T \Big(\sum_{l=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{+ \top}_{l+d+1, d} \mathcal{T}_{0, d}^{ \top} \Big) \Big | \Big |_2 \leq \mathcal{C} \sigma \sqrt{\log{\frac{d}{\delta}} + pd} \end{align*} where $$\sigma \leq \sup_{||v||_2 = 1}\Big | \Big | \begin{bmatrix} v^{\top} CA^{d}B & v^{\top} CA^{d-1}B & v^{\top} CA^{d-2}B & \hdots & 0 \\ 0 & \ddots & \ddots & \ddots & 0 \\ 0 & \ddots & \ddots & \ddots & \ddots \\ 0 & \hdots & v^{\top} CA^{d}B & \hdots & v^{\top} CB \end{bmatrix} \Big | \Big |_2 \leq \sum_{j=0}^d ||CA^jB||_2 \leq \beta \sqrt{d}$$ \end{prop} \begin{proof} Note $ \Big | \Big | V^{-1/2}_T \Big(\sum_{l=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{+ \top}_{l+d+1, d} \mathcal{T}_{0, d}^{ \top} \Big) \Big | \Big |_2 \leq \Big | \Big | \sqrt{\frac{2}{T}} \Big(\sum_{l=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{U}^{+ \top}_{l+d+1, d} \mathcal{T}_{0, d}^{ \top} \Big) \Big | \Big |_2$ with probability at least $1 - \delta$. Then define $X_l = \sqrt{\frac{2}{T}} \tilde{U}^{-}_{l+d, d}$ and the matrix \begin{equation} M_l = \tilde{U}^{+ \top}_{l+d+1, d} \mathcal{T}_{0, d}^{ \top} =[ \underbrace{0}_{=M_{l1}} , \underbrace{U_{l+d+1}^{\top} B^{\top} C^{\top}}_{=M_{l2}} , \underbrace{U_{l+d+1}^{\top} B^{\top} A^{\top} C^{\top} + U_{l+d+2}^{\top} B^{\top} C^{\top}}_{=M_{l3}}, \hdots] \end{equation} Now $\sum_{l=0}^T X_l M_l = [\sum_{l=0}^T X_l M_{l1}, \sum_{l=0}^T X_l M_{l2}, \hdots]$. We will show that $||\sum_{l=0}^T X_l M_{l1}||_2 = O(1)$ and consequently $||\sum_{l=0}^T X_l M_l||_2 =O(\sqrt{d})$ with high probability. We will analyze $||\sum_{l=0}^T X_l M_{ld}||_2$ (the same analysis applies to all columns). Due to the structure of $X_l, M_l$ we have that $X_l$ is independent of $M_l$. Then \begin{align*} \mathbb{P}(||\sum_{l=0}^T X_l M_{ld}||_2 \geq t) &\underbrace{\leq}_{\frac{1}{2}-\text{net}} 5^{p} \mathbb{P}(||\sum_{l=0}^T X_l M_{ld}v||_2 \geq t/2) \end{align*} where $M_{ld}v$ is a real value now. This allows us to write $X_l M_{ld}v$ in a form that will enable us to apply Theorem~\ref{selfnorm_main}. \begin{align} \sum_{l=0}^T X_l M_{ld}v &= \underbrace{[X_0, X_1, \hdots, X_T]}_{=X} \underbrace{\begin{bmatrix} v^{\top} CA^{d}B & v^{\top} CA^{d-1}B & \hdots & v^{\top} CB & \hdots & 0 \\ 0 & v^{\top} CA^{d}B & \ddots & \ddots & \ddots & 0 \\ 0 & \ddots & \ddots & \ddots & \ddots & \ddots \\ 0 & \hdots & 0 & v^{\top} CA^{d}B & \hdots & v^{\top} CB \end{bmatrix}}_{=\mathcal{I}}\underbrace{\begin{bmatrix} U_{d+1} \\ U_{d+2} \\ \vdots \\ U_{T+2d} \end{bmatrix}}_{=N} \end{align} Here $\mathcal{I}$ is $\mathbb{R}^{(T+1) \times (mT + md)}$. It is known from Proposition~\ref{energy_conc} that $XX^{\top} \preceq \frac{3I}{2}$ with high probability and consequently $X \mathcal{I} \mathcal{I}^{\top}X^{\top} \preceq \frac{3\sigma^2_1(\mathcal{I})I}{2}$. Define $\bm{\mathcal{F}}_{l} = \tilde{\sigma}(\{U_l\}_{j=1}^{d+l})$. Furthermore $N_l$ is $\bm{\mathcal{F}}_{l}$ measurable, and $[X\mathcal{I}]_l$ is $\bm{\mathcal{F}}_{l-1}$ measurable and we can apply Theorem~\ref{selfnorm_main}. Now the proof is similar to Proposition~\ref{error_prob1}. Following the same steps as before we get with probability at least $1-\delta$ \begin{align*} ||\sum_{l=0}^T X_l M_{ld}v||_2 \leq \mathcal{C} \sigma_1(\mathcal{I}) L \sqrt{\log{\frac{1}{\delta}} + \log{2}} \end{align*} and substituting $\delta \rightarrow \frac{5^{-p} \delta}{d}$ we get \[ ||\sum_{l=0}^T X_l M_{ld}||_2 \leq \mathcal{C} \sigma_1(\mathcal{I}) L \sqrt{\log{\frac{d}{\delta}} + p\log{2}} \] with probability at least $1 -\frac{\delta}{d}$ and ensuring this for every column using a simple union argument we get with probability at least $1-\delta$ that \begin{equation} \label{error_prob_sharp} ||\sum_{l=0}^T X_l M_{l}||_2 \leq \mathcal{C} \sigma_1(\mathcal{I}) L\sqrt{d} \sqrt{\log{\frac{d}{\delta}} + p\log{2}} \end{equation} \end{proof} The proof for noise and covariate cross terms is almost identical to Proposition~\ref{error_prob2} but easier because of independence. \begin{prop} \label{error_prob3} For $0 < \delta < 1$, we have with probability at least $1 - \delta$ \begin{align*} \Big | \Big | V^{-1/2}_T \Big(\sum_{k=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{+ \prime}_{l+1+d, d}\mathcal{T} \mathcal{O}^{\prime}_{0, d} \Big) \Big | \Big |_2 &\leq \mathcal{C} \sigma_1 \sqrt{\log{\frac{d}{\delta}} + pd} \\ \Big | \Big | V^{-1/2}_T \Big(\sum_{k=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{- \prime}_{l, l}\mathcal{O}^{ \prime}_{d, d, l} \Big) \Big | \Big |_2 &\leq \mathcal{C} \sigma_2 \sqrt{\log{\frac{d}{\delta}} + pd} \\ \Big | \Big | V^{-1/2}_T \Big(\sum_{k=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{- \prime}_{l+d, d} \mathcal{O}^{\prime}_{0, d, d} \Big) \Big | \Big |_2 &\leq \mathcal{C} \sigma_3 \sqrt{\log{\frac{d}{\delta}} + pd} \\ \Big | \Big | V^{-1/2}_T \Big(\sum_{k=0}^{ T} \tilde{U}^{-}_{l+d, d} \tilde{w}^{+ \prime}_{l+1+d, d}\Big) \Big | \Big |_2 &\leq \mathcal{C} \sigma_4 \sqrt{\log{\frac{d}{\delta}} + pd} \end{align*} Here $\sigma = \max{(\sigma_1, \sigma_2, \sigma_3, \sigma_4)}$ where $$\sigma_1 \vee \sigma_3 \leq \sup_{||v||_2 = 1}\Big | \Big | \begin{bmatrix} v^{\top} CA^{d} & v^{\top} CA^{d-1} & v^{\top} CA^{d-2} & \hdots & 0 \\ 0 & \ddots & \ddots & \ddots & 0 \\ 0 & \ddots & \ddots & \ddots & \ddots \\ 0 & \hdots & v^{\top} CA^{d} & \hdots & v^{\top} C \end{bmatrix} \Big | \Big |_2 \leq \sum_{j=0}^d ||CA^j||_2 \leq \beta R \sqrt{d}$$ $\sigma_2 = \sqrt{\sigma(\sum_{k=1}^d \mathcal{T} \mathcal{O}_{d+k, T}^{\top}\mathcal{T} \mathcal{O}_{d+k, T})} \leq \beta R \sqrt{d}, \sigma_4 \leq \mathcal{C}$. \end{prop} By taking the intersection of all the aforementioned events for a fixed $\delta$ we then have with probability at least $1 - \mathcal{C} \delta$ \begin{align*} \Big | \Big | \hat{\mathcal{H}} - \mathcal{H}_{0, d, d} \Big | \Big |_2 &\leq \mathcal{C} \sigma \sqrt{\frac{1}{T}} \sqrt{pd + \log{\frac{d}{\delta}}} \end{align*} \begin{remark} \label{const_sigma} Although not exactly precise, $||\hat{\mathcal{H}} - \mathcal{H}_{0, d, d}||_2$ can be interpreted as the Hankel norm of the difference between $d$--FIR approximation of the original LTI system and its estimate. Recall that the Hankel norm of $M$ is the largest singular value of $\mathcal{H}_{0, \infty, \infty}(M)$ and is typically close to the $\mathcal{H}_{\infty}$--norm (See Proposition~\ref{sys_norm}). In Propositions~\ref{error_prob1}-\ref{error_prob3} $\sigma$ has $\sqrt{d}$ dependence (due to the upper bound), when in fact $\sigma$ does not scale as $d$. This can be seen by $||CA^dB|| =O(\rho^d)$ where $\rho = \rho(A)$ and since $\sigma \leq \sum_{k=0}^d||CA^kB||_2$ we do not have a dependence on $d$. We remark that following Theorem 1.2-1.3 in~\citep{tu2017non} this analysis is also tight and falls under the class of $\ell_{\infty}$-constrained input systems. The error, $\epsilon$, in~\citep{tu2017non} scales as $\epsilon \leq \sqrt{\frac{d \log{d}}{T}}$ which is what we obtain here. \end{remark} \section{Control and Systems Theory Preliminaries} \label{control-sys} \subsection{Sylvester Matrix Equation} \label{sylvester_section} Define the discrete time Sylvester operator $S_{A, B}: \mathbb{R}^{n \times n} \rightarrow \mathbb{R}^{n \times n}$ \begin{equation} \label{sylvester_operator} \mathcal{L}_{A, B}(X) = X - AXB \end{equation} Then we have the following properties for $\mathcal{L}_{A, B}(\cdot)$. \begin{prop} \label{sylvester_prop} Let $\lambda_i, \mu_i$ be the eigenvalues of $A, B$ then $\mathcal{L}_{A, B}$ is invertible if and only if for all $i, j$ \[ \lambda_i \mu_j \neq 1 \] \end{prop} Define the discrete time Lyapunov operator for a matrix $A$ as $\mathcal{L}_{A, A^{\prime}}(\cdot) = S^{-1}_{A, A^{\prime}}(\cdot)$. Clearly it follows from Proposition~\ref{sylvester_prop} that whenever $\lambda_{\max}(A) < 1$ we have that the $S_{A, A^{\prime}}(\cdot)$ is an invertible operator. Now let $Q \succeq 0$ then \begin{align} S_{A, A^{\prime}}(Q) &= X \nonumber \\ \implies X &= A XA^{\prime} + Q \nonumber \\ \implies X &= \sum_{k=0}^{\infty} A^k Q A^{\prime k} \label{x_sol} \end{align} Eq.~\eqref{x_sol} follows directly by substitution and by Proposition~\ref{sylvester_prop} is unique if $\rho(A) < 1$. Further, let $Q_1 \succeq Q_2 \succeq 0$ and $X_1, X_2$ be the corresponding solutions to the Lyapunov operator then from Eq.~\eqref{x_sol} that \begin{align*} X_1, X_2 &\succeq 0 \\ X_1 &\succeq X_2 \end{align*} \subsection{Properties of System Hankel matrix} \label{control_hankel} \begin{itemize} \item \textbf{Rank of system Hankel matrix}: For $M=(C, A, B) \in \mathcal{M}_n$, the system Hankel matrix, $\mathcal{H}_{0, \infty, \infty}(M)$, can be decomposed as follows: \begin{equation} \label{svd_hankel} \mathcal{H}_{0, \infty, \infty} (M)= \underbrace{\begin{bmatrix} C \\ CA \\ \vdots \\ CA^{d} \\ \vdots \end{bmatrix} }_{=\mathcal{O}} \underbrace{\begin{bmatrix} B & AB & \hdots & A^d B & \hdots \end{bmatrix}}_{=\mathcal{R}} \end{equation} It follows from definition that $\text{rank}(\mathcal{O}), \text{rank}(\mathcal{R}) \leq n$ and as a result $\text{rank}(\mathcal{O}\mathcal{R}) \leq n$. The system Hankel matrix rank, or $\text{rank}(\mathcal{O}\mathcal{R})$, which is also the model order(or simply order), captures the complexity of $M$. If $\text{SVD}(\mathcal{H}_{0, \infty, \infty}) = U \Sigma V^{\top}$, then $\mathcal{O} = U\Sigma^{1/2} S, \mathcal{R} = S^{-1} \Sigma^{1/2}V^{\top}$. By noting that \[ CA^{l}S = CS (S^{-1} A S)^{l}, S^{-1} A^l B = (S^{-1} A S)^{l} S^{-1}B \] we have obtained a way of recovering the system parameters (up to similarity transformations). Furthermore, $\mathcal{H}_{0, \infty, \infty}$ uniquely (up to similarity transformation) recovers $(C, A, B)$. \item \textbf{Mapping Past to Future}: $\mathcal{H}_{0, \infty, \infty}$ can also be viewed as an operator that maps ``past'' inputs to ``future'' outputs. In Eq.~\eqref{dt_lti} assume that $\{\eta_t, w_t\} = 0$. Then consider the following class of inputs $U_t$ such that $U_t = 0$ for all $t \geq T$ but $U_t$ may not be zero for $t < T$. Here $T$ is chosen arbitrarily. Then \begin{equation} \label{past-future} \underbrace{\begin{bmatrix} Y_{T} \\ Y_{T+1} \\ Y_{T+2} \\ \vdots \end{bmatrix}}_{\text{Future}} = \mathcal{H}_{0, \infty, \infty } \underbrace{\begin{bmatrix} U_{T-1} \\ U_{T-2} \\ U_{T-3} \\ \vdots \end{bmatrix}}_{\text{Past}} \end{equation} \end{itemize} \subsection{Model Reduction} \label{model_reduction} Given an LTI system $M = (C, A, B)$ of order $n$ with its doubly infinite system Hankel matrix as $\mathcal{H}_{0, \infty, \infty}$. We are interested in finding the best $k$ order lower dimensional approximation of $M$, \textit{i.e.}, for every $k < n$ we would like to find $M_k$ of model order $k$ such that $||M-M_k||_{\infty}$ is minimized. Systems theory gives us a class of model approximations, known as balanced truncated approximations, that provide strong theoretical guarantees (See~\cite{glover1984all} and Section 21.6 in~\cite{zhou1996robust}). We summarize some of the basics of model reduction below. Assume that $M$ has distinct Hankel singular values. Recall that a model $M=(C, A, B)$ is equivalent to $\tilde{M}=(CS, S^{-1}AS, S^{-1}B)$ with respect to its transfer function. Define \begin{align*} Q &= A^{\top}QA + C^{\top}C \\ P &= A P A^{\top} + BB^{\top} \end{align*} For two positive definite matrices $P, Q$ it is a known fact that there exist a transformation $S$ such that $S^{\top}QS = S^{-1}PS^{-1 \top} = \Sigma$ where $\Sigma$ is diagonal and the diagonal elements are decreasing. Further, $\sigma_i$ is the $i^{th}$ singular value of $\mathcal{H}_{0, \infty, \infty}$. Then let $\tilde{A} = S^{-1}AS, \tilde{C} = CS, \tilde{B} = S^{-1}B$. Clearly $\widetilde{M} = (\tilde{A}, \tilde{B}, \tilde{C})$ is equivalent to $M$ and we have \begin{align} \Sigma &= \tilde{A}^{\top}\Sigma \tilde{A} + \tilde{C}^{\top}\tilde{C} \nonumber\\ \Sigma &= \tilde{A} \Sigma \tilde{A}^{\top} + \tilde{B} \tilde{B}^{\top} \label{balanced} \end{align} Here $\tilde{C}, \tilde{A}, \tilde{B}$ is a balanced realization of $M$. \begin{prop} \label{balanced_realization} Let $\mathcal{H}_{0, \infty, \infty} = U \Sigma V^{\top}$. Here $\Sigma \succeq 0 \in \mathbb{R}^{n \times n}$. Then \begin{align*} \tilde{C} &= [U\Sigma^{1/2}]_{1:p, :} \\ \tilde{A} &= \Sigma^{-1/2}U^{\top} [U\Sigma^{1/2}]_{p+1:, :} \\ \tilde{B} &= [\Sigma^{1/2}V^{\top}]_{:, 1:m} \end{align*} The triple $(\tilde{C}, \tilde{A}, \tilde{B})$ is a balanced realization of $M$. For any matrix $L$, $L_{:, m:n}$ (or $L_{m:n, :}$) denotes the submatrix with only columns (or rows) $m$ through $n$. \end{prop} \begin{proof} Let the SVD of $\mathcal{H}_{0, \infty, \infty} = U \Sigma V^{\top}$. Then $M$ can constructed as follows: $U\Sigma^{1/2}, \Sigma^{1/2}V^{\top}$ are of the form \begin{align*} U \Sigma^{1/2} = \begin{bmatrix} C S \\ CA S\\ CA^2 S \\ \vdots \\ \end{bmatrix}, \Sigma^{1/2}V^{\top} = \begin{bmatrix} S^{-1} B & S^{-1} AB & S^{-1} A^2 B \hdots \end{bmatrix} \end{align*} where $S$ is the transformation which gives us Eq.~\eqref{balanced}. This follows because \begin{align*} \Sigma^{1/2} U^{\top} U \Sigma^{1/2} &= \sum_{k=0}^{\infty}S^{\top}A^{k \top}C^{\top} C A^k S \\ &= \sum_{k=0}^{\infty}S^{\top}A^{k \top}S^{-1 \top} S^{\top}C^{\top} CS S^{-1} A^k S \\ &= \sum_{k=0}^{\infty} \tilde{A}^{k \top} \tilde{C}^{\top} \tilde{C} \tilde{A}^k = \tilde{A}^{\top} \Sigma \tilde{A} + \tilde{C}^{\top} \tilde{C} = \Sigma \end{align*} Then $\tilde{C} = U\Sigma^{1/2}_{1:p, :}$ and \begin{align*} U\Sigma^{1/2} \tilde{A} &= [U\Sigma^{1/2}]_{p+1:, :} \\ \tilde{A} &= \Sigma^{-1/2}U^{\top}[U\Sigma^{1/2}]_{p+1:, :} \end{align*} We do a similar computation for $B$. \end{proof} It should be noted that a balanced realization $\tilde{C}, \tilde{A}, \tilde{B}$ is unique except when there are some Hankel singular values that are equal. To see this, assume that we have $$\sigma_1 > \ldots > \sigma_{r-1} > \sigma_r = \sigma_{r+1} = \ldots = \sigma_s > \sigma_{s+1} > \ldots \sigma_n$$ where $s-r >0$. For any unitary matrix $Q \in \mathbb{R}^{(s-r+1) \times (s-r+1)}$, define $Q_0$ \begin{equation} Q_0 = \begin{bmatrix} I_{(r-1) \times (r-1)} & 0 & 0\\ 0 & Q & 0 \\ 0 & 0 & I_{(n-s) \times (n-s)} \end{bmatrix} \label{transform_Q} \end{equation} Then every triple $(\tilde{C} Q_0, Q_0^{\top} \tilde{A} Q_0, Q_0^{\top} \tilde{B})$ satisfies Eq.~\eqref{balanced} and is a balanced realization. Let $M_k = (\tilde{C}_k, \tilde{A}_{kk}, \tilde{B}_k)$ where \begin{align} \tilde{A} = \begin{bmatrix} \tilde{A}_{kk} & \tilde{A}_{0k} \\ \tilde{A}_{k0} & \tilde{A}_{00} \end{bmatrix}, \tilde{B} = \begin{bmatrix} \tilde{B}_{k} \\ \tilde{B}_{0} \end{bmatrix}, \tilde{C} = \begin{bmatrix} \tilde{C}_{k} & \tilde{C}_{0} \label{k_balanced} \end{bmatrix} \end{align} Here $\tilde{A}_{kk}$ is the $k \times k$ submatrix and corresponding partitions of $\tilde{B}, \tilde{C}$. The realization $M_k = (\tilde{C}_k, \tilde{A}_{kk}, \tilde{B}_k)$ is the $k$--order balanced truncated model. Clearly $M \equiv M_n$ which gives us $\tilde{C} =\tilde{C}_{nn}, \tilde{A}=\tilde{A}_{nn}, \tilde{B}=\tilde{B}_{nn}$, \textit{i.e.}, the balanced version of the true model. We will show that for the balanced truncation model we only need to care about the top $k$ singular vectors and not the entire model. \begin{prop} \label{bt_model} For the $k$ order balanced truncated model $M_k$, we only need top $k$ singular values and singular vectors of $\mathcal{H}_{0, \infty, \infty}$. \end{prop} \begin{proof} From the preceding discussion in Proposition~\ref{balanced_realization} and Eq.~\eqref{k_balanced} it is clear that the first $p \times k$ block submatrix of $U\Sigma^{1/2}$ (corresponding to the top $k$ singular vectors) gives us $\tilde{C}_k$. Since $$\tilde{A} = \Sigma^{-1/2}U^{\top}[U\Sigma^{1/2}]_{p+1:, :}$$ we observe that $\tilde{A}_{kk}$ depend only on the top $k$ singular vectors $U_k$ and corresponding singular values. This can be seen as follows: $[U\Sigma^{1/2}]_{p+1:, :}$ denotes the submatrix of $U\Sigma^{1/2}$ with top $p$ rows removed. Now in $U\Sigma^{1/2}$ each column of $U$ is scaled by the corresponding singular value. Then the $\tilde{A}_{kk}$ submatrix depends only on top $k$ rows of $\Sigma^{-1/2}U^{\top}$ and the top $k$ columns of $[U\Sigma^{1/2}]_{p+1:, :}$ which correspond to the top $k$ singular vectors. \end{proof} \section{Invertibility of Sample Covariance matrix $V_T$} \section{Minimax Estimation} \label{appendix_minimax} The choice of model order is not known in many cases, we therefore emphasize a nonparametric approach to identification: one which adaptively selects the best model order for the given data length and approximates the underlying LTI system better as $T$ grows. The key to this approach will be designing an estimator $\hat{M}(Z_T)$ from which we obtain a realization $(\hat{C}, \hat{A}, \hat{B})$ of the selected order. The first step is to define a measure to quantify the quality of estimators. This measure is known as risk of an estimator. \begin{definition} \label{risk} Let $M$ be an unknown model that generates data $Z_T$ and $\hat{M} = \hat{M}(Z_T)$ be an estimator constructed from $Z_T$. Then the risk of $\hat{M}$ is defined as \begin{equation} \label{delta_risk} \mathcal{R}(\hat{M}, T; \mathcal{M}) = \sup_{M \in \mathcal{M}}\mathbb{E}_{Z_T}[||\hat{M} - M||_{*}] \end{equation} Here $||\cdot||_{*}$ is some predefined norm and $\mathcal{M} = \cup_{n < \infty} \mathcal{M}_n$. \end{definition} We know that $\mathcal{H}_{0, \infty, \infty}$ uniquely represents the LTI system $M$ where $M \in \mathcal{M}_n \Longleftrightarrow \text{rank}(\Hc_{0, \infty, \infty}) \leq n$ (See discussion in Section~\ref{control_hankel}). Then instead of focusing on arbitrary estimators for $M$, we focus on estimators of $\mathcal{H}_{0, \infty, \infty}$ and Eq.~\eqref{delta_risk} changes to \[ \mathcal{R}(\hat{\Hc}(Z_T), T; \mathcal{M}) = \sup_{M \in \mathcal{M}}\mathbb{E}_{Z_T}[||\hat{\mathcal{H}}(Z_T) - \mathcal{H}_{0, \infty, \infty}(M)||_{2}] \] Informally, $\hat{\Hc} = \hat{\Hc}(Z_T)$ is a doubly infinite matrix that estimates a map from ``past'' inputs to ``future'' outputs as in Eq.~\eqref{past-future}. In this context, one can define the minimax optimal estimator, $\hat{\Hc}^{*}$, \textit{i.e.}, an estimator from $T$ data points that satisfies \begin{equation} \label{minimax_optimal} \underbrace{\mathcal{R}^{*}(T; \mathcal{M})}_{\text{Minimax Risk}} = \inf_{\bar{\mathcal{H}}}\mathcal{R}(\bar{\mathcal{H}}, T; \mathcal{M}) = \mathcal{R}(\hat{\mathcal{H}}^{*}, T; \mathcal{M}) \end{equation} However, finding $\hat{\mathcal{H}}^{*}$ is rarely tractable. As a result, we will focus on ``order optimal'' estimators $\hat{M}_0$ which satisfy \begin{equation} \label{best_risk} \mathcal{R}(\hat{\mathcal{H}}_0, T; \mathcal{M}) \leq \mathcal{C} \mathcal{R}^{*}(T; \mathcal{M}) \hspace{3mm} \forall T > 0 \end{equation} for some universal constant $\mathcal{C} \geq 1$. The center of our algorithms will be designing an order optimal estimator. Our nonparametric approach will have two key features. \begin{itemize} \item The nonparametric approach compares $\hat{\Hc}$ against all models not falsified by data via $\mathcal{R}(\cdot, T; \mathcal{M})$ instead of the underlying true model. As a result, the ``approximate'' minimax optimal estimator for finite data, given by Eq.~\eqref{best_risk}, might not be close to $\Hc_{0, \infty, \infty}$ (and hence $M$), however, no other estimator can be better (up to factor $\mathcal{C}$) given finite data. \item To obtain an LTI system estimate, $\hat{M}$, from the input--output estimate $\hat{\Hc}$ one needs to determine the model order. We do not estimate the ``true order'' of the LTI system generating the data, rather provide a nonparametric method of \textit{model selection} for finite data. Ideally, we want that the selected model order be close to $r^{*}(T, \delta)$ defined as \begin{definition} \label{best_order} Fix $T > 0$ and $\delta > 0$. Let $M$ be an unknown model that generates data $Z_T$ and $\hat{\Hc}$ be an estimator of $\Hc_{0, \infty, \infty}$. Then $r^{*}(T, \delta) \in \mathbb{Z}_{+}$ is the largest $r$ such that \[ \inf_{\hat{\Hc}}\sup_{M \in \mathcal{M}_r} \mathbb{P}(r \neq \text{order}(\hat{M})) < \delta \] where $\hat{M}$ is the LTI system estimate obtained from $\hat{\Hc}$. \end{definition} For a fixed data length $T$ and error probability $\delta$, $r^{*}(T, \delta)$ indicates the largest order that can be identified (or approximated) with probability at least $1-\delta$. Let $r(T)$ be the selected model order. Since finding estimators where $r(T) = r^{*}(T, \delta)$ is hard, we instead desire \begin{equation} r(\mathcal{C} T) = r^{*}(T, \delta) \hspace{3mm} \forall T > 0 \label{minimax_order} \end{equation} for some universal constant $\mathcal{C}$. \end{itemize} \subsection{Objectives} The goal of this paper can then be summarized as follows: \begin{itemize} \item Characterize the function $\mathcal{R}^{*}(T; \mathcal{M})$ that measures the minimax risk. \item Characterize $r^{*}(T, \delta)$, \textit{i.e.}, the largest model order that can be identified reliably with $T$ data. \item Find a tractable estimator $\hat{\Hc}(Z_T)$ and $r(T)$ such that Eqs.~\eqref{best_risk} and \eqref{minimax_order} are satisfied. \end{itemize} We assume that $M$ lies in a $\beta$ $\mathcal{H}_{\infty}$--norm ball and is of (possibly very large) unknown order $n$. Let $M_k$ denote the best $k$--order approximation of the underlying model $M$ with $M_n = M$. Instead of learning the parameters of $M$ directly, the basis of our approach is to learn $M_k$ using $\hat{\Hc}(Z_T)$ where $k = r(T)$. Indeed as $T \rightarrow \infty$, we would like that $r(T) \rightarrow n$. We summarize the discussion in Fig.~\ref{roadmap}. In the figure $\hat{M}_k$ denotes the LTI system estimate of $M_k$ obtained from $\hat{\Hc}(Z_T)$. \begin{figure} \centering \includegraphics[width=0.6\linewidth]{images/beta_ball.pdf} \caption{Unknown model $M$ generates data $Z_T$. $M_k$ denotes the best $k$--order approximation of $M$. Goal is to construct $\hat{M}_k$ from estimator $\hat{\Hc}(Z_T)$, where $k=r(T)$, that is close to $M_k$.} \label{roadmap} \end{figure} \section{Miscellaneous Results} \label{misc} \begin{lem} \label{bound_toeplitz} For any $M = (C, A, B)$, we have that \[ ||\mathcal{B}^{v}_{T \times mT}|| = \sqrt{ \sigma\Big(\sum_{k=1}^d \mathcal{T}_{d+k, T}^{\top}\mathcal{T}_{d+k, T}\Big)} \] Here $\mathcal{B}^{v}_{T \times mT}$ is defined as follows: $\beta = \mathcal{H}_{d, d, T}^{\top} v = [\beta_1^{\top}, \beta_2^{\top}, \ldots, \beta_T^{\top}]^{\top}$. \begin{align*} \mathcal{B}^{v}_{T \times mT}= \begin{bmatrix} \beta_1^{\top} & 0 & 0& \ldots \\ \beta^{\top}_2 & \beta^{\top}_1 & 0 & \ldots\\ \vdots & \vdots & \ddots & \vdots \\ \beta_T^{\top} & \beta_{T-1}^{\top}& \ldots & \beta^{\top}_1 \end{bmatrix} \end{align*} and $||v||_2 = 1$. \end{lem} \begin{proof} For the matrix $\mathcal{B}^{v}$ we have \begin{align*} \mathcal{B}^{v} u &= \begin{bmatrix} \beta_1^{\top} u_1 \\ \beta_1^{\top} u_2 + \beta_2^{\top} u_1 \\ \beta_1^{\top} u_3 + \beta_2^{\top} u_2 + \beta_3^{\top} u_1 \\ \vdots \\ \beta_1^{\top} u_T + \beta_2^{\top} u_{T-1} + \ldots + \beta_T^{\top} u_1 \end{bmatrix} = \begin{bmatrix} v^{\top}\begin{bmatrix} CA^{d+1}B u_1 \\ CA^{d+2}B u_1 \\ \vdots \\ CA^{2d}B u_1 \end{bmatrix} \\ v^{\top}\begin{bmatrix} CA^{d+2}B u_1 + CA^{d+1}B u_2 \\ CA^{d+3}B u_1 + CA^{d+2}B u_2 \\ \vdots \\ CA^{2d+1}B u_1 + CA^{2d}B u_2 \end{bmatrix} \\ \vdots \\ v^{\top}\begin{bmatrix} CA^{T+d}B u_1 + \hdots + CA^{d+1}B u_T\\ CA^{T+d+2}B u_1 + \hdots + CA^{d+2}B u_T\\ \vdots \\ CA^{T+2d-1}B u_1 + \hdots + CA^{2d}B u_T \end{bmatrix} \end{bmatrix} \\ &= \mathcal{V} \begin{bmatrix} \begin{bmatrix} CA^{d+1}B u_1 \\ CA^{d+2}B u_1 \\ \vdots \\ CA^{2d}B u_1 \end{bmatrix} \\ \begin{bmatrix} CA^{d+2}B u_1 + CA^{d+1}B u_2 \\ CA^{d+3}B u_1 + CA^{d+2}B u_2 \\ \vdots \\ CA^{2d+1}B u_1 + CA^{2d}B u_2 \end{bmatrix} \\ \vdots \\ \begin{bmatrix} CA^{T+d}B u_1 + \hdots + CA^{d+1}B u_T\\ CA^{T+d+2}B u_1 + \hdots + CA^{d+2}B u_T\\ \vdots \\ CA^{T+2d-1}B u_1 + \hdots + CA^{2d}B u_T \end{bmatrix} \end{bmatrix}\\ &= \mathcal{V} \underbrace{\begin{bmatrix} CA^{d+1}B & 0 & 0 & \hdots & 0\\ CA^{d+2}B & 0 & 0 & \hdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots\\ CA^{2d}B & 0 & 0 & \hdots & 0 \\ CA^{d+2}B & CA^{d+1}B & 0 & \hdots & 0 \\ CA^{d+3}B & CA^{d+2}B & 0 & \hdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots\\ CA^{2d+1}B & CA^{2d}B & 0 & \hdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots\\ CA^{T+d-1}B & CA^{T+d}B & CA^{T+d-1}B & \hdots & CA^{d+1}B\\ CA^{T+d+2}B & CA^{T+d+1}B & CA^{T+d}B & \hdots & CA^{d+2}B\\ \vdots & \vdots & \vdots & \vdots & \vdots\\ CA^{T+2d-1}B & CA^{T+2d-1}B & CA^{T+2d-2}B & \hdots & CA^{2d}B\\ \end{bmatrix}}_{=S}\begin{bmatrix} u_1 \\ u_2 \\ \vdots \\ u_T \end{bmatrix} \end{align*} It is clear that $||\mathcal{V}||_2, ||u||_2 = 1$ and for any matrix $S$, $||S||$ does not change if we interchange rows of $S$. Then we have \begin{align*} || S ||_2 &= \sigma\Bigg(\begin{bmatrix} CA^{d+1}B & 0 & 0 & \hdots & 0\\ CA^{d+2}B & CA^{d+1}B & 0 & \hdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots\\ CA^{T+d+1}B & CA^{T+d}B & CA^{T+d-1}B & \hdots & CA^{d+1}B\\ CA^{d+2}B & 0 & 0 & \hdots & 0 \\ CA^{d+3}B & CA^{d+2}B & 0 & \hdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots\\ CA^{T+d+2}B & CA^{T+d+1}B & CA^{T+d}B & \hdots & CA^{d+2}B\\ \vdots & \vdots & \vdots & \vdots & \vdots\\ CA^{2d}B & 0 & 0 & \hdots & 0 \\ CA^{2d+1}B & CA^{2d}B & 0 & \hdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots\\ CA^{T+2d-1}B & CA^{T+2d-1}B & CA^{T+2d-2}B & \hdots & CA^{2d}B\\ \end{bmatrix}\Bigg) \\ &= \sigma \Bigg(\begin{bmatrix} \mathcal{T}_{d+1, T} \\ \mathcal{T}_{d+2, T} \\ \vdots \\ \mathcal{T}_{2d, T} \end{bmatrix}\Bigg) = \sqrt{ \sigma\Big(\sum_{k=1}^d \mathcal{T}_{d+k, T}^{\top}\mathcal{T}_{d+k, T}\Big)} \end{align*} \end{proof} \begin{prop}[Lemma 4.1~\cite{simchowitz2018learning}] \label{conditional_net} Let $S$ be an invertible matrix and $\kappa(S)$ be its condition number. Then for a $\frac{1}{4 \kappa}$--net of $\mathcal{S}^{d-1}$ and an arbitrary matrix $A$, we have \[ ||SA||_2 \leq 2 \sup_{v \in {\mathcal{N}}_{\frac{1}{4\kappa}}} \frac{||v^{\prime} A||_2}{||v^{\prime} S^{-1}||_2} \] \end{prop} \begin{proof} For any vector $v \in {\mathcal{N}}_{\frac{1}{4 \kappa}}$ and $w$ be such that $||SA||_2 = \frac{||w^{\prime} A||_2}{||w^{\prime} S^{-1}||_2}$ we have \begin{align*} ||SA||_2 - \frac{||v^{\prime} A||_2}{||v^{\prime} S^{-1}||_2} &\leq \Big |\frac{||w^{\prime} A||_2}{||w^{\prime} S^{-1}||_2} - \frac{||v^{\prime} A||_2}{||v^{\prime} S^{-1}||_2}\Big | \\ &= \Big | \frac{||w^{\prime} A||_2}{||w^{\prime} S^{-1}||_2} - \frac{||v^{\prime} A||_2}{||w^{\prime} S^{-1}||_2} + \frac{||v^{\prime} A||_2}{||w^{\prime} S^{-1}||_2} - \frac{||v^{\prime} A||_2}{||v^{\prime} S^{-1}||_2} \Big | \\ &\leq ||SA||_2 \frac{\frac{1}{4 \kappa}||S^{-1}||_2}{||w^{\prime}S^{-1}||_2} + ||SA||_2\Big | \frac{||v^{\prime}S^{-1}||_2}{||w^{\prime}S^{-1}||_2} - 1 \Big | \\ &\leq \frac{||SA||_2}{2} \end{align*} \end{proof} \section{Model Selection Results} \label{appendix_model_select} \subsection{Proof of Theorem~\ref{balanced_truncation}: Normalized Gap is known} \label{gap_known} Define $f(T)$ as follows $f(T) = \kappa \mathcal{C} R \sqrt{\hd} \sqrt{\frac{p\hd + \log{\frac{T}{\delta}}}{T}}$ where $\hd$ is the chosen according to Algorithm~\ref{alg:d_choice}. Note that $f(T)$ is purely data dependent. Recall the cutoff rule in Algorithm~\ref{alg:k_choice} is \begin{align} \tau(\Delta_{+}) = \frac{\kappa \mathcal{C} R \sqrt{\hd}}{\Delta_{+}} \sqrt{\frac{p\hd+\log{\frac{T}{\delta}}}{T}} = \frac{f(T)}{\Delta_+} \nonumber \end{align} Then we find $k$ \begin{equation} k = \sup \Bigg\{l \Big | \hspace{2mm} \frac{\sigma_l(\hat{\mathcal{H}}_{0, \hd, \hd})}{\beta} \geq 4\tau(\Delta_{+}) \Bigg\} = \sup \Bigg\{l \Big | \hspace{2mm}\frac{\Delta_+}{4} \geq \frac{\beta f(T)}{\sigma_l(\hat{\mathcal{H}}_{0, \hd, \hd})}\Bigg\} \label{cutoff_app} \end{equation} We will show that if $k$ is chosen as above then the singular values of $\mathcal{H}_{0, \infty, \infty}$ and $\mathcal{H}_{0, \hd, \hd}$ interlace. \begin{prop} \label{consistent_selection} Let $\Delta_{+} > 0$ be a known constant such that \[ \Delta_+ \leq \inf_{i \leq n} \Big(1 - \frac{\sigma_{i+1}}{\sigma_i} \Big) \] where $\sigma_i$ are the singular values of $\mathcal{H}_{0, \infty, \infty}$ and $\sigma_{n+1} = 0$. Let $T \geq T^{(\kappa)}_{*}(\delta)$, $\hat{\mathcal{H}}_{0, \hd, \hd}$ be the output of Line $3$ of Algorithm~\ref{alg:learn_ls} where $\hd$ is chosen as Algorithm~\ref{alg:d_choice}. If $\hat{\sigma}_i$ are the singular values of $\hat{\mathcal{H}}_{0, \hd, \hd}$ and $k$ is chosen according to Algorithm~\ref{alg:k_choice}, then for all $i \leq k$ \begin{align*} \hat{\sigma}_{i}\Big( 1 - \frac{\Delta_+}{4} \Big) &> {\sigma}_{i} > \hat{\sigma}_{i}\Big(1 + \frac{ \Delta_+}{4} \Big) \\ \sigma_{i-1} - \frac{\sigma_i \Delta_+}{2} &> \hat{\sigma}_{i} > \sigma_{i+1} + \frac{\sigma_i \Delta_+}{2} \end{align*} with probability at least $1-\delta$. \end{prop} \begin{proof} Recall $||\mathcal{H}_{0, \infty, \infty} - \hat{\mathcal{H}}_{0, \hd, \hd}|| \leq \beta f(T)$ from Theorem~\ref{hankel_est_thm}. Then $$|\sigma_i - \hat{\sigma}_i| \leq \beta f(T) \implies \hat{\sigma}_i\Big|\frac{\sigma_i}{\hat{\sigma}_i} - 1 \Big| \leq \beta f(T) \implies \Big|\frac{\sigma_i}{\hat{\sigma}_i} - 1 \Big| \leq \frac{\beta f(T)}{ \hat{\sigma}_i}$$ Algorithm~\ref{alg:k_choice} ensures that for every $r \leq k$, $\frac{\beta f(T)}{ \hat{\sigma}_r} \leq \frac{\Delta_+}{4}$ \[ \hat{\sigma}_r \Big(1 - \frac{\Delta_+}{4} \Big) < \sigma_r < \hat{\sigma}_r \Big(1 + \frac{\Delta_+}{4} \Big) \] Then for every $r \leq k$ we have \begin{align} \hat{\sigma}_r \Big(1 - \frac{\Delta_{+}}{4}\Big) &\leq \sigma_r \leq \hat{\sigma}_r \Big(1 + \frac{\Delta_{+}}{4}\Big) \nonumber \\ \sigma_r \Big(1 - \frac{\Delta_{+}}{4}\Big)^{-1} &\geq \hat{\sigma}_{r}, \sigma_r \Big(1 + \frac{\Delta_{+}}{4}\Big)^{-1} \leq \hat{\sigma}_{r} \label{sig_diff} \end{align} Since $\Delta_{+} \leq 1$ we have that $\Big(1 - \frac{\Delta_{+}}{4}\Big)^{-1} < \Big(1 + \frac{\Delta_{+}}{2}\Big)$ and $\Big(1 + \frac{\Delta_{+}}{4}\Big)^{-1} > \Big(1 - \frac{\Delta_{+}}{2}\Big)$. Combining this to Eq.~\eqref{sig_diff} we get \begin{align} \sigma_r \Big(1 - \frac{\Delta_{+}}{2}\Big) &\leq \hat{\sigma}_r \leq \sigma_r \Big(1 + \frac{\Delta_{+}}{2}\Big) \nonumber \\ {\sigma}_{r+1} + \frac{\sigma_r \Delta_{+}}{2} &< \hat{\sigma}_r < \sigma_{r-1} - \frac{\sigma_r \Delta_{+}}{2} \label{interlacing} \end{align} Eq.~\eqref{interlacing} ensures that we have the required interlacing property for Propositions~\ref{gen_wedin}--\ref{eigenspace_distance}. \end{proof} \begin{prop} \label{prop_known_delta} Let $\mathcal{H}_{0, \infty, \infty} = U \Sigma V^{\top}, \hat{\Hc}_{0, \hd, \hd} = \hat{U} \hat{\Sigma} \hat{V}^{\top}$ and $$||\mathcal{H}_{0, \infty, \infty} - \hat{\Hc}_{0, \hd, \hd}|| \leq \epsilon = \beta \kappa \mathcal{C} R \sqrt{\hd} \sqrt{\frac{p\hd + \log{\frac{T}{\delta}}}{T}}$$ Then if $k$ is chosen as Algorithm~\ref{alg:k_choice} then \begin{align*} ||[\Sigma^{1/2}V^{\top}]_{1:k, 1:m} -[\hat{\Sigma}^{1/2}\hat{V}^{\top}]_{1:k, 1:m}||_2 &\leq \beta \kappa \mathcal{C} R \sqrt{\hd} \sqrt{\frac{p\hd + \log{\frac{T}{\delta}}}{T}} \frac{\sqrt{\Gamma_k}}{\Delta_+ \sqrt{\sigma_k}} \\ ||[U\Sigma^{1/2}]_{1:p, 1:k} - [\hat{U}\hat{\Sigma}^{1/2}]_{1:p, 1:k}||_2 &\leq \beta \kappa \mathcal{C} R \sqrt{\hd} \sqrt{\frac{p\hd + \log{\frac{T}{\delta}}}{T}} \frac{\sqrt{\Gamma_k}}{\Delta_+ \sqrt{\sigma_k}} \end{align*} \[ ||\Sigma_{1:k, 1:k}^{-1/2}U_{:, 1:k}^{\top} [U\Sigma^{1/2}]_{p+1:, 1:k} - \hat{\Sigma}_{1:k, 1:k}^{-1/2}\hat{U}_{:, 1:k}^{\top} [\hat{U}\hat{\Sigma}^{1/2}]_{p+1:, 1:k}||_2 \leq \beta (\gamma + 1) \kappa \mathcal{C} R \sqrt{\frac{p\hd^2 \Gamma_k + \hd \Gamma_k \log{\frac{T}{\delta}}}{\sigma^2_k \Delta_+^2 T}} \] where $\Gamma_k = \min{(\frac{1}{\Delta_+}, k)}$. \end{prop} \begin{proof} We can use Propositions~\ref{reduction2}--\ref{A_err} because the singular values of $\hat{\Hc}_{0, \hd, \hd}$ are order correctly as shown in Proposition~\ref{consistent_selection}. In Propositions~\ref{reduction2}--\ref{A_err} and Corollary~\ref{subspace_reduction_cor} set $S = \mathcal{H}(\mathcal{H}_{0, \infty, \infty}), P = \mathcal{H}(\hat{\Hc}_{0, \hd, \hd})$, where $\mathcal{H}(M)$ of matrix $M$ is its Hermitian dilation. The subspace results for Hermitian dilation is identical to that of the original matrix (See Remark~\ref{hermitian_comment}). From Proposition~\ref{consistent_selection} it is clear that $\frac{3}{4} \hat{\sigma}_r \leq \sigma_r \leq \frac{5}{4} \hat{\sigma}_r$ for $r \leq k$. As a result we replace $\sigma_k \rightarrow \hat{\sigma}_k$ in the bounds at the cost of a constant close to $1$. \end{proof} \subsection{Proof of Theorem~\ref{balanced_truncation}: Normalized Gap is unknown} \label{gap_unknown} The discussion in the previous section does not require that the singular values be unequal for our results to apply. In fact, our results apply when all the singular values are equal. In this case we define $\Delta_{+}$ differently. Let $\sigma_{n+1} = 0$, then \begin{equation} \Delta_{+} = \inf_{\sigma_i \neq \sigma_{i+1}} \Big(1 - \frac{\sigma_{i+1}}{\sigma_i}\Big)\label{delta_eq} \end{equation} For this case $\Delta_+$ is defined over the unequal singular values and it is the minimum over the cases when a gap exists. For example: if $\sigma_1 = 1, \sigma_2 = 1, \sigma_3 = 1/2$ and $\sigma_4 = 0$ then in this case $\Delta_{+} = 1/2$. The reasons our results hold because $\sigma_1 = \sigma_2$ and both of these can be recovered equally easily -- further the learning both singular vectors up to a unitary transformation suffices (See Eq.~\eqref{transform_Q} and its following discussion). However, when $\Delta_{+}$ is unknown it is unclear how one can apply the threshold rule in Eq.~\eqref{cutoff_app}. In that case define, for $0 < \delta < 1$, \begin{align} \tau(\delta) = \frac{\kappa \mathcal{C} R \sqrt{\hd}}{\delta} \sqrt{\frac{p\hd+\log{\frac{T}{\delta}}}{T}} = \frac{f(T)}{\delta} \nonumber \\ k(\delta) = \sup \Bigg\{l \Big | \hspace{2mm} \frac{\sigma_l(\hat{\mathcal{H}}_{0, d, d})}{\beta} \geq 4\tau(\delta) \Bigg\} = \sup \Bigg\{l \Big | \hspace{2mm}\frac{\sigma_l(\hat{\mathcal{H}}_{0, d, d})\delta}{4} \geq \beta f(T)\Bigg\} \label{beta_cutoff} \end{align} The question then is: what is the optimal choice of $\delta$? To answer this consider the following example: let there be three singular vectors $\{\hat{u}_i\}_{i=1}^3$ that are selected by the threshold rule in Eq.~\eqref{beta_cutoff} ($\{u_i\}_{i=1}^3$ are the true singular vectors). Define $\Delta_{i, i+1} = 1 - \frac{\sigma_{i+1}}{\sigma_{i}}$. Then we have \begin{itemize} \item If $\delta < \Delta_{1, 2}, \Delta_{2, 3}$ then $\{u_i\}_{i=1}^3$ are close to $\{\hat{u}_i\}_{i=1}^3$ and correctly recovered. \item If $\delta < \Delta_{1, 2}, \delta > \Delta_{2, 3}$ then $u_1$ is correctly recovered but $\hat{u}_2, \hat{u}_3$ may not be close to $u_2, u_3$ (they might be flipped). \end{itemize} \begin{prop} \label{prop_delta_unknown} Let $\mathcal{H}_{0, \infty, \infty} = U \Sigma V^{\top}, \hat{\Hc}_{0, \hd, \hd} = \hat{U} \hat{\Sigma} \hat{V}^{\top}$ and $$||\mathcal{H}_{0, \infty, \infty} - \hat{\Hc}_{0, \hd, \hd}|| \leq \epsilon = \beta \kappa \mathcal{C} R \sqrt{\hd} \sqrt{\frac{p\hd + \log{\frac{T}{\delta}}}{T}}$$ If $\Delta_+$ is unknown and $k$ is chosen according to Algorithm~\ref{alg:k_choice} we have \[ ||(C_k, A_k, B_k) - (\hat{C}_k, \hat{A}_k, \hat{B}_k)||_2 \leq \beta \mathcal{C} \sqrt{\frac{\kappa R }{\hat{\sigma}^2_k k}} \Bigg(\frac{p\hat{d}^2+\hd \log{\frac{T}{\delta}}}{T}\Bigg)^{1/4}(1 \vee \sqrt{\hat{\sigma}_k}) \] \end{prop} \begin{proof} If $\hat{U} \hat{\Sigma} \hat{V}^{\top} = \text{SVD}(\hat{\Hc}_{0, \hd, \hd})$ and ${U} {\Sigma} {V}^{\top} = \text{SVD}(\Hc_{0, \infty, \infty})$ there exists an unknown block diagonal unitary matrix $Q$ such that \[ [\hat{U}_1, \hat{U}_2, \ldots, \hat{U}_l] \underbrace{\begin{bmatrix} Q_1 & 0 & \ldots & 0 \\ 0 & Q_2 & \ldots & 0 \\ \vdots & \vdots & \ddots & 0 \\ 0 & 0 & \ldots & Q_l \\ \end{bmatrix}}_{=Q} \approx [U_1, U_2, \ldots, U_l] \] Each block $Q_i$ corresponds to a orthogonal matrix. Inside each block the normalized gap is less than $\delta$. On the other hand, the normalized gap across blocks is greater than $\delta$. $Q_l$ has the property that $\hat{U}_l Q_l = U_l$ and $\hat{U}_l^{\top}U_j$ (where $j \neq l$)` can be upper bounded by Proposition~\ref{gen_wedin}. \\ Since $[U\Sigma^{1/2}]_{1:m, 1:k}Q = B_k Q, Q^{\top}\Sigma_{1:k, 1:k}^{-1/2}U_{:, 1:k}^{\top} [U\Sigma^{1/2}]_{p+1:, 1:k}Q = Q^{\top} A_k Q, Q^{\top}[\Sigma^{1/2}V^{\top}]_{1:k, 1:p} = Q^{\top} C_k$ is equivalent to $B_k, A_k, C_k$, \textit{i.e.}, the balanced truncated model of order $k$. The goal is to find the error between $UQ^{\top}\Sigma^{1/2}$ and $U\Sigma^{1/2}Q^{\top}$ (correspondingly we get $\Sigma^{1/2} Q V^{\top}, Q \Sigma^{1/2} V^{\top} $), this follows from \begin{equation*} ||\hat{U} \hat{\Sigma}^{1/2} - {U} {\Sigma}^{1/2} Q^{\top}|| \leq \underbrace{||\hat{U} \hat{\Sigma}^{1/2} - U Q^{\top}\Sigma^{1/2}||}_{\text{Prop.}~\ref{reduction2}} + \underbrace{|| U Q^{\top}\Sigma^{1/2} - U\Sigma^{1/2}Q^{\top}||}_{\text{Error due to wrong gap}} \end{equation*} Define $\bar{\Sigma}$ as the the diagonal matrix where the $j^{th}$ block has same entries on its diagonal $\bar{\sigma}_j = \frac{\sum_{i=1}^m \sigma_i^{(j)}}{m}$ where $\sigma_i^{(j)}$ is the $i^{th}$ singular value corresponding to the $j^{th}$ block in $\Sigma$. Then $Q^{\top} \bar{\Sigma}^{1/2} = \bar{\Sigma}^{1/2}Q^{\top}$. Recall in this block the normalized gap is $\leq \delta$ and consequently if $\{\sigma_i^{(j)} \}_{j=1}^m$ are ordered then \begin{equation} \sigma_i^{(j)} \geq (1 - \delta)\sigma_i^{(j-1)}, \bar{\sigma}_j \geq \sigma_1^{(j)}\frac{1 - (1 - \delta)^{m}}{m\delta} \label{delta0_choice} \end{equation} We are in a position to upper bound the error term due to wrong gap \begin{align*} || U Q^{\top}\Sigma^{1/2} - U\Sigma^{1/2}Q^{\top}|| &\leq || U Q^{\top}\Sigma^{1/2} - U Q^{\top}\bar{\Sigma}^{1/2}|| + ||U \bar{\Sigma}^{1/2}Q^{\top} - U\Sigma^{1/2}Q^{\top}|| \\ &\leq 2 ||\bar{\Sigma}^{1/2} - \Sigma^{1/2}|| \end{align*} An immediate observation from Eq.~\eqref{delta0_choice} is that \[ \sup_{1 \leq i \leq m}|\sqrt{\bar{\sigma}_j }- \sqrt{\sigma_i^{(j)}}| \leq \sqrt{\sigma_1^{(j)}} \sqrt{1 - \frac{1 - (1-\delta)^{m}}{m \delta}} \leq \mathcal{C} \sqrt{\sigma_1^{(j)}} {m \delta} \leq \mathcal{C} \sqrt{\beta}{k \delta} \] and the additional error incurred is \begin{equation} || U Q^{\top}\Sigma^{1/2} - U\Sigma^{1/2}Q^{\top}|| \leq \mathcal{C} \sqrt{\beta}{k \delta} \label{additional_err} \end{equation} Now this additional error can be plugged in along with our analysis in Propositions~\ref{reduction2}--\ref{A_err} and the total error is \begin{align*} ||\hat{U} \hat{\Sigma}^{1/2} - {U} {\Sigma}^{1/2} Q^{\top}|| &\leq ||\hat{U} \hat{\Sigma}^{1/2} - U Q^{\top}\Sigma^{1/2}|| + || U Q^{\top}\Sigma^{1/2} - U\Sigma^{1/2}Q^{\top}|| \\ &\leq ||\hat{U} \hat{\Sigma}^{1/2} - U Q^{\top}\Sigma^{1/2}|| + \mathcal{C} \sqrt{\beta}{k \delta} \end{align*} Next we analyze the following term \begin{equation} ||\hat{U} \hat{\Sigma}^{1/2} - U Q^{\top}\Sigma^{1/2}|| \underbrace{\leq}_{\text{Prop.}~\ref{reduction}} \underbrace{||\hat{\Sigma}^{1/2} - \Sigma^{1/2}||}_{\leq \frac{C \epsilon}{\sqrt{\sigma_k}}} + \underbrace{\mathcal{C}\sqrt{\frac{k}{\sigma_k \delta^2}}\epsilon}_{\text{Cor.}~\ref{subspace_reduction_cor}} \end{equation} where $||\hat{\Hc}_{0, \hd, \hd} - \mathcal{H}_{0, \infty, \infty}||_2 = \epsilon$. Then the error is \begin{align} ||\hat{U} \hat{\Sigma}^{1/2} - {U} {\Sigma}^{1/2} Q^{\top}|| &\leq \frac{\mathcal{C} \epsilon}{\sqrt{\sigma_k}} + \mathcal{C} \sqrt{\beta}{k \delta} + \mathcal{C}\sqrt{\frac{k}{\sigma_k \delta^2}}\epsilon \nonumber \\ &\leq \frac{\mathcal{C} \epsilon}{\sqrt{\sigma_k}} + \mathcal{C}\Big(\sqrt{\frac{\beta}{\sigma_k k}}\Big)\sqrt{\epsilon} \label{final_ub} \end{align} where Eq.~\eqref{final_ub} is obtained by $\delta = \Big(\sqrt{\frac{1}{\beta \sigma_k k}} \Big)^{1/2} \sqrt{\epsilon} = \Big(\sqrt{\frac{1}{\beta \sigma_k k}} \Big)^{1/2} \sqrt{\beta f(T)}$. Then $$\tau(\delta) = \sqrt{f(T)}\Big(\frac{k \sigma_k}{\beta}\Big)^{1/4}$$ and the error for $||A_k - \hat{A}_k||_2$ follows in a similar fashion to Proposition~\ref{A_err}. Similar fashion to Proposition~\ref{prop_known_delta} it is clear that $\frac{3}{4} \hat{\sigma}_r \leq \sigma_r \leq \frac{5}{4} \hat{\sigma}_r$ for $r \leq k$. As a result we replace $\sigma_k \rightarrow \hat{\sigma}_k$ in the bounds at the cost of a constant close to $1$. \end{proof} \section{Probabilistic Inequalities} \label{prob_ineq} \begin{prop}[\cite{vershynin2010introduction}] \label{eps_net} We have for any $\epsilon < 1$ and any $w \in \mathcal{S}^{d-1}$ that \[ \mathbb{P}(||M|| > z) \leq (1 + 2/\epsilon)^d \mathbb{P}(||Mw|| > \frac{z}{(1-\epsilon)}) \] \end{prop} Proposition~\ref{eps_net} helps us in using the tools developed in de la Pena et. al. and~\cite{abbasi2011improved} for self--normalized martingales. \begin{thm}[Hanson--Wright Inequality] \label{hanson-wright} Given a subGaussian vector $X=(X_1, X_2, \ldots, X_n) \in \mathbb{R}^n$ with $\sup_i ||X_i||_{\psi_2}\leq K$. Then for any $B \in \mathbb{R}^{n \times n}$ and $t \geq 0$ \[ \Pr(|X^{\prime} B X - \mathbb{E}[X^{\prime} B X]| \leq t) \leq 2 \exp\Bigg\{- c \min{\Big(\frac{t}{K^2 ||B||}, \frac{t^2}{K^4 ||B||^2_{HS}}\Big)}\Bigg\} \] \end{thm} \section{Subspace Perturbation Results} \label{subspace-perturb-results} In this section we present variants of the famous Wedin's theorem (Section 3 of~\cite{wedin1972perturbation}) that depends on the distribution of Hankel singular values. These will be ``sign free'' generalizations of the gap--Free Wedin Theorem from~\cite{allen2016lazysvd}. First we define the Hermitian dilation of a matrix. \begin{align*} \mathcal{H}(S) = \begin{bmatrix}0 & S \\ S^{\prime} & 0 \end{bmatrix} \end{align*} The Hermitian dilation has the property that $||S_1 - S_2|| \leq \epsilon \Longleftrightarrow ||\mathcal{H}(S_1) - \mathcal{H}(S_2)|| \leq \epsilon$. Hermitian dilations will be useful in applying Wedin's theorem for general (not symmetric) matrices. \begin{prop} \label{sin_theta_thm} Let $S, \hat{S}$ be symmetric matrices and $||S - \hat{S}|| \leq \epsilon$. Further, let $v_j, \hat{v}_j$ correspond to the $j^{th}$ eigenvector of $S, \hat{S}$ respectively such that $\lambda_1 \geq \lambda_2 \geq \ldots \geq \lambda_n$ and $\hat{\lambda}_1 \geq \hat{\lambda}_2 \geq \ldots \geq \hat{\lambda}_n$. Then we have \begin{equation} \label{sin_thm} |\langle v_j, \hat{v}_k \rangle| \leq \frac{\epsilon}{{|\lambda_{j} - \hat{\lambda}_{k}|}} \end{equation} if either $\lambda_j$ or $\hat{\lambda}_{k}$ is not zero. \end{prop} \begin{proof} Let $S = \lambda_j v_j v_j^{\prime} + V \Lambda_{-j} V^{\prime}$ and $\hat{S} = \hat{\lambda}_k \hat{v}_k \hat{v}_k^{\prime} + \hat{V} \hat{\Lambda}_{-k} \hat{V}^{\prime}$, wlog assume $|\lambda_j| \leq |\hat{\lambda}_k|$. Define $R = S- \hat{S}$ \begin{align*} S &= \hat{S} + R \\ v_j^{\prime} S \hat{v}_k &= v_j^{\prime}\hat{S}\hat{v}_k + v_j^{\prime}R\hat{v}_k \end{align*} Since $v_j, \hat{v}_k$ are eigenvectors of $S$ and $\hat{S}$ respectively. \begin{align*} \lambda_j v_j^{\prime}\hat{v}_k &= \hat{\lambda}_k v_j^{\prime}\hat{v}_k + v_j^{\prime}R\hat{v}_k \\ |\lambda_j - \hat{\lambda}_k||v_j^{\prime}\hat{v}_k| &\leq \epsilon \end{align*} \end{proof} Proposition~\ref{sin_theta_thm} gives an eigenvector subjective Wedin's theorem. Next, we show how to extend these results to arbitrary subsets of eigenvectors. \begin{prop} \label{gen_wedin} For $\epsilon > 0$, let $S, P$ be two symmetric matrices such that $||S-P||_2 \leq \epsilon$. Let \[ S= U \Sigma^S U^{\top}, P= V \Sigma^P V^{\top} \] Let $V_+$ correspond to the eigenvectors of singular values $\geq \beta$, $V_{-}$ correspond to the eigenvectors of singular values $\leq \alpha$ and $\bar{V}$ are the remaining ones. Define a similar partition for $S$. Let $\alpha < \beta$ \begin{align*} ||U_{-}^{\top} V_{+}|| &\leq \frac{\epsilon}{\beta - \alpha} \end{align*} \end{prop} \begin{proof} The proof is similar to before. $S, P$ have a spectral decomposition of the form \begin{align*} S &= U_+ \Sigma^S_+ U_+^{\prime} + U_{-} \Sigma^S_{-} U_{-}^{\prime} + \bar{U}{\Sigma^S}_0 \bar{U}^{\prime} \\ P &= V_+ \Sigma^P_+ V_+^{\prime} + V_{-} \Sigma^P_{-} V_{-}^{\prime} + \bar{V}{\Sigma^P}_0 \bar{V}^{\prime} \end{align*} Let $R=S-P$ and since $U_+$ is orthogonal to $U_{-}, \bar{U}$ and similarly for $V$ \begin{align*} U_{-}^{\prime}S &= \Sigma^S_{-} U_{-}^{\prime} = U_{-}^{\prime}P + U_{-}^{\prime} R \\ \Sigma^S_{-} U_{-}^{\prime} V_{+} &= U_{-}^{\prime}V_{+}\Sigma^P_{+} + U_{-}^{\prime} R V_{+} \end{align*} Diving both sides by $\Sigma^P$ \begin{align*} \Sigma^S_{-} U_{-}^{\prime} V_{+} (\Sigma^P_+)^{-1} &= U_{-}^{\prime}V_{+} + U_{-}^{\prime} R V_{+} (\Sigma^P_+)^{-1} \\ ||\Sigma^S_{-} U_{-}^{\prime} V_{+} (\Sigma^P_+)^{-1}|| &\geq ||U_{-}^{\prime}V_{+}|| - ||U_{-}^{\prime} R V_{+} (\Sigma^P_+)^{-1}|| \\ \frac{\alpha}{\beta}||U_{-}^{\prime} V_{+}|| &\geq ||U_{-}^{\prime}V_{+}|| - \frac{\epsilon}{\beta} \\ ||U_{-}^{\prime} V_{+}|| &\leq \frac{\epsilon}{\beta - \alpha} \end{align*} \end{proof} Let $S_k, P_k$ be the best rank $k$ approximations of $S, P$ respectively. We develop a sequence of results to see how $||S_k - P_k||$ varies when $||S-P|| \leq \epsilon$ as a function of $k$. \begin{prop} \label{eigenspace_distance} Let $S, P$ be such that \[ ||S-P|| \leq \epsilon \] Let the singular values of $S$ be arranged as follows: \begin{equation*} \sigma_1(S) > \ldots > \sigma_{r-1}(S) > \sigma_r(S) = \sigma_{r+1}(S) = \ldots = \sigma_s(S) > \sigma_{s+1}(S) > \ldots \sigma_n(S) > \sigma_{n+1}(S) = 0 \end{equation*} Furthermore, if for every $i \leq r-1$ we have \begin{equation} \sigma_{i-1}(S) > \sigma_i(P) > \sigma_{i+1}(S) \hspace{1.5mm} \text{ and } \hspace{1.5mm} \sigma_{s+1}(P) < \sigma_s(S) \label{interlacing_ppt} \end{equation} then let $U_j^{S}, V^{S}_j$ be the left and right singular vectors corresponding to $\sigma_j$. There exists a unitary transformation $Q$ such that \begin{align*} \sigma_{\max}([U_r^{P}, \ldots, U_s^{P}]Q - [U_r^{S}, \ldots, U_s^{S}]) &\geq \frac{2\epsilon}{\min{\Big(\sigma_{r-1}(P) - \sigma_r(S), \sigma_{s}(S) - \sigma_{s+1}(P)\Big)}} \\ \sigma_{\max}( [V_r^{P}, \ldots, V_s^{P}]Q- [V_r^{S}, \ldots, V_s^{S}]) &\geq \frac{2\epsilon}{\min{\Big(\sigma_{r-1}(P) - \sigma_r(S), \sigma_{s}(S) - \sigma_{s+1}(P)\Big)}} \end{align*} whenever $\epsilon \leq \frac{\sigma_s \Delta_+}{2}$ where $\Delta_+ = \min_{\sigma_i \neq \sigma_{i+1}} \Big(1 - \frac{\sigma_{i+1}}{\sigma_i}\Big)$. \end{prop} \begin{proof} Let $r \leq k \leq s$. First divide the indices $[1, n]$ into 3 parts $K_1 = [1, r-1], K_2 = [r, s], K_3 = [s+1, n]$. Although we focus on only three groups extension to general case will be a straight forward extension of this proof. Define the Hermitian dilation of $S, P$ as $\mathcal{H}(S), \mathcal{H}(P)$ respectively. Then we know that the eigenvalues of $\mathcal{H}(S)$ are $$\cup_{i=1}^n\{\sigma_i(S), -\sigma_i(S)\}$$ Further the eigenvectors corresponding to these are $$\cup_{i=1}^n\Bigg\{\frac{1}{\sqrt{2}}\begin{bmatrix}u^{S}_i \\ v^{S}_i \end{bmatrix}, \frac{1}{\sqrt{2}}\begin{bmatrix}u^{S}_i \\ -v^{S}_i \end{bmatrix}\Bigg\}$$ Similarly define the respective quantities for $\mathcal{H}(P)$. Now clearly, $||\mathcal{H}(S) - \mathcal{H}(P)|| \leq \epsilon$ since $||S-P|| \leq \epsilon$. Then by Weyl's inequality we have that \[ |\sigma_i(S) - \sigma_i(P)| \leq \epsilon \] Now we can use Proposition~\ref{sin_theta_thm}. To ease notation, define $\sigma_i(S) = \lambda_i(\mathcal{H}(S))$ and $\lambda_{-i}(\mathcal{H}(S)) = -\sigma_i(S)$ and let the corresponding eigenvectors be $a_i, a_{-i}$ for $S$ and $b_{i}, b_{-i}$ for $P$ respectively. Note that we can make the assumption that $\langle a_i, b_i \rangle \geq 0$ for every $i$. This does not change any of our results because $a_i, b_i$ are just stacking of left and right singular vectors and $u_i v_i^{\top}$ is identical for $u_i, v_i$ and $-u_i, -v_i$. Then using Proposition~\ref{sin_theta_thm} we get for every $(i, j) \not \in K_2 \times K_2$ and $i \neq j$ \begin{equation} \label{eq1} |\langle a_i, b_j \rangle| \leq \frac{\epsilon}{|\sigma_i(S) - \sigma_j(P)|} \end{equation} similarly \begin{equation} \label{eq2} |\langle a_{-i}, b_{j} \rangle| \leq \frac{\epsilon}{|\sigma_i(S) + \sigma_j(P)|} \end{equation} Since $$a_i = \frac{1}{\sqrt{2}}\begin{bmatrix}u^{S}_i \\ v^{S}_i \end{bmatrix}, a_{-i} = \frac{1}{\sqrt{2}}\begin{bmatrix}u^{S}_i \\ -v^{S}_i \end{bmatrix}, b_j = \frac{1}{\sqrt{2}}\begin{bmatrix}u^{P}_i \\ v^{P}_i \end{bmatrix}$$ and $\sigma_i(S), \sigma_i(P) \geq 0$ we have by adding Eq.~\eqref{eq1},\eqref{eq2} that \[ \max{\Big(|\langle u^{S}_i, u^{P}_j\rangle|,|\langle v^{S}_i, v^{P}_j\rangle|\Big)} \leq \frac{\epsilon}{|\sigma_i(S) - \sigma_j(P)|} \] Define $U^S_{K_i}$ to be the matrix formed by the orthornormal vectors $\{a_{j}\}_{j \in K_i}$ and $U^S_{K_{-i}}$ to be the matrix formed by the orthonormal vectors $\{a_{j}\}_{j \in -K_{i}}$. Define similar quantities for $P$. Then \begin{align} &(U^{S}_{K_2})^{\top} U^P_{K_2} (U^P_{K_2})^{\top} U^S_{K_2} = (U^{S}_{K_2})^{\top} (I - \sum_{j \neq 2} U^P_{K_j} (U^P_{K_j})^{\top})U^S_{K_2} \nonumber\\ &= (U^{S}_{K_2})^{\top} (I - \sum_{|j| \neq 2} U^P_{K_j} (U^P_{K_j})^{\top} - U^P_{K_{-2}} (U^P_{K_{-2}})^{\top})U^S_{K_2} \nonumber\\ &= I - (U^{S}_{K_2})^{\top} \sum_{|j| \neq 2} U^P_{K_j} (U^P_{K_j})^{\top} U^S_{K_2} - (U^{S}_{K_2})^{\top}U^P_{K_{-2}} (U^P_{K_{-2}})^{\top}U^S_{K_2} \label{cross_eq} \end{align} Now $K_1, K_{-1}$ corresponds to eigenvectors where singular values $\geq \sigma_{r-1}(P)$, $K_3, K_{-3}$ corresponds to eigenvectors where singular values $\leq \sigma_{s+1}(P)$. We are in a position to use Proposition~\ref{gen_wedin}. Using that on Eq.~\eqref{cross_eq} we get the following relation \begin{align} (U^{P}_{K_2})^{\top} U^S_{K_2} (U^S_{K_2})^{\top} U^P_{K_2} &\succeq I\Bigg(1 - \frac{\epsilon^2}{(\sigma_{r-1}(P) - \sigma_s(S))^2} - \frac{\epsilon^2}{(\sigma_{s}(S) - \sigma_{s+1}(P))^2} \Bigg) \nonumber \\ &- (U^{S}_{K_2})^{\top}U^P_{K_{-2}} (U^P_{K_{-2}})^{\top}U^S_{K_2} \label{inter_step} \end{align} In the Eq.~\eqref{inter_step} we need to upper bound $(U^{S}_{K_2})^{\top}U^P_{K_{-2}} (U^P_{K_{-2}})^{\top}U^S_{K_2}$. To this end we will exploit the fact that all singular values corresponding to $U^{S}_{K_2}$ are the same. Since $||\mathcal{H}(S) - \mathcal{H}(P)|| \leq \epsilon$, then \begin{align*} \mathcal{H}(S) &= U^S_{K_2} \Sigma^S_{K_2} (U^S_{K_2})^{\top} + U^S_{K_{-2}} \Sigma^S_{K_{-2}} (U^S_{K_{-2}})^{\top} + U^S_{K_0} \Sigma^S_{K_0} (U^S_{K_0})^{\top} \\ \mathcal{H}(P) &= U^P_{K_2} \Sigma^P_{K_2} (U^P_{K_2})^{\top} + U^P_{K_{-2}} \Sigma^P_{K_{-2}} (U^P_{K_{-2}})^{\top} + U^P_{K_0} \Sigma^P_{K_0} (U^P_{K_0})^{\top} \end{align*} Then by pre--multiplying and post--multiplying we get \begin{align*} (U^S_{K_2})^{\top}\mathcal{H}(S) U^P_{K_{-2}} &= \Sigma^S_{K_2} (U^S_{K_2})^{\top}U^P_{K_{-2}} \\ (U^S_{K_2})^{\top}\mathcal{H}(P) U^P_{K_{-2}} &= (U^S_{K_2})^{\top}U^P_{K_{-2}}\Sigma^P_{K_{-2}} \end{align*} Let $\mathcal{H}(S)-\mathcal{H}(P) = R$ then \begin{align*} (U^S_{K_2})^{\top}(\mathcal{H}(S)-\mathcal{H}(P)) U^P_{K_{-2}} &= (U^S_{K_2})^{\top}R U^P_{K_{-2}} \\ \Sigma^S_{K_2} (U^S_{K_2})^{\top}U^P_{K_{-2}} - (U^S_{K_2})^{\top}U^P_{K_{-2}}\Sigma^P_{K_{-2}} &= (U^S_{K_2})^{\top}R U^P_{K_{-2}} \end{align*} Since $\Sigma^S_{K_2} = \sigma_s(A) I$ then \begin{align*} ||(U^S_{K_2})^{\top}U^P_{K_{-2}}(\sigma_s(S) I - \Sigma^P_{K_{-2}})|| &= ||(U^S_{K_2})^{\top}R U^P_{K_{-2}}|| \\ ||(U^S_{K_2})^{\top}U^P_{K_{-2}}|| &\leq \frac{\epsilon}{\sigma_s(S) + \sigma_{s}(P)} \end{align*} Similarly $$||(U^P_{K_2})^{\top}U^S_{K_{-2}}|| \leq \frac{\epsilon}{\sigma_s(P) + \sigma_{s}(S)} $$ Since $\sigma_{s}(P) + \sigma_s(S) \geq \sigma_s(S) - \sigma_{s+1}(P)$ combining this with Eq.~\eqref{inter_step} we get \begin{equation} \label{k2_cross} \sigma_{\min}((U^S_{K_2})^{\top} U^P_{K_2}) \geq 1 - \frac{2\epsilon^2}{\min{\Big(\sigma_{r-1}(P) - \sigma_s(S), \sigma_{s}(S) - \sigma_{s+1}(P)\Big)^2}} \end{equation} For Eq.~\eqref{k2_cross}, we use the inequality $\sqrt{1 - x^2} \geq 1 - x^2$ whenever $x < 1$ which is true when Eq.~\eqref{interlacing_ppt} is true. This means that there exists unitary transformation $Q$ such that \[ ||U_{K_2}^S - U_{K_2}^P Q|| \leq \frac{2\epsilon}{\min{\Big(\sigma_{r-1}(P) - \sigma_s(S), \sigma_{s}(S) - \sigma_{s+1}(P)\Big)}} \] \end{proof} \begin{remark} \label{hermitian_comment} Note that $S, P$ will be Hermitian dilations of $\mathcal{H}_{0, \infty, \infty}, \hat{\Hc}_{0, \hd, \hd}$ respectively in our case. Since the singular vectors of $S$ (and $P$) are simply stacked version of singular vectors of $\mathcal{H}_{0, \infty, \infty}$ (and $\hat{\Hc}_{0, \hd, \hd}$), our results hold directly for the singular vectors of $\mathcal{H}_{0, \infty, \infty}$ (and $\hat{\Hc}_{0, \hd, \hd}$) \end{remark} \begin{remark} \label{Q_transform} The usefulness of Proposition~\ref{eigenspace_distance} comes from the fact that it works even when there is no gap between the singular values. This comes at the cost of the fact that we learn the singular vectors corresponding to same singular value only up to the unitary transformation $Q$. This is sufficient for model approximation since we are agnostic to unitary transformations, \textit{i.e.}, if the true model parameters are $M=(C, A, B)$ then we find $CQ, Q^{\top}AQ, Q^{\top}B$ which is sufficient for our identification procedure as it is clear from the discussion in Section~\ref{model_reduction}, specifically Eq.~\eqref{transform_Q}. Note that each singular vector corresponding to a unique singular value is learnt up to a factor of $\pm 1$, however as we discussed in the proof we can always assume that we recovered the correct sign for such singular vectors so that Proposition~\ref{eigenspace_distance} is satisfied. In the next result, we will implicitly assume that we compare against subspaces transformed by $Q$ as this does not, in principle, affect the reconstruction of $C, A, B$. \end{remark} Define $\Delta_+$ as follows, let $\sigma_{n+1} = 0$ then \begin{equation} \Delta_{+} = \inf_{\sigma_i \neq \sigma_{i+1}} \Big(1 - \frac{\sigma_{i+1}}{\sigma_i}\Big)\label{delta_def} \end{equation} Let $r \leq k \leq s$. First divide the indices $[1, n]$ into 3 parts $K_1 = [1, r-1], K_2 = [r, s], K_3 = [s+1, n]$. \begin{prop}[System Reduction] \label{reduction2} Let $||S-P|| \leq \epsilon$. Furthermore, let $S, P$ satisfy Eq.~\eqref{interlacing_ppt}. Define $K_0 = K_1 \cup K_2$, and let $\epsilon \leq \frac{\sigma_s \Delta_{+}}{2}$, then \begin{align*} ||U^S_{K_0} (\Sigma^S_{K_0})^{1/2} - U^P_{K_0} (\Sigma^P_{K_0})^{1/2}||_2 &\leq \sqrt{\sum_{i=1}^{r-1}\frac{\mathcal{C}\sigma_i \epsilon^2}{(\sigma_i - \sigma_{i+1})^2 \wedge (\sigma_{i-1} - \sigma_{i})^2}} \\ &+ \sqrt{ \frac{\mathcal{C}\sigma_s \epsilon^2}{((\sigma_{r-1} - \sigma_{s}) \wedge (\sigma_{r} - \sigma_{s+1}))^2}} + \sup_{1\leq i \leq s}|\sqrt{\sigma_i} - \sqrt{\hat{\sigma}_i}| \end{align*} for some universal constant $\mathcal{C}$ and $\sigma_i = \sigma_i(S), \hat{\sigma}_i = \sigma_i(P)$. \end{prop} \begin{proof} \vspace{2mm} Since $U_{K_0}^S = [U_{K_1}^S U_{K_2}^S]$ and likewise for $B$, we can separate the analysis for $K_1, K_2$ as follows \begin{align*} ||U^S_{K_0} (\Sigma^S_{K_0})^{1/2} - U^P_{K_0} (\Sigma^P_{K_0})^{1/2}|| &\leq ||(U^S_{K_0} - U^P_{K_0}) (\Sigma^S_{K_0})^{1/2}|| + ||U^P_{K_0}((\Sigma^S_{K_0})^{1/2} - (\Sigma^P_{K_0})^{1/2})|| \\ &= ||[(U^S_{K_1} - U^P_{K_1}) (\Sigma^S_{K_1})^{1/2}, (U^S_{K_2} - U^P_{K_2}) (\Sigma^S_{K_2})^{1/2}]|| + ||(\Sigma^S_{K_0})^{1/2} - (\Sigma^P_{K_0})^{1/2}|| \\ &\leq ||(U^S_{K_1} - U^P_{K_1}) (\Sigma^S_{K_1})^{1/2}|| + ||(U^S_{K_2} - U^P_{K_2}) (\Sigma^S_{K_2})^{1/2}|| \\ &+ ||(\Sigma^S_{K_0})^{1/2} - (\Sigma^P_{K_0})^{1/2}|| \end{align*} Now $||(\Sigma^S_{K_0})^{1/2} - (\Sigma^P_{K_0})^{1/2}|| = \sup_{l} |\sqrt{\sigma_l(S)} - \sqrt{\sigma_l(P)}|$. Recall that $\sigma_r(S) = \hdots = \sigma_k(S) = \hdots = \sigma_{s-1}(S)$ and whenever $\epsilon \leq \sigma_k \frac{\Delta_{+}}{2} $ we have that $\frac{\epsilon}{\sigma_i - \sigma_j} < 1/2$ for all $1 \leq i \neq j \leq r$. We will combine our previous results in Proposition~\ref{sin_theta_thm}--\ref{eigenspace_distance} to prove this claim. Specifically from Proposition~\ref{eigenspace_distance} we have \begin{align*} ||(U^S_{K_2} - U^P_{K_2}) (\Sigma^S_{K_2})^{1/2}|| &\leq \frac{2\epsilon \sqrt{\sigma_k(S)}}{\min{\Big(\sigma_{r-1}(P) - \sigma_k(S), \sigma_{k}(S) - \sigma_{s+1}(P)\Big)}} \end{align*} On the remaining term we will use Proposition~\ref{eigenspace_distance} on each column \begin{align*} ||(U^S_{K_1} - U^P_{K_1}) (\Sigma^S_{K_1})^{1/2}|| &\leq ||[\sqrt{\sigma_1(S)} c_1, \ldots, \sqrt{\sigma_{|K_1|}(S)} c_{|K_1|}]|| \leq \sqrt{\sum_{j=1}^{r-1} \sigma_j^2 ||c_j||^2} \\ &\leq \epsilon \sqrt{\sum_{j=1}^{r-1}\frac{2 \sigma_j(S) }{\min{\Big(\sigma_{j-1}(P) - \sigma_j(S), \sigma_{j}(S) - \sigma_{j+1}(P)\Big)^2}}} \end{align*} \end{proof} In the context of our system identification, $S = \mathcal{H}_{0, \infty, \infty}$ and $P = \hat{\Hc}_{0, \hd, \hd}$. $P$ will be made compatible by padding it with zeros to make it doubly infinite. Then $U_{K_0}^S, U_{K_0}^P$ (after padding) has infinite rows. Define $Z_0 = U_{K_0}^S (\Sigma^S_{K_0})^{1/2}(1:, :), Z_1 = U_{K_0}^S (\Sigma^S_{K_0})^{1/2}(p+1:, :)$ (both infinite length) and similarly we will have $\hat{Z}_0, \hat{Z}_1$. Note that from a computational perspective we do not need to $Z_0, Z_1$; we only need to work with $\hat{Z}_0=U_{K_0}^P (\Sigma^P_{K_0})^{1/2}(1:, :), \hat{Z}_1=U_{K_0}^P (\Sigma^P_{K_0})^{1/2}(p+1:, :)$ and since most of it is just zero padding we can simply compute on $\hat{Z}_0(1:pd, :), \hat{Z}_1(1:pd, :)$. \begin{prop} \label{A_err} Assume $Z_1 = Z_0L$. Let $||S-P||_2 \leq \epsilon \leq \frac{\sigma_s \Delta_{+}}{2}$. then \begin{align*} ||(Z_0^{\prime}Z_0)^{-1}Z_0^{\prime}Z_1 - (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_1|| &\leq \frac{C\epsilon(\gamma +1)}{\sigma_s}\Bigg(\sqrt{ \frac{\sigma^2_s }{((\sigma_s - \sigma_{s+1})\wedge (\sigma_{r-1} - \sigma_{s}) )^2}} \\ &+ \sqrt{\sum_{i=1}^{r-1}\frac{\sigma_i \sigma_s }{(\sigma_i - \sigma_{i+1})^2 \wedge (\sigma_{i-1} - \sigma_{i})^2}}\Bigg) \end{align*} where $\sigma_1(L) \leq \gamma$. \end{prop} \begin{proof} Note that $Z_1 = Z_0 L$, then \begin{align*} &||(Z_0^{\prime}Z_0)^{-1}Z_0^{\prime}Z_1 - (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_1||_2 \\ = &||L - (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_1||_2 = ||(\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_0 L - (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_1||_2 \\ = &||(\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_0 L - (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}Z_0 L + (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}Z_0 L - (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_1||_2 \\ \leq &||(\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_0 L - (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}Z_0 L||_2 + ||(\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}Z_0 L - (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_1||_2 \\ \leq &||(\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}||_2 \Big(||Z_0 L - \hat{Z}_0 L||_2 + || \underbrace{Z_0 L}_{\text{Shifted version of } Z_0} - \hat{Z}_1||_2 \Big) \\ \end{align*} Now, $||(\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}||_2 \leq (\sqrt{\sigma_s - \epsilon})^{-1}$, $||Z_0 L - \hat{Z}_1||_2 \leq ||Z_0 - \hat{Z}_0||_2$ since $Z_1 = Z_0L$ is a submatrix of $Z_0$ and $\hat{Z}_1$ is a submatrix of $\hat{Z}_0$ we have $||Z_0L - \hat{Z}_1||_2 \leq ||Z_0 - \hat{Z}_0||_2$ and $||Z_0 L - \hat{Z}_0 L||_2 \leq ||L||_2 ||Z_0 - \hat{Z}_0||_2$ \begin{align*} \leq &\frac{C\epsilon(\gamma +1)}{{\sigma_s}} \Bigg(\sqrt{\frac{\sigma^2_s }{((\sigma_s - \sigma_{s+1})\wedge (\sigma_{r-1} - \sigma_{s}) )^2}} + \sqrt{\sum_{i=1}^{r-1}\frac{\sigma_i \sigma_s }{(\sigma_i - \sigma_{i+1})^2 \wedge (\sigma_{i-1} - \sigma_{i})^2}}\Bigg) \end{align*} \end{proof} \begin{corollary} \label{subspace_reduction_cor} If $\epsilon \leq \frac{\sigma_s \Delta_+}{2}$, then \begin{align*} ||U^S_{K_0} (\Sigma^S_{K_0})^{1/2} - U^P_{K_0} (\Sigma^P_{K_0})^{1/2}||_2 &\leq \frac{\mathcal{C} \epsilon \sqrt{\Gamma_r}}{\Delta_+ \sqrt{\sigma_r}} \\ ||(Z_0^{\prime}Z_0)^{-1}Z_0^{\prime}Z_1 - (\hat{Z}_0^{\prime}\hat{Z}_0)^{-1}\hat{Z}_0^{\prime}\hat{Z}_1|| &\leq \frac{\mathcal{C} (\gamma + 1)\epsilon \sqrt{\Gamma_r}}{ \sigma_r \Delta_+} \end{align*} where $\Gamma_r = \min{(r, \frac{1}{\Delta_+})}$. \end{corollary} \begin{proof} From Proposition~\ref{reduction2} and \ref{A_err} we have the error bounds. Then note that \[ \sqrt{\frac{\sigma^2_s }{((\sigma_s - \sigma_{s+1})\wedge (\sigma_{r-1} - \sigma_{s}) )^2}} \leq \frac{1}{\Delta^2_+} \] and some simple arithmetic shows that \[ \sum_{i=1}^{r-1}\frac{\sigma_i \sigma_s }{(\sigma_i - \sigma_{i+1})^2 \wedge (\sigma_{i-1} - \sigma_{i})^2} \leq \sum_{i=1}^{r-1} \frac{\sigma_s}{\sigma_i \Delta_+^2} \leq \frac{\Gamma_{r-1}}{\Delta_+^2} \] where $\Gamma_{r-1} = \min{(r-1, \frac{1}{\Delta_+})}$. This follows because $\sum_{i=1}^{r-1}\frac{\sigma_s}{\sigma_i} = \sum_{i=1}^{r-1}(1 - \Delta_+)^{i}$. \end{proof} \section{Hankel Matrix Estimation Results} \label{sec:hankel_est} In this section we provide the proof for Theorem~\ref{hankel_est_thm}. For any matrix $P$, we define its doubly infinite extension $\bar{P}$ as \begin{equation} \bar{P} = \begin{bmatrix} P & 0 & \ldots \\ 0 & 0 & \ldots \\ \vdots & \vdots & \vdots \end{bmatrix} \label{pad} \end{equation} \begin{prop} \label{truncation_error} Fix $d > 0$. Then we have \[ ||\mathcal{H}_{d, \infty, \infty}||_2 \leq ||\mathcal{H}_{0, \infty, \infty} - \bar{\mathcal{H}}_{0, d, d}||_2 \leq \sqrt{2} ||\mathcal{H}_{d, \infty, \infty}||_2 \leq \sqrt{2} ||\mathcal{T}_{d, \infty}||_2 \] \end{prop} \begin{proof} Define $\tilde{C}_d, \tilde{B}_d$ as follows \begin{align*} \tilde{C}_d &= \begin{bmatrix} 0_{md\times n} \\ C \\ CA \\ \vdots \\ \end{bmatrix} \\ \tilde{B}_d &= \begin{bmatrix} 0_{n\times pd} & B & AB & \hdots \end{bmatrix} \end{align*} Now pad $\mathcal{H}_{0, d, d}$ with zeros to make it a doubly infinite matrix and call it $\bar{\mathcal{H}}_{0, d, d}$ and we get that \begin{align*} ||\bar{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}|| &= \begin{bmatrix} 0 & M_{12} \\ M_{21} & M_{22} \end{bmatrix} \end{align*} Note here that $M_{21}$ and $M_0 = \begin{bmatrix} M_{12} \\ M_{22}\end{bmatrix}$ are infinite matrices. Further $|| \mathcal{H}_{d, \infty, \infty}||_2 = ||M_0||_2 \geq ||M_{21}||_2$. Then \begin{align*} ||\bar{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}|| &\leq \sqrt{||M_{12}||_2^2 + ||M_0||_2^2} \leq \sqrt{2} || \mathcal{H}_{d, \infty, \infty}||_2 \end{align*} Further $||\bar{\mathcal{H}}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}|| \geq ||M_0|| = || \mathcal{H}_{d, \infty, \infty}||_2$. \end{proof} \begin{prop} \label{truncation_bounds} For any $d_1 \geq d_2$, we have \[ ||\mathcal{H}_{0, \infty, \infty} - \bar{\mathcal{H}}_{0, d_1, d_1}||_2 \leq \sqrt{2} ||\mathcal{H}_{0, \infty, \infty} - \bar{\mathcal{H}}_{0, d_2, d_2}||_2 \] \end{prop} \begin{proof} Since $||\mathcal{H}_{d_1, \infty, \infty}||_2 \leq ||\mathcal{H}_{0, \infty, \infty} - \bar{\mathcal{H}}_{0, d_1, d_1}||_2 \leq \sqrt{2}||\mathcal{H}_{d_1, \infty, \infty}||_2 $ from Proposition~\ref{truncation_error}. It is clear that $||\mathcal{H}_{d_1, \infty, \infty}||_2 \leq ||\mathcal{H}_{d_2, \infty, \infty}||_2 $. Then \begin{align*} \frac{1}{\sqrt{2}} ||\mathcal{H}_{0, \infty, \infty} - \bar{\mathcal{H}}_{0, d_1, d_1}||_2 \leq ||\mathcal{H}_{d_1, \infty, \infty}||_2 \leq ||\mathcal{H}_{d_2, \infty, \infty}||_2 \leq ||\mathcal{H}_{0, \infty, \infty} - \bar{\mathcal{H}}_{0, d_2, d_2}||_2 \end{align*} \end{proof} \begin{prop} \label{toeplitz_decay} Fix $d > 0$. Then \[ ||\mathcal{T}_{d, \infty}(M)||_2 \leq \frac{\tilde{M}\rho(A)^d}{1 - \rho(A)} \] \end{prop} \begin{proof} Recall that \begin{align*} \mathcal{T}_{d, \infty}(M) = \begin{bmatrix} 0 & 0 & 0 & \hdots & 0 \\ CA^{d}B & 0 & 0& \hdots & 0\\ CA^{d+1}B & CA^{d}B & 0& \hdots & 0\\ \vdots & \ddots & \ddots & \vdots & \vdots \end{bmatrix} \end{align*} Then $||\mathcal{T}_{d, \infty}(M)||_2 \leq \sum_{j=d}^{\infty} ||CA^{j}B||_2$. Now from Eq. 4.1 and Lemma 4.1 in~\cite{tu2017non} we get that $||CA^{j}B||_2 \leq \tilde{M} \rho(A)^j$. Then \[ \sum_{j=d}^{\infty} ||CA^{j}B||_2 \leq \frac{\tilde{M} \rho(A)^d}{1 - \rho(A)} \] \end{proof} \begin{remark} Proposition~\ref{toeplitz_decay} is just needed to show exponential decay and is not precise. Please refer to~\cite{tu2017non} for explicit rates. \end{remark} Next we show that $T^{(\kappa)}_{*}(\delta)$ and $d_{*}(T, \delta)$ defined in Eq.~\eqref{ts_delta} given by \begin{align} d_{*}(T, \delta) &= \inf\Bigg\{d \Bigg| \mathcal{C} \beta R \sqrt{d} \sqrt{\frac{pd + \log{\frac{T}{\delta}}}{T}} \geq ||\mathcal{H}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}||_2 \Bigg\} \nonumber \\ T^{(\kappa)}_{*}(\delta) &= \inf\Big\{T \Big |\frac{T}{4\mathcal{C} m(\log{\frac{T}{\delta}})} \wedge \sqrt{\frac{T}{4\mathcal{C} \log{\frac{2}{\delta}} }} \geq d_{*}(T, \delta), \hspace{2mm} d_{*}( T, \delta) \leq \frac{\kappa d_{*}(\frac{T}{\kappa^2}, \delta)}{8} \Big\} \label{ds_delta_0} \end{align} The existence of $d_{*}(T, \delta)$ is predicated on the finiteness of $T^{(\kappa)}_*(\delta)$ which we discuss below. \subsection{Existence of $T^{(\kappa)}_*(\delta) < \infty$} \label{t1_t2} Construct two sets \begin{align} T_{1}(\delta) &= \inf\Big\{T \Big |\frac{T}{4\mathcal{C} m(\log{\frac{T}{\delta}})} \wedge \sqrt{\frac{T}{4\mathcal{C} \log{\frac{2}{\delta}} }} \geq d_{*}(T, \delta)\Big\} \label{T1} \\ T_2(\delta) &= \inf\Big\{T \Big | d_{*}( t, \delta) \leq \frac{\kappa d_{*}(\frac{t}{\kappa^2}, \delta)}{8} , \hspace{3mm} \forall t\geq T \Big\} \label{T2} \end{align} Clearly, $T^{(\kappa)}_*(\delta) < T_1(\delta) \vee T_2(\delta)$. A key assumption in the statement of our results is that $T^{(\kappa)}_*(\delta) < \infty$. We will show that it is indeed true. Let $\kappa \geq 20$. \begin{prop} \label{t1_exist} For a fixed $\delta > 0$, $T_1(\delta) < \infty$ with $d_{*}(T, \delta) \leq \frac{\mathcal{C} \log{(\mathcal{C} T + \log{\frac{1}{\delta}})} - \mathcal{C} \log{R} + \log{(\tilde{M}/\beta)}}{\log{\frac{1}{\rho}}}$. Here $\rho=\rho(A)$. \end{prop} \begin{proof} Note the form for $d_*(T, \delta)$, it is the minimum $d$ that satisfies \[ \mathcal{C} \beta R \sqrt{d} \sqrt{\frac{pd + \log{\frac{T}{\delta}}}{T}} \geq ||\mathcal{H}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}||_2 \] Since from Proposition~\ref{truncation_error} and \ref{toeplitz_decay} we have $||\mathcal{H}_{0, d, d} - \mathcal{H}_{0, \infty, \infty}||_2 \leq \frac{3 \tilde{M}\rho^d}{1 - \rho(A)}$, then $d_*(T, \delta) \leq d$ that satisfies \[ \mathcal{C} \beta R \sqrt{d} \sqrt{\frac{pd + \log{\frac{T}{\delta}}}{T}} \geq \frac{3 \tilde{M}\rho^d}{1 - \rho(A)} \] which immediately implies $d_{*}(T, \delta) \leq d = \frac{\mathcal{C} \log{(\mathcal{C} T + \log{\frac{1}{\delta}})} - \mathcal{C} \log{R} + \log{(\tilde{M}/\beta)} }{\log{\frac{1}{\rho}}}$, \textit{i.e.}, $d_{*}(T, \delta)$ is at most logarithmic in $T$. As a result, for a large enough $T$ \[ \frac{T}{4\mathcal{C} m(\log{\frac{T}{\delta}})} \wedge \sqrt{\frac{T}{4\mathcal{C} \log{\frac{2}{\delta}} }} \geq \frac{\mathcal{C} \log{(\mathcal{C} T + \log{\frac{1}{\delta}})} - \mathcal{C} \log{R} + \log{(\tilde{M}/\beta)}}{\log{\frac{1}{\rho}}} \] \end{proof} The intuition behind $T_2(\delta)$ is the following: $d_{*}(T, \delta)$ grows at most logarithmically in $T$, as is clear from the previous proof. Then $T_2(\delta)$ is the point where $d_{*}(T, \delta)$ is still growing as $\sqrt{T}$ (\textit{i.e.}, ``mixing'' has not happened) but at a slightly reduced rate. \begin{prop} \label{t2_exist} For a fixed $\delta > 0$, $T_2(\delta) < \infty$. \end{prop} \begin{proof} Recall from the proof of Proposition~\ref{truncation_error} that $ ||\mathcal{H}_{d,\infty, \infty}|| \leq ||\mathcal{H}_{0, \infty, \infty} - \mathcal{H}_{0, d,d}|| \leq \sqrt{2}||\mathcal{H}_{d, \infty, \infty}||$. Now $\mathcal{H}_{d, \infty, \infty}$ can be written as \begin{align*} \mathcal{H}_{d, \infty, \infty} &= \underbrace{\begin{bmatrix} C \\ CA \\ \vdots \\ \end{bmatrix}}_{=\tilde{C}}A^{d} \underbrace{[B, AB, \hdots]}_{=\tilde{B}} \end{align*} Define $P_d = A^d \tilde{B} \tilde{B}^{\top} (A^d)^{\top}$. Let $d_{\kappa}$ be such that for every $d \geq d_{\kappa}$ and $\kappa \geq 20$ \begin{equation} P_{d} \preceq \frac{1}{4\kappa} P_{0} \label{eq_cond} \end{equation} Clearly such a $d_{\kappa} < \infty$ would exist because $P_0 \neq 0$ but $\lim_{d \rightarrow \infty} P_d = 0$. Then observe that $P_{2d} \preceq \frac{1}{4\kappa}P_{d}$. Then for every $d \geq d_{\kappa}$ we have that \[ ||\mathcal{H}_{d, \infty, \infty}|| \geq 4 \kappa ||\mathcal{H}_{2d, \infty, \infty}|| \] Let \begin{equation} \label{t2_thresh} T \geq \frac{4d_{\kappa}^2 \mathcal{C}^2 \beta^2 R^2}{\sigma_0^2} (p+ 2 \log{(\frac{\mathcal{C} \beta R}{\delta})}) \end{equation} where $\sigma_0 = ||\mathcal{H}_{d_{\kappa}, \infty, \infty}||$. Assume that $\sigma_0 > 0$ (if not then are condition is trivially true). Then simple computation shows that \begin{align*} ||\mathcal{H}_{0, d_{\kappa}, d_{\kappa}} - \mathcal{H}_{0, \infty, \infty}|| &\geq ||\mathcal{H}_{d_{\kappa}, \infty, \infty}|| \geq \underbrace{\mathcal{C} \beta R \sqrt{d_{\kappa}} \sqrt{\frac{pd_{\kappa} + \log{\frac{T}{\delta}}}{T}}}_{< \frac{\sigma_0}{2}} \end{align*} This implies that $d_{*}=d_{*}(T, \delta) \geq d_{\kappa}$ for $T$ prescribed as above (ensured by Proposition~\ref{truncation_bounds}). But from our discussion above we also have \begin{align*} ||\mathcal{H}_{0, d_{*}, d_{*}} - \mathcal{H}_{0, \infty, \infty}|| \geq ||\mathcal{H}_{d_{*}, \infty, \infty}|| \geq 4 \kappa ||\mathcal{H}_{2d_{*}, \infty, \infty}|| \geq 2\kappa ||\mathcal{H}_{0, 2d_{*}, 2d_{*}} - \mathcal{H}_{0, \infty, \infty}|| \end{align*} This means that if \begin{align*} ||\mathcal{H}_{0, d_{*}, d_{*}} - \mathcal{H}_{0, \infty, \infty}|| &\leq \mathcal{C} \beta R \sqrt{d_{*}} \sqrt{\frac{pd_{*} + \log{\frac{T}{\delta}}}{T}} \end{align*} then \begin{align*} ||\mathcal{H}_{0, 2d_{*}, 2d_{*}} - \mathcal{H}_{0, \infty, \infty}|| &\leq \frac{1}{2\kappa} \mathcal{C} \beta R \sqrt{d_{*}} \sqrt{\frac{pd_{*} + \log{\frac{T}{\delta}}}{T}} \leq \mathcal{C} \beta R \sqrt{2d_{*}} \sqrt{\frac{2pd_{*} + \log{\frac{\kappa^2 T}{\delta}}}{\kappa^2 T}} \end{align*} which implies that $d_{*}(\kappa^2T, \delta) \leq 2d_{*}(T, \delta) \leq\frac{\kappa}{8} d_{*}(T, \delta)$ whenever $T$ is greater than a certain finite threshold of Eq.~\eqref{t2_thresh} and $\kappa \geq 20$. \end{proof} Eq.~\eqref{eq_cond} happens when $\sigma(A^{d})^2 \leq \frac{1}{4\kappa} \implies d_{\kappa} = \mathcal{O} \Big(\frac{\log{\kappa}}{\log{\frac{1}{\rho}}}\Big)$ where $\rho = \rho(A)$ and $T_2(\delta) \leq \mathcal{C} T_1(\delta)$. It should be noted that the dependence of $T_i(\delta)$ on $\log{\frac{1}{\rho}}$ is worst case, \textit{i.e.}, there exists some ``bad'' LTI system that gives this dependence and it is quite likely $T_i(\delta)$ is much smaller. The condition $T \geq T_1(\delta) \vee T_2(\delta)$ simply requires that we capture some reasonable portion of the dynamics and not necessarily the entire dynamics. \subsection{Proof of Theorem~\ref{hankel_est_thm}} \begin{prop} \label{ds_error} Let $T \geq T^{(\kappa)}_{*}(\delta)$ and $d_* = d_*(T, \delta)$ then \[ ||\mathcal{H}_{0, \infty, \infty} - \hat{\mathcal{H}}_{0, d_*, d_*}|| \leq 2\mathcal{C} \beta R \sqrt{\frac{d_{*}}{T}} \sqrt{pd_* + \log{\frac{T}{\delta}}} \] \end{prop} \begin{proof} Consider the following error \begin{align*} ||\mathcal{H}_{0, \infty, \infty} - \hat{\mathcal{H}}_{0, d_*, d_*}||_2 &\leq ||\mathcal{H}_{0, d_*, d_*} - \hat{\mathcal{H}}_{0, d_*, d_*}||_2 + ||\mathcal{H}_{0, \infty, \infty} - {\mathcal{H}}_{0, d_*, d_*}||_2 \end{align*} From Proposition~\ref{truncation_error} and Eq.~\eqref{ds_delta_0} we get that \[ ||\mathcal{H}_{0, \infty, \infty} - {\mathcal{H}}_{0, d_*, d_*}||_2 \leq \mathcal{C} \beta R \sqrt{\frac{d_{*}}{T}} \sqrt{pd_* + \log{\frac{T}{\delta}}} \] Since from Theorem~\ref{hankel_convergence} \begin{align} ||\mathcal{H}_{0, d_{*}, d_{*}} - \hat{\mathcal{H}}_{0, d_*, d_*}||_2 &\leq \mathcal{C} \beta R \sqrt{\frac{d_{*}}{T}} \sqrt{pd_* + \log{\frac{T}{\delta}}} \nonumber \\ ||\mathcal{H}_{0, \infty, \infty} - \hat{\mathcal{H}}_{0, d_*, d_*}||_2 &\leq 2\mathcal{C} \beta R \sqrt{\frac{d_{*}}{T}} \sqrt{pd_* + \log{\frac{T}{\delta}}} \label{err_final} \end{align} \end{proof} Recall the adaptive rule to choose $d$ in Algorithm~\ref{alg:learn_ls}. Here $\mathcal{D}(T) = \Big\{d \Big|d \leq \frac{T}{4\mathcal{C} m(\log{\frac{T}{\delta}})} \wedge \sqrt{\frac{T}{4\mathcal{C} \log{\frac{2}{\delta}} }}\Big\}$. From Theorem~\ref{hankel_convergence} we know that for every $d \in \mathcal{D}(T)$ we have with probability at least $1-\delta$. \[ ||\mathcal{H}_{0, d, d} - \hat{\mathcal{H}}_{0, d, d}||_2 \leq \mathcal{C} \beta R \sqrt{d}\Big(\sqrt{\frac{dp}{T} + \frac{\log{\frac{T}{\delta}}}{T}} \Big) \] Let $\alpha(l) = \sqrt{l}\Big(\sqrt{\frac{lp}{T} + \frac{ \log{\frac{T}{\delta}}}{T}} \Big)$. Then consider the following adaptive rule \begin{align} d_0(T, \delta) &=\inf \Big\{ l \Big| ||\hat{\mathcal{H}}_{0, l, l} - \hat{\mathcal{H}}_{0, h, h}||_2 \leq \mathcal{C} \beta R (2\alpha(l) + \alpha(h)) \hspace{2mm}\forall h \in \mathcal{D}(T), h \geq l \Big\} \\ \hd = \hd(T, \delta) &= d_0(T, \delta) \vee \log{\Big(\frac{T}{\delta}\Big)} \label{d_choice_app} \end{align} for the same universal constant $\mathcal{C}$ as Theorem~\ref{hankel_convergence}. Let $d_{*}(T, \delta)$ be as Eq.~\eqref{ds_delta_0}. Recall that $d_{*} = d_{*}(T, \delta)$ is the point where estimation error dominates the finite truncation error. Unfortunately, we do not have apriori knowledge of $d_{*}(T, \delta)$ to use in the algorithm. Therefore, we will simply use Eq.~\eqref{d_choice_app} as our proxy. The goal will be to bound $||\hat{\Hc}_{0, \hd, \hd} - \mathcal{H}_{0, \infty, \infty}||_2$ \begin{prop} \label{d_ds_rel} Let $T \geq T^{(\kappa)}_{*}(\delta)$, $d_{*}(T, \delta)$ be as in Eq.~\eqref{ds_delta_0} and $\hd$ be as in Eq.~\eqref{d_choice_app}. Then with probability at least $1 - \delta$ we have \[ \hd \leq d_{*}(T, \delta) \vee \log{\Big(\frac{T}{\delta}\Big)} \] \end{prop} \begin{proof} Let $d_{*} = d_{*}(T, \delta)$. First for all $h \in \mathcal{D}(T) > l \geq d_{*}$, we note \begin{align} ||\hat{\mathcal{H}}_{0, d_{*}, d_{*}} - \hat{\mathcal{H}}_{0, h, h}||_2 &\leq ||\hat{\mathcal{H}}_{0, d_{*}, d_{*}} - \mathcal{H}_{0, d_{*}, d_{*}}|| + ||\mathcal{H}_{0, h, h} - \hat{\mathcal{H}}_{0, h, h}||_2 + ||\mathcal{H}_{0, h, h} - {\mathcal{H}}_{0, l, l}||_2 \nonumber\\ &\underbrace{\leq}_{\infty > l, h \geq d_{*}} ||\hat{\mathcal{H}}_{0, d_{*}, d_{*}} - \mathcal{H}_{0, l, l}||_2 + ||\mathcal{H}_{0, h, h} - \hat{\mathcal{H}}_{0, h, h}||_2 + ||\mathcal{H}_{0, \infty, \infty} - \mathcal{H}_{0, d_{*}, d_{*}}||_2\nonumber\\ &\leq \mathcal{C} \beta R (2\alpha(d_{*}) + \alpha(h)) \end{align} This implies that $d_0(T, \delta) \leq d_{*}$ and the assertion follows. \end{proof} We have the following key lemma about the behavior of $\hat{\Hc}_{0, \hd, \hd}$. \begin{lem} \label{hd_lemma} For a fixed $\kappa \geq 20$, whenever $T \geq T^{(\kappa)}_*(\delta)$ we have with probability at least $1-\delta$ \begin{equation} ||\mathcal{H}_{0, \infty, \infty} - \hat{\Hc}_{0, \hd, \hd}||_2 \leq 3 \mathcal{C} \beta R \alpha(\max{(d_{*}(T, \delta), \log{\Big(\frac{T}{\delta}\Big)})}) \end{equation} Furthermore, $\hd = O(\log{\frac{T}{\delta}})$. \end{lem} \begin{proof} Let $d_{*} > \hd$ then \begin{align*} ||\mathcal{H}_{0, \infty, \infty} - \hat{\Hc}_{0, \hd, \hd}||_2 &\leq ||\mathcal{H}_{0, \infty, \infty} - \mathcal{H}_{0, d_{*}, d_{*}}||_2 + ||\hat{\Hc}_{0, \hd, \hd} - \mathcal{H}_{0, \hd, \hd}||_2 + ||\hat{\Hc}_{0, d_{*}, d_{*}} - \mathcal{H}_{0, d_{*}, d_{*}}||_2 \\ &\leq 3\mathcal{C}\beta R \alpha(d_{*}) \end{align*} If $\hd > d_{*}$ then \begin{align*} ||\mathcal{H}_{0, \infty, \infty} - \hat{\Hc}_{0, \hd, \hd}||_2 &\leq ||\mathcal{H}_{0, \infty, \infty} - \mathcal{H}_{0, \hd, \hd}||_2 + ||\hat{\Hc}_{0, \hd, \hd} - \mathcal{H}_{0, \hd, \hd}||_2 = 2||\hat{\Hc}_{0, \hd, \hd} - \mathcal{H}_{0, \hd, \hd}||_2 \\ &\leq 2\mathcal{C} \beta R \alpha(\hd) = 2 \mathcal{C} \beta R \log{\Big(\frac{T}{\delta}\Big)} \end{align*} where the equality follows from Proposition~\ref{d_ds_rel}. The fact that $\hd = O(\log{\frac{T}{\delta}})$ follows from Proposition~\ref{t1_t2}. \end{proof} In the following we will use $\mathcal{H}_l = \mathcal{H}_{0, l, l}$ for shorthand. \begin{prop} \label{hd_size} Fix $\kappa \geq 20$, and $T \geq T_{*}^{(\kappa)}(\delta)$. Then \[ ||\hat{\Hc}_{0, \hat{d}(T, \delta), \hat{d}(T, \delta)} - \mathcal{H}_{0, \infty, \infty}||_2 \leq \Big(12 \vee \frac{3\kappa}{8}\Big)\mathcal{C} \beta R\sqrt{\hat{d}( T, \delta)}\sqrt{\frac{p\hat{d}( T, \delta) + \log{\frac{ T}{\delta}}}{T}} \] with probability at least $1-\delta$. \end{prop} \begin{proof} Assume that $\log{\Big(\frac{T}{\delta}\Big)} \leq d_{*}(T, \delta)$. Recall the following functions \begin{align*} d_{*}(T, \delta) &= \inf{\Big\{d \Big |\mathcal{C} \beta R \sqrt{d}\sqrt{\frac{pd + \log{\frac{T}{\delta}}}{T}} \geq ||\mathcal{H}_{d} - \mathcal{H}_{\infty}||_2 \Big\}} \\ d_0(T, \delta) &= \inf{\Big\{l \Big | ||\hat{\mathcal{H}}_l - \hat{\mathcal{H}}_h||_2 \leq \mathcal{C} \beta R (\alpha(h) + 2\alpha(l)) \hspace{2mm} \forall h \geq l, \hspace{2mm} h \in \mathcal{D}(T) \Big\}} \\ \hd(T, \delta) &= d_0(T, \delta) \vee \log{\Big(\frac{T}{\delta}\Big)} \end{align*} It is clear that $d_{*}(\kappa^2 T, \delta) \leq (1 + \frac{1}{2p}) \kappa d_{*}(T, \delta)$ for any $\kappa \geq 20$. Assume the following \begin{itemize} \item $d_{*}( T, \delta) \leq \frac{\kappa}{8} d_{*}(\kappa^{-2} T, \delta)$ (This relation is true whenever $T \geq T^{(\kappa)}_*(\delta)$) \item $||\mathcal{H}_{\hat{d}(T, \delta)} - \mathcal{H}_{\infty}||_2 \geq 6\mathcal{C} \beta R\sqrt{\hat{d}(T, \delta)}\sqrt{\frac{p\hat{d}( T, \delta) + \log{\frac{T}{\delta}}}{ T}}$ \item $\hd( T, \delta) < d_{*}(\kappa^{-2} T, \delta)$ \end{itemize} The key will be to show that with high probability that all three assumptions can \textit{not} hold with high probability. For shorthand we define $d_{*}^{(1)} = d_{*}(T, \delta), d_{*}^{(\kappa^2)} = d_{*}(\kappa^{-2} T, \delta), \hat{d}^{(1)} = \hd(T, \delta), \hdf = \hd(\kappa^{-2} T, \delta)$ and $\mathcal{H}_l = \mathcal{H}_{0, l, l}, \hat{\Hc}_l = \hat{\Hc}_{0, l, l}$. Let $\tilde{T} = \kappa^{-2} T$. Then this implies that \begin{align*} \frac{ \mathcal{C} \beta R (\sqrt{d_{*}^{(1)}} + 2\sqrt{\hat{d}^{(1)}})}{\kappa} \sqrt{\frac{pd_{*}^{(1)} + \log{\frac{\kappa^2 \tilde{T}}{\delta}}}{\tilde{T}}} &\geq ||\hat{\Hc}_{0, \hat{d}^{(1)}} - \hat{\Hc}_{d_{*}^{(1)}}||_2 \\ ||\hat{\Hc}_{\hat{d}^{(1)}} - \hat{\Hc}_{d_{*}^{(1)}}||_2 &\geq ||\hat{\Hc}_{\hat{d}^{(1)}} - \mathcal{H}_{\infty}||_2 - ||\hat{\Hc}_{d_{*}^{(1)}} - \mathcal{H}_{\infty}||_2 \\ ||\hat{\Hc}_{d_{*}^{(1)}} - \mathcal{H}_{\infty}||_2 + ||\hat{\Hc}_{\hat{d}^{(1)}} - \hat{\Hc}_{d_{*}^{(1)}}||_2 &\geq ||\hat{\Hc}_{\hat{d}^{(1)}} - \mathcal{H}_{\infty}||_2 \\ ||\hat{\Hc}_{d_{*}^{(1)}} - \mathcal{H}_{d_{*}^{(1)}}||_2 + ||\mathcal{H}_{d_{*}^{(1)}} - \mathcal{H}_{\infty}||_2 + ||\hat{\Hc}_{\hat{d}^{(1)}} - \hat{\Hc}_{d_{*}^{(1)}}||_2 &\geq ||\hat{\Hc}_{\hat{d}^{(1)}} - \mathcal{H}_{\infty}||_2 \end{align*} Since by definition of $d_{*}(\cdot, \cdot)$ we have $$||\hat{\Hc}_{d_{*}^{(1)}} - \mathcal{H}_{d_{*}^{(1)}}||_2 + ||\mathcal{H}_{d_{*}^{(1)}} - \mathcal{H}_{\infty}||_2 \leq \frac{2 \mathcal{C} \beta R}{\kappa} \sqrt{d_{*}^{(1)}} \sqrt{\frac{pd_{*}^{(1)} + \log{\frac{\kappa^2 \tilde{T}}{\delta}}}{\tilde{T}}}$$ and by assumptions $d_{*}^{(1)} \leq \frac{\kappa}{8} d_{*}^{(\kappa^2)}, \hat{d}^{(1)} \leq d_{*}^{(\kappa^2)}$ then as a result $(\sqrt{d_{*}^{(1)}} + 2\sqrt{\hat{d}^{(1)}})\sqrt{d_{*}^{(1)}} \leq (\frac{2\kappa}{8} + 1) d_{*}^{(\kappa^2)}$ \begin{align*} &||\hat{\Hc}_{\hat{d}^{(1)}} - \mathcal{H}_{\infty}||_2 \leq ||\hat{\Hc}_{d_{*}^{(1)}} - \mathcal{H}_{d_{*}^{(1)}}||_2 + ||\mathcal{H}_{d_{*}^{(1)}} - \mathcal{H}_{\infty}||_2 + \underbrace{||\hat{\Hc}_{\hat{d}^{(1)}} - \hat{\Hc}_{d_{*}^{(1)}}||_2}_{\Downarrow} \\ &\leq \underbrace{\frac{2 \mathcal{C} \beta R \sqrt{d_{*}^{(1)}}}{\kappa} \sqrt{\frac{pd_{*}^{(1)} + \log{\frac{\kappa^2 \tilde{T}}{\delta}}}{\tilde{T}}}}_{\text{Prop.}~\ref{ds_error}} +\underbrace{\frac{ \mathcal{C} \beta R (\sqrt{d_{*}^{(1)}} + 2\sqrt{\hat{d}^{(1)}})}{\kappa} \sqrt{\frac{pd_{*}^{(1)} + \log{\frac{\kappa^2 \tilde{T}}{\delta}}}{\tilde{T}}}}_{\text{Definition of }\hd^{(1)}} \\ &||\hat{\Hc}_{\hat{d}^{(1)}} - \mathcal{H}_{\infty}||_2 \leq \Big(\frac{1}{2} + \frac{1}{\kappa} \Big)\mathcal{C}\beta R \sqrt{d_{*}^{(\kappa^2)}}\sqrt{\frac{pd_{*}^{(\kappa^2)} + \log{\frac{\tilde{T}}{\delta}}}{\tilde{T}}} \end{align*} Now by assumption \[ ||\mathcal{H}_{\hat{d}^{(1)}} - \mathcal{H}_{\infty}||_2 \geq 6\mathcal{C} \beta R\sqrt{\hat{d}^{(1)}}\sqrt{\frac{p\hat{d}^{(1)} + \log{\frac{\kappa^2 \tilde{T}}{\delta}}}{\kappa^2\tilde{T}}} \] it is clear that \[ ||\hat{\Hc}_{\hat{d}^{(1)}} - \mathcal{H}_{\infty}||_2 \geq \frac{5}{6}||\mathcal{H}_{\hat{d}^{(1)}} - \mathcal{H}_{\infty}||_2 \] and we can conclude that, since $\frac{6}{5}\Big(\frac{1}{2} + \frac{1}{\kappa} \Big) < \frac{1}{\sqrt{2}}$, $$||\mathcal{H}_{\hat{d}^{(1)}} - \mathcal{H}_{\infty}||_2 < \mathcal{C}\beta R \sqrt{\frac{d_{*}^{(\kappa^2)}}{2}} \sqrt{\frac{pd_{*}^{(\kappa^2)} + \log{\frac{ \tilde{T}}{\delta}}}{\tilde{T}}}$$ which implies that $\hat{d}^{(1)} \geq d_{*}^{(\kappa^2)}$ and is a contradiction from Proposition~\ref{truncation_bounds} and Assumption 3. Because for any $d_1 \leq d_2$ we know that \[ ||\mathcal{H}_{0, \infty, \infty} - \mathcal{H}_{0, d_1, d_1}|| \geq \frac{1}{\sqrt{2}}||\mathcal{H}_{0, \infty, \infty} - \mathcal{H}_{0, d_2, d_2}|| \] So, this means that one of three assumptions do not hold. Clearly if assumption $3$ is invalid then we have a suitable lower bound on the chosen $\hd(\cdot, \cdot)$, \textit{i.e.}, since $d_{*}(\kappa^{-2} T, \delta) \leq d_{*}( T, \delta) \leq \frac{\kappa}{8} d_{*}(\kappa^{-2}T, \delta)$ we get \[ \frac{\kappa}{8} \hd(\kappa^2 \tilde{T}, \delta) \geq \frac{\kappa}{8} d_{*}(\tilde{T}, \delta) \geq d_{*}(\kappa^2 \tilde{T}, \delta) \geq \hd(\kappa^2 \tilde{T}, \delta) \geq d_{*}(\tilde{T}, \delta) \] which implies from Lemma~\ref{hd_lemma} that \begin{align*} ||\hat{\Hc}_{\hat{d}(\kappa^2 \tilde{T}, \delta)} - \mathcal{H}_{\infty}||_2 &\leq 3\mathcal{C} \beta R\sqrt{d_{*}( \kappa^2 \tilde{T}, \delta)}\sqrt{\frac{pd_{*}(\kappa^2 \tilde{T}, \delta) + \log{\frac{\kappa^2 \tilde{T}}{\delta}}}{\kappa^2 \tilde{T}}}\\ &\leq \frac{3\kappa}{8}\mathcal{C} \beta R\sqrt{\hd( \kappa^2 \tilde{T}, \delta)}\sqrt{\frac{p\hd(\kappa^2 \tilde{T}, \delta) + \log{\frac{\kappa^2 \tilde{T}}{\delta}}}{\kappa^2 \tilde{T}}} \end{align*} Similarly, if assumption $2$ is invalid then we get that \[ ||\mathcal{H}_{\hat{d}(\kappa^2 \tilde{T}, \delta)} - \mathcal{H}_{\infty}||_2 < 6\mathcal{C} \beta R\sqrt{\hat{d}( \kappa^2 \tilde{T}, \delta)}\sqrt{\frac{p\hat{d}(\kappa^2 \tilde{T}, \delta) + \log{\frac{\kappa^2 \tilde{T}}{\delta}}}{\kappa^2 \tilde{T}}} \] and because $\hd(\kappa^2 \tilde{T}, \delta) \leq d_{*}(\kappa^2 \tilde{T}, \delta)$ and $||\hat{\Hc}_{\hat{d}(\kappa^2 \tilde{T}, \delta)} - \mathcal{H}_{\infty}||_2 \leq ||\mathcal{H}_{\hat{d}(\kappa^2 \tilde{T}, \delta)} - \mathcal{H}_{\infty}||_2 + ||\hat{\Hc}_{\hat{d}(\kappa^2 \tilde{T}, \delta)} - \mathcal{H}_{\infty}||_2$ we get in a similar fashion to Proposition~\ref{ds_error} \[ ||\hat{\Hc}_{\hat{d}(\kappa^2 \tilde{T}, \delta)} - \mathcal{H}_{\infty}||_2 \leq 12\mathcal{C} \beta R\sqrt{\hat{d}( \kappa^2 \tilde{T}, \delta)}\sqrt{\frac{p\hat{d}(\kappa^2 \tilde{T}, \delta) + \log{\frac{\kappa^2 \tilde{T}}{\delta}}}{\kappa^2 \tilde{T}}} \] Replacing $\kappa^2 \tilde{T} = T$ it is clear that for any $\kappa \geq 20$ \begin{equation} \label{hd_err} ||\hat{\Hc}_{\hat{d}(T, \delta)} - \mathcal{H}_{\infty}||_2 \leq {\Big(12 \vee \frac{3\kappa}{8}\Big)} \mathcal{C} \beta R\sqrt{\hat{d}( T, \delta)}\sqrt{\frac{p\hat{d}( T, \delta) + \log{\frac{T}{\delta}}}{ T}} \end{equation} If $d_{*}(T, \delta) \leq \log{\Big(\frac{T}{\delta}\Big)}$ then we can simply apply Lemma~\ref{hd_lemma} and our assertion holds. \end{proof} \section{Assumptions} \label{assumptions} In systems theory we are generally interested in finding smaller approximations of the actual system. This is usually because the higher orders of a system may not be very important to input--output relationship observed. Further, it might be more efficient (as an expressivity and space--time complexity trade--off) to learn lower dimensional approximations. At the center of such approximations is famous result: Adamyan--Arov--Krein (AAK) theorem. \begin{thm}[\cite{kung_lin_aak}] \label{aak_thm} Let $G=G(z)$ be a matrix--valued function bounded of $j\omega$ axis. Let $\sigma_1 \geq \sigma_2 \geq \ldots \sigma_k \geq \ldots \geq \sigma_n > 0$. Then $\sigma_k$ is the minimum of $||G-\hat{G}||_{H}$ over the set of all stable systems $\hat{G}$ of order less than $k$. \end{thm} Define $\mathcal{H}(G), \mathcal{H}(\hat{G})$ as the doubly infinite matrices corresponding to $G, \hat{G}$ respectively. Then by the definition of Hankel norm, $||G- \hat{G}||_{H} = ||\mathcal{H}(G) - \mathcal{H}(\hat{G})||_2 $. Theorem~\ref{aak_thm} then implies that approximating the Hankel matrix by general linear transformations of rank less that $k$ cannot be better than approximating it by a Hankel matrix of rank less than $k$. This will allow us to justify simply taking the SVD of Hankel operator to obtain the best rank $k$ system approximation (in terms of Hankel norm). In fact whenever $A$ is Schur stable we can expand $C(zI - A)^{-1}B$ as follows \begin{equation} \label{G_exp} G(z) = CB z^{-1} + CAB z^{-2} + CA^2B z^{-3} + \ldots \end{equation} A bit more intuition into why $L_{\infty}$ system norm is important is provided below. Consider all inputs $u(t)$ such that $u(t) = 0$ for all $t < 0$. Let the output of the LTI system be given by $y(t)$ when there is no noise, \textit{i.e.}, $\eta_t, w_t=0$ in Eq.~\eqref{dt_lti}. Then we have the following \begin{prop} \label{system_norm} Let $\{u_t\}_{t=1}^{\infty}, \{y_t\}_{t=1}^{\infty}$ be the input and observed output of LTI system $M$ then $$||M||_{\infty} = \sup_{||u||_2 \leq 1} \frac{||y||_2}{||u||_2}$$ Here $||y||_2$ is the usual $\ell_2$ norm on vectors. \end{prop} $L_{\infty}$ norm corresponds to usual notion of operator norm for LTI systems. Hankel norms are particularly useful from a model approximation perspective and is related to the $L_{\infty}$ norm as below \begin{prop}[Corollary 7.4~\cite{zhou1996robust}] \label{Linf_norm_result} $$||G(z)||_{\infty} \leq 2 (\sigma_1 + \sigma_2 + \ldots + \sigma_n)$$ \end{prop} The reason we use Hankel singular values(or Hankel norm) is because these have a very close relation to model approximation of LTI systems and at the same time are conveniently related to the $L_{\infty}$--norm (see~\cite{glover1984all}). \subsection*{Bounding $C_T$} In this section we will bound $C_T$ which includes the cross terms with noise and past state variables. We will show that with high probability this is only a small fraction of the total energy of the past terms. Specifically, recall \begin{align*} S_T &= \Gamma_T^{-1/2}\sum_{t=0}^{T-1} A x(t) x(t)^{'} A^{'} \Gamma_T^{-1/2} \\ C_T &= \sum_{t=0}^{T-1}\Gamma_T^{-1/2}Ax(t)\eta_{t+1}^{'}\Gamma_T^{-1/2}+ \Gamma_T^{-1/2}\eta_{t+1}x(t)^{'}A^{'}\Gamma_T^{-1/2} \end{align*} We want to show that $C_T + S_T \succeq (1 - \epsilon) S_T$. We will approach this by showing that $-\epsilon S_T \preceq C_T \preceq \epsilon S_T$. Formally, with high probability \[ ||S_T^{-1/2} C_T S_T^{-1/2}||_{\text{op}} < \epsilon \] Next, observe that $\hat{\eta}_t = \Gamma_T^{-1/2} \eta_t$, \textit{i.e.}, a transformed Gaussian vector with reduced variance. Before proving this we will need an essential result that is a variant (and stronger version) of Lemma 2 in~\cite{faradonbeh2017finite}. We defer the proof for later. \begin{lem} \label{least_eigv} For a regular, explosive dynamical system, \textit{i.e.}, $\rho_{\min}(A) > 1$. If $T \geq C \log{\Big(\frac{-\log{\delta}}{\delta}\Big)}$ where $C$ is an absolute constant, then with probability at least $1-\delta$ it holds that, \begin{align*} \rho_{\min}(\Gamma_T^{-1/2} Y_T \Gamma_T^{-1/2}) \geq \frac{c\phi(A)^2 \psi(A)^2\delta^2}{2} \end{align*} \end{lem} \begin{lem} \label{small_opnorm} For any $v \in \mathcal{S}^{n}$ we have that \begin{align*} \mathbb{P}(v^T S_T^{-1/2} C_T S_T^{-1/2} v ) \end{align*} \end{lem} \subsection{Related Work} Linear time invariant systems are an extensively studied class of models in control and systems theory. These models are used in feedback control systems (for example in planetary soft landing systems for rockets~\citep{2013lossless}) and as linear approximations to many non--linear systems that nevertheless work well in practice. In the absence of process and output noise, subspace-based system identification methods are known to learn $(C, A, B)$ (up to similarity transformation)\citep{ljung1987system,van2012subspace}. These typically involve constructing a Hankel matrix from the input--output pairs and then obtaining system parameters by a singular value decomposition. Such methods are inspired by the celebrated Ho-Kalman realization algorithm~\citep{ho1966effective}. The correctness of these methods is predicated on the knowledge of $n$ or presence of infinite data. Other approaches include rank minimization-based methods for system identification \citep{fazel2013hankel,grussler2018low}, further relaxing the rank constraint to a suitable convex formulation. However, there is a lack of statistical guarantees for these algorithms, and it is unclear how much data is required to obtain accurate estimates of system parameters from finite noisy data. Empirical methods such as the EM algorithm \citep{roweis1999unifying} are also used in practice; however, these suffer from non-convexity in problem formulation and can get trapped in local minima. Learning simpler approximations to complex models in the presence of finite noisy data was studied in~\citet{venkatesh2001system} where identification error is decomposed into error due to approximation and error due to noise; however the analysis assumes the knowledge of a ``good'' parametrization and does not provide statistical guarantees for learning the system parameters of such an approximation. More recently, there has been a resurgence in the study of statistical identification of LTI systems from a single time series in the machine learning community. In cases when $C = I$, \textit{i.e.}, $X_t$ is observed directly, sharp finite time error bounds for identification of $A, B$ from a single time series are provided in~\citet{faradonbeh2017finite,simchowitz2018learning,sarkar2018}. The approach to finding $A, B$ is based on a standard ordinary least squares (OLS) given by $$ (\hat{A}, \hat{B}) = \arg \min_{A, B} \sum_{t=1}^T ||X_{t+1} - [A, B][X_t^{\top}, U_t^{\top}]^{\top}||_2^2$$ Another closely related area is that of online prediction in time series~\citet{hazan2018spectral,agarwal2018time}. Finite time regret guarantees for prediction in linear time series are provided in~\citet{hazan2018spectral}. The approach there circumvents the need for system identification and instead uses a filtering technique that convolves the time series with eigenvectors of a specific Hankel matrix. { Closest to our work is that of~\citet{oymak2018non}. Their algorithm, which takes inspiration from the Kalman--Ho algorithm, assumes the knowledge of model order $n$. This limits the applicability of the algorithm in two ways: first, it is unclear how the techniques can be extended to the case when $n$ is unknown---as is usually the case---and, second, in many cases $n$ is very large and a much lower order LTI system can be a very good approximation of the original system. In such case, constructing the order $n$ estimate might be unnecessarily conservative (See Example~\ref{truncation_example}). Consequently, the error bounds do not reflect accurate dependence on the system parameters. In contrast, the work here has a more non--parametric flavor and error guarantees provided are data--dependent. Furthermore, the error rates for $(C, A, B)$--estimation in~\citet{oymak2018non} decay as $O(T^{-1/4})$ and it is unclear if those rates can be improved. Other related work on identifying finite impulse response approximations include~\citet{goldenshluger1998nonparametric,tu2017non}; but they do not discuss parameter estimation or reduced order modeling. Several authors~\citet{campi2002finite,shah2012linear,hardt2016gradient} and references therein have studied the problem of system identification in different contexts. However, they fail to capture the correct dependence of system parameters on error rates. More importantly, they suffer from the same limitation as~\citet{oymak2018non} that they require the knowledge of $n$. \section{Discussion} \label{discussion} We propose a new approach to system identification when we observe only finite noisy data. Typically, the order of an LTI system is large and unknown and a priori parametrizations may fail to yield accurate estimates of the underlying system. However, our results suggest that there always exists a lower order approximation of the original LTI system that can be learned with high probability. The central theme of our approach is to recover the order of the best approximation that can be accurately learned. Specifically, we show that identification of such approximations is closely related to the singular values of the system Hankel matrix. In fact, the time required to learn a $k$--order approximation scales as $T = \Omega(\frac{\beta^2}{\sigma_k^2})$ where $\sigma_k$ is the $k$--the singular value of system Hankel matrix. This means that system identification does not explicitly depend on the model order $n$, rather depends on $n$ through $\sigma_n$. As a result, in the presence of finite data it is preferable to learn only the ``significant'' (and perhaps much smaller) part of the system when $n$ is very large and $\sigma_n \ll 1$. Algorithm~\ref{alg:learn_ls} and \ref{alg:svd} provide a guided mechanism for learning the parameters of such significant approximations with optimal rules for hyperparameter selection given in Algorithms~\ref{alg:d_choice} and \ref{alg:k_choice}. Future directions for our work include extending the existing low--rank optimization-based identification techniques, such as~\citep{fazel2013hankel,grussler2018low}, which typically lack statistical guarantees. Since Hankel based operators occur quite naturally in general (not necessarily linear) dynamical systems, exploring if our methods could be extended for identification of such systems appears to be an exciting direction. \section{Experiments} \label{experiments} Suppose that the LTI system generating data, $M$, has transfer function given by \begin{equation} \label{fir} G(z) = w_0 + \sum_{l=1}^{149} w_l \rho^l z^{-l}, \hspace{2mm} \rho = 0.9 \end{equation} where $w_i \sim {\mathcal{N}}(0, 25)$. $M$ is a finite dimensional LTI system or order $150$ with parameters as $M = (C \in \mathbb{R}^{1 \times 150}, A \in \mathbb{R}^{150 \times 150}, B \in \mathbb{R}^{150 \times 1})$. Furthermore, we choose $\Delta_+ = 0.01$ which we obtain from the estimated Hankel matrix. We also choose $\kappa = 20, \mathcal{C} = \kappa^{-1}\Delta_+$. Throughout the paper $\mathcal{C}$ refers to the universal constant in Theorem~\ref{hankel_convergence} and only affects the probability of being incorrect: $\delta$. In fact, if $\mathcal{C}$ is lowered, $\delta$ increases. For example: if $\mathcal{C} \rightarrow \mathcal{C}/l \implies \delta \rightarrow l\delta $. \begin{figure}[H] \subfigure[Choice of $d$ with $T$]{\includegraphics[width=0.5\textwidth]{images/rh_90_d_choice.jpg}\label{fig:d_choice}} \subfigure[Choice of $k$ with $T$]{\includegraphics[width=0.5\textwidth]{images/rh_90_r_choice.jpg}\label{fig:r_choice}} \caption{$d,k$ variation with number of data points} \label{figs:dr_choice} \end{figure} Fig.~\ref{figs:dr_choice} shows how $d = \hd, k$ change with the number of data points. Although the number of data points increases to $T = 5 \times 10^4$, observe that in Fig.~\ref{fig:d_choice} $\hd$, the size of $\hat{\Hc}_{0, \hd, \hd}$, does not increase more than $15$. This suggests that the LTI system can be represented very parsimoniously. For parameter estimation, we need to recover the singular vectors of $\hat{\Hc}_{0, \hd, \hd}$. Fig.~\ref{fig:r_choice} shows the variation of $k$ with number of data points. Although the true model order is $150$, due to noisy data we can only recover an order $10$ approximation. Furthermore, in Fig.~\ref{fig:r_err_choice} we plot the error between the true order--$k$ approximation, $G_k$, and the estimated order--$k$ approximation, ${G}^{\text{est}}_k$. For $k = 4, 8, 10$ the errors are low and comparable, but when $k = 16$ the error increases. This suggests that the theoretical threshold is not too conservative. \begin{figure}[H] \subfigure[$||G-G^{\text{est}}_k||_H$ vs. $T$]{\includegraphics[width=0.5\textwidth]{images/error_tru_model_rh_90.jpg}\label{fig:tru_err_choice}} \subfigure[$||G_k-G^{\text{est}}_k||_H$ vs. $T$]{\includegraphics[width=0.5\textwidth]{images/error_r_90.jpg}\label{fig:r_err_choice}} \caption{Error between true and estimated models} \label{figs:errors} \end{figure} In Fig.~\ref{fig:tru_err_choice} we also show the error between estimated model approximations of order picked by Algorithm~\ref{alg:k_choice} and the true model. \subsection*{Bounding $\alpha_t$} Here the hard step is to control the quantity \[ \alpha_t =\Gamma_{T}^{-1/2} A x(t) x(t)^{'}A^{'} \Gamma_T^{-1/2} \] One way to deal with this is by observing that $x(t) = \sum_{s=0}^{t-1} A^{t-s} \eta_s$, then $\Gamma_{T}^{-1/2} A x(t) = \sum_{s=0}^t \Gamma_{T}^{-1/2} A^{t+1-s} \eta_s$. This can be written as \[ \Gamma_{T}^{-1/2} A x(t) = \sum_{j=1}^d \sum_{s=0}^t \Gamma_{T}^{-1/2} A^{t+1-s} e_j\eta_{sj} \] Now, we look at the Hermitian dilation of $\Gamma_{T}^{-1/2} A x(t)$ which is given by \[ \mathcal{H}(A x(t)) = \begin{bmatrix} 0 & \Gamma_{T}^{-1/2} A x(t) \\ x^{'}(t) A^{'} \Gamma_{T}^{-1/2} & 0 \end{bmatrix} \] which can be written as \[ \mathcal{H}(A x(t)) = \sum_{j=1}^d \sum_{s=0}^{t} \eta_{sj}\begin{bmatrix} 0 & \Gamma_{T}^{-1/2} A^{t+1-s} e_j \\ e_j^{'} (A^{t+1-s})^{'} \Gamma_{T}^{-1/2} & 0 \end{bmatrix} \] where $A_{sj} = \begin{bmatrix} 0 & \Gamma_{T}^{-1/2} A^{t+1-s} e_j \\ e_j^{'} (A^{t+1-s})^{'} \Gamma_{T}^{-1/2} & 0 \end{bmatrix}$ Then it can be shown that $$ \sum_{s, j} A_{sj}^2 = \begin{bmatrix} \sum_{s=0}^{t} \Gamma_{T}^{-1/2} A^{t+1-s} (A^{t+1-s})^{'} \Gamma_{T}^{-1/2} & 0 \\ 0 & \text{trace}(\sum_{s=0}^{t} \Gamma_{T}^{-1/2} A^{t+1-s} (A^{t+1-s})^{'} \Gamma_{T}^{-1/2}) \end{bmatrix} $$ Here $\sigma_1(\sum_{s, j}A^2_{sj}) \leq \text{trace}(\Gamma_T^{-1/2} \Gamma_t \Gamma_T^{-1/2})$, then since we have $D_T$ in the form \[ D_t = \sum_{k} \gamma_k A_k \] where $A_k$ are fixed and $\gamma_k$ are i.i.d. subgaussian. We can bound the operator norm by results in~\cite{tropp2012user}, and this is of the form \[ \mathbb{P}(||\alpha_t||_{\text{op}} > z) \leq 2d \exp{-\dfrac{z^2}{2 \text{trace}(\Gamma_T^{-1/2} \Gamma_t \Gamma_T^{-1/2})}} \] Observe the term $x_t = A^t x_0 + \sum_{\tau=1}^t A^{\tau-1} \eta_{\tau}$. One can alternately write this as \begin{align*} x_t &= \sum_{j=1}^d \sum_{s=0}^t A^{t-s} e_j\eta_{sj} \\ x_t \eta_{t+1}^{'} &= \sum_{j=1}^d \sum_{s=0}^t \eta_{sj} A^{t-s} e_j\eta_{t+1}^{'} \\ A x_t \eta_{t+1}^{'} &= \sum_{j=1}^d\sum_{k=1}^d \sum_{s=0}^t \eta_{sj}\eta_{t+1, k} A^{t+1-s} e_je_k^{'} \end{align*} The proof of our fact will hinge on bounding the operator norm of $Ax_t \eta_{t+1}^{'}$. Observe that $Ax_t \eta_{t+1}^{'}$ is a martingale difference sequence. Further, Now we give a concentration result for $C_T$. \subsection*{Bounding $C_T$} We work after conditioning under $\mathcal{W}$. Then let $Z_t = \Gamma_{T}^{-1/2}A x(t) \eta_{t+1}^{'} \Gamma_T^{-1/2}$, we have that almost surely \[ C_T = \sum_{t=0}^{T-1} Z_t + Z_t^{'} \] $Z_t = uv^{'}$, then it is known that $uv^{'} + v u^{'} \succeq -uu^{'} - vv^{'}$ which follows from the fact that $(u+v)(u+v)^{'} \succeq 0$. Then $C_T \succeq \sum_{t=1}^T - Z_t Z_t^{'} - Z_t^{'} Z_t$. \begin{align*} Z_t Z_t^{'} &= (\eta^{'}_{t+1}\Gamma_T^{-1} \eta_{t+1} )(\Gamma_{T}^{-1/2}A x(t) x^{'}(t) A^{'} \Gamma_{T}^{-1/2} )\\ Z_t^{'} Z_t &= (x(t)^{'}A^{'}\Gamma_T^{-1} A x(t))\Gamma_T^{-1/2} \eta_{t} \eta^{'}_{t} \Gamma_T^{-1/2} \end{align*} All noise terms are less that $\sqrt{2d \log{Td/\delta}}$ with probability at least $1 - \delta$. \begin{lem} \label{noise_bnd} Under the event $\mathcal{W}$, we have that almost surely \[ \eta_{t+1}^{'} \Gamma_T^{-1} \eta_{t+1} \leq 2d \log{(2Td/\delta)}\text{trace}(\Gamma_T^{-1}) \] \end{lem} \begin{proof} This follows because we are working under the assumption that $||\eta_t||_{\infty} \leq \sqrt{\log{(2Td/\delta)}}$ \end{proof} \begin{lem} Under the event $\mathcal{W}$, we have that \label{state_bnd} \[ x(t)^{'}A^{'}\Gamma_T^{-1} A x(t) \leq \log{(2Td/\delta)}\text{trace}(\Gamma_T^{-1/2} \Gamma_t \Gamma_T^{-1/2}) \] \end{lem} Lemma~\ref{noise_bnd},~\ref{state_bnd} suggest that whenever we have an explosive system. The term $Z_t Z_t^{'}$ is dominated by $\Gamma_T^{-1/2} Ax(t)x(t)^{'}A^{'}\Gamma_T^{-1/2}$. Further, $Z_t ^{'} Z_t$ then can be shown to concentrate around $\dfrac{2\log{Td}}{\delta^2}$, formally define $ N_T = \sqrt{2\log{Td}}/\delta \begin{bmatrix} \sqrt{\Gamma_T^{-1/2} \Gamma_1\Gamma_T^{-1/2}}\eta^{'}_1\\ \vdots \\ \sqrt{\Gamma_T^{-1/2} \Gamma_T\Gamma_T^{-1/2}}\eta^{'}_T \end{bmatrix}$ \begin{prop} \label{scale_noise} Then $\mathbb{P}(||N_T||_{\text{op}} \geq \epsilon T) \leq 2d\exp{-\epsilon^2 T \delta / \log{T}}$ \end{prop} The key conclusion here is that $C_T$ is dominated by the psd terms, \textit{i.e.}, $\sum_{t=1}^T \Gamma_T^{-1/2} \eta_t \eta_t^{'} + A x(t-1) x^{'}(t-1) A^{'} \Gamma_T^{-1/2} $. That is with high probability we can conclude that \[ V_T \succeq (1 - \epsilon) \sum_{t=1}^T \Gamma_T^{-1/2} \eta_t \eta_t^{'} + A x(t-1) x^{'}(t-1) A^{'} \Gamma_T^{-1/2} \] As a result $s_{\min}(\sum_{t=0}^{T}x(t)x(t)^{'}) \geq \Omega(T)$. We have shown that the convergence for explosive systems is at least as fast as the stable system. A closer analysis would give us the exponential dependence, but this proof would not be very different from the analysis in Proposition 9~\cite{faradonbeh2017finite}. \begin{cor} \label{lower_bnd} There exists an absolute constant $C, C^{'}$ such that for $T \geq (C/\delta)( \log{1/\delta} + d \log{d})$ we have that \[ ||A - \hat{A}||_{\text{op}} \leq (C^{'}/\sqrt{T})\sqrt{d \log{d /\delta}} \] \end{cor} \section{Introduction} \label{introduction} Finite-time system identification---the problem of estimating the system parameters given a finite single time series of its output---is an important problem in the context of control theory, time series analysis, robotics, and economics, among many others. In this work, we focus on parameter estimation and model approximation of linear time invariant (LTI) systems, which are described by \begin{align} X_{t+1} &= A X_t + B U_t + \eta_{t+1} \nonumber \\ Y_t &= C X_t + w_t \label{dt_lti} \end{align} Here $C \in \mathbb{R}^{p \times n}, A \in \mathbb{R}^{n \times n}, B \in \mathbb{R}^{n \times m}$; $\{\eta_t, w_t\}_{t=1}^{\infty}$ are process and output noise, $U_t$ is an external control input, $X_t$ is the latent state variable and $Y_t$ is the observed output. The goal here is parameter estimation, \textit{i.e.}, learning $(C, A, B)$ from a single finite time series of $\{Y_t, U_t\}_{t=1}^T$ when the order, $n$, is unknown. Since typically $p,m < n$, it becomes challenging to find suitable parametrizations of LTI systems for provably efficient learning. When $\{X_j\}_{j=1}^{\infty}$ are observed (or, $C$ is known to be the identity matrix), identification of $(C, A, B)$ in Eq.~\eqref{dt_lti} is significantly easier, and ordinary least squares (OLS) is a statistically optimal estimator. It is, in general, unclear how (or if) OLS can be employed in the case when $X_t$'s are not observed. To motivate the study of a lower-order approximation of a high-order system, consider the following example: \begin{example} \label{truncation_example} Consider $M_1=(A_1,B_1,C_1)$ with \begin{align} A_1 &= \begin{bmatrix} 0 & 1 & 0 & 0 & \hdots & 0 \\ 0 & 0 & 1 & 0 & \hdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & 0 & \hdots & 1 \\ -a& 0 & 0 & 0 & \hdots & 0 \end{bmatrix}_{n \times n} B_1 = \begin{bmatrix} 0 \\ 0 \\ \vdots \\ 0 \\ 1 \end{bmatrix}_{n \times 1} C_1 = B_1^{\top}\label{M1} \end{align} where $na \ll 1$ and $n > 20$. Here the order of $M_1$ is $n$. However, it can be approximated well by $M_2$ which is of a much lower order and given by \begin{align} A_2 &= \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} \hspace{2mm} B_2 = \begin{bmatrix} 0 \\ 1 \end{bmatrix} ~~~ C_2 = B_2^{\top} \label{M2} \end{align} In this case, a simple computation shows that $||M_1 - M_2||_{\infty} \leq 2na \ll 1$ for the $\mathcal{H}_\infty$-norm defined later. This suggests that the actual value of $n$ is not important; rather there exists an effective order, $r$ (which is $2$ in this case). This lower order model captures ``most'' of the LTI system. \end{example} Since the true model order is not known in many cases, we emphasize a nonparametric approach to identification: one which adaptively selects the best model order for the given data and approximates the underlying LTI system better as $T$ (length of data) grows. The key to this approach will be designing an estimator $\hat{M}$ from which we obtain a realization $(\hat{C}, \hat{A}, \hat{B})$ of the selected order. \section{Order Estimation Lower Bound} \label{lower_bnd} \begin{lemma}[Theorem 4.21 in~\cite{boucheron2013concentration}] \label{birge} Let $\{\mathbb{P}_i\}_{i=0}^N$ be probability laws over $(\Sigma, \mathcal{A})$ and let $\{A_i \in \mathcal{A}\}_{i=0}^N$ be disjoint events. If $a = \min_{i=0, \ldots, N} \mathbb{P}_i(A_i) \geq 1/(N+1)$, \begin{align} \label{div_relation} a \leq a \log{\Big(\frac{Na}{1-a}\Big)} + (1-a)\log{\Big(\frac{1-a}{1 - \frac{1-a}{N}}\Big)} \leq \frac{1}{N}\sum_{i=1}^N KL(P_i||P_0) \end{align} \end{lemma} \begin{lemma}[Le Cam's Method] \label{le_cam} Let $P_0, P_1$ be two probability laws then \begin{align*} \sup_{\theta \in \{0, 1\}} \mathbb{P}_{\theta}[M \neq \hat{M}] \geq \frac{1}{2} - \frac{1}{2}\sqrt{\frac{1}{2}KL(P_0 || P_1)} \end{align*} \end{lemma} \begin{prop} \label{kl_div} Let ${\mathcal{N}}_0, {\mathcal{N}}_1$ be two multivariate Gaussians with mean $\mu_0 \in \mathbb{R}^{T}, \mu_1 \in \mathbb{R}^{T}$ and covariance matrix $\Sigma_0 \in \mathbb{R}^{T \times T}, \Sigma_1 \in \mathbb{R}^{T \times T}$ respectively. Then the $\text{KL}({\mathcal{N}}_0, {\mathcal{N}}_1) = \frac{1}{2}\Big(\text{tr}(\Sigma_1^{-1}\Sigma_0) - T + \log{\frac{\text{det}(\Sigma_1)}{\text{det}(\Sigma_0)}} + \mathbb{E}_{\mu_1, \mu_0}[(\mu_1 - \mu_0)^{\top}\Sigma_1^{-1}(\mu_1 - \mu_0)]\Big)$. \end{prop} In this section we will prove a lower bound on the finite time error for model approximation. In systems theory subspace based methods are useful in estimating the true system parameters. Intuitively, it should be harder to correctly estimate the subspace that corresponds to lower Hankel singular values, or ``energy'' due to the presence of noise. However, due to strong structural constraints on Hankel matrix finding a minimax lower bound is a much harder proposition for LTI systems. Specifically, it is not clear if standard subspace identification lower bounds can provide reasonable estimates for a structured and non i.i.d. setting such as our case. To alleviate some of the technical difficulties that arise in obtaining the lower bounds, we will focus on a small set of LTI systems which are simply parametrized by a number $\zeta$. Consider the following canonical form order $1$ and $2$ LTI systems respectively with $m = p = 1$ and let $R$ be the noise-to-signal ratio bound. \begin{align} \label{canonical_form} A_0 &= \begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 0 \\ \zeta & 0 & 0 \end{bmatrix}, A_1 = A_0 , B_0 = \begin{bmatrix} 0 \\ 0 \\ \sqrt{\beta}/R \end{bmatrix}, B_1 = \begin{bmatrix} 0 \\ \sqrt{\beta}/R \\ \sqrt{\beta}/R \end{bmatrix}, C_0 = \begin{bmatrix} 0 & 0 & \sqrt{\beta} R \end{bmatrix}, C_1 =C_0 \end{align} $A_0, A_1$ are Schur stable whenever $|\zeta| < 1$. \begin{align} \mathcal{H}_{\zeta, 0} &= \beta \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & \hdots\\ 0 & 0 & 0 & 0 & 0 & \hdots \\ 0 & 0 & 0 & 0 & 0 & \hdots\\ 0 & 0 & 0 & 0 & 0 & \hdots \\ 0 & 0 & 0 & 0 & 0 & \hdots\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \end{bmatrix} \nonumber \\ \mathcal{H}_{\zeta, 1} &= \beta \begin{bmatrix} 1 & 0 & \zeta & 0 & 0 & \hdots \\ 0 & \zeta & 0 & 0 & 0 & \hdots \\ \zeta & 0 & 0 & 0 & 0 & \hdots \\ 0 & 0 & 0 & 0 & 0 & \hdots \\ 0 & 0 & 0 & 0 & 0 & \hdots \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \end{bmatrix}\label{canonical_hankel} \end{align} Here $\mathcal{H}_{\zeta, 0}, \mathcal{H}_{\zeta, 1}$ are the Hankel matrices generated by $(C_0, A_0, B_0), (C_1, A_1, B_1)$ respectively. It is easy to check that for $\mathcal{H}_{\zeta, 1}$ we have $\frac{1}{\zeta}\leq \frac{\sigma_1}{\sigma_2} \leq \frac{1+\zeta}{\zeta}$ where $\sigma_i$ are Hankel singular values. Further the rank of $\mathcal{H}_{\zeta, 0}$ is $1$ and that of $\mathcal{H}_{\zeta, 1}$ is at least $2$. Also, $\frac{||\mathcal{T} \mathcal{O}_{0, \infty}((C_i, A_i, B_i))||_2}{||\mathcal{T}_{0, \infty}((C_i, A_i, B_i))||_2} \leq R$. This construction will be key to show that identification of a particular rank realization depends on the condition number of the Hankel matrix. An alternate representation of the input--output behavior is \begin{align} \label{collected-io} \begin{bmatrix} y_T \\ y_{T-1} \\ \vdots \\ y_1 \end{bmatrix} &= \underbrace{\begin{bmatrix} CB & CA_iB & \hdots & CA_i^{T-1}B \\ 0 & CB & \hdots & CA_i^{T-2}B \\ \vdots & \vdots & \ddots& \vdots \\ 0 & 0 & \hdots & CB \end{bmatrix}}_{\Pi_i} \underbrace{\begin{bmatrix} u_{T+1} \\ u_{T} \\ \vdots \\ u_2 \end{bmatrix}}_{U}\nonumber \\ &+ \underbrace{\begin{bmatrix} C & CA_i & \hdots & CA_i^{T-1} \\ 0 & C & \hdots & CA_i^{T-2} \\ \vdots & \vdots & \ddots& \vdots \\ 0 & 0 & \hdots & C \end{bmatrix}}_{O_i} \begin{bmatrix} \eta_{T+1} \\ \eta_{T} \\ \vdots \\ \eta_2 \end{bmatrix} + \begin{bmatrix} w_T \\ w_{T-1} \\ \vdots \\ w_1 \end{bmatrix} \end{align} where $A_i \in \{A_0, A_1\}$. We will prove this result for a general class of inputs, \textit{i.e.}, active inputs. Then we will follow the same steps as in proof of Theorem 2 in~\cite{tu2018minimax}. \begin{align*} \text{KL}(P_0||P_1) &= \mathbb{E}_{P_0} \Bigg[\log{\prod_{t=1}^T \frac{\gamma_t(u_t | \{u_l, y_l\}_{l=1}^{t-1})P_0(y_t | \{u_l\}_{l=1}^{t-1})}{\gamma_t(u_t | \{u_l, y_l\}_{l=1}^{t-1})P_1(y_t | \{u_l\}_{l=1}^{t-1})}}\Bigg] \\ &= \mathbb{E}_{P_0} \Bigg[\log{\prod_{t=1}^T \frac{P_0(y_t | \{u_l\}_{l=1}^{t-1})}{P_1(y_t | \{u_l\}_{l=1}^{t-1})}}\Bigg] \end{align*} Here $\gamma_t(\cdot|\cdot)$ is the active rule for choosing $u_t$ from past data. From Eq.~\eqref{collected-io} it is clear that conditional on $\{u_l\}_{l=1}^T$, $\{y_l\}_{l=1}^{T}$ is Gaussian with mean given by $\Pi_i U$. Then we use Birge's inequality (Lemma~\ref{birge}). In our case $\Sigma_0 = O_0 O_0^{\top} + I, \Sigma_1 = O_1 O_1^{\top} + I$ where $O_i$ is given in Eq.~\eqref{collected-io}. We will apply a combination of Lemma~\ref{birge}, Proposition~\ref{kl_div} and assume $\eta_i$ are i.i.d Gaussian to obtain our desired result. Note that $O_1 = O_0$ but $\Pi_1 \neq \Pi_0$. Therefore, from Proposition~\ref{kl_div} $KL({\mathcal{N}}_0, {\mathcal{N}}_1) = \mathbb{E}_{\mu_1, \mu_0}[(\mu_1 - \mu_0)^{\top}\Sigma_1^{-1}(\mu_1 - \mu_0)] \leq T\frac{\zeta^2}{R^2}$ where $\mu_i = \Pi_i U$. For any $\delta \in (0, 1/4)$, set $a=1-\delta$ in Proposition~\ref{birge}, then we get whenever \begin{align} \delta \log{\Big(\frac{\delta}{1-\delta}\Big)} + (1 - \delta) \log{\Big(\frac{1-\delta}{\delta}\Big)} \geq \frac{T\zeta^2}{R^2} \end{align} we have $\sup_{i \neq j} \mathbb{P}_{A_i}(A_j) \geq \delta$. For $\delta \in [1/4, 1)$ we use Le Cam's method in Lemma~\ref{le_cam} and show that if $8\delta^2 \geq \frac{T \zeta^2}{R^2}$ then $\sup_{i \neq j} \mathbb{P}_{A_i}(A_j) \geq \delta$. Since $\delta^2 \geq \mathcal{C} \log{\frac{1}{\delta}}$ when $\delta \in [1/4, 1)$ for an absolute constant, our assertion holds. \section{Preliminaries} \label{sec:preliminaries} Throughout the paper, we will refer to an LTI system with dynamics as Eq.~\eqref{dt_lti} by $M=(C, A, B)$. For a matrix $A$, let $\sigma_i(A)$ be the $i^{\text{th}}$ singular value of $A$ with $\sigma_i(A) \geq \sigma_{i+1}(A)$. Further, $\sigma_{\max}(A) = \sigma_1(A) = \sigma(A)$. Similarly, we define $\rho_i(A) = |\lambda_i(A)|$, where $\lambda_i(A)$ is an eigenvalue of $A$ with $\rho_i(A) \geq \rho_{i+1}(A)$. Again, $\rho_{\max}(A) = \rho_1(A) = \rho(A)$. \begin{definition} A matrix $A$ is \textit{Schur stable} if $\rho_{\max}(A) < 1$. \end{definition} We will only be interested in the class of LTI systems that are Schur stable. Fix $\gamma > 0$ (and possibly much greater than $1$). The model class $\mathcal{M}_r$ of LTI systems parametrized by $r \in \mathbb{Z}_{+}$ is defined as \begin{equation} \label{model_class_eq} \mathcal{M}_r = \{(C, A, B)\hspace{1mm}|\hspace{1mm} C \in \mathbb{R}^{p \times r},A \in \mathbb{R}^{r \times r},B \in \mathbb{R}^{r \times m}, \rho(A) < 1, \sigma(A) \leq \gamma\}. \end{equation} \begin{definition} \label{hankel_matrix} The $(k, p, q)$--dimensional Hankel matrix for $M=(C, A, B)$ as \begin{align*} \mathcal{H}_{k, p, q}(M) = \begin{bmatrix} CA^{k}B & CA^{k+1}B & \hdots & CA^{q+k-1}B \\ CA^{k+1}B & CA^{k+2}B & \hdots & CA^{q+k}B \\ \vdots & \vdots & \ddots & \vdots \\ CA^{p+k-1}B & \hdots & \hdots & CA^{p+q+k-2}B \end{bmatrix} \end{align*} and its associated Toeplitz matrix as \begin{align*} \mathcal{T}_{k, d}(M) = \begin{bmatrix} 0 & 0 & \hdots & 0 & 0 \\ CA^{k}B & 0 & \hdots & 0 & 0\\ \vdots & \ddots & \ddots & \vdots & 0 \\ CA^{d+k-3}B & \hdots & CA^{k}B & 0 & 0\\ CA^{d+k-2}B &CA^{d+k-3}B& \hdots & CA^{k}B & 0 \end{bmatrix}. \end{align*} \end{definition} We will slightly abuse notation by referring to $\mathcal{H}_{k, p, q}(M) = \mathcal{H}_{k, p, q}$. Similarly for the Toeplitz matrices $\mathcal{T}_{k, d}(M) = \mathcal{T}_{k, d}$. The matrix $\mathcal{H}_{0, \infty, \infty}(M)$ is known as the \textit{system Hankel matrix} corresponding to $M$, and its rank is known as the \textit{model order} (or simply \textit{order}) of $M$. The system Hankel matrix has two well-known properties that make it useful for system identification. First, the rank of $\mathcal{H}_{0, \infty, \infty}$ has an upper bound $n$. Second, it maps the ``past'' inputs to ``future'' outputs. These properties are discussed in detail in appendix as Section~\ref{control_hankel}. For infinite matrices $\mathcal{H}_{0, \infty, \infty}$, $||\mathcal{H}_{0, \infty, \infty}||_2\triangleq ||\mathcal{H}_{0, \infty, \infty}||_{\text{op}}$, \textit{i.e.}, the operator norm. \begin{definition} \label{transfer_function} The \textit{transfer function} of $M=(C, A, B)$ is given by $G(z) = C(zI - A)^{-1}B$ where $z \in \mathbb{C}$. \end{definition} The transfer function plays a critical role in control theory as it relates the input to the output. Succinctly, the transfer function of an LTI system is the Z--transform of the output in response to a unit impulse input. Since for any invertible $S$ the LTI systems $M_1 = (CS^{-1}, S A S^{-1}, S B), M_2 = (C, A , B)$ have identical transfer functions, identification may not be unique, but equivalent up to a transformation $S$, \textit{i.e.}, $(C, A, B) \equiv (CS, S^{-1}AS, S^{-1}B)$. Next, we define a system norm that will be important from the perspective of model identification and approximation. \begin{definition} \label{system_norm} The $\mathcal{H}_{\infty}$--\textit{system norm} of a Schur stable LTI system $M$ is given by $$||M||_{\infty} = \sup_{\omega \in \mathbb{R}} \sigma_{\max}(G(e^{j\omega}))$$ Here, $G(\cdot)$ is the transfer function of $M$. Furthermore, the Hankel system norm is defined as $||M||_H = ||\mathcal{H}_{0, \infty, \infty}(M)||_2$. \end{definition} For a stable LTI system $M$ we have \begin{prop}[Lemma 2.2~\cite{glover1987model}] \label{sys_norm} Let $M$ be a LTI system then \[ |M||_H = \sigma_1 \leq ||M||_{\infty} \leq 2(\sigma_1 + \ldots + \sigma_n) \] where $\sigma_i$ are the Hankel singular values of $M$. Furthermore, if there exists $\Delta_{+} = \inf_i \Big( 1 - \frac{\sigma_{i+1}}{\sigma_i}\Big) > 0$ then $||M||_{\infty} \leq \frac{2||M||_H}{\Delta_{+}}$. \end{prop} {For any matrix $Z$, define $Z_{m:n, p:q}$ as the submatrix including row $m$ to $n$ and column $p$ to $q$. Further, $Z_{m:n, :}$ is the submatrix including row $m$ to $n$ and all columns and a similar notion exists for $Z_{:, p:q}$. Finally, we define balanced truncated models which will play an important role in our algorithm. \begin{definition} \label{balanced_truncations_definition} Let $\mathcal{H}_{0, \infty, \infty}(M) = U \Sigma V^{\top}$ where $\Sigma \in \mathbb{R}^{n \times n}$ ($n$ is the model order). Then for any $r \leq n$, the $r$--order balanced truncated model parameters are given by $$C_r = [U\Sigma^{1/2}]_{1:p, 1:r}, A_r = \Sigma_{1:r, 1:r}^{-1/2}U_{:, 1:r}^{\top} [U\Sigma^{1/2}]_{p+1:, 1:r}, B_r = [\Sigma^{1/2}V^{\top}]_{1:r, 1:m}$$ For $r > n$, the $r$--order balanced truncated model parameters are the $n$--order truncated model parameters. \end{definition}} A fundamental result in model reduction from systems theory is the following \begin{thm}[Theorem 21.26~\cite{zhou1996robust}] \label{balanced_truncate_model} Let $M = (C, A, B)$ be the true model of order $n$ and $M_r = (C_r, A_r, B_r)$ be its balance truncated model of order $r < n$. Assume that $\sigma_r \neq \sigma_{r+1}$. Then \[ ||M - M_r||_{\infty} \leq 2(\sigma_{r+1} + \sigma_{r+2} + \ldots + \sigma_n) \] where $\sigma_i$ are the Hankel singular values of $M$. \end{thm} Critical to obtaining refined error rates, will be a result from the theory of self--normalized martingales, an application of the pseudo-maximization technique in \citep[Theorem 14.7]{pena2008self}: \begin{thm}[Theorem 1 in~\cite{abbasi2011improved}] \label{selfnorm_main} Let $\{\bm{\mathcal{F}}_t\}_{t=0}^{\infty}$ be a filtration. Let $\{\eta_{t} \in \mathbb{R}, X_t \in \mathbb{R}^d\}_{t=1}^{\infty}$ be stochastic processes such that $\eta_t, X_t$ are $\bm{\mathcal{F}}_t$ measurable and $\eta_t$ is conditionally $L$-sub-Gaussian for some $L > 0$, \textit{i.e.}, $\forall \lambda \in \mathbb{R}, \mathbb{E}[e^{\lambda \eta_t} | \bm{\mathcal{F}}_{t-1}] \leq e^{\frac{\lambda^2 L^2}{2}} $. For any $t \geq 0$, define $ V_t = \sum_{s=1}^t X_s X_s^{\prime}, S_t = \sum_{s=1}^t \eta_{s+1} X_s $. Then for any $\delta > 0, V \succ 0$ and all $t \geq 0$ we have with probability at least $1-\delta$ \[ S_t^{\top}(V + V_t)^{-1}S_t \leq 2L^2 \Big(\log{\frac{1}{\delta}} + \log{\frac{\text{det}(V+V_t)}{\text{det}(V)}}\Big). \] \end{thm} We denote by $\mathcal{C}$ universal constants which can change from line to line. For numbers $a, b$, we define $a \wedge b \triangleq \min{(a, b)} $ and $a \vee b \triangleq \max{(a, b)}$. \\ Finally, for two matrices $M_1 \in \mathbb{R}^{l_1 \times l_1}, M_2 \in \mathbb{R}^{l_2 \times l_2}$ with $l_1 < l_2$, $M_1 - M_2 \triangleq \tilde{M}_1 - M_2$ where $\tilde{M}_1 = \begin{bmatrix}M_1 & 0_{l_1 \times l_2 -l_1} \\ 0_{l_2-l_1 \times l_1} & 0_{l_2 - l_1 \times l_2 -l_1} \end{bmatrix}$. \begin{prop}[System Reduction] \label{reduction} Let $S, P$ be matrices such that $||S-P|| \leq \epsilon$, $\text{SVD}(S) = U^S \Sigma^S (V^S)^{\top}$ and $\text{SVD}(P) = U^P \Sigma^P (V^P)^{\top}$. Assume $$\sigma_1 > \hdots > \sigma_{k-1} > \sigma_k = \hdots = \sigma_{s} > \sigma_{s+1} > \hdots > \sigma_n$$ where $\sigma_i = \sigma_i(S), \hat{\sigma}_i = \sigma_i(P)$. Furthermore, let $\sigma_{i-1} > \hat{\sigma}_i > \sigma_{i+1}$ for $i \leq r$. {Define $\Delta_+ = \inf_{\sigma_i \neq \sigma_{i+1}}\Big(1 - \frac{\sigma_{i+1}}{\sigma_i}\Big)$, then if $\epsilon \leq \frac{\sigma_{s} \Delta_{+}}{2}$ we have \begin{align*} ||U^S_{1:s} (\Sigma^S_{1:s, 1:s})^{1/2} - U^P_{1:s} (\Sigma^P_{1:s, 1:s})^{1/2}||_2 &\leq \sqrt{\sum_{i=1}^{k-1}\frac{\mathcal{C}\sigma_i \epsilon^2}{(\sigma_i - \sigma_{i+1})^2 \wedge (\sigma_{i-1} - \sigma_{i})^2}} \\ &+ \sqrt{ \frac{\mathcal{C}\sigma_s \epsilon^2}{((\sigma_{k-1} - \sigma_{k}) \wedge (\sigma_{s} - \sigma_{s+1}))^2}} + \sup_{1\leq i \leq s}|\sqrt{\sigma_i} - \sqrt{\hat{\sigma}_i}| \end{align*} for some universal constant $\mathcal{C}$ and $\sup_{1\leq i \leq s}|\sqrt{\sigma_i} - \sqrt{\hat{\sigma}_i}| \leq \frac{\mathcal{C} \epsilon}{\sqrt{\sigma_{s}}}$.} \end{prop} The proof is provided in Proposition~\ref{reduction2} in the appendix. We briefly summarize our contributions below. \section{Contributions} \label{contributions} In this paper we provide a purely data-driven approach to system identification from a single time--series of finite noisy data. Drawing from tools in systems theory and the theory of self--normalized martingales, we offer a nearly optimal OLS-based algorithm to learn the system parameters. We summarize our contributions below: \begin{itemize}[leftmargin=*] \item The central theme of our approach is to estimate the infinite system Hankel matrix (to be defined below) with increasing accuracy as the length $T$ of data grows. By utilizing a specific reformulation of the input--output relation in Eq.~\eqref{dt_lti} we reduce the problem of Hankel matrix identification to that of regression between appropriately transformed versions of output and input. The OLS solution is a matrix $\hat{\mathcal{H}}$ of size $\hd$. More precisely, we show that with probability at least $1-\delta$, \begin{align*} \Big | \Big | \hat{\mathcal{H}} - \mathcal{H}_{0, \hd, \hd} \Big | \Big |_2 &\lesssim \sqrt{\frac{\beta^2\hd }{T}} \sqrt{p\hd + \log{\frac{T}{\delta}}}. \end{align*} for $T$ above a certain threshold, where $\mathcal{H}_{0, \hd, \hd}$ is the $p\hd \times m\hd$ principal submatrix of the system Hankel. Here $\beta$ is the $\mathcal{H}_{\infty}$--system norm. \item We show that by growing $\hd$ with $T$ in a specific fashion, $\hat{\Hc}$ becomes the minimax optimal estimator of the system Hankel matrix. The choice of $\hd$ for a fixed $T$ is purely data-dependent and does not depend on spectral radius of $A$ or $n$. \item It is well known in systems theory that SVD of the doubly infinite system Hankel matrix gives us $A, B, C$. However, the presence of finite noisy data prevents learning these parameters accurately. We show that it is always possible to learn the parameters of a lower-order approximation of the underlying system. This is achieved by selecting the top $k$ singular vectors of $\hat{\Hc}$. The lower order, $k$, is a function of $T$ and grows to $n$ as $T \rightarrow \infty$. The estimation guarantee corresponds to \textit{model selection} in Statistics. More precisely, if $(A_k, B_k, C_k)$ are the parameters of the best $k$ order approximation of the original LTI system and $(\hat{A}_k, \hat{B}_k, \hat{C}_k)$ are the estimates of our algorithm then for $T$ above a certain threshold we have \begin{align*} ||C_k - \hat{C}_k||_2 + ||A_k - \hat{A}_k||_2 + ||B_k - \hat{B}_k||_2 &\lesssim \sqrt{\frac{\beta^2 \hd}{\hat{\sigma}_k^2 T}} \sqrt{p\hd + \log{\frac{T}{\delta}}} \end{align*} with probability at least $1 - \delta$ where $\hat{\sigma}_i$ is the $i^{\text{th}}$ largest singular value of $\hat{\Hc}$. \item The lower order $k$ is obtained by using a novel singular value thresholding scheme that depends purely on data, and works under mild assumptions. We show that the proposed thresholding scheme is not overly conservative, \textit{i.e.}, there exist higher order LTI systems that cannot be identified accurately with the given data length. \end{itemize} \section{Problem Formulation and Discussion} \label{problem} \subsection{Data Generation} Assume there exists an unknown $M = (C, A, B) \in \mathcal{M}_n$ for some unknown $n$. Let the transfer function of $M$ be $G(z)$. Suppose we observe the noisy output time series $\{Y_t \in \mathbb{R}^{p \times 1}\}_{t=1}^T$ in response to user chosen input series, $\{U_t \in \mathbb{R}^{m \times 1}\}_{t=1}^T$. We refer to this data generated by $M$ as $Z_T = \{(U_t, Y_t)\}_{t=1}^T$. We enforce the following assumptions on $M$. \begin{assumption} \label{noise_dist} The noise process $\{\eta_t, w_t\}_{t=1}^{\infty}$ in the dynamics of $M$ given by Eq.~\eqref{dt_lti} are i.i.d. and $\eta_t, w_t$ are isotropic with subGaussian parameter $1$. Furthermore, $X_0 = 0$ almost surely. We will only select inputs, $\{U_t\}_{t=1}^T$, that are isotropic subGaussian with subGaussian parameter $1$. \end{assumption} The input--output map of Eq.~\eqref{dt_lti} can be represented in multiple alternate ways. One commonly used reformulation of the input--output map in systems and control theory is the following \begin{equation*} \begin{bmatrix} Y_1 \\ Y_{2} \\ \vdots \\ Y_{T} \end{bmatrix} = \mathcal{T}_{0, T}\begin{bmatrix} U_1 \\ U_2 \\ \vdots \\ U_T \end{bmatrix} + \mathcal{T}\mathcal{O}_{0, T} \begin{bmatrix} \eta_1 \\ \eta_2 \\ \vdots \\ \eta_T \end{bmatrix} + \begin{bmatrix} w_1 \\ w_2 \\ \vdots \\ w_T \end{bmatrix} \end{equation*} where $\mathcal{T}\mathcal{O}_{k, d}$ is defined as the Toeplitz matrix corresponding to process noise $\eta_t$ (similar to Definition~\ref{hankel_matrix}): \begin{align*} \mathcal{T}\mathcal{O}_{k, d} = \begin{bmatrix} 0 & 0 & \hdots & 0 & 0 \\ CA^{k} & 0 & \hdots & 0 & 0\\ \vdots & \ddots & \ddots & \vdots & 0 \\ CA^{d+k-3} & \hdots & CA^{k} & 0 & 0\\ CA^{d+k-2} & CA^{d+k-3} & \hdots & CA^{k} & 0 \end{bmatrix}. \end{align*} $||\mathcal{T}_{0, T}||_2, ||\mathcal{T}\mathcal{O}_{0, T}||_2$ denote observed amplifications of the control input and process noise respectively. Note that stability of $A$ ensures $||\mathcal{T}_{0, \infty}||_2, ||\mathcal{T}\mathcal{O}_{0, \infty}||_2 < \infty$. Suppose both $\eta_t, w_t = 0$ in Eq.~\eqref{dt_lti}. Then it is a well-known fact that \begin{equation} ||M||_{\infty} = \sup_{U_t}\sqrt{\frac{\sum_{t=0}^{\infty} Y_t^{\top}Y_t}{\sum_{t=0}^{\infty} U_t^{\top}U_t}} \implies ||M||_{\infty} = ||\mathcal{T}_{0, \infty}||_2 \geq ||\mathcal{H}_{0, \infty, \infty}||_2. \label{Linf_norm} \end{equation} \begin{assumption} \label{non-zero-gap} There exist universal constants $\beta, R \geq 1$ such that $||\mathcal{T}_{0, \infty}||_2 \leq \beta,~~ \frac{||\mathcal{T}\mathcal{O}_{0, \infty}||_2}{||\mathcal{T}_{0, \infty}||_2} \leq R$ \end{assumption} \begin{remark} \label{non-zero-gap_rmk} Assumption~\ref{non-zero-gap} implies that an upper bound to the $\mathcal{H}_{\infty}$--norm of the system. It is possible to estimate $||M||_{\infty}$ from data (See~\cite{tu2018approximation} and references therein). It is reasonable to expect that error rates for identification of the parameters $(C, A, B)$ depend on the \textit{noise-to-signal ratio} $\frac{||\mathcal{T}\mathcal{O}_{0, \infty}||_2}{||\mathcal{T}_{0, \infty}||_2}$, \textit{i.e.}, identification is much harder when the ratio is large. Furthermore, if $\mathbb{E}[U_{t}^{\top}U_t] = mL$ then $R \rightarrow R/L$. In our case by Assumption~\ref{noise_dist} we have $L = 1$. \end{remark} \subsection{Order Estimation Lower Bound} In Theorem~\ref{balanced_truncation} it is shown that whenever $T = \Omega(\frac{1}{\sigma_k^2})$ we can find an accurate $k$--order approximation. Now we show that if $T = O(\frac{1}{\sigma_k^2})$ then there is always some non--zero probability with which we can not recover the singular vector corresponding to the $\sigma_{k+1}$. We prove the following lower bound for model order estimation when inputs $\{U_t\}_{t=1}^T$ are active and bounded which we define below \begin{definition} \label{active_input} An input sequence $\{U_t\}_{t=1}^T$ is said to be active if $U_t$ is allowed to depend on past history $\{U_l, Y_l\}_{l=1}^{t-1}$. The input sequence is bounded if $\mathbb{E}[U_t^{\top}U_t] \leq 1$ for all $t$. \end{definition} Active inputs allow for the case when input selection can be adaptive due to feedback. \begin{thm} \label{inf_lowerbnd} Fix $\delta > 0, \zeta \in (0, 1/2)$. Let $M_1, M_2$ be two LTI systems and $\sigma_i^{(1)}, \sigma_i^{(2)}$ be the Hankel singular values respectively. Let $\frac{\sigma^{(1)}_1}{\sigma^{(1)}_2} \leq \frac{2}{\zeta}$ and $\sigma^{(2)}_2 = 0$. Then whenever $T \leq \frac{\mathcal{C} R^2}{\zeta^2}\log{\frac{2}{\delta}}$ we have \[ \sup_{M \in \{M_1, M_2\}}\mathbb{P}_{Z_T \sim M}(\text{order}(\hat{M}(Z_T)) \neq \text{order}(M)) \geq \delta \] Here $Z_T=\{U_t, Y_t\}_{t=1}^T \sim M$ means $M$ generates $T$ data points $\{Y_t\}_{t=1}^T$ in response to active and bounded inputs $\{U_t\}_{t=1}^T$ and $\hat{M}(Z_T)$ is any estimator. \end{thm} \begin{proof} The proof can be found in appendix in Section~\ref{lower_bnd} and involves using Fano's (or Birge's) inequality to compute the minimax risk between the probability density functions generated by two different LTI systems: \begin{align} \label{canonical_form} A_0 &= \begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 0 \\ \zeta & 0 & 0 \end{bmatrix}, A_1 = A_0 , B_0 = \begin{bmatrix} 0 \\ 0 \\ \sqrt{\beta}/R \end{bmatrix}, B_1 = \begin{bmatrix} 0 \\ \sqrt{\beta}/R \\ \sqrt{\beta}/R \end{bmatrix}, C_0 = \begin{bmatrix} 0 & 0 & \sqrt{\beta} R \end{bmatrix}, C_1 =C_0 \end{align} $A_0, A_1$ are Schur stable whenever $|\zeta| < 1$. \end{proof} We compare this to the thresholding rule in Line $2$ in Algorithm~\ref{alg:k_choice}, the largest $k$ satisfies \[ \frac{{\sigma_l(\hat{\mathcal{H}}_{0, \hd, \hd})}}{\beta } \geq 4\tau(\Delta_+) \implies \frac{T}{\log{\frac{T}{\delta}}} \geq \frac{\mathcal{C} \kappa^2\beta^2 R^2}{ \hat{\sigma}^2_k(\mathcal{H}_{0, \hd, \hd})} \approx \frac{\mathcal{C} \kappa^2}{\Delta^2_+} R^2 \Big(\frac{\beta}{ \sigma_k}\Big)^2 \] The ratio $\frac{\beta}{\sigma_k}$ is equal to the condition number of the Hankel matrix (up to scaling by $\frac{1}{\Delta_+}$; follows from Proposition~\ref{sys_norm}). In this sense, the thresholding rule is optimal in terms of $R$ (the signal-to-noise ratio) and conditioning of the Hankel matrix. \section{Miscellaneous Results} \label{partial_results} From Eq.~\eqref{diff_eq} we have the following observations: there are two kinds of terms \begin{itemize} \item The term where dimensions do not grow with $T$ \begin{align} \Big | \Big |\Big(\sum_{l=1}^T \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l+d, d}\Big)^{\dagger} &\Big(\sum_{l=1}^T \tilde{U}^{-}_{l+d, d} \tilde{U}^{+ \prime}_{l+d, d-1} \mathcal{H}_{0, d}^{T \prime} \nonumber\\ &+ \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{+ \prime}_{l+1+d, d-1}O^{T \prime}_{0, d} + \tilde{U}^{-}_{l+d, d}\tilde{\eta}^{- \prime}_{l+d, d} O_{0, d, d}^{\prime} \Big)\Big | \Big |_2 \label{d_error} \end{align} which can be bounded by Theorem 1 in~\cite{abbasi2011improved}. \item The term where dimension grows with $T$ \begin{align} \Big | \Big |\Big(\sum_{l=1}^T \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l+d, d}\Big)^{\dagger} &\Big(\sum_{l=1}^T \tilde{U}^{-}_{l+d, d} \tilde{\eta}^{- \prime}_{l, l} O_{d, d, l}^{\prime} \nonumber \\ &+ \tilde{U}^{-}_{l+d, d} \tilde{U}^{- \prime}_{l, l}\mathcal{H}_{d, d, l}^{\prime} \Big)\Big | \Big |_2 \label{T_error} \end{align} \end{itemize} \section{Problem Formulation and Discussion} \label{problem} First we state the main assumptions in our paper. [MD] These assumptions are associated with the process that generated the data. On their own, they don't mean anything. They need to come after data generation. Also, use the more abbreviated notations... \begin{assumption} \label{system_norm} For any $M = \Theta(C, A, B)$ we assume that \begin{itemize} \item $A$ is Schur stable and $\sigma_1(A) \leq \gamma$. \item $||M||_{\infty} \leq \beta$. \end{itemize} \end{assumption} \begin{assumption} \label{noise_dist} The noise process $\{\eta_t, w_t\}_{t=1}^{\infty}$ are i.i.d. and $\eta_t, w_t$ are subGaussian with variance proxy $1$. \end{assumption} \begin{assumption} \label{minimal} $M=\Theta(C, A, B)$ is minimal. \end{assumption} \begin{remark} \label{non-minimal} The assumption of minimality is not too limiting because if the rank of $\mathcal{H}_{0, \infty, \infty}(C, A, B) = r < n$, we could always find the reduced minimal system. [Show in appendix] [MD] This all could be avoided by defining $\mathcal{M}_n$ as the set of minimal realizations of size n. Then place that in the right location. \end{remark} \begin{assumption} \label{non-zero-gap} Let $\sigma_i = \sigma_i(\mathcal{H}_{\infty}(C, A, B))$ such that $\sigma_{i} \geq \sigma_{i+1}$. Then there exists $\Delta_{+} > 0$ such that \[ \Delta_{+} = \inf_{\sigma_i \neq \sigma_{i+1}} \Big(1 - \frac{\sigma_{i+1}}{\sigma_i}\Big) \] \end{assumption} \begin{remark} \label{non-zero-gap_rmk} Assumption in~\ref{non-zero-gap} is merely a technical one to make our results go through. We can easily extend our analysis to work for the case when all singular values are equal. All that means is that any subspace vector behaves exactly the same -- the Hankel is identity matrix scaled by its Hankel norm. \end{remark} \subsection{Data Generation} Consider an unknown finite dimensional LTI system $M = \Theta(C, A, B)$. Let $\{U_t\}_{t=1}^T$ be the user chosen input and $\{Y_t\}_{t=1}^T$ is the observed noisy output time series. Then the data generated by $M$ is $\{Z_t = (U_t, Y_t)\}_{t=1}^T$. [MD] Here you should state all the assumptions on M. When $T = \infty$, \text{i.e.}, we have an infinite supply of data, it is widely known that $M$ can be recovered (See~\cite{ljung1992asymptotic}). [MD] Is this analyzed with noise? When you say $T=\infty$ is this a non-asymptotic result? The problem arises when we have finite noisy data, \textit{i.e.}, $T < \infty$. Standard arguments based on asymptotic normality ([MD] ???) fail to provide statistical guarantees for learning $M$ when we have finite data. Typically, finite data limits the complexity of models that can be learned with statistical guarantees. For example it is well known that if $n$ is very large and $T < n$ then the estimation error for any scheme will be large (See discussion in~\cite{venkatesh2001system}). This motivates the question of \textit{how much can we learn from finite noisy data?} We formalize this notion below. \subsection{Model Misspecification} \begin{definition} \label{model_class} The class of LTI systems with model order $\leq r$, $\mathcal{M}_r$, is defined as [MD] I would say use the simplest definition I gave. No need to have A's with higher dimension and minimal realization be smaller. In fact, if $\mathcal{M}_r$ is defined to have only minimal realization, then everything will be clean. \begin{equation} \label{model_class_eq} \mathcal{M}_r = \{\Theta(\tilde{C}, \tilde{A}, \tilde{B})\hspace{1mm}|\hspace{1mm} \text{rank}(\mathcal{H}_{0, \infty, \infty}(\tilde{C}, \tilde{A}, \tilde{B})) \leq r\} \end{equation} \end{definition} Note that $\mathcal{M}_n \subseteq \mathcal{M}_{n+1}$, \textit{i.e.}, $\{\mathcal{M}_k \}_{k=1}^D$ forms a nested class of models. Denote by $\mathcal{M}$ as the class of all finite dimensional LTI systems. Although we assume that the unknown LTI system $M \in \mathcal{M}$, we do not know for which $n$ we have ([MD] i don't think you need to write this as a minimization problem; just say that that n is unknown.....) \[ \inf_{P \in \mathcal{M}_n} ||M - P|| = 0 \] ([MD] not sure what this means--need to rephrase: n is unknown and may be high) Clearly $n$ is an upper bound for model order of $M$, however, due to its unknown nature, it is typically hard to parametrize apriori a model class that can learn the unknown model accurately. Instead we will be interested in finding the ( [MD] the largest order) model estimate allowed by the finite data constraint. To this end, we define the set of models in $\mathcal{M}_r$ that are ``closest'' to $M$. \begin{definition} \label{best_approx} Let $M$ be an LTI system. Then the set of LTI systems in $\mathcal{M}_r$ closest to $M$ are defined as \begin{equation} \mathcal{M}_r^{*}(M) = \{M_r \hspace{1mm} | \hspace{1mm} \inf_{P \in \mathcal{M}_r} ||M - P|| = ||M - M_r|| \} \end{equation} \end{definition} Next, we describe the notion of ``largest possible parametrization''. \begin{definition} \label{paramterization} Let $\mathcal{A}$ be any learning algorithm, $M$ an unknown LTI system and fix $T, \epsilon, \delta > 0$. Further let $\hat{M}_{\mathcal{A}}(r, T, M) \in \mathcal{M}_{r}$ be the $r$--order model estimate by $\mathcal{A}$ from $T$ data points generated by $M$. Then the largest possible parametrization allowed by $T$ is defined as the largest possible $r \in \mathbb{Z}_{+}$ that satisfies \begin{align} \label{r0_eq} \inf_{\mathcal{A}} \sup_{M} \inf_{M_r \in \mathcal{M}^{*}_r({M})}||\hat{M}_{\mathcal{A}}(r, T, M) - M_{r}|| \leq \epsilon \end{align} with probability at least $1 - \delta$. \end{definition} \begin{remark} \label{param_rmk} Definition~\ref{paramterization} implicitly assumes that any algorithm $\mathcal{A}$ is free to choose any input sequence $\{U_t\}_{t=1}^T$. Further the randomness there is over realizations of the noise process. \end{remark} For the rest of this discussion we address the largest possible paramatrization by $r_0 = r(T, \epsilon, \delta)$ and assume for simplicity $\mathcal{M}_{r_0}^{*}(M) = \{ M_{r_0}(M) \}$. This parametrization is not fixed apriori, rather grows with $T$. For example, if $T = \infty$ we can recover the true model. The notion of $r_0$ has two key features. \begin{itemize} \item First, it gives us an upper bound on the complexity of LTI systems that can be learned ``accurately'' within time $T$. The notion of accuracy is controlled by the parameters $\epsilon, \delta$. Furthermore, no LTI system with order greater than $ r_0$ can be learned within the $(\epsilon, \delta)$ accuracy for any data of length $T$. Definition~\ref{paramterization} can then be interpreted as a form of {\it model order selection} for finite data. \item The error in Eq.~\eqref{r0_eq} is measured between the estimate and a parametrized class, \textit{i.e.}, $\mathcal{M}_{r_0}^{*}(M)$ instead of the true model $M$. This is motivated by the inequality: \begin{equation*} ||M - M_{r_0}(M)|| \leq ||M-\hat{M}_{\mathcal{A}}(r_0, T, M)|| \leq ||M - M_{r_0}(M)|| + ||M_r - \hat{M}_{\mathcal{A}}(r_0, T, M)|| \end{equation*} ([MD]--This paragraph is confusing) {\bf This helps because in many cases learning $M_{r_0}(M)$ will be much easier than learning $M$. For example, when $n$ (true order) is very large, $r_0 << n$, and $||M - M_{r_0}(M)||$ is insignificant it might be statistically very hard to learn $M - M_{r_0}(M)$. This suggests that we do not need to learn the entire system at all: learning the optimal $r_0$--order model approximation suffices. This is motivated by the following observation. } [MD] In principle, one can define the error between the estimate and the actual system that generated the data. Because we do not provide an upper bound on the order of the original system, it is possible to construct a system of high enough order, that is consistent with the observed data, where the error is always greater than a fixed bound no matter how we obtain the estimate (need to verify!). Our definition asserts that we should aim for a lower dimensional estimate that is convergent to the optimal lower dimensional approximation of the system. For any algorithm $\mathcal{A}$, $||M - M_{r_0}(M)||$ is not $\mathcal{A}$--dependent and is called the ``model misspecification error'', \textit{i.e.}, the error that comes from modeling complex systems by simpler models. (MD not sure what you mean here---may be you are arguing what I wrote above). {\bf Further, due to the maximality of $r_0$ this is unavoidable. The only way to make $||M-\hat{M}_{\mathcal{A}}(r_0, T, M)||$ smaller is by reducing $||M_{r_0} - \hat{M}_{\mathcal{A}}(r_0, T, M)||$.} \end{itemize} \subsection{Objectives} The goal of this paper can be summarized as follows: \begin{itemize} \item Characterize the function $r(\cdot, \cdot, \cdot)$ that relates $r_0$ and $T, \epsilon, \delta$. \item Find a computationally efficient algorithm $\mathcal{A}_0$, \textit{i.e.}, that runs polynomially in $T$, such that for some universal constant $c$ we have with probability at least $1-\delta$ \begin{equation} \label{alg_req} \sup_{M}||\hat{M}_{\mathcal{A}_0}(r_0, cT, M) - M_{r_0}(M)|| \leq \epsilon \end{equation} where $r_0 = r(T, \epsilon, \delta)$ \end{itemize} In general, it might be quite hard to find the best algorithm, $\mathcal{A}^{*}$, that gives the best relation between $r_0$ and $T, \epsilon, \delta$ for every $M$. As a result we relax the requirement to Eq.~\eqref{alg_req} where we find a computationally efficient algorithm $\mathcal{A}_0$ that differs from the most optimal one by a universal constant $c$. In other words, if the best algorithm $\mathcal{A}^{*}$ learns the best $r_0$--order approximate model in $T$ data, the algorithm $\mathcal{A}_0$ learns it in at most $cT$ data. We summarize this in Fig.~\ref{roadmap}. \begin{figure} \centering \includegraphics[width=0.5\linewidth]{images/model_class2.pdf} \caption{Unknown model $M$ generates data $\{Z_t\}_{t=1}^T$. $\mathcal{A}_0$ maps $\{Z_t\}_{t=1}^T$ directly to $r_0$--order estimate $\hat{M}_{\mathcal{A}_0}(r_0, T, M)$. $\mathcal{A}_0$ minimizes $||\hat{M}_{\mathcal{A}_0}(r_0, T, M) - M_{r_0}(M)||$. $\mathcal{H}_{r_0}$ is typically a truncation of the complex model to its optimal lower dimension approximation. $||M - M_{r_0}(M)||$ is the model misspecification error.} \label{roadmap} \end{figure} \section{Preliminaries} \label{sec:preliminaries} \begin{definition}\label{def:lti} A finite dimensional linear time invariant(LTI) system is parametrized by $C \in \mathbb{R}^{p \times n}, A \in \mathbb{R}^{n \times n}, B \in \mathbb{R}^{n \times m}$ with the following dynamics \begin{align} X_t &= A X_{t-1} + B U_t + \eta_t \nonumber\\ Y_t &= C X_t + w_t \label{dt_lti} \end{align} Here $U_t$ is a user defined input, $Y_t$ is the observed output, $X_t$ is the hidden state and $\{\eta_t, w_t\}$ are process and output noise respectively. \end{definition} Throughout the paper we will refer to a LTI system with dynamics as Eq.~\eqref{dt_lti} by $\Theta(C, A, B)$. \begin{definition} \label{stable} A matrix $M$ is Schur stable if $\rho_{\max}(M) < 1$. \end{definition} [MD]We will represent the class of $r^{th}$ stable systems by $\mathcal{M}_r $: \begin{equation} \label{model_class_eq} \mathcal{M}_r = \{M= \Theta({C}, {A}, {B})\hspace{1mm}|\hspace{1mm} A \in \mathbb{R}^{r \times r},\, \mbox{A Schur Stable} \} \end{equation} \begin{definition} \label{d_hankel} The $(k, p, q)$--dimensional Hankel matrix for $\Theta(C, A, B)$ is defined as follows: \begin{align*} \mathcal{H}_{k, p, q}(C, A, B) = \begin{bmatrix} CA^{k}B & CA^{k+1}B & \hdots & CA^{q+k-1}B \\ CA^{k+1}B & CA^{k+2}B & \hdots & CA^{d+k}B \\ \vdots & \vdots & \ddots & \vdots \\ CA^{p+k-1}B & \hdots & \hdots & CA^{p+q+k-2}B \end{bmatrix} \end{align*} And its associated Toeplitz matrix \begin{align*} \mathcal{H}^T_{k, d}(C, A, B) = \begin{bmatrix} 0 & 0 & 0 & \hdots \\ CA^{k}B & 0 & 0& \hdots \\ \vdots & \ddots & \ddots & \ddots \\ CA^{d+k-3}B & \hdots & CA^{k}B & 0\\ CA^{d+k-2}B &CA^{d+k-3}B& \hdots & CA^{k}B \end{bmatrix} \end{align*} \end{definition} \begin{definition}[System Hankel Matrix] \label{system_hankel} Define $M = \Theta(C, A, B)$ and let $A$ be Schur stable ([MD] or just say $M\in \mathcal{M}_r$). The doubly infinite matrix $\mathcal{H}_{0, \infty, \infty}(C, A, B)$ is the system Hankel matrix corresponding to $M$. Further, system Hankel matrix rank is known as the model order of $M$. \end{definition} [MD]---you don't have to mention $\theta$ every time--just refer $\mathcal{M}_n$. \begin{remark} The system Hankel matrix, $\mathcal{H}_{0, \infty, \infty}(C, A, B)$, can be decomposed as follows: \begin{equation} \label{svd_hankel} \mathcal{H}_{0, \infty, \infty} (C, A, B)= \underbrace{\begin{bmatrix} C \\ CA \\ \vdots \\ CA^{d} \\ \vdots \end{bmatrix} }_{=\mathcal{O}} \underbrace{\begin{bmatrix} B & AB & \hdots & A^d B & \hdots \end{bmatrix}}_{=\mathcal{R}} \end{equation} Now $\text{rank}(\mathcal{O}), \text{rank}(\mathcal{R}) \leq n$ and as a result $\text{rank}(\mathcal{O}\mathcal{R}) \leq n$. The system Hankel matrix rank, which is also the model order, captures the complexity of $\Theta(C, A, B)$. The complexity of a LTI system is measured by its model order, \textit{i.e.}, higher the model order higher its complexity. \end{remark} \begin{definition} \label{minimal} Let $M=\Theta(C, A, B)$ and $A$ be $n \times n$ Schur stable matrix. Then $M$ is minimal if $$\text{rank}(\mathcal{H}_{0, \infty, \infty}(C, A, B)) = n$$ \end{definition} [MD]--moved the definition of Noise Hankel. Not needed yet. Next we define some standard quantities for LTI systems. \begin{definition} \label{transfer_fn} The transfer function of $M=\Theta(C, A, B)$ is given by $G_{M}(z) = C(zI - A)^{-1}B$ where $z \in \mathbb{C}$. \end{definition} The transfer function plays a critical role in control theory as it relates the input to the output. Succinctly, the transfer function of a LTI system is the Z--transform of the output in response to a unit impulse input. \begin{remark} \label{tf_equivalence} An interesting observation is that for any $T_1, T_2$ that are invertible, the LTI systems \begin{equation} \label{similarity_transform} M_1 = \Theta(CT_1^{-1}, T_1 A T_1^{-1}, T_1 B), M_2 = \Theta(CT_2^{-1}, T_2 A T_2^{-1}, T_2 B) \end{equation} have identical transfer functions, \textit{i.e.}, $G_{M_1}(\cdot) = G_{M_2}(\cdot)$. This suggests that the identification of $(C, A, B)$ is not unique rather equivalent up to a transformation $T$, \textit{i.e.}, $(C, A, B) \equiv (CT, T^{-1}AT, T^{-1}B)$. \end{remark} Next, we define two system norms that will be important from the perspective of model identification and approximation. \begin{definition} \label{Linf_norm} Let $M = \Theta(C, A, B)$ then the $L_{\infty}$ system norm of $M$ is given by $$||M||_{\infty} = \sup_{\omega \in \mathbb{R}} \sigma_{\max}(G_M(e^{j\omega}))$$ \end{definition} Another norm, Hankel norm, is defined as follows \begin{definition} \label{hankel_norm} The Hankel norm of system $M=\Theta(C, A, B)$ is given by \begin{align*} ||M||_H &= \sigma_{\max}(\mathcal{H}_{0, \infty, \infty}(C, A, B)) \end{align*} Further the Hankel singular values refer to the non--zero singular values of $\mathcal{H}_{0, \infty, \infty}$. \end{definition}
\section{Introduction} Magnetic effects in mechanical resonators have become an interesting subject of research with many potential applications. In particular the combination of magnetic properties of solids and high quality factor mechanical resonators has set a new direction in the sensing technology\cite{Gross:2016aa,Bian:2016aa,Weber:2012aa,Vanner18}, such as cantilever magnetometry\cite{Weber:2012aa,PhysRevLett.111.067202,Montinaro2014,Mehlin2015}. Moreover, careful engineering of coupling between spin and mechanical degrees of freedom\cite{Rabl:2009aa} opens new possibilities in hybrid quantum systems\cite{Kurizki:2015aa} where one can combine advantages of optomechanics and Quantum Electrodynamics with two level systems\cite{Xia:2014aa,PhysRevA.95.022327} or magnons\cite{Zhang:2016aa,PhysRevLett.1.241}. Such research leads to better understanding of magnetic impurities and their influence on mechanical properties of solids that, in its turn, creates fundamental knowledge for a new generation of ultra-high purity materials with reduced susceptibility to environmental changes, ageing and other unwanted effects. To observe such effects in a high purity acoustic system, the most important property is to attain very high quality factors of mechanical resonances. The resulting very narrow linewidths become a very sensitive tool in the discovery of low concentrations of impurities whose effects would not be seen otherwise. Among all mechanical systems, quartz Bulk Acoustic Wave (BAW) resonators cooled to cryogenic temperatures provide the narrowest possible linewidths for many overtone (OT) resonances in the $5-700$~MHz frequency range\cite{Goryachev1,quartzPRL,ScRep}, and more recently similar performance at GHz frequencies\cite{Renninger:2018vl}, allowing strong coupling to photons and superconducting qubits\cite{Enzian:19,Kharel2018,Chu:2018sf}. In this work, we study response of these mechanical cavities to external magnetic fields for temperatures near $20$~mK. \section{Bulk Acoustic Wave Resonator Under Magnetic Field} \begin{figure}[h!] \begin{center} \includegraphics[width=0.25\textwidth]{setup1.pdf} \end{center} \caption{Experimental setup for measuring frequency response of BAW cavity with acoustic modes standing along $\vec{k}$ as a function of external magnetic field that is parallel ($\vec{B}_p$) or normal ($\vec{B}_n$) to the resonator plate.}% \label{setupSIG} \end{figure} For these measurements we choose an SC-cut\cite{Kusters:2014mn} plano-convex electrodeless (BVA type\cite{1537081}) resonator enclosed in a copper vacuum chamber. While the plano-convex structure of the resonator plate works as a potential trap for the acoustic phonons minimising losses due to supporting mechanisms\cite{Tiersten:1976hz,Stevens:1986aa}, the electrodeless (electrodes are deposited on the supporting structure) technology helps to exclude all losses associated with deposition of other materials. It has been discovered previously that the longitudinal {\color{black}(A-type)} thickness mode exhibits the superior quality factor compared to shear modes reaching very high overtone numbers. For this type of mode that is used in this work, the mechanical displacement is mostly collinear with acoustical wave vector that is normal to the plate surface. {\color{black} On the other hand, for the shear ({\color{black} B- and C-type}) modes used later in the work, the displacement lies mostly in the resonator plane.} In order to investigate response of the acoustic modes to external magnetic field, the quartz BAW cavity is enclosed into a block of Oxygen Free Copper attached to the $20$~mK stage of a dilution refrigerator. Because the crystal is enclosed in an individual metallic package inside a copper block, any effects of spurious electric fields, caused by the magnet or other external sources will be shielded. The structure is assembled in such a way that the device under test is placed in the middle of a $7$~T superconducting magnet. The resonator plate could be oriented either parallel or normal to the external magnetic field that are further referred as $\vec{B}_p$ and $\vec{B}_n$ respectively (Fig.~\ref{setupSIG}). The acoustic mode frequency (more precisely, frequency deviation from fixed values) is used as a convenient observable of the induced magnetic effects, as it is the most sensitive parameter of a resonant system. Acoustic resonances are excited and detected using the piezoelectric effects with golden electrodes deposited on the structure supporting the cavity plate. RF fields are supplied via low loss microwave cables split with cryogenic DC blocks. Since the investigated BAW resonator is a single port device, all possible measurements are made in signal reflection where one uses an impedance or vector network analyser to probe the frequency response of the device via the single port. Although, in the case of ultra high-$Q$ acoustic cavities, internal attenuation of typical network analysers is not enough to achieve the linear (small signal) regime. Indeed, it has been observed previously that for a number of ultra-high Quality factor overtones, one needs to greatly reduce the incident power to achieve the small-signal regime. In this case, the feeding and detection lines are split with a circulator that allows to introduce additional attenuation and amplification in the two port measurements as shown in Fig.~\ref{setupSIG}. {\color{black}At low frequencies} ($<1$~GHz), circulators become lossy at low temperatures due to ferrite properties, its operation is limited to the room temperature. Moreover, comparatively narrow operation widths of these devices limits their operation to a couple of overtones near its central frequency. To characterise the acoustic resonance in the magnetic fields, we employ the 37th overtone of the longitudinal mode of the plate resonator with the resonance frequency of $116.1642$~MHz. For the small signal characterisation, the incident signal was reduced and distributed by a room temperature attenuator and circulator as depicted in Fig.~\ref{setupSIG}. Together with additional low noise amplification, this setup allows to achieve the incident power levels of about $-135$~dBm, or tenths of a femto-Watt, at the BAW crystal port. This value is estimated based on the specified losses of the connecting cryogenic superconducting cables. The given value of incident power (-135 dBm) refers to the input of the BAW crystal. We take into account losses of cryogenic (superconducting) connecting cables and DC blocks. Such low amounts of power are possible due to very narrow bandwidths (long sweeping rates) of the measurements. Indeed, a system response for a particular value of the magnetic field is taken with the lowest available bandwidth of 1Hz totalling about 26 minutes of sweep time. Such long measurement times are required to avoid ringing effects. The measurement setup is frequency locked to a hydrogen maser for ultimate frequency stability allowing us to resolve sub milli-Hertz frequency shifts at very long averaging times. \subsection{Parallel Orientation} The response of the resonant frequency of the 37th OT to the magnetic field oriented in parallel to the resonator plate is shown in Fig.~\ref{sweepS}. The experiment is repeated by sweeping the magnetic field from negative fields to positive and vice a versa. The results show strong hysteresis of the response together with the memory effect. Two results are almost symmetric around the zero field. The frequency deviation gets saturated at relative large values of the field. Such behaviour including memory and hysteresis is typical for ferromagnetic system\cite{Jiles:1986aa,Prokopenko:2013aa,Farr:2015aa}. \begin{figure}[h!] \begin{center} \includegraphics[width=0.45\textwidth]{parallel1B.pdf} \end{center} \caption{Frequency deviation as a function of external magnetic field parallel to the crystal plate for sweeping magnetic field up and down for the 37th OT of the longitudinal mode.}% \label{sweepS} \end{figure} \subsection{Normal Orientation} \begin{figure}[h!] \begin{center} \includegraphics[width=0.45\textwidth]{normal2C.pdf} \end{center} \caption{Frequency deviation as a function of external magnetic field normal to the crystal plate for sweeping magnetic field up and down for the 33st (A) and 37th OTs (B) of the longitudinal mode.}% \label{sweepR} \end{figure} \begin{figure*}[h!] \begin{center} \includegraphics[width=1.0\textwidth]{normalB.pdf} \end{center} \caption{Frequency deviation as a function of external magnetic field normal to the crystal plate in the strong signal regime. Indices in boxes denote OT numbers and types of vibration: A - longitudinal, B - fast shear, C - slow shear. } \label{sweepV} \end{figure*} Similar type of behavior is observed for the 33rd and 37th OTs in the normal orientation of the magnetic field as shown in Fig.~\ref{sweepR}. {\color{black}In these results, the field was swept down (green $\downarrow$ curve) and then up (blue $\uparrow$ curve).} For this field orientation the observed hysteresis {\color{black}width in terms of the applied magnetic field is considerably larger. The corresponding frequency deviation is of the same order.} The observed difference with the parallel orientation of the field suggest anisotropy of the magnetic system responsible for the mechanical frequency shifts. {\color{black}It is worth noting that two measurements ($\downarrow$ and $\uparrow$) in Fig.~\ref{sweepR} (A) and (B) have different frequencies at zero field as well as they are not symmetric under the rotation around zero field, thus, measurement prehistory, which suggests strong memory effects.} Despite the fact that the observed frequency shifts are on the order of few Hertz, given extremely narrow linewidths in studied BAW resonators ($25$~mHz for the 37th OT at 116.164MHz \cite{quartzPRL}), the observed effects appear to be very significant constituting about 60 linewidths. This makes the BAW cavities unique for study of such weak magneto-acoustic effects. \section{Strong Signal Measurements} In order to investigate the dependence of the magnetic hysteresis on absolute values of the frequency, the quartz resonator is probed directly with the Network Vector Analyser. Such simplified setup avoids circulators that allows to measure overtones of acoustic vibration in a very broad frequency range. As a result of impossibility to decrease the Network Analyser output signal strength below a certain limit, the device incident power is relatively strong on the order of $-45$~dBm or tens of nanoWatt. Such level of incident power results in observable nonlinearity of the Duffing type. Results of frequency response to magnetic field $\vec{B}_n$ sweeps for various resonant modes are shown in Fig.~\ref{sweepV}. This figure shows that the spread of the hysteresis loop increases with increasing frequency from tens of milli-Hertz for less than 10MHz modes to a couple of Hertz for high frequency modes. This fact also implies a broadband nature of the effect which is different to the linear interaction of impurity ion ensembles with photonic modes leading to narrow band avoided level crossings\cite{Goryachev:2013aa}. It is also observed that all modes demonstrate saturation at high magnetic fields. Finally, the response of 33rd and 37th OTs of the longitudinal mode in the strong signal regime is quite different to that in the weak signal setup shown in Fig.~\ref{sweepR} suggesting an important role of nonlinearity in the interaction between magnetic and acoustic subsystems. The observed hysteresis and memory effects have strong temperature dependence. They are specifically milli-Kelvin phenomena that vanishes at temperatures above 1K, so that no considerable frequency shift has been observed at 4K. \section{Discussion} The response of quartz BAW resonators to the magnetic field at room temperature have been observed previously\cite{Brendel:1994aa}. It was attributed to ferromagnetic behaviour of supporting springs holding the resonator plate. The same mechanism cannot be responsible for the magnetic effects observed in this study for three reasons. Firstly, all magnetic effects are specific to temperatures below $1$K: no observable frequency shifts are visible at 4K where as clamping mechanism impact is observed even at room temperature. Secondly, the resonator used in the current work is built using a different clamping technology that avoids magnetic elements. Thirdly, the magnetic field effects are accompanied with strong nonlinear response to the excitation signals that should have no effect on supporting mechanism. Finally, increase in the OT number usually leads to improvement of the phonon trapping\cite{Goryachev:2014aa} that means that a larger fraction of acoustic energy is focused in the centre of the resonator place. This effect typically leads to increase in $Q$ factor with frequency due to uncoupling of acoustic vibration from support structure. This fact also implies that the supporting mechanism has less effect on resonance frequency for higher OTs, that contradicts the observed results (Fig.~\ref{sweepV}). Coupling between mechanical and spin degrees of freedom may be accounted for several effects such as magnetostriction, Einstein-de Haas, Wiedemann and related effects. Although all of these phenomena require ferromagnetic materials, the class of materials quartz does not belong to. The evidence strongly suggests that the magnetic effects observed in this work originates in crystal impurities themselves. Traces of magnetic impurities have been observed in pure synthetic quartz crystals using whispering gallery microwave modes\cite{Goryachev:2013aa}, and has been shown to be the mechanism for the largest magnetic response of the crystal material. Furthermore, the temperature dependence of mechanical Quality factors of quartz resonators showed a relaxation phenomenon due to the presence of Na$^+$, Al$^{3+}$ ions substituting some Silicon ions in the lattice\cite{Mason1965, Fraser1968,Martin:1988aa,Kats1962,Halliburton1985,Stevels1962}. These and other impurities in quartz have been a subject of extensive studies in literature\cite{Saha1979,Poignon:1996aa}. Moreover, two level systems were found to be responsible for strong nonlinearities in acoustic resonators made of unswept (non purified) quartz\cite{quartzJAP}, jump chaotic response of such devices at low temperatures\cite{Goryachev:2014ad}, and extra losses at higher frequencies\cite{quartzPRL}. Additionally, interaction of high frequency acoustic phonons with magnetic spins has been studied within the research field of paramagnetic acoustic resonance\cite{BOLEF:1966aa, Jacobsen:1959aa,apr2}. Although, the ferromagnetic-like behaviour was not observed in quartz studies with Whispering Gallery Mode (WGM) resonators\cite{Goryachev:2013aa}, there are a good reasons why this is the case. Firstly, concentration of defects and impurities depends on the crystal manufacturer, and the crystals used for WGM resonators and BAW devices came from different sources. In particular, crystal treatment plays a crucial role for impurity behaviour. For example, it has been experimentally observed that annealing of sapphire crystals can convert Fe$^{2+}$ ions into Fe$^{3+}$ which caused a number of significant new effects unobserved in "as-grown" crystals\cite{Creedon:2010aa}. Similarly, quartz crystals used for BAW resonators undergo the so-called sweeping procedure, whereas the quartz used in the WGM resonators had no such treatment. During the sweeping procedure quartz samples are heated to a few hundreds degrees and high voltage is applied to remove certain cations\cite{Martin:1988aa,Gualtieri1989SweepingQC}. Secondly, the BAW devices are highly sensitive, exhibiting tens of milli-Hertz acoustic linewidths, which is many orders of magnitude narrower than that of the dielectric linewidths of WGM resonators. While the former approach detected effects on the Hz scale, the WGM modes in quartz\cite{Goryachev:2013aa} have typical linewidths of tens of kHz leaving any effect of the order of 1Hz, like ones observed in this work, very hard to observe. In summary, the magnetic effects observed in this work have only become apparent due to the phonon trapped acoustic modes reaching extremely high quality factors of a few billion. Indeed, with other technologies providing quality factors of less than one million or linewidths of a few hundreds of Hertz, such hysteresis loops observed in this work could not have been seen. These high acoustic $Q$-factors makes the phonon trapped BAW resonators a new tool to for studying solid state physics\cite{ScRep}, such as the ferromagnetic-like behaviour discovered in this work as well as a new way of realising a magneto-mechanical system in the ultra-low loss regimes. It fits the new framework of magneto-mechanical systems that have recently emerged bringing together advantages of both spin and mechanical degrees of freedom. For example, such systems have been recently used for applications such as magnetometry\cite{Li:18} and optomechanical transduction\cite{Rudd2019}. This work was supported by the Australian Research Council Grant No. CE170100009. \section*{References}
\section{introduction} Exceptional unimodal singularities are introduced by Arnold \cite{MR0467795} as hypersurface singularities of modality one which do not come in infinite family. There are exactly 14 of them which are defined by weighted homogeneous polynomials as shown in Table \ref{tb:EUS}. Dolgachev \cite{MR0345974} found another characterization of exceptional unimodal singularities as triangle singularities which are hypersurfaces. The triple $(\delta_1, \delta_2, \delta_3)$ of integers specifying the triangle singularity is called the \emph{Dolgachev number}. The Milnor lattices of exceptional unimodal singularities are computed by Gabrielov \cite{MR0367274}. The Coxeter--Dynkin diagram of the Milnor lattice with respect to a distinguished basis of vanishing cycles is specified by a triple $(\gamma_1, \gamma_2, \gamma_3)$ of integers called the \emph{Gabrielov number}. In Table \ref{tb:EUS}, one can see that exceptional unimodal singularities come in pairs in such a way that the Dolgachev number and the Gabrielov number are interchanged. This fact is discovered by Arnold and given the name \emph{strange duality}. Pinkham \cite{MR0429876} and Dolgachev and Nikulin \cite{MR728992,MR525944} gave an interpretation of strange duality as the exchange of the transcendental lattices and algebraic lattices of K3 surfaces. This interpretation can be considered as a precursor of mirror symmetry for K3 surfaces \cite{MR1416354,MR1420220}. See e.g.~\cite{MR3044454,1407.1566,1806.04345} and references therein for the relation between exceptional unimodal singularities and mirror symmetry for K3 surfaces. \begin{table}[t] \[ \begin{array}{cccccc} \toprule \text{name} & \text{normal form} & \text{weight system} & \text{D\#} & \text{G\#} & \text{dual} \\ \midrule E_{12} & x^3 + y^7 + z^2 & (6,14,21;42) & (2,3,7) & (2,3,7) & E_{12} \\ E_{13} & x^3 + x y^5 + z^2 & (4,10,15;30) & (2,4,5) & (2,3,8) & Z_{11} \\ E_{14} & x^3 + y^8 + z^2 & (3,8,12;24) & (3,3,4) & (2,3,9) & Q_{10} \\ Z_{11} & x^3 y + y^5 + z^2 & (6,8,15;30) & (2,3,8) & (2,4,5) & E_{13} \\ Z_{12} & x^3 y + x y^4 + z^2 & (4,6,11;22) & (2,4,6) & (2,4,6) & Z_{12} \\ Z_{13} & x^3 y + y^6 + z^2 & (3,5,9,18) & (3,3,5) & (2,4,7) & Q_{11} \\ W_{12} & x^4 + y^5 + z^2 & (4,5,10;20) & (2,5,5) & (2,5,5) & W_{12} \\ W_{13} & x^4 + x y^4 + z^2 & (3,4,8,16) & (3,4,4) & (2,5,6) & S_{11} \\ Q_{10} & x^3 + y^4 + y z^2 & (6,8,9;24) & (2,3,9) & (3,3,4) & E_{14} \\ Q_{11} & x^3 + y^2 z + x z^3 & (4,6,7;18) & (2,4,7) & (3,3,5) & Z_{13} \\ Q_{12} & x^3 + y^5 + y z^2 & (3,5,6;15) & (3,3,6) & (3,3,6) & Q_{12} \\ S_{11} & x^4 + y^2 z + x z^2 & (4,5,6,16) & (2,5,6) & (3,4,4) & W_{13} \\ S_{12} & x^3 y + y^2 z + x z^2 & (3,4,5;13) & (3,4,5) & (3,4,5) & S_{12} \\ U_{12} & x^3 + y^3 + z^4 & (3,4,4;12) & (4,4,4) & (4,4,4) & U_{12} \\ \bottomrule \end{array} \] \caption{14 exceptional unimodal singularities} \label{tb:EUS} \end{table} A \emph{weight system} is a quadruple $(a_1,a_2,a_3;h)$ of positive integers. The triple $a = (a_1,a_2,a_3)$ is called the \emph{weight}, and the integer $h$ is called the \emph{degree}. A polynomial $ \sum_{i=(i_1,i_2,i_3) \in \mathbb{N}^3} \alpha_i x^{i_1} y^{i_2} z^{i_3} \in \mathbb{C}[x,y,z] $ is \emph{weighted homogeneous of weight $a$ and degree $h$} if $\sum_{k=1}^3 i_k a_k = h$ for any $i \in \mathbb{N}^3$ with $\alpha_i \ne 0$. We set $ a_0 = h - a_1 - a_2 - a_3. $ It is known by Reid (unpublished) and Yonemura \cite{MR1066667} that there are exactly 95 weights $a$ such that the minimal model of a general anticanonical hypersurface in the weighted projective space $\mathbb{P}(a_0, a_1, a_2, a_3)$ is a K3 surface. The weight systems in Table \ref{tb:EUS} associated with exceptional unimodal singularities are on the Reid--Yonemura list. Since all of them satisfy the condition $a_0 = 1$, we will always assume this condition in this paper, and write $ W_a = (a_1,a_2,a_3;a_1+a_2+a_3+1). $ There are 41 weights with $a_0 = 1$ on the Reid--Yonemura list. The mirror of $ \mathbb{P}(a_0, a_1, a_2, a_3) $ is given by the regular function $ F_a = u_0 + u_1 + u_2 + u_3 $ on $ M_q = \{ (u_0,u_1,u_2,u_3) \in \left( \bC^\times \right)^4 \mid u_0^{a_0} u_1^{a_1} u_2^{a_2} u_3^{a_3} = q \}, $ whose fiber $F_a^{-1}(t)$ is the mirror of an anticanonical hypersurface in $\mathbb{P}(a_0, a_1, a_2, a_3)$ \cite{MR1403947}. We set the K\"ahler parameter $q$ to 1 for simplicity. Since $a_0 = 1$, the fiber $F_a^{-1}(t)$ can be described as \begin{align} F_a^{-1}(t) &\cong \left\{ (u_1,u_2,u_3) \in \left( \bC^\times \right)^3 \mathrel{}\middle|\mathrel{} u_1 + u_2 + u_3 + \frac{1}{u_1^{a_1} u_2^{a_2} u_3^{a_3}} = t \right\} \\ &= \left\{ (u_1,u_2,u_3) \in \left( \bC^\times \right)^3 \mathrel{}\middle|\mathrel{} u_1^{a_1+1} u_2^{a_2} u_3^{a_3} + u_1^{a_1} u_2^{a_2+1} u_3^{a_3} + u_1^{a_1} u_2^{a_2} u_3^{a_3+1} + 1 = t u_1^{a_1} u_2^{a_2} u_3^{a_3} \right\}. \end{align} We define polynomial maps $G_a, H_a \colon \mathbb{C}^3 \to \mathbb{C}$ by \begin{align} G_a(u_1,u_2,u_3) &= u_1^{a_1+1} u_2^{a_2} u_3^{a_3} + u_1^{a_1} u_2^{a_2+1} u_3^{a_3} + u_1^{a_1} u_2^{a_2} u_3^{a_3+1}, \\ H_a(u_1,u_2,u_3) &= u_1^{a_1} u_2^{a_2} u_3^{a_3}, \end{align} so that $F_a^{-1}(t)$ is defined by \begin{align} G_a(u_1,u_2,u_3) + 1 = t H_a(u_1,u_2,u_3). \end{align} An integer matrix $C = \left( c_{ij} \right)_{i,j=1}^3$ with non-negative entries defines a polynomial map $ f_C \colon \mathbb{C}^3 \to \mathbb{C} $ by \begin{align} f_C(x,y,z) = \sum_{i=1}^3 x^{c_{i1}} y^{c_{i2}} z^{c_{i3}}. \end{align} Similarly, an integer matrix $D = \left( d_{ij} \right)_{i,j=1}^3$ with non-negative entries defines a polynomial map $ \varphi_D \colon \mathbb{C}^3 \to \mathbb{C}^3 $ by \begin{align} \varphi_D(u_1,u_2,u_3) = \left( u_1^{d_{i1}} u_2^{d_{i2}} u_3^{d_{i3}} \right)_{i=1}^3, \end{align} which restricts to an isomorphism of tori $(\bC^\times)^3$ if $\abs{\det D} = 1$. We also define a polynomial map $h \colon \mathbb{C}^3 \to \mathbb{C}$ by \begin{align} h(x,y,z) = x y z. \end{align} Consider the following condition on the weight $a$: \begin{condition} \label{cd:dual} There exist $3 \times 3$ integer matrices $C = (c_{ij})_{i,j=1}^3$ and $D = (d_{ij})_{i,j=1}^3$ with non-negative entries satisfying \begin{enumerate}[(i)] \item \label{it:D} $ \abs{\det D} = 1, $ \item \label{it:G} $ G_a = f_C \circ \varphi_D, $ \item \label{it:H} $ H_a = h \circ \varphi_D, $ and \item \label{it:f} $f_C$ has an isolated critical point at the origin. \end{enumerate} \end{condition} If Condition \ref{cd:dual} is satisfied, then $F_a^{-1}(t)$ can be compactified to a quasi-smooth hypersurface \begin{align} f_C(x,y,z) + w^{\check{h}} = t x y z w \end{align} of Dwork type in $\mathbb{P}(1,\check{a}_1,\check{a}_2,\check{a}_3)$, where \begin{align} \label{eq:av} \check{a}_i = \sum_{j=1}^3 d_{ij} \end{align} and $ \check{h} = 1 + \sum_{i=1}^3 \check{a}_i. $ Note that Conditions (\ref{cd:dual}.\ref{it:G}) and (\ref{cd:dual}.\ref{it:H}) can be written as \begin{align} \label{eq:BCD} B_a = C D \end{align} and \begin{align} \label{eq:decomp_a} \begin{pmatrix} a_1 & a_2 & a_3 \end{pmatrix} = \begin{pmatrix} 1 & 1 & 1 \end{pmatrix} D \end{align} respectively, where \begin{align} B_a = \begin{pmatrix} a_1 + 1 & a_2 & a_3 \\ a_1 & a_2 + 1 & a_3 \\ a_1 & a_2 & a_3 + 1 \end{pmatrix}. \end{align} It follows from \eqref{eq:BCD} and Condition (\ref{cd:dual}.\ref{it:D}) that \begin{align} \abs{\det C} = \det B_a = a_1+a_2+a_3+1. \end{align} The main result in this paper is the following characterization of exceptional unimodal singularities: \begin{theorem} \label{th:main} A weight $(a_0,a_1,a_2,a_3)$ with $a_0=1$ on the Reid--Yonemura list comes from an exceptional unimodal singularity if and only if $a = (a_1,a_2,a_3)$ satisfies Condition \ref{cd:dual}. If this is the case, then $C$ is uniquely determined by $a$ up to permutation of rows and columns, and $f_C$ is a defining polynomial of the strange dual singularity. \end{theorem} For each $a$ among 41 on the Yonemura--Reid list, there are finitely many integer matrices $D$ with non-negative entries satisfying \eqref{eq:decomp_a}. Each such $D$ determines $C$ by \eqref{eq:BCD}, and the complete list of $C$ and $D$ such that $\abs{\det D} = 1$, up to permutation of rows and columns, is shown in Table \ref{tb:semi-dual}. If this is the case, then we say that the weight $\check{a}$ defined by \eqref{eq:av} is \emph{semi-dual} to the weight $a$. It follows from Table \ref{tb:semi-dual} that semi-duality is reflexive; $\check{a}$ is semi-dual to $a$ if and only if $a$ is semi-dual to $\check{a}$. The proof Theorem \ref{th:main} is given by testing if each $C$ satisfies Condition \ref{cd:dual}.(\ref{it:f}). \begin{longtable} {ccccc} \toprule No. & $a$ & $C$ & $D$ & semi-dual \\ \midrule 1 & $(1,1,1)$ &$\begin{pmatrix} $2$ & $1$ & $1$ \\ $1$ & $2$ & $1$ \\ $1$ & $1$ & $2$ \end{pmatrix}$ &$\begin{pmatrix} $1$ & $0$ & $0$ \\ $0$ & $1$ & $0$ \\ $0$ & $0$ & $1$ \end{pmatrix}$ & 1 \\ 3 & $(2,2,1)$ & $\begin{pmatrix} $1$ & $1$ & $2$ \\ $2$ & $1$ & $0$ \\ $1$ & $2$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $1$ & $1$ & $0$ \\ $1$ & $0$ & $1$ \\ $1$ & $0$ & $0$ \end{pmatrix}$ &5\\ {} & ${}$ & $\begin{pmatrix} $2$ & $1$ & $0$ \\ $1$ & $1$ & $2$ \\ $0$ & $2$ & $2$ \end{pmatrix}$ & $\begin{pmatrix} $1$ & $1$ & $0$ \\ $1$ & $0$ & $1$ \\ $0$ & $1$ & $0$ \end{pmatrix}$ &3\\ 4 & $(4,4,3)$ \ & $\begin{pmatrix} $2$ & $1$ & $0$ \\ $1$ & $2$ & $0$ \\ $0$ & $0$ & $4$ \end{pmatrix}$ & $\begin{pmatrix} $2$ & $1$ & $1$ \\ $1$ & $2$ & $1$ \\ $1$ & $1$ & $1$ \end{pmatrix}$ &4 (dual)\\ 5 & $(3,1,1)$ & $\begin{pmatrix} $1$ & $2$ & $1$ \\ $1$ & $1$ & $2$ \\ $2$ & $0$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $1$ & $1$ & $1$ \\ $1$ & $0$ & $0$ \\ $0$ & $1$ & $0$ \end{pmatrix}$ &3\\ 6 & $(5,2,2)$ & $\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $3$ & $2$ \\ $0$ & $2$ & $3$ \end{pmatrix}$ & $\begin{pmatrix} $3$ & $1$ & $1$ \\ $1$ & $1$ & $0$ \\ $1$ & $0$ & $1$ \end{pmatrix}$ &6\\ 7 & $(4,2,1)$ & $\begin{pmatrix} $1$ & $1$ & $2$ \\ $1$ & $2$ & $0$ \\ $2$ & $0$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $2$ & $1$ & $1$ \\ $1$ & $1$ & $0$ \\ $1$ & $0$ & $0$ \end{pmatrix}$ &7\\ {} & ${}$ & $\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $3$ & $2$ \\ $1$ & $1$ & $2$ \end{pmatrix}$ & $\begin{pmatrix} $2$ & $1$ & $1$ \\ $1$ & $1$ & $0$ \\ $0$ & $0$ & $1$ \end{pmatrix}$ &19\\ 8 & $(6,3,2)$ & $\begin{pmatrix} $1$ & $2$ & $0$ \\ $1$ & $0$ & $3$ \\ $2$ & $0$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $3$ & $2$ & $1$ \\ $2$ & $1$ & $0$ \\ $1$ & $1$ & $0$ \end{pmatrix}$ &10\\ {} & ${}$ & $\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $2$ & $3$ \\ $1$ & $2$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $3$ & $2$ & $1$ \\ $1$ & $1$ & $1$ \\ $1$ & $1$ & $0$ \end{pmatrix}$ &24\\ 9 & $(10,5,4)$ & $\begin{pmatrix} $1$ & $2$ & $0$ \\ $2$ & $0$ & $0$ \\ $0$ & $0$ & $5$ \end{pmatrix}$ & $\begin{pmatrix} $5$ & $3$ & $2$ \\ $3$ & $1$ & $1$ \\ $2$ & $1$ & $1$ \end{pmatrix}$ &9 (dual)\\ 10 & $(6,4,1)$ & $\begin{pmatrix} $1$ & $1$ & $2$ \\ $2$ & $0$ & $0$ \\ $0$ & $3$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $3$ & $2$ & $1$ \\ $2$ & $1$ & $1$ \\ $1$ & $0$ & $0$ \end{pmatrix}$ &8\\ 12 & $(9,6,2)$ & $\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $2$ & $3$ \\ $0$ & $3$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $5$ & $3$ & $1$ \\ $3$ & $2$ & $1$ \\ $1$ & $1$ & $0$ \end{pmatrix}$ &12\\ 13 & $(12,8,3)$ &$\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $3$ & $0$ \\ $1$ & $0$ & $4$ \end{pmatrix}$ & $\begin{pmatrix} $5$ & $4$ & $3$ \\ $3$ & $3$ & $2$ \\ $1$ & $1$ & $1$ \end{pmatrix}$ & 20 (dual) \\ 14 & $(21,14,6)$ &$\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $3$ & $0$ \\ $0$ & $0$ & $7$ \end{pmatrix}$ & $\begin{pmatrix} $11$ & $7$ & $3$ \\ $7$ & $5$ & $2$ \\ $3$ & $2$ & $1$ \end{pmatrix}$ & 14 (dual)\\ 18 & $(3,3,2)$ & $\begin{pmatrix} $1$ & $2$ & $0$ \\ $1$ & $0$ & $3$ \\ $2$ & $1$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $1$ & $1$ & $1$ \\ $2$ & $1$ & $0$ \\ $1$ & $1$ & $0$ \end{pmatrix}$ &25\\ 19 & $(3,2,2)$ & $\begin{pmatrix} $2$ & $0$ & $1$ \\ $0$ & $3$ & $1$ \\ $0$ & $2$ & $2$ \end{pmatrix}$ & $\begin{pmatrix} $2$ & $1$ & $0$ \\ $1$ & $1$ & $0$ \\ $1$ & $0$ & $1$ \end{pmatrix}$ &7\\ {} & ${}$ & $\begin{pmatrix} $0$ & $2$ & $2$ \\ $2$ & $0$ & $1$ \\ $2$ & $1$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $1$ & $1$ & $1$ \\ $1$ & $0$ & $1$ \\ $1$ & $1$ & $0$ \end{pmatrix}$ &19\\ 20 & $(9,8,6)$ &$\begin{pmatrix} $2$ & $0$ & $1$ \\ $0$ & $3$ & $0$ \\ $0$ & $0$ & $4$ \end{pmatrix}$ & $\begin{pmatrix} $5$ & $3$ & $1$ \\ $4$ & $3$ & $1$ \\ $3$ & $2$ & $1$ \end{pmatrix}$ & 13 (dual)\\ 21 & $(2,1,1)$ & $\begin{pmatrix} $1$ & $2$ & $1$ \\ $2$ & $0$ & $1$ \\ $1$ & $1$ & $2$ \end{pmatrix}$ & $\begin{pmatrix} $1$ & $1$ & $0$ \\ $1$ & $0$ & $0$ \\ $0$ & $0$ & $1$ \end{pmatrix}$ &21\\ 22 & $(6,5,3)$ &$\begin{pmatrix} $2$ & $0$ & $1$ \\ $0$ & $3$ & $0$ \\ $1$ & $0$ & $3$ \end{pmatrix}$ & $\begin{pmatrix} $3$ & $2$ & $1$ \\ $2$ & $2$ & $1$ \\ $1$ & $1$ & $1$ \end{pmatrix}$ & 22 (dual)\\ 24 & $(5,4,2)$ & $\begin{pmatrix} $2$ & $0$ & $1$ \\ $0$ & $2$ & $2$ \\ $0$ & $3$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $3$ & $1$ & $1$ \\ $2$ & $1$ & $1$ \\ $1$ & $1$ & $0$ \end{pmatrix}$ &8\\ 25 & $(4,3,1)$ & $\begin{pmatrix} $2$ & $0$ & $1$ \\ $1$ & $1$ & $2$ \\ $0$ & $3$ & $0$ \end{pmatrix}$ & $\begin{pmatrix} $2$ & $1$ & $1$ \\ $1$ & $1$ & $1$ \\ $0$ & $1$ & $0$ \end{pmatrix}$ &18\\ 28 & $(10,7,3)$ & -- & -- & -- \\ 37 & $(8,4,3)$ &$\begin{pmatrix} $1$ & $2$ & $0$ \\ $2$ & $0$ & $0$ \\ $0$ & $1$ & $4$ \end{pmatrix}$ & $\begin{pmatrix} $3$ & $3$ & $2$ \\ $2$ & $1$ & $1$ \\ $1$ & $1$ & $1$ \end{pmatrix}$ & 58 (dual)\\ 38 & $(15,8,6)$ &$\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $3$ & $1$ \\ $0$ & $0$ & $5$ \end{pmatrix}$ & $\begin{pmatrix} $8$ & $5$ & $2$ \\ $4$ & $3$ & $1$ \\ $3$ & $2$ & $1$ \end{pmatrix}$ & 50 (dual)\\ 39 & $(9,5,3)$ &$\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $3$ & $1$ \\ $1$ & $0$ & $3$ \end{pmatrix}$ & $\begin{pmatrix} $4$ & $3$ & $2$ \\ $2$ & $2$ & $1$ \\ $1$ & $1$ & $1$ \end{pmatrix}$ &60 (dual)\\ 40 & $(7,4,2)$ & $\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $2$ & $3$ \\ $0$ & $3$ & $1$ \end{pmatrix}$ & $\begin{pmatrix} $4$ & $2$ & $1$ \\ $2$ & $1$ & $1$ \\ $1$ & $1$ & $0$ \end{pmatrix}$ &40\\ 42 & $(5,3,1)$ & $\begin{pmatrix} $1$ & $1$ & $2$ \\ $2$ & $0$ & $0$ \\ $0$ & $3$ & $1$ \end{pmatrix}$ & $\begin{pmatrix} $2$ & $2$ & $1$ \\ $1$ & $1$ & $1$ \\ $1$ & $0$ & $0$ \end{pmatrix}$ &63\\ 44 & $(8,5,2)$ & -- & -- & -- \\ 45 & $(14,9,4)$ & -- & -- & -- \\ 50 & $(15,10,4)$ &$\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $3$ & $0$ \\ $0$ & $1$ & $5$ \end{pmatrix}$ & $\begin{pmatrix} $8$ & $4$ & $3$ \\ $5$ & $3$ & $2$ \\ $2$ & $1$ & $1$ \end{pmatrix}$ &38 (dual)\\ 51 & $(18,12,5)$ & -- & -- & -- \\ 58 & $(6,5,4)$ &$\begin{pmatrix} $1$ & $2$ & $0$ \\ $2$ & $0$ & $1$ \\ $0$ & $0$ & $4$ \end{pmatrix}$ & $\begin{pmatrix} $3$ & $2$ & $1$ \\ $3$ & $1$ & $1$ \\ $2$ & $1$ & $1$ \end{pmatrix}$ &37 (dual)\\ 59 & $(8,7,5)$ & -- & -- & -- \\ 60 & $(7,6,4)$ &$\begin{pmatrix} $2$ & $0$ & $1$ \\ $0$ & $3$ & $0$ \\ $0$ & $1$ & $3$ \end{pmatrix}$ & $\begin{pmatrix} $4$ & $2$ & $1$ \\ $3$ & $2$ & $1$ \\ $2$ & $1$ & $1$ \end{pmatrix}$ &39 (dual)\\ 63 & $(4,3,2)$ & $\begin{pmatrix} $1$ & $2$ & $0$ \\ $1$ & $0$ & $3$ \\ $2$ & $0$ & $1$ \end{pmatrix}$ & $\begin{pmatrix} $2$ & $1$ & $1$ \\ $2$ & $1$ & $0$ \\ $1$ & $1$ & $0$ \end{pmatrix}$ &42\\ 66 & $(3,2,1)$ & $\begin{pmatrix} $2$ & $0$ & $1$ \\ $0$ & $3$ & $1$ \\ $1$ & $1$ & $2$ \end{pmatrix}$ & $\begin{pmatrix} $2$ & $1$ & $0$ \\ $1$ & $1$ & $0$ \\ $0$ & $0$ & $1$ \end{pmatrix}$ &66\\ {} & ${}$ & $\begin{pmatrix} $1$ & $1$ & $2$ \\ $1$ & $2$ & $0$ \\ $2$ & $0$ & $1$ \end{pmatrix}$ & $\begin{pmatrix} $1$ & $1$ & $1$ \\ $1$ & $1$ & $0$ \\ $1$ & $0$ & $0$ \end{pmatrix}$ &66\\ 71 & $(7,4,3)$ & -- & -- & -- \\ 72 & $(7,5,2)$ & -- & -- & -- \\ 77 & $(13,7,5)$ & -- & -- & -- \\ 78 & $(11,6,4)$ &$\begin{pmatrix} $2$ & $0$ & $0$ \\ $0$ & $3$ & $1$ \\ $0$ & $1$ & $4$ \end{pmatrix}$ & $\begin{pmatrix} $6$ & $3$ & $2$ \\ $3$ & $2$ & $1$ \\ $2$ & $1$ & $1$ \end{pmatrix}$ &78 (dual)\\ 82 & $(11,7,3)$ & -- & -- & -- \\ 87 & $(5,4,3)$ &$\begin{pmatrix} $1$ & $2$ & $0$ \\ $2$ & $0$ & $1$ \\ $0$ & $1$ & $3$ \end{pmatrix}$ & $\begin{pmatrix} $2$ & $2$ & $1$ \\ $2$ & $1$ & $1$ \\ $1$ & $1$ & $1$ \end{pmatrix}$ &87 (dual)\\ 89 & $(5,3,2)$ & -- & -- & -- \\ \bottomrule\\ \caption{Semi-duality of weights} \label{tb:semi-dual} \end{longtable} Note that a normal form of a weighted homogeneous exceptional unimodal singularity is not unique in general, and Theorem \ref{th:main} allows us to fix one uniquely. For example, the defining equation for the $W_{12}$-singularity can be written either as $x^5 + y^4 + z^2$ or $x^5 + y^2 z + z^2$, and only the latter comes from Theorem \ref{th:main}. Recall from \cite{MR2426805} that weight systems $W_a = (a_1,a_2,a_3;h)$ and $W_{\check{a}} = \left( \check{a}_1,\check{a}_2,\check{a}_3;\check{h} \right)$ are said to be \emph{Kobayashi dual} if there is a $3\times 3$ integer matrix $C$ with non-negative entries satisfying the \emph{weighted magic square condition} \begin{align} C \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix} = \begin{pmatrix} h \\ h \\ h \end{pmatrix} \quad \text{and} \quad \begin{pmatrix} \check{a}_1 & \check{a}_2 & \check{a}_3 \end{pmatrix} C = \begin{pmatrix} \check{h} & \check{h} & \check{h} \end{pmatrix} \end{align} and the \emph{primitivity} \begin{align} \abs{\det C}=h=\check{h}. \end{align} Kobayashi duality is a generalization of strange duality to weights which may not come from exceptional unimodal singularities \cite{MR2426805,MR2278769}. The matrices $C$ appearing in Table \ref{tb:semi-dual} are primitive weighted magic squares, so that our semi-duality is a special case of Kobayashi duality. \ \\ \emph{Acknowledgements.} The author thanks her advisor Kazushi Ueda for guidance and encouragement. \bibliographystyle{amsalpha}
\section{Introduction} Quantum resource theories (QRTs) are a very general and powerful framework for studying different phenomena in quantum theory from an operational point of view (see Ref.~\cite{Chitambar2019} for a recent review of the topic). Indeed, all QRTs are built from three basics components: free states, free operations and resources. These components are not independent among each other, and they are defined in a way that depends on the physical properties that one wants to describe. In general, for a given QRT, one defines the set of free sates $\Free$, formed by those states that can be generated without too much effort. Then, an operation $\E$ is said to be \emph{free}, if it satisfies the condition of mapping free states into free states: $\E$ is free if and only if $\E(\rho) \in \Free \ \forall \ \rho \in \Free$. Thus, free operations can be interpreted as the ones that are easy to implement in the lab. Finally, quantum resources are defined as those states that do not belong to the set of free states (i.e., $\rho \notin \Free$). These states are the useful ones for doing the corresponding quantum tasks. As an illustration, consider the task of transmitting an arbitrary quantum state from one lab to another distant one, where the allowed free operations are the so-called local operations and classical communication (LOCC). In this typical scenario, entanglement arises as the necessary quantum resource to perform this task (as it can be seen from the quantum teleportation protocol~\cite{Bennett1993}). Clearly, it is not possible to convert free states into resources by appealing to free operations alone. This is the reason why the term \emph{resource theory} was coined. In fact, one of the main concerns of the QRTs is the characterization of transformations between resources by means of free operations. Here, we are focused on QRTs for which these transformations are fully characterized by a kind of \textit{majorization law} between the resources. Precisely, we are interested in QRTs for which $\rho \free \sigma$ is equivalent to $x(\rho) \maj x(\sigma)$ or $x(\sigma) \maj x(\rho)$, where $x(\rho)$ and $x(\sigma)$ are probability vectors associated to $\rho$ and $\sigma$, respectively, and $\maj$ means a majorization relation (see \eg~\cite{MarshallBook} for an introduction to majorization theory). In addition to the characterization of the convertibility of free states by means of free operations~\cite{Nielsen1999,Du2015,Chitambar2016,Du2017,Zhu2017,Gour2015,Streltsov2018}, majorization theory has been applied to different problems in quantum information such as entanglement criteria~\cite{Nielsen2001a,Partovi2012}, majorization uncertainty relations~\cite{Friedlan2013,Puchala2013,Rudnicki2014,Luis2016,Rastegin2016}, quantum entropies~\cite{Wehrl1978,Bosyk2016,Hanson2018} and quantum algorithms~\cite{Latorre2002}, among others~\cite{Nielsen2000,Nielsen2001b,Nielsen2001c,Chefles2002,Bellomo2019}. We restrict to QRTs based on majorization mainly for two reasons. As we have already mentioned, there are several examples of QRTs that satisfy a majorization law (see Table~\ref{tab:QRT maj} and Refs.~\cite{Nielsen1999,Du2015,Chitambar2016,Du2017,Zhu2017,Gour2015,Streltsov2018}). Thus, the results obtained which are based in the properties of majorization are of great generality, providing a unifying framework for several physical problems. On the other hand, majorization induces a \emph{lattice structure}~\cite{Bapat1991,Bondar1994,Cicalese2002}. We will show that this allows to introduce the notion of \emph{optimal common resource} in a very natural way. Before doing that, we stress that the lattice theoretical aspects of majorization theory have not been sufficiently exploited in comparison with other features of it in the area of quantum information. Indeed, the first applications were given in Refs.~\cite{Partovi2009,Partovi2011}; only recently, new applications of the majorization lattice have been found~\cite{Bosyk2017,Korzekwa2017,Bosyk2018,Sauerwein2018,Wang2018,Guo2018,Yu2019,Li2019}. \begin{table} \centering \resizebox{\textwidth}{!}{% \begin{tabular}{@{}lllll@{}} \toprule \multicolumn{1}{c}{\textbf{QRT}} & \multicolumn{1}{c}{\textbf{Free operations}} & \multicolumn{1}{c}{\textbf{Resources}} & \multicolumn{1}{c}{\textbf{Probability vector}} \\ \midrule Entanglement (pure) \cite{Nielsen1999} & LOCC & $\ket{\psi} = \sum_i \sqrt{\psi_i} \ket{i^A}\ket{i^B} \in \mathbb{C}^{d_A} \otimes \mathbb{C}^{d_B}$ (Schmidt decomposition) & $x(\psi) \equiv [\psi_1, \ldots, \psi_d]$ with $d = \min\{d_A,d_B\}$ \\ Coherence (pure) \cite{Du2015,Chitambar2016,Du2017,Zhu2017}& IO & $\ket{\psi} = \sum_i \psi_i \ket{i} \in \mathbb{C}^{d} $ ($\{\ket{i} \}$ incoherent basis) & $x(\psi) \equiv [|\psi|^2_1, \ldots, |\psi|^2_d]$ \\ Purity \cite{Gour2015,Streltsov2018} & Unital & $\rho \neq \frac{I}{d}$ acting on $\mathbb{C}^{d}$ & $x(\rho) \equiv [\rho_1, \ldots, \rho_d]$ with $\rho_i$ eigenvalues of $\rho$\\ \bottomrule \end{tabular}% } \caption{Quantum resource theories where the transformations between resources by means of free operations are given by a majorization relation. For each QRT, the corresponding free operations are: local operations and classical communication (LOCC), incoherent operations (IO) and unital, respectively.} \label{tab:QRT maj} \end{table} Here, we aim to address the following problem. Let us suppose that one wants to have a set of target resources $\T$. For obvious practical reasons, it is very useful to find a resource $\rho$, such that it can be converted by means of free operations to any other resource belonging to the target set, that is, $\rho \free \sigma$ for all $\sigma \in \T$. By definition, the \emph{maximal resource} (if it exists) has to perform this task for any target set in a given QRT. But a more interesting question is whether there exists a state that can carry out the same task, but using the least amount of resources as possible. More precisely, one aims to find a resource $\rho^{\ocr}$ such that $\rho^{\ocr} \free \sigma \ \forall \sigma \in \T$, and for any other $\rho$ satisfying $\rho \free \sigma \ \forall \sigma \in \T$, then either $\rho \free \rho^\ocr$ or $\rho \nbifree \rho^\ocr$. If this state exists, we refer to it as the \textit{optimal common resource} (ocr). \emph{In this work, we provide a solution for the problem of finding the optimal common resources for arbitrary target sets of all QRTs based on majorization}. This problem was already posed and (partially) solved in Ref.~\cite{Guo2018}, for possibly infinite (but denumerable) target sets of bipartite pure entangled states. Let us stress that our proposal is a twofold extension of that previous work. In the first place, we provide a unifying framework for arbitrary QRTs based on majorization, which includes not only entanglement resource theory, but also the important cases of coherence and purity resource theories. In the second place, we consider the most general case of possibly non-denumerable sets of target resources. This is a powerful extension of previous works, because it allows to apply this technique to target sets which are described by a continuous family of parameters. We provide the answer to this general problem by appealing to the completeness of the majorization lattice \cite{Bapat1991,Bondar1994}. In particular, our construction relies on the geometrical properties of Lorenz curves associated to the corresponding target set of probability vectors, which allow us to provide an explicit algorithm for the computation not only of the infimum (as in \cite{Bapat1991}) but also of the supremum. We also describe, for convex polytopes, the relationship between the infimum and supremum and their extreme points. \section{Majorization lattice} Here, we introduce the majorization lattice and present its most salient order-theoretic features. Let us consider probability vectors whose entries are sorted in non-increasing order, that is, vectors belonging to the set: \begin{equation}\label{eq:setprob} \Pset \equiv \left\{\left[x_1, \ldots, x_d \right]: x_i \geq x_{i+1} \geq 0 \ \mbox{and} \ \sum_{i=1}^d x_i=1 \right\}. \end{equation} Geometrically, this set is a convex polytope embedded in the $d-1$-probability simplex. Let us now introduce the notion of majorization between probability vectors (see, e.g.~\cite{MarshallBook}). \begin{definition} \label{def:majorization} For given $x,y \in \Pset$, it is said that $x$ majorizes $y$, denoted as $x \succeq y$, if and only if, \begin{equation} \label{eq:partialsums} \sum_{i=1}^k x_{i} \geq \sum_{i=1}^k y_{i} \ \forall \, k=1, \ldots, d-1. \end{equation} \end{definition} Notice that $\sum_{i=1}^d x_{k} = \sum_{i=1}^d y_{k}$ is trivially satisfied, because $x$ and $y$ are probability vectors (so we can discard this condition from the definition of majorization). The intuitive idea of majorization is that a probability distribution majorizes another one, whenever the former is more concentrated than the latter. In this sense, majorization provides a quantification of the notion of non-uniformity. To fix ideas, let us observe that any probability vector $x \in \Pset$ trivially satisfies the majorization relations: $e_d \equiv [1, 0, \dots, 0] \maj x \maj \left[\frac{1}{\rank x}, \ldots, \frac{1}{\rank x}, 0, \ldots,0 \right] \maj \left[\frac{1}{d}, \ldots, \frac{1}{d} \right] \equiv u_d$, where $\rank x$ is the number of positives entries of $x$, and $e_d$ and $u_d$ are the extreme $d$-dimensional probability vectors in the sense of maximum non-uniformity ($e_d$) and minimum non-uniformity ($u_d$, i.e. the uniform probability vector), respectively. Let us remark that there are several equivalent definitions of majorization that connect it with the notions of double stochastic matrices, Schur-concave functions and entropies, among others (see \eg \cite{MarshallBook}). Here we are interested in the order-theoretic properties of majorization. Indeed, it can be shown that the set $\Pset$ together with the majorization relation is a \textit{partially ordered set} (POSET, see \eg~\cite{DaveyBook} for an introduction to order theory). This means that that, for every $x,y,z \in \Pset$ one has \begin{enumerate}[(i)] \item reflexivity: $x \maj x$, \item antisymmetry: $x \maj y$ and $y \maj x$, then $x=y$, and \item transitivity: $x \maj y$ and $y \maj z$, then $x \maj z$. \end{enumerate} Notice that if one leaves the constraint that the entries of the probability vectors are sorted in non-increasing order, then condition (ii) is not valid in general. Instead of this, a weaker version holds, where $x$ and $y$ differ only by a permutation of its entries. In such case, majorization gives a preorder because condition (i) and (iii) remain valid. In general, majorization does not yields a total order for probability vectors belonging to $\Pset$. This is because there exist $x,y \in \Pset$ such that $x \nmaj y$ and $y \nmaj x$ for any $d >2$. In this situation, we say that the probability vectors are incomparable. For instance, it is straightforward to check that $x=[0.6, 0.16, 0.16, 0.08]$ and $y=[0.5, 0.3, 0.1, 0.1]$ are incomparable. There is a visual way to address majorization that consists in appealing to the notion of Lorenz curve \cite{Lorenz1905}. More precisely, for a given $x \in \Pset$ one introduces the set of points $\left\{(k,\sum_{i=1}^k x_i)\right\}_{k=0}^d$ (with the convention $(0,0)$ for $k=0$). Then, the Lorenz curve of $x$, say $L_x(\omega)$ with $\omega \in [0,d]$, is obtained by the linear interpolation of these points. At the end, one obtains a non-decreasing and concave polygonal curve from $(0,0)$ to $(d,1)$. In this way, given two Lorenz curves of $x$ and $y$, if the Lorenz curve of $x$ is greater (or equal) than the one of $y$, it implies that $x$ majorizes $y$, and vice versa. On the other hand, if two \emph{different} Lorenz curves intersect at least at one point in the interval $(1,d)$, it means that $x$ and $y$ are incomparable. See for example Fig.~\ref{fig:lorenzcurve}, where the Lorenz curve of $e_4, u_4, x=[0.6, 0.16, 0.16, 0.08]$ and $y=[0.5, 0.3, 0.1, 0.1]$ are plotted. It is clear that $e_4 \maj x \maj u_4$ and $e_4 \maj y\maj u_4$, but $x \nmaj y$ and $y \nmaj x$. However, in such case, one can easily realize that there are infinite Lorenz curves below the ones of $x$ and $y$, and among of all them, there is one which is the greatest one. In the same vein, there are infinitely many Lorenz curves above those of $x$ and $y$, and there is one which is the lowest one. \begin{figure}[h] \centering % \includegraphics[width=.7\textwidth]{figure1.png}\\ \caption{Lorenz curves of of $e_4$ (black), $u_4$ (gray), $x=[0.6, 0.16, 0.16, 0.08]$ (red) and $y=[0.5, 0.3, 0.1, 0.1]$ (blue). (a) Among all Lorenz curves below the ones of $x$ and $y$, there exists the greatest Lorenz curve that corresponds to the probability vector $x \wedge y = [0.5, 0.26, 0.14, 0.1]$ (green). (b) Among all Lorenz curves above the ones of $x$ and $y$, there exists the lowest Lorenz curve that corresponds to the probability vector $x \vee y = [0.6, 0.2, 0.12, 0.08]$ (cyan). }\label{fig:lorenzcurve} \end{figure} These intuitions can be formalized and allow to formulate a notion of infimum and supremum in the general case~\cite{Cicalese2002,Bapat1991,Bondar1994}. Consequently, the definition of majorization lattice is introduced as follows: \begin{definition} The quadruple $\La = \langle \Pset, \maj, e_d,u_d \rangle $ defines a bounded lattice order structure, where $e_d = [1,0, \ldots,0]$ is the top element, $u_d = \left[\frac{1}{d}, \ldots, \frac{1}{d}\right]$ is the bottom element and for all $x,y \in \Pset$ the \textit{infimum} $x\wedge y$ and the \textit{supremum} $x\vee y$ are expressed as in \cite{Cicalese2002} (or see below). \end{definition} Precisely, the components of the infimum are given by iteration of the formula \begin{equation}\label{eq:inf} (x \wedge y)_k = \min \left\{ \sum^k_{i=1} x_i, \sum^k_{i=1} y_i \right\} - \min \left\{ \sum^{k-1}_{i=1} x_i, \sum^{k-1}_{i=1} y_i \right\}, \end{equation} for $k=1, \ldots, d$ and the convention that summations with the upper index smaller than the lower index are equal to zero. For the supremum, one has to proceed in two steps. First, one has to calculate the probability vector, say $z$, with components given by \begin{equation}\label{eq:zmax} z_k = \max \left\{ \sum^k_{i=1} x_i, \sum^k_{i=1} y_i \right\} - \max \left\{ \sum^{k-1}_{i=1} x_i, \sum^{k-1}_{i=1} y_i \right\}. \end{equation} In general, this vector does not belong to $\Pset$, because its components are not in a decreasing order. If it is the case that $z \in \Pset$, then $z = x \vee y$. Otherwise, one has to apply the flatness process (see~\cite[Lemma 3]{Cicalese2002}) in order to get the supremum, as follows. For a probability vector $w = [w_1, \ldots, w_d]^t$, let $j$ be the smallest integer in $[2, d]$ such that $w_j > w_{j-1}$ and let $k$ be the greatest integer in $[1, j-1]$ such that \begin{equation} \label{eq:flat1} w_{k-1} \geq \frac{\sum_{l=k}^j w_l }{j-k+1} = a, \end{equation} with $w_0 > 1$. Then, a flatness probability vector $w'$ is given by \begin{equation} \label{eq:flat2} w'_{l} = \left\{ \begin{array}{cc} a & \mbox{for} \ l=k,k+1, \ldots, j \\ w_l & \mbox{otherwise}. \end{array} \right. \end{equation} Then, the supremum is obtained in no more than $d-1$ iterations, by iteratively applying the above transformations with the input probability vector $z$ given by \eqref{eq:zmax}, until one obtains a probability vector in $\Pset$. Let us consider a \emph{finite} set of probability vectors, that is, $\P = \{ x^1, \ldots, x^N \}$ with $\ x^i \in \Pset$. By appealing to the algebraic properties of the definition of lattice, it is straightforward to show that the infimum and the supremum of $\P$ always exist, and are given by $\bigwedge \P = x^1 \wedge x^2 \wedge \ldots \wedge x^N$ and $\bigvee \P = x^1 \vee x^2 \vee \ldots \vee x^N$. However, if one considers an arbitrary set of probability vectors (which could be infinite), the lattice properties are not strong enough to guarantee the existence of infimum and supremum. If the infimum and supremum exist for arbitrary families, the lattice is said to be \emph{complete}. It has been shown that the majorization lattice is indeed complete \cite{Bapat1991,Bondar1994}. For the sake of completeness, we reproduce the demonstration here and extend it in the following sense: we provide an explicit algorithm for computing the supremum. \begin{proposition} \label{lemma:completness} Let $\P$ an arbitrary set of probability vectors such that $\P \subseteq \Pset$. Then, there exist the infimum $x^{\inf} \equiv \bigwedge \P$ and the supremum $x^{\sup} \equiv \bigvee \P$ of $\P$. \noindent In addition, the components of the $x^{\inf}$ are given by \begin{equation}\label{eq:infuncountableset} x^{\inf}_k = \inf \left\{ \S_k \right\} - \inf \left\{\S_{k-1} \right\}, \end{equation} where $\S_k = \{S_k(x): x \in \P \}$ with $S_k(x) \equiv \sum^k_{i=1} x_i$ for $k \in \{1, \ldots, d\}$ and $S_0(x) \equiv 0$. \noindent On the other hand, to obtain the components of the $x^{\sup}$, we have first to define the probability vector with components given by \begin{equation}\label{eq:supuncountableset1} \bar{x}_k = \sup \left\{ \S_{k} \right\} - \sup \left\{\S_{k-1} \right\}. \end{equation} Then, we compute the upper envelope of the polygonal given by the linear interpolation of the points $\{(k, S_k(\bar{x})) \}_{k=0}^d$, say $\bar{L}(\omega)$, by using the algorithm~\ref{alg:upperenv}. Finally, the components of the supremum are given by: \begin{equation}\label{eq:supuncountableset} x^{\sup}_k = \bar{L}(k) - \bar{L}(k-1). \end{equation} \end{proposition} The proof of Proposition~\ref{lemma:completness} is given in~\ref{app:proofcompletness}. Clearly, when the set is given by two probability vectors in $\Pset$, that is $\P = \{x,y\}$, the calculus of infimum and supremum of the Proposition~\ref{lemma:completness} reduces to the procedure given in Ref.~\cite{Cicalese2002} (see Eqs.~\eqref{eq:inf}--\eqref{eq:flat2}). \subsection*{Infimum and supremum over convex polytopes} Let us illustrate the meaning and relevance of the infimum and supremum discussed above with an interesting example. First, let us note that if $\P \subseteq \Pset$ is a convex polytope, then the corresponding infimum and supremum can be computed as the infimum and supremum of the set of vertices, $\mathrm{vert}(\P)$. \begin{lemma} \label{lemma:convexplytope} Let $\P$ be a convex polytope contained in $\Pset$, and $\mathrm{vert}(\P)$ the set of vertices, $\mathrm{vert}(\P) = \{v^n\}^N_{n=1}$. Then, the infimum $x^{\inf} \equiv \bigwedge \P$ and the supremum $x^{\sup} \equiv \bigvee \P$ of $\P$ are given by the infimum and supremum elements of $\mathrm{vert}(\P)$, namely \begin{equation} x^{\inf} = \bigwedge \{ v^n \}^N_{n=1} \quad \mbox{and} \quad x^{\sup} = \bigvee \{ v^n\}^N_{n=1}. \end{equation} \end{lemma} The proof of Lemma~\ref{lemma:convexplytope} is given in \ref{app:lemma1}. Notice that, although the problem is reduced to the calculation of the infimum and supremum among the extreme points of the convex polytope, $x^{\inf}$ and $x^{\sup}$ do not necessarily belong to it (see \eg, Fig.~\ref{fig:bola}.(a)). However, we will see an interesting example where the infimum and supremum do belong to the given convex polytope (see \eg, Fig.~\ref{fig:bola}.(b)). \begin{figure}[h] \centering % \includegraphics[width=.7\textwidth]{figure2.png}\\ \caption{Infimum and supremum of convex polytopes in $\Delta^\downarrow_3$ (region formed by the convex hull of $e_3$, $u_3$ and $\left[\frac{1}{2},\frac{1}{2},0 \right]$) for (a) $\P= \left\{x \in \Delta^\downarrow_3: x = p [0.5, 0.4, 0.1] + (1-p) [0.55, 0.3, 0.15] \, \mbox{with} \, p \in [0,1]\right\}$ (black line), where $\bigwedge \P = [0.5, 0.35, 0.15]$ (red hexagon) and $\bigvee \P = [0.55, 0.35, 0.1]$ (blue square); and (b) $\P = B_{0.15}([0.525, 0.35, 0.125])$ (light gray region), where $\bigwedge \P = [0.45, 0.35, 0.2]$ (red hexagon) and $\bigvee \P = [0.6, 0.35, 0.05]$ (blue square). }\label{fig:bola} \end{figure} Let us consider the $\ell_1$--norm $\epsilon$--ball centered in $x^0 \in \Pset$ intersected with $\Pset$, that is, $B_\epsilon(x^0) =\{ x' \in \Pset: || x' - x^0||_1 \leq \epsilon \}$, where $||x||_1 \equiv \sum^d_{i=1} |x_i|$ denotes the $\ell_1$--norm of a probability vector. Let us first note that $\{ x' \in \mathbb{R}^d: || x' - x^0||_1 \leq \epsilon \}$ is a convex polytope (see Ref.~\cite{Hanson2018}). Then, $B_\epsilon(x^0)$ is also a convex polytope, because it is the intersection of that convex polytope with $\Pset$. Therefore, by applying Lemma~\ref{lemma:convexplytope}, $\bigwedge B_\epsilon(x^0)$ and $\bigvee B_\epsilon(x^0)$ reduces to finding the infimum and supremum of the vertices of $B_\epsilon(x^0)$. Interestingly enough, the lattice-theoretic property of majorization can be posed in strong connection with the notion of approximate majorization~\cite{Hanson2018,Horodecki2018}, which has recently found application in quantum thermodynamics~\cite{vanderMeer2017}. More precisely, the steepest $\epsilon$-approximation, $\bar{x}^{0(\epsilon)} \in B_\epsilon(x^0)$, and the flattest $\epsilon$-approximation, $\underline{x}^{0(\epsilon)} \in B_\epsilon(x^0)$, of $x^0$ given in~\cite{Hanson2018,Horodecki2018} satisfy that, $\bar{x}^{0(\epsilon)} \maj x \maj \underline{x}^{0(\epsilon)}$ for all $x \in B_\epsilon(x^0)$. Using the definition of infimum and supremum of a given family, it follows that $\bar{x}^{0(\epsilon)}=x^{\sup}$ and $\underline{x}^{0(\epsilon)}=x^{\inf}$, although the algorithms to obtain them are different to the ones presented here. Thus, we see that the notion of approximate majorization is in strong connection with the property of completeness of the majorization lattice. Furthermore, we have shown that it can be reduced to the application of the algorithm of infimum and supremum to the set of vertices of $B_\epsilon(x^0)$. \section{Optimal common resource} Now, we are ready to apply the Proposition~\ref{lemma:completness} to the problem of finding the optimal common resource in QRTs based on majorization. In the first place, we have to distinguish between two possible cases of QRTs based on majorization. We call direct majorization-based QRTs to those QRTs such that $\rho \free \sigma$ iff $x(\rho) \maj x(\sigma)$, whereas we call reversed majorization-based QRTs to those that reverse the majorization relation (that is, $\rho \free \sigma$ iff $x(\sigma) \maj x(\rho)$). Notice that purity is of the former type, whereas entanglement and coherence are of the latter one (see Table~\ref{tab:QRT maj}). For such QRTs, let us remark that $\rho^{\ocr}$ is an optimal common resource if $\rho^{\ocr} \free \sigma \ \forall \sigma \in \T$, and for any other $\rho$ satisfying $\rho \free \sigma \ \forall \sigma \in \T$ one has $\rho \free \rho^\ocr$. Let us observe that all states $\rho$ such that $\rho^{\ocr} \bifree \rho$ are equivalent in the sense that all of them are optimal common resources. For a given set of target resources $\T$, let us consider its corresponding set of probability vectors $\P$, which depends on the majorization-based QRT that one is dealing with. We show now that the problem of finding an optimal common resource within a QRT based on majorization, can be reduced to an application of the completeness of the majorization lattice. Indeed, by directly applying Proposition~\ref{lemma:completness}, one finds that an optimal common resource of $\T$ for direct majorization-based QRTs can be obtained from the supremum of the corresponding set of probability vectors $\P$. On the other hand, for reversed majorization-based QRTs, it can be obtained from the infimum of the corresponding set of probability vectors $\P$. In this way, the completeness of the majorization lattice is of the essence in dealing with the optimal common resources in QRTs based on majorization. As we have already stressed in the Introduction, this is a twofold extension of the proposal of Ref.~\cite{Guo2018}. \subsection*{Optimal common resource within the resource theory of quantum coherence} In the following, we illustrate how to obtain an optimal common resource within the resource theory of quantum coherence introduced in Ref.~\cite{Baumgratz2014}. Deterministic transformations between pure sates by means of incoherent operations (free operations) have been addressed in several works~\cite{Du2015,Chitambar2016,Du2017,Zhu2017}. In particular, we consider two pure sates $\ket{\psi} = \sum_{i=1}^d \psi_i \ket{i}$ and $\ket{\phi} = \sum_{i=1}^d \phi_i \ket{i}$, where $\{\ket{i}\}_{i=1}^{d}$ is a fixed orthonormal basis (the incoherent basis) of a $d$-dimensional Hilbert space. The coefficients $\{\psi_i\}$ and $\{\phi_i\}$ are complex numbers in general, satisfying $\sum_{i=1}^d |\psi_i|^2 = \sum_{i=1}^d |\phi_i|^2 =1$. Let $x(\psi)$ and $x(\phi)$ be the probability vectors in $\Pset$ associated to these pure states, that is, $x_i(\psi) = |\psi_{[i]}|^2$ and $x_i(\phi) = |\phi_{[i]}|^2$, where $|\psi_{[i+1]}| \geq |\psi_{[i]}|$ and $|\phi_{[i+1]}| \geq |\phi_{[i]}|$ for all $i$. It has be shown that $\ket{\psi}$ can be converted into $\ket{\phi}$ by means of incoherent operations (IO), denoted as $\ket{\psi} \underset{\mathrm{IO}}{\rightarrow}\ket{\phi}$, if and only if $x(\phi) \maj x(\psi)$ (see \eg Ref.~\cite{Streltsov2017} and references therein). This result can be seen as the analog of the celebrated Nielsen's theorem~\cite{Nielsen1999} for quantum coherence. Let us recall that $\sum_{i=1}^d \frac{1}{\sqrt{d}} \ket{i}$ is a maximally coherent state, since it can be converted into any other state by means of incoherent operations~\cite{Baumgratz2014}. We are going to discuss two cases in which the optimal common resource is not a maximally coherent one. As a first example, if we consider a subset of pure states given by $\T= \left\{\ket{\phi} \in \mathbb{C}^d: |\phi_{[1]}| \geq \alpha \right\}$ with $1/\sqrt{d}<\alpha \leq 1$, to find an optimal common resource of $\T$ we have to calculate the infimum of the set $\P = \{x \in \Pset: x_1 \geq \alpha^2\}$. It can be shown that $\bigwedge \P = \left[\alpha^2, \frac{1-\alpha^2}{d-1}, \ldots, \frac{1-\alpha^2}{d-1}\right]$, so that an optimal common resource has the form $\ket{\psi^\ocr} = \alpha \ket{1} + \sum_{i=2}^d \sqrt{\frac{1-\alpha^2}{d-1}} \ket{i}$. Clearly this optimal common resource is not a maximally coherent state. As a second example, motivated by the study of coherence of quantum superpositions~\cite{Yue2017}, let us consider a more subtle target set formed by superpositions of given two orthogonal states. More precisely, let $\T= \left\{\ket{\phi} \in \mathbb{C}^d: \ket{\phi} = \alpha \ket{\mu} + \beta \ket{\nu} \right\}$, where $\ket{\mu}= \sum_{i=1}^{d_1} \frac{1}{\sqrt{d_1}} \ket{i}$, $\ket{\nu}= \sum_{i=d_1+1}^{d} \frac{1}{\sqrt{d-d_1}} \ket{i}$ and $\alpha^2+\beta^2 = 1$ (with $\alpha,\beta\in\mathbb{R}$ for simplicity). If we do not impose any other restriction over $\alpha$, then $\T$ contains the maximally coherent state, which is trivially the optimal common resource. In order to exclude that possibility, let us consider that $\alpha^2\neq d_1/d$. In particular, let us suppose that $\alpha^2>d_1/d$, so that there is $\alpha^2_{\min}$ such that $\alpha^2_{\min}\leq\alpha^2\leq1$, with $\alpha^2_{\min}$ strictly greater than $d_1/d$ (the other case, with $\alpha^2<d_1/d$, is completely analogous). The corresponding set of probability vectors is \begin{equation*} \P = \bigg\{x \in \Pset: x = \Big[\overbrace{\frac{\alpha^2}{d_1}, \ldots,\frac{\alpha^2}{d_1}}^{d_1},\frac{1-\alpha^2}{d-d_1},\ldots,\frac{1-\alpha^2}{d-d_1} \Big] \bigg\}, \end{equation*} and the infimum of $\Pset$ is shown to be \begin{equation*} \bigwedge \P = \Big[\overbrace{\frac{\alpha^2_{\min}}{d_1}, \ldots,\frac{\alpha^2_{\min}}{d_1}}^{d_1},\frac{1-\alpha^2_{\min}}{d-d_1},\ldots,\frac{1-\alpha^2_{\min}}{d-d_1} \Big]. \end{equation*} Therefore, an optimal common resource of $\T$ is of the form \begin{equation*} \ket{\psi^\ocr} = \sum_{i=1}^{d_1} \sqrt{\frac{\alpha^2_{\min}}{d_1}} \ket{i} + \sum_{i=d_1+1}^d \sqrt{\frac{1-\alpha^2_{\min}}{d-d_1}} \ket{i}. \end{equation*} Notice that in this example $\ket{\psi^\ocr} \notin \T$. \section{Concluding remarks} In this paper we gave a solution for the problem of finding an optimal common resource for an arbitrary family of target states of a given a QRT based on majorization like entanglement, coherence or purity (see Table~\ref{tab:QRT maj}). Our method relies on the completeness properties of the majorization lattice. We provided concrete algorithms for computing the infimum and supremum of an arbitrary family of states (Proposition~\ref{lemma:completness}). Our contribution improves previous works (e.g. \cite{Bapat1991,Bondar1994,Cicalese2002,Guo2018}), in the sense that our algorithm works for target sets of arbitrary cardinality (i.e., we provide an expression for the supremum for possibly non-denumerable families of states). Also, for convex polytopes, we include a study of the relationship between the infimum and supremum, and their extreme points (Lemma~\ref{lemma:convexplytope}). In addition, we showed that the notion of approximate majorization is in strong connection with the property of completeness of the majorization lattice~\cite{Hanson2018,Horodecki2018}. Indeed, the flattest and steepest approximations are nothing more than the infimum and supremum of the corresponding set, respectively, and they can be calculated only from their vertices. Finally, the fact that completeness of the majorization lattice is of the essence in dealing with the optimal common resources is illustrated with some examples within the resource theory of quantum coherence~\cite{Baumgratz2014}. \section*{Acknowledgement} This work has been partially supported by CONICET (Argentina) and by Fondazione di Sardegna within the project ``Strategies and Technologies for Scientific Education and Dissemination'', cup: F71I17000330002.
\section{Introduction} The concept of simulation has played an important role in both AI and cognitive science for over 40 years. There are two distinct uses for the term {\it simulation}, particularly as used in computer science and AI. First, simulation can be used as a description for {\it testing a computational model}. That is, variables in a model are set and the model is run, such that the consequences of all possible computable configurations become known. Examples of such simulations include models of climate change, the tensile strength of materials, models of biological pathways, and so on. We refer to this as {\it computational simulation modeling}, where the goal is to arrive at the best model by using simulation techniques. Simulation can also refer to an environment which allows a user to interact with objects in a ``virtual or simulated world", where the agent is embodied as a dynamic point-of-view or avatar in a proxy situation. Such simulations are used for training humans in scripted scenarios, such as flight simulators, battle training, and of course, in video gaming: in these contexts, the software and gaming world assume an embodiment of the agent in the environment, either as a first-person restricted POV (such as a first-person shooter or RPG), or an omniscient movable embodied perspective (e.g., real-time or turn-based strategy). We refer to such approaches as {\it situated embodied simulations}. The goal is to simulate an agent within a situation. Simulation has yet another meaning, however. Starting with Craik \shortcite{craik1943nature}, we encounter the notion that agents carry a mental model of external reality in their heads. Johnson-Laird \shortcite{johnson1987could} develops his own theory of a mental model, which represents a situational possibility, capturing what is common to all the different ways in which the situation may occur \cite{johnson2002conditionals}. This is used to drive inference and reasoning, both factual and counterfactual. Simulation Theory, as developed in philosophy of mind, has focused on the role that ``mind reading'' plays in modeling the mental representations of other agents and the content of their communicative acts \cite{gordon1986folk,goldman1989interpretation,heal1996simulation,goldman2006simulating}. Simulation semantics (as adopted within cognitive linguistics and practiced by Feldman \shortcite{feldman2010embodied}, Narayanan \shortcite{narayanan2010mind}, Bergen \shortcite{bergen2012louder}, and Evans \shortcite{evans2013language}) argues that language comprehension is accomplished by means of such mind reading operations. Similarly, within psychology, there is an established body of work arguing for ``mental simulations" of future or possible outcomes, as well as interpretations of perceptual input \cite{graesser1994constructing,barsalou1999perceptions,zwaan1998situation,zwaan2012revisiting}. These simulation approaches can be referred to as {\it embodied theories of mind}. % Their goal is to view the semantic interpretation of an expression by means of a simulation, which is either mental (a la Bergen and Evans) or interpreted graphs such as Petri Nets (a la Narayanan and Feldman). In this position paper, we introduce a simulation framework, VoxWorld, that integrates the functionality and the goals of all three approaches above. Namely, we situate an embodied agent in a multimodal simulation, with {\it mind-reading} interpretive capabilities, facilitated through assignment and evaluation of object and context parameters within the environment being modeled. For example, relations created by events persist after the completion of the event, and so in event simulation, they must also persist in order for the simulation to be considered accurate. Fig.~\ref{fig:poses} shows a number of objects at similar locations but in one case in orientations that, due to the effects of physics, would be considered ``unstable" after the completion of a placement event. Object knowledge about thinks like {\it shape of cup}, {\it top of plate}, {\it default position of banana} mean that human observers can judge the image on the left to be unsatisfactory results of placement events and that on the right to be more prototypical, due to the human ability to {\it simulate} what the result of an event in a given environment likely will be. \begin{figure}[htbp] \centering \includegraphics[width=0.18\textwidth]{images/unnatural-pose.png} \includegraphics[width=0.18\textwidth]{images/natural-pose.png} \caption{Objects in unnatural (L) and natural (R) positions} \label{fig:poses} \end{figure} VoxWorld is based on the semantic scaffold provided by the VoxML modeling language \cite{PUSTEJOVSKY16.1101}, which provides a dynamic, interpretable model of objects, events, and their properties. This allows us to create visualized simulations of events and scenarios that are rendered analogues to the ``mental simulations" discussed above. VoxSim \cite{krishnaswamy2016multimodal,krishnaswamy2016voxsim} serves as the event simulator within which these simulations are created and rendered in real time, serving as the computer's method of visually presenting its interpretation of a situation or event. Because modalities are modes of presentation, a multimodal simulation entails as many presentational modes as there are modalities being modeled. The visual modality of presentation (as in embodied gaming) necessitates ``situatedness'' of the agent, as do the other perceptual modalities. Therefore, when we speak of {\it multimodal simulations}, they are inherently situated. In a human-computer interaction using such a simulation, the simulation is a demonstration of the computational agent ``mind-reading" capabilities (an {\it agent simulation}). If the two are the same (where the agent is a proxy for the player or user, then the ``mind-reading" is just a demonstration of the scenario) If, on the other hand, the two are separate (agent is {\it not} proxy for the user), then the simulation/demonstration communicates the agent's understanding of the user and the interaction. In this case, this demonstration entails the illustration of both epistemic and perceptual content of the agent. We believe that simulation can play a crucial role in human-computer communication; it creates a shared epistemic model of the environment inhabited by a human and an artificial agent, and demonstrates the knowledge held by the agent publicly. Demonstrating knowledge is needed to ensure a shared understanding with its human interlocutor. If an agent is able to receive information from a human and interpret that relative to its current physical circumstances, it can create an epistemic representation of that same information. However, without a modality to express that representation independently, the human is unable to verify or query what the agent is perceiving or how that perception is being interpreted. In a simulation environment the human and computer share an epistemic space, and any modality of communication that can be expressed within that space (e.g., linguistic, visual, gestural) enriches the number of ways that a human and a computer can communicate within object and situation-based tasks, such as those investigated by Hsiao et al. \shortcite{hsiao2008object}, Dzifcak et al. \shortcite{dzifcak2009and}, and Cangelosi \shortcite{cangelosi2010grounding}, among others. VoxWorld, and the accompanying simulation environment provided by VoxSim, includes the perceptual domain of objects, properties, and events. In addition, propositional content in the model is accessible to the simulation. Placing even a simple scenario, such as a blocks world setup, in a rendered 3D environment opens the search space to the all the variation allowed by an open world, as objects will almost never be perfectly aligned to each other or to a grid, with slight offsets in rotation caused by variations in interpolation, the frame rate, or effects of the platform's physics. Nevertheless, when the rendering is presented to a user, the user can use their native visual faculty to quickly arrive at an interpretation of what is being depicted. Situational embodiment takes place in real time, so in the case of a situation where there may be too many variables to predict the state of the world at time $t$ from a set of initial conditions at time $0$, situational embodiment within the simulation allows the reasoning agent to reason forward about a specific subset of consequences of actions that may be taken at time $t$, given the agent's current conditions and surroundings. Situatedness and embodiment is required to arrive at a complete, tractable interpretation given any element of non-determinism. For example, an agent trying to navigate a maze from start to finish could easily do so with a map that provides them complete, or at least sufficient, information about the scenario. If, however, the scene includes a disruptor (e.g., the floor crumbles, or doors open and shut randomly), the agent would be unable to plot a course to the goal. It would have to start moving, assess the current circumstances at every timestep, and choose the next move or next set of $n$ moves based on them. Situated embodiment allows the agent to assess next move based on the current set of relations between itself at the environment (e.g., ability to move forward but not leftward at the current state). This provides for reasoning that not only saves computational resources but performs more analogously to human reasoning than non-situated, non-embodied methods. \iffalse , allowing access to beliefs, desires, and intentions (BDI), and for them to be distinguished by the agents to act and communicate appropriately. This provides the non-linguistic visual and action modalities, which are augmented by the inherently non-linguistic gestural modality enacted within the visual context. \fi \iffalse We focus on something that is similar to live simulations, which means that the interaction with the environment is encoded. The common ground is part of the model. The notion of situated grounding. A live simulation involves the encoding of the context of the embedded agent. The assumptions in the VoxWorld multimodal simulation framework The distinction is twofold: a. a simulation The communication of knowledge of an agent Let's articulate: What we mean by simulation in VoxWorld: 1. a demonstrable image of the world itself. 2. Demonstrable means that the world is demonstrated and communicated to the co-agent (human) who is using or exploring the simulation. So, a VoxWorld simulation is a virtual model of a world that is effectively demonstrated in a multimodal manner so as to communicate the state and consequences of the world, objects, and actions in the world. It seems as though VoxWorld is just the gluing together of these two types of simulations. 1. VoxML (or some language encoding purpose and function) is required for placing objects in the world. 2. By placing objects in the world, we have access to them so we can reason about them. However, while this is certainly part of VoxWorld, this is not the core that distinguishes it from the conventional view of simulation. The simulation demonstrates whether the co-agent (simulation generator) understands what the description signifies. If so, the system has reasoned about the objects mentioned in a way similar to how the user might, by instantiated objects at specific locations and orientations such that they satisfy conventional notions of object/entity position/pose/property. Minimal models are great, but not demonstrable in any first order way. Minimal simulations are demonstrable. VoxWorld facilitates reasoning about objects It is an interpreted world. She is embodied What we have used VoxWorld for: 1. interacting with humans to engage in peer-to-peer communication for goal-directed activities. 2. Action and concept learning. 3. Monte Carlo simulation (MCS) gives us data on what information to include in each event. This feeds into the semantics that informs the VoxML-generated simulation, to better model how an event behaves with a user/agent. 3. we are experimenting multimodal parsing and generation 4. Scenarios within a training simulator open a window to remove smoke from an indoor space. Within VoxWorld, we can have the overall goal still loosely specified, but no particular set of actions or plans scripted. What we can enable, is a novel solution to the end goal, by for example opening several windows partially, to allow for a faster cross ventilation. Placing even a simple scenario, such as a blocks world setup, in a rendered 3D environment opens the search space to the all the variation allowed by an open world, as objects will almost never be perfectly aligned to each other or to a grid, with slight offsets in rotation caused by variations in interpolation caused by the frame rate, or effects of the platform's physics. Nevertheless, when the rendering is presented to a user, the user can use their native visual faculty to quickly arrive at an interpretation of what is being depicted. situational embodiment takes place in real-time, so in the case of a situation where there may be too many variables to predict the state of events at time $t$ from a set of initial conditions at time $0$, situational embodiment within the simulation allows the reasoning agent to reason forward about a specific subset of consequences of actions that may be taken at time $t$ given the agent's current conditions and surroundings at that time. Situatedness and embodiment is required to arrive at a complete interpretation. we argue that situation embodiment is vital for tractable interpretation of a simulation in real time Situatedness and embodiment is required to arrive at a complete interpretation. we argue that situation embodiment is vital for tractable interpretation of a simulation in real time Teleotopology - A spatial calculus or temporal calculus deals with spatial objects (point, line, region) and temporal objects, respectively. But we don't reason about space, we reason about objects in space, and the objects in space that we reason about are not geometries --- they are objects with affordances and purposes, and they have a lot of different geometric properties, but the main this about them are what they're for and what we do with/for/to them. So, for reasoning in the world, spatial reasoning alone in incomplete. This is not brought out clearly when we deal in abstractions a la QS libraries. What else is needed? 1) Causation; 2) Function. This is supplied by the specific implementation, but there's to date no specific language to talk about what that extra stuff you need is. When we reasoning about objects in the world, we go beyond spatial and temporal reasoning, we reason about function. The object geometry is not all you need to know; you need purpose and function --- encoded in what we call a teleotopology. The simulation allows you to address the context in orderto resolve the ambiguity, if there is any. \fi \iffalse \subsection{ Areas from the CfP that are addressed} \begin{itemize} \item Novel simulation platforms \\ VoxML/VoxSim is novel because: it provides a semantics for every object in the simulation. \item Novel tasks that can be solved using simulation platforms \\ embodied spatial reasoning: e.g., situational embodiment takes place in real-time, so in the case of a situation where there may be too many variables to predict the state of events at time $t$ from a set of initial conditions at time $0$, situational embodiment within the simulation allows the reasoning agent to reason forward about a specific subset of consequences of actions that may be taken at time $t$ given the agent's current conditions and surroundings at that time. Situatedness and embodiment is required to arrive at a complete interpretation. we argue that situation embodiment is vital for tractable interpretation of a simulation in real time Examples may include trying to predict if one object will fit inside another and reasoning about how to do that. \begin{itemize} \item Fitting a rigid object (e.g., knife) inside a concave object (e.g., cup). If presented with a knife and cup, a human can perform the motion necessary to do so. This is facilitated by knowledge about the properties of the object (e.g., the concavity of the cup, the relative axial dimensions of a knife). A computer has no such ready knowledge but a simulation environment, along with object and event semantics (i.e., semantics of what is meant by the event {\it put in}, its requirements and results), turn this into an easily tractable problem \cite{krishnaswamy2016multimodal} -- in the case of an object to big to fit inside the destination in any orientation, a simulation-based system can return a judgment of impossibility \item Fitting a deformable object (e.g., deflated ball) inside a concavity (e.g., mailing tube). Here the topology of the object remains the same but due to its non-rigidity a single transformation over the entire object in insufficient, requiring transformations of individual edges and vertices \item Qualitative modeling within a simulation environment affords modeling physics effects qualitatively as well, while the game engine allows the visualization/presentation of those effects to the viewer, immediately conveying the AI agent's understanding of said effects. \end{itemize} \item Mechanisms for minimizing the reality gap between simulations and the real world. \\ By imbuing objects in the domain with richer behavioral structure (object and functional affordances), the simulation is populated with not only with agents who have strategies for action, but with things that will afford behavior in a realistic manner. \end{itemize} \fi \section{A Formal Interpretation of Simulations} Given the distinction above between interpretations for ``simulation," we have been developing an approach that integrates all three: a situated embodied environment built on a game engine platform. The computer, either as an embodied agent distinct from the viewer, or as the totality of the rendered environment itself, presents an interpretation ({\it mind-reading}) of its internal model, down to specific parameter values, which are often assigned for the purposes of testing that model. We assume that a simulation is a contextualized 3D virtual realization of both the situational environment and the co-situated agents, as well as the most salient content denoted by communicative acts in discourse between them. VoxWorld and VoxML \cite{PUSTEJOVSKY16.1101}, provide the following characteristics: object encoding with rich semantic typing and action affordances; action encoding as multimodal programs; it reveals the elements of the common ground in interaction between parties, be they humans or artificially intelligent agents. ``Common ground" in a computational context relies on implementations of the following: \begin{enumerate} \item {\it Co-situatedness} and {\it co-perception} of the agents, such that they can interpret the same situation from their respective frames of reference. This might be a human and an avatar perceiving the same virtual scene from different perspectives (see Fig.~\ref{fig:env-still}), or a combined virtual-physical scene with the integration of computer vision technology; or a human sharing the perspective of a robot as it navigates through a disaster zone. \item {\it Co-attention} of a shared situated reference, which allows more expressiveness in referring to the environment (i.e., through language, gesture, visual presentation, etc.). The human and avatar might be able to refer to objects on the table in multiple modalities with a common model of differences in perspective-relative references (e.g., ``your left, my right"); or the human sharing the robot's perspective might be able to direct its motion using reference in natural language (``go through the second door on the left") or gesture (``go this way," with pointing). \item {\it Co-intent} of a common goal, such that adversarial relationships between agents reflect a breakdown in the common ground. Here, the human and avatar in interaction around a table might seek to collaborate to build a structural pattern known to one or both of them; or the human and robot sharing perspective both have a goal to free someone trapped behind a door in a fire. The robot informs the human about the situation and the human helps the robot problem-solve in real time until the goal is achieved. \end{enumerate} The theory of common ground has a rich and diverse literature concerning what is shared or presupposed in human communication \cite{clark1991grounding,gilbert1992social,stalnaker2002common,asher1998common,tomasello2007shared,PustejovskyCommonGround}. VoxML (Visual Object Concept Markup Language) forms the scaffold used to encode knowledge about objects, events, attributes, and functions by linking lexemes to their visual instantiations, termed the ``visual object concept" or {\it voxeme}. In parallel to a lexicon, a collection of voxemes is termed a {\it voxicon}. There is no requirement on a voxicon to have a one-to-one correspondence between its voxemes and the lexemes in the associated lexicon, which often results in a many-to-many correspondence. That is, the lexeme {\it plate} may be visualized as a {\sc [[square plate]]}, a {\sc [[round plate]]}, or other voxemes, and those voxemes in turn may be linked to other lexemes such as {\it dish} or {\it saucer}. Each voxeme is linked to either an object geometry, a program in a dynamic semantics, an attribute set, or a transformation algorithm, which are all structures easily exploitable in a rendered simulation platform. \iffalse VoxML treats objects and events in terms of a dynamic event semantics, Dynamic Interval Temporal Logic (DITL) \cite{PustMosz:2011}. The advantage of adopting a dynamic interpretation of events is that we can map linguistic expressions directly into simulations through an operational semantics \cite{Miller91,miller1976language}. VoxML is used to specify the information beyond that which is inferable from the geometry, DITL, or attribute properties. VoxSim \cite{krishnaswamy2016voxsim}, the semantically-informed simulation environment built on the VoxML platform, does not rely on manually-specified categories of objects with identifying language, and instead procedurally composes the properties of voxemes in parallel with the lexemes they are linked with. \fi An {\sc object} voxeme's semantic structure provides {\it habitats}, which are situational contexts or environments conditioning the object's {\it affordances}, which may be either ``Gibsonian" affordances \cite{gibson1982reasons} or ``Telic'' affordances \cite{Pustejovsky1995,pustejovsky2013dynamic}. A habitat specifies how an object typically occupies a space. When we are challenged with computing the embedding space for an event, the individual habitats associated with each participant in the event will both define and delineate the space required for the event to transpire. Affordances are used as attached behaviors, which the object either facilitates by its geometry (Gibsonian) or purposes for which it is intended to be used (Telic). For example, a Gibsonian affordance for [[{\sc cup}]] is ``grasp," while a Telic affordance is ``drink from." This allows procedural reasoning to be associated with habitats and affordances, executed in real time in the simulation, inferring the complete set of spatial relations between objects at each frame and tracking changes in the shared context between human and computer. \iffalse Thus, simulation becomes a way of tracing the consequences of linguistic spatial cues through the narrative structure of an event and presenting the computer system's understanding of it.\fi It also allows the system to reason about objects and actions independently. When simulating the objects alone, the simulation presents how the objects change in the world. By removing the objects and presenting only the actions that the viewer would interpret as {\it causing} the intended object motion (i.e., a pantomime of an embodied agent moving an object without the object itself), the system can present a ``decoupled" interpretation of the action, for example, as an animated gesture that traces the intended path of motion. By composing the two, it demonstrates that particular instantiation of the complete event. This allows an embodied situated simulation approach to easily compose objects with actions by directly interpreting at runtime how the two interact. \iffalse Formal syntax of VoxML (basic vocabulary types). 1. Examples and semantics of object types, and their habitats. 2. Examples of programs 3. Examples of attributes, and how they change. 4. Examples of embeddings (embodiments). \fi \section{Reasoning within an Interpreted Simulation} \iffalse providing more details as to what sorts of Unity environments the platform provides and more details into the objects and relations it offers. A brief summary of the experiments alluded to in the last sentence of this section would be helpful to. \fi {\bf VoxSim} \cite{krishnaswamy2016multimodal,krishnaswamy2016voxsim} implements the VoxML platform in the Unity game engine software by Unity Technologies\footnote{https://unity3d.com/}. The current implementation of VoxSim provides scenes in a Blocks World domain, augmented with a set of more complicated or interesting everyday objects (e.g., cups, plates, books, etc.). There are scenes without an avatar where the user can direct the computer to manipulate objects in space (see Figs.~\ref{fig:poses} and ~\ref{fig:knife_in_mug}) or with an avatar that can act upon objects and respond to the user's input where it is ambiguous (see Fig.~\ref{fig:env-still}). {\it VoxWorld} contains other software, models, and interfaces, e.g., to consume input from CNN-based gesture recognizers \cite{krishnaswamy2017communicating}, and to track and update the agent's epistemic state or knowledge about what the human interlocutor knows. It is a straightforward process to create new scenes with 3D geometries with packaged code that handles the creates and instantiation of voxemes, handles their interactions and performs basic spatial reasoning over them. We also provide a library of basic motion predicates and methods of composing them into more complex actions using VoxML. Given the continuous tracking of object parameters such as position and orientation, facilitated by a game engine or simulation, and the knowledge of object, event, and functional semantics facilitated by a formal model, an entity's interpretation at runtime can be computed in conjunction with the other entities it is currently interacting with and their properties. One such canonical example would be placing an object [[{\sc spoon}]] in an [[{\sc in}]] relation with another object [[{\sc mug}]] (Fig.~\ref{fig:knife_in_mug}). \begin{figure}[htbp] \centering \includegraphics[width=0.1\textwidth]{images/spoon_in_mug1.png} \includegraphics[width=0.1\textwidth]{images/spoon_in_mug2.png} \includegraphics[width=0.1\textwidth]{images/spoon_in_mug3.png} \includegraphics[width=0.1\textwidth]{images/spoon_in_mug4.png} \caption{[[{\sc spoon in mug}]]} \label{fig:knife_in_mug} \end{figure} The mug has an intrinsic top, which is aligned with the upward Y-axis of the world or embedding space (denoted in VoxML as \{$align(Y,\mathcal{E}_{Y})$, $top(+Y)$\}). The mug is also a concave object, and the mug's geometry (the [[{\sc cup}]], excluding the handle) has reflectional symmetry across its inherent (object-relative) XY- and YZ-planes, and rotational symmetry around its inherent Y-axis such that when the object is situated in its inherent $top$ habitat, its Y-axis is parallel to the world's. From this we can infer that the {\it opening} (e.g., access to the concavity) must be along the Y-axis. Encoding the object's concavity also allows fast computation for physics and collisions using bounding boxes, while still facilitating reasoning over concave objects. \iffalse Thus in order to compose an [[{\sc in}]] relation with various types of objects, we have the following options, expressed as the RCC relation(s) ($E$xternally $C$onnected, $P$artial $O$verlap, $T$angential $P$roper $P$art) resulting from $rel(x,concavity\_type)$ (Fig.~\ref{tab:in-on-compositions}). \begin{table}[h!] \centering \begin{tabular}{|c|c|c|} \hline & {\bf Concave} & {\bf Non-concave} \\ \hline [[{\sc in}]] & $EC$ & $PO$, $TPP$ \\ \hline [[{\sc on}]] & $EC$ & $EC$ \\ \hline \end{tabular} \caption{Relation $\times$ concavity composition ([[{\sc in}]] vs. [[{\sc on}]])} \label{tab:in-on-compositions} \end{table} \fi VoxSim performs reasoning over 3D variants of well-known spatial calculi (e.g., Albath et al. \citeyear{albath2010rcc}) and interval/point calculi from libraries such as QSRLib \cite{gatsoulis2016qsrlib}, computing axial overlap with the Separating Hyperplane Theorem \cite{schneider2014convex}. In order to put object $x$ $in$ object $y$, while maintaining external contact with $y$'s concave geometry, the placed object $x$ must {\it fit inside} the concave object $y$. In the case of the mug, it can be reasoned as shown that its concavity opens along the Y-axis, so any computational reasoner must also determine that the object to be placed within it can fit in that same orientation. In the case of a spoon, normally lying flat on a surface, somewhere flush with the world's XZ-plane, simply placing it at the point where it would touch the bottom of the inside of the mug would also cause it to interpenetrate the mug's sides inappropriately, and so the spoon must first be turned (rotated) to align with the mug's opening. The requirements on simulating {\it put the spoon in the mug} enforce the resulting state of this ``turn" action as a precondition, which allows for intelligent decision making typically not learnable from a modality such as language or still images. Deformation of the object is also possible, as long as it maintains the object's topological isomorphism. Just as individual transformations over rigid object bounding boxes can be tested for relation or event satisfaction in a given context, transformations over individual vertices and edges can be performed to search for the set of deformations that satisfy a known constraint. For instance, the bounds of an object $x$ and a containing space $y$ can be extracted at each frame as deformations are performed over $x$ such that a predicate like as $contains(extents(x),extents(y))$ can be computed to test the satisfaction condition of $put(x,in(y))$ where $x$ is deformable. This allows us, within VoxSim, to solve for deformations that describe events such as {\it crumple} or {\it fold}. Even within the continuous open world of a game or simulation-based environment, searching for transformations over individuals within a finite set of vertices and edges that satisfy a predetermined condition keeps the search space tractable well within computational limits and facilitates the gathering of data for experiments that can teach an AI agent to solve decidable problems such as ``how to fold a cloth" or ``how to fit numerous items in a container." Search can be performed in an embodied, situated simulation environment through parameter setting of the type found in {\it computational simulation modeling}. In order to generate a visualization of an event, all variable parameters must have values assigned, otherwise the program will fail to run. This requirement on the game engine software also becomes a requirement on the creation of a fully-defined simulation model. The composition of objects and events provide much of the needed information but in cases where parameters still require values (e.g., the speed of a moving object described simply by the predicate ``slide"), we can use Monte Carlo value assignment to set those values in the simulation environment. The rendered simulation including the stochastically-assigned value(s) is presented as the system's interpretation of that situation being modeled formally. We have performed a number of experiments in this area using the VoxSim software \cite{krishnaswamy2017montecarlo}. For a set of motion predicates where various parameters are left underspecified in the linguistic description (e.g., ``slide the block across the table" says nothing about speed or direction of motion; ``put the block next to book" or ``touch the block to the book" does not fully specify the relative placement of the two objects in 3D space), we generated multiple simulations of such events, captured them on video along with the specific parameter values used in each simulation, and had human evaluators choose the best simulation out of three for one description, and the best description out of three for one simulation. This allowed us generate a novel dataset of motion events and parameter values descriping prototypical instances of them (according to evaluators), and such data can be used to train a model that captures contextual dependecies for better simulation generation and interpretation. \iffalse Relations created by events persist also after the completion of the event, and so too must they persist in event simulation. \begin{figure}[htbp] \centering \includegraphics[width=0.18\textwidth]{images/unnatural-pose.png} \includegraphics[width=1.28in]{images/natural-pose.png} \caption{Objects in unnatural (L) and natural (R) positions} \label{fig:poses} \end{figure} Fig.~\ref{fig:poses} shows a number of objects at similar locations but in one case in orientations that, due to the effects of physics, would be considered ``unstable" after the completion of a placement event. Object knowledge about thinks like {\it shape of cup}, {\it top of plate}, {\it default position of banana} mean that human observers can judge the top image to be unsatisfactory results of placement events and the bottom image to be more prototypical, due to the human ability to {\it simulate} what the result of an event in a given environment likely will be. \fi \iffalse The specific examples we will discuss: Fitting a rigid object within a concave object Deformable sphere fitting inside a shipping box \fi \section{Learning by Communication} One of the things that an embodied simulation model for AI enables is {\it peer-to-peer communication}, specifically because of the requirement that the AI agent have some kind of situated embodiment in which it interprets its environment. This allows the creation of common ground between the human and the AI that allows them to communicate \cite{pustejovsky2017creating}. \begin{figure} \centering \includegraphics[width=2in]{images/env-still.png} \caption{\label{fig:env-still}Screenshot of human-avatar interaction in VoxSim. The purple circle indicates the location interpreted as the target of the human subject's pointing.} \end{figure} We use the example of learning to build a structure, namely a staircase. In a series of user studies, we had naive human subjects interact with an avatar (a screenshot of VoxSim is given in Fig.~\ref{fig:env-still}) to build a staircase out of six blocks. Due to subjects' lack of skill using the system fluently, the generated structures all satisfied the user's notion of a staircase, but across the 17 samples were often diverse and noisy (variants included spaces between blocks, blocks not properly aligned, or blocks rotated). Each of the 17 structures is defined by $\approx$20 qualitative spatial relations, and each set is stored as an unordered list. \begin{figure} \centering \includegraphics[height=.6in]{images/staircase1-crop} \includegraphics[height=.6in]{images/staircase2-crop} \includegraphics[height=.6in]{images/staircase3-crop} \caption{\label{fig:examples}Example user-constructed staircases} \end{figure} The qualitative relation sets that defined each structure, extracted directly from VoxSim via Unity, were then used to train a model for the avatar to use to build its own novel instance of a staircase structure. The avatar in the simulation places a block then, using a 4-layer convolutional neural network, chooses one of its known examples to begin approximating with the next step. Using a long short-term memory network of 3 layers with 32 nodes each, and trained up to 20 timesteps, the agent selects the most likely sequence of moves that would approximate the chosen example structures. These moves are then pruned using heuristic graph-matching and a move is chosen. Further details of the method and sample results are given in \cite{krishnaswamy2019combining}. \begin{figure} \centering \includegraphics[height=.6in]{images/l-pointing-staircase1.png} \includegraphics[height=.6in]{images/l-pointing-staircase2.png} \includegraphics[height=.6in]{images/r-pointing-staircase1.png} \includegraphics[height=.6in]{images/r-pointing-staircase2.png} \caption{\label{fig:examples}Example learned staircases} \end{figure} However, sometimes the agent generates a structure that does not comport with an observer's understanding of that structure label. In previous experimentations using a similar framework for action learning \cite{do2018teaching} we encountered difficulty in using negative examples to steer the learning agent away from incorrect generations (cf. also \cite{dietterich2000ensemble,nguyen2015deep}). Here, the interaction within the simulation environment facilitates ``learning by communication" that allows us to take a negative example and turn it into a corresponding positive example, and storing both increases the overall data size and gives a clear minimal pair between a good example and a bad one. A correction interaction might proceed as follows: \begin{enumerate} \item The system generates the ``staircase" in the top left image shown in Fig.~\ref{fig:correction}, which is one block off from a prototypical staircase. This gets marked as an incorrect case. \item The user points to the orange block at the top of the structure. The agent clarifies this request. \item The user indicates the green block and gestures for (or tells) the agent to move the orange block there. \item The agent clarifies this request and makes the move. The result is marked as a correct case. \end{enumerate} \begin{figure} \centering \includegraphics[width=1in]{images/correction-1} \includegraphics[width=1in]{images/correction-2}\\ \includegraphics[width=1in]{images/correction-3} \includegraphics[width=1in]{images/correction-4} \caption{\label{fig:correction}Correcting a generated structure with multimodal communication.} \end{figure} This is demonstrated in the simulation environment. Because of the simulation acting in the service of multimodal communication between a human and a computer, we can improve the model (understanding) of the computer's concepts (here, a staircase) through learning by communication, and iterative demonstration of the agent's model. \iffalse \subsection{Learning how to hold an Object: talk about it} Using the learning by communication to figure out how to hold different kinds of objects, which involve complex object properties. The simulation environment facilitates the demonstration of common object properties, and how objects relate to the agents. Simulation is about presenting and demonstrating peer-to-peer communication about the objects and events in our shared environment. \fi \section{Conclusion} Across different fields and in the existing AI, cognition, and game development literature, there exist many different definitions of ``simulation." Nonetheless, we believe the common thread between them is that simulations as a framework facilitate both qualitative and quantitative reasoning by providing quantitative data (for example, exact coordinates or rotations) that can be easily converted into qualitative representations. This makes simulation an effective platform for both producing and learning from datasets. When combined with formal encodings of object and event semantics, at a level higher than treating objects as collections of geometries, or events as sequences of motions or object relations, 3D environments provide a powerful platform for exploring ``computational embodied cognition." Recent developments in the AI field have shown that common-sense understanding in a general domain requires either orders of magnitude more training data than traditional deep learning models, or more easily decidable representations, involving context, differences in perspective, and grounded concepts, to name a few. Technologies in use in the gaming industry are proving to be effective platforms on which to develop systems that afford gathering both traditional data for deep learning and representations of common sense, situated, or embodied understanding. In addition, game engines perform a lot of ``heavy lifting," providing APIs for UI and physics, among others, which allows researchers to focus on implementing truly novel functionality and develop tools for experimentation in simulation-based and qualitative understanding of both human and machine cognition and intelligence. \iffalse \begin{itemize} \item 3D environments provide a powerful platform for exploring ``computational embodied cognition" \item Common-sense understanding requires a lot of ``extra stuff" \begin{itemize} \item Context, differences in perspective, grounded concepts \end{itemize} \item Game engines provide a lot of that ``extra stuff" \begin{itemize} \item do a lot of heavy lifting \item APIs for UI, physics, etc. \item can focus on truly novel functionality \end{itemize} \item Tool for experimentation in simulation-based and qualitative understanding of human cognition and language \end{itemize} \fi \bibliographystyle{aaai}
\section{Introduction } We denote by $\hol(\D)$ the set of analytic ($=$ holomorphic) functions on the unit disk $\D=\{z: |z|<1\}$ in the complex plane $\C.$ In the present note, our main concern is about the subclasses \begin{align*} \Schur&=\{f\in\hol(\D): |f|\le 1\}, \\ \PP&=\{g\in\hol(\D): g(0)=1,~ \Re g>0\}. \end{align*} These are called the Schur class and the Carath\'eodory class, respectively, and members of $\Schur$ and $\PP$ are called Schur functions and Carath\'eodory functions, respectively. We also consider the subclass $\Schur_0=\{\omega\in\Schur: \omega(0)=0\} =\{zf(z): f\in\Schur\}$ of $\Schur.$ These classes play an important role in Geometric Function Theory. For example, a function $f\in\hol(\D)$ with $f(0)=0, f'(0)=1,$ is starlike (resp.~ convex) if $zf'(z)/f(z)$ (resp.~$1+zf''(z)/f'(z)$) belongs to the class $\PP.$ Also, a function $f$ in $\hol(\D)$ is said to be subordinate to another $g\in\hol(\D)$ (we write $f\prec g$ for it) if $f=g\circ\omega$ for some $\omega\in\Schur_0.$ Therefore, detailed information about the Taylor coefficients of functions in $\Schur$ and $\PP$ will lead to various useful estimates in Geometric Function Theory. As is well known, a function $f(z)=c_0+c_1z+c_2z^2+\cdots$ in $\Schur$ satisfies $|c_n|\le 1$ for all $n\ge 0$ and the bound is sharp for each $n.$ For a function $g(z)=1+p_1z+p_2z^2+\cdots$ in $\PP,$ the sharp inequality $|p_n|\le 2~(n=1,2,\dots)$ is known as the Carath\'eodory lemma. A complete characterization of the coefficients of $\Schur$ and $\PP$ in terms of determinants are classically known. For instance, the coefficients of Carath\'eodory functions are described in the following theorem due to Carath\'eodory and Toeplitz (see \cite{Tsuji:Potential}). \begin{ThmA}\label{Thm:CT} Let $g(z)=1+p_1z+p_2z^2+\cdots$ be a formal power series with coefficients in $\C.$ Then, $g$ represents a Carath\'eodory function on $\D$ if and only if \begin{equation*} \Delta_n= \begin{vmatrix} 2 & p_1& p_2 &\cdots& p_n\\ \overline{p_1} & 2 & p_1 &\cdots & p_{n-1}\\ \overline{p_2} & \overline{p_1} & 2 &\cdots & p_{n-2}\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ \overline{p_n} & \overline{p_{n-1}} & \overline{p_{n-2}} &\cdots & 2 \end{vmatrix}\ge0 \end{equation*} for all $n\ge0.$ \end{ThmA} Therefore, the region of the coefficients $p_1,\dots, p_n$ is described by the $n$ inequalities $\Delta_1\ge0,\dots, \Delta_n\ge0.$ For instance, the region of the first coefficient is $|p_1|\le 2.$ However, it is not easy to use them in general. Parametric representations of the coefficients are often more useful. Libera and Z\l otkiewicz \cite{LZ82} derived the following parametrizations of possible values of $p_2 $ and $p_3$ from Theorem A. \begin{ThmB}\label{Thm:LZ} Let $g(z)=1+p_1z+p_2z^2+\cdots$ be a Carath\'eodory function with $p_1\ge0.$ Then there are numbers $x, y\in\bD$ such that \begin{align*} 2p_2&=p_1^2+x(4-p_1^2) \quad\text{and} \\ 4p_3&=p_1^3+(4-p_1^2)(2p_1x -p_1x^2)+2(4-p_1^2)(1-|x|^2)y. \end{align*} \end{ThmB} Also, recently Kwon, Lecko and Sim \cite{KLS18} obtained a similar parametrization of $p_4.$ We remark that the assumption $p_1\ge0$ is harmless because we can normalize any function $g\in\PP$ so that $p_1\ge0$ by considering a suitable rotation $g(e^{i\theta}z).$ In recent years, these results are used frequently to estimate Hankel determinants of functions in special classes of univalent functions. See, for instance, \cite{KLS18B} and \cite{Zap18} and references therein. On the other hand, it is known that the coefficients of a function in the Schur class $\Schur$ are described by the Schur parameters (see \cite[\S 1.3]{Simon:OP1}). In Section 2, we will give a recursive method to compute $c_n$ in terms of the Schur parameters, as well as basic facts about the Schur class. Since the classes $\Schur_0$ and $\PP$ are related by the Cayley transformation, we can develop a systematic approach to get concrete relations between the coefficients of these two classes in Section 3. Then in Section 4, we will parametrize $b_n=p_n/2$ as a function $T_n(\gamma_1,\dots,\gamma_n)$ of $n$ independent variables $\gamma_1, \dots, \gamma_n$ in $\bD.$ The definition of $T_n$ given in Section 4 is convenient to observe basic properties of it but somewhat indirect. We also give a recursive formula to describe $T_n$ in Section 5. \section{Schur algorithm} Let $a\in\D.$ We first recall that the M\"obius transformation $$ L_a(z)=\frac{z-a}{1-\bar a z} $$ keeps $\D$ invariant as a set and maps $a$ to $0$ and $0$ to $-a.$ In particular, $L_a\in\Schur.$ A function in $\Schur$ of the form $$ e^{i\theta}L_{a_1}(z)\cdots L_{a_d}(z) \quad (\theta\in\R, a_1,\dots, a_d\in\D) $$ is called a finite Blaschke product of degree $d$ and the set of all such functions will be denoted by $\B_d.$ Note that $\B_0$ consists of unimodular constants; namely, $\B_0=\T=\partial\D,$ and that $\B_1$ is nothing but the group of analytic automorphisms of $\D.$ For a function $f\in\Schur\setminus\B_0,$ we consider the new function $\sigma f$ defined by $$ \sigma f(z)=\frac1z\cdot \frac{f(z)-f(0)}{1-\overline{f(0)}f(z)}=\frac{L_{f(0)}(f(z))}{z}. $$ Since the origin is a removable singularity, the function $\sigma f$ is analytic on $\D.$ Moreover, the maximum modulus principle implies that $$ |\sigma f(z)|\le \lim_{r\to1^-}\max_{|\zeta|\le r}|\sigma f(\zeta)|\le \lim_{r\to1^-}\frac1r=1, $$ and hence $\sigma f\in\Schur.$ We define $\sigma f=0$ when $f\in\B_0.$ In this way, a self-map $\sigma:\Schur\to\Schur$ is defined. For a given $f\in\Schur,$ we start with $f_0=f$ and define $f_n$ inductively by $f_n=\sigma f_{n-1}$ for $n\ge 1.$ That is to say, $f_n=\sigma^n f.$ This procedure is usually called the Schur algorithm. We define a sequence $\gamma_n~(n=0,1,2,\dots)$ by setting $\gamma_n=f_n(0)$ and call those numbers {\it Schur parameters}. For convenience, sometimes we write $\vec{\gamma}=\vec{\gamma}(f)=(\gamma_0,\gamma_1,\dots) \in \bD^{\N_0},$ where $\N_0=\{0,1,2,\dots\},$ and call it the Schur vector of $f.$ By definition, we observe that $\vec{\gamma}(\sigma f)=(\gamma_1,\gamma_2,\dots)$ if $\vec{\gamma}(f)=(\gamma_0,\gamma_1,\dots).$ What is the same, the Schur vector of $\sigma f$ is the backward shift of the Schur vector of $f.$ Schur \cite{Schur17} proved that the original function $f$ can be reproduced by its Schur vector. \begin{ThmC}\label{Thm:Schur} For a function $f\in\Schur,$ its Schur parameters $\gamma_0,\gamma_1,\dots$ satisfy one of the following two conditions: \begin{enumerate} \item[(i)] $|\gamma_n|<1$ for all $n.$ \item[(ii)] $|\gamma_0|<1,\dots, |\gamma_{n-1}|<1, |\gamma_n|=1, \gamma_{n+1}=0, \gamma_{n+2}=0,\dots$ for some $n\ge 0.$ \end{enumerate} The latter occurs if and only if $f\in\B_n.$ Moreover, for any sequence $\vec{\gamma}=(\gamma_0,\gamma_1,\dots)$ satisfying one of the above conditions, there exists a unique function $f\in\Schur$ such that $\vec{\gamma}(f)=\vec{\gamma}.$ \end{ThmC} We remark that the subclass $\Schur_0$ is characterized by $\gamma_0=0$ with the Schur parameters. We define a sequence of functions $F_n$ of the $n$ complex variables $\gamma_1, \gamma_2, \dots, \gamma_n~(n=1,2,3,\dots) $ inductively by \begin{align} \notag F_1(\gamma_1)&=\gamma_1, \\ \label{eq:F} F_{n}(\gamma_1,\dots, \gamma_{n}) &=(1-|\gamma_1|^2)F_{n-1}(\gamma_2,\dots, \gamma_{n}) \\ \notag &\quad -\bar\gamma_1\sum_{k=2}^{n-1} F_{n-k}(\gamma_2,\dots,\gamma_{n-k+1}) F_k(\gamma_1,\dots, \gamma_k), \qquad n\ge 2. \end{align} By construction, we see that the function $F_n(\gamma_1,\dots,\gamma_n)$ is indeed a polynomial in $\gamma_1,\bar\gamma_1, \dots,$ $\gamma_{n-1},\bar\gamma_{n-1}, \gamma_n$ with integer coefficients. We compute the first several as follows: \begin{align*} F_1&=\gamma_1, \\ F_2&=(1-|\gamma_1|^2)\gamma_2, \\ F_3&=(1-|\gamma_1|^2)(1-|\gamma_2|^2)\gamma_3 -(1-|\gamma_1|^2)\bar\gamma_1\gamma_2^2, \\ F_4&=(1-|\gamma_1|^2)(1-|\gamma_2|^2)(1-|\gamma_3|^2)\gamma_4 \\ &\quad -(1-|\gamma_1|^2)(1-|\gamma_2|^2)\gamma_3(2\bar\gamma_1\gamma_2 +\bar\gamma_2\gamma_3)+(1-|\gamma_1|^2)\bar\gamma_1^2\gamma_2^3, \\ F_5&=(1-|\gamma_1|^2)(1-|\gamma_2|^2)(1-|\gamma_3|^2)(1-|\gamma_4|^2)\gamma_5 \\ &\quad -(1-|\gamma_1|^2)(1-|\gamma_2|^2)(1-|\gamma_3|^2)\gamma_4 (2\bar\gamma_1\gamma_2+2\bar\gamma_2\gamma_3+\bar\gamma_3\gamma_4) \\ &\quad +(1-|\gamma_1|^2)(1-|\gamma_2|^2)\gamma_3 (3\bar\gamma_1^2-\bar\gamma_1\gamma_3+3\bar\gamma_1|\gamma_2|^2\gamma_3+\bar\gamma_2^2\gamma_3^2) \\ &\quad -(1-|\gamma_1|^2)\bar\gamma_1^3\gamma_2^4. \end{align*} As the reader easily guesses, the following, known as Schur's recurrence relation ({\it cf.}~\cite{Simon:OP1}), is verified by a simple induction argument. \begin{lem}\label{lem:F} For each $n\ge 2,$ there exists a function $G_n(\gamma_1,\dots,\gamma_{n-1})$ of $n-1$ complex variables $\gamma_1,\dots,\gamma_{n-1}$ such that the following equality holds: $$ F_n(\gamma_1,\dots,\gamma_n)=(1-|\gamma_1|^2)\cdots(1-|\gamma_{n-1}|^2)\gamma_n +G_n(\gamma_1,\dots,\gamma_{n-1}). $$ \end{lem} The following result will be the basis of our arguments below. It is not new (see, for instance, (1.3.47) in \cite{Simon:OP1}) but a proof is given for convenience of the reader. \begin{lem}\label{lem:rec} Let $\omega(z)=c_1z+c_2z^2+\cdots$ be a function in $\Schur_0$ with its Schur vector $(0, \gamma_1, \gamma_2, \dots).$ Then $c_n=F_n(\gamma_1,\gamma_2,\dots, \gamma_n)$ for $n=1, 2, 3, \dots.$ \end{lem} \begin{pf} We show the assertion by induction on $n.$ When $n=1,$ the assertion is trivial because $c_1=\gamma_1.$ Suppose that the assertion is valid up to $n-1$ for some $n\ge 2.$ Then \begin{equation}\label{eq:ck} c_k=F_k(\gamma_1,\gamma_2,\dots, \gamma_k), \qquad k=1,2,n-1. \end{equation} Let $f(z)=\omega(z)/z.$ Then $f\in\Schur$ and it has the Schur vector $(\gamma_1,\gamma_2,\dots).$ Put $\tilde \omega(z)=z(\sigma f)(z)=zf_1(z)=c_1'z+c_2'z^2+\cdots,$ whose Schur vector is $(0, \gamma_2, \gamma_3,\dots).$ Therefore, by assumption of the induction again, \begin{equation}\label{eq:ck'} c_k'=F_k(\gamma_2,\gamma_3,\dots, \gamma_{k+1}), \qquad k=1,2,n-1. \end{equation} By construction, we have the relation $$ \frac{f(z)-\gamma_1}z=f_1(z)\left(1-\bar\gamma_1 f(z)\right). $$ We now substitute the Taylor expansions of $f(z)$ and $f_1(z)$ and compare the coefficient of $z^{n-2}$ for both sides to obtain the relation $$ c_{n}= (1-|\gamma_1|^2)c_{n-1}'-\bar\gamma_1\sum_{k=2}^{n-1} c_{n-k}'c_k. $$ Using \eqref{eq:ck} and \eqref{eq:ck'}, we obtain the required formula so that the induction argument has been completed. \end{pf} We remark that for a general function $f(z)=c_0+c_1z+c_2z^2+\cdots$ in $\Schur$ with the Schur vector $(\gamma_0,\gamma_1,\dots),$ the relations $$ c_n=F_{n+1}(\gamma_0,\gamma_1,\dots,\gamma_n), \qquad n=0,1,2,\dots, $$ follow from Lemma \ref{lem:rec} because the function $zf(z)=c_0z+c_1z^2+\cdots$ belongs to $\Schur_0$ and has $(0,\gamma_0,\gamma_1,\dots)$ as its Schur vector. \section{Relationship between Schur and Carath\'eodory classes} As is well known, a function $g\in\PP$ corresponds, in a one-to-one manner, to a function $\omega\in\Schur_0$ through the Cayley transformation: \begin{equation}\label{eq:Cayley} g(z)=\frac{1+\omega(z)}{1-\omega(z)},\quad z\in\D. \end{equation} Since it is more natural to think about the quantity $p_n/2$ for Carath\'eodory functions, we expand $g(z)$ and $\omega(z)$ in the forms $$ g(z)=1+2\sum_{n=1}^\infty b_nz^n \aand \omega(z)=\sum_{n=1}^\infty c_nz^n. $$ In order to describe $b_n$'s in terms of $c_k$'s, we define a sequence of polynomials $Q_n(x_1,\dots, x_n)~(n=1,2,3,\dots)$ in the variables $x_1,\dots, x_n$ inductively by $Q_1(x_1)=x_1$ and \begin{equation}\label{eq:Q} Q_n(x_1,\dots, x_n)=x_n+\sum_{k=1}^{n-1}x_{n-k} Q_k(x_1,\dots, x_k), \quad n\ge 2. \end{equation} It is worth noting that $Q_n(x_1, \dots, x_n)$ is a polynomial in $x_1,\dots, x_n$ with non-negative integer coefficients. Then we have the following result. \begin{lem}\label{lem:bn} $b_n=Q_n(c_1,\dots, c_n)$ for $n=1,2,\dots.$ \end{lem} \begin{pf} By \eqref{eq:Cayley}, we have the relation $(g(z)+1)\omega(z)=g(z)-1.$ We now substitute the above Taylor expansions of $g(z)$ and $\omega(z)$ to obtain \begin{equation}\label{eq:bc} b_{n}=\sum_{k=0}^{n-1} c_{n-k}b_k =c_n+\sum_{k=1}^{n-1} c_{n-k}b_k, \end{equation} where we set $b_0=1$ for convenience. We show the assertion by induction on $n.$ When $n=1$ the assertion is clear. Suppose the assertion is valid up to $n-1;$ that is, $b_k=Q_k(c_1,\dots, c_k)$ for $k=1,\dots, n-1.$ Then by the above relation and \eqref{eq:Q} $$ b_n=c_n+\sum_{k=1}^{n-1} c_{n-k}Q_k(c_1,\dots, c_k) =Q_n(c_1,\dots, c_n), $$ which means that the assertion is valid for $n.$ Thus the proof is complete by the induction. \end{pf} For instance we have the formulae \begin{align*} b_1&=c_1, \\ b_2&=c_1^2+c_2, \\ b_3&=c_1^3+2c_1c_2+c_3, \\ b_4&=c_1^4+3c_1^2c_2+c_2^2+2c_1c_3+c_4, \\ b_5&=c_1^5+4c_1^3c_2+3c_1^2c_3+2c_2c_3+3c_1c_2^2+2c_1c_4+c_5. \end{align*} By \eqref{eq:bc}, we have also $$ c_n=b_n-\sum_{k=1}^{n-1} c_{n-k}b_k, =b_n-\sum_{k=1}^{n-1} b_{n-k}c_k. $$ Thus, if we define a sequence of polynomials $R_n(x_1,\dots, x_n)~(n=1,2,3,\dots)$ in the variables $x_1,\dots, x_n$ inductively by $R_1(x_1)=x_1$ and \begin{equation}\label{R} R_n(x_1,\dots, x_n)=x_n-\sum_{k=1}^{n-1}x_{n-k} R_k(x_1,\dots, x_k), \qquad n\ge 2, \end{equation} then we obtain the following formula in the same way. \begin{lem}\label{lem:cn} $c_n=R_n(b_1,\dots, b_n)$ for $n=1,2,\dots.$ \end{lem} We note that the polynomial mapping $\vec{Q}:\C^n\to\C^n$ It might be interesting to observe that the polynomials $Q_n$ and $R_n$ are related by a very simple relation. \begin{prop} $R_n(x_1,\dots, x_n)=-Q_n(-x_1,\dots, -x_n)$ for $n\ge 1.$ \end{prop} \begin{pf} We again use the induction on $n.$ When $n=1,$ the assertion is clear. Suppose that the assertion is valid up to $n-1.$ Then by definition and the induction assumption we see that $$ R_n(x_1,\dots, x_n) =x_n+\sum_{k=1}^{n-1}x_{n-k} Q_k(-x_1,\dots, -x_k) =-Q_n(-x_1,\dots, -x_n), $$ which shows the assertion for $n.$ \end{pf} Therefore, we obtain the following formulae easily from the previous ones: \begin{align*} c_1&=b_1, \\ c_2&=-b_1^2+b_2, \\ c_3&=b_1^3-2b_1b_2+b_3, \\ c_4&=-b_1^4+3b_1^2b_2-b_2^2-2b_1b_3+b_4, \\ c_5&=b_1^5-4b_1^3b_2+3b_1^2b_3-2b_2b_3+3b_1b_2^2-2b_1b_4+b_5. \end{align*} We end the section with a simple observation. We define mappings $\vec{Q}_n:\C^n\to\C^n$ and $\vec{R}_n:\C^n\to\C^n$ by \begin{align*} \vec{Q}_n(x_1,\dots, x_n)&=(Q_1(x_1), Q_2(x_1,x_2),\dots, Q_n(x_1,\dots, x_n)), \\ \vec{R}_n(x_1,\dots, x_n)&=(R_1(x_1), R_2(x_1,x_2),\dots, R_n(x_1,\dots, x_n)). \\ \end{align*} Then we get the following result by construction. \begin{lem}\label{lem:QR} The mappings $\vec{Q}_n$ and $\vec{R}_n$ are both polynomial automorphisms of $\C^n$ and they are inverses to each other; namely, $\vec{Q}_n\circ\vec{R}_n=\vec{R}_n\circ\vec{Q}_n=\id_{\C^n}.$ \end{lem} \section{Main results} We now define a sequence of functions $T_n=T_n(\gamma_1,\dots, \gamma_n)$ of $n$ complex variables $\gamma_1,\dots,\gamma_n$ by \begin{equation}\label{eq:Tn} T_n(\gamma_1,\dots, \gamma_n) =Q_n(F_1(\gamma_1), F_2(\gamma_1,\gamma_2),\dots, F_{n}(\gamma_1,\dots,\gamma_n)), \end{equation} where $F_k(\gamma_1,\dots,\gamma_k)$ and $Q_n(x_1,\dots, x_n)$ are defined by \eqref{eq:F} and \eqref{eq:Q} respectively. For instance, \begin{align*} T_1&=\gamma_1, \\ T_2&=\gamma_1^2+\gamma_2(1-|\gamma_1|^2), \\ T_3&=\gamma_1^3+(1-|\gamma_1|^2)\gamma_2(2\gamma_1-\bar\gamma_1\gamma_2) +(1-|\gamma_1|^2)(1-|\gamma_2|^2)\gamma_3, \\ T_4&=\gamma_1^4 +(1-|\gamma_1|^2)\gamma_2(3\gamma_1^2-2\gamma_2+\bar\gamma_1^2\gamma_2^2) +3(1-|\gamma_1|^2)^2\gamma_2^2 \\ &\quad +(1-|\gamma_1|^2)(1-|\gamma_2|^2)\gamma_3(2\gamma_1-2\bar\gamma_1\gamma_2 -\bar\gamma_2\gamma_3) \\ &\quad +(1-|\gamma_1|^2)(1-|\gamma_2|^2)(1-|\gamma_3|^2)\gamma_4, \\ T_5&=\gamma_1^5 +(1-|\gamma_1|^2)\gamma_2 (4\gamma_1^3-3\gamma_1\gamma_2 +2\bar\gamma_1\gamma_2^2-\bar\gamma_1^3\gamma_2^3) \\ &\quad +2(1-|\gamma_1|^2)^2\gamma_2^2(3\gamma_1-2\bar\gamma_1\gamma_2) \\ &\quad +6(1-|\gamma_1|^2)^2(1-|\gamma_2|^2)\gamma_2\gamma_3 -3(1-|\gamma_1|^2)(1-|\gamma_2|^2)^2\bar\gamma_1\gamma_3^2 \\ &\quad +(1-|\gamma_1|^2)(1-|\gamma_2|^2)\gamma_3 (3\gamma_1^2+3\bar\gamma_1^2\gamma_2^2+2\bar\gamma_1\gamma_3 -2\gamma_1\bar\gamma_2\gamma_3-4\gamma_2+\bar\gamma_2^2\gamma_3^2) \\ &\quad +(1-|\gamma_1|^2)(1-|\gamma_2|^2)(1-|\gamma_3|^2)\gamma_4(2\gamma_1 -2\bar\gamma_1\gamma_2-2\bar\gamma_2\gamma_3-\bar\gamma_3\gamma_4) \\ &\quad +(1-|\gamma_1|^2)(1-|\gamma_2|^2)(1-|\gamma_3|^2)(1-|\gamma_4|^2)\gamma_5. \end{align*} Note that the formulae for $T_1, T_2$ and $T_3$ appear as (1.3.51-53) in \cite{Simon:OP1}. To formulate our main result on coefficients, it is convenient to consider the coefficient body of order $n$ for a subclass $\F$ of $\hol(\D):$ $$ \X_n(\F)=\{(a_0,a_1,\dots, a_n): f(z)=a_0+a_1z+\cdots+a_nz^n+O(z^{n+1}) ~\text{for some}~ f\in\F\}. $$ We remark that $\X_n(\F)$ is convex whenever $\F$ is a convex subset of $\hol(\D).$ We recall that a subset $A$ of $\R^d$ is called a {\it convex body} if $A$ is compact and convex and has non-empty interior. It is well known that a convex body in $\R^d$ is homeomorphic to the closed unit ball $\mathbb{B}^{d}=\{(x_1,\cdots, x_{d})\in\R^{d}: x_1^2+\cdots+x_{d}^2\le 1\}$ (see \cite[\S 11.3]{Berger:geom1}). \begin{thm}\label{thm:main} Let $n$ be a positive integer. The coefficient body $\X_n(\PP)$ of order $n$ for the Carath\'eodory class $\PP$ is expressed as $\{1\}\times 2\V_n,$ where $\V_n$ is a convex body in $\C^n.$ Moreover, $$ \vec{T}_n(\gamma_1,\dots, \gamma_n)=(T_1(\gamma_1), T_2(\gamma_1,\gamma_2),\dots, T_n(\gamma_1,\dots,\gamma_n)). $$ is a continuous mapping of $\bD^n$ onto $\V_n$ and satisfies $\vec{T}_n(\D^n)=\Int\V_n$ and $\vec{T}_n(\partial\bD^n)=\partial\V_n.$ In addition, $\vec{T}_n:\D^n\to\Int\V_n$ is a real analytic diffeomorphism but $\vec{T}_n$ is not injective on the boundary $\partial\bD^n$ of $\bD^n$ for $n=2,3,\dots.$ \end{thm} \begin{pf} By the normalization condition for Carath\'eodory functions, we first observe that $\X_n(\PP)$ can be expressed as the form $\{1\}\times 2\V_n,$ where $V_n=\{(b_1,\dots,b_n)\in\C^n: (1,2b_1,\dots, 2b_n)\in \X_n(\PP)\}.$ Since $\PP$ is a convex subset of $\hol(\D),$ it is evident that $\V_n$ is convex in $\C^n.$ Similarly, we can write $\X_n(\Schur_0)=\{0\}\times \U_n.$ As we saw in the previous section, the coefficients of a function $g(z)=1+2b_1z+2b_2z^2+\cdots$ in $\PP$ and those of $\omega(z)=c_1z+c_2z^2+\cdots$ in $\Schur_0$ are related by $(b_1,\dots, b_n)=\vec{Q}_n(c_1,\dots, c_n)$ whenever $g$ and $\omega$ are related by $g=(1+\omega)/(1-\omega).$ In particular, we have the relation $\V_n=\vec{Q}_n(\U_n).$ Let $$ \vec{F}_n(\gamma_1,\dots, \gamma_n)=(F_1(\gamma_1), F_2(\gamma_1,\gamma_2),\dots, F_n(\gamma_1,\dots,\gamma_n)), $$ where $F_1,\dots, F_n$ are defined in \eqref{eq:F}. Then $\vec{T}_n=\vec{Q}_n\circ\vec{F}_n$ by construction. Since $\vec{Q}_n:\C^n\to\C^n$ is a polynomial automorphism of $\C^n$ by Lemma \ref{lem:QR}, the other assertions follow from the next proposition, which may be of independent interest. \end{pf} \begin{prop}\label{prop:diffeo} Let $n$ be a positive integer. The coefficient body $\X_n(\Schur_0)$ of order $n$ for $\Schur_0$ is described by $\X_n(\Schur_0)=\{0\}\times \U_n,$ where $\U_n$ is a convex body in $\C^n.$ Moreover, $\vec{F}_n$ maps $\bD^n$ continuously onto $\U_n$ and satisfies $\vec{F}_n(\D^n)=\Int\U_n$ and $\vec{F}_n(\partial\bD^n)=\partial\U_n.$ Furthermore, $\vec{F}_n:\D^n\to\Int\U_n$ is a real analytic diffeomorphism but $\vec{F}_n$ is not injective on $\partial\bD^n$ for $n=2,3,\dots.$ \end{prop} Before the proof, we make a preliminary observation. \begin{lem}\label{lem:inj} Let $(\gamma_1,\dots,\gamma_n)\in\D^{n-1}\times\C$ and $(\gamma_1',\dots,\gamma_n')\in\C^n.$ If $\vec{F}_n(\gamma_1,\dots,\gamma_n)=\vec{F}_n(\gamma_1',\dots,\gamma_n'),$ then $(\gamma_1,\dots,\gamma_n)=(\gamma_1',\dots,\gamma_n').$ \end{lem} \begin{pf} We show $\gamma_j=\gamma_j'$ by induction. Since $\gamma_1=F_1(\gamma_1)=F_1(\gamma_1')=\gamma_1',$ the assertion is clear for $j=1.$ Assume next that the assertion holds true up to $j-1;$ that is $\gamma_1=\gamma_1',\dots, \gamma_{j-1}=\gamma_{j-1}'.$ Then, by Lemma \ref{lem:F}, we observe \begin{align*} & \quad \ (1-|\gamma_1|^2)\cdots(1-|\gamma_{j-1}|^2)\gamma_j+G_j(\gamma_1,\dots,\gamma_{j-1}) \\ &=F_j(\gamma_1,\dots,\gamma_j) \\ &=F_j(\gamma_1',\dots,\gamma_j') \\ &=(1-|\gamma_1'|^2)\cdots(1-|\gamma_{j-1}'|^2)\gamma_j'+G_j(\gamma_1',\dots,\gamma_{j-1}') \\ &=(1-|\gamma_1|^2)\cdots(1-|\gamma_{j-1}|^2)\gamma_j'+G_j(\gamma_1,\dots,\gamma_{j-1}). \end{align*} Since $(1-|\gamma_1|^2)\cdots(1-|\gamma_{j-1}|^2)\ne0$ by assumption, we conclude that $\gamma_j=\gamma_j'.$ Thus the induction argument has been completed. \end{pf} We are ready to show the above proposition. \begin{pf}[Proof of Proposition \ref{prop:diffeo}] Since $\Schur_0$ is compact and convex in the vector space $\hol(\D)$ endowed with the topology of locally uniform convergence on compact subsets of $\D,$ $\X_n(\PP)$ is also compact and convex. Consequently, the set $\U_n$ is compact and convex in $\C^n.$ In order to see that $\U_n$ is a convex body, we have only to show that $\U_n$ has a non-empty interior. For instance, we see that the polynomial $\omega(z)=c_1z+c_2z^2+\cdots+c_nz^n$ with $|c_1|+|c_2|+\cdots +|c_n|<1$ is contained in the class $\Schur_0.$ Hence, the non-empty open set $|c_1|+|c_2|+\cdots+|c_n|<1$ is contained in $\V_n.$ We next show that $\vec{F}_n(\bD^n)=\U_n.$ Indeed, for $(c_1,\dots, c_n)\in\U_n,$ by definition, there is a function $\omega\in\Schur_0$ such that $\omega(z)=c_1z+\cdots+c_nz^n+O(z^{n+1}).$ Let $(0,\gamma_1,\gamma_2,\dots)$ be the Schur vector of $\omega.$ Then $(c_1,\dots,c_n)=\vec{F}_n(\gamma_1,\dots,\gamma_n).$ Thus the inclusion relation $\vec{F}_n(\bD^n)\supset\U_n$ follows. Conversely, choose $n$ points $\gamma_1,\dots,\gamma_n$ from $\bD$ arbitrarily. When $(\gamma_1,\dots,\gamma_n)\in\D^n,$ let $\vec{\gamma}=(\gamma_1,\dots,\gamma_n,0,0,\dots).$ Otherwise, there is a unique $m$ such that $|\gamma_1|<1,\dots, |\gamma_{m-1}|<1$ and $|\gamma_m|=1.$ Then we set $\vec{\gamma}=(\gamma_1,\dots,\gamma_m,0,0,\dots).$ Theorem C now guarantees existence of a function $f$ such that $\vec{\gamma}(f)=\vec{\gamma}.$ We can now expand the function $\omega(z)=zf(z)$ in the form $\omega(z)=c_1z+c_2z^2+\cdots.$ Thus we see that $\vec{F}_n(\gamma_1,\dots,\gamma_n)=(c_1,\dots,c_n)\in\U_n.$ Hence, we have shown that the other inclusion relation $\vec{F}_n(\bD^n)\subset\U_n.$ We have shown $\vec{F}_n(\bD^n)=\U_n.$ Note that $\vec{F}_n$ is real analytic on $\C^n.$ We show now that $\vec{F}_n:\D^n\to\C^n$ is locally diffeomorphic; in other words, the Jacobian $J_{\vec{F}_n}$ does not vanish on $\D^n.$ For a moment, we set $\delta_j=(1-|\gamma_1|^2)\cdots(1-|\gamma_j|^2)$ for short. Regarding $\vec{F}_n$ as a column vector, with the help of Lemma \ref{lem:F}, we compute \begin{align*} J_{\vec{F}_n}&= \begin{vmatrix} \dfrac{\partial F_1}{\partial\gamma_1} & \dfrac{\partial F_1}{\partial\bar\gamma_1}& \cdots& \dfrac{\partial F_1}{\partial\gamma_n} & \dfrac{\partial F_1}{\partial\bar\gamma_n} \medskip \\ \dfrac{\partial \overline{F_1}}{\partial\gamma_1} & \dfrac{\partial \overline{F_1}}{\partial\bar\gamma_1}& \cdots& \dfrac{\partial \overline{F_1}}{\partial\gamma_n} & \dfrac{\partial\overline{F_1}}{\partial\bar\gamma_n} \\ \null & \null & \ddots & \null & \null \\ \dfrac{\partial F_n}{\partial\gamma_1} & \dfrac{\partial F_n}{\partial\bar\gamma_1}& \cdots& \dfrac{\partial F_n}{\partial\gamma_n} & \dfrac{\partial F_n}{\partial\bar\gamma_n} \medskip \\ \dfrac{\partial \overline{F_n}}{\partial\gamma_1} & \dfrac{\partial \overline{F_n}}{\partial\bar\gamma_1}& \cdots& \dfrac{\partial \overline{F_n}}{\partial\gamma_n} & \dfrac{\partial\overline{F_n}}{\partial\bar\gamma_n} \end{vmatrix} =\begin{vmatrix} 1 & 0 & 0 & 0 & \cdots & 0 & 0 \\ 0 & 1 & 0 & 0 & \cdots & 0 & 0 \\ * & * & \delta_1 & 0 & \cdots & 0 & 0 \\ * & * & 0 & \delta_1 & \cdots & 0 & 0 \\ \null & \null & \null & \null & \ddots & \null & \null \\ * & * & * & * & \cdots & \delta_{n-1} & 0 \\ * & * & * & * & \cdots & 0 & \delta_{n-1} \end{vmatrix} \\ &=\delta_1^2\delta_2^2\cdots\delta_{n-1}^2>0. \end{align*} Thus we have shown that $\vec{F}_n$ is locally diffeomorphic on the domain $\D^n.$ In particular, the image $\vec{F}_n(\D^n)$ is contained in the interior $\Int \U_n$ of $\U_n.$ Moreover, Lemma \ref{lem:inj} now implies that $\vec{F}_n$ is injective on $\D^n.$ We next prove that $\vec{F}_n$ maps $\partial\bD^n$ onto $\partial\U_n.$ Let $(\gamma_1,\dots,\gamma_n)\in\partial\bD^n.$ Then $|\gamma_1|<1,\dots, |\gamma_{j-1}|<1$ and $|\gamma_j|=1$ for some $1\le j\le n.$ To the contrary, we suppose that $p=\vec{F}_n(\gamma_1,\dots,\gamma_n)\in\Int\U_n.$ First consider the case when $j=n.$ Then for small enough $\delta>0,$ we have $p_\delta=\vec{F}_n(\gamma_1,\dots,\gamma_{n-1},(1+\delta)\gamma_n)\in\Int\U_n.$ Since $\vec{F}_n:\bD^n\to\U_n$ is surjective, $p_\delta=\vec{F}_n(\gamma_1',\dots,\gamma_n')$ for some $(\gamma_1',\dots,\gamma_n')\in\bD^n.$ We apply Lemma \ref{lem:inj} again to deduce that $(\gamma_1,\dots,\gamma_{n-1},(1+\delta)\gamma_n)=(\gamma_1',\dots,\gamma_n').$ In particular, $(1+\delta)\gamma_n=\gamma_n'\in\bD,$ which contradicts $(1+\delta)|\gamma_n|=1+\delta>1.$ Therefore, this case does not occur. When $1\le j<n,$ we consider the projection $\pi:\C^n\to\C^j$ defined by $\pi(z_1,\dots,z_n)=(z_1,\dots, z_j).$ By definition, we have $\pi(\U_n)=\U_j.$ Since $\pi$ is an open mapping, we have $\pi(p)\in\Int \U_j.$ However, since $\pi(p)=\vec{F}_j(\gamma_1,\dots,\gamma_j),$ this is again impossible by the same reason. Therefore $\vec{F}_n(\gamma_1,\dots,\gamma_n)\in\partial\U_n$ for $(\gamma_1,\dots,\gamma_n)\in\partial\bD^n$ at any event. Recalling that $\vec{F}_n:\bD^n\to\U_n$ is surjective, we now conclude that $\vec{F}_n(\D^n)=\Int\U_n$ and that $\vec{F}_n(\partial\bD^n)=\partial\U_n.$ Finally, we see that $\vec{F}_n$ is not injective on $\partial\bD^n$ when $n\ge 2.$ Indeed, by Lemma \ref{lem:F}, $\vec{F}_n(\gamma_1,\dots,\gamma_{n-1},\gamma_n) =\vec{F}_n(\gamma_1,\dots,\gamma_{n-1}, 0)$ for any $(\gamma_1,\dots,\gamma_{n-1})\in\partial\bD^{n-1}$ and $\gamma_n\in\bD.$ \end{pf} We now make a comparison with the Libera-Z\l otkiewicz lemma (Theorem B above). In terms of $b_n=p_n/2,$ we can reformulate it as \begin{align*} b_2&=b_1^2+x(1-b_1^2)\quad\text{and} \\ b_3&=b_1^3+(1-b_1^2)x(2b_1-b_1x)+(1-b_1^2)(1-|x|^2)y. \end{align*} We observe that their results agree with our formulae for $T_2$ and $T_3$ when $b_1=\gamma_1\ge0, x=\gamma_2, y=\gamma_3.$ \section{Recursion for $T_n(\gamma_1,\dots,\gamma_n)$} In the previous section, we defined $T_n(\gamma_1,\dots,\gamma_n)$ as the composition of the polynomial $Q_n(x_1,\dots,x_n)$ with $\vec{F}_n(\gamma_1,\dots,\gamma_n).$ Recall that $Q_n$ and $F_k$ are both defined recursively. In principle, there should be a recursive formula which defines $T_n.$ We end this note by giving such a formula. Let $g(z)=1+2(b_1z+b_2z^2+\cdots)$ be a function in $\PP$ and take $f\in\Schur$ with $\vec{\gamma}(f)=(\gamma_1,\gamma_2,\dots)$ so that $g(z)=(1+zf(z))/(1-zf(z)).$ Then, by construction of $T_n,$ we obtain \begin{equation}\label{eq:bk} b_k=T_k(\gamma_1,\dots,\gamma_k), \qquad k=1,2,3,\cdots. \end{equation} Let $g_1(z)=(1+zf_1(z))/(1-zf_1(z))=1+2(b_1'z+b_2'z^2+\cdots)$ for $f_1(z)=\sigma f(z)=(f(z)-\gamma_1)/[z(1-\bar\gamma_1f(z))].$ Since $\vec{\gamma}(f_1)=(\gamma_2,\gamma_3,\dots),$ we have \begin{equation}\label{eq:bk'} b_k'=T_k(\gamma_2,\dots,\gamma_{k+1}), \qquad k=1,2,3,\cdots. \end{equation} In view of the relation $zf(z)=(g(z)-1)/(g(z)+1),$ we obtain $$ \frac{g_1(z)-1}{g_1(z)+1}=zf_1(z)=\frac{f(z)-\gamma_1}{1-\bar\gamma_1f(z)} =\frac{g(z)-1-\gamma_1z(g(z)+1)}{z(g(z)+1)-\bar\gamma_1(g(z)-1)}, $$ from which we derive the formula $$ \big\{g_1(z)-1\big\}\big\{z(g(z)+1)-\bar\gamma_1(g(z)-1)\big\} =\big\{g_1(z)+1\big\}\big\{g(z)-1-\gamma_1z(g(z)+1)\big\}. $$ Substituting the power series expansions of $g(z)$ and $g_1(z),$ we get the relation $$ \sum_{n=1}^\infty b_n'z^n\left[\sum_{n=1}^\infty b_{n-1}z^{n} -\bar\gamma_1\sum_{n=1}^\infty b_nz^n\right] =\sum_{n=0}^\infty b_n'z^n\left[\sum_{n=1}^\infty b_nz^{n} -\gamma_1\sum_{n=1}^\infty b_{n-1}z^{n}\right], $$ where we set $b_0=b_0'=1.$ We look at the coefficients of $z^n$ of the functions in the both sides to obtain \begin{align*} \sum_{k=1}^{n-1} b_k'(b_{n-k-1}-\bar\gamma_1b_{n-k}) &=\sum_{k=0}^{n-1} b_k'(b_{n-k}-\gamma_1b_{n-k-1}) \\ &=b_n-\gamma_1b_{n-1}+\sum_{k=1}^{n-1} b_k'(b_{n-k}-\gamma_1b_{n-k-1}). \end{align*} Hence, $$ b_n=\gamma_1b_{n-1}+\sum_{k=1}^{n-1} b_k'\Big[(1+\gamma_1)b_{n-k-1} -(1+\bar\gamma_1)b_{n-k}\Big]. $$ We now substitute \eqref{eq:bk} and \eqref{eq:bk'} into the last formula to have the following result. \begin{thm} The functions $T_n(\gamma_1,\dots,\gamma_n)$ defined in \eqref{eq:Tn} are described by the following recursive formula with the initial condition $T_0=1:$ \begin{align*} &\qquad\qquad T_n(\gamma_1,\dots,\gamma_n) =\gamma_1 T_{n-1}(\gamma_1,\dots,\gamma_{n-1}) \\ &+\sum_{k=1}^{n-1} T_k(\gamma_2,\dots, \gamma_{k+1}) \Big[(1+\gamma_1)T_{n-k-1}(\gamma_1,\dots, \gamma_{n-k-1}) -(1+\bar\gamma_1)T_{n-k}(\gamma_1,\dots, \gamma_{n-k})\Big]. \end{align*} \end{thm} We remark that the transformation $g_1$ from $g$ above was already considered by Brown \cite{Brown87} in a more general context. \def\cprime{$'$} \def\cprime{$'$} \def\cprime{$'$} \providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace} \providecommand{\MR}{\relax\ifhmode\unskip\space\fi MR } \providecommand{\MRhref}[2] \href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2} } \providecommand{\href}[2]{#2}
\subsection{Discussion of assumption O.\ref{ass:Unique}}\label{sec:disunique} \section{Proof of Lemma \ref{LEM:ABOUTASSUMPO5}}\label{sec:disbi} Our proof here uses the proof of Theorem \ref{thm:lopo}. Hence, we suggest that the reader reads the proof of Theorem \ref{thm:lopo} before this. We first remind the quantity $b_i$ was defined in the statement of Theorem \ref{thm:lopo}. Our goal here is to first prove that under the assumptions O.\ref{ass:Convex} - O.\ref{ass:True}, we have $\sup_i|b_i|= \op{\frac{\plog(n)}{\kappa_l^{10\rho+5}}}$. We will connect $\hat{\beta}_i$ with $b_i$ and bound $\sup_i|\hat{\beta}_i|$ later in the proof.\\ To show $\sup_{i}|b_i|$ is bounded by $\op{\plog(n)}$, note that if condition (a) holds, then we have \begin{eqnarray} \sup_{i,j}R''(\lopb{i}_j) &\leq& \sup_{i,j}R''(\lophb{i}_j)+O(1)\cdot \sup_{i,j}|\lophb{i}_j-\lopb{i}_j| \nonumber\\ &=& \sup_{j}R''(\hat{\beta}_j)+O(1)\cdot \sup_{i,j}|\lophb{i}_j-\lopb{i}_j| \nonumber\\ &\leq& \op{\frac{\plog(n)}{\kappa_l^{6\rho+3}}} , \nonumber \end{eqnarray} where the last equality is due to \eqref{eq:add_goal_1}. Note that, in the proof of Theorem \ref{thm:lopo}, the only place we use assumption O.\ref{ass:boundhvb} is to obtain an upper bound on $\sup_{i,j}R''(\lopb{i}_j)$ in \eqref{eq:add_10.49}. A similar argument shows that Condition (b) proves $\sup_{i,j}R''(\lopb{i}_j) = \op{\frac{\plog(n)}{\kappa_l^{6\rho+3}}}$ as well. Hence, applying this new bound in \eqref{eq:add_10.48}, we have \[ \inf_i|a_i| \ \geq \ \Omega_p\left(\frac{\kappa_l^{6\rho+3}}{\plog(n)}\right) . \] Then by \eqref{eq:add_9.57}, we have $\sup_i|b_i|\leq \op{\frac{\plog(n)}{\kappa_l^{10\rho+5}}}$. For the case when condition (c) holds, note that from the definition of $b_i$ we have \[ a_i(b_i-\beta_{0,i})+\lambda (R'(b_i)-R'(\beta_{0,i})) \= \vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})-\lambda R'(\beta_{0,i}) . \] By using the Taylor expansion, we obtain \[ (a_i+\lambda R''(b_{\xi}))(b_i-\beta_{0,i}) \= \vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})-\lambda R'(\beta_{0,i}) . \] where $b_{\xi}=\xi b_i+(1-\xi)\beta_{0,i}$ for some $\xi\in[0,1]$. Note that by the definition of $a_i$, we know $a_i>0$. Hence, we know $a_i+\lambda R''(b_{\xi})= \Omega(1)$. Therefore, we have \begin{eqnarray} \sup_{i}|b_i| &\leq& \sup_i|\beta_{0,i}|+\op{\sup_i|\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})|+\lambda |R'(\beta_{0,i})|} \nonumber\\ &\stackrel{\text{(i)}}{\leq}& \op{\sup_i(1+|\beta_{0,i}|^{\rho+1})}+\op{\sup_i|\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})|} \nonumber\\ &\stackrel{\text{(ii)}}{\leq}& \op{\plog(n)}+\op{\sup_i|\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})|} , \nonumber \end{eqnarray} where Inequality (i) is due to assumption O.\ref{ass:Smoothness2} and Inequality (ii) is due to Lemma \ref{lem:xwnorm}. Then, since $\vcx{i}$ is independent of $\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}$, we have \[ \vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}) \ \stackrel{d}{=}\ \mathcal{N}(0,\frac{\|l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})\|^2}{n}) . \] Hence, by assumption O.\ref{ass:Smoothness2} and \eqref{eq:add_lopo_eq1}, we have \[ \sup_{i}|b_i| \ \leq\ \op{\frac{\plog(n)}{\kappa_l^{(\rho+2)(\rho+1)}}} . \] So far we have showed that if one of the conditions (a), (b), or (c) holds, then $\sup_i|b_i| = \op{\frac{\plog(n)}{\kappa_l^{10\rho+5}}}$. The next step is to use this fact and prove that $\sup_i|\hat{\beta}_i| = \op{\frac{\plog(n)}{\kappa_l^{10\rho+5}}}$. Note that Corollary \ref{cor:bibound} only requires assumptions O.\ref{ass:Convex} - O.\ref{ass:True}, hence, we can apply this corollary and obtain that \begin{eqnarray} \sup_i|\hat{\beta}_i| &\leq& \sup_i|\hat{\beta}_i-b_i|+\sup_i|b_i| \nonumber\\ &\leq& \op{\frac{\plog(n)}{n^{\frac{\alpha}{2}}}\cdot \frac{\sup_i|b_i-\beta_{0,i}|^{1+\alpha}}{\kappa_l^{6\rho+3}}}+\sup_i|b_i| \nonumber\\ &=& \op{\frac{\plog(n)}{\kappa_l^{10\rho+5}}} , \nonumber \end{eqnarray} where the last equality is due to Lemma \ref{lem:xwnorm}. This shows that Assumption O.\ref{ass:boundhvb} holds with $c_n=\op{\frac{\plog(n)}{\kappa_l^{15\rho}}}$. \section{Introduction} \subsection{Objectives} \label{sec:obj} In many applications, a dataset $\mathcal{D}=\{(\vrx{1},y_1),(\vrx{2},y_2),\ldots, (\vrx{n},y_n)\}$ with $\vrx{i}\in \bbR^{p}$ and $y_i\in \bbR$ is modeled as \[ y_i \= \vrx{i}^\top\vbeta_0+w_i , \] where $\vbeta_0\in\bbR^p$ denotes the vector of unknown parameters, and $w_i$ denotes the error or noise. $\vbeta_0$ is typically estimated by the solution to the following optimization problem \begin{eqnarray} \hvb_{\lambda} \= \argmin_{\vbeta \in \bbR^{p}}\sum_{i=1}^n l(y_i-\vrx{i}^{\t}\vbeta)+\lambda \sum_{i=1}^p R(\beta_i) . \label{eq:model} \end{eqnarray} $l$ is the loss function, $R$ is the regularizer, and $\lambda>0$ is a tuning parameter. The performance of $\hvb_{\lambda}$ depends heavily on $\lambda$. Hence, finding the `optimal' $\lambda$ is of major interest in machine learning and statistics. In most applications, one would ideally like to find the $\lambda$ that minimizes the out-of-sample prediction error: \[ {\rm Err}_{{\rm out},\lambda} \ \triangleq \ \bbE[l(y_{\operatorname{new}}-\vrx{\operatorname{new}}^{\t}\hvb_{\lambda})\big|\mathcal{D}] , \] where $(\vrx{\operatorname{new}},y_{\operatorname{new}})$ is a new data point generated (independently of $\mathcal{D}$) from the same distribution as $\mathcal{D}$. The problem of estimating ${\rm Err}_{{\rm out},\lambda}$ from $\mathcal{D}$ has been studied for (at least) the past 50 years, and the corresponding literature is too vast to be covered here. Methods such as cross validation (CV) \cite{S74,G75}, Allen's PRESS statistic \cite{A74}, generalized cross validation (GCV) \cite{CW79,GHW79}, and bootstrap \cite{E83} are seminal ways to estimate ${\rm Err}_{{\rm out},\lambda}$. Since the past studies have focused on the data regime $n \gg p$, reliable risk estimates supported by rigorous theory are lacking in high-dimensional settings. In this paper, we study the problem of risk estimation under the high-dimensional asymptotic setting where both the number of features and observation go to infinity, while their ratio remains constant, i.e., $n/p=\delta$ as $n,p \rightarrow \infty$. Suppose that $\widehat{\rm Err}_{{\rm out}, \lambda}$ is an estimate of ${\rm Err}_{{\rm out},\lambda}$ obtained from dataset $\mathcal{D}$. The fundamental consistency property we want for an estimate $\widehat{\rm Err}_{{\rm out}, \lambda}$ of ${\rm Err}_{{\rm out},\lambda}$ is: \begin{itemize} \item[($\mathcal{P}_0$)] \begin{center}$\ \ \ \ \ \ \ \ \ \ \ \ |\widehat{\rm Err}_{{\rm out}, \lambda}-{\rm Err}_{{\rm out},\lambda}| \rightarrow 0$ in probability, as $n,p \rightarrow \infty$ and $n/p = \delta$. \end{center} \end{itemize} As is clear from Figure \ref{fig:loovscv5}, standard techniques such as $3$-fold and $5$-fold cross validation exhibit large biases and do not satisfy $\mathcal{P}_0$. \begin{figure} \hspace{5.2cm} \begin{center} \includegraphics[width=0.6\textwidth]{ridge.pdf} \caption{ Comparison of $K$-fold cross validation (for $K=2,3,5$) and leave-one-out cross validation with the true (oracle-based) out-of-sample error for the ridge problem where $l( y-\vx^{\t}\hvb )=\frac{1}{2}(y-\vx^{\t} \hvb)^2$ and $R(\hvb)=\frac{1}{2}\|\hvb\|^2_2$. In high-dimensional settings the upward bias of $K$-fold CV clearly decreases as number of folds increase. Data is $\vy \sim \mathcal{N}(\vX\vbeta^*,\vI)$ where $\vX \in \mathbb{R}^{n \times p}$. The true coefficients $\vbeta^*$ follows $\mathcal{N}(\boldsymbol{0},4\vI)$. Dimensions are $(n,p)=(1500,1200)$. The rows of $\vX$ are independent $\mathcal{N}(\bm{0}, \frac{1}{n}\bm{I})$. Extra-sample test data is $y_{\rm new} \sim \mathcal{N}(\bm{x}_{\rm new}^\top \bm{\beta}^*, 1)$ where $\bm{x}_{\rm new} \sim N(\bm{0}, \frac{1}{n}\bm{I})$. The true (oracle-based) out-of-sample prediction error is ${\rm Err}_{{\rm out},\lambda} = \mathbb{E} [ ( y_{\rm new}-\bm{x}_{\rm new}^\top \bm{\hat{\beta}} )^2 | \bm{y,X} ]= 1 + \|\bm{\hat{\beta}}-\bm{\beta}^* \|_2^2/n$. All depicted quantities are averages based on 50 random independent samples. } \label{fig:loovscv5} \end{center} \end{figure} The first contribution of this paper is to prove that the following three risk estimation techniques, which have been successful in numerical studies, satisfy $\mathcal{P}_0$: \begin{enumerate} \item Leave-one-out cross validation (LOOCV): Given its negligible bias shown in Figure \ref{fig:loovscv5}, it is expected that ${\rm LO}_{\lambda}$, the estimate given by LOOCV, satisfies $\mathcal{P}_0$. It is noted that LOOCV is computationally demanding and hence impractical in many applications. \item Approximate leave-one-out (ALO): The high computational complexity of ${\rm LO}_{\lambda}$ prompted several authors to adapt the existing heuristic arguments \citep{Stone77Asymptotic, A74} to approximate ${\rm LO}_{\lambda}$ and obtain another risk estimate called ${\rm ALO}_{\lambda}$ \cite{beirami2017optimal, rad2018scalable, giordano2018return, wang2018approximate}. We formally present ALO in Section \ref{sec:galo} \item Approximate message passing (AMP): Assuming that $l (u, y) = \frac{1}{2}(u-y)^2$, estimators of the extra-sample prediction error have been presented using the approximate message passing (AMP) framework \citep{WMZ16Overcoming, MMB13Asymptotic, OK16Cross,DM16High, bayati2013estimating}. In particular \cite{MMB13Asymptotic, bayati2013estimating} showed that AMP-based estimate satisfies $\mathcal{P}_0$ for squared loss and bridge regularizers. In this paper, we first generalize AMP-based method to other loss functions and regularizers in Section \ref{sec:reAMP}. Then, we prove that this estimate satisfies $\mathcal{P}_0$. \end{enumerate} The consistency is a minimum requirement a risk estimate should satisfy in high-dimensional settings; if the convergence $|\widehat{\rm Err}_{{\rm out}, \lambda}-{\rm Err}_{{\rm out},\lambda}| \rightarrow 0$ is slow, then the risk estimate will not be useful in practice. This leads us to the next question we would like to address in this paper: \begin{itemize} \item \begin{center}$\ \ \ \ \ \ \ \ \ \ \ \ $ Is the convergence $|\widehat{\rm Err}_{{\rm out}, \lambda}-{\rm Err}_{{\rm out},\lambda}| \rightarrow 0$ fast? \end{center} \end{itemize} The second contribution of this paper is to answer this question for the three estimates mentioned above. To answer this question, we develop tools which are expected to be used in the study of other risk estimates or in other applications. For instance, the connection we derive between the residuals of the leave-one-out and AMP has provided a more refined information on the estimates that are obtained from AMP. Such connections can be useful for the analysis of estimates that are obtained from the empirical risk minimization \cite{donoho2015variance}. \subsection{Related work} The asymptotic regime of this paper was first considered in \cite{huber1973robust}, but only received a considerable attention in the past fifteen years \cite{donoho2015variance, el2013robust, bean2013optimal, el2018impact, sur2017likelihood, weng2018overcoming, johnstone2001distribution, bayati2012lasso, thrampoulidis2015regularized, amelunxen2014living, chandrasekaran2012convex, cai2016geometric}. The inaccuracy of the standard estimates of ${\rm Err}_{{\rm out},\lambda}$ in high-dimensional settings has been recently noticed by many researchers, see e.g. \cite{rad2018scalable} and the references therein. Hence, several new estimates have been proposed from different perspectives. For instance, \cite{beirami2017optimal, rad2018scalable, giordano2018return, wang2018approximate} used different approximations of the leave-one-out cross validation to obtain computationally efficient risk estimation techniques. In another line of work, \cite{obuchi2018accelerating, bayati2013estimating, mousavi2018consistent} used either statistical physics heuristic arguments or the framework of message passing to obtain more accurate risk estimates. While most of these proposal have been successfully used in empirical studies, their theoretical properties have not been studied. The only exceptions are \cite{bayati2013estimating, mousavi2018consistent}, in which the authors have shown that the AMP-based estimate satisfy $\mathcal{P}_0$ when $l (u-y) = \frac{1}{2}(u-y)^2$ and the regularizer is bridge, i.e., $ R(\beta) = |\beta|^q$ for $q\geq 1$. Furthermore, the convergence rate is not know for any risk estimate. In this paper, we study the three most promising proposals, and present a detailed theoretical analysis under the asymptotic $n,p \rightarrow \infty$ and $n/p \rightarrow \delta$. The tools we develop here are expected to be used in the study of other risk estimates or in other applications. For instance, the connection we derive between the leave-one-out estimate and that of approximate message passing has enabled the message passing framework to provide more refined information (such as convergence rate) for different estimates. \subsection{Notations}\label{sec:notation} Let $\ve_j \in \bbR^p$ stand for a vector filled with zeros except for the $j$th element which is one. Let $\vrx{i}^{\t} \in \bbR^{1 \times p}$ stand for the $i$th row of $\vX \in \bbR^{n \times p}$. Let $\vy_{/i} \in \bbR^{(n-1) \times 1}$ and $\vX_{/i} \in \bbR^{(n-1) \times p}$ stand for $\vy$ and $\vX$, excluding the $i$th entry $y_i$ and the $i$th row $\vrx{i}^\top$, respectively. Moreover, let $\vcx{i} \in \bbR^{1 \times n}$ stand for the $i$th column of $\vX$ and $\bar {\vX}_{/i} \in \bbR^{n \times (p-1)}$ stand for $\vX$, excluding the $i$th column. Further let $\lopvtb{i}$ denote the corresponding vectors $\vbeta_0$ without $i$th component and $\lopvy{i}= \bar {\vX}_{/i}\lopvtb{i}+\vw=\vy-\beta_{0,i}\vcx{i}$. For a vector $\va$, we use $a_i$ to denote its $i$th entry. For any function $\psi(\cdot)$, we use $\psi(\va)$ to indicate the vector $\left [ \psi(a_1),\cdots, \psi(a_d) \right]^{\t}$. The vector $\ve_i$ is filled with zeros except for the $i$th entry which is one. The diagonal matrix whose diagonal elements are $\va$ is referred to as $\text{diag}{\va}$. The component-wise ratio of two vectors $\va$ and $\vb$ is denoted by $\va / \vb$. Moreover, $\dotp{\va}$ stands for the mean of the components of $\va$. We define \begin{eqnarray} \hvb_{\lambda} &\triangleq& \underset{\vbeta \in \bbR^p}{\argmin} \Bigl \{ n\dotp{ l\left( \vy - \vX \vbeta \right)} +\lambda p \dotp{R(\vbeta)} \Bigr \} , \label{eq:bl}\\ \lamloovb{i} &\triangleq& \underset{\vbeta \in \bbR^p}{\argmin} \Bigl \{ (n-1)\dotp{ l\left( \vy_{/i} - \vX_{/i} \vbeta \right)} +\lambda p \dotp{R(\vbeta)} \Bigr \} , \label{eq:bli}\\ \lopvb{i}_{\lambda} &\triangleq& \underset{\vbeta \in \bbR^{p-1}}{\argmin} \Bigl \{ n \dotp{ l\left( \lopvy{i} - \bar {\vX}_{/i} \vbeta \right)} +\lambda (p-1) \dotp{R(\vbeta)} \Bigr \} , \label{eq:blib} \end{eqnarray} where $\hvb_{\lambda}$ is the full model and data estimate, and $\lamloovb{i}$ is the leave observation-$i$ out estimate. We refer to $\lopvb{i}_{\lambda}$ as the leave predictor-$i$ out estimate. Further, $l'(x)$, $l''(x)$, $R'(x)$, $R''(x)$ stand for the first and second derivatives for $l$ and $R$ respectively. Finally, $\sigma_{\max}(\vM)$ and $\sigma_{\min}(\vM)$ denote the maximum and minimum eigenvalues of a matrix $\vM$ respectively. \subsection{ The estimates ${\rm LO}_{\lambda}$ and ${\rm ALO}_{\lambda}$}\label{sec:galo} Leave-one-out cross validation (${\rm LO}_{\lambda}$) offers the following estimate for ${\rm Err}_{{\rm out},\lambda}$: \[ {\rm LO}_{\lambda} \ := \ \frac{1}{n} \sum_{i=1}^n l(y_i-\vrx{i}^{\t}\lamloovb{i}), \] where \begin{eqnarray} \lamloovb{i} \ :=\ \argmin_{\vbeta \in \bbR^{p}}\sum_{j\neq i}^n l(y_j-\vrx{j}^{\t}\vbeta)+\lambda \sum_{i=1}^p R(\beta_i) . \label{eq:modelLO} \end{eqnarray} ${\rm LO}_{\lambda}$ is computationally infeasible when both $n$ and $p$ are large. To alleviate this problem, \cite{RM18Scalable} used the following single step of the Newton algorithm (with initialization $\hvb_{\lambda}$) to approximate the solution of \eqref{eq:bli}: \begin{eqnarray} \lamloovb{i} &\approx& \hvb_{\lambda} - l'(y_i-\vrx{i}^{\t}\hvb_{\lambda})\left(\sum_{j\neq i}^n \vrx{j} \vrx{j}^\top l''(y_j-\vrx{j}^{\t}\hvb_{\lambda})+\lambda \text{diag}{R''(\hvb_{\lambda})}\right)^{-1} \vrx{i} . \nonumber\\ \label{eq:aloformula1} \end{eqnarray} Then, using Woodbury matrix inversion lemma, in \cite{RM18Scalable} the following approximate leave-one-out formula was derived: \begin{eqnarray} {\rm ALO}_{\lambda} &:=& \frac{1}{n} \sum_{i=1}^n l \left(y_i-\vrx{i}^{\t}\hvb_{\lambda}+\frac{l'(y_i-\vrx{i}^{\t}\hvb_{\lambda})}{l''(y_i-\vrx{i}^{\t}\hvb_{\lambda})}\cdot \frac{H_{ii}}{1-H_{ii}}\right) , \label{eq:looeq} \end{eqnarray} where $H_{ii}$ is the $i$th diagonal element of $\vH$ defined by: \[ \vX\left(\vX^{\t}\text{diag}{\fl''(\vy-\vX\hvb_{\lambda})}\vX+\lambda \text{diag}{R''(\hvb_{\lambda})}\right)^{-1}\vX^{\t}\text{diag}{\fl''(\vy-\vX\hvb_{\lambda})}. \] Despite the existing numerical results that exhibit the accuracy of ${\rm ALO}_{\lambda}$, its theoretical analysis is lacking. The accuracy of this approximation was confirmed in \cite{RM18Scalable} under certain `stability' assumptions. However, they could not show whether such `stability' assumptions hold for $\lamloovb{i}$ in high-dimensional settings. Furthermore, their results are only concerned with the discrepancy $|{\rm ALO}_{\lambda}-{\rm LO}_{\lambda}|$, and does not provide any information on the consistency of each estimate. \subsection{Risk estimation with AMP}\label{sec:reAMP} Besides ${\rm LO}_{\lambda}$ and ${\rm ALO}_{\lambda}$, another risk estimation technique we study in this paper is based on the approximate message passing (AMP) framework \cite{M11PhD}. For squared loss $l (u, y) = \frac{1}{2}(u-y)^2$ and bridge regularizers, \cite{MMR17Consistent} used the AMP framework to obtain consistent estimates of ${\rm Err}_{{\rm out},\lambda}$. In this section, we explain how an estimate ${{\rm AMP}}_{{\rm risk},\lambda}$ of ${\rm Err}_{{\rm out},\lambda}$ can be obtained for the more general class of estimators we consider in \eqref{eq:model}. The heuristic approach that leads to the following construction of ${{\rm AMP}}_{{\rm risk},\lambda}$ is explained in Appendix \ref{sec:construct}. \begin{enumerate} \item Compute $\hvb_{\lambda}$ from \eqref{eq:model}. \item Find $\hat{\tau}$ that satisfies the following equation: \begin{eqnarray} \lambda &=& \dotp{\frac{l''(\vy-\vX\hvb_{\lambda})}{\frac{1}{\hat{\tau}}+\frac{1}{\delta\lambda}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb_{\lambda})}}\cdot l''(\vy-\vX\hvb_{\lambda})}} . \label{eq:taudef} \end{eqnarray} \item Using $\hvb_{\lambda}$ from step 1, and $\hat{\tau}$ from step 2, define \begin{eqnarray} \hat{\theta} &:=& \frac{1}{\delta\lambda}\dotp{\frac{\hat{\tau}}{1+\hat{\tau} R''(\hvb_{\lambda})}}. \label{eq:thetadef} \end{eqnarray} \item Finally, the AMP-based risk estimator is given by \begin{eqnarray} {{\rm AMP}}_{{\rm risk},\lambda} &:=& \frac{1}{n}\sum_{i=1}^nl \left(y_i-\vrx{i}^{\t}\hvb_\lambda+ \hat{\theta}\cdotl'(y_i-\vrx{i}^{\t} \hvb_{\lambda}) \right) . \label{eq:amprhat} \end{eqnarray} \end{enumerate} To ensure the existence of $\hat{\tau}$ in step 2, we will show in Lemma \ref{lem:AMP=GLM1} that there is a one-to-one relationship between $\lambda$ and $\hat{\tau}$. Further, we will show in Section \ref{ssec:discamp_lo} that $y_i-\vrx{i}^{\t}\hvb+ \hat{\theta}\cdotl'(y_i-\vrx{i}^{\t} \hvb_{\lambda})$ is close to $y_i-\vrx{i}^{\t}\loovb{i}$. In other words, the term $\hat{\theta} \cdot l'(\vy-\vX\hvb_{\lambda})$ corrects the optimistic training error $y_i-\vrx{i}^{\t}\hvb_{\lambda}$, and pushes it closer to the out-of-sample error. \section{Proof of Theorem \ref{THM:MSE}}\label{sec:MSE} \subsection{Preliminaries} \label{sec:Preliminaries} In this section, we gathered the existing results (or their straightforward corollaries ) that are required in multiple proofs throughout our manuscript. The first result is concerned with the eigenvalues of several matrices which will appear in our proofs. \begin{lemma}\label{lem:minev} There exists constant $c>0$ such that for large enough $n$, with probability at least $1-8(p-1)(n+p+1)e^{-cn}$, we have all the following statements hold. \begin{itemize} \item [-] $\sigma_{\rm max} (\vX^{\t}\vX) \leq 9 \delta^2$. \item [-] $\max_{1\leq i \leq p}\sigma_{\rm max} (\vX_{/i}^{\t}\vX_{/i}) \leq 9 \delta^2$. \item [-] $\max_{1\leq i \leq p}\sigma_{\rm max} (\bar {\vX}_{/i}\XIb^{\t} ) \leq 9 \delta^2$, where $\bar {\vX}_{/i}$ is matrix $X$ without $i$th column. \item [-] $\max_{1\leq i \leq p}\sigma_{\rm max} (\bar {\vX}_{/i}^{\t}\bar {\vX}_{/i} ) \leq 9 \delta^2$. \item [-] $\sigma_{\min} (\vX^{\t}\vX) \geq \sigma_{\delta}$, where $\sigma_{\delta}=\frac{1}{2}\cdot\min\{(1-\sqrt{\frac{1}{\delta}})^2,\frac{1}{\delta}\}$. \item [-] $\min_{1 \leq i \leq p} \sigma_{\min}(\vX_{/i}^{\t}\vX_{/i}) \geq \sigma_{\delta}$. \item[-] $\min_{1 \leq i \leq p} \sigma_{\min}( \bar {\vX}_{/i}^{\t}\bar {\vX}_{/i}) \geq \sigma_{\delta}$ \end{itemize} \end{lemma} This result is a simple corollary of the existing results such as the ones stated in \cite{Sil85Smallest}. However, for the sake of completeness we bring the proof here. \begin{proof} By the proof in \citet{Sil85Smallest} (see Equation (2)), we know that if $\bm{W}=\bm{U}^{\t}\bm{U}$, where $\bm{U} \in \bbR^{n\times p}$ and $U_{ij}\stackrel{i.i.d.}{\sim}\mathcal{N}(0,1/n)$, then we have \begin{eqnarray} \lefteqn{\text{the minimum eigenvalue of $\bm{W}$}} \nonumber\\ &\geq& \min\Big[ (1/n)(\nu_n^2-\nu_n\rho_{p-1}),(1/n)(\rho_1^2+\nu^2_{n-p+1}-\nu_{n-p+2}\rho_1) , \nonumber\\ && \min_{j\leq p-2}(1/n)(\rho^2_{p-j}+\nu^2_{n-j}-(\nu_{n-j+1}\rho_{p-j}+\nu_{n-j}\rho_{p-j-1}))\Big] , \nonumber \end{eqnarray} where $\rho^2_i$ with $i\leq p-1$ and $\nu^2_j$ with $j\in[n-p+2,n]$ follow chi-squared distribution with degree of freedom $i$ and $j$ respectively. Next, from \cite{laurent2000adaptive}[Lemma 1], we have for $i\in [1,p-1]$ and $j\in [n-p+2,n]$, \begin{eqnarray} \text{Pr}(\rho^2_i\geq i+2\sqrt{in\epsilon}+2n\epsilon) &\leq& e^{-n\epsilon} \nonumber\\ \text{Pr}(\rho^2_i\leq i-2\sqrt{in\epsilon}) &\leq& e^{-n\epsilon} \nonumber\\ \text{Pr}(\nu^2_j\geq j+2\sqrt{jn\epsilon}+2n\epsilon) &\leq& e^{-n\epsilon} \nonumber\\ \text{Pr}(\nu^2_j\leq j-2\sqrt{jn\epsilon}) &\leq& e^{-n\epsilon} . \nonumber \end{eqnarray} Hence, with probability at least $1-4(p-1)e^{-n\epsilon}$, we have \begin{eqnarray} i-2\sqrt{in\epsilon} \ \leq &\rho^2_i& \leq \ i+2\sqrt{in\epsilon}+2n\epsilon , \quad \forall i\in [1,p-1] \nonumber\\ j-2\sqrt{jn\epsilon} \ \leq &\nu^2_j& \leq \ j+2\sqrt{jn\epsilon}+2n\epsilon , \quad \forall j\in [n-p+2,n] . \nonumber \end{eqnarray} Hence, for small enough constant $\epsilon\in (0,1)$, we have \begin{eqnarray} \lefteqn{\frac{1}{n}(\nu_n^2-\nu_n\rho_{p-1})} \nonumber\\ &\geq& \frac{1}{n}\left(n-2n\sqrt{\epsilon}-\sqrt{n+2n\sqrt{\epsilon}+2n\epsilon}\cdot \sqrt{p-1+2\sqrt{pn\epsilon}+2n\epsilon}\right) \nonumber\\ &\geq& 1-2\sqrt{\epsilon}-\sqrt{1+3\sqrt{\epsilon}}\cdot\sqrt{\frac{1}{\delta}+3\sqrt{\epsilon}} \nonumber\\ &\geq& 1-\sqrt{\frac{1}{\delta}}-(2+4\sqrt{\delta})\sqrt{\epsilon} \nonumber\\ \lefteqn{\frac{1}{n}\left(\rho_1^2+\nu^2_{n-p+1}-\nu_{n-p+2}\rho_1\right)} \nonumber\\ &\geq& \frac{1}{n}\left(0+n-p+1-2n\sqrt{\epsilon}-\sqrt{n-p+2+2n\sqrt{\epsilon}+2n\epsilon}\cdot \sqrt{1+2\sqrt{n\epsilon}+2n\epsilon}\right) \nonumber\\ &\geq& 1-\frac{1}{\delta}-4\sqrt{\epsilon} . \nonumber \end{eqnarray} Further, for all $j\leq p-2$, let $\Delta_{\epsilon}=2n\sqrt{\epsilon}+2n\epsilon$. We have \begin{eqnarray} \lefteqn{\frac{1}{n}\left(\rho^2_{p-j}+\nu^2_{n-j}-(\nu_{n-j+1}\rho_{p-j}+\nu_{n-j}\rho_{p-j-1})\right)} \nonumber\\ &\geq& \frac{1}{n}\left(p-j-2n\sqrt{\epsilon}+n-j-2n\sqrt{\epsilon}-\sqrt{n-j+1+\Delta_{\epsilon}}\cdot \sqrt{p-j+\Delta_{\epsilon}}\right. \nonumber\\ && \left.-\sqrt{n-j+\Delta_{\epsilon}}\cdot\sqrt{p-j-1+\Delta_{\epsilon}}\right) \nonumber\\ &\geq& \frac{1}{n}\left(\left(\sqrt{n-j+1+\Delta_{\epsilon}}-\sqrt{p-j+\Delta_{\epsilon}}\right)^2-2\Delta_{\epsilon}-1-4n\sqrt{\epsilon}\right) \nonumber\\ &=& \frac{1}{n}\left(\left(\frac{n-p+1}{\sqrt{n-j+1+\Delta_{\epsilon}}+\sqrt{p-j+\Delta_{\epsilon}}}\right)^2-2\Delta_{\epsilon}-1-4n\sqrt{\epsilon}\right) \nonumber\\ &\geq& \left(\frac{1-\frac{1}{\delta}}{\sqrt{1+4\sqrt{\epsilon}}+\sqrt{\frac{1}{\delta}+4\sqrt{\epsilon}}}\right)^2-9\sqrt{\epsilon} \nonumber\\ &\geq& 0.9\left(1-\sqrt{\frac{1}{\delta}}\right)^2-4\sqrt{\epsilon} . \nonumber \end{eqnarray} Hence, for a small enough constant $\epsilon>0$, we have \[ \text{Pr}\left(\sigma_{\min}\left(\vX^{\t}\vX\right)<\sigma_{\delta}\right) \ \leq\ 4(p-1)e^{-n\epsilon} . \] Similarly, we have \[ \text{Pr}\left(\sigma_{\max}\left(\vX^{\t}\vX\right)> 9\delta^2\right) \ \leq\ 4(p-1)e^{-n\epsilon} . \] Further with a union bound over $\vX_{/i}^{\t}\vX_{/i}$ and $\bar {\vX}_{/i}^{\t}\bar {\vX}_{/i}$ for all possible $i$, we obtain that with probability at least $1-8(n+p+1)(p-1)e^{-n\epsilon}$, the statements of the theorem hold \end{proof} Our second lemma reviews the different concentrations for subGaussian random vectors. \begin{lemma}\label{lem:xwnorm} Under Assumption O.\ref{ass:True}, for large enough $n$, we have \begin{eqnarray} \sup_i|\|\vrx{i}\|^2-\frac{1}{\delta}| \= o_p(1) , && \sup_i|\|\vcx{i}\|^2-1| \= o_p(1) , \nonumber\\ \sup_i|w_i| \= \op{\ln n} , && \sup_i|\beta_{0,i}| \= \op{\ln n} \quad \text{and} \quad \sup_{i,j}|x_{ij}| \= \op{\frac{\ln n}{\sqrt{n}}} . \nonumber \end{eqnarray} \end{lemma} \begin{proof} Note that $n\|\vrx{i}\|^2$ and $n\|\vcx{i}\|^2$ follow chi-squared distributions with degrees of freedom $p$ and $n$ respectively. Hence, by \cite{laurent2000adaptive}[Lemma 1], we have for any $i$, \begin{eqnarray} \text{Pr}\left(n\|\vrx{i}\|\geq p+2\sqrt{p\epsilon}+2\epsilon\right) &\leq& e^{-\epsilon} \nonumber\\ \text{Pr}\left(n\|\vrx{i}\|\leq p-2\sqrt{p\epsilon}\right) &\leq& e^{-\epsilon} \nonumber\\ \text{Pr}\left(n\|\vcx{i}\|\geq n+2\sqrt{n\epsilon}+2\epsilon\right) &\leq& e^{-\epsilon} \nonumber\\ \text{Pr}\left(n\|\vcx{i}\|\leq n-2\sqrt{n\epsilon}\right) &\leq& e^{-\epsilon} . \nonumber \end{eqnarray} By choosing $\epsilon=\sqrt{n}$ and using the union bound for all possible $i\in[n]$, we obtain $\sup_i|\|\vrx{i}\|-\frac{1}{\delta}|={o_p}(1)$ and $\sup_{i}|\|\vcx{i}\|-1|={o_p}(1)$. Furthermore, Assumption O.\ref{ass:True} implies that $w_i$ and $\beta_{0,i}$ have sub Gaussian tails, i.e., there exists constant $C, v$ such that for every $t>0$, we have \[ \text{Pr}(|w_i|>t) \ \leq\ C\cdot e^{-vt^2} \quad \text{and} \quad \text{Pr}(|\beta_{0,i}|>t) \ \leq\ C\cdot e^{-vt^2} . \quad \forall i \] Hence, we have $\sup_i|w_i|=\op{\ln n}$ and $\sup_{i}|\beta_{0,i}|=\op{\ln n}$. Finally, since $x_{ij}\sim \mathcal{N}(0,\frac{1}{n})$. It is straightforward to show $\sup_{i,j}|x_{ij}|=\op{\frac{\ln n}{\sqrt{n}}}$. \end{proof} Finally, since we will apply Matrix Inversion Lemma repeatedly, we formally state it here. \begin{lemma}\label{lem:MIL}(Matrix Inversion Lemma) Let $\vW\in \bbR^{n_1\times n_1}, \vU\in \bbR^{n_1\times n_2}, \vT\in \bbR^{n_2\times n_2}, \vV\in \bbR^{n_2\times n_1}$. If $\vW^{-1}$ and $\vT^{-1}$ exists, we have \[ (\vW+\vU\vT\vV)^{-1} \= \vW^{-1}-\vW^{-1}\vU(\vT^{-1}+\vV\vW^{-1}\vU)^{-1}\vV\vW^{-1} . \] \end{lemma} \subsection{Proof of Lemma \ref{lem:AMP=GLM1}}\label{sec:uniquesolution} We aim to show that given $(\vX,\vy,\vbeta)$, the mapping between $\gamma$ and $\tau$ defined in \eqref{eq:amp=glm_eq1} is one-to-one. Note that by multiplying $\frac{1}{\delta\gamma}\dotp{\frac{1}{1+\tauR''(\vbeta)}}$ by both sides of \eqref{eq:amp=glm_eq1}, we have: \begin{eqnarray} \frac{1}{\delta}\dotp{\frac{1}{1+\tauR''(\vbeta)}} \= \dotp{\frac{\frac{1}{\delta\lambda}\dotp{\frac{1}{1+\tauR''(\vbeta)}}l''(\vy-\vX\vbeta)}{\frac{1}{\tau}+\frac{1}{\delta\gamma}\dotp{\frac{1}{1+\tauR''(\vbeta)}}\cdot l''(\vy-\vX\vbeta)}} , \nonumber \end{eqnarray} which is equivalent to \begin{eqnarray} 1-\dotp{\frac{1}{ \frac{1}{\delta\gamma}\dotp{\frac{\tau}{1+\tauR''(\vbeta)}}l''(\vy-\vX\vbeta)+1}} &=& \frac{1}{\delta}\dotp{\frac{1}{1+\tauR''(\vbeta)}} . \label{eq:taulambdacondition} \end{eqnarray} Hence, we just need to show that the mapping defined in \eqref{eq:taulambdacondition} is a bijection. First, for all fixed $\tau>0$, the righthand side of \eqref{eq:taulambdacondition} will be a constant between $(0,1)$. Let the lefthand side be a function of $\gamma$, i.e., \[ g_{\tau}(\gamma) \ \triangleq \ 1-\dotp{\frac{1}{\frac{1}{\delta\gamma}\dotp{\frac{\tau}{1+\tauR''(\vbeta)}}l''(\vy-\vX\vbeta)+1}} \= \dotp{\frac{\dotp{\frac{\tau}{1+\tauR''(\vbeta)}}l''(\vy-\vX\vbeta)}{\dotp{\frac{\tau}{1+\tauR''(\vbeta)}}l''(\vy-\vX\vbeta)+\delta\gamma}} . \] Then, we have \[ \frac{\dif g_{\tau}(\gamma)}{\dif \gamma} \= -\delta\dotp{\frac{\dotp{\frac{\tau}{1+\tauR''(\vbeta)}}l''(\vy-\vX\vbeta)}{\left(\dotp{\frac{\tau}{1+\tauR''(\vbeta)}}l''(\vy-\vX\vbeta)+\delta\gamma \right)^2}} \ < \ 0 . \] Further, $g_{\tau}(0)=1$ and $\lim_{\gamma\rightarrow \infty}g_{\tau}(\gamma)=0$. Hence, we know for all fixed $\tau>0$, there exists unique $\gamma>0$ satisfying \eqref{eq:taulambdacondition}. On the other hand, for all fixed $\gamma>0$, we can rewrite \eqref{eq:taulambdacondition} in the following way: \begin{eqnarray} 1 &=& \dotp{\frac{1}{\frac{1}{\delta\gamma}\dotp{\frac{\tau}{1+\tauR''(\vbeta)}}l''(\vy-\vX\vbeta)+1}}+\frac{1}{\delta}\dotp{\frac{1}{1+\tauR''(\vbeta)}} . \label{eq:limiteqc_2} \end{eqnarray} Let $\tilde{g}_{\gamma}(\tau)$ be the righthand side of \eqref{eq:limiteqc_2}, i.e., \[ \tilde{g}_{\gamma}(\tau) \ \triangleq\ \frac{1}{\delta}\dotp{\frac{1}{1+\tauR''(\vbeta)}}+\dotp{\frac{1}{\frac{1}{\delta\gamma}\dotp{\frac{\tau}{1+\tauR''(\vbeta)}} l''(\vy-\vX\vbeta)+1}} . \] Then we have \begin{eqnarray} \frac{\dif \tilde{g}_{\gamma}(\tau)}{\dif \tau} &=& -\frac{1}{\delta}\dotp{\frac{R''(\vbeta)}{(1+\tauR''(\vbeta))^2}} \nonumber\\ & & -\dotp{\frac{l''(\vy-\vX\vbeta)}{\left(\frac{1}{\delta\gamma}\dotp{\frac{\tau}{1+\tauR''(\vbeta)}} l''(\vy-\vX\vbeta)+1\right)^2}}\cdot \frac{1}{\delta\gamma}\dotp{\frac{1}{(1+\tauR''(\vbeta))^2}} \ <\ 0 , \nonumber \end{eqnarray} Further, $\tilde{g}_{\gamma}(0)>1$ and $\lim_{\tau\rightarrow \infty}\tilde{g}_{\gamma}(\tau)<1$. Hence, for all fixed $\gamma>0$, there exists a unique $\tau>0$ satisfying \eqref{eq:taulambdacondition}. $\hfill \square$ \subsection{Proof of Lemma \ref{lem:supnormDi}}\label{sec:supnormDi} We will first show that \[ \sup_i|y_i-\vrx{i}^{\t}\loovb{i}| \= \op{\frac{\ln n}{\kappa_l}} . \] Note that $y_i=\vrx{i}^{\t}\vbeta_0+w_i$, we have \[ \sup_i|y_i-\vrx{i}^{\t}\loovb{i}| \ \leq\ \sup_i|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|+\sup_i|w_i| \= \sup_i|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|+\op{\ln n} , \] where last equation is due to Lemma \ref{lem:xwnorm}. Hence, we just need to bound $\sup_i|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|$. Note that \begin{eqnarray} \lefteqn{\text{Pr}\left(\sup_i|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|\geq C^*\ln n\right)} \nonumber\\ &\leq& \text{Pr}\left(\sup_i|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|\geq C^*\ln n, \sup_i\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}<C^*\right)+\text{Pr}\left(\sup_i\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}\geq C^*\right) \nonumber\\ &=& \text{Pr}\left(\sup_i|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|\geq C^*\ln n, \frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}<C^*, \forall i\right)+\text{Pr}\left(\sup_i\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}\geq C^*\right) \nonumber\\ &\leq& \sum_{i=1}^n \text{Pr}\left(|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|\geq C^*\ln n, \frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}<C^*, \forall i\right)+\text{Pr}\left(\sup_i\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}\geq C^*\right) \nonumber\\ &\leq& \sum_{i=1}^n\text{Pr}\left(|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|\geq C^*\ln n,\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}<C^*\right)+\text{Pr}\left(\sup_i\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}\geq C^*\right) \nonumber\\ &\leq& \sum_{i=1}^n\text{Pr}\left(|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|\geq C^*\ln n \ \Big| \ \frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}<C^*\right)+\text{Pr}\left(\sup_i\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}\geq C^*\right) , \nonumber \end{eqnarray} where $C^*>0$ will be determined later. Since $\vrx{i}$ is independent of $\vbeta_0-\loovb{i}$, we have \[ \vrx{i}^{\t}(\vbeta_0-\loovb{i})\Big| (\vbeta_0-\loovb{i}) \ \stackrel{d}{=}\ \frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}\mathcal{N}(0,1) . \] Hence, we have \begin{eqnarray} \text{Pr}\left(\sup_i|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|\geq C^*\ln n\right) &\leq& \sum_{i=1}^n2e^{-\frac{\ln^2 n}{2}}+\text{Pr}\left(\sup_i\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}\geq C^*\right) \nonumber\\ &=& o(1)+\text{Pr}\left(\sup_i\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}\geq C^*\right) . \nonumber \end{eqnarray} Therefore, to obtain an upped bound for $\text{Pr}\left(\sup_i|\vrx{i}^{\t}(\vbeta_0-\loovb{i})|\geq C^*\ln n\right)$ we only need to bound $\sup_i\frac{\|\vbeta_0-\loovb{i}\|}{\sqrt{n}}$. From the first order conditions we have \begin{eqnarray} \boldsymbol{0} &=& -\vX^{\t}l'(\vy-\vX\loovb{i})+l'(y_i-\vrx{i}^{\t}\loovb{i})\vrx{i}+\lambdaR'(\loovb{i}) . \label{eq:ithout} \end{eqnarray} Plugging $\vy = \vX \vbeta_0 + \vw$ we have \[ -\vX^{\t}l'(\vw+\vX(\vbeta_0-\loovb{i}))+l'(w_i+\vrx{i}^{\t}(\vbeta_0-\loovb{i}))\vrx{i}+\lambdaR'(\loovb{i}) \= \boldsymbol{0} . \] Using the mean value theorem for $l'$ at $\vw$ and $R'$ at $\vbeta_0$, we have \begin{eqnarray} \lefteqn{\vX^{\t}l'(\vw)-l'(w_i)\vrx{i}-\lambdaR'(\vbeta_0)} \nonumber\\ &=& (\vX^{\t}\text{diag}{\fl''(\vw_{\vxi})}\vX-l''(w_{\vxi,i})\vrx{i}\vrx{i}^{\t}+\lambda\text{diag}{R''(\vbeta^i_{\vxi'})})(\loovb{i}-\vbeta_0) , \nonumber \end{eqnarray} where $\ve_j^{\t}\vbeta^i_{\vxi'}=\xi'_{i,j} \ve_j^{\t} \vbeta_0+(1-\xi'_{i,j})\ve_j^{\t} \loovb{i}$ for some $\xi'_{i,j}\in [0,1]$ and $j$th diagonal component of $\text{diag}{\fl''(\vw_{\vxi})}$ is $l''(\xi_{i,j}w_j+(1-\xi_{i,j}) \vrx{j}^{\t}(\vbeta_0-\loovb{i}))$ for some $\xi_{i,j}\in [0,1]$. Hence, we have \begin{equation} \label{eq:add_eq2} \begin{split} \lefteqn{\sup_i\frac{1}{\sqrt{n}}\|\loovb{i}-\vbeta_0\|} \\ &= \frac{1}{\sqrt{n}}\sup_i\left\|\left(\vX^{\t}\text{diag}{\fl''(\vw_{\vxi})}\vX-l''(w_{\vxi,i})\vrx{i}\vrx{i}^{\t}+\lambda\text{diag}{R''(\vbeta^i_{\vxi'})}\right)^{-1}\right. \\ &\quad \times\left.(\vX^{\t}l'(\vw)-l'(w_i)\vrx{i}-\lambdaR'(\vbeta_0))\right\| \\ &\stackrel{\text{(i)}}{\leq} \op{\frac{1}{\kappa_l \sqrt{n}}}\sup_i\|\vX^{\t}l'(\vw)-l'(w_i)\vrx{i}-\lambdaR'(\vbeta_0)\| \\ &\leq \op{\frac{1}{\kappa_l\sqrt{n}}}(\|\vX^{\t}l'(\vw)\|+\sup_i|l'(w_i)|\|\vrx{i}\|+\lambda\|R'(\vbeta_0)\|) \\ &\stackrel{\text{(ii)}}{\leq} \op{\frac{1}{\kappa_l\sqrt{n}}}(\|\vX^{\t}l'(\vw)\|+\lambda\|R'(\vbeta_0)\|)+\op{\frac{\plog(n)}{\kappa_l\sqrt{n}}} , \end{split} \end{equation} where Inequality (i) is due to Lemma \ref{lem:minev} and Assumption O.\ref{ass:Smoothness}, and Inequality (ii) holds due to Lemma \ref{lem:xwnorm} and Assumption O.\ref{ass:Smoothness2}. To bound \eqref{eq:add_eq2}, note that since $\vX$ is independent of $\vw$, we have \[ \vX^{\t}l'(\vw) \ \stackrel{d}{=}\ \frac{\|l'(\vw)\|}{\sqrt{n}}\vZ_p , \] where $\vZ_p\sim \mathcal{N}(0,I_p)$. Hence, we have \[ \|\vX^{\t}l'(\vw)\| \= \frac{\|l'(\vw)\|}{\sqrt{n}}\|\vZ_p\| \= \op{\sqrt{n}} , \] where the last equality is due to Assumption O.\ref{ass:Smoothness2} and Assumption O.\ref{ass:True}. For $\|R'(\vbeta_0)\|$, from Assumption O.\ref{ass:True}, we have $\frac{1}{p}\sum_{i}\beta_{0,i}^{2(\rho+1)}=\op{1}$. Hence, with Assumption O.\ref{ass:Smoothness2}, we have for some universal constant $C>0$, \[ \frac{1}{n}\|R'(\vbeta_0)\|^2 \ \leq\ \frac{C}{n}\sum_{i}(1+\beta_{0,i}^{2(\rho+1)}) \= \op{1} . \] Hence, for \eqref{eq:add_eq2}, we have \begin{eqnarray} \sup_i\frac{1}{\sqrt{n}}\|\loovb{i}-\vbeta_0\| &\leq& \op{\frac{1}{\kappa_l}} , \label{eq:add_tue_2.33pm} \end{eqnarray} i.e., for all $\epsilon>0$, there exists constant $C_\epsilon,N_{\epsilon}>0$ such that \[ \text{Pr}\left(\sup_i\frac{1}{\sqrt{n}}\|\loovb{i}-\vbeta_0\|\ \geq \ \frac{C_{\epsilon}}{\kappa_l}\right) \ \leq\ \epsilon , \ \ \forall n>N_{\epsilon} . \] Therefore, by choosing $C^*=C_{\epsilon}/\kappa_l$, we have \begin{eqnarray} \sup_i|y_i-\vrx{i}^{\t}\loovb{i}| &=& \op{\frac{\ln n}{\kappa_l}} . \label{eq:suploor} \end{eqnarray} Now we switch to the proof of \[ \sup_{i}\|\hvb-\loovb{i}\| \= \op{\frac{\plog(n)}{\kappa_l^{\rho+2}}} . \] Let $\vDelta^i=\loovb{i}-\hvb$. $\hvb,\loovb{i}$ satisfy the following equations: \begin{eqnarray} \boldsymbol{0} &=& -\vX^{\t}l'(\vy-\vX\hvb)+\lambdaR'(\hvb) , \label{eq:full}\\ \boldsymbol{0} &=& -\vX^{\t}l'(\vy-\vX\loovb{i})+l'(y_i-\vrx{i}^{\t}\loovb{i})\vrx{i}+\lambdaR'(\loovb{i}) . \nonumber \end{eqnarray} By subtracting the above two terms and applying the mean value theorem for $l'$ and $R'$, we have \begin{equation} \label{eq:add_eq3} \begin{split} -l'(y_i-\vrx{i}^{\t}\loovb{i})\vrx{i} &= \lambda\left(R'(\hvb)-R'(\loovb{i})\right) -\sum_{j=1}^n\vrx{j}\left(l'(y_j-\vrx{j}^{\t}\hvb)-l'(y_j-\vrx{j}^{\t}\loovb{i})\right) \\ &= \lambda\text{diag}{R''(\vbeta^{i}_{\vxi'})}\vDelta^i+\vX^{\t}\text{diag}{\fl''(\vy-\vX\vbeta^i_{\vxi})}\vX\vDelta^i , \end{split} \end{equation} where $\ve_j^{\t}\vbeta^i_{\vxi'}=\xi'_{i,j} \ve_j^{\t} \vbeta_0+(1-\xi'_{i,j})\ve_j^{\t} \loovb{i}$ for some $\xi'_{i,j}\in [0,1]$ and the $j$th diagonal component of $\text{diag}{\fl''(\vy-\vX\vbeta^i_{\vxi})}$ is $l''(y_j-\vrx{j}^{\t}(\xi_{i,j}\hvb+(1-\xi_{i,j})\loovb{i}))$ for some $\xi_{i,j}\in [0,1]$. From Lemma \ref{lem:minev} and Assumption O.\ref{ass:Smoothness}, we know that matrix \[ \left(\vX^{\t}\text{diag}{\fl''(\vy-\vX\vbeta^i_{\xi})}\vX+\lambda\text{diag}{R''(\vbeta^{i}_{\vxi'})}\right)^{-1} \] exists and its maximum eigenvalue is at most $1/(\kappa_l\sigma_{\delta})=\op{\frac{1}{\kappa_l}}$, where $\sigma_\delta$ is defined in Lemma \ref{lem:minev}. Hence, if we define \[ \vB^i_{\vxi,\vxi'} \ := \ \vX^{\t}\text{diag}{\fl''(\vy-\vX\vbeta^i_{\vxi})}\vX+\lambda\text{diag}{R''(\vbeta^{i}_{\vxi'})} , \] then from \eqref{eq:add_eq3} we have \[ \vDelta^i \= -l'(y_i-\vrx{i}\loovb{i})(\vB^i_{\vxi,\vxi'})^{-1}\vrx{i} . \] Hence, we have \begin{equation} \label{eq:add_tue_2.35pm} \begin{split} \sup_i\|\loovb{i}-\hvb\| &= \sup_{i,\vxi,\vxi'}\left|l'(y_i-\vrx{i}\loovb{i})\right|\sqrt{\vrx{i}^{\t}\left(\vB^i_{\vxi,\vxi'}\right)^{-2}\vrx{i}} \\ &\leq \op{\frac{1}{\kappa_l}}\sup_i|l'(y_i-\vrx{i}\loovb{i})|\sup_i\|\vrx{i}\| \\ &\leq \op{\frac{\plog(n)}{\kappa_l^{\rho+2}}} , \end{split} \end{equation} where the last inequality is due to Lemma \ref{lem:xwnorm}, Assumption O.\ref{ass:Smoothness2} and \eqref{eq:suploor}. Finally, apply \eqref{eq:suploor} and Lemma \ref{lem:xwnorm} again, we immediately have \begin{eqnarray} \sup_i|y_i-\vrx{i}^{\t}\hvb| &\leq& \sup_i|y_i-\vrx{i}^{\t}\loovb{i}|+\sup_i|\vrx{i}^{\t}(\loovb{i}-\hvb)| \nonumber\\ &\leq& \op{\frac{\ln n }{\kappa_l}}+\sup_{i}\|\vrx{i}\|\sup_i\|\loovb{i}-\hvb\| \nonumber\\ &=& \op{\frac{\plog(n)}{\kappa_l^{\rho+2}}} . \nonumber \end{eqnarray} \subsection{Proof of Lemma \ref{LEM:TAIL}}\label{sec:tail} \begin{equation} \label{eq:tail_bound_add_eq_eq1} \begin{split} \lefteqn{\text{Pr}\left(\sup_i\left|\vx_i^{\t}\vGamma_i\vx_i\right|\geq t\right)} \\ &= \text{Pr}\left(\sup_i\left|\vx_i^{\t}\vGamma_i\vx_i-\frac{1}{n}\text{Tr}(\vGamma_i)\right|\geq t,\ \sup_i\sigma_{\max}(\vGamma_i)\leq C_n\right) \\ &\quad +\text{Pr}\left(\sup_i\left|\vx_i^{\t}\vGamma_i\vx_i-\frac{1}{n}\text{Tr}(\vGamma_i)\right|\geq t,\ \sup_i\sigma_{\max}(\vGamma_i)\geq C_n\right) \\ &\leq \sum_{i=1}^n\text{Pr}\left(\left|\vx_i^{\t}\vGamma_i\vx_i-\frac{1}{n}\text{Tr}(\vGamma_i)\right|\geq t,\ \sup_i\sigma_{\max}(\vGamma_i)\leq C_n\right)+\text{Pr}\left(\sup_i\sigma_{\max}(\vGamma_i)\geq C_n\right) \\ &\leq \sum_{i=1}^n\text{Pr}\left(\left|\vx_i^{\t}\vGamma_i\vx_i-\frac{1}{n}\text{Tr}(\vGamma_i)\right|\geq t,\ \sigma_{\max}(\vGamma_i)\leq C_n\right)+\text{Pr}\left(\sup_i\sigma_{\max}(\vGamma_i)\geq C_n\right) \\ &\leq \sum_{i=1}^n\text{Pr}\left(\left|\vx_i^{\t}\vGamma_i\vx_i-\frac{1}{n}\text{Tr}(\vGamma_i)\right|\geq t \Big| \sigma_{\max}(\vGamma_i)\leq C_n\right)+\text{Pr}\left(\sup_i\sigma_{\max}(\vGamma_i)\geq C_n\right) . \end{split} \end{equation} Hence, we just need to bound $\left|\vx_i^{\t}\vGamma_i\vx_i-\frac{1}{n}\text{Tr}(\vGamma_i)\right|$ individually given that $\sigma_{\max}(\vGamma_i)\leq C_n$. For simplicity, we will focus on $\vx=\vx_1$ and $\vGamma=\vGamma_1$ and let $\sigma_i$ be the eigenvalues of $\vGamma$ in a non-increasing order. Since $\vx$ is a Gaussian vector independent of $\vGamma$, we have \[ \vx^{\t}\vGamma^{-1}\vx\big| \vGamma \ \stackrel{d}{=}\ \frac{1}{n}\sum_{i=1}^p \sigma_{i} u_i \big|\vGamma , \] where $u_i$ here are i.i.d.~standard chi-square random variables. Hence, by \cite{laurent2000adaptive}[Lemma 1], we have \begin{eqnarray} \text{Pr}\left(\sum_{i=1}^p \sigma_{i}(u_i-1)\geq 2\sigma_{\max}(\vGamma)(\sqrt{np\epsilon}+2n\epsilon)\Big| \vGamma \right) &\leq& e^{-n\epsilon} \nonumber\\ \text{Pr}\left(\sum_{i=1}^p \sigma_{i}(u_i-1)\leq -2\sigma_{\max}(\vGamma)\sqrt{np\epsilon})\Big| \vGamma \right) &\leq& e^{-n\epsilon} . \nonumber \end{eqnarray} Note that $\sum_{i=1}^p\sigma_{i}=\text{Tr}{\vGamma}$, we have for all $\epsilon \in (0,1)$, \begin{eqnarray} \text{Pr}\left(\left|\vx^{\t}\vGamma\vx-\frac{1}{n}\text{Tr}(\vGamma)\right|\geq 4\sigma_{\max}(\vGamma)\sqrt{\epsilon} \Big| \vGamma \right) &\leq& 2e^{-n\epsilon} . \nonumber \end{eqnarray} Hence, with \eqref{eq:tail_bound_add_eq_eq1}, we have \begin{eqnarray} \text{Pr}\left(\sup_i\left|\vx_i^{\t}\vGamma_i\vx_i\right|\geq \frac{4C_n \ln n}{\sqrt{n}} \right) &\leq& 2ne^{-\ln n^2}+\delta \ \leq\ \frac{2}{n}+\delta . \nonumber \end{eqnarray} This completes the proof of this lemma. \subsection{Proof of Lemma \ref{lem:replace}}\label{sec:replace} Using Lemma \ref{lem:MIL}, we have \begin{eqnarray} \lefteqn{\sup_i|\frac{1}{n}\text{Tr}(\tilde{\vA}_{c,i}^{-1})-\frac{1}{n}\text{Tr}(\tilde{\vA}_i^{-1})| = \sup_i\frac{c_3}{n}\left|\text{Tr}( \tilde{\vA}_i^{-1}(\vI+c_3 \tilde{\vA}_i^{-1})^{-1}\tilde{\vA}_i^{-1})\right|} \nonumber\\ &\leq& c_3 \sup_i\max_{\|\vu\|\leq1}\left|\vu^{\t} \tilde{\vA}_i^{-1}(\vI+c_3 \tilde{\vA}_i^{-1})^{-1}\tilde{\vA}_i^{-1}\vu\right| \nonumber\\ &\leq& c_3 \sup_{i,\|\vu\|\leq 1}\|\tilde{\vA}_i^{-1}\vu\|^2\cdot \max_{\|\vu\|\leq1}\left|\vu^{\t}(\vI+c_3 \tilde{\vA}_i^{-1})^{-1}\vu\right| \leq \op{\frac{c_3}{\kappa_l^2}} , \nonumber \end{eqnarray} where the last inequality is due to the fact that minimal eigenvalue of $\tilde{\vA}_i$ is at least $\Omega_p\left(\kappa_l\right)$ from \eqref{eq:lowerbound_example_eq1}. \subsection{Proof of Proposition \ref{thm:looo}}\label{sec:looo} It is straightforward to see that $\loovb{i}$ satisfies \begin{eqnarray} \boldsymbol{0} &=& -\vX^{\t}l'(\vy-\vX\loovb{i})+l'(y_i-\vrx{i}^{\t}\loovb{i})\vrx{i}+\lambdaR'(\loovb{i}) . \label{eq:ithout} \end{eqnarray} Recall the definition of $\tilde{\vA}_i$, i.e., \[ \tilde{\vA}_i \= \vX^{\t}\text{diag}{\fl''(\vy-\vX\loovb{i})}\vX+\lambda\text{diag}{R''(\loovb{i})}-l''(y_i-\vrx{i}^{\t}\loovb{i})\vrx{i}\vrx{i}^{\t} . \] Note that according to \eqref{eq:lowerbound_example_eq1}, the inverse of $\tilde{\vA}_i$ exists and thus all values are well defined in the theorem. For a given $i$, let $\tilde{r}_i$ be the minimizer of the following optimization: \[ \tilde{r}_i := \argmin_{r} \frac{1}{2}(r-y_i+\vrx{i}^{\t}\loovb{i})^2+\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i} l(r). \] By Assumption O.\ref{ass:Convex}, we know this is a convex optimization and hence $\tilde{r}_i$ is unique and satisfies the following equation: \begin{eqnarray} \tilde{r}_i &=& y_i-\vrx{i}^{\t}\loovb{i}-l'(\tilde{r}_i)\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i} . \label{eq:tri} \end{eqnarray} Now, let \begin{eqnarray} \lootvb{i} &=& \loovb{i}+l'(\tilde{r}_i)\tilde{\vA}_i^{-1}\vrx{i} . \label{eq:tovb} \end{eqnarray} Then, by plugging \eqref{eq:tovb} in \eqref{eq:tri} we have \begin{eqnarray} \tilde{r}_i &=& y_i-\vrx{i}^{\t}\lootvb{i} . \label{eq:tri2} \end{eqnarray} The important feature of $ \lootvb{i}$ is that if we plug \eqref{eq:tri2} in \eqref{eq:tovb}, then we will obtain \[ \loovb{i} \= \lootvb{i}-l'(y_i-\vrx{i}^{\t}\lootvb{i})\tilde{\vA}_i^{-1}\vrx{i} . \] By Taylor expansion for $l'$ at $y_i-\vrx{i}^{\t}\hvb$, we have \[ \loovb{i} \= \hvb-l'(y_i-\vrx{i}^{\t}\hvb)\tilde{\vA}_i^{-1}\vrx{i}+\tvepsilon^i , \] where \[ \tvepsilon^i \= (\vI+l''(y_i-\vrx{i}^{\t}\vbeta^i_{\xi_i})\tilde{\vA}_i^{-1}\vrx{i}\vrx{i}^{\t})(\lootvb{i}-\hvb) , \] with $\vbeta^i_{\xi_i}=\xi_i\lootvb{i}+(1-\xi_i)\hvb$ for some $\xi_i\in [0,1]$. So far, we have obtained an expression for $\tvepsilon^i$. Next, we want to bound $\sup_i\|\tvepsilon^i\|$. Note that \begin{eqnarray} \sup_i\|\tvepsilon^i\| &\leq& \sup_i\|\lootvb{i}-\hvb\|\left(1+l''(y_i-\vrx{i}^{\t}\vbeta^i_{\xi_i})\max_{\|\vu\|=1}\sqrt{\vu^{\t}\vrx{i}\vrx{i}^{\t}\tilde{\vA}_i^{-1}\tilde{\vA}_i^{-1}\vrx{i}\vrx{i}^{\t}\vu}\right) . \nonumber \end{eqnarray} Hence, \begin{equation} \label{eq:tvepsilon_eq1_p1} \begin{split} \frac{\sup_i\|\tvepsilon^i\|}{\sup_i\|\lootvb{i}-\hvb\|} &\stackrel{\text{(i)}}{\leq} \left(1+\op{1+\max\{|\tilde{r}_i|^{\rho},|y_i-\vrx{i}^{\t}\hvb|^{\rho}\}}\cdot \sup_i\|\vrx{i}\| \cdot \sup_i\|\tilde{\vA}_i^{-1}\vrx{i}\|\right) \\ &\stackrel{\text{(ii)}}{\leq} \left(1+\op{1+\max\{|\tilde{r}_i|^{\rho},|y_i-\vrx{i}^{\t}\hvb|^{\rho}\}}\cdot \sup_i\|\vrx{i}\|^2\cdot \op{\frac{1}{\kappa_l}}\right) \\ &\stackrel{\text{(iii)}}{\leq} \left(1+\op{1+\max\{|\tilde{r}_i|^{\rho},|y_i-\vrx{i}^{\t}\hvb|^{\rho}\}}\cdot \op{\frac{1}{\kappa_l}}\right) , \end{split} \end{equation} where Inequality (i) is due to Assumption O.\ref{ass:Smoothness2}, Inequality (ii) holds due to \eqref{eq:lowerbound_example_eq1} and Inequality (iii) is due to Lemma \ref{lem:xwnorm}. To bound $|\tilde{r}_i|$, let us define $U(r) = r+l'(r)\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}$, then we have $U'(r)>1$ and $U(\tilde{r}_i) = y_i-\vrx{i}^{\t}\loovb{i}$ due to \eqref{eq:tri}. Hence, we have \begin{eqnarray} |y_i-\vrx{i}^{\t}\loovb{i}| &=& |U(\tilde{r}_i)| \= \left|U(0)+\int_0^{\tilde{r}_i}U'(r)\dif r\right| \nonumber\\ &\geq& \left|\int_0^{\tilde{r}_i}U'(r)\dif r\right|-|U(0)| \ \geq \ |\tilde{r}_i|-|l'(0)|\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i} . \nonumber \end{eqnarray} Due to \eqref{eq:lowerbound_example_eq1} and Lemma \ref{lem:xwnorm}, we have $\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}= \op{1/\kappa_l}$ and thus \begin{eqnarray} \sup_i|\tilde{r}_i| \ \in\ \left[0,\sup_i|y_i-\vrx{i}^{\t}\loovb{i}|+\op{\frac{1}{\kappa_l}}\right] . \label{eq:suptri} \end{eqnarray} Therefore, by \eqref{eq:tvepsilon_eq1_p1}, \eqref{eq:suptri} and Lemma \ref{lem:supnormDi}, we have \begin{eqnarray} \sup_i\|\tvepsilon^i\| &\leq& \sup_i\|\lootvb{i}-\hvb\|\cdot \op{\frac{\plog(n)}{\kappa_l^{\rho+3}}} . \nonumber \end{eqnarray} Hence, to bound $\sup_i\|\tvepsilon^i\|$, we should show that \begin{eqnarray} \sup_i\|\lootvb{i}-\hvb\| &\leq& \op{\frac{\plog(n) }{n^{\frac{\alpha}{2}}\cdot \kappa_l^{8\rho+7}}} . \label{eq:suptovbhvb} \end{eqnarray} Let \begin{eqnarray} L(\vbeta) \= -\vX^{\t}l'(\vy-\vX\vbeta)+\lambdaR'(\vbeta) . \label{eq:defL_eq1} \end{eqnarray} From \eqref{eq:full}, we know that \[ L(\hvb) \= \boldsymbol{0} . \] Note that the Jacobian matrix of $L(\vbeta)$ is \[ \vX^{\t}\text{diag}{\fl''(\vy-\vX\vbeta)}\vX+\lambda\text{diag}{R''(\vbeta)}, \] and by Lemma \ref{lem:minev} and Assumption O.\ref{ass:Smoothness}, its minimum eigenvalue is at least $\Omega_p(\kappa_l)$. Hence, we have \begin{equation} \label{eq:L111} \begin{split} \sup_i\|\hvb-\lootvb{i}\| &\leq \op{\frac{1}{\kappa_l}}\cdot \sup_i\|L(\lootvb{i})-L(\hvb)\| \\ &= \op{\frac{1}{\kappa_l}} \cdot \sup_i\|L(\lootvb{i})\| . \\ \end{split} \end{equation} Therefore, we just need to show that \[ \sup_i\|L(\lootvb{i})\| \ \leq\ \op{\frac{\plog(n) }{n^{\frac{\alpha}{2}}\cdot \kappa_l^{8\rho+6}}} . \] Note that, we have \begin{equation} \label{eq:revision_add_eq1} \begin{split} \lefteqn{L(\lootvb{i})\=-\vX^{\t}l'(\vy-\vX\lootvb{i})+\lambdaR'(\lootvb{i})} \\ &\stackrel{\text{(i)}}{=} -l'(\tilde{r}_i)\vrx{i}-\sum_{j\neq i}(l'(y_j-\vrx{j}^{\t}\lootvb{i})-l'(y_j-\vrx{j}^{\t}\loovb{i}))\vrx{j}+\lambda (R'(\lootvb{i})-R'(\loovb{i})) \\ &\stackrel{\text{(ii)}}{=} -l'(\tilde{r}_i)\vrx{i}-\sum_{j\neq i}l''(y_j-\vrx{j}^{\t}\vbeta^{i}_{\xi_{i,j}})\vrx{j}\vrx{j}^{\t}(\lootvb{i}-\loovb{i})+\lambda\text{diag}{R''(\vbeta^i_{\vxi'})}(\lootvb{i}-\loovb{i}) \\ &= -l'(\tilde{r}_i)\vrx{i}+\left(\sum_{j\neq i}l''(y_j-\vrx{j}^{\t}\loovb{i})\vrx{j}\vrx{j}^{\t}+\lambda \text{diag}{R''(\loovb{i})}\right)(\lootvb{i}-\loovb{i}) \\ &\quad -\sum_{j\neq i}\left(l''(y_j-\vrx{j}^{\t}\vbeta^{i}_{\xi_{i,j}})-l''(y_j-\vrx{j}^{\t}\loovb{i})\right)\vrx{j}\vrx{j}^{\t}(\lootvb{i}-\loovb{i}) \\ &\quad +\lambda\text{diag}{R''(\vbeta^i_{\vxi'})-R''(\loovb{i})}(\lootvb{i}-\loovb{i}) \\ &\stackrel{\text{(iii)}}{=} -\sum_{j\neq i}\left(l''(y_j-\vrx{j}^{\t}\vbeta^{i}_{\xi_{i,j}})-l''(y_j-\vrx{j}^{\t}\loovb{i})\right)\vrx{j}\vrx{j}^{\t}(\lootvb{i}-\loovb{i}) \\ &\quad +\lambda\text{diag}{R''(\vbeta^i_{\vxi'})-R''(\loovb{i})}(\lootvb{i}-\loovb{i}) , \end{split} \end{equation} where $\vbeta^i_{\xi_{i,j}}=\xi_{i,j}\lootvb{i}+(1-\xi_{i,j})\loovb{i}, \ve_j^{\t}\vbeta^i_{\vxi'}=\xi'_{i,j}\lootb{i}_j+(1-\xi'_{i.j})\loob{i}_j$ for some $\xi_{i,j}, \xi'_{i,j}\in [0,1]$, and Equality (i) is due to \eqref{eq:ithout} and \eqref{eq:tri2}, Equality (ii) is obtained from a Taylor expansion and Equality (iii) holds due to \eqref{eq:tovb}. Next, let $\vu^{\backslash i}\in \bbR^{n-1}$ be the vector defined by the following: \begin{eqnarray} \ve_j^{\t}\vu^{\backslash i}=\left\{\begin{aligned} &\left(l''(y_j-\vrx{j}^{\t}\vbeta^{i}_{\xi_{i,j}})-l''(y_j-\vrx{j}^{\t}\loovb{i})\vrx{j}^{\t}\right)(\lootvb{i}-\loovb{i}), &&j\in [1,i-1]\\ &\left(l''(y_{j+1}-\vrx{j+1}^{\t}\vbeta^{i}_{\xi_{i,j+1}})-l''(y_{j+1}-\vrx{j+1}^{\t}\loovb{i})\vrx{j+1}^{\t}\right)(\lootvb{i}-\loovb{i}), &&j\in[i,n-1] \end{aligned}\right. \nonumber. \end{eqnarray} Then, by Assumption O.\ref{ass:Holder}, we known each component of $\vu^{\backslash i}$ is upper bounded by the following: \begin{eqnarray} \sup_j|\ve_j^{\t}\vu^{\backslash i}| &\leq& \sup_{i,j}\left|\left(l''(y_j-\vrx{j}^{\t}\vbeta^{i}_{\xi_{i,j}})-l''(y_j-\vrx{j}^{\t}\loovb{i})\right)\vrx{j}^{\t}(\lootvb{i}-\loovb{i})\right| \nonumber\\ &\leq& C_r\left|\vrx{j}^{\t}(\lootvb{i}-\loovb{i})\right|^{1+\alpha} . \nonumber \end{eqnarray} Also, by Assumption O.\ref{ass:Holder}, we have \begin{eqnarray} \sup_{i}\left|R''(\vbeta^i_{\vxi'})-R''(\loovb{i})\right| &\leq& C_r\left|\ve_j^{\t}(\lootvb{i}-\loovb{i})\right|^{\alpha} . \ \end{eqnarray} Hence, with \eqref{eq:revision_add_eq1}, we have \begin{equation} \label{eq:revision_add_eq3} \begin{split} \lefteqn{\sup_i\|L(\lootvb{i})\|} \\ &\leq \sup_i \|\vX_{/i}\vu^{\backslash i}\| + \lambda \sup_i\left|R''(\vbeta^i_{\vxi'})-R''(\loovb{i})\right| \cdot \sup_i\|\lootvb{i}-\loovb{i}\| \\ &\stackrel{\text{(i)}}{\leq} \op{1}\cdot \sup_i \|\vu^{\backslash i}\|+\lambda\sqrt{p}\sup_{i,j}\left|C_r\left(\ve_j^{\t}(\lootvb{i}-\loovb{i})\right)^{1+\alpha}\right| \\ &\leq \op{1}\cdot \sqrt{n}\sup_{j\neq i}\left|C_l\left(\vrx{j}^{\t}(\lootvb{i}-\loovb{i})\right)^{1+\alpha}\right|+ \lambda\sqrt{p}\sup_{i,j}\left|C_r\left(\ve_j^{\t}(\lootvb{i}-\loovb{i})\right)^{1+\alpha}\right| , \end{split} \end{equation} where inequality (i) is due Lemma \ref{lem:minev}. Next, we claim that \begin{equation} \label{eq:suptovbij} \begin{split} \sup_{i,j}|\ve_j ^{\t}(\lootvb{i}-\loovb{i})| &= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l^{4\rho+3}}} \\ \sup_{j\neq i}|\vrx{j}^{\t} (\lootvb{i}-\loovb{i})| &= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l^{4\rho+3}}} . \end{split} \end{equation} If these two claims are true, from \eqref{eq:revision_add_eq3} we have \begin{eqnarray} \sup_i\|L(\lootvb{i})\| &\leq& \op{\frac{\plog(n) }{n^{\frac{\alpha}{2}}\cdot \kappa_l^{8\rho+6}}} , \nonumber \end{eqnarray} which completes the proof of \eqref{eq:suptovbhvb}. To show \eqref{eq:suptovbij}, by \eqref{eq:tovb} and Assumption O.\ref{ass:Smoothness2}, we have \begin{eqnarray} \sup_{i,j}|\ve_j ^{\t}(\lootvb{i}-\loovb{i})| &=& \sup_{i,j} |l'(\tilde{r}_i)\ve_j^{\t}\tilde{\vA}_i^{-1}\vrx{i}| \nonumber\\ &\leq& \op{1+\sup_{i}|\tilde{r}_i|^{\rho+1}} \cdot \sup_{i,j}|\ve_j^{\t}\tilde{\vA}_i^{-1}\vrx{i}| , \nonumber \end{eqnarray} and \begin{eqnarray} \sup_{j\neq i}|\vrx{j}^{\t} (\lootvb{i}-\loovb{i})| &=& \sup_{j\neq i} |l'(\tilde{r}_i)\vrx{j}^{\t}\tilde{\vA}_i^{-1}\vrx{i}| \nonumber\\ &\leq& \op{1+\sup_{i} |\tilde{r}_i|^{\rho+1}} \cdot \sup_{j\neq i}|\vrx{j}^{\t}\tilde{\vA}_i^{-1}\vrx{i}| . \nonumber \end{eqnarray} Then, by \eqref{eq:suptri} and Lemma \ref{lem:supnormDi}, we have \begin{equation} \label{eq:suptovbij12} \begin{split} \sup_{i,j}|\ve_j ^{\t}(\lootvb{i}-\loovb{i})| &\leq \op{\frac{\plog(n)}{\kappa_l^{(\rho+2)(\rho+1)}}}\cdot \sup_{i,j}|\ve_j^{\t}\tilde{\vA}_i^{-1}\vrx{i}| ,\\ \sup_{i\neq j}|\vrx{j} ^{\t}(\lootvb{i}-\loovb{i})| &\leq \op{\frac{\plog(n)}{\kappa_l^{(\rho+2)(\rho+1)}}}\cdot \sup_{i\neq j}|\vrx{j}^{\t}\tilde{\vA}_i^{-1}\vrx{i}| . \end{split} \end{equation} Since $\vrx{j}$ (for $j \neq i$) and $\tilde{\vA}_i$ is independent of $\vrx{i}$, we have \begin{eqnarray} \ve_j^{\t}\tilde{\vA}_i^{-1}\vrx{i}\Big| \tilde{\vA}_i &\ \stackrel{d}{=}\ & \mathcal{N}(0,\frac{\|\tilde{\vA}_i^{-1}\ve_j\|^2}{n}) , \ \forall i,j \nonumber\\ \vrx{j}^{\t}\tilde{\vA}_i^{-1}\vrx{i}\Big| \tilde{\vA}_i,\vrx{j} &\ \stackrel{d}{=}\ & \mathcal{N}(0,\frac{\|\tilde{\vA}_i^{-1}\vrx{j}\|^2}{n}) , \ \forall \ j\neq i . \nonumber \end{eqnarray} Recall that the minimal eigenvalue of $\tilde{\vA}_i$ is at least $\kappa_l\sigma_{\delta}$ due to \eqref{eq:lowerbound_example_eq1}. Hence, we have \begin{eqnarray} \lefteqn{\text{Pr}\left(\sup_{i,j}|\ve_j^{\t}\tilde{\vA}_i^{-1}\vrx{i}|> \epsilon\right)} \nonumber\\ &\leq& \sum_{i,j}\text{Pr}\left(|\ve_j^{\t}\tilde{\vA}_i^{-1}\vrx{i}|> \epsilon\Big| \sup_{i,j}\|\ve_j^{\t}\tilde{\vA}_i^{-1}\|\leq \frac{1}{\kappa_l\sigma_{\delta}}\right)+\text{Pr}\left(\sup_{i,j}\|\ve_j^{\t}\tilde{\vA}_i^{-1}\|> \frac{1}{\kappa_l\sigma_{\delta}}\right) \nonumber\\ &\leq& \sqrt{\frac{2}{\pi}}n^2 e^{-\frac{\epsilon^2n\sigma_{\delta}^2\kappa_l^2}{2}}+o(1) , \nonumber \end{eqnarray} and together with Lemma \ref{lem:xwnorm}, we have \begin{eqnarray} \lefteqn{\text{Pr}\left(\sup_{i\neq j}|\vrx{j}^{\t}\tilde{\vA}_i^{-1}\vrx{i}|> \epsilon\right)} \nonumber\\ &\leq& \sum_{i,j}\text{Pr}\left(|\vrx{j}^{\t}\tilde{\vA}_i^{-1}\vrx{i}|> \epsilon\Big| \sup_{i,j}\|\vrx{j}^{\t}\tilde{\vA}_i^{-1}\|\leq \frac{2}{\kappa_l\sigma_{\delta}}\right)+\text{Pr}\left(\sup_{i, j}\|\vrx{j}^{\t}\tilde{\vA}_i^{-1}\|> \frac{2}{\kappa_l\sigma_{\delta}}\right) \nonumber\\ &\leq& \sqrt{\frac{2}{\pi}}n^2 e^{-\frac{\epsilon^2n\sigma_{\delta}^2\kappa_l^2}{8}}+o(1) , \nonumber \end{eqnarray} Hence, we have \[ \sup_{i,j}|\ve_j^{\t}\tilde{\vA}_i^{-1}\vrx{i}| \= \op{\frac{1}{\kappa_l\sqrt{n}}} \quad \text{and} \quad \sup_{j\neq i}|\vrx{j}^{\t}\tilde{\vA}_i^{-1}\vrx{i}| \= \op{\frac{1}{\kappa_l\sqrt{n}}} . \] Therefore, if we plug these two equations in \eqref{eq:suptovbij12}, then obtain \eqref{eq:suptovbij}. As a result of \eqref{eq:suptovbhvb} and \eqref{eq:suptovbij}, we have for large enough $n$, \[ \sup_{i,j}\left|\ve_j^{\t}(\hvb-\loovb{i})\right| \= \op{\frac{\plog(n) }{n^{\frac{\alpha}{2}}\cdot \kappa_l^{8\rho+7}}} . \] \subsection{Proof of Lemma \ref{lem:ABswitch}}\label{sec:ABswitch} Recall \[ \hat{\vA}_{c,i} \ :=\ \vX^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\vX-l''(y_i-\vrx{i}^{\t}\hvb)\vrx{i}\vrx{i}^{\t}+\lambda \text{diag}{\reg_c''(\hvb)} . \] We first show that \begin{eqnarray} \sup_i\frac{1}{n}|\text{Tr}(\hat{\vA}_{c,i}^{-1}-\hat{\vA}_{c}^{-1})| &=& \op{\frac{\plog(n)}{n\cdot \kappa_l^{3\rho+2}}} . \label{eq:ABswitch1step1} \end{eqnarray} To make the equations more readable in the rest of the proof, we use the simplified notation $\hat{\fl}''_i=l''(y_i-\vrx{i}^{\t}\hvb)$. By Lemma \ref{lem:MIL}, we have \begin{eqnarray} \frac{1}{n}\sup_i\left|\text{Tr}(\hat{\vA}_{c,i}^{-1}-\hat{\vA}_{c}^{-1})\right| &=& \frac{1}{n}\sup_i\left|\text{Tr}(\hat{\vA}_{c,i}^{-1}-(\hat{\vA}_{c,i}+\hat{\fl}''_i\vrx{i}\vrx{i}^{\t})^{-1})\right| \nonumber\\ &=& \frac{1}{n}\sup_i\left|\frac{\hat{\fl}''_i}{1+\hat{\fl}''_i\vrx{i}^{\t}\hat{\vA}_{c,i}^{-1}\vrx{i}}\text{Tr}(\hat{\vA}_{c,i}^{-1}\vrx{i}\vrx{i}^{\t}\hat{\vA}_{c,i}^{-1})\right| \nonumber\\ &=& \frac{1}{n}\sup_i\left|\frac{\hat{\fl}''_i}{1+\hat{\fl}''_i\vrx{i}^{\t}\hat{\vA}_{c,i}^{-1}\vrx{i}}\vrx{i}^{\t}\hat{\vA}_{c,i}^{-2}\vrx{i}\right| \nonumber\\ &\leq& \frac{1}{n}\sup_il''(y_i-\vrx{i}^{\t}\hvb)\sup_i\vrx{i}^{\t}\hat{\vA}_{c,i}^{-2}\vrx{i} . \label{eq:revision_add_eq5} \end{eqnarray} According to Assumption O.\ref{ass:Smoothness2} and Lemma \ref{lem:supnormDi}, we have \[ \sup_il''(y_i-\vrx{i}^{\t}\hvb) \ \leq\ \op{\frac{\plog(n)}{\kappa_l^{3\rho}}} . \] Further, for the minimal eigenvalue of $\hat{\vA}_{c,i}$, we have \begin{equation} \label{eq:lowerbound_example_eqpAc} \begin{split} &\inf_i\sigma_{\min}(\hat{\vA}_{c,i}) \nonumber \\ &= \inf_i\min_{\|\vu\|=1}\vu^{\t}\left(\vX^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\vX-l''(y_i-\vrx{i}^{\t}\hvb)\vrx{i}\vrx{i}^{\t}+\lambda \text{diag}{\reg_c''(\hvb)}\right)\vu \\ &\stackrel{\text{(i)}}{\geq} \inf_i\min_{\|\vu\|=1}\vu^{\t}\left(\vX_{/i}^{\t}\cdot \kappa_l\vI\cdot \vX_{/i}\right)\vu \\ &\stackrel{\text{(ii)}}{\geq} \kappa_l\sigma_{\delta} \= \Omega_p\left(\kappa_l\right) , \\ \end{split} \end{equation} where Inequality (i) is due to the construction of $\reg_c$ in \eqref{eq:def_rc} and Assumption O.\ref{ass:Smoothness}, and Inequality (ii) is due to Lemma \ref{lem:minev}. Hence, with \eqref{eq:revision_add_eq5} and Lemma \ref{lem:xwnorm}, we have \[ \frac{1}{n}\sup_i\left|\text{Tr}(\hat{\vA}_{c,i}^{-1}-\hat{\vA}_{c}^{-1})\right| \ \leq\ \op{\frac{\plog(n)}{n\cdot \kappa_l^{3\rho+2}}} . \] This completes the proof of \eqref{eq:ABswitch1step1}. Now we want to bound $\sup_i\frac{1}{n}|\text{Tr}(\hat{\vA}_{c,i}^{-1}-\tilde{\vA}_{c,i}^{-1})|$. Let $\vDelta^i_{l''}$ and $\vDelta^i_{R''}$ denote two diagonal matrices where $\vDelta^i_{R''}=\text{diag}{R''(\hvb)-R''(\loovb{i})}$ and $j$th diagonal component of $\vDelta^i_{l''}$ is defined by the following: \begin{eqnarray} \ve_j^{\t}\vDelta^i_{l''}\ve_j \ := \ \left\{\begin{aligned} &l''(y_j-\vrx{j}^{\t}\hvb)-l''(y_j-\vrx{j}^{\t}\loovb{i}), &&j\neq i\\ &0, &&j=i \end{aligned}\right. . \nonumber \end{eqnarray} Hence, we have \[ \hat{\vA}_{c,i}-\tilde{\vA}_{c,i} \= \vX^{\t}\vDelta^i_{l''}\vX+\lambda \vDelta^i_{R''} . \] Let $\vDelta^i_{|l''|}$ and $\vDelta^i_{|R''|}$ denote the diagonal matrices that include the absolute values of the element of $\vDelta^i_{l''}$ and $\vDelta^i_{R''}$ respectively. Define \[ \vI_{l''} \= \text{diag}{\tilde{\text{sgn}}(\vDelta^i_{l''})} \quad \text{and} \quad \vI_{R''} \= \text{diag}{\tilde{\text{sgn}}(\vDelta^i_{R''})} , \] where $\tilde{\text{sgn}}$ function is defined as follow: \begin{eqnarray} \tilde{\text{sgn}}(x) &=& \left\{\begin{aligned} &1, && x\geq 0, \\ &-1, && x<0. \end{aligned}\right. \nonumber \end{eqnarray} Hence, we have \[ \vDelta^i_{l''} \= \left(\vDelta^i_{|l''|}\right)^{\frac{1}{2}}\vI_{l''}\left(\vDelta^i_{|l''|}\right)^{\frac{1}{2}} \quad \text{and} \quad \vDelta^i_{R''} \= \left(\vDelta^i_{|R''|}\right)^{\frac{1}{2}}\vI_{R''}\left(\vDelta^i_{|R''|}\right)^{\frac{1}{2}} . \] Then by \eqref{eq:suptovbhvb}, \eqref{eq:suptovbij}, Proposition \ref{thm:looo}, Lemma \ref{lem:xwnorm} and Assumption O.\ref{ass:Holder}, we know that \begin{equation} \label{eq:AB1dif1} \begin{split} \sup_{i,j}|\ve_j^{\t}\vDelta^i_{|l''|}\ve_j| &= \op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{8\rho+7}}} \\ \sup_{i,j}|\ve_j^{\t}\vDelta^i_{|R''|}\ve_j| &= \op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{8\rho+7}}} . \end{split} \end{equation} Then by Matrix Inversion Lemma, we have \begin{eqnarray} \lefteqn{\sup_{i}\frac{1}{n}\left|\text{Tr}\left(\tilde{\vA}_{c,i}^{-1}-\left(\tilde{\vA}_{c,i}+\vX^{\t}(\vDelta^i_{|l''|})^{\frac{1}{2}}\vI_{l''}(\vDelta^i_{|l''|})^{\frac{1}{2}}\vX\right)^{-1}\right)\right|} \nonumber\\ &=& \sup_{i,j}\left|\ve_j^{\t}\left(\tilde{\vA}_{c,i}^{-1}-\left(\tilde{\vA}_{c,i}+\vX^{\t}(\vDelta^i_{|l''|})^{\frac{1}{2}}\vI_{l''}(\vDelta^i_{|l''|})^{\frac{1}{2}}\vX\right)^{-1}\right)\ve_j\right| \nonumber \\ &=& \sup_{i,j}\left|\ve_j^{\t}\tilde{\vA}_{c,i}^{-1}\vX^{\t}(\vDelta^i_{|l''|})^{\frac{1}{2}}\left((\vI^i_{l''})^{-1}+(\vDelta^i_{|l''|})^{\frac{1}{2}}\vX\tilde{\vA}_{c,i}^{-1}\vX^{\t}(\vDelta^i_{|l''|})^{\frac{1}{2}}\right)^{-1}(\vDelta^i_{|l''|})^{\frac{1}{2}}\vX\tilde{\vA}_{c,i}^{-1}\ve_j\right| \nonumber\\ &\leq& \sup_{i,j}\|(\vDelta^i_{|l''|})^{\frac{1}{2}}\vX\tilde{\vA}_{c,i}^{-1}\ve_j\|^2\frac{1}{\inf_i\min\left|\text{eigenvalue of $(\vI^i_{l''})^{-1}+(\vDelta^i_{|l''|})^{\frac{1}{2}}\vX\tilde{\vA}_{c,i}^{-1}\vX^{\t}(\vDelta^i_{|l''|})^{\frac{1}{2}}$}\right|} \nonumber\\ &\leq& \frac{1}{1+o_p(1)}\cdot \sup_i\|(\vDelta^i_{|l''|})^{\frac{1}{2}}\vX\tilde{\vA}_{c,i}^{-1}\ve_j\|^2 \nonumber\\ &\leq& \op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{8\rho+9}}} , \nonumber \\ \label{eq:replaceei1} \end{eqnarray} where the last two inequalities hold due to \eqref{eq:lowerbound_example_eqpAc} and \eqref{eq:AB1dif1}. Similarly, by Matrix Inversion Lemma, we have \begin{equation} \begin{split} \lefteqn{\sup_{i}\frac{1}{n}|\text{Tr}(\hat{\vA}_{c,i}^{-1}-(\hat{\vA}_{c,i}-\lambda \vDelta^i_{R''})^{-1})|} \\ &\leq \sup_{i,j}|\ve_j^{\t}(\hat{\vA}_{c,i}^{-1}-(\hat{\vA}_{c,i}-\lambda \vDelta^i_{R''})^{-1})\ve_j| \label{eq:replaceei2}\\ &= \sup_{i,j}\left|\ve_j^{\t}\hat{\vA}_{c,i}^{-1}(\vDelta^i_{|R''|})^{\frac{1}{2}}\left(\frac{1}{\lambda} \vI_{R''}^{-1}+(\vDelta^i_{|R''|})^{\frac{1}{2}}\hat{\vA}_{c,i}^{-1}(\vDelta^i_{|R''|})^{\frac{1}{2}}\right)^{-1}(\vDelta^i_{|R''|})^{\frac{1}{2}}\hat{\vA}_{c,i}^{-1}\ve_j\right| \\ &\leq \sup_{i,j}\|(\vDelta^i_{|R''|})^{\frac{1}{2}}\hat{\vA}_{c,i}^{-1}\ve_j\|^2\cdot \frac{1}{\inf_{i}\min\left|\text{eigenvalue of $\frac{1}{\lambda} \vI_{R''}^{-1}+(\vDelta^i_{|R''|})^{\frac{1}{2}}\hat{\vA}_{c,i}^{-1}(\vDelta^i_{|R''|})^{\frac{1}{2}}$}\right|} \\ &\leq \frac{1}{1+o_p(1)}\cdot \sup_{i,j}\|(\vDelta^i_{|R''|})^{\frac{1}{2}}\hat{\vA}_{c,i}^{-1}\ve_j\|^2 \\ &\leq \op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{8\rho+9}}} , \end{split} \end{equation} where the last two inequalities hold due to \eqref{eq:lowerbound_example_eqpAc} and \eqref{eq:AB1dif1}. \subsection{Proof for Lemma \ref{lem:G}}\label{sec:G} First note that, by using Assumptions O.\ref{ass:Smoothness}, O.\ref{ass:Smoothness2} and Lemma \ref{lem:supnormDi}, it is straightforward to conclude that \begin{equation} \label{eq:add_G_eq1} \Omega_p\left(\kappa_l\right) \= \inf_i l''(y_i-\vrx{i}^{\t}\hvb) \ \leq\ \sup_il''(y_i-\vrx{i}^{\t}\hvb) \= \op{\frac{\plog(n)}{\kappa_l^{3\rho}}} . \end{equation} Calculating $G'(\theta)$ directly, we have \begin{eqnarray} \left|G'(\theta)\right| &\geq& \dotp{\frac{\hat{\fl}''}{(1+\theta \hat{\fl}'')^2}} \ \geq \ \frac{1}{4}\min\left\{\inf_i \hat{\fl}''_i,\frac{1}{\theta^2\sup_{i}\hat{\fl}''_i}\right\} \nonumber\\ &=& \Omega_p\left(\frac{\kappa_l^{3\rho+1}}{(1+\theta^2)\plog(n)}\right) , \label{eq:g'} \end{eqnarray} where $\hat{\fl}'',\hat{\fl}''_i$ are the shorthands for $l''(\vy-\vX\hvb),l''(y_i-\vrx{i}^{\t}\hvb)$ respectively, and the last inequality is due to \eqref{eq:add_G_eq1}. We remind the reader that as discussed in Section \ref{sec:assume}, this is the only place that Assumption O.\ref{ass:Smoothness} can not be replaced with $\inf_{x\in \bbR} R''(x) \ \geq \ \kappa_l$. However, suppose that we make the following assumption \begin{itemize} \item[O.6] a constant fraction $\gamma$ of the residuals $\{y_i-\vrx{i}^{\t}\hvb\}$ fall in the regions at which the curvature of $\ell$ is lower bounded by $\kappa_l$. \end{itemize} Then, from \eqref{eq:g'} we can lower bound $|G'(\theta)|$ by \[ \left|G'(\theta)\right| \ \geq \ \frac{\dotp{\hat{\fl}''}}{(1+\theta \sup_i\hat{\fl}''_i)^2} \ \geq \ \gamma \frac{\kappa_l^{6\rho+1}}{(1+\theta^2)\plog(n)} . \] Hence, our results will hold even when we replace Assumption O.\ref{ass:Smoothness} by $\inf_{x\in \bbR} R''(x) \ \geq \ \kappa_l$ and Assumption O.6. Back to the proof of Lemma \ref{lem:G}, the next step is to prove that \begin{eqnarray} \left|G(\hat{\theta})-G(\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1}))\right| \= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+16}}}, \label{eq:add_goal_21prime} \end{eqnarray} First note that according to \eqref{eq:thetahateq} we have \begin{eqnarray} G(\hat{\theta}) &=& 1 . \label{eq:onehand} \end{eqnarray} To calculate $G(\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1}))$, let $\hat{\vX}=\text{diag}{\fl''(\vy-\vX\hvb)}^{\frac{1}{2}}\vX$. Define \[ \hat{\vA}_{c,i} \ :=\ \vX^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\vX-l''(y_i-\vrx{i}^{\t}\hvb)\vrx{i}\vrx{i}^{\t}+\lambda \text{diag}{\reg_c''(\hvb)} . \] Using \eqref{eq:add_G_eq1} and the matrix inversion lemma, we have \begin{eqnarray} \frac{1}{n}\text{Tr}(\hat{\vX}\hat{\vA}_c^{-1}\hat{\vX}^{\t}) &=& \frac{1}{n}\sum_{i=1}^n\hat{\fl}''_i\vrx{i}^t\hat{\vA}_c^{-1}\vrx{i} \nonumber\\ &=& \frac{1}{n}\sum_{i=1}^n\hat{\fl}''_i\left(\vrx{i}^{\t}\hat{\vA}_{c,i}^{-1}\vrx{i}-\frac{\hat{\fl}''_i(\vrx{i}^{\t}\hat{\vA}_{c,i}^{-1}\vrx{i})^2}{1+\hat{\fl}''_i\vrx{i}^{\t}\hat{\vA}_{c,i}^{-1}\vrx{i}}\right) \nonumber\\ &=& 1-\dotp{\frac{1}{1+\vrx{i}^{\t}\hat{\vA}_{c,i}^{-1}\vrx{i}\cdot \hat{\fl}''}} \nonumber\\ &\stackrel{\text{(i)}}{=} & 1-\dotp{\frac{1}{1+\vrx{i}^{\t}\tilde{\vA}_{c,i}^{-1}\vrx{i}\cdot \hat{\fl}''}}+\op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{11\rho+9}}} \nonumber\\ &\stackrel{\text{(ii)}}{=}& 1-\dotp{\frac{1}{1+\frac{1}{n}\text{Tr}(\tilde{\vA}_{c,i}^{-1})\cdot \hat{\fl}''}}+\op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{11\rho+9}}} \nonumber\\ &\stackrel{\text{(iii)}}{=}& 1-\dotp{\frac{1}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})\cdot \hat{\fl}''}}+\op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{11\rho+9}}} , \label{eq:xBx} \end{eqnarray} where Equality (ii) is due to Lemma \ref{lem:minev} and the independency between $\vrx{i}$ and $\tilde{\vA}_{c,i}$, Equality (iii) is due to Lemma \ref{lem:ABswitch}, and finally Equality (i) holds because of the following lemma: \begin{lemma}\label{lem:ABswitch2} For large enough $n$, we have \[ \sup_i\left|\vrx{i}^{\t}\hat{\vA}_{c,i}^{-1}\vrx{i}-\vrx{i}^{\t}\tilde{\vA}_{c,i}^{-1}\vrx{i}\right| \= \op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{8\rho+9}}} . \] \end{lemma} \begin{proof} By replacing $\ve_j$ with $\vrx{i}$ in \eqref{eq:replaceei1} and \eqref{eq:replaceei2} and following similar steps as the ones presented in the proof of Lemma \ref{lem:ABswitch} for bounding $\sup_i\frac{1}{n}|\text{Tr}(\hat{\vA}_{c,i}^{-1}-\tilde{\vA}_{c,i}^{-1})|$, we can show that \[ \sup_i|\vrx{i}^{\t}(\hat{\vA}_{c,i}^{-1}-\tilde{\vA}_{c,i}^{-1})\vrx{i}| \ \leq\ \op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{8\rho+9}}} . \] \end{proof} On the other hand, we can calculate $\frac{1}{n}\text{Tr}(\hat{\vX}\hat{\vA}_c^{-1}\hat{\vX}^{\t})$ in a different way. We define \[ \vD\=\left(\lambda \text{diag}{\reg_c''(\hvb)}\right)^{-1}. \] Then we have \begin{eqnarray} \frac{1}{n}\text{Tr}(\hat{\vX}\hat{\vA}_c^{-1}\hat{\vX}^{\t}) &=& \frac{1}{n}\text{Tr}((I+\hat{\vX} \vD\hat{\vX}^{\t})^{-1}\hat{\vX} \vD\hat{\vX}^{\t}) \nonumber\\ &=& \frac{1}{n}\sum_{i=1}^pD_i\hvcx{i}^{\t}(I+\hat{\vX} \vD\hat{\vX}^{\t})^{-1}\hvcx{i} \nonumber\\ &=& \frac{1}{n}\sum_{i=1}^pD_i\hvcx{i}^{\t}(\hat{\vQ}_i+D_i\hvcx{i}\hvcx{i}^{\t})^{-1}\hvcx{i} \nonumber\\ &\stackrel{\text{i}}{=}& \frac{1}{n}\sum_{i=1}^pD_i\hvcx{i}^{\t}\left(\hat{\vQ}_i^{-1}-\frac{D_i\hat{\vQ}_i^{-1}\hvcx{i}\hvcx{i}^{\t}\hat{\vQ}_i^{-1}}{1+D_i\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}}\right)\hvcx{i} \nonumber\\ &=& \frac{p}{n}\cdot \frac{1}{p} \sum_{i=1}^p\frac{D_i\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}}{1+D_i\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}} \nonumber\\ &\stackrel{\text{(ii)}}{=}& \frac{1}{\delta}\dotp{\frac{1}{1+ \frac{\lambda \reg_c''(\hvb)}{\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}}}} , \label{eq:xBx2} \end{eqnarray} where $\hat{\vQ}_i=\vI+\hat{\vX} \vD\hat{\vX}^{\t}-D_i\hvcx{i}\hvcx{i}^{\t}$, and $\hvcx{i}=\text{diag}{\fl''(\vy-\vX\hvb)}^{\frac{1}{2}}\vcx{i}$. Further, Equality (i) is due to Matrix Inversion Lemma and Equality (ii) is due to $D_i=\frac{1}{\lambda \reg_c''(\hat{\beta}_i)}$ by definition. We claim that \begin{lemma}\label{lem:trxbx} For large enough $n$, we have \[ \sup_i\left|\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}-\dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\cdot\hat{\fl}''}}\right| \= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+15}}} . \] \end{lemma} We will prove this lemma in the next section. In the rest of this section, we show how this lemma implies \[ G(\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1}))\=1+\op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+16}}}, \] and therefore with \eqref{eq:onehand}, it completes the proof of Lemma \ref{lem:G}. Note that if Lemma \ref{lem:trxbx} holds, then according to \eqref{eq:xBx2}, we have \begin{eqnarray} \frac{1}{n}\text{Tr}(\hat{\vX}\hat{\vA}_c^{-1}\hat{\vX}^{\t}) &=& \frac{1}{\delta}\dotp{\frac{1}{1+\lambda\dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\hat{\fl}''}}^{-1}\reg_c''(\hvb)}}\nonumber \\ &&+\op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+15}}\cdot \dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\cdot \hat{\fl}''}}^{-1}} \nonumber\\ &\stackrel{\text{(i)}}{=}& \frac{1}{\delta}\dotp{\frac{1}{1+\lambda\dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\hat{\fl}''}}^{-1}\reg_c''(\hvb)}}+\op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+16}}} \nonumber\\ &\stackrel{\text{(ii)}}{=}& \frac{1}{\delta}\dotp{\frac{1}{1+\lambda\dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\hat{\fl}''}}^{-1}R''(\hvb)}}+\op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+16}}} , \label{eq:xBxsecondeq} \end{eqnarray} where Equality (i) holds due to \eqref{eq:upperbound} and \eqref{eq:add_G_eq1}, and Equality (ii) holds due to the construction of $\reg_c$, \eqref{eq:upperbound} and \eqref{eq:add_G_eq1}. Note that we have obtained two different expressions for $\frac{1}{n}\text{Tr}(\hat{\vX}\hat{\vA}_c^{-1}\hat{\vX}^{\t})$ in \eqref{eq:xBx} and \eqref{eq:xBxsecondeq}. By combining the two we obtain \[ G(\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})) \= 1+\op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+16}}} . \] This completes the proof. Hence, the only claim that we have not proved yet is Lemma \ref{lem:trxbx}. This lemma will be proved in the next section. \subsection{Proof of Lemma \ref{lem:trxbx}} Since the proof of this lemma is long, we first mention the roadmap of the proof in Section \ref{ssec:roadmaplemmatxbx} and then present the details in the subsequent sections. \subsubsection{Roadmap of the proof of Lemma \ref{lem:trxbx}}\label{ssec:roadmaplemmatxbx} Note that the goal of this lemma is to connect $\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}$ with $\dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\cdot\hat{\fl}''}}$. In other words, we expect that $\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}$ concentrates around $\dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\cdot\hat{\fl}''}}$ for all different values of $i$. One of the main challenges in proving this concentration is that since in the calculation of $\hat{\vQ}_i^{-1}$, $\hvb$ is used, $\hat{\vQ}_i^{-1}$ is dependent on $\hvcx{i}$. Hence, as the first step in our calculations we find a copy of $\hat{\vQ}_i^{-1}$ from which $\hvcx{i}$ is removed. This requires us to first explain what happens if we remove one of the predictors from our model. Hence, as the first step we study leave-one-predictor-out estimates (LOP) which. We remind the reader that the notations for the leave-one-predictor-out estimate are presented in Section \ref{sec:notation}. \begin{theorem}\label{thm:lopo} Let $\lophvb{i}$ be the original estimate $\hvb$ without $i$th component. Then under Assumptions O.\ref{ass:Convex}-O.\ref{ass:boundhvb}, we have \[ \sup_{i,j}\ve_j^{\t}(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}) \= \op{\frac{\plog(n)}{\kappa_l^{\rho+2}}} , \] and \[ \lopvb{i} \= \lophvb{i}+(b_i-\beta_{0,i})\bar{\vA}_i^{-1}\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\vcx{i}+\bvepsilon^i, \] where \[ \bar{\vA}_i \= \bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\bar {\vX}_{/i}+\lambda \text{diag}{R''(\lopvb{i})} , \] and \[ b_i \= \argmin_{b\in\bbR} \frac{1}{2}\left(b-\beta_{0,i}-\frac{1}{a_i}\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})\right)^2+\frac{\lambda}{a_i}R(b) . \] In the last equation, $a_i$ is defined as \[ a_i \= \vcx{i}^{\t}\left(\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}^{-1}+\lambda\bar {\vX}_{/i}\text{diag}{R''(\lopvb{i})}\bar {\vX}_{/i}^{\t}\right)^{-1}\vcx{i} . \] Moreover, for large enough $n$, \begin{eqnarray} \sup_i\|\bvepsilon^i\| &\=& \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha}{2}}\cdot \kappa_l^{32\rho+7}}}, \nonumber \\ \sup_{i,j}\left|\ve_j^{\t}(\lophvb{i}-\lopvb{i})\right| &\=& \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha}{2}}\cdot \kappa_l^{32\rho+7}}} . \end{eqnarray} \end{theorem} The proof of this theorem is presented in Section \ref{sec:lopo}. Now based on the leave-one-predictor-out estimate, $\lopvb{i}$, we construct a new copy of $\hat{\vQ}_i^{-1}$, called $\bar{\vQ}_i $ in the following way: \[ \bar{\vQ}_i \= \vI+\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}^{1/2}\bar {\vX}_{/i} \bar{\vD}^i\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}^{1/2}, \] where \[ \bar{\vD}^i \= \left(\lambda\text{diag}{R''_c(\lopvb{i})}\right)^{-1} . \] Note that an $\bar{\vQ}_i$ has two major properties: (i) It is independent of $\bvcx{i}$, and (ii) it is close to $\hat{\vQ}_i$. The second property is confirmed in the following lemam: \begin{lemma}\label{lem:q1} Let $\bvcx{i}=\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}^{\frac{1}{2}}\vcx{i}$. Then \[ \sup_i\left|\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}-\bvcx{i}^{\t}\bar{\vQ}_i^{-1}\bvcx{i}\right| \= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+15}}} , \] \end{lemma} The proof of this lemma is presented in Section \ref{sec:q1}. The independence of $\bar{\vQ}_i$ on $\bvcx{i}$ enables us to prove the concentration of $\bvcx{i}^{\t}\bar{\vQ}_i^{-1}\bvcx{i}$; Due to Assumption O.\ref{ass:Smoothness2} and Theorem \ref{thm:lopo}, we have \begin{eqnarray} \sup_{i,j}l''(\ve_j^{\t}(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})) &\leq& \op{\frac{\plog(n)}{\kappa_l^{3\rho}}} . \label{eq:add_trxbx_eq1} \end{eqnarray} Hence, with the facts that $\bar{\vQ}_i$ and $\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})$ are independent of $\vcx{i}$, the minimal eigenvalue of $\bar{\vQ}_i$ is at least $1$ and $\vcx{i}\sim \mathcal{N}(0,\frac{1}{n}\vI)$, we have \begin{eqnarray} \sup_i\left|\bvcx{i}^{\t}\bar{\vQ}_i^{-1}\bvcx{i}-\frac{1}{n}\text{Tr}\left((\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\bar{\vQ}_i^{-1}(\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\right)\right| &=& \op{\frac{\ln n}{\sqrt{n}}\cdot \sup_{i,j}l''(\ve_j^{\t}(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}))} \nonumber\\ &=& \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l^{3\rho}}} , \nonumber \end{eqnarray} where $\bar{\boldsymbol{\fl}}^{i}$ is a short hand for $\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}$. To obtain the first equality we use similar argument as the ones used in the derivation of \eqref{eq:argument1}. Note that even though we have finally proved that $\bvcx{i}^{\t}\bar{\vQ}_i^{-1}\bvcx{i}$ is concentrating, we have not proved that it is concentrating around $\dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\cdot\hat{\fl}''}}$ as required by Lemma \ref{lem:trxbx}. Hence, our last step is to prove \[ \sup_i\left|\frac{1}{n}\text{Tr}\left((\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\bar{\vQ}_i^{-1}(\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\right)-\dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\cdot\hat{\fl}''}}\right|. \] We prove this in two steps. Our next lemma simplifies the expression $\frac{1}{n}\text{Tr}\left((\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\bar{\vQ}_i^{-1}(\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\right)$. \begin{lemma}\label{lem:q2} For large enough $n$, we have \[ \sup_i\left|\frac{1}{n}\text{Tr}\left((\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\bar{\vQ}_i^{-1}(\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\right)-\frac{1}{n} \text{Tr}\left( \text{diag}{\hat{\dfl}''}^{\frac{1}{2}}(I+\hat{\vX} \vD\hat{\vX}^{\t})^{-1}\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\right)\right| \] is at most \[ \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+15}}} . \] \end{lemma} The proof of this lemma is presented in Section \ref{sec:q2}. Finally, we have \[ \sup\left|\frac{1}{n} \text{Tr}\left( \text{diag}{\hat{\dfl}''}^{\frac{1}{2}}(I+\hat{\vX} \vD\hat{\vX}^{\t})^{-1}\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\right)-\dotp{\frac{\hat{\fl}''}{1+\frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})\cdot\hat{\fl}''}}\right| . \] By Matrix Inversion Lemma, Assumption O.\ref{ass:Smoothness} and \eqref{eq:add_trxbx_eq1}, we have \begin{eqnarray} \lefteqn{\frac{1}{n}\text{Tr}\left( \text{diag}{\hat{\dfl}''}^{\frac{1}{2}}(I+\hat{\vX} \vD\hat{\vX}^{\t})^{-1}\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\right)} \nonumber\\ &=& \frac{1}{n}\text{Tr}\left(\text{diag}{\hat{\dfl}''}-\text{diag}{\hat{\dfl}''}\vX\hat{\vA}_c^{-1}\vX^{\t}\text{diag}{\hat{\dfl}''}\right) \nonumber\\ &=& \frac{1}{n}\sum_{i=1}^n\hat{\fl}''_i-\hat{\fl}_i''^2\vrx{i}^{\t}\hat{\vA}_c^{-1}\vrx{i} \nonumber\\ &=& \frac{1}{n}\sum_{i=1}^n\frac{\hat{\fl}_i''}{1+\hat{\fl}_i''\cdot \vrx{i}^{\t}\hat{\vA}_{c,i}^{-1}\vrx{i}} \nonumber\\ &\stackrel{\text{(i)}}{=}& \frac{1}{n}\sum_{i=1}^n\frac{\hat{\fl}_i''}{1+\hat{\fl}_i''\cdot \vrx{i}^{\t}\tilde{\vA}_{c,i}^{-1}\vrx{i}}+\op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{14\rho+9}}} \nonumber\\ &\stackrel{\text{(ii)}}{=}& \frac{1}{n}\sum_{i=1}^n\frac{\hat{\fl}_i''}{1+\hat{\fl}_i''\cdot \frac{1}{n}\text{Tr}(\tilde{\vA}_{c,i}^{-1})}+\op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{14\rho+9}}} \nonumber\\ &\stackrel{\text{(iii)}}{=}& \frac{1}{n}\sum_{i=1}^n\frac{\hat{\fl}_i''}{1+\hat{\fl}_i''\cdot \frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1})}+\op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{14\rho+9}}} , \nonumber \end{eqnarray} where Equality (i) holds due to Lemma \ref{lem:ABswitch2}, Equality (ii) holds due to Lemma \ref{lem:minev} and independency between $\vrx{i}$ and $\tilde{\vA}_{c,i}$, and Equality (iii) holds due to Lemma \ref{lem:ABswitch}. This completes the proof. $\hfill \square$ \subsubsection{Proof of Theorem \ref{thm:lopo}}\label{sec:lopo} First note that by the definition of $\bar{\vA}_i$, we have \begin{equation} \label{eq:lowerbound_example_eq6} \begin{split} \inf_i\sigma_{\min}(\bar{\vA}_i) &= \inf_i\min_{\|\vu\|=1}\vu^{\t}\left(\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\bar {\vX}_{/i}+\lambda \text{diag}{R''(\lopvb{i})}\right)\vu \\ &\stackrel{\text{(i)}}{\geq} \inf_i\min_{\|\vu\|=1}\vu^{\t}\left(\bar {\vX}_{/i}^{\t}\cdot \kappa_l\vI\cdot \bar {\vX}_{/i}\right)\vu \\ &\stackrel{\text{(ii)}}{\geq} \kappa_l\sigma_{\delta} \= \Omega_p\left(\kappa_l\right) , \end{split} \end{equation} where Inequality (i) is due to Assumption O.\ref{ass:Convex} and O.\ref{ass:Smoothness} and Inequality (ii) is due to Lemma \ref{lem:minev}. Hence, the inverse of $\bar{\vA}_i$ exists and the minimal eigenvalue of $\bar{\vA}_i$ is at least $\Omega_p\left(\kappa_l\right)$. Then note that since $\lopvb{i}$ can be considered as the solution for the generalized linear regression problem with data given by $(\bar {\vX}_{/i},\lopvy{i})$, we can follow the same proof of bounding $y_j-\vrx{j}^{\t}\hvb$ in Lemma \ref{lem:supnormDi} and obtain \begin{eqnarray} \sup_{i,j}\ve_j^{\t}(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}) &\leq& \op{\frac{\plog(n)}{\kappa_l^{\rho+2}}} . \label{eq:add_lopo_eq1} \end{eqnarray} To prove the rest of Theorem \ref{thm:lopo}, we first prove the following weaker result: \begin{lemma}\label{lem:weakresult} Under Assumptions O.\ref{ass:Convex}-O.\ref{ass:True}, we have \[ \lopvb{i} \= \lophvb{i}+(-\beta_{0,i})\bar{\vA}_i^{-1}\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\vcx{i}+\bvepsilon^i_{\text{weak}} , \] where \[ \bar{\vA}_i \= \bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\bar {\vX}_{/i}+\lambda \text{diag}{R''(\lopvb{i})} . \] Moreover, for large enough $n$, \begin{equation} \sup_i\|\bvepsilon^i_{\text{weak}}\| \= \op{\frac{\plog(n)}{\kappa_l^{6\rho+3}}} \quad \text{and} \quad \sup_{i,j}\left|\ve_j^{\t}(\lophvb{i}-\lopvb{i})\right| \= \op{\frac{\plog(n)}{\kappa_l^{6\rho+3}}} . \label{eq:add_goal_1} \end{equation} \end{lemma} Before we prove this result, let us explain some of its main features and the role it will play in our overall proof of Theorem \ref{thm:lopo}. First, note that there are two main differences between this result and the proof of Theorem \ref{thm:lopo}. \begin{itemize} \item[(i)] $b_i$ is replaced with $0$. \item[(ii)] Lemma \ref{lem:weakresult} requires $\|\bvepsilon^i_{\text{weak}}\|$ and $\left|\ve_j^{\t}(\lophvb{i}-\lopvb{i})\right|$ to be $\op{\frac{\plog(n)}{\kappa_l^{6\rho+3}}}$ rather than \\ $\op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha}{2}}\cdot \kappa_l^{32\rho+7}}}$ which is required by Theorem \ref{thm:lopo}. \end{itemize} We can use the same strategy to prove both Lemma \ref{lem:weakresult} and Theorem \ref{thm:lopo}. We first prove Lemma \ref{lem:weakresult}. This result helps us bound the value of $b_i$. This bound on $b_i$ will then enable us to prove Theorem \ref{thm:lopo}. Let us define $b_0=0$ and first show the weaker result for $b_0$. Later, we will replace $b_0$ with $b_i$ for $i\geq 1$ and prove Theorem \ref{thm:lopo} at the end of this subsection. \begin{proof}[Proof of Lemma \ref{lem:weakresult}] Define \begin{eqnarray} \loptvb{i} &=& \lopvb{i}-(b_0-\beta_{0,i})\bar{\vA}_i^{-1}\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\vcx{i} , \label{eq:deftovb21} \end{eqnarray} and $\eloptvb{i}$ be $\loptvb{i}$ with $b_0$ inserted at $i$th component, i.e, \begin{eqnarray} \eloptb{i}_j &=& \left\{\begin{aligned} &\loptib{i}_j, && j<i \\ &b_0, && j=i \\ &\loptib{i}_{j-1}, && j>i \end{aligned}\right. . \nonumber \end{eqnarray} Note that \begin{eqnarray} \|\bvepsilon^i_{\text{weak}}\| &\=& \|\lopvb{i} - \lophvb{i}-(-\beta_{0,i})\bar{\vA}_i^{-1}\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\vcx{i}\| \nonumber \\ &=& \|\lopvb{i} - (\lopvb{i} - \loptvb{i} + \lophvb{i} )\|= \|\loptvb{i}-\hvb^{\backslash i}\| \ \leq\ \|\eloptvb{i}-\hvb\| . \end{eqnarray} To bound $\|\bvepsilon^i_{\text{weak}}\|$, we use a trick similar to the one used in the proof of Proposition \ref{thm:looo} in Section \ref{sec:looo}. Define \begin{eqnarray} L(\vbeta) \= -\vX^{\t}l'(\vy-\vX\vbeta)+\lambdaR'(\vbeta) . \label{eq:defL_eq1} \end{eqnarray} Similar to the proof of Proposition \ref{thm:looo} in Section \ref{sec:looo} it is straightforward to show that \begin{equation} \sup_i\|\hvb-\eloptvb{i}\| \ \leq\ \op{\frac{1}{\kappa_l}}\cdot \sup_i\|L(\hvb)-L(\eloptvb{i})\| \= \op{\frac{1}{\kappa_l}}\cdot \sup_i\|L(\eloptvb{i})\| . \label{eq:suptovbhvb21} \end{equation} Hence, we would like to show that \begin{eqnarray} \sup_i\|L(\eloptvb{i})\| &\leq& \op{\frac{\plog(n)}{\kappa_l^{6\rho+2}}} . \label{eq:L21} \end{eqnarray} Toward this goal we first define $L^{\backslash i}(\eloptvb{i})$ the entire $L(\eloptvb{i})$ without its $i$th component, and prove that $\sup_i\|L^{\backslash i}(\eloptvb{i})\|$. Then, we will look at the $\i^{\rm th}$ component of $L(\eloptvb{i})$ and find an upper bound for that component too. \\ \noindent Let us start with bounding $\sup_i\|L^{\backslash i}(\eloptvb{i})\|$. According to the definition of $\lopvb{i}$, we have \begin{eqnarray} -\bar {\vX}_{/i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})+\lambdaR'(\lopvb{i}) &=& \boldsymbol{0} . \label{eq:jthout21} \end{eqnarray} Furthermore, from \eqref{eq:deftovb21} we have \begin{equation} \label{eq:add_lopo_eq21} \begin{split} \boldsymbol{0} &= \bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_0-\beta_{0,i})\vcx{i}\right) \\ &\quad +\lambda \text{diag}{R''(\lopvb{i})}(\loptvb{i}-\lopvb{i}) . \end{split} \end{equation} Hence, \begin{eqnarray} L^{\backslash i}(\eloptvb{i}) &=& -\bar {\vX}_{/i}^{\t}l'\left(\lopvy{i}-\bar {\vX}_{/i}\loptvb{i}-(b_0-\beta_{0,i})\vcx{i}\right)+\lambda R'(\loptvb{i}) \nonumber\\ &=& \bar {\vX}_{/i}^{\t}\left(l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})-l'\left(\lopvy{i}-\bar {\vX}_{/i}\loptvb{i}-(b_0-\beta_{0,i})\vcx{i}\right)\right)-\lambda\left(R'(\lopvb{i})- R'(\loptvb{i})\right) \nonumber\\ &=& \bar {\vX}_{/i}^{\t}\text{diag}{\fl''\left(\vbeta_{\Xi}\right)}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_0-\beta_{0,i})\vcx{i}\right)+\lambda \text{diag}{R''(\vbeta^i_{\vxi'})}(\loptvb{i}-\lopvb{i}) \nonumber\\ &=& \bar {\vX}_{/i}^{\t}\text{diag}{\fl''\left(\vbeta_{\Xi}\right)-\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_0-\beta_{0,i})\vcx{i}\right) \nonumber\\ && +\lambda \text{diag}{R''(\vbeta^i_{\vxi'})-R''(\lopvb{i})}(\loptvb{i}-\lopvb{i}). \nonumber \end{eqnarray} In these equations, we have used the definitions $\vbeta_{\Xi}=\lopvy{i}-(\Xi\bar {\vX}_{/i}\loptvb{i}+(I-\Xi)\bar {\vX}_{/i}\lopvb{i})-\Xi(b_0-\beta_{0,i})\vcx{i}$, $\Xi=\text{diag}{\xi_1,\cdots \xi_n}$ and $\beta^i_{\vxi',j}=\xi'_j\loptib{i}_j+(1-\xi'_j)\lopb{i}_j$ for some $\xi_j,\xi'_j\in [0,1]$. Furthermore, to obtain the last equality we have used \eqref{eq:add_lopo_eq21}. By Assumption O.\ref{ass:Holder} and Lemma \ref{lem:minev} with similar proof for \eqref{eq:revision_add_eq3}, we have \begin{equation} \begin{split} \sup_i\|L^{\backslash i}(\eloptvb{i})\| &\leq \op{4\delta}\cdot \sqrt{n}\sup_{i,j}C_l\left|\ve_j^{\t}\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_0-\beta_{0,i})x_{ij}\right|^{1+\alpha} \\ &\quad +\lambda\sqrt{p}\sup_{i,j}C_r\left|\loptib{i}_j-\lopb{i}_j\right|^{1+\alpha} \nonumber \end{split} \end{equation} Our next goal is to show that \begin{subequations} \begin{align} \sup_{i,j}|\ve_j^{\t}\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})| &\= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l^{3\rho+1}}\sup_i|b_0-\beta_{0,i}|} , \label{eq:suptovbijeq21}\\ \sup_{i,j}|\loptib{i}_j-\lopb{i}_j| &\= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l^{3\rho+1}}\sup_i|b_0-\beta_{0,i}|} . \label{eq:suptovbijeq31} \end{align} \end{subequations} Note that if we prove these two claims, then we can combine them with Lemma \ref{lem:xwnorm} and obtain \begin{equation}\label{eq:add_lopo_1_eq1} \sup_i\|L^{\backslash i}(\eloptvb{i})\| \leq \op{\frac{\plog(n)}{n^{\frac{\alpha}{2}}}\cdot \frac{\sup_i|b_0-\beta_{0,i}|^{1+\alpha}}{\kappa_l^{6\rho+2}}}. \end{equation} Since $b_0=0$, according to Lemma \ref{lem:xwnorm}, $\sup_i|b_0-\beta_{0,i}|=\op{\plog(n)}$, which proves an upper bound for $\sup_i\|L^{\backslash i}(\eloptvb{i})\|$. Hence, let us discuss how \eqref{eq:suptovbijeq21} and \eqref{eq:suptovbijeq31} can be proved. To prove these equations, note that, by \eqref{eq:deftovb21}, we just need to show \begin{equation} \label{eq:add_lopo_1_eq4} \begin{split} \sup_{i,j}\left|\ve_j^{\t}\bar {\vX}_{/i}\bar{\vA}_i^{-1}\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\vcx{i}\right| &= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l^{3\rho+1}}} , \\ \sup_{i,j}\left|\ve_j^{\t}\bar{\vA}_i^{-1}\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\vcx{i}\right| &= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l^{3\rho+1}}} . \end{split} \end{equation} We use a technique similar to the one used for proving \eqref{eq:suptovbij} in Section \ref{sec:looo}. Recall that, according to \eqref{eq:lowerbound_example_eq6}, the minimal eigenvalue of $\bar{\vA}_i$ is $\Omega_p\left(\kappa_l\right)$. Hence, with Lemma \ref{lem:minev}, \eqref{eq:add_lopo_eq1} and Assumption O.\ref{ass:Smoothness2}, we have \begin{eqnarray} \sup_{i,j}\left\|\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\bar {\vX}_{/i}\bar{\vA}_i^{-1}\bar {\vX}_{/i}^{\t}\ve_j\right\| &\leq& \op{\frac{1}{\kappa_l}}\cdot \sup_{i,j}l''(\lopy{i}_j-\ve_j^{\t}\bar {\vX}_{/i}\lopvb{i}) \nonumber\\ &\leq& \op{\frac{\plog(n)}{\kappa_l^{3\rho+1}}} , \nonumber\\ \sup_{i,j}\left\|\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\bar {\vX}_{/i}\bar{\vA}_i^{-1}\ve_j\right\| &\leq& \op{\frac{1}{\kappa_l}} \cdot \sup_{i,j}l''(\lopy{i}_j-\ve_j^{\t}\bar {\vX}_{/i}\lopvb{i}) \nonumber\\ &\leq& \op{\frac{\plog(n)}{\kappa_l^{3\rho+1}}} . \nonumber \end{eqnarray} Then, since $\vcx{i}$ is independent of $\lopvy{i},\lopvb{i},\bar {\vX}_{/i}$ and $\bar{\vA}_i$, we conclude that \eqref{eq:add_lopo_1_eq4} holds, which in turn implies \eqref{eq:suptovbijeq21} and \eqref{eq:suptovbijeq31}. Now let us find an upper bound for the $i^{\rm th}$ component of $L(\eloptvb{i})$ denoted as $L_i(\eloptvb{i})$. By Taylor expansion, we have \begin{equation} \label{eq:add_lopo_1_eq2} \begin{split} L_{i}(\eloptvb{i}) &= -\vcx{i}^{\t}l'\left(\lopvy{i}-\bar {\vX}_{/i}\loptvb{i}-(b_0-\beta_{0,i})\vcx{i}\right)+\lambda R'(b_0) \\ &= -\vcx{i}^{\t}l'\left(\lopvy{i}-\bar {\vX}_{/i}\loptvb{i}-(b_0-\beta_{0,i})\vcx{i}\right)+\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}) \\ &\quad +\lambda R'(b_0)-\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}) \\ &= \vcx{i}^{\t}\text{diag}{\fl''\left(\vbeta_{\Xi}\right)}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_0-\beta_{0,i})\vcx{i}\right)+\lambda R'(b_0)-\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}) \\ &= \underbrace{\vcx{i}^{\t}\text{diag}{\fl''\left(\vbeta_{\Xi}\right)-\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_0-\beta_{0,i})\vcx{i}\right)}_{\text{part 1}} \\ &\quad +\underbrace{\lambda R'(b_0)-\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}_{\text{part 2}} \\ &\quad +\underbrace{\vcx{i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_0-\beta_{0,i})\vcx{i}\right)}_{\text{part 3}} . \nonumber\\ \end{split} \end{equation} In the rest of the proof, we obtain separate upper bounds for part 1, part 2, and part 3. For part 1, similar to the proof of \eqref{eq:add_lopo_1_eq1}, we have that by \eqref{eq:suptovbijeq21}-\eqref{eq:suptovbijeq31}, Lemma \ref{lem:xwnorm} and Assumption O.\ref{ass:Holder}, we have \begin{eqnarray} \text{part 1} &\leq& \sup_i\|\vcx{i}\|\cdot \sqrt{n}\sup_{i,j}C_l\left|\ve_j^{\t}\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_0-\beta_{0,i})x_{ij}\right|^{1+\alpha} \nonumber\\ &\leq& \op{\frac{\plog(n)}{n^{\frac{\alpha}{2}}}\cdot \frac{\sup_i|b_0-\beta_{0,i}|^{1+\alpha}}{\kappa_l^{6\rho+2}}} . \nonumber \end{eqnarray} For part 2, note that $R'(b_0)=R'(0)=O(1)$. Then, since $\vcx{i}$ is independent of $\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}$, we have \[ \vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}) \ \stackrel{d}{=}\ \mathcal{N}(0,\frac{\|l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})\|^2}{n}) . \] Hence, by Assumption O.\ref{ass:Smoothness2} and \eqref{eq:add_lopo_eq1}, we have \begin{eqnarray} \text{part 2} &\leq& \sup_i |\lambda R'(b_0)-\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})| \nonumber\\ &\leq& \op{1}+\op{\frac{\|l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})\|}{\sqrt{n}}\cdot \ln n} \nonumber\\ &=& \op{\frac{\plog(n)}{\kappa_l^{(\rho+2)(\rho+1)}}} . \nonumber \end{eqnarray} For part 3, we have \[ \text{part 3} \ \leq\ \sup_i\|\vcx{i}\|\cdot \sup_{i,j}l''(\ve_j^{\t}(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}))\cdot \sqrt{n}\cdot \sup_{i,j}|\ve_j^{\t}\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_0-\beta_{0,i})x_{ij}| . \] Apply Lemma \ref{lem:xwnorm}, Assumption O.\ref{ass:Smoothness2}, \eqref{eq:add_lopo_eq1} and \eqref{eq:suptovbijeq21} squentially, we have \begin{eqnarray} \text{part 3} &\leq& \op{1} \cdot \op{\frac{\plog(n)}{\kappa_l^{(\rho+2)\rho}}} \cdot \sqrt{n}\cdot \op{\frac{\plog(n)}{\sqrt{n}}\cdot \frac{\sup_i|b_0-\beta_{0,i}|}{\kappa_l^{3\rho+1}}} \nonumber\\ &=& \op{\frac{\plog(n)}{\kappa_l^{(\rho+2)\rho}}\cdot \frac{\sup_i|b_0-\beta_{0,i}|}{\kappa_l^{3\rho+1}}} . \nonumber \end{eqnarray} Note that since $b_0=0$, by Lemma \ref{lem:xwnorm} we know $\sup_i|b_0-\beta_{0,i}|=\op{\plog(n)}$. Hence, by combining the above three upper bounds we conclude that \[ \sup_i|L_{i}(\eloptvb{i})| \ \leq\ \op{\frac{\plog(n)}{\kappa_l^{6\rho+2}}} . \] Note that by combining this result with \eqref{eq:add_lopo_1_eq1}, we obtain \[ \sup_i\|L(\eloptvb{i})\| \ \leq\ \op{\frac{\plog(n)}{\kappa_l^{6\rho+2}}} . \] Therefore, according to \eqref{eq:suptovbhvb21}, we have \[ \|\bvepsilon^i_{\text{weak}}\| \ \leq\ \sup_i\|\hvb-\eloptvb{i}\| \ \leq\ \op{\frac{\plog(n)}{\kappa_l^{6\rho+3}}} . \] Combine with \eqref{eq:suptovbijeq31}, we have \[ \sup_{i,j}\left|\ve_j^{\t}(\lophvb{i}-\lopvb{i})\right| \= \op{\frac{\plog(n)}{\kappa_l^{6\rho+3}}} . \] This completes the proof of Lemma \ref{lem:weakresult}. \end{proof} Now we would like to prove Theorem \ref{thm:lopo}. As discussed before we replace $b_0$ with $b_i$ in the proof of Lemma \ref{lem:weakresult} and update the proof accordingly with additional Assumption O.\ref{ass:boundhvb}. With a slight abuse of notation we redefine $\loptvb{i}$ and $\eloptvb{i}$ by replacing $b_0$ with $b_i$. In other words, in the rest of the proof we have \begin{eqnarray} \loptvb{i} &=& \lopvb{i}-(b_i-\beta_{0,i})\bar{\vA}_i^{-1}\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\vcx{i} , \label{eq:deftovb22} \end{eqnarray} and \begin{eqnarray} \eloptb{i}_j &=& \left\{\begin{aligned} &\loptib{i}_j, && j<i \\ &b_i, && j=i \\ &\loptib{i}_{j-1}, && j>i \end{aligned}\right. . \nonumber \end{eqnarray} Then, we can follow the same steps as the ones in the proof of Lemma \ref{lem:weakresult} and conclude that \begin{subequations} \begin{align} \sup_{i,j}|\ve_j^{\t}\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})| &\= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l^{3\rho+1}}\sup_i|b_i-\beta_{0,i}|} , \label{eq:suptovbijeq22}\\ \sup_{i,j}|\loptib{i}_j-\lopb{i}_j| &\= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l^{3\rho+1}}\sup_i|b_i-\beta_{0,i}|} , \label{eq:suptovbijeq32} \end{align} \end{subequations} and \begin{eqnarray} \sup_i\|L^{\backslash i}(\eloptvb{i})\| &\leq& \op{\frac{\plog(n)}{n^{\frac{\alpha}{2}}}\cdot \frac{\sup_i|b_i-\beta_{0,i}|^{1+\alpha}}{\kappa_l^{6\rho+2}}} . \label{eq:add_9.38} \end{eqnarray} Similarly, we want to obtain an upper bound for the $i^{\rm th}$ component of $L(\eloptvb{i})$ denoted with $L_i(\eloptvb{i})$. By Taylor expansion, we have \begin{eqnarray} \lefteqn{L_{i}(\eloptvb{i})} \nonumber\\ &=& -\vcx{i}^{\t}l'\left(\lopvy{i}-\bar {\vX}_{/i}\loptvb{i}-(b_i-\beta_{0,i})\vcx{i}\right)+\lambda R'(b_i) \nonumber\\ &=& \vcx{i}^{\t}\text{diag}{\fl''\left(\vbeta_{\Xi}\right)}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_i-\beta_{0,i})\vcx{i}\right)+\lambda R'(b_i)-\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}) \nonumber\\ &=& \vcx{i}^{\t}\text{diag}{\fl''\left(\vbeta_{\Xi}\right)-\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_i-\beta_{0,i})\vcx{i}\right) \nonumber\\ &&-a_i(b_i-\beta_{0,i})+\vcx{i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_i-\beta_{0,i})\vcx{i}\right) . \nonumber \end{eqnarray} For the last equality we have used the following equality which is a simple conclusion of the definition of $b_i$ in \eqref{eq:bcondition2}: \[ a_i(b_i-\beta_{0,i})+\lambda R'(b_i) \= \vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}) . \] In the following calculations, we use $\bar{\boldsymbol{\fl}}_i''$ as a shorthand for the matrix $\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\loptvb{i})}$. According to the matrix inversion lemma, we have \begin{eqnarray} \vcx{i}^{\t}\bar{\boldsymbol{\fl}}''_i\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_i-\beta_{0,i})\vcx{i}\right) &=& (b_i-\beta_{0,i})\left(\vcx{i}^{\t}\bar{\boldsymbol{\fl}}''_i\vcx{i}-\vcx{i}^{\t}\bar{\boldsymbol{\fl}}''_i\bar {\vX}_{/i}\bar{\vA}_i^{-1}\bar {\vX}_{/i}^{\t}\bar{\boldsymbol{\fl}}''_i\vcx{i}\right) \nonumber\\ &=& (b_i-\beta_{0,i})a_i . \nonumber \end{eqnarray} Hence, when we replace $b_0$ with $b_i$, then part 2 and part 3 in \eqref{eq:add_lopo_1_eq2} cancel each other and only part 1 remains. In other words, we have \begin{eqnarray} \sup_i|L_{i}(\eloptvb{i})| &=& \sup_{i,\Xi}\left|\vcx{i}^{\t}\text{diag}{\fl''(\vbeta_{\Xi})-\fl''(\lopvy{i}-\bar {\vX}_{/i}\loptvb{i})}\left(\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_i-\beta_{0,i})\vcx{i}\right)\right| \nonumber\\ &\stackrel{\text{(i)}}{\leq}& \sup_i\|\vcx{i}\|\cdot \sqrt{n}\sup_{i,j}C_l\left|\ve_j^{\t}\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_i-\beta_{0,i})x_{ij}\right|^{1+\alpha} \nonumber\\ &\stackrel{\text{(ii)}}{\leq}& \op{\frac{\plog(n)}{n^{\frac{\alpha}{2}}}\cdot \frac{\sup_i|b_i-\beta_{0,i}|^{1+\alpha}}{\kappa_l^{6\rho+2}}} , \nonumber \end{eqnarray} where Inequality (i) is due to Assumption O.\ref{ass:Holder} and Inequality (ii) is due to \eqref{eq:suptovbijeq22}-\eqref{eq:suptovbijeq32} and Lemma \ref{lem:xwnorm}. Hence, if we combine this equation with \eqref{eq:add_9.38}, then we obtain \[ \sup_i\|L(\eloptvb{i})\| \ \leq\ \op{\frac{\plog(n)}{n^{\frac{\alpha}{2}}}\cdot \frac{\sup_i|b_i-\beta_{0,i}|^{1+\alpha}}{\kappa_l^{6\rho+2}}} . \] Therefore, similar to \eqref{eq:suptovbhvb21}, we have \begin{eqnarray} \|\bvepsilon^i\| \ \leq\ \sup_i\|\hvb-\eloptvb{i}\| &\leq& \op{\frac{1}{\kappa_l}}\cdot \sup_i\|L(\eloptvb{i})\| \nonumber\\ &\leq& \op{\frac{\plog(n)}{n^{\frac{\alpha}{2}}}\cdot \frac{\sup_i|b_i-\beta_{0,i}|^{1+\alpha}}{\kappa_l^{6\rho+3}}} . \label{eq:add_lopo_eq5} \end{eqnarray} Note that \eqref{eq:add_lopo_eq5} and \eqref{eq:suptovbijeq32} together imply that \[ \sup_{i,j}\left|\ve_j^{\t}(\lophvb{i}-\lopvb{i})\right| \= \op{\frac{\plog(n)}{n^{\frac{\alpha}{2}}}\cdot \frac{\sup_i|b_i-\beta_{0,i}|^{1+\alpha}}{\kappa_l^{6\rho+3}}} . \] As a corollary of \eqref{eq:add_lopo_eq5}, we have \begin{corollary}\label{cor:bibound} Under Assumption O.\ref{ass:Convex}-O.\ref{ass:True}, as $n \rightarrow \infty$, we have \[ \sup_i|b_i-\hat{\beta}_i| \ \leq\ \sup_i\|\hvb-\eloptvb{i}\| \ \leq\ \op{\frac{\plog(n)}{n^{\frac{\alpha}{2}}}\cdot \frac{\sup_i|b_i-\beta_{0,i}|^{1+\alpha}}{\kappa_l^{6\rho+3}}} . \] \end{corollary} Finally, to complete the proof of Theorem \ref{thm:lopo}, we just need to bound $\sup_{i}|b_i-\beta_{0,i}|$ with $\op{\frac{\plog(n)}{\kappa_l^{13\rho+2}}\cdotc_n}$ under additional Assumption O.\ref{ass:boundhvb}. By Lemma \ref{lem:xwnorm}, we know we just need to bound $|b_i|$ by $\op{\frac{\plog(n)}{\kappa_l^{13\rho+2}}\cdot c_n}$. Let $\eta(\cdot)$ denote the proximal operator of $R$, defined as \[ \eta(x,\lambda) \= \argmin_{y\in \bbR}\frac{1}{2}(x-y)^2+\lambda R(y) . \] Then recall the definition of $b_i$, we have \begin{eqnarray} b_i &=& \eta(\beta_{0,i}+\frac{1}{a_i}\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}),\frac{\lambda}{a_i}) , \label{eq:bcondition2} \end{eqnarray} where \[ a_i \= \vcx{i}^{\t}(\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}^{-1}+\lambda\bar {\vX}_{/i}\text{diag}{R''(\lopvb{i})}\bar {\vX}_{/i}^{\t})^{-1}\vcx{i} . \] Our first lemma summarizes a few properties of the prox function $\eta$. \begin{lemma}\label{lem:eta'} Let $f(x)$ be a convex function. If $f$ is twice-differentiable, then we have \[ \frac{\partial \eta_f(x,\theta)}{\partial x} \= \frac{1}{1+\theta f''(\eta_f(x,\theta))} , \] where $\eta_f$ is the proximity operator of $f$, satisfying \[ \eta_{f}(x,\theta) \= \argmin_{y\in \bbR}\frac{1}{2}(x-y)^2+\theta f(y) . \] Hence, $\eta_f(x,\theta)$ is Lipchitz continuous with constant 1. \end{lemma} \begin{proof} Since $f$ is convex, we know that $\eta_f(x,\theta)$ is uniquely defined for each $\theta$, and satisfies \[ \eta_f(x,\theta)-x+\theta f'(\eta_f(x,\theta)) \= 0 . \] Since $f$ is twice-differentiable, by taking a derivative with respect to $x$ from both sides of the above equation we obtain \[ \frac{\partial \eta_f(x,\theta)}{\partial x}-1+\theta f''(\eta_f(x,\theta))\cdot \frac{\partial \eta_f(x,\theta)}{\partial x} \= 0 , \] which completes the proof of the lemma. \end{proof} According to Assumption O.\ref{ass:Convex}, there exists a constant $\mu_{\min}$ such that $R$ achieves its minimum at $\mu_{\min}$. Hence, $\eta(\mu_{\min};\cdot)\equiv \mu_{\min}$. Further, by Lemma \ref{lem:eta'}, we have $|\eta'|\leq 1$. Hence, \eqref{eq:bcondition2} implies that \begin{eqnarray} |b_i| &\leq& |\beta_{0,i}+\frac{1}{a_i}\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})-\mu_{\min}|+|\eta(\mu_{\min},\lambda/a_i)| \nonumber\\ &\leq& |\beta_{0,i}|+|\frac{1}{a_i}\vcx{i}^{\t}l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})|+2|\mu_{\min}| \nonumber\\ &\stackrel{\text{(i)}}{\leq}& \op{\ln n}+\frac{1}{|a_i|}\op{\frac{\|l'(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})\|}{\sqrt{n}}\cdot \ln n} \nonumber\\ &\stackrel{\text{(ii)}}{\leq}& \op{\ln n}+\frac{1}{|a_i|}\op{\frac{\plog(n)}{\kappa_l^{(\rho+2)(\rho+1)}}} , \label{eq:add_9.57} \end{eqnarray} where Inequality (i) holds due to Lemma \ref{lem:xwnorm} and the facts that $\vcx{i}$ is independent of $\lopvy{i}-\bar {\vX}_{/i}\lopvb{i}$, and Inequality (ii) is due to Assumption O.\ref{ass:Smoothness2} and \eqref{eq:add_lopo_eq1}. Hence, we just need to lower bound $|a_i|$. Note that, by definition of $a_i$, we have \[ \inf_i|a_i| \ \geq \ \frac{\inf_i\|\vcx{i}\|}{\max_i \sigma_{\max}\left(\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}^{-1}+\lambda\bar {\vX}_{/i}\text{diag}{R''(\lopvb{i})}\bar {\vX}_{/i}^{\t}\right)} . \] Note that by Assumption O.\ref{ass:Smoothness}, we know the maximum eigenvalue of $\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}^{-1}$ is at most $\op{1/\kappa_l}$. For the maximum eigenvalue of $\lambda\bar {\vX}_{/i}\text{diag}{R''(\lopvb{i})}\bar {\vX}_{/i}^{\t}$, note that by Assumption O.\ref{ass:Smoothness2}, we have \[ \sup_{i,j}R''(\ve_j^{\t}\lopvb{i}) \ \leq\ \op{1+\sup_{i,j}(\lopb{i}_j)^{\rho}} . \] According to Assumption O.\ref{ass:boundhvb} and \eqref{eq:add_goal_1} stated in Lemma \ref{lem:weakresult}, we have \begin{eqnarray} \sup_{i,j}R''(\ve_j^{\t}\lopvb{i}) &\leq& \op{\frac{\plog(n)}{\kappa_l^{9\rho}}+c_n} . \label{eq:add_10.49} \end{eqnarray} Hence, due to Lemma \ref{lem:minev}, we have \begin{eqnarray} \inf_i|a_i| &\geq& \frac{\inf_i\|\vcx{i}\|}{1+\op{\frac{\plog(n)}{\kappa_l^{9\rho}}+c_n}} \ \geq \ \Omega_p\left(\frac{1}{\frac{\plog(n)}{\kappa_l^{9\rho}}+c_n}\right) , \label{eq:add_10.48} \end{eqnarray} where the last inequality is due to Lemma \ref{lem:xwnorm}. Hence, by using Lemma \ref{lem:xwnorm} again, we have \begin{equation} \label{eq:add_eq_10.40pm} \begin{split} \sup_i|b_i-\beta_{0,i}| &\leq \op{\ln n}+\op{\frac{\plog(n)}{\kappa_l^{9\rho}}+c_n}\cdot \op{\frac{\plog(n)}{\kappa_l^{(\rho+2)(\rho+1)}}} \\ &\leq \op{\frac{\plog(n)}{\kappa_l^{13\rho+2}}\cdotc_n} . \end{split} \end{equation} This completes the proof of Theorem \ref{thm:lopo}. \subsubsection{Proof of Lemma \ref{lem:q1}}\label{sec:q1} By Matrix Inversion Lemma, we have \begin{equation} \hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i} \= \hvcx{i}^{\t}\hvcx{i}-\vcx{i}^{\t}\hat{M}_i\vcx{i} \quad \text{and} \quad \bvcx{i}^{\t}\bar{\vQ}_i^{-1}\bvcx{i} \= \bvcx{i}^{\t}\bvcx{i}-\vcx{i}^{\t}\bar{M}_i\vcx{i} , \label{eq:Q} \end{equation} where \begin{equation} \begin{split} \hat{\vM}_i &= \text{diag}{\fl''(\vy-\vX\hvb)}\bar {\vX}_{/i}\left(\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\bar {\vX}_{/i}+\lambda\text{diag}{\reg_c''(\lophvb{i})}\right)^{-1} \\ &\quad \times\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\vy-\vX\hvb)} , \nonumber \end{split} \end{equation} and \[ \bar{\vM}_i \= \vv^{\t}\left(\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\bar {\vX}_{/i}+\lambda\text{diag}{\reg_c''(\lopvb{i})}\right)^{-1}\vv , \] where $\vv=\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}$. Hence, we need to show \[ \sup_i\left|\vcx{i}^{\t}\left(\hat{\vM}_i-\text{diag}{\fl''(\vy-\vX\hvb)}-\bar{\vM}_i+\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\right)\vcx{i}\right| \] is at most \[ \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+15}}} . \] Let \begin{equation} \begin{split} \check{\vM}_i &= \text{diag}{\fl''(\vy-\vX\hvb)}\bar {\vX}_{/i}\left(\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\bar {\vX}_{/i}+\lambda\text{diag}{\reg_c''(\lopvb{i})}\right)^{-1} \\ &\quad \times \bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\vy-\vX\hvb)} . \nonumber \end{split} \end{equation} We just need to show the following three equations: \begin{equation} \label{eq:add_q1_eq1} \begin{split} \sup_i\left|\vcx{i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})-\fl''(\vy-\vX\hvb)}\vcx{i}\right| &= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{32\rho+7}}} , \\ \sup_i\left|\vcx{i}^{\t}(\hat{\vM}_i-\check{\vM}_i)\vcx{i}\right| &= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha}{2}}\cdot \kappa_l^{38\rho+9}}} , \\ \sup_i\left|\vcx{i}^{\t}(\check{\vM}_i-\bar{\vM}_i)\vcx{i}\right| &= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+15}}} . \end{split} \end{equation} To show the first equation, recall the proof of Theorem \ref{thm:lopo} at the end of Section \ref{sec:lopo}. We have \begin{equation} \label{eq:difl} \begin{split} \lefteqn{\sup_{i,j}|l''(y_j-\vrx{j}^{\t}\hvb)-l''(\lopy{i}_j-\ve_j^{\t}\bar {\vX}_{/i}\lopvb{i})|} \\ &\leq \sup_{i,j}|l''(y_j-\vrx{j}^{\t}\hvb)-l''(y_j-\vrx{j}^{\t}\eloptvb{i})|+\sup_{i,j}|l''(y_j-\vrx{j}^{\t}\eloptvb{i})-l''(\lopy{i}_j-\ve_j^{\t}\bar {\vX}_{/i}\lopvb{i})| \\ &\stackrel{\text{(i)}}{\leq} C_l\left(\sup_{i,j}|\vrx{j}^{\t}(\hvb-\eloptvb{i})|^{\alpha}+\sup_{i,j}|\ve_j^{\t}\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_i-\beta_{0,i})x_{ij}|^{\alpha}\right) \\ &\stackrel{\text{(ii)}}{\leq} \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{32\rho+7}}} +C_l\left(\sup_{i,j}|\ve_j^{\t}\bar {\vX}_{/i}(\loptvb{i}-\lopvb{i})+(b_i-\beta_{0,i})x_{ij}|^{\alpha}\right) \\ &\stackrel{\text{(iii)}}{\leq} \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{32\rho+7}}} , \end{split} \end{equation} where Inequality (i) is due to Assumption O.\ref{ass:Holder}, Inequality (ii) is due to \eqref{eq:add_lopo_eq5}, \eqref{eq:add_eq_10.40pm} and Lemma \ref{lem:xwnorm}, and inequality (iii) is due to \eqref{eq:suptovbijeq22}, \eqref{eq:suptovbijeq32}, \eqref{eq:add_eq_10.40pm} and Lemma \ref{lem:xwnorm}. Hence, according to Lemma \ref{lem:xwnorm}, we have \[ \sup_i\left|\vcx{i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})-\fl''(\vy-\vX\hvb)}\vcx{i}\right| \= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{32\rho+7}}} . \] To show the second equation in \eqref{eq:add_q1_eq1}, by Theorem \ref{thm:lopo} and Assumption O.\ref{ass:Holder}, we have \begin{equation} \sup_{i,j}|\reg_c''(\lophb{i}_j)-\reg_c''(\lopb{i}_j)| \ \leq\ C_r\sup_{i,j}|\lophb{i}_j-\lopb{i}_j|^{\alpha} \ \leq\ \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{32\rho+7}}} . \label{eq:difl2} \end{equation} Based on \eqref{eq:difl} and \eqref{eq:difl2}, we replace $\ve_j$ by $\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\vcx{i}$ in \eqref{eq:replaceei1}, \eqref{eq:replaceei2} and follow similar steps as the ones presented in the proof of Lemma \ref{lem:ABswitch} to obtain \begin{eqnarray} \lefteqn{\sup_i|\vcx{i}^{\t}(\hat{\vM}_i-\check{\vM}_i)\vcx{i}|} \nonumber\\ &\leq& \sup_{i}\left\|\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\vcx{i}\right\|^2\cdot \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha}{2}}\cdot \kappa_l^{33\rho+9}}} \nonumber\\ &\leq& \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha}{2}}\cdot \kappa_l^{38\rho+9}}} , \nonumber \end{eqnarray} where the last inequality is due to Assumption O.\ref{ass:Smoothness2}, Lemma \ref{lem:minev} and Lemma \ref{lem:xwnorm}. To obtain the last equation in \eqref{eq:add_q1_eq1}, note that $\check{\vM}_i$ and $\bar{\vM}_i$ have the following forms: \[ \check{\vM}_i \= \text{diag}{\hat{\dfl}''}\vW_i\text{diag}{\hat{\dfl}''} \quad \text{and} \quad \bar{\vM}_i\= (\text{diag}{\hat{\dfl}''}+\check{\Delta}_{i})\vW_i(\text{diag}{\hat{\dfl}''}+\check{\Delta}_{i}) , \] where $\hat{\dfl}''$ is a shorthand for $\fl''(\vy-\vX\hvb)$ and $\check{\Delta}_{i}, \vW_i$ are defined in the following way: \begin{eqnarray} \check{\Delta}_{i} &\=& \text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})-\fl''(\vy-\vX\hvb)}, \nonumber \\ \vW_i &\=& \bar {\vX}_{/i}\left(\bar {\vX}_{/i}^{\t}\text{diag}{\fl''(\lopvy{i}-\bar {\vX}_{/i}\lopvb{i})}\bar {\vX}_{/i}+\lambda\text{diag}{\reg_c''(\lopvb{i})}\right)^{-1}\bar {\vX}_{/i}^{\t} . \nonumber \end{eqnarray} Hence, we have \begin{eqnarray} \lefteqn{\sup_i|\vcx{i}^{\t}(\bar{\vM}_i-\check{\vM}_i)\vcx{i}|} \nonumber\\ &\leq& \sup_i|\vcx{i}^{\t}\check{\Delta}_i\vW_i\check{\Delta}_i\vcx{i}|+2\sup_i|\vcx{i}^{\t}\text{diag}{\hat{\dfl}''}\vW_i\check{\Delta}_i\vcx{i}| \nonumber\\ &\leq& \sup_{\|\vu\|=1}\vu^{\t}\vW_i\vu\cdot \sup_i\|\check{\Delta}_i\vcx{i}\|^2+2\sup_i\|\vW_i\text{diag}{\hat{\dfl}''}\vcx{i}\|\cdot \sup_i\|\check{\Delta}_i\vcx{i}\| . \nonumber \end{eqnarray} By \eqref{eq:difl}, we have \[ \sup_{i,j}|\ve_j^{\t}\check{\Delta}_i\ve_j| \= \sup_{i,j}|l''(y_j-\vrx{j}^{\t}\hvb)-l''(\lopy{i}_j-\ve_j^{\t}\bar {\vX}_{/i}\lopvb{i})| \ \leq\ \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{32\rho+7}}} . \] Due to Assumption O.\ref{ass:Smoothness} and Lemma \ref{lem:minev}, the maximum eigenvalue of $\vW_i$ is at most $\op{1/\kappa_l}$. Hence, with Lemma \ref{lem:xwnorm} and the fact that $\check{\Delta}_i$s are diagonal matrices, we have \begin{eqnarray} \lefteqn{\sup_i|\vcx{i}^{\t}(\bar{\vM}_i-\check{\vM}_i)\vcx{i}|} \nonumber\\ &\leq& \op{\frac{1}{\kappa_l}}\cdot\op{\frac{\plog(n)\cdot c_n^{2+2\alpha}}{n^{\alpha^2}\cdot \kappa_l^{64\rho+14}}}\cdot \op{1} \nonumber\\ && +\op{\frac{1}{\kappa_l}}\sup_{i}l''(y_i-\vrx{i}^{\t}\hvb)\cdot \op{1}\cdot \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{32\rho+7}}} \nonumber\\ &=& \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+15}}} , \nonumber \end{eqnarray} where the last equality is due to Assumption O.\ref{ass:Smoothness2} and Lemma \ref{lem:supnormDi}. Hence, we have completed the proof of this lemma. \subsubsection{Proof of Lemma \ref{lem:q2}}\label{sec:q2} Note that by replacing $\vcx{i}$ by $\ve_j$ in the proof of Lemma \ref{lem:q1}, we can follow the same steps and show that \[ \sup_i\left|\frac{1}{n}\text{Tr}\left((\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\bar{\vQ}_i^{-1}(\bar{\boldsymbol{\fl}}^{i})^{\frac{1}{2}}\right)-\frac{1}{n} \text{Tr}\left( \text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\hat{\vQ}_i^{-1}\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\right)\right| \] is at most \[ \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+15}}} . \] Hence, since \begin{eqnarray} &&\sup_i\left|\frac{1}{n}\text{Tr}\left(\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\hat{\vQ}_i^{-1}\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\right)-\frac{1}{n} \text{Tr}\left(\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}(\vI+\hat{\vX} \vD\hat{\vX}^{\t})^{-1}\text{diag}{\hat{\fl}''}^{\frac{1}{2}}\right)\right| \nonumber\\ &=& \sup_i\left|\frac{1}{n}\text{Tr}\left(\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\left(\hat{\vQ}_i^{-1}-(\hat{\vQ}_i+D_i\hvcx{i}\hvcx{i}^{\t})^{-1}\right)\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\right)\right| , \nonumber \end{eqnarray} we just need to show that \begin{equation} \label{eq:add_q2_eq1} \begin{split} \sup_i\left|\frac{1}{n}\text{Tr}\left(\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\left(\hat{\vQ}_i^{-1}-(\hat{\vQ}_i+D_i\hvcx{i}\hvcx{i}^{\t})^{-1}\right)\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\right)\right| \leq \op{\frac{\plog(n)}{n^{\alpha^2/2}}}. \end{split} \end{equation} By Matrix Inversion Lemma, we have \begin{eqnarray} \lefteqn{\sup_i\left|\frac{1}{n}\text{Tr}\left(\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\left(\hat{\vQ}_i^{-1}-(\hat{\vQ}_i+D_i\hvcx{i}\hvcx{i}^{\t})^{-1}\right)\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\right)\right|} \nonumber\\ &=& \sup_i\left|\frac{1}{n}\text{Tr}\left(\frac{D_i\hat{\vQ}_i^{-1}\hvcx{i}\hvcx{i}^{\t}\hat{\vQ}_i^{-1}}{1+D_i\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}}\text{diag}{\hat{\dfl}''}\right)\right| \nonumber\\ &=& \sup_i\left|\frac{1}{n}\text{Tr}\left(\frac{\hat{\vQ}_i^{-1}\hvcx{i}\hvcx{i}^{\t}\hat{\vQ}_i^{-1}}{\lambda \reg_c''(\hat{\beta}_i)+\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}}\text{diag}{\hat{\dfl}''}\right)\right| \nonumber\\ &=& \sup_i\left|\frac{1}{n}\cdot \frac{\text{Tr}\left(\hat{\vQ}_i^{-1}\hvcx{i}\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\text{diag}{\hat{\dfl}''}\right)}{\lambda \reg_c''(\hat{\beta}_i)+\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}}\right| \nonumber\\ &\leq& \sup_i\left|\frac{1}{n}\cdot \frac{\hvcx{i}^{\t}\hat{\vQ}_i^{-2}\hvcx{i}}{\lambda \reg_c''(\hat{\beta}_i)+\hvcx{i}^{\t}\hat{\vQ}_i^{-1}\hvcx{i}}\right|\cdot \sup_il''(y_i-\vrx{i}^{\t}\hvb) . \nonumber \end{eqnarray} Hence, due to the definition of $\hat{\vQ}_i$, we know that the minimal eigenvalue of $\hat{\vQ}_i$ is at least $1$. Therefore, with Lemma \ref{lem:xwnorm}, we have \begin{eqnarray} \lefteqn{\sup_i\left|\frac{1}{n}\text{Tr}\left(\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\left(\hat{\vQ}_i^{-1}-(\hat{\vQ}_i+D_i\hvcx{i}\hvcx{i}^{\t})^{-1}\right)\text{diag}{\hat{\dfl}''}^{\frac{1}{2}}\right)\right|} \nonumber\\ &\leq & \frac{\sup_i\left|l''(y_i-\vrx{i}^{\t}\hvb)\right|^2\cdot \op{1}}{n\lambda\inf_i \reg_c''(\hat{\beta}_i)} \ \leq\ \op{\frac{\sup_i\left|l''(y_i-\vrx{i}^{\t}\hvb)\right|^2}{\sqrt{n}}} , \nonumber \end{eqnarray} where last inequality holds due to the fact that $\reg_c''(x)\geq c_3=\Omega(1/\sqrt{n})$. Note that, due to Lemma \ref{lem:supnormDi} and Assumption O.\ref{ass:Smoothness2}, we have \[ \sup_il''(y_i-\vrx{i}^{\t}\hvb) \ \leq\ \op{\frac{\plog(n)}{\kappa_l^{3\rho}}} . \] Hence, \eqref{eq:add_q2_eq1} holds. \section{Heuristic derivation of AMP risk estimate}\label{sec:construct} The goal of this section is to show how one can heuristically derive the risk estimate formula we presented in \eqref{eq:amprhat}. This formula is derived from the approximate message passing algorithm (AMP). AMP was first introduced as a fast iterative algorithm for solving regularized least squares problem \citep{DMM09Message}. It has since been extended to more general models and optimization problems \citet{DM16High, ma2018optimization, bradic2015robustness}. We can follow the the strategy proposed in \cite{M11PhD, donoho2010message, rangan2011generalized} and obtain the following AMP algorithm for solving \eqref{eq:model}: \begin{itemize} \item Set initialization $\vbeta^0$ be independent of $\vX$ (usually we set $\vbeta^0=\boldsymbol{0}$). \item Update $\vz^t$ and $\vbeta^{t+1}$ for $t\geq 0$ by \begin{eqnarray} \vbeta^{t+1} &=& \eta(\vbeta^t+\vX^{\t}\frac{\psi(\vz^t,\theta^t)}{\dotp{\psi'(\vz^t,\theta^t)}},\tau_t) , \nonumber\\ \vz^t &=& \vy-\vX\vbeta^t+\psi(\vz^{t-1},\theta^{t-1}) , \label{eq:amptupdaterule} \end{eqnarray} where $\theta^{t}$ is the solution of the following equation \begin{eqnarray} \dotp{\psi'(\vz^{t},\theta^t)} &=& \frac{1}{\delta}\dotp{\eta'(\vbeta^{t}+\vX^{\t}\frac{\psi(\vz^t,\theta^t)}{\dotp{\psi'(\vz^t,\theta^t)}},\tau_t)} . \label{eq:thetaexist} \end{eqnarray} \end{itemize} In these equations $\eta$ is the proximal operator of $R$, i.e., $\eta(x,\tau) = \argmin_{y\in \bbR}\frac{1}{2}(x-y)^2+\tau R(y)$, and $\psi(x,\theta):=\thetal'(\eta_{l}(x,\theta))$, where $\eta_{l}$ is the proximal operator of $l$, i.e. $\eta_{l}(x,\theta) = \argmin_{y\in \bbR}\frac{1}{2}(x-y)^2+\theta l(y).$ Furthermore, $\psi'(x,\theta)$ denotes the derivative of $\psi(\cdot, \cdot)$ with respect to its first input argument, and $\{\tau_t\}_{t\geq 0}$ is a sequence of tuning parameter. Here, we assume that $\{\tau_t\}_{t\geq 0}$ is a converging sequence. The role of these parameters will be clarified later. We emphasize on a few features of AMP below: \begin{itemize} \item The existence of a solution for \eqref{eq:thetaexist} is guaranteed by \citet{DM16High}; by the convexity of the regularizer $R(x)$ and Lemma \ref{lem:eta'}, the right hand side (RHS) of \eqref{eq:thetaexist} is always in $[0,1/\delta]\subset [0,1]$, while the left hand side (LHS) is equal to zero for $\theta^t=0$ and is equal to one when $\theta^t=\infty$. Hence, given the continuity of the LHS and RHS functions the existence of a solution is guaranteed. \item An important feature of AMP that has made its asymptotic analysis possible is that, intuitively speaking, $\vz^t$ can be considered as a random vector with Gaussian marginals. Furthermore, to calculate the mean and variance of the marginal distribution of $z_i^t$ it is safe to assume that $\vx_{i}$ is independent of $\vbeta^t$. This independence is in fact happening because of the term $\psi(\vz^{t-1},\theta^{t-1})$ that is added to the residual. This term is known as the Onsager correction term. In the calculation of the mean and variance of $z_i^t$, one can ignore the existence of this term and assume that its only is to make $\vx_{i}$ independent of $\vbeta^t$. For further discussion regarding these heuristic arguments and the existing rigorous proofs the reader may refer to \cite{metzler2016denoising}. \end{itemize} Suppose that for a converging sequence $\{\tau_t\}_{t\geq 0}$, the AMP estimates converge to $(\vbeta^{\infty}_{\tau^*}, \vz^{\infty}_{\tau^*}, \theta^{\infty}_{\tau^*},\tau^*)$. Also, define \[ \gamma^* \ :=\ \tau^*\cdot \dotp{\frac{l''(\vy-\vX\vbeta^{\infty}_{\tau^*})}{1+\theta^{\infty}_{\tau^*} l''(\vy-\vX\vbeta^{\infty}_{\tau^*})}} . \] Then, $(\vbeta,\vz,\theta,\tau,\gamma)=(\vbeta^{\infty}_{\tau^*}, \vz^{\infty}_{\tau^*}, \theta^{\infty}_{\tau^*},\tau^*, \gamma^*)$ satsfies: \begin{subequations}\label{eq:main_limitequation} \begin{align} \vbeta &\= \eta(\vbeta+\vX^{\t}\frac{\psi(\vz,\theta)}{\dotp{\psi'(\vz,\theta)}},\tau) , \label{eq:main_limitequation1_1}\\ \vz &\= \vy-\vX\vbeta+\psi(\vz,\theta) , \label{eq:main_limitequation1_2}\\ \dotp{\psi'(\vz,\theta)} &\= \frac{1}{\delta}\dotp{\eta'(\vbeta+\vX^{\t}\frac{\psi(\vz,\theta)}{\dotp{\psi'(\vz,\theta)}},\tau)} , \label{eq:main_limitequation1_3}\\ \gamma &\= \tau\cdot \dotp{\frac{l''(\vy-\vX\vbeta)}{1+\theta l''(\vy-\vX\vbeta)}} . \label{eq:main_limitequation1_4} \end{align} \end{subequations} Our next lemma helps us interpret the fixed point of AMP. \begin{lemma}\label{lem:AMP=GLM2} Under Assumption O.\ref{ass:Convex}, \eqref{eq:main_limitequation} is equivalent to the following set of equations: \begin{subequations}\label{eq:main_limitequation2} \begin{align} \boldsymbol{0} &\= -\vX^{\t}l'(\vy-\vX\vbeta)+\gammaR'(\vbeta) , \label{eq:main_limitequation2_1} \\ \gamma &\= \dotp{\frac{l''(\vy-\vX\vbeta)}{\frac{1}{\tau}+\frac{1}{\delta\gamma}\dotp{\frac{1}{1+\tauR''(\vbeta)}}\cdot l''(\vy-\vX\vbeta)}} , \label{eq:main_limitequation2_2} \\ \theta &\= \frac{1}{\delta\gamma}\dotp{\frac{\tau}{1+\tauR''(\vbeta)}} , \label{eq:main_limitequation2_3}\\ \vz &\= \vy-\vX\vbeta+\theta \cdot l'(\vy-\vX\vbeta) , \label{eq:main_limitequation2_4} \end{align} \end{subequations} \end{lemma} \begin{proof} From the definition of $\psi$ we have $z-\psi(z, \theta)\equiv \eta_{l}(z,\theta).$ Hence, \eqref{eq:main_limitequation1_2} is equivalent to \begin{eqnarray} \eta_{l}\left(\vz,\theta\right) &=& \vy-\vX\vbeta . \label{eq:limiteqb_1} \end{eqnarray} Next, from Lemma \ref{lem:eta'} and the definition of $\psi$, we have \begin{eqnarray} \dotp{\frac{\thetal''(\eta_{l}(\vz,\theta))}{1+\thetal''(\eta_{l}(\vz,\theta))}} \ \equiv \ \dotp{\thetal''(\eta_{l}(\vz,\theta))\frac{\partial \eta_{l}(\vz,\theta)}{\partial z}} \ \equiv \ \dotp{\psi'(\vz,\theta)} . \label{eq:limiteqb_2} \end{eqnarray} Hence, from Lemma \ref{lem:eta'} we conclude that (\eqref{eq:main_limitequation1_1},\eqref{eq:main_limitequation1_3}) is equivalent to \eqref{eq:main_limitequation1_1} together with the following equation \begin{eqnarray} \dotp{\frac{\thetal''(\eta_{l}(\vz,\theta))}{1+\thetal''(\eta_{l}(\vz,\theta))}} &=& \frac{1}{\delta}\dotp{\frac{1}{1+\tauR''\left(\eta'\left(\vbeta+\vX^{\t}\frac{\psi(\vz,\theta)}{\dotp{\psi'(\vz,\theta)}},\tau\right)\right)}} \nonumber\\ &=& \frac{1}{\delta}\dotp{\frac{1}{1+\tauR''\left(\vbeta\right)}} . \label{eq:limiteqb_3} \end{eqnarray} From the definition of $\eta$ and Assumption O.\ref{ass:Convex}, we conclude that \eqref{eq:main_limitequation1_1} is equivalent to \begin{eqnarray} \boldsymbol{0} &=& \vbeta-\left(\vbeta+\vX^{\t}\frac{\psi(\vz,\theta)}{\dotp{\psi'(\vz,\theta)}}\right)+\tauR'(\vbeta) \nonumber\\ &=& -\vX^{\t}\frac{\psi(\vz,\theta)}{\dotp{\psi'(\vz,\theta)}}+\tauR'(\vbeta) \nonumber\\ &=& -\frac{1}{\dotp{\frac{l''(\eta_{l}(\vz,\theta))}{1+\thetal''(\eta_{l}(\vz,\theta))}}}\vX^{\t}l'(\eta_{l}(\vz,\theta))+\tauR'(\vbeta) . \label{eq:limiteqb_4} \end{eqnarray} Hence, (\eqref{eq:main_limitequation1_1}-\eqref{eq:main_limitequation1_4}) is equivalent to (\eqref{eq:limiteqb_4}, \eqref{eq:limiteqb_1}, \eqref{eq:limiteqb_3}, \eqref{eq:main_limitequation1_4}). If we plug \eqref{eq:limiteqb_1} in \eqref{eq:limiteqb_4} and \eqref{eq:limiteqb_3}, then we conclude that \eqref{eq:main_limitequation2} is equivalent to the following equation: \begin{subequations}\label{eq:part_b_limitequation2} \begin{align} \frac{1}{\dotp{\frac{l''(\vy-\vX\vbeta)}{1+\thetal''(\vy-\vX\vbeta)}}}\vX^{\t}l'(\vy-\vX\vbeta) &\= \tauR'(\vbeta) , \label{eq:part_b_limitequation2_1}\\ \eta_{l}\left(\vz,\theta\right) &\= \vy-\vX\vbeta , \label{eq:part_b_limitequation2_2}\\ \dotp{\frac{\thetal''(\vy-\vX\vbeta)}{1+\thetal''(\vy-\vX\vbeta)}} &\= \frac{1}{\delta}\dotp{\frac{1}{1+\tauR''\left(\vbeta\right)}} , \label{eq:part_b_limitequation2_3}\\ \gamma &\= \tau\cdot \dotp{\frac{l''(\vy-\vX\vbeta)}{1+\theta l''(\vy-\vX\vbeta)}} . \label{eq:part_b_limitequation2_4} \end{align} \end{subequations} Then, if we plug \eqref{eq:part_b_limitequation2_4} in \eqref{eq:part_b_limitequation2_1} and \eqref{eq:part_b_limitequation2_3}, we conclude that \eqref{eq:part_b_limitequation2} is equivalent to the following set of equations: \begin{subequations}\label{eq:part_b_limitequation3} \begin{align} \boldsymbol{0} &\= -\vX^{\t}l'(\vy-\vX\vbeta)+\gammaR'(\vbeta) , \label{eq:part_b_limitequation3_1}\\ \eta_{l}\left(\vz,\theta\right) &\= \vy-\vX\vbeta , \label{eq:part_b_limitequation3_2}\\ \theta &\= \frac{1}{\delta\gamma}\dotp{\frac{\tau}{1+\tauR''\left(\vbeta\right)}} , \label{eq:part_b_limitequation3_3}\\ \gamma &\= \tau\cdot \dotp{\frac{l''(\vy-\vX\vbeta)}{1+\theta l''(\vy-\vX\vbeta)}} . \label{eq:part_b_limitequation3_4} \end{align} \end{subequations} Then, plug \eqref{eq:part_b_limitequation3_3} in \eqref{eq:part_b_limitequation3_4}, we have \eqref{eq:part_b_limitequation3} is equivalent to \eqref{eq:main_limitequation2} which is the following: \begin{subequations \begin{align} \boldsymbol{0} &\= -\vX^{\t}l'(\vy-\vX\vbeta)+\gammaR'(\vbeta) , \nonumber \\ \gamma &\= \dotp{\frac{l''(\vy-\vX\vbeta)}{\frac{1}{\tau}+\frac{1}{\delta\gamma}\dotp{\frac{1}{1+\tauR''(\vbeta)}}\cdot l''(\vy-\vX\vbeta)}} , \nonumber \\ \theta &\= \frac{1}{\delta\gamma}\dotp{\frac{\tau}{1+\tauR''(\vbeta)}} , \nonumber \\ \eta_{l}\left(\vz,\theta\right) &\= \vy-\vX\vbeta . \nonumber \end{align} \end{subequations} Finally, due to the definition of $\eta_{l}$ function, we conclude that $\vz=\vy-\vX\vbeta+\thetal'(\vy-\vX\vbeta)$ is the unique solution of \[ \eta_{l}\left(\vz,\theta\right) \= \vy-\vX\vbeta . \] Hence, we conclude that \eqref{eq:main_limitequation} is equivalent to \eqref{eq:main_limitequation2}. \end{proof} Note that \eqref{eq:main_limitequation2_1} implies the AMP estimate $\vbeta^{\infty}_{\tau^*}$ is the is the solution of \eqref{eq:model} with tuning parameter $\gamma^*$, i.e., $\vbeta^{\infty}_{\tau^*}=\hvb_{\gamma^*}$. Next, from Lemma \ref{lem:AMP=GLM1}, we know that given $(\vX,\vy,\vbeta)$, \eqref{eq:main_limitequation2_2} defines a bijection mapping between $\gamma$ and $\tau$. Then since $(\vbeta^{\infty}_{\tau^*},\gamma^*)=(\hvb_{\lambda},\lambda)$, we know $\hat{\tau}$ defined in \eqref{eq:taudef} exists and $\hat{\tau}=\tau^*$. Finally, since $(\vbeta^{\infty}_{\tau^*},\gamma^*,\tau^*)=(\hvb_{\lambda},\lambda,\hat{\tau})$, according to \eqref{eq:thetadef}, \eqref{eq:main_limitequation2_3} and \eqref{eq:main_limitequation2_4}, we know \[ \vz^{\infty}_{\tau^*} \= \vy-\vX\hvb+ \hat{\theta}\cdotl'(\vy-\vX\hvb_{\lambda}) . \] As is clear from \eqref{eq:main_limitequation2_4}, $\vz =\vy-\vX\vbeta+\theta \cdot l'(\vy-\vX\vbeta)$ acts like an estimate of the residual. Also, as described before the main objective of the term $\theta \cdot l'(\vy-\vX\vbeta)$ is to make $\vrx{i}$ almost independent of $\vbeta$. Hence, at the intuitive level one would expect $\vz$ to act like a leave-one-out cross validation estimate of the residuals. The heuristic leads to \eqref{eq:amprhat} as an estimate of the out-of-sample prediction error. \section{Main results} \subsection{Assumptions}\label{sec:assume} In this section, we present and discuss the assumptions used in this paper. Note that we do not require all of the assumptions for any individual result, and some of the assumptions can be weakened or replaced by other assumptions, as we also discuss below. The first few assumptions are about the structural properties of the loss function and regularizer. \begin{assumption}\label{ass:Convex} Loss function $l(\cdot)$ and regularizer $R(\cdot)$ are convex and have continuous second order derivatives. Moreover, the minimizer of $R(\cdot)$ is finite. \end{assumption} \begin{assumption}\label{ass:Holder}\label{ass:Smoothness2} (H{\"o}lder Assumption) The second derivatives of the loss function $l$ and regularizer $R$ are H{\" o}lder continuous: there exists constants $\alpha\in (0,1]$ and $C_l,C_r>0$ such that for all $|x-x'|\leq 1$, we have \[ |l''(x)-l''(x')| \ \leq\ C_l|x-x'|^{\alpha} \quad \text{and} \quad |R''(x)-R''(x')|\ \leq\ C_r|x-x'|^{\alpha} . \] This implies that there exists constants $C>0$ and $\rho\in [0,1]$ such that for all $x\in \bbR$, we have \begin{eqnarray} \max \{l''(x),R''(x)\} &\leq& C(1+|x|^\rho) , \nonumber\\ \max \{l'(x),R'(x)\} &\leq& C(1+|x|^{\rho+1}) , \nonumber\\ \max \{l(x),R(x)\} &\leq& C(1+|x|^{\rho+2}) . \nonumber \end{eqnarray} \end{assumption} Assumption O.\ref{ass:Holder} ensures that the second derivatives is locally smooth. Given that the original assumptions in the derivation of ${\rm ALO}_{\lambda}$ and AMP is twice differentiability of the loss function and regularizer, Assumption O.\ref{ass:Holder} is only slightly stronger than the twice differentiability assumptions that were used in deriving ${\rm ALO}_{\lambda}$ formula \eqref{eq:looeq}. Note that for non-differentiable cases, one can easily apply a smoothing scheme similar to the ones proposed in \cite{koh2017understanding, mousavi2018consistent}, and still use these risk estimates. \begin{assumption} \label{ass:Smoothness} There exists $\kappa_l>0$ such that \[ \inf_{x\in \bbR} l''(x) \ \geq \ \kappa_l . \] \end{assumption} Assumption O.\ref{ass:Smoothness} ensures the uniqueness of the solutions of our optimization problems. In that vain, even if we replace Assumption O.\ref{ass:Smoothness} with $\inf_{x\in \bbR} R''(x) \geq \kappa_l$, then most of our results will still hold. The only exceptions is Lemma \ref{lem:G}. As will become clear, the proof of Lemma \ref{lem:G} requires $\frac{1}{n} \sum_{i=1}^n l''(y_i-\vrx{i}^{\t}\hvb_\lambda) \geq \kappa_\ell$. This in turn, only requires that a constant fraction of the residual fall in the regions at which the curvature of $\ell$ is positive. Finally, we should emphasize that since in our proofs we calculate the curvature at and around $\lamloovb{i}$, we only require a lower bound in a neighborhood of these estimates. Furthermore, if the curvature in such neighborhoods goes to zero `slowly', still our risk estimates will be consistent. We will keep the dependency of our bounds on $\kappa_l$ for the readers who are interested in the cases where $\kappa_l$ is not constant and goes to zero. However, for notational simplicity we have considered a global lower bound for the curvature in Assumption O.\ref{ass:Smoothness}, and in almost all the results will see $\kappa_l$ as a constant. So far, the assumptions have been concerned with the geometric properties of the loss function and the regularizer. The rest of our assumptions are about the statistical properties of the problem. \begin{assumption}\label{ass:True} Let $\vbeta_0, \vw$ and $\vX$ be mutually independent random variables. Furthermore, we assume each data point $(y_i,\vrx{i})$ is i.i.d.~generated, $y_i \= \vrx{i}^\top\vbeta_0+w_i$, and the elements of $\vrx{i}$ are independent zero mean Gaussian random variables with variance $\frac{1}{n}$. We assume the entries of $\vbeta_0$ are i.i.d.~random variables. Finally, we assume that the entries of $\vw$ and $\vbeta_0$ are subGaussian random variables respectively, i.e., there exists a constant $C$ such that for any fixed $r\geq 1$, and for all $i$, we have \[ (\bbE |w_i|^r)^{\frac{1}{r}} \ \leq\ C \sqrt{r} \quad \text{and} \quad (\bbE |\beta_{0,i}|^r)^{\frac{1}{r}} \ \leq\ C \sqrt{r}. \] \end{assumption} Assumption O.\ref{ass:True} is a standard assumption in the high-dimensional asymptotic analysis of regularized estimators \cite{donoho2015variance, bradic2015robustness, el2013robust, bean2013optimal, el2018impact, sur2017likelihood, weng2018overcoming, johnstone2001distribution, bayati2012lasso, thrampoulidis2015regularized, amelunxen2014living, chandrasekaran2012convex, cai2016geometric}. Suppose that we have a sequence of problem instances $(\vbeta_0(p),\vw(p), \vX(p))$ indexed with $p$ (with fixed $n/p=\delta >1$), and each problem instance satisfies Assumption O.\ref{ass:True}. Then, solving \eqref{eq:model} for the sequence of problem instances $(\vbeta_0(p),\vw(p), \vX(p))$ leads to a sequence of estimates $\hvb_{\lambda}(p)$. Our last assumption is about this sequence. \begin{assumption}\label{ass:boundhvb} Every component of $\hvb_{\lambda}(p)$ remains bounded by a sufficiently small power of $n$. More specifically, \[ \sup_{i=1,\cdots,p} |\ve_i^{\t}\hvb_{\lambda} (p)|^\rho \ \leq\ \op{c_n} , \] where $c_n$ is a constant that satisfies $c_n = o(n^{\alpha^2/4})$. $\alpha, \rho$ are the constants stated in O.\ref{ass:Holder}. \end{assumption} Note that in this paper, we use $\hvb_{\lambda}$ and $\hvb_{\lambda}(p)$ interchangeably. Assumption O.\ref{ass:boundhvb} requires every component of the original estimate $\hvb_{\lambda}$ to be bounded. One can heuristically argue that this assumption holds given Assumption O.\ref{ass:Convex}-O.\ref{ass:True}. Let us mention a heuristic argument here. Suppose that Assumptions O.\ref{ass:Convex}-O.\ref{ass:True} hold. We can show that (See \eqref{eq:add_tue_2.33pm} and \eqref{eq:add_tue_2.35pm} in the proof for Lemma \ref{lem:supnormDi} in Section \ref{sec:supnormDi}) \[ \frac{1}{\sqrt{n}}\|\hvb_{\lambda}-\vbeta_0\| \= \op{\frac{1}{\kappa_l}} . \] Hence, on average, the component-wise distance between $\hvb_{\lambda}$ and $\vbeta_0$ should be $\op{\frac{1}{\kappa_l}}$. Note that according to Assumption O.\ref{ass:True}, every component of the true signal $\vbeta_0$ can be bounded by $\op{\plog(n)}$ (See Lemma \ref{lem:xwnorm}). Therefore, intuitively, every component of $\hvb_{\lambda}$ should be bounded by $\op{\frac{\plog(n)}{\kappa_l}}$ as well. In fact, we can show that O.\ref{ass:boundhvb} holds with $c_n=\op{\frac{\plog(n)}{\kappa_l^{15\rho}}}$, if we assume O.\ref{ass:Convex}-O.\ref{ass:True} hold, and the regularizer satisfies an extra condition. This is described in the following lemma: \begin{lemma}\label{LEM:ABOUTASSUMPO5} Suppose that Assumptions O.\ref{ass:Convex}-O.\ref{ass:True} are satisfied. Furthermore, suppose that the regularizer satisfies one of the following conditions. \begin{itemize} \item[(a)] $R''(x)$ is Lipchitz and $\sup_iR''(\ve_i^{\t}\hvb_{\lambda})=\op{\plog(n)}$. \item[(b)] There exists constant $c>0$ such that $\sup_{x\in \bbR}R''(x)<c$. \item[(c)] There exists constant $c>0$ such that $\inf_{x\in \bbR}R''(x)>c$. \end{itemize} Then, $\sup_i|\ve_i^{\t}\hvb_{\lambda} (p)|^\rho =\op{\frac{\plog(n)}{\kappa_l^{15\rho}}}$. \end{lemma} Since the proof of this lemma uses some of the results we will prove in later sections, we postpone it to Appendix \ref{sec:disbi}. \subsection{Main results} \label{sec:results} In this section, we address question about the convergence rate mentioned in the introduction for ${\rm LO}_{\lambda}$, ${\rm ALO}_{\lambda}$ and ${{\rm AMP}}_{{\rm risk},\lambda}$. Toward this goal, we first bound the discrepancy between ${{\rm AMP}}_{{\rm risk},\lambda}$ and ${\rm LO}_{\lambda}$ in Section \ref{ssec:discamp_lo}. The connections we derive between AMP estimates and leave-one-out estimates are instrumental in the rest of the proofs. Then, we find an upper bound for $|{\rm LO}_{\lambda}-{\rm Err}_{{\rm out},\lambda}|$ in Section \ref{ssec:disc_lo_extra}. Finally, we obtain an upper bound for the discrepancy between ${\rm LO}_{\lambda}$ and ${\rm ALO}_{\lambda}$ in Section \ref{ssec:disclo_lao}. \subsubsection{The discrepancy of ${{\rm AMP}}_{{\rm risk},\lambda}$ and ${\rm LO}_{\lambda}$}\label{ssec:discamp_lo} Our first result bounds $\left|{\rm LO}_{\lambda}-{{\rm AMP}}_{{\rm risk},\lambda}\right|$ as mentioned in the next theorem. \begin{theorem}\label{THM:MSE} Assuming O.\ref{ass:Convex}-O.\ref{ass:boundhvb}, for any fixed $\lambda>0$, we have \[ \left|{\rm LO}_{\lambda}-{{\rm AMP}}_{{\rm risk},\lambda}\right| \= \op{\frac{\plog(n) \cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{72\rho+22}}} . \] \end{theorem} \noindent \textbf{Proof sketch.} Below, we sketch the proof. Details are in Section \ref{sec:MSE}. As the first step, in Lemma \ref{lem:AMP=GLM1}, we show that $\hat{\tau}$, introduced in \eqref{eq:taudef}, is uniquely defined. Hence, the heuristic recipe we mentioned in Section \ref{sec:reAMP} leads to a well-defined estimate for ${\rm Err}_{{\rm out},\lambda}$. Note that Lemma \ref{ssec:discamp_lo} does not provide any information on the quality of this estimate. \begin{lemma}\label{lem:AMP=GLM1} Under Assumption O.\ref{ass:Convex}, for any $(\vX,\vy,\vbeta)$, \begin{eqnarray} \gamma \= \dotp{\frac{l''(\vy-\vX\vbeta)}{\frac{1}{\tau}+\frac{1}{\delta\gamma}\dotp{\frac{1}{1+\tauR''(\vbeta)}}\cdot l''(\vy-\vX\vbeta)}}, \label{eq:amp=glm_eq1} \end{eqnarray} defines a one-to-one mapping between $\gamma\in \bbR^{+}$ and $\tau\in \bbR^{+}$. \end{lemma} The proof is given in Section \ref{sec:uniquesolution}. According to this lemma, a unique value of $\hat{\tau}$ satisfies \eqref{eq:taudef}. Using this unique value we can calculate the unique $\hat{\theta}$ that satisfies \eqref{eq:thetadef}, and obtain the following estimate of ${\rm Err}_{{\rm out},\lambda}$: \begin{equation}\label{eq:wampr_estimate} {{\rm AMP}}_{{\rm risk},\lambda} = \sum_{i=1}^n \ell(y_i-\vrx{i}^{\t}\hvb+ \hat{\theta}\cdotl'(y_i-\vrx{i}^{\t} \hvb_{\lambda})) \end{equation} To compare this risk estimate with ${\rm LO}_{\lambda}$, we first simplify ${\rm LO}_{\lambda}$ in the following proposition. \begin{proposition}\label{thm:looo} Under Assumptions O.\ref{ass:Convex}, O.\ref{ass:Smoothness2}, O.\ref{ass:Smoothness} and O.\ref{ass:True}, we have \[ \sup_{i,j}\left|\ve_j^{\t}(\hvb-\loovb{i})\right| \= \op{\frac{\plog(n) }{n^{\frac{\alpha}{2}}\cdot \kappa_l^{8\rho+7}}} . \] Moreover, if we define \[ \tvepsilon^i := \loovb{i} - \hvb + l'(y_i-\vrx{i}^{\t}\hvb)\tilde{\vA}_i^{-1}\vrx{i} , \] where \[ \tilde{\vA}_i := \vX^{\t}\text{diag}{\fl''(\vy-\vX\loovb{i})}\vX+\lambda\text{diag}{R''(\loovb{i})}-l''(y_i-\vrx{i}^{\t}\loovb{i})\vrx{i}\vrx{i}^{\t} , \] then, \[ \sup_i\|\tvepsilon^i\| \= \op{\frac{\plog(n) }{n^{\frac{\alpha}{2}}\cdot \kappa_l^{9\rho+10}}}. \] \end{proposition} The proof of Proposition \ref{thm:looo} is given in Section \ref{sec:looo}. For the special case of $\ell_2$ regularizer, a similar upper bound is obtain for $\sup_i\|\tvepsilon^i\|$ in Theorem 2.2 of \cite{el2018impact}. We employ a similar proof strategy. However, due to the lack of lower bound for the curvature of the regularizer, our argument is more involved. Given the definitions of $\tvepsilon^i$ and $\tilde{\vA}_i$, we have \begin{eqnarray} y_i-\vrx{i}^{\t}\loovb{i} &=& y_i-\vrx{i}^{\t}\hvb+l'(y_i-\vrx{i}^{\t}\hvb)\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}-\vrx{i}^{\t}\tvepsilon^i , \label{eq:loomain1} \end{eqnarray} and hence \begin{equation {\rm LO}_{\lambda} \= \sum_{i=1}^n l \left (y_i-\vrx{i}^{\t}\hvb+l'(y_i-\vrx{i}^{\t}\hvb)\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}-\vrx{i}^{\t}\tvepsilon^i \right).\nonumber \end{equation} Next, with the aid of Proposition \ref{thm:looo}, we prove that the AMP-based residuals $y_i-\vrx{i}^{\t}\hvb+ \hat{\theta}\cdotl'(y_i-\vrx{i}^{\t} \hvb_{\lambda})$ in \eqref{eq:amprhat} are close to the leave-$i$-out residuals $y_i-\vrx{i}^{\t}\lamloovb{i}$ in \eqref{eq:modelLO}. In that vein, \begin{eqnarray} \lefteqn{\left| (y_i-\vrx{i}^{\t}\hvb+ \hat{\theta}\cdotl'(y_i-\vrx{i}^{\t} \hvb_{\lambda})) -(y_i-\vrx{i}^{\t}\loovb{i})\right| = \left|(\hat{\theta}-\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i})l'(y_i-\vrx{i}^{\t}\hvb)+\vrx{i}^{\t}\tvepsilon^i\right|} \nonumber\\ &\leq& |l'(y_i-\vrx{i}^{\t}\hvb)|\cdot |\hat{\theta}-\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}| \nonumber +\|\vrx{i}\|\cdot \op{\frac{\plog(n) }{n^{\frac{\alpha}{2}}\cdot \kappa_l^{9\rho+10}}} , \nonumber \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \end{eqnarray} where the last inequality is due to Proposition \ref{thm:looo}. Recall that based on Assumption \ref{ass:True}, the entries of $\vrx{i}$ are i.i.d zero mean Gaussian random variables with variance $1/n$, resulting in $\sup_i\|\vrx{i}\| = \op{1}$, as proved in Lemma \ref{lem:xwnorm}. Hence, our next main objective is to bound \begin{eqnarray} \sup_{i=1,\cdots,n} l'(y_i-\vrx{i}^{\t}\hvb)|\cdot |\hat{\theta}-\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}| \nonumber \end{eqnarray} Towards this goal, we prove \begin{eqnarray} \sup_i\left|\hat{\theta}-\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}\right| &=& \op{\frac{\plog(n) \cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{67\rho+19}}}, \label{eq:firstboundAMP1}\\ \sup_i|l'(y_i-\vrx{i}^{\t}\hvb)|&=& \op{\frac{\plog(n)}{\kappa_l^{4\rho+2}}}.\label{eq:firstboundAMP2} \end{eqnarray} Our first lemma bounds $\sup_i|l'(y_i-\vrx{i}^{\t}\hvb)|$. \begin{lemma}\label{lem:supnormDi} Under Assumptions O.\ref{ass:Convex}, O.\ref{ass:Smoothness2}, O.\ref{ass:Smoothness} and O.\ref{ass:True}, for large enough $n$, we have \begin{eqnarray} \sup_i|y_i-\vrx{i}^{\t}\loovb{i}| &=& \op{\frac{\ln n}{\kappa_l}} , \nonumber\\ \sup_{i}\|\hvb-\loovb{i}\| &=& \op{\frac{\plog(n)}{\kappa_l^{\rho+2}}} , \nonumber\\ \sup_i|y_i-\vrx{i}^{\t}\hvb| &=& \op{\frac{\plog(n)}{\kappa_l^{\rho+2}}} . \nonumber \end{eqnarray} \end{lemma} The proof can be found in Section \ref{sec:supnormDi}. By Lemma \ref{lem:supnormDi} and Assumption O.\ref{ass:Smoothness2}, we have \begin{eqnarray} \sup_i|l'(y_i-\vrx{i}^{\t}\hvb)| &\leq& O(1)\cdot (\sup_i|y_i-\vrx{i}^{\t}\hvb|^{\rho+1}+1) \ \leq\ \op{\frac{\plog(n)}{\kappa_l^{4\rho+2}}} . \nonumber \end{eqnarray} Hence, \eqref{eq:firstboundAMP2} holds. The final step of the proof is to bound $\sup_i\left|\hat{\theta}-\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}\right|$. Toward this goal we first want to prove that \begin{eqnarray} \sup_i\left|\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}-\frac{1}{n}\text{Tr}(\tilde{\vA}_i^{-1})\right| \= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l}}. \label{eq:argument1} \end{eqnarray} Note that $\tilde{\vA}_i$ and $\vrx{i}$ are independent and $\vrx{i}$ are i.i.d.~$\mathcal{N}(0,\vI/n)$. Hence, the following lemma, which is a standard concentration result, can address this issue: \begin{lemma}\label{LEM:TAIL} Let $\vx_i \in \bbR^p, i\in\{1,\ldots n\}$ be $n$ mean-zero Gaussian random vectors with covariance matrix $\frac{1}{n}\vI$. Let $\vGamma_i\in \bbR^{p\times p}, i=1,\ldots n$ be $n$ random matrices. Each $\vGamma_i$ is independent of $\vx_i$. Further, let $C_n$ be an upper bound for the the maximum eigenvalues of all $\vGamma_i$ with probability $1-\delta$. Then with probability $1-\delta-\frac{2}{n}$, we have \[ \sup_i|\vx_i^{\t}\vGamma_i\vx_i-\frac{1}{n}\text{Tr}(\vGamma_i)| \ \leq\ \frac{4 C_n \ln n}{\sqrt{n}} . \] \end{lemma} See the proof of this lemma in Section \ref{sec:tail}. Lemma \ref{LEM:TAIL} requires the maximum eigenvalues of all $\tilde{\vA}_i^{-1}$s to be bounded. Note that, for the minimal eigenvalue of $\tilde{\vA}_i$, we have \begin{equation} \label{eq:lowerbound_example_eq1} \begin{split} \inf_i\sigma_{\min}(\tilde{\vA}_i) &= \inf_i\min_{\|\vu\|=1}\vu^{\t}\left(\vX^{\t}\text{diag}{\fl''(\vy-\vX\loovb{i})}\vX-l''(y_i-\vrx{i}^{\t}\loovb{i})\vrx{i}\vrx{i}^{\t}\right)\vu \\ &\quad +\vu^{\t}\lambda\text{diag}{R''(\loovb{i})}\vu \\ &\stackrel{\text{(i)}}{\geq} \inf_i\min_{\|\vu\|=1}\vu^{\t}\left(\vX_{/i}^{\t}\cdot \kappa_l\vI\cdot \vX_{/i}\right)\vu \\ &\stackrel{\text{(ii)}}{\geq} \kappa_l\sigma_{\delta} \= \Omega_p\left(\kappa_l\right) , \end{split} \end{equation} where Inequality (i) is due to Assumption O.\ref{ass:Convex} and O.\ref{ass:Smoothness} and Inequality (ii) is due to Lemma \ref{lem:minev} (stated in Section \ref{sec:Preliminaries}). Hence, the maximum eigenvalue of $\tilde{\vA}_i^{-1}$ is upper bounded by $\op{1/\kappa_l}$. Therefore Lemma \ref{LEM:TAIL} implies that \begin{eqnarray} \sup_i\left|\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}-\frac{1}{n}\text{Tr}(\tilde{\vA}_i^{-1})\right| \= \op{\frac{\plog(n)}{\sqrt{n}\cdot \kappa_l}} . \label{eq:argument1} \end{eqnarray} Hence, in order to prove \eqref{eq:firstboundAMP1} we need to prove that \[ \sup_i\left|\hat{\theta}-\frac{1}{n}\text{Tr}(\tilde{\vA}_i^{-1})\right| \= \op{\frac{\plog(n) \cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{67\rho+19}}} . \] To achieve this goal, we first introduce an extra quadratic term to the regularizer \begin{eqnarray} \reg_c(x) \= R(x)+\frac{c_3}{2}x^2 , \label{eq:def_rc} \end{eqnarray} where $c_3=\frac{1}{\sqrt{n}}$. This quadratic term offers a lower bound for the curvature of the regularizer. The existence of such a lower bounds simplifies our analysis. To see the exact place this lower bound has simplified our analysis, we refer to Lemma \ref{lem:q2} in Appendix \ref{sec:q2}. Based on regularizer $\reg_c(x)$ define $\tilde{\vA}_{c,i}$ as a counter part of $\tilde{\vA}_i$ by replacing $\text{diag}{R''}$ with $\text{diag}{\reg_c''}$, i.e, \begin{eqnarray} \tilde{\vA}_{c,i} &=& \vX^{\t}\text{diag}{\fl''(\vy-\vX\loovb{i})}\vX-l''(y_i-\vrx{i}^{\t}\loovb{i})\vrx{i}\vrx{i}^{\t}+\lambda \text{diag}{\reg_c''(\loovb{i})} \nonumber\\ &=& \tilde{\vA}_i+c_3 I . \nonumber \end{eqnarray} Moreover, define \[ \hat{\vA}_c \= \vX^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\vX+\lambda \text{diag}{\reg_c''(\hvb)} . \] It turns out that $\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})$ is very close to $\frac{1}{n}\text{Tr}(\tilde{\vA}_{i}^{-1})$ and hence, we only need to bound $\left|\hat{\theta}-\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})\right|$. The next two lemmas prove this claim. \begin{lemma}\label{lem:replace} For large enough $n$, we have \[ \sup_i\left|\frac{1}{n}\text{Tr}(\tilde{\vA}_{i}^{-1})-\frac{1}{n}\text{Tr}(\tilde{\vA}_{c,i}^{-1})\right| \= \op{\frac{1}{\sqrt{n}\cdot \kappa_l^2}} . \] \end{lemma} ~\\ and \begin{lemma}\label{lem:ABswitch} For large enough $n$, we have \begin{eqnarray} \sup_i\left|\frac{1}{n}\text{Tr}(\hat{\vA}_{c,i}^{-1})-\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})\right| &=& \op{\frac{\plog(n)}{n\cdot \kappa_l^{3\rho+2}}} ,\nonumber\\ \sup_i\left|\frac{1}{n}\text{Tr}(\hat{\vA}_{c,i}^{-1})-\frac{1}{n}\text{Tr}(\tilde{\vA}_{c,i}^{-1})\right| &=& \op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{8\rho+9}}} , \nonumber \end{eqnarray} where \[ \hat{\vA}_{c,i} \ :=\ \vX^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\vX-l''(y_i-\vrx{i}^{\t}\hvb)\vrx{i}\vrx{i}^{\t}+\lambda \text{diag}{\reg_c''(\hvb)} . \] \end{lemma} The proofs of these two lemmas can be found in Sections \ref{sec:replace} and \ref{sec:ABswitch} respectively. As we described above the goal is to bound $\left|\hat{\theta}-\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})\right|$. We remind the reader that the parameter $\hat{\theta}$ is obtained from \eqref{eq:taudef} and \eqref{eq:thetadef}. In other words, one has to solve the fixed point equation \eqref{eq:taudef} and then plug that in \eqref{eq:thetadef} to obtain $\hat{\theta}$. However, it is also clear that by rearranging \eqref{eq:taudef} and \eqref{eq:thetadef} we can see $\hat{\theta}$ as a solution of a fixed point equation too. More specifically, it is straightforward to plug \eqref{eq:taudef} in \eqref{eq:thetadef} and obtain \begin{eqnarray} \frac{\lambda}{\hat{\tau}} &=& \dotp{\frac{l''(\vy-X\hvb)}{1+\hat{\theta}l''(\vy-X\hvb)}} . \label{eq:limiteqc_1} \end{eqnarray} We can use this equation to obtain $\hat{\tau}= \lambda \dotp{\frac{l''(\vy-X\hvb)}{1+\hat{\theta}l''(\vy-X\hvb)}}^{-1}$. Finally, note that \eqref{eq:taudef} can be expressed in the following form: \begin{eqnarray} \frac{1}{\delta}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb)}} &=& \dotp{\frac{\frac{1}{\delta\lambda}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb)}}\cdotl''(\vy-\vX\hvb)}{\frac{1}{\hat{\tau}}+\frac{1}{\delta\lambda}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb)}}\cdot l''(\vy-\vX\hvb)}} , \nonumber \end{eqnarray} which is equivalent to \begin{eqnarray} \frac{1}{\delta}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb)}} &=& 1-\dotp{\frac{1}{\frac{1}{\delta\lambda}\dotp{\frac{\hat{\tau}}{1+\hat{\tau}R''(\hvb)}}l''(\vy-\vX\hvb)+1}} . \label{eq:tauconditionc} \end{eqnarray} By plugging $\hat{\tau}= \lambda \dotp{\frac{l''(\vy-X\hvb)}{1+\hat{\theta}l''(\vy-X\hvb)}}^{-1}$ in this equation we obtain \begin{equation}\label{eq:thetahateq} \dotp{\frac{1}{1+\hat{\theta}l''(\vy-\vX\hvb)}}+\frac{1}{\delta}\dotp{\frac{1}{1+\lambda\dotp{\frac{l''(\vy-\vX\hvb)}{1+\hat{\theta}l''(\vy-\vX\hvb)}}^{-1}R''(\hvb)}}=1. \end{equation} Given that the solution for $\hat{\tau}$ is unique (according to Lemma \ref{lem:AMP=GLM1}), the solution for $\hat{\theta}$ shall be unique as well. Define \begin{equation}\label{eq:defG} G(\theta) \= \dotp{\frac{1}{1+\thetal''(\vy-\vX\hvb)}}+\frac{1}{\delta}\dotp{\frac{1}{1+\lambda\dotp{\frac{l''(\vy-\vX\hvb)}{1+\thetal''(\vy-\vX\hvb)}}^{-1}R''(\hvb)}} . \end{equation} Since we would like to prove that $\left|\hat{\theta}-\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})\right|$ is small, we expect $G(\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1}))$ to be close to $G(\hat{\theta})=1$. Our next lemma shows how we can obtain an upper bound on $|G(\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})) - G(\hat{\theta})|$. The next step will be to use the mean value theorem to obtain an upper bound on $\left|\hat{\theta}-\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})\right|$. \begin{lemma}\label{lem:G} Consider the function $G$ defined in \eqref{eq:defG} \begin{eqnarray} \left|G(\hat{\theta})-G(\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1}))\right| \= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{64\rho+16}}}, \label{eq:add_goal_21} \end{eqnarray} and \begin{eqnarray} \left|G'(\theta)\right|\geq\Omega_p\left(\frac{\kappa_l^{3\rho+1}}{(1+\theta^2)\plog(n)}\right) . \label{eq:add_goal_22} \end{eqnarray} \end{lemma} The proof of Lemma \ref{lem:G} can be found in Section \ref{sec:G}. As we discussed before, the next step is to use \eqref{eq:add_goal_21} and the mean value theorem to obtain an upper bound on $\left|\hat{\theta}-\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})\right|$. The main issue however, is that $\theta$ appears in the lower bound of the derivative in \eqref{eq:add_goal_22}. Hence, before applying the mean value theorem we have to prove that both $\hat{\theta}$ and $\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})$ are bounded. Note that, for the minimal eigenvalue of $\hat{\vA}_c$, we have \begin{equation} \label{eq:lowerbound_example_eq2} \begin{split} \sigma_{\min}(\hat{\vA}_c) &= \min_{\|\vu\|=1}\vu^{\t}\left(\vX^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\vX+\lambda \text{diag}{\reg_c''(\hvb)} \right)\vu \\ &\stackrel{\text{(i)}}{\geq} \min_{\|\vu\|=1}\vu^{\t}\left(\vX^{\t}\cdot \kappa_l\vI\cdot \vX\right)\vu \stackrel{\text{(ii)}}{\geq} \Omega_p\left(\kappa_l\right) , \end{split} \end{equation} where Inequality (i) is due to the construction of $\reg_c$ in \eqref{eq:def_rc} and Assumption O.\ref{ass:Smoothness}, and Inequality (ii) is due to Lemma \ref{lem:minev}. Hence, the eigenvalues of $\hat{\vA}_c^{-1}$ are upper bounded by $\op{1/\kappa_l}$ and therefore, we have \begin{eqnarray} \frac{1}{n}\text{Tr}(\hat{\vA}_c^{-1}) &=& \op{\frac{1}{\kappa_l}} . \label{eq:upperbound} \end{eqnarray} To bound $\hat{\theta}$, we multiply $\frac{1}{\lambda\delta}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb)}}$ by both sides of \eqref{eq:taudef} and obtain \begin{eqnarray} \frac{1}{\delta}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb)}} &=& \dotp{\frac{\frac{1}{\delta\lambda}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb_{\lambda})}}l''(\vy-\vX\hvb_{\lambda})}{\frac{1}{\hat{\tau}}+\frac{1}{\delta\lambda}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb_{\lambda})}}\cdot l''(\vy-\vX\hvb_{\lambda})}} , \nonumber \end{eqnarray} which is equivalent to \begin{eqnarray} \frac{1}{\delta}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb)}} &=& 1-\dotp{\frac{1}{\frac{1}{\delta\lambda}\dotp{\frac{\hat{\tau}}{1+\hat{\tau}R''(\hvb)}}l''(\vy-\vX\hvb)+1}} . \label{eq:tauconditionc} \end{eqnarray} Then we plug \eqref{eq:thetadef} in the RHS of \eqref{eq:tauconditionc} and obtain \begin{eqnarray} \dotp{\frac{\hat{\theta}l''(\vy-\vX\hvb)}{1+\hat{\theta}l''(\vy-\vX\hvb)}} &=& \frac{1}{\delta}\dotp{\frac{1}{1+\hat{\tau}R''(\hvb)}} . \label{eq:amp=glmc11} \end{eqnarray} Hence, by \eqref{eq:amp=glmc11} and Assumption O.\ref{ass:Convex}, we have \begin{eqnarray} \frac{1}{\delta} &\geq& \dotp{\frac{\hat{\theta}l''(\vy-\vX\hvb)}{1+\hat{\theta}l''(\vy-\vX\hvb)}} . \label{eq:limiteqc_41} \nonumber \end{eqnarray} This implies that \[ \frac{1}{1+\hat{\theta}\inf_il''(y_i-\vrx{i}^{\t}\hvb)} \ \geq \ \dotp{\frac{1}{1+\hat{\theta}l''(\vy-\vX\hvb)}} \geq 1-\frac{1}{\delta} . \] Therefore, with Assumption O.\ref{ass:Smoothness}, we have\footnote{If we replace Assumption O.\ref{ass:Smoothness} by $\inf_{x\in \bbR} R''(x) \geq \kappa_l$, we can upper bound $\hat{\theta}$ by $\op{\frac{1}{\kappa_l}}$ via its construction in \eqref{eq:thetadef}} \begin{eqnarray} \hat{\theta} &\leq& \op{\frac{1}{\kappa_l}} . \label{eq:upperbound2} \end{eqnarray} Lemma \ref{lem:G} and the mean value theorem will then imply that \[ \left|\hat{\theta}-\frac{1}{n}\text{Tr}(\hat{\vA}_{c}^{-1})\right| \= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{67\rho+19}}} . \] Hence, if we define $\hat{z}_i = y_i-\vrx{i}^{\t}\hvb+ \hat{\theta}\cdotl'(y_i-\vrx{i}^{\t} \hvb_{\lambda})$, then we have \[ \sup_i\left|\hat{z}_i-(y_i-\vrx{i}^{\t}\loovb{i})\right| \= \op{\frac{\plog(n)\cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{71\rho+21}}} . \] Finally, by combining the Mean Value Theorem, Lemma \ref{lem:supnormDi} and Assumption O.\ref{ass:Smoothness2}, we have \begin{eqnarray} \lefteqn{\left|{\rm LO}_{\lambda}-{{\rm AMP}}_{{\rm risk},\lambda}\right|} \nonumber\\ &=& \sup_i \left|\hat{z}_i-(y_i-\vrx{i}^{\t}\loovb{i})\right| \cdot \op{1+\sup_i \max(|\hat{z}_i|^{\rho+1},|y_i-\vrx{i}^{\t}\loovb{i}|^{\rho+1})} \nonumber\\ &=& \op{\frac{\plog(n) \cdot c_n^{1+\alpha}}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{72\rho+22}}} . \nonumber \end{eqnarray} This completes the proof of the theorem. $\hfill \square$ \subsubsection{Discrepancy of ${\rm LO}_{\lambda}$ and ${\rm Err}_{{\rm out},\lambda}$}\label{ssec:disc_lo_extra} The following result provides an upper bound on the difference between ${\rm LO}_{\lambda}$ and ${\rm Err}_{{\rm out},\lambda}$. \begin{theorem} Under Assumptions O.\ref{ass:Convex}, O.\ref{ass:Smoothness2}, O.\ref{ass:Smoothness} and O.\ref{ass:True}, we have \[ |{\rm LO}_{\lambda}-{\rm Err}_{{\rm out},\lambda} | \= |\frac{1}{n}\sum_{i=1}^nl(y_i-\vrx{i}^{\t}\loovb{i})-\bbE[l(y_{new}-\vrx{new}^{\t}\hvb_{\lambda})\big|\mathcal{D}]| \= \op{\frac{\plog n}{\kappa_l^{2\rho+3}\sqrt{n}}} . \] \end{theorem} \noindent \textbf{Proof sketch.} The main idea is to break the difference ${\rm LO}_{\lambda}-{\rm Err}_{{\rm out},\lambda}$ into the following two pieces: \begin{eqnarray} \text{part 1:} && P_1 \= \frac{1}{n}\sum_{i=1}^nl(y_i-\vrx{i}^{\t}\loovb{i})-\frac{1}{n}\sum_{i=1}^n\bbE[l(y_{new}-\vrx{new}^{\t}\loovb{i})\big|\mathcal{D}] , \nonumber\\ \text{part 2:} && P_2 \= \frac{1}{n}\sum_{i=1}^n\bbE[l(y_{new}-\vrx{new}^{\t}\loovb{i})\big|\mathcal{D}]-\bbE[l(y_{new}-\vrx{new}^{\t}\hvb_{\lambda})\big|\mathcal{D}] . \nonumber \end{eqnarray} For part 1, we note that \[ \bbE[l(y_{new}-\vrx{new}^{\t}\loovb{i})\big|\mathcal{D}] \= \bbE[l(y_{new}-\vrx{new}^{\t}\loovb{i})\big|\mathcal{D}_i] = \bbE[l(y_i-\vrx{i}^{\t}\loovb{i})\big|\mathcal{D}_i] , \] where $\mathcal{D}_i=\mathcal{D}\backslash\{(\vrx{i},y_i)\}$. Hence, part 1 is equal to \begin{eqnarray} P_1 \= \frac{1}{n} \sum_{i=1}^n (l(y_i-\vrx{i}^{\t}\loovb{i})- \bbE[l(y_i-\vrx{i}^{\t}\loovb{i})\big|\mathcal{D}_i]) \nonumber \end{eqnarray} It is clear that the expected value of $P_1$ is equal to zero. Furthermore, we claim that since the correlations among the different terms in the summation are small enough, we can bound the variance by $O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right)$. The following lemma clarifies this claim: \begin{lemma}\label{lem:crossterm} For all $i\neq j\in \{1,2,\ldots, n\}$, we have \begin{eqnarray} \bbE \left[\left(l(y_i-\vrx{i}^{\t}\loovb{i})-\bbE[l(y_i-\vrx{i}^{\t}\loovb{i})\big|\mathcal{D}_i]\right)\left(l(y_j-\vrx{j}^{\t}\loovb{j})-\bbE[l(y_j-\vrx{j}^{\t}\loovb{j})\big|\mathcal{D}_j]\right)\right] \nonumber \end{eqnarray} is at most $O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right)$. Furthermore, we have \[ \text{var}(P_1) \= O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right) . \] \end{lemma} The proof of this lemma can be found in Section \ref{sec:crossterm}. Lemma \ref{lem:crossterm} combined with Markov inequality imply that part 1 is bounded by $\op{\frac{1}{\kappa_l^{2\rho+3}\sqrt{n}}}$. Hence, the next step of the proof is to bound $P_2$ by $$\op{\frac{1}{\kappa_l^{1.5\rho+2}\sqrt{n}}}$$. By applying the mean value theorem we have \[ |P_2| \ \leq\ \sup_{i,\xi}\left|\bbE\left[\vx_{\operatorname{new}}^{\t}(\loovb{i}-\hvb)l'\left(y_{\operatorname{new}}-\vx_{\operatorname{new}}^{\t}((1-\xi)\hvb+\xi\loovb{i})\right)\big|\mathcal{D}\right]\right| \] Then by using the Cauchy-Schwarz inequality and independency between the new copy $(\vx_{\operatorname{new}},y_{\operatorname{new}})$ and the data set $\mathcal{D}$, we have \begin{eqnarray} |P_2|^2 &\leq& \sup_{i,\xi}\bbE\left[\left(\vx_{\operatorname{new}}^{\t}(\loovb{i}-\hvb)\right)^2\big|\mathcal{D}\right]\cdot \bbE\left[\left(l'\left(y_{\operatorname{new}}-\vx_{\operatorname{new}}^{\t}((1-\xi)\hvb+\xi\loovb{i})\right)\right)^2\big|\mathcal{D}\right] \nonumber\\ &=& \sup_{i,\xi}\frac{\|\loovb{i}-\hvb\|^2}{n}\cdot \bbE\left[\left(l'\left(y_{\operatorname{new}}-\vx_{\operatorname{new}}^{\t}((1-\xi)\hvb+\xi\loovb{i})\right)\right)^2\big|\mathcal{D}\right] \nonumber\\ &\leq& \sup_{i}\frac{\|\loovb{i}-\hvb\|^2}{n}\cdot O(1)\cdot \left(1+\sup_i\frac{\|\loovb{i}-\vbeta_0\|^{4\rho+4}}{n^{2\rho+2}}+\sup_i \frac{\|\hvb-\loovb{i}\|^{4\rho+4}}{n^{2\rho+2}}\right) , \nonumber \end{eqnarray} where the last inequality is due to Assumption O.\ref{ass:Smoothness2}. From the proof of Lemma \ref{lem:supnormDi} in Section \ref{sec:supnormDi} (See \eqref{eq:add_tue_2.33pm} and \eqref{eq:add_tue_2.35pm}), we have \begin{eqnarray} \sup_{i}\frac{\|\loovb{i}-\hvb\|^2}{n} &=& \op{\frac{\plog(n)}{n \cdot \kappa_l^{\rho+2}}} \nonumber \\ \sup_i\frac{\|\loovb{i}-\vbeta_0\|^2}{n} &=& \op{\frac{1}{\kappa_l}} . \end{eqnarray} Hence, $P_2$ is bounded by $\op{\frac{1}{\kappa_l^{1.5\rho+2}\sqrt{n}}}$. $\hfill \square$. \subsubsection{The discrepancy of ${\rm LO}_{\lambda}$ and ${\rm ALO}_{\lambda}$} \label{ssec:disclo_lao} Our next result is concerned with the difference between ${\rm LO}_{\lambda}$ and ${\rm ALO}_{\lambda}$. \begin{theorem} Under Assumptions O.\ref{ass:Convex}, O.\ref{ass:Smoothness2}, O.\ref{ass:Smoothness} and O.\ref{ass:True}, we have \begin{eqnarray} \left|{\rm LO}_{\lambda}-{\rm ALO}_{\lambda}\right| \= \op{\frac{\plog(n)}{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{13\rho+12}}} . \label{eq:Con_eq_1} \end{eqnarray} \end{theorem} \noindent \textbf{Proof sketch.} First we remind the reader that according to Proposition \ref{thm:looo}, we have \[ \loovb{i} \= \hvb-l'(y_i-\vrx{i}^{\t}\hvb)\tilde{\vA}_i^{-1}\vrx{i}+\tvepsilon^i , \] where \[ \tilde{\vA}_i \= \vX^{\t}\text{diag}{\fl''(\vy-\vX\loovb{i})}\vX+\lambda\text{diag}{R''(\loovb{i})}-l''(y_i-\vrx{i}^{\t}\loovb{i})\vrx{i}\vrx{i}^{\t}. \] Furthermore in the same proposition we proved \[ \sup_i\|\tvepsilon^i\| \= \op{\frac{\plog(n) }{n^{\frac{\alpha}{2}}\cdot \kappa_l^{9\rho+10}}}. \] By comparing this formula with \eqref{eq:aloformula1}, which was the main formula that led to ${\rm ALO}_{\lambda}$, it is straightforward to confirm that if we obtain a bound on the difference $\vrx{i}^{\t}\hat{\vA}_i^{-1}\vrx{i}-\vrx{i}^{\t}\tilde{\vA}_i^{-1}\vrx{i}$, with \[ \hat{\vA}_i \= \vX^{\t}\text{diag}{\fl''(\vy-\vX\hvb)}\vX-l''(y_i-\vrx{i}^{\t}\hvb)\vrx{i}\vrx{i}^{\t}+\lambda\text{diag}{R''(\hvb)}, \] then we can obtain a bound between ${\rm ALO}_{\lambda}$ and ${\rm LO}_{\lambda}$. We will show that \begin{lemma}\label{lem:replace3} For large enough $n$ (note that $n/p = \delta$ remains fixed), we have \[ \sup_i\left|\vrx{i}^{\t}(\tilde{\vA}_{i}^{-1}-\hat{\vA}_{i}^{-1})\vrx{i}\right| \= \op{\frac{\plog(n) }{n^{\frac{\alpha^2}{2}}\cdot \kappa_l^{8\rho+9}}} . \] \end{lemma} Notice that since $\tilde{\vA}_i-\hat{\vA}_i=\tilde{\vA}_{c,i}-\hat{\vA}_{c,i}$, the proof of Lemma \ref{lem:replace3} can be easily obtained from the proof of Lemma \ref{lem:ABswitch}. The rest of the proof follows the above lemma immediately. $\hfill \square$. \\ \section{Conclusion} By developing a unified approach for studying the out-of-sample prediction error, under the high-dimensional asymptotics $n,p \rightarrow \infty$, $n/p \rightarrow \delta$, we obtained the first rigorous proof for the consistency of the leave-one-out cross-validation, approximate leave-one-out, and the approximate message passing risk estimate. The main challenge of the rigorous theory presented here was the high-dimensional setting of our framework. To provide practical justification for the success of these risk estimates, we have also obtained upper bounds for their convergence rates, confirming a fast convergence when both the loss function and regularizer are smooth. \section{Consistency of $\text{LOOCV}$ estimate} \subsection{Proof of Lemma \ref{lem:crossterm}}\label{sec:crossterm} Note that \begin{eqnarray} \text{var}(P_1) &=& \frac{1}{n^2}\sum_{i=1}^n\bbE\left(l(y_i-\vrx{i}^{\t}\loovb{i})-\bbE[l(y_i-\vrx{i}^{\t}\loovb{i})\big|\mathcal{D}_i]\right)^2 \nonumber\\ && +\frac{1}{n^2}\sum_{i\neq j}\bbE\left(l(y_i-\vrx{i}^{\t}\loovb{i})-\bbE[l(y_i-\vrx{i}^{\t}\loovb{i})\big|\mathcal{D}_i]\right) \nonumber\\ && \quad \times \left(l(y_j-\vrx{j}^{\t}\loovb{j})-\bbE[l(y_j-\vrx{j}^{\t}\loovb{j})\big|\mathcal{D}_j]\right) . \nonumber \end{eqnarray} Our goal is to bound $\text{var}(P_1)$ by $O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right)$. We have \begin{equation} \label{eq:Con_eq_2} \begin{split} \lefteqn{\text{var}(P_1) \leq \underbrace{\frac{1}{n}\bbEl(y_1-\vrx{1}^{\t}\loovb{1})^2}_{\text{part 3}}} \\ &+\underbrace{\bbE\left(l(y_1-\vrx{1}^{\t}\loovb{1})-\bbE[l(y_1-\vrx{1}^{\t}\loovb{1})\big|\mathcal{D}_1]\right)\left(l(y_2-\vrx{2}^{\t}\loovb{2})-\bbE[l(y_2-\vrx{2}^{\t}\loovb{2})\big|\mathcal{D}_2]\right)}_{\text{part 4}} . \end{split} \end{equation} To bound part 3, note that, according to Assumptions O.\ref{ass:Smoothness2} and O.\ref{ass:True}, we have \begin{eqnarray} \bbE\left(l(y_1-\vrx{1}^{\t}\loovb{1})\right)^2 &\leq& O(1)\left(1+\bbE\left(y_1-\vrx{1}^{\t}\loovb{1}\right)^{2\rho+4}\right) \nonumber\\ &\leq& O(1)\left(1+\bbE\frac{\|\loovb{1}-\vbeta_0\|^{4\rho+8}}{n^{2\rho+4}}+\bbE w_1^{4\rho+8}\right) \nonumber\\ &=& O\left(1+\frac{1}{n^{2\rho+4}}\bbE\|\loovb{1}-\vbeta_0\|^{4\rho+8}\right) . \nonumber \end{eqnarray} Hence, to bound part 3 by $O\left(\frac{1}{n\kappa_l^{2\rho+4}}\right)$, we will first show that $\bbE\|\hvb-\vbeta_0\|^{2r}$ is bounded by $O(n^{r}/\kappa_l^{r})$ for every integer number $r$. Bounding $\bbE\|\loovb{1}-\vbeta_0\|^{2r}$ will be similar. Note that $\hvb$ should satisfy the following \begin{eqnarray} 0 &=& -\vX^{\t}l'(\vy-\vX\hvb)+\lambda R'(\hvb) . \nonumber \end{eqnarray} Hence, by applying Taylor expansion for $l'$ at $\vw$ and $R'$ at $\vbeta_0$, we have \begin{eqnarray} \vX^{\t}l'(\vw)-\lambdaR'(\vbeta_0) &=& \left(\vX^{\t}\text{diag}{\fl''(\vw_{\vxi})}\vX+\lambda\text{diag}{R''(\vbeta_{\vxi'})}\right)(\hvb-\vbeta_0) , \nonumber \end{eqnarray} where $\ve_j^{\t}\vbeta_{\vxi'}=\xi'_j\ve_j^{\t} \vbeta_0+(1-\xi'_j)\ve_j^{\t} \hvb$ for some $\xi'_j \in [0,1]$ and $j$th diagonal component of $\text{diag}{\fl''(\vw_{\vxi})}$ is $l''(\xi_{j}w_j+(1-\xi_{j}) \vrx{j}^{\t}(\vbeta_0-\hvb))$ for some $\xi_{j}\in [0,1]$. Then, by Matrix Inversion Lemma and Assumption O.\ref{ass:Smoothness}, it is straightforward to show that \begin{equation} \label{eq:Con_eq_3} \begin{split} \|\hvb-\vbeta_0\|^2 &= \left\|\left(\vX^{\t}\text{diag}{\fl''(\vw_{\vxi})}\vX+\lambda\text{diag}{R''(\vbeta_{\vxi'})}\right)^{-1}(\vX^{\t}l'(\vw)-\lambdaR'(\vbeta_0))\right\|^2 \\ &\leq \left\|\left(\vX^{\t}\text{diag}{\fl''(\vw_{\vxi})}\vX\right)^{-1}(\vX^{\t}l'(\vw)-\lambdaR'(\vbeta_0))\right\|^2 \\ &\leq \kappa_l^{-1}\left\|\left(\vX^{\t}\vX\right)^{-1}(\vX^{\t}l'(\vw)-\lambdaR'(\vbeta_0))\right\|^2 \\ &\leq \kappa_l^{-1}\left\|\left(\vX^{\t}\vX\right)^{-1}\vX^{\t}l'(\vw)\right\|^2+\frac{\lambda^2}{\kappa_l}\left\|\left(\vX^{\t}\vX\right)^{-1}R'(\vbeta_0)\right\|^2 . \end{split} \end{equation} Hence, we have \begin{equation} \bbE \left(\frac{\|\hvb-\vbeta_0\|^2}{n}\right)^r \ \leq\ O\left(\frac{1}{\kappa_l^r}\right)\cdot \left(\underbrace{\bbE\frac{\left\|\left(\vX^{\t}\vX\right)^{-1}\vX^{\t}l'(\vw)\right\|^{2r}}{n^r}}_{\text{part 5}}+ \underbrace{\bbE\frac{\left\|\left(\vX^{\t}\vX\right)^{-1}R'(\vbeta_0)\right\|^{2r}}{n^r}}_{\text{part 6}}\right) . \label{eq:Con_eq_4} \end{equation} For part 5, we have \begin{eqnarray} \bbE\frac{\left\|\left(\vX^{\t}\vX\right)^{-1}\vX^{\t}l'(\vw)\right\|^{2r}}{n^r} &\leq& \bbE\left(\frac{\sigma_{\max}\left(\vX(\vX^{\t}\vX)^{-2}\vX^{\t}\right)\|l'(\vw)\|^2}{n}\right)^r \nonumber\\ &=& \bbE\left(\frac{\sigma_{\max}\left(\left(\vX^{\t}\vX\right)^{-1}\right)\|l'(\vw)\|^2}{n}\right)^r \nonumber\\ &\stackrel{\text{(i)}}{=}& \bbE\frac{1}{\sigma_{\min}^r(\vX^{\t}\vX)}\bbE\left(\frac{\sum_{i=1}^nl'(w_i)^2}{n}\right)^r \nonumber\\s &\leq& \bbE\frac{1}{\sigma_{\min}^r(\vX^{\t}\vX)}\bbE l'(w)^{2r} \nonumber\\ &\leq& \bbE\frac{1}{\sigma_{\min}^r(\vX^{\t}\vX)}\bbE (1+|w|^{\rho+1})^{2r}\cdot O(1) \nonumber\\ &\leq& \bbE\frac{1}{\sigma_{\min}^r(\vX^{\t}\vX)}\cdot O(1) ,\nonumber \end{eqnarray} where $\sigma_{\max}(\bm{M})$ and $\sigma_{\min}(\bm{M})$ denote the maximum and minimum eigenvalues of matrix $\bm{M}$ respectively. Furthermore, Equality (i) holds since $\vw$ and $\vX$ are independent. Finally, the last two inequalities are due to Assumptions O.\ref{ass:Smoothness2} and O.\ref{ass:True}. To bound $\bbE\frac{1}{\sigma_{\min}^r(\vX^{\t}\vX)}$, we claim the following lemma: \begin{lemma}\label{lem:socomp} For all fixed $r\geq 0$, we have \begin{eqnarray} \bbE\frac{1}{\sigma_{\min}^r(\vX^{\t}\vX)} \= O(1) . \label{eq:socomp_eq1} \end{eqnarray} \end{lemma} \noindent The proof of this lemma can be found in Section \ref{sec:socomp}. Hence, with Assumption O.\ref{ass:True}, we have \[ \bbE\frac{\left\|\left(\vX^{\t}\vX\right)^{-1}\vX^{\t}l'(\vw)\right\|^{2r}}{n^r} \ \leq\ O(1) . \] Similarly, part 6 is $O(1)$ as well. Therefore, according to \eqref{eq:Con_eq_4}, for all $r\in \bbN$ we have \begin{eqnarray} \bbE \left(\frac{\|\hvb-\vbeta_0\|^2}{n}\right)^r \ \leq\ O\left(\frac{1}{\kappa_l^r}\right) . \label{eq:Con_eq_5} \end{eqnarray} Similarly, for all $r\in \bbN$ we have \begin{eqnarray} \bbE \left(\frac{\|\loovb{1}-\vbeta_0\|^2}{n}\right)^r \ \leq\ O\left(\frac{1}{\kappa_l^r}\right) . \label{eq:Con_eq_6} \end{eqnarray} Hence, part 3 in \eqref{eq:Con_eq_2} is bounded by $O\left(\frac{1}{n\kappa_l^{2\rho+4}}\right)$. To bound part 4 in \eqref{eq:Con_eq_2}, consider the following definitions: \begin{eqnarray} \delta_1 &=& l(y_1-\vrx{1}^{\t}\loovb{1})-\bbE[l(y_1-\vrx{1}^{\t}\loovb{1})\big|\mathcal{D}_1] , \nonumber\\ \delta_2 &=& l(y_2-\vrx{2}^{\t}\loovb{2})-\bbE[l(y_2-\vrx{2}^{\t}\loovb{2})\big|\mathcal{D}_2] , \nonumber\\ \delta_{12} &=& l(y_1-\vrx{1}^{\t}\loovb{\{1,2\}})-\bbE[l(y_1-\vrx{1}^{\t}\loovb{\{1,2\}})\big|\mathcal{D}_{1}] , \nonumber\\ \delta_{21} &=& l(y_2-\vrx{2}^{\t}\loovb{\{1,2\}})-\bbE[l(y_2-\vrx{2}^{\t}\loovb{\{1,2\}})\big|\mathcal{D}_2] , \nonumber \end{eqnarray} where $\loovb{\{1,2\}}$ is the minimizer of \eqref{eq:model} without the first and second observations $(\vrx{1},y_1)$ and $(\vrx{2},y_2)$, i.e., \[ \loovb{\{1,2\}} \= \argmin_{\vbeta \in \bbR^{p}}\sum_{i=3}^n l(y_i-\vrx{i}^{\t}\vbeta)+\lambda \sum_{i=1}^p R(\beta_i) . \] Since $\loovb{\{1,2\}}$ is independent of both the first and second observations, it is straightforward to show that \begin{eqnarray} 0 &=& \bbE \delta_1\delta_{21} \= \bbE \delta_{12}\delta_2 \= \bbE \delta_{12}\delta_{21} . \nonumber \end{eqnarray} Hence, we have \begin{eqnarray} \lefteqn{\text{part 4} \= \bbE \delta_1\delta_2 \= \bbE (\delta_1-\delta_{12})(\delta_2-\delta_{21})} \nonumber\\ &=& \text{part 7}+\text{part 8}+\text{part 9}+\text{part 10} , \nonumber \end{eqnarray} where \begin{eqnarray} \text{part 7} &=& \bbE \left(l(y_1-\vrx{1}^{\t}\loovb{1})-l(y_1-\vrx{1}^{\t}\loovb{\{1,2\}})\right) \nonumber\\ && \times \left(l(y_2-\vrx{2}^{\t}\loovb{2})-l(y_2-\vrx{2}^{\t}\loovb{\{1,2\}})\right) \nonumber\\ \text{part 8} &=& \bbE \left(l(y_1^{\text{new}}-(\vrx{1}^{\text{new}})^{\t}\loovb{1})-l(y_1^{\text{new}}-(\vrx{1}^{\text{new}})^{\t}\loovb{\{1,2\}})\right) \nonumber\\ && \times \left(l(y_2-\vrx{2}^{\t}\loovb{2})-l(y_2-\vrx{2}^{\t}\loovb{\{1,2\}})\right) \nonumber\\ \text{part 9} &=& \bbE \left(l(y_1-\vrx{1}^{\t}\loovb{1})-l(y_1-\vrx{1}^{\t}\loovb{\{1,2\}})\right) \nonumber\\ && \times \left(l(y_2^{\text{new}}-(\vrx{2}^{\text{new}})^{\t}\loovb{2})-l(y_2^{\text{new}}-(\vrx{2}^{\text{new}})^{\t}\loovb{\{1,2\}})\right) \nonumber\\ \text{part 10} &=& \bbE \left(l(y_1^{\text{new}}-(\vrx{1}^{\text{new}})^{\t}\loovb{1})-l(y_1^{\text{new}}-(\vrx{1}^{\text{new}})^{\t}\loovb{\{1,2\}})\right) \nonumber\\ && \times \left(l(y_2^{\text{new}}-(\vrx{2}^{\text{new}})^{\t}\loovb{2})-l(y_2^{\text{new}}-(\vrx{2}^{\text{new}})^{\t}\loovb{\{1,2\}})\right) , \nonumber \end{eqnarray} where $(\vrx{1}^{\text{new}},y_1^{\text{new}})$ and $(\vrx{2}^{\text{new}},y_2^{\text{new}})$ are two independent copies of $(\vrx{1},y_1)$ and $(\vrx{2},y_2)$. We will show that part 7 can be bounded by $O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right)$ and then part 8, 9 and 10 can be bounded by $O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right)$ following a similar argument. To bound part 7, note that $\loovb{1}, \loovb{2}$ and $\loovb{\{1,2\}}$ should satisfy the following: \begin{eqnarray} 0 &=& -\vX^{\t}l'(\vy-\vX\loovb{1})+l'(y_1-\vrx{1}\loovb{1})\vrx{1}+\lambda R'(\loovb{1}) , \nonumber\\ 0 &=& -\vX^{\t}l'(\vy-\vX\loovb{2})+l'(y_2-\vrx{2}\loovb{2})\vrx{2}+\lambda R'(\loovb{2}) , \nonumber\\ 0 &=& -\vX^{\t}l'(\vy-\vX\loovb{\{1,2\}})+l'(y_1-\vrx{1}\loovb{1,2})\vrx{1}+l'(y_2-\vrx{2}\loovb{1,2})\vrx{2}+\lambda R'(\loovb{\{1,2\}}) . \nonumber \end{eqnarray} Hence, applying Taylor expansion, we have \begin{eqnarray} \loovb{1}-\loovb{\{1,2\}} &=& l'(y_2-\vrx{2}^{\t}\loovb{1,2})(\vB_{2,\vxi,\vxi'})^{-1}\vrx{2} , \nonumber\\ \loovb{2}-\loovb{\{1,2\}} &=& l'(y_1-\vrx{1}^{\t}\loovb{1,2})(\vB_{1,\vxi,\vxi'})^{-1}\vrx{1} , \nonumber\\ \end{eqnarray} and \begin{eqnarray} \lefteqn{\left(l(y_1-\vrx{1}^{\t}\loovb{1})-l(y_1-\vrx{1}^{\t}\loovb{\{1,2\}})\right)\left(l(y_2-\vrx{2}^{\t}\loovb{2})-l(y_2-\vrx{2}^{\t}\loovb{\{1,2\}})\right)} \nonumber\\ &=& \vrx{1}^{\t}(\loovb{1}-\loovb{\{1,2\}})l'(y_1-\vrx{1}^{\t}\loovb{1}_{\xi})\vrx{2}^{\t}(\loovb{2}-\loovb{\{1,2\}})l'(y_2-\vrx{2}^{\t}\loovb{2}_{\xi}) \nonumber\\ &=& \vrx{1}^{\t}(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2}\vrx{2}^{\t}(\vB_{2,\vxi,\vxi'})^{-1}\vrx{1}l'(y_2-\vrx{2}^{\t}\loovb{1,2}) \nonumber\\ && \timesl'(y_1-\vrx{1}^{\t}\loovb{1}_{\xi})l'(y_1-\vrx{1}^{\t}\loovb{1,2})l'(y_2-\vrx{2}^{\t}\loovb{2}_{\xi}) , \nonumber \end{eqnarray} where $\vB_{1,\vxi,\vxi'},\vB_{2,\vxi,\vxi'}$ are defined by \begin{eqnarray} \vB_{1,\vxi,\vxi'} &=& \vX_{\backslash\{1,2\}}^{\t}\text{diag}{\fl''(\vy-\vX_{\backslash \{1,2\}}\loovb{1}_{\xi})}\vX_{\backslash \{1,2\}}+\lambda\text{diag}{R''(\loovb{1}_{\xi})} , \nonumber\\ \vB_{2,\vxi,\vxi'} &=& \vX_{\backslash\{1,2\}}^{\t}\text{diag}{\fl''(\vy-\vX_{\backslash \{1,2\}}\loovb{2}_{\xi'})}\vX_{\backslash \{1,2\}}+\lambda\text{diag}{R''(\loovb{2}_{\xi'})} , \nonumber \end{eqnarray} and $\loovb{1}_{\xi},\loovb{2}_{\xi'}$ lie between $\loovb{1}$ and $\loovb{\{1,2\}}$ or $\loovb{2}$ and $\loovb{\{1,2\}}$ respectively. Then, by the Cauchy inequality, we have \begin{eqnarray} (\text{part 7})^4 &\leq& \bbE(\vrx{1}^{\t}(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2})^4\times \bbE(\vrx{2}^{\t}(\vB_{2,\vxi,\vxi'})^{-1}\vrx{1})^4 \nonumber\\ &&\times \left(\bbE\left(l'(y_2-\vrx{2}^{\t}\loovb{1,2})l'(y_1-\vrx{1}^{\t}\loovb{1}_{\xi})l'(y_1-\vrx{1}^{\t}\loovb{1,2})l'(y_2-\vrx{2}^{\t}\loovb{2}_{\xi})\right)^2\right)^2 \nonumber\\ &\leq& O\left(\frac{1}{\kappa_l^{16\rho+16}}\right)\cdot \bbE(\vrx{1}^{\t}(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2})^4\times \bbE(\vrx{2}^{\t}(\vB_{2,\vxi,\vxi'})^{-1}\vrx{1})^4 , \nonumber \end{eqnarray} where the proof of the last inequality is similar to the proof we gave for bounding part 3 above. To bound $\bbE(\vrx{1}^{\t}(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2})^4$, note that $\vrx{1}$ is independent of $(\vB_{2,\vxi,\vxi'})^{-1}\vrx{2}$ and therefore, we have \[ \vrx{1}^{\t}(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2}\big| \mathcal{D}_1 \ \stackrel{d}{=}\ \mathcal{N}(0,\frac{\|(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2}\|^2}{n}) . \] Further, by Matrix Inversion Lemma, we can bound $\|(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2}\|$ by $\frac{1}{\kappa_l}\|(\vX_{\backslash\{1,2\}}^{\t}\vX_{\backslash\{1,2\}})^{-1}\vrx{2}\|$. Hence, we have \begin{eqnarray} \bbE(\vrx{1}^{\t}(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2})^4 &=& 3\bbE \frac{\|(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2}\|^4}{n^2} \nonumber\\ &\leq& O\left(\frac{1}{n^2\kappa_l^4}\right)\cdot \bbE\|(\vX_{\backslash\{1,2\}}^{\t}\vX_{\backslash\{1,2\}})^{-1}\vrx{2}\|^4 \nonumber\\ &\leq& O\left(\frac{1}{n^2\kappa_l^4}\right)\cdot \bbE ~3\cdot \text{Tr}\left(\frac{(\vX_{\backslash\{1,2\}}^{\t}\vX_{\backslash\{1,2\}})^{-4} }{n^2}\right) , \nonumber \end{eqnarray} where the last equality is due to the fact that $\vrx{2}$ is a Gaussian vector and is independent of $\vX_{\backslash\{1,2\}}$. Due to \cite{graczyk2003complex}[Theorem 4], we have \[ \bbE(\vrx{1}^{\t}(\vB_{1,\vxi,\vxi'})^{-1}\vrx{2})^4 \ \leq\ O\left(\frac{1}{n^2\kappa_l^4}\right) . \] Similarly, we have \[ \bbE(\vrx{2}^{\t}(\vB_{2,\vxi,\vxi'})^{-1}\vrx{1})^4 \ \leq\ O\left(\frac{1}{n^2\kappa_l^4}\right) . \] Hence, we have proved that part 7 is $O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right)$. By using similar techniques we can prove that parts 8 to 10 are bounded by $O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right)$. Therefore, part 4 is bounded by $O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right)$. Together with the fact that part 3 is bounded by $O\left(\frac{1}{n\kappa_l^{2\rho+4}}\right)$, we have shown that the variance of part 1 is bounded by $O\left(\frac{1}{n\kappa_l^{4\rho+6}}\right)$. \subsection{Proof of Lemma \ref{lem:socomp}}\label{sec:socomp} Let $\bm{W}$ denote a random matrix drawn from the standard Wishart distribution $W_{p}(n,\vI)$. Let $\lambda_1\geq \lambda_2\ldots\geq\lambda_p$ denote the eigenvalues of $\bm{W}$. Then, it is straightforward to see that bounding $\bbE\frac{1}{\sigma_{\min}^r(\vX^{\t}\vX)}$ is equivalent to bounding $\bbE\frac{n^r}{\lambda_p^r}$. According to \cite{chen2005condition}[Lemma 3.2], offers the following upper bound for the probability density function of $\lambda_p$: \begin{eqnarray} f_p(\lambda_p) \ \leq\ \kappa_{n,p}e^{-\frac{1}{2}\lambda_p}\lambda_p^{(n-p-1)/2} , \label{eq:induction_eq_1} \end{eqnarray} where $\kappa_{n,p}=\frac{2^{(n-p-1)/2}}{\Gamma(p/2)\Gamma(n-p+1)}$ and $\Gamma(x)$ is the Gamma function. Hence, as long as $n$ and $p$ are sufficiently large, we know $\bbE\frac{n^r}{\lambda_p^r}$ exists. Further, we just need to consider $r$ to be integer since we have \[ \bbE\left(\frac{n}{\lambda_p}\right)^r \ \leq\ \bbE\left(\frac{n}{\lambda_p}\right)^{\lfloor r \rfloor}+\bbE\left(\frac{n}{\lambda_p}\right)^{\lceil r \rceil} \] Next, let us denote $c_{\delta}=\left(\frac{\delta}{\delta-1}\right)^2$ where $\delta=\frac{n}{p}$ is defined in Section \ref{sec:obj}. Then by \eqref{eq:induction_eq_1}, we have \begin{eqnarray} \bbE \left(\frac{n}{\lambda_p}\right)^r &=& \bbE\left(\frac{n}{\lambda_p}\right)^r \bbI_{\lambda_p\geq n/c_{\delta}}+\bbE\left(\frac{n}{\lambda_p}\right)^r \bbI_{\lambda_p\leq n/c_{\delta}} \nonumber\\ &\leq& c_{\delta}^r+\int_{0}^{\frac{n}{c_{\delta}}} \left(\frac{n}{\lambda_p}\right)^r \cdot \kappa_{n,p}e^{-\frac{1}{2}\lambda_p}\lambda_p^{(n-p-1)/2} \dif \lambda_p \nonumber\\ &\leq& c_{\delta}^r+n^r\int_{0}^{\frac{n}{c_{\delta}}} \kappa_{n,p}\lambda_p^{(n-p-1-2r)/2} \dif \lambda_p \nonumber\\ &=& c_{\delta}^r +\frac{\Gamma(\frac{n+1}{2})}{\Gamma(\frac{p}{2})\left(\frac{n}{2}\right)^{\frac{n-p+1}{2}}}\cdot \frac{\left(\frac{n}{\sqrt{c_{\delta}}}\right)^{n-p+1}\cdot c_{\delta}^r}{\Gamma(n-p+1)\cdot (n-p+1-2r)} . \nonumber \end{eqnarray} From \cite{chen2005condition}[Eq 2.6 and Lemma 4.1], we have \[ \frac{\Gamma(\frac{n+1}{2})}{\Gamma(\frac{p}{2})\left(\frac{n}{2}\right)^{\frac{n-p+1}{2}}} \ \leq\ 1 . \] Hence, with Stirling's approximation, we have \begin{eqnarray} \bbE \left(\frac{n}{\lambda_p}\right)^r &\leq& c_{\delta}^r+\frac{\left(\frac{n}{\sqrt{c_{\delta}}}\right)^{n-p+1}\cdot c_{\delta}^r}{\Gamma(n-p+1)\cdot (n-p+1-2r)} \nonumber\\ &\leq& O(c_{\delta}^r)\cdot \left(1+\frac{\left(\frac{n}{\sqrt{c_{\delta}}}\right)^{n-p+1}}{\left(\frac{n-p}{e}\right)^{n-p}\cdot (n-p+1-2r)}\right) \nonumber\\ &\leq& O(c_{\delta}^r)\cdot \left(1+\left(\frac{\delta}{(\delta-1)\sqrt{c_{\delta}}}\right)^{n-p+1}\right) \nonumber\\ &=& O(1) , \nonumber \end{eqnarray} where to obtain the last equality we plugged in the value of $c_{\delta}$. This completes the proof.
\section{Introduction} When $M$ is a hyperbolic 3-manifold with a single cusp, the $\text{(P)SL}_2 \mathbb{C}$ character variety for $M$ has proven to be a valuable tool in study the topology and geometry of $M$. There are too many examples to list here, but some classics are \cite{CS}, \cite{CGLS}, and \cite{Th_notes}. Although the theory of character varieties is well-developed and very useful, it is notoriously difficult to compute character varieties in specific examples, particularly as the complexity of the manifolds increases. A large class of link complements in which some computational progress has been made is the class of 2-bridge knots. Independent of the study of character varieties, these attractive links have a long history of mathematical interest. A highlight in this history, is the connection between 2-bridge links, continued fractions, and the Farey graph. In 1956, Schubert showed that 2-bridge links are classified by rational numbers and showed that continued fraction expansions of rational numbers give a natural way to diagram their corresponding link as the closure of a 4-strand braid. Famously in \cite{HT}, Hatcher and Thurston used this classification and its relationship to the Farey graph to classify the essential surfaces in 2-bridge link complements. Sakuma and Weeks \cite{SW} also used the relationship between these links and the Farey graph to construct beautiful ideal triangulations of the complements of 2-bridge links. Independently, \cite{PTGTKG} and \cite{GF} showed later that these triangulations are geometric and canonical in the sense of \cite{EP}. In \cite{RR} and \cite{RR2}, Riley began a thorough study of the $\text{(P)SL}_2 \mathbb{C}$ representations of 2-bridge knot groups. Among other things, he introduced the Riley polynomial for a 2-bridge knots, whose solutions correspond representations which take peripheral elements to parabolic matrices. Riley's formulas have been used in \cite{HLM}, \cite{HS3}, \cite{MPV}, and \cite{PT} to collectively give recursive formulas for the $\text{(P)SL}_2 \mathbb{C}$ character varieties of 2-bridge links obtained by doing $1/n$ Dehn filling on unknotted components of the links $6_1^3$, $6_2^3$, $6_3^2$, $8_2^4$, and $8_9^3$. This is a large class of links with arbitrarily large crossing numbers. However, being Dehn fillings on a hand full of links, it is quick to check that the volumes for these examples are bounded by 7.4, while the volumes of 2-bridge links can be arbitrarily large. Nonetheless, including Riley's original results, these formulas have enjoyed a variety of applications including \cite{Bu}, \cite{Chu}, \cite{G}, \cite{HS3}, \cite{HS2}, \cite{HS1}, and \cite{RW}. Here, we study the $\text{(P)SL}_2 \mathbb{C}$ character varieties of all 2-bridge knots together with the {\em diagonal} character varieties of the 2-bridge links. This makes it possible to see an attractive relationship between the defining polynomials for all of these algebraic sets. We refer to this relationship as {\em Farey recursion}. By identifying rational numbers $p/q$ with the point $p/q+i/q$ in the upper half $\H^2$ of $\mathbb{C}$, we can connect the rationals in a collection of interlocking triangles to form the Stern-Brocot diagram, see Figures \ref{fig: calG} and \ref{fig: Tri}. Each of these triangles contains exactly one rational number $p/q+i/q$ in its interior, which we call its {\em center}. The vertices that occur along the edges of this triangle form a bi-infinite sequence of rational numbers, which we refer to as the {\em boundary sequence} for $p/q$. In Section \ref{sec: Farey recursion}, we argue that there is a unique function \[\mathcal{T} \colon\thinspace \mathbb{Q}\cup \{\infty\} \to \mathbb{Z}[x,z]\] with the following properties. \begin{enumerate} \item $\mathcal{T}(0)=x$, $\mathcal{T}(\infty)=0$, and $\mathcal{T}(1)=z$; \item Given $p/q \in \mathbb{Q}$, and three successive terms $\gamma_1, \gamma_2, \gamma_3$ in the boundary sequence for $p/q$, \[ \mathcal{T}(\gamma_3) = -\mathcal{T}(\gamma_1)+\mathcal{T}(p/q) \, \mathcal{T}(\gamma_2).\] \end{enumerate} Property (2) is the {\em Farey recursion} condition. We can imagine $\mathcal{T}(\mathbb{Q})$ as a set of polynomials that are ``linearly'' recursive on the Stern-Brocot diagram, rather than on a line. Property (2) also makes it possible to compute the values of $\mathcal{T}$ relatively efficiently with a computer. Lastly, property (2) often allows us to make elementary arguments regarding $\mathcal{T}$. For instance, if we define $f \colon\thinspace \mathbb{Q} \cup \{ \infty\} \to \mathbb{Z}[x,z]$ by \[ f(p/q) = \begin{cases} x & \text{if } p \text{ is even and } q \text{ is odd}\\ z & \text{if } p \text{ and } q \text{ are odd}\\ xz & \text{if } p \text{ is odd and } q \text{ is even}\end{cases}\] and set $X=x^2$, and $Z=z^2$, an elementary inductive argument (Lemma \ref{lem: fac}) shows that \[ \mathcal{T}_0(\alpha)= \frac{\mathcal{T}(\alpha)}{f(\alpha)} \in \mathbb{Z}[X,Z]\] for every $\alpha \in \mathbb{Q} \cup \{ \infty\}$. The main theorem of this paper shows that the $\text{PSL}_2 \mathbb{C}$ character variety for the 2-bridge link $L(\alpha)$ associated to $\alpha$ is naturally identified with the complex affine algebraic set determined by $\mathcal{T}_0(\alpha)$. \theoremstyle{plain} \newtheorem*{PSL thm}{Theorem \ref{thm: PSL}} \begin{PSL thm} A point $\chi=(X_0,Z_0) \in \C^2$ is an irreducible character in $\overline{\sfD}_\alpha$ if and only if $X_0Z_0 \neq 0$ and $\chi$ satisfies the polynomial $\calT_0(\alpha)$. \end{PSL thm} Here $\overline{{\sf D}}_\alpha$ is the {\em diagonal} $\text{PSL}_2 \mathbb{C}$ character variety for the link $L(\alpha)$. In the case that $L(\alpha)$ is a knot, $\overline{{\sf D}}_\alpha$ is the full character variety of irreducible characters. It is relatively efficient to compute the character variety polynomials $\mathcal{T}_0(\alpha)$. With a simple program implemented in CoCalc \cite{sage}, we are able to compute all 6079 values for $\mathcal{T}_0$ on the set \[ \left\{ \frac{p}{q} \in \mathbb{Q} \cap [0,1/2] \, \bigg| \, q<200 \right\}\] in roughly 8 minutes. The main theorem of \cite{ORS} gives conditions on $\alpha'$ which guarantee existence of an epimorphism from the link group of $L(\alpha)$ to that of $L(\alpha')$. In Subsection \ref{subsec: epi}, we employ a natural action of the modular group on the set of polynomials $\mathcal{T}(\mathbb{Q} \cup \{ \infty\})$ to understand when the factors of $\mathcal{T}_0(\alpha)$ must divide $\mathcal{T}_0(\alpha')$, see Corollary \ref{cor: factors}. Ultimately, this provides an elementary argument which reproduces the result in \cite{ORS}, see Corollary \ref{cor: epi}. In Subsection \ref{subsec: MPV}, we describe the relationship between our formulas and the formulas in \cite{MPV}. In \cite{RR}, Riley defines a polynomial in $\mathbb{Z}[X]$ for each rational number with odd denominator. These polynomials have since been refered to as {\em Riley polynomials}. Among other things, Riley proved that his polynomials are monic and their roots give rise to normalized {\em p-reps} for the corresponding 2-bridge knot groups. We discuss this in Section \ref{sec: Riley}, where we also show that by setting $Z=-X$ in $\mathcal{T}_0(\alpha)$ we recover the Riley polynomial and thus extend the definition for Riley polynomials to rational numbers with even denominators. Our approach provides an efficient way to compute Riley polynomials as well as access to straightforward inductive arguments concerning their properties. Again using CoCalc \cite{sage}, we are able to compute all $\Lambda_\alpha$ for each the the 13,662 numbers in \[ \left\{ \frac{p}{q} \in \mathbb{Q} \cap [0,1/2] \, \bigg| \, q<300 \right\}\] in roughly 12 minutes. To demonstrate the inductive facility of our setup, we give a quick proof that $\Lambda_\alpha$ is monic for every $\alpha$. \subsection*{Acknowledgement} Thanks to Kelly McKinnie for her numerous corrections and suggestions. \section{Surfaces} The material in this section is standard. Roughly, we follow the approach in \cite{Ford}. Let $\mathbb{X}$ be the punctured plane $\mathbb{C}-\mathbb{Z}[i]$ equipped with its usual Euclidean geometry. Define subgroups $\Gamma_O,\Gamma_S, \Gamma_T \subset\text{Isom}(\mathbb{X})$ by \begin{align*} \Gamma_O &= \left\langle \text{ order-2 rotations centered at the points in } \frac{1}{2}\, \mathbb{Z}[i] \right\rangle \\ \Gamma_S &= \Big\langle \text{ order-2 rotations centered at the points in } \mathbb{Z}[i] \, \Big\rangle \\ \Gamma_T &= \big\langle \text{ horizontal and vertical unit translations } \big\rangle. \end{align*} Then $\O=\mathbb{X}/\Gamma_O$ is a $(2,2,2,\infty)$-pillowcase orbifold, $\S=\mathbb{X}/\Gamma_S$ is a 4-punctured sphere, and $\mathbb{T}=\mathbb{X}/\Gamma_T$ is a once punctured torus. We also have a commutative diagram of covers. \[ \xymatrix{ & \mathbb{X} \ar[dl] \ar[dr] \\ \mathbb{T} \ar[dr]_2 & & \S \ar[dl]^4 \\ & \O} \] Take $\tilde{x}= (1/4, 1/4)$ as a basepoint in $\mathbb{X}$. Consider the paths \begin{align*} &\frac{e^{\frac{3 \pi i }{4}}}{2\sqrt{2}} \, e^{t \pi i } + \frac{1}{2} & &\frac{e^{\frac{5 \pi i }{4}}}{2\sqrt{2}} \, e^{t \pi i } + \frac{1}{2}(1+i) & &\frac{e^{\frac{7 \pi i }{4}}}{2\sqrt{2}} \, e^{t \pi i } + \frac{i}{2} \end{align*} in $\mathbb{X}$ based at $\tilde{x}$ and let $\tilde{p}$, $\tilde{q}$, and $\tilde{r}$ be their respective homotopy classes (rel $\partial$). Then, if $p$, $q$, and $r$ are the corresponding elements of $\pi_1(\O)$, \[ \pi_1(\O) = \left\langle p, q, r \mid p^2, q^2, r^2 \right\rangle.\] Let $k_0=rpq$ and observe that $k_0$ is primitive and peripheral. Define \begin{align*} a&=rq & &\text{and} & b&=qp. \end{align*} We also let $A=a^{-1}$ and $B=b^{-1}$. As a subgroup of $\pi_1(\O)$, $\pi_1(\mathbb{T})$ is the rank-2 free group generated by $a$ and $b$. Moreover, the corresponding deck transformations are translations by $-1$ and $i$ respectively. The commutator $[a,b]=k_0^2$ is primitive and peripheral in $\pi_1 \mathbb{T}$. \begin{figure}[h] \centering \includegraphics[width=2in]{X.pdf} \caption{Paths in $\mathbb{X}$.} \label{fig: X} \end{figure} Define distinguished conjugates \begin{align*} k_1&= pk_0p & k_2&=qk_0q & k_3&=rk_0r \end{align*} of $k_0$. As a subgroup of $\pi_1(\O)$, $\pi_1(\S)$ is the rank-3 free group generated by the peripheral elements $k_0$, $k_1$, and $k_2$. The product $k_0k_2k_1k_3$ is trivial and \begin{align*} a^2&= k_3^{-1}k_2^{-1} & B^2&= k_3k_0 & (aB)^2&=k_3^{-1}k_2k_3k_0. \end{align*} \section{$\mathbf{ \text{PSL}_2 \mathbb{C}}$ representations} \label{sec: reps} Given ${\bf z}=(x,z) \in \mathbb{C}^2$ we can find $t \in \mathbb{C}-\{0\}$ so that \begin{align} \label{eq: Markov} x^2+z^2+\left( t - t^{-1} \right)^2 &=0. \end{align} We refer to the pair ${\bf z},t$ as a {\bf parameter pair}. Every parameter pair ${\bf z},t$ determines a representation $\rho_{{\bf z}, t} \colon\thinspace \pi_1 \O \to \text{PSL}_2 \mathbb{C}$ as follows. If $x=0$, define \begin{align*} \rho_{{\bf z}, t}(p) & = \begin{bmatrix} 0&1\\-1&0 \end{bmatrix} & \rho_{{\bf z}, t}(q) & = \begin{bmatrix} i&0 \\ 0 & -i \end{bmatrix} & \rho_{{\bf z}, t}(r) & = \begin{bmatrix} 0& it \\ \frac{i}{t} & 0 \end{bmatrix}. \end{align*} If $x \neq 0$ and $z=0$, define \begin{align*} \rho_{{\bf z}, t}(p) & = \begin{bmatrix} i&0 \\ 0 & -i \end{bmatrix} & \rho_{{\bf z}, t}(q) & = \begin{bmatrix} 0&1\\-1&0 \end{bmatrix} & \rho_{{\bf z}, t}(r) & = \begin{bmatrix} 0& it \\ \frac{i}{t} & 0 \end{bmatrix}. \end{align*} If $xz \neq 0$, define \begin{align*} \rho_{{\bf z}, t}(p) & = \frac{1}{x} \, \begin{bmatrix} t^{-1}-t & -1 \\ -z^2 & t-t^{-1} \end{bmatrix} \\ \rho_{{\bf z}, t}(q) & = \frac{1}{z} \, \begin{bmatrix} 0 & 1 \\ -z^2 & 0 \end{bmatrix} \\ \rho_{{\bf z}, t}(r) & = \frac{1}{x} \, \begin{bmatrix} -z \,t^{-1} & z+t^2 \,z^{-1} -z^{-1} \\ z\, (1-t^{-2}) & z \, t^{-1} \end{bmatrix}. \end{align*} Straightforward calculations verify that, in all cases, \begin{align*} \mathrm{Tr} \big( \rho_{{\bf z}, t}(a) \big) &= \pm x & \mathrm{Tr} \big( \rho_{{\bf z}, t}(b) \big) &= 0 & \mathrm{Tr} \big( \rho_{{\bf z}, t}(aB) \big) &= \pm z. \end{align*} Also, if $x=0$, then \[ \rho_{{\bf z}, t}(k_0) = \rho_{{\bf z}, t}(k_1^{-1})= \begin{bmatrix} t & 0 \\ 0 & t^{-1} \end{bmatrix}, \] if $x \neq 0$ and $z=0$, then \[ \rho_{{\bf z}, t}(k_0) = \rho_{{\bf z}, t}(k_1)= \begin{bmatrix} t & 0 \\ 0 & t^{-1} \end{bmatrix}, \] and, if $x z \neq 0$, then \begin{align*} \rho_{{\bf z}, t}(k_0) &= \begin{bmatrix} t & 1 \\ 0 & t^{-1} \end{bmatrix} & \rho_{{\bf z},t}(k_1) &= \begin{bmatrix} t & 0 \\ z^2 & t^{-1} \end{bmatrix}. \end{align*} Note that $\rho_{{\bf z}, t}$ is irreducible if and only if $xz \neq 0$. \section{Slopes and essential simple closed curves} Lines in $\mathbb{X}$ with rational slopes descend to essential simple closed curves on $\O$, $\mathbb{T}$, and $\S$. In fact, there are bijections from $\wh{\mathbb{Q}}=\mathbb{Q} \cup \{ 1/0 \}$ to the set of conjugacy classes in $\pi_1(\O)$, $\pi_1(\mathbb{T})$, and $\pi_1(\S)$ whose corresponding free homotopy classes are represented by essential simple closed curves. For example, in $\pi_1(\mathbb{T})$ the slope of the class containing $a$ is zero and the slope of the class containing $b$ is infinite. Given $\alpha \in \mathbb{Q}_0= \mathbb{Q} \cap [0,1]$ and an $\text{SL}_2 \mathbb{C}$ representation of $\pi_1(\O)$, $\pi_1(\S)$, or $\pi_1(\mathbb{T})$, it is surprisingly easy to find elements of $\pi_1(\S)$ and $\pi_1(\mathbb{T})$ which represent the slope $\alpha$ and to compute their traces under the representation. To show how this is done, it will be helpful to first discuss the Farey sum and the Stern-Brocot diagram. \subsection{Farey sums and the Stern-Brocot diagram} \label{ssec: FSSBD} Throughout the remainder of the paper, when we write elements of $\mathbb{Q}$ as integer quotients, we will always write them in lowest terms with positive denominators. If $p/q$ and $r/s$ are elements of $\wh{\mathbb{Q}}$ such that $ps-rq=\pm1$, then $\{ p/q, r/s \}$ is called a {\bf Farey pair}. The {\bf Farey sum} of $p/q$ and $r/s$ is defined as \[ \frac{p}{q} \oplus \frac{r}{s} = \frac{p+r}{q+s}.\] It is remarkable that if $\{ p/q, r/s \}$ is a Farey pair then $p+r$ and $q+s$ are relatively prime. Notice that every Farey pair is a subset of exactly two {\bf Farey triples}. There is a closely related geometric graph $\mathcal{G}$ embedded in the upper-half space $\H^2 \subset \mathbb{C}$. The vertices of $\mathcal{G}$ correspond to $\mathbb{Q}$ and the edges correspond to Farey pairs. More precisely, for $\frac{p}{q} \in \mathbb{Q}$, define $v_{\frac{p}{q}} = \frac{p}{q}+\frac{i}{q} \in \H^2$. The set \[ \left\{ v_\alpha \, | \, \alpha \in \mathbb{Q} \right\}\] constitutes the vertices of $\mathcal{G}$ and the edges of $\mathcal{G}$ are the straight line segments between Farey pairs of vertices. (We will often blur the distinction between a number $\alpha \in \mathbb{Q}$ and its vertex $v_\alpha$.) See Figure \ref{fig: calG} below as well as Figure 1.3 of \cite{HO}. Here, we refer to $\mathcal{G}$ as the {\bf Stern-Brocot diagram}. Elementary properties of the Farey sum and Farey pairs imply that every intersection between a distinct pair of edges in $\mathcal{G}$ occurs at a vertex of $\mathcal{G}$. \begin{figure}[h] \centering \includegraphics[width=5in]{SBdiag1.pdf} \caption{The portion of $\mathcal{G}$ spanned by fractions in $[-2,2]$ with denominator at most 15.} \label{fig: calG} \end{figure} Suppose $\alpha \in \mathbb{Q}$. The graph theoretical neighborhood $\Delta(\alpha)$ of $v_\alpha$ in $\mathcal{G}$ is, by definition, the subgraph spanned by the vertices which are Farey pairs with $\alpha$, see Figure \ref{fig: Tri}. \begin{figure}[h] \centering \includegraphics[width=1.2in]{Tri.pdf} \caption{$\Delta\left( \frac{2}{7} \right)$.} \label{fig: Tri} \end{figure} If $\alpha \in \mathbb{Q} - \mathbb{Z}$ then $\Delta(\alpha)$ corresponds to a triangle with an ideal vertex at $\alpha \in \mathbb{R}$. This triangle contains exactly one vertex of $\mathcal{G}$ in its interior, namely $v_\alpha$. For this reason, we refer to $\Delta(\alpha)$ as the {\bf triangle centered at} $\mathbf{v_\alpha}$. Its ideal vertex $\alpha$ is called its {\bf tip}. Emanating from the tip of $\Delta(\alpha)$ are its left and right sides whose slopes are $\pm q$, where $q$ is the denominator of $\alpha$. The vertices at the tops of these edges are called the left and right {\bf corners} of $\Delta(\alpha)$. The {\bf positive} (resp. negative) {\bf vertex sequence} $\partial_+(\alpha)$ (resp. $\partial_-(\alpha)$) of $\Delta(\alpha)$ is defined to be the ordered sequence of vertices down the side of $\Delta(\alpha)$ whose slope is positive (resp. negative). In fact, if $\kappa_\pm$ is the corner on this side, then \begin{align} \label{bound} \partial_\pm ( \alpha) = \left\{\left( \oplus_0^j \alpha \right) \oplus \kappa_\pm \right\}_{j=0}^\infty. \end{align} We write $\partial(\alpha)$ to denote the bi-infinite sequence formed by reversing $\partial_-(\alpha)$ and juxaposing the sequence $\partial_+(\alpha)$ and we refer to $\partial (\alpha)$ as the {\bf boundary sequence} for $\alpha$. The Stern-Brocot diagram and our notions of triangles, edges, and corners all extend nicely to include an additional vertex for $1/0$. To do this, add a vertex $v_{1/0}$ and an edge from $v_{1/0}$ to each integer vertex of $\mathcal{G}$. The triangles centered at integers and at $1/0$ involve the new vertex $v_{1/0}$. They are exceptional in that they each have two sides but only one corner. We explicitly define their vertex sequences by listing their terms. Let $n \in \mathbb{Z}$ and define \begin{align*} \partial_- \left(1/0\right) &= \left\{ 0, -1, -2, -3, \ldots \right\} \\ \partial_+ \left(1/0\right) &= \left\{ 0, 1, 2, 3, \ldots \right\} \\ \partial_- (n) &= \left\{ \frac{1}{0}, n-1, \frac{2n-1}{2}, \frac{3n-1}{3}, \ldots \right\} \\ \partial_+ (n) &= \left\{ \frac{1}{0}, n+1, \frac{2n+1}{2}, \frac{3n+1}{3}, \ldots \right\}. \end{align*} In the boundary sequences $\partial(1/0)$ and $\partial(n)$, we do not repeat the duplicate corner, for instance, $\partial(1/0)$ is the ordered sequence of integers. Also, if we allow $\frac{1}{0}=\frac{-1}{0}$ and $\frac{0}{1}=\frac{0}{-1}$ and choose appropriate representatives, then the Farey sum formulas (\ref{bound}) still apply in these exceptional cases. There is a direct correlation between $\mathcal{G}$ and the Farey Graph. In \cite{Hat}, Hatcher points out that if the vertices of $\mathcal{G}$ are pushed straight down to $\mathbb{R} \subset \H^2$ and the edges follow their endpoints, ultimately forming geodesics in $\H^2$, the result is the Farey graph. The next lemma will be useful later in this paper. \begin{lemma} \label{lem: properside} Given $\alpha \in \mathbb{Q}-\mathbb{Z}$ there is a number $\gamma \in \mathbb{Q}$ where $\alpha$ is at least the third term of a vertex sequence for $\Delta(\gamma)$. \end{lemma} \proof If the denominator of $\alpha$ is two, then $\alpha$ is the third term of a sequence $\partial_+(n)$ for some $n \in \mathbb{Z}$. So, we may assume that the denominator of $\alpha$ is larger than two. Since the denominator of $\alpha$ is larger than two, $\Delta(\alpha)$ has two corners, $\kappa_\pm \in \mathbb{Q}$, each of which lies above $\alpha$ in $\mathcal{G}$. The Farey pair condition forces the denominators of $\kappa_+$ and $\kappa_-$ to be distinct. Without loss of generality, assume that the denominator of $\kappa_-$ is smaller than that of $\kappa_+$. We know that $\alpha$ comes after $\kappa_+$ in the sequence $\partial_+(\kappa_-)$. Because the denominator of $\kappa_+$ is larger than that of $\kappa_-$, we also know that $\kappa_+$ is not the first term of this sequence. Hence, $\alpha$ is at least the third term of $\partial_+(\kappa_-)$. \endproof Let $G$ be the extended modular group \[ G=\text{PSL}_2 \mathbb{Z} \oplus \left\langle \begin{bmatrix} -1&0 \\ 0&1 \end{bmatrix} \right\rangle.\] Every element of $G$ determines an invertible M\"{o}bius transformation and these transformations preserve Farey pairs when applied to $\wh{\mathbb{Q}}$. This gives an action of $G$ on $\mathcal{G}$. Although this action preserves triangles, it does not preserve their corners. For instance, if $\phi=\left[ \begin{smallmatrix} -1&1 \\ -4&3 \end{smallmatrix} \right]$ then $\phi$ fixes $\frac{1}{2}$ and preserves $\partial\left( \frac{1}{2} \right)$. On the other hand, $\phi$ acts non-trivially on $\partial \left( \frac{1}{2} \right)$ taking each term to its neighbor on the left. \subsection{Words of slope $\mathbf{\alpha}$} There is a function $\Omega \colon\thinspace \wh{\mathbb{Q}}_0 \to \pi_1(\O)$ which is uniquely determined by the following two properties \begin{enumerate} \item If $\{\alpha, \beta\}$ is a Farey pair in $\wh{\mathbb{Q}}_0$ and $\alpha<\beta$ then \[ \Omega(\alpha \oplus \beta) = \Omega(\alpha) \, \Omega(\beta).\] \item $ \Omega(0)= a $ and $ \Omega(1/0)=B$. \end{enumerate} Here, we use the convention that $0/1<1/0$. If $\alpha$ is a positive rational number which is not in $\mathbb{Q}_0$, we define $\Omega(\alpha)$ to be the word obtained from $\Omega(1/\alpha)$ by swapping $a$'s and $B$'s. If $\alpha$ is a negative rational number, we define $\Omega(\alpha)$ to be the word obtained from $\Omega(-\alpha)$ by replacing $B$'s with $b$'s. This determines an extension $\Omega \colon\thinspace \wh{\mathbb{Q}} \to \pi_1(\O)$. The next proposition is established in \cite{MDS} and \cite{S}. \begin{prop} $\Omega(\alpha)$ has slope $\alpha$ in $\O$ and $\mathbb{T}$. \end{prop} \begin{remark}If we consider the cover $\S \to \O$, we see that $\Omega(\alpha)^2$ has slope $\alpha$ in $\S$. \end{remark} \section{Trace functions and Farey recursion.} \label{sec: Farey recursion} \subsection{Farey recursion} Suppose that $R$ is a commutative ring and $d \colon\thinspace \wh{\mathbb{Q}} \to R$ is a function. A function $\mathcal{F} \colon\thinspace \wh{\mathbb{Q}} \to R$ is a {\bf Farey recursive function} (FRF) with {\bf determinant} $d$ if, whenever $\alpha$ and $\gamma$ make a Farey pair, then \begin{align} \label{eq: FRF} \mathcal{F}(\alpha \oplus \alpha \oplus \gamma) &= - d(\alpha) \, \mathcal{F}(\gamma) + \mathcal{F}(\alpha) \, \mathcal{F}(\alpha \oplus \gamma).\end{align} Notice that if $\{ \alpha, \gamma \}$ is a Farey pair then $\{ \alpha, \gamma, \alpha \oplus \gamma, \alpha \oplus \alpha \oplus \gamma \}$ are the vertices of a pair of adjacent triangles in the Farey graph. Suppose that $\mathcal{F}$ is an FRF with determinant $d$ and $\alpha \in \wh{\mathbb{Q}}$. Choose $\epsilon \in \{ \pm 1\}$ and let $a_j \in R$ be the element obtained by applying $\mathcal{F}$ to the $j^\text{th}$ element of $\partial_\epsilon(\alpha)$. Then the sequence $\{ a_j \}_0^\infty$ is linearly recursive and satisfies \begin{align} \label{eq: mtx} \begin{pmatrix} 0 & 1 \\ -d(\alpha) & \mathcal{F}(\alpha) \end{pmatrix} \ \begin{pmatrix} a_{j-1} \\ a_j \end{pmatrix} = \begin{pmatrix} a_j \\ a_{j+1} \end{pmatrix}\end{align} for every $j\geq 1$. We call the $2 \times 2$ matrix in Equation \ref{eq: mtx} the {\bf recursion matrix} at $\alpha$ for $\mathcal{F}$. Henceforth, we will assume that $R$ is a ring with unity $1_R$ and also that determinant functions are always constant with value $1_R$. For example, an FRF $\mathcal{F} \colon\thinspace \wh{\mathbb{Q}} \to \mathbb{C}$ with determinant 1 which satisfies the Markov condition \[ \mathcal{F}(0)^2+\mathcal{F}(1/0)^2+ \mathcal{F}(1)^2= \mathcal{F}(0) \, \mathcal{F}(1/0) \, \mathcal{F}(1)\] is called a {\bf Markov map} in \cite{Bow}. As in \cite{Bow}, if $\{ \alpha, \beta, \gamma\}$ is a Farey triple and $\{ a,b,c\} \subset R$ then there is a unique FRF $\mathcal{F} \colon\thinspace \wh{\mathbb{Q}} \to R$ with \begin{align*} \mathcal{F}(\alpha)&=a & \mathcal{F}(\beta)&=b & \mathcal{F}(\gamma)&=c. \end{align*} The next lemma shows that the sequence $\mathcal{F}(\partial(\alpha))$ is a bi-infinite linear recursive sequence with recursion matrix \[W_\alpha = \begin{pmatrix} 0&1 \\ -1 & \mathcal{F}(\alpha) \end{pmatrix}\] and the reverse of this sequence is also recursive with the same recursion matrix. \begin{lemma} Suppose that $\mathcal{F}$ is an FRF and $\alpha \in \wh{\mathbb{Q}}$. Let $\{ a_j \}_{-\infty}^\infty$ be the ordered bi-infinite sequence obtained by applying $\mathcal{F}$ to $\partial(\alpha)$. Then, for every integer $j$, \[ a_{j+1} = -a_{j-1}+\mathcal{F}(\alpha) \, a_{j} \quad \text{and} \quad a_{j-1} = -a_{j+1}+\mathcal{F}(\alpha) \, a_{j} .\] \end{lemma} \proof First, we assume that the indices for $\{ a_j\}$ are shifted so that $\mathcal{F}(\kappa_-)=a_0$ and $\mathcal{F}(\kappa_+)=a_1$, where $\kappa_\pm$ are the corners of $\Delta(\alpha)$. Notice that the first equation in the statement of the lemma holds if and only if the second does. So, to prove the lemma, it suffices to verify the equalities \[a_{1}= -a_{-1}+\mathcal{F}(\alpha) \, a_0 \quad \text{and} \quad a_{2}= -a_{0}+\mathcal{F}(\alpha) \, a_1\] occurring at the corners of $\partial(\alpha)$. The second term of $\partial_-(\alpha)$ coincides with the term in $\partial_+(\kappa_-)$ immediately following $\kappa_+$ and $\alpha$. Similarly, the second term of $\partial_+(\alpha)$ immediately follows $\kappa_-$ and $\alpha$ in the sequence $\partial_-(\kappa_+)$. Hence, the Farey recursive condition implies that \[ a_{-1}=-a_1+\mathcal{F}(\alpha) \, a_0 \quad \text{and} \quad a_2=-a_0+\mathcal{F}(\alpha) \, a_1.\] These are evidently equivalent to the equalities above. \endproof Define the {\bf generic FRF} to be the FRF \[\mathcal{U} \colon\thinspace \wh{\mathbb{Q}} \to \mathbb{Z}[x,y,z]\] determined by \begin{align*} \mathcal{U} (0)&=x & \mathcal{U} (1/0)&=y & \mathcal{U} (1)&=z. \end{align*} Consider a composition of $\mathcal{U}$ with a ring homomorphism $\mathbb{Z}[x,y,z] \to R$. Since the homomorphism preserves the Farey recursive conditions, the composition will also be an FRF. On the other hand, if $\mathcal{F} \colon\thinspace \wh{\mathbb{Q}} \to R$ is an FRF there is a unique ring homomorphism $\psi \colon\thinspace \mathbb{Z}[x,y,z] \to R$ making the diagram \[\begin{tikzcd}[column sep=large] \wh{\mathbb{Q}} \arrow{r}{\mathcal{U} } \arrow{rd}[swap]{\mathcal{F}} & \mathbb{Z}[x,y,z] \arrow{d}{\psi}\\ & R \end{tikzcd} \] commute. Hence, every FRF can be viewed as a specialization of $\mathcal{U}$. Recall, from Subsection \ref{ssec: FSSBD}, the action of the group $G$ on $\wh{Q}$. Since an element $\phi \in G$ preserves Farey pairs, the map $\mathcal{U} \circ \phi$ is a UFR. Hence, we have a homomorphism $\psi_\phi \colon\thinspace \mathbb{Z}[x,y,z] \to \mathbb{Z}[x,y,z]$ and a commutative diagram \[\begin{tikzcd}[column sep=large] \wh{\mathbb{Q}} \arrow{r}{\mathcal{U}} \arrow{d}[swap]{\phi} & \mathbb{Z}[x,y,z] \arrow{d}{\psi_\phi}\\ \wh{\mathbb{Q}} \arrow{r}{\mathcal{U}} & \mathbb{Z}[x,y,z] \end{tikzcd} \] The homomorphism $\psi_\phi$ is given by evaluating $x,y,z$ at the polynomials \[\mathcal{U}(\phi \cdot 0), \quad \mathcal{U}(\phi \cdot (1/0)), \quad \mathcal{U}(\phi \cdot 1).\] Because $\phi$ is a bijection, $\psi_\phi$ is an isomorphism with inverse $\psi_{\phi^{-1}}$. In the cases of \[\sigma= \begin{bmatrix} -1&1 \\ 0 & 1 \end{bmatrix} \quad \text{and} \quad \zeta= \begin{bmatrix} 0&1 \\ -1 & 1 \end{bmatrix},\] $\mathcal{U} (\gamma)$ and $\mathcal{U} (\sigma \cdot \gamma)$ differ by interchanging $x$ and $z$, while $\mathcal{U} (\gamma)$ and $\mathcal{U} (\zeta \cdot \gamma)$ are related by the cyclic permutation $(x \ z \ y)$ of the three variables. The $\langle \sigma, \zeta \rangle$-orbit of any $\alpha \in \wh{Q}$ intersects $\mathbb{Q}_0$, which is part of the reason for our focus on this portion of $\mathcal{G}$. As the denominator of $\alpha$ grows, the polynomial $\mathcal{U}(\alpha)$ gets complicated. The next result is a simple application of the relationship between $\mathcal{U}$ and the action $G \times \wh{\mathbb{Q}} \to \wh{\mathbb{Q}}$ which shows that the isomorphism class of the affine variety determined by $\mathcal{U}(\alpha)$ is constant. \begin{prop}\label{prop: U is irreducible} If $p \in \mathcal{U}(\wh{\mathbb{Q}})$ then $p$ is irreducible over $\mathbb{C}$. More specifically, the affine algebraic variety determined by $p$ is isomorphic to $\mathbb{C}^2$. \end{prop} \proof Suppose $p=\mathcal{U}(\alpha)$ for some $\alpha \in \wh{\mathbb{Q}}$. Then there exists $\phi \in G$ with $\phi \cdot 0=\alpha$. By definition, the isomorphism $\psi_\phi \colon\thinspace \mathbb{Z}[x,y,z] \to \mathbb{Z}[x,y,z]$ takes $x$ to $\mathcal{U}(\alpha)$. So we have isomorphic varieties \[ \mathbb{C}^2 \cong \{ (x,y,z) \in \mathbb{C}^3 \, | \, x=0 \} \cong \{ (x,y,z) \in \mathbb{C}^3 \, | \, p(x,y,z)=0\}. \] \endproof \subsection{Traces for $\mathbf{\Omega(\alpha)}$} \label{ssec: traces} Suppose that $\rho \colon\thinspace \pi_1 (\mathbb{T}) \to \text{SL}_2 \mathbb{C}$ is a representation with character $\chi_\rho$. Let \[ x_0= \chi_\rho(a), \quad y_0= \chi_\rho(B), \quad \text{and} \quad z_0= \chi_\rho(aB).\] Define the homomorphism $\psi_\rho \colon\thinspace \mathbb{Z}[x,y,z] \to \mathbb{C}$ to be evaluation at $(x_0,y_0,z_0) \in \mathbb{C}^3$. Take $\beta \in \partial(\alpha)$. Using the Cayley-Hamilton theorem, the definition of $\Omega$, and the fact that $\chi_\rho$ is constant on conjugacy classes, we find that \begin{align*} \label{eq: CH} \left(\chi_\rho \circ \Omega\right)\left(\alpha \oplus \alpha \oplus \beta\right) &= -\left(\chi_\rho \circ \Omega\right)\left( \beta \right) + \left(\chi_\rho \circ \Omega\right)\left(\alpha\right) \left(\chi_\rho \circ \Omega\right)\left(\alpha \oplus \beta \right). \end{align*} In other words, the trace function $\chi_\rho \circ \Omega$ is a UFR and \[ (\chi_\rho \circ \Omega)(\alpha) = \psi_\rho \circ \mathcal{U} (\alpha).\] The set of all such FRFs is precisely the set of Markov maps from \cite{Bow}. Any two elements of $\pi_1(\mathbb{T})$ which are represented by loops freely homotopic to a closed curve with slope $\alpha$ are conjugage in $\pi_1(\mathbb{T})$. So, if $\omega \in \pi_1 \mathbb{T}$ is such an element, then $\chi_\rho(\omega)=\psi_\rho \circ \mathcal{U} (\alpha)$. If instead, $\rho$ is a representation into $\text{PSL}_2 \mathbb{C}$, then $x_0$, $y_0$, and $z_0$ are only defined up to sign, as is $\mathrm{Tr}(\rho(w))$. If we choose these signs arbitrarily, then $ \mathrm{Tr}(\rho(\omega)) = \pm (\psi_\rho \circ \mathcal{U} (\alpha))$. In this paper, we are concerned with representations of 2-bridge link groups. As we will see, this leads us to consider representations with $y_0=0$. Let \[\psi_\mathcal{T} \colon\thinspace \mathbb{Z}[x,y,z] \to \mathbb{Z}[x,z]\] be the evaluation $y=0$. Define the FRF \[\mathcal{T} \colon\thinspace \wh{\mathbb{Q}} \to \mathbb{Z}[x,z]\] by $\mathcal{T} = \psi_\mathcal{T} \circ \mathcal{U}$. \begin{lemma} \label{lem: total degree} If $p/q \in \wh{\mathbb{Q}}_0$, the total degree of $\mathcal{T}\left( p/q \right)$ is $q$. \end{lemma} \proof Let $T$ be the UFR obtained from $\mathcal{T}$ by setting $z=x$. To prove the lemma, we induct on $q$ to show that the degree of $T\left( p/q \right)$ is $q$. Since $T(0)=T(1)=x$ and $T(1/0)=0$, the lemma holds when $q$ is $0$ or $1$. So, we assume that $q\geq2$ and that the lemma holds for elements of $\mathbb{Q}_0$ whose denominator is smaller than $q$. By Lemma \ref{lem: properside}, we can find a Farey pair $\{ \alpha, \beta \}$ with $\alpha \in \mathbb{Q}_0$ and $\beta \in \wh{\mathbb{Q}}_0$ so that \[ p/q = \alpha \oplus \alpha \oplus \beta \] and the denominators of $\alpha$, $\beta$, and $\alpha \oplus \beta$ are are all less than $q$. By definition of $T$, \[ T\left(p/q\right) = -T(\beta)+T(\alpha) \, T(\alpha \oplus \beta). \] By assumption, the degree of $T(\beta)$ is the same as the denominator of $\beta$ and the degree of $T(\alpha) \, T(\alpha \oplus \beta)$ is $q$. Since the first of these quantities is smaller than the second, the degree of $T(p/q)$ is $q$ as desired. \endproof The function $\mathcal{T}$ has predictable factors of $x$ and $z$. If we cancel these factors, the resulting polynomial has exponents which are exclusively even. The next two lemmas make this precise. To begin, define functions $f_j \colon\thinspace \wh{\mathbb{Q}} \to \{ 0, 1\}$ by \[ f_1(p/q) \equiv pq+1 \pmod{2} \qquad \text{and} \qquad f_2(p/q) \equiv p \pmod{2}.\] Both functions preserve Farey sums in the sense that, if $\{ \alpha, \beta \}$ are a Farey pair, then \begin{align} \label{eq: f_j} f_j(\alpha \oplus \beta) &\equiv f_j(\alpha) + f_j(\beta) \pmod{2}. \end{align} Define $X=x^2$ and $Z=z^2$. Also, for $\alpha \in \wh{\mathbb{Q}}$, define $f(\alpha)=x^{f_1(\alpha)} z^{f_2(\alpha)}$. \begin{lemma} \label{lem: f quot} If $\{ \alpha, p/q \}$ is a Farey pair in $\wh{\mathbb{Q}}$, then \[ f\left(p/q\right) = f\left(\alpha \oplus \alpha \oplus p/q\right) \quad \text{and} \quad \frac{f(\alpha) \ f\left(\alpha \oplus p/q\right)}{f\left(p/q\right)} = \begin{cases} 1 & \text{if } q \text{ is even}\\ X & \text{if } pq \text{ is odd} \\ Z & \text{if } p \text{ is even.}\end{cases}\] \end{lemma} \proof The first assertion is a consequence of Equation \ref{eq: f_j} above. By considering the different possibilities for the parities of $p$ and $q$, the second follows. \endproof Define the {\bf 2-bridge character function} as \[\mathcal{T}_0(\alpha) = \frac{\mathcal{T}(\alpha)}{f(\alpha)}.\] It is easy to check that $\mathcal{T}_0$ is not a UFR. \begin{lemma} \label{lem: fac} For $p/q \in \wh{\Q}$, $\calT_0(p/q) \in \Z[X, Z]$. \end{lemma} \proof Here again, we induct on $q$. Since $\mathcal{T}(1/0)=0$, the lemma holds for $q=0$. The recursion matrix for $\mathcal{T}$ on $\partial(1/0)$ is $\left( \begin{smallmatrix} 0&1 \\ -1 & 0 \end{smallmatrix} \right)$ and it follows that $\{ \mathcal{T}(n) \}_{n \in \mathbb{Z}}$ is the repeated concatenation of the sequence $\{x, z, -x, -z\}$ shifted so that $\mathcal{T}(0)=x$. Since $f(n)$ is $x$ if $n$ is even and $y$ otherwise, the lemma holds for $q=1$. So, we assume that $q\geq2$ and that the lemma holds for elements of $\wh{\mathbb{Q}}$ whose denominator is smaller than $q$. As in the previous lemma, Lemma \ref{lem: properside} provides a Farey pair $\{ \alpha, \beta \}$ with $\alpha \in \mathbb{Q}$ and $\beta \in \wh{\mathbb{Q}}$ so that \[ p/q = \alpha \oplus \alpha \oplus \beta \] and the denominators of $\alpha$, $\beta$, and $\alpha \oplus \beta$ are are all less than $q$. By definition of $\mathcal{T}$, \[ \mathcal{T}\left(p/q\right) = -\mathcal{T}(\beta)+\mathcal{T}(\alpha) \, \mathcal{T}(\alpha \oplus \beta). \] From Lemma \ref{lem: f quot}, $f(p/q)=f(\beta)$. So, dividing through by this, we have \[ \mathcal{T}_0\left(p/q\right) = -\mathcal{T}_0(\beta) + \frac{f(\alpha) f(\alpha \oplus \beta)}{f(\beta)} \, \mathcal{T}_0(\alpha) \mathcal{T}_0(\alpha \oplus \beta).\] Lemma \ref{lem: f quot} and the inductive assumption imply that this is an element of $\mathbb{Z}[X,Z]$. \endproof The next lemma follows from Lemma \ref{lem: total degree} and the definition of $\mathcal{T}_0$. \begin{cor}\label{cor: degree T_0} If $p/q \in \mathbb{Q}_0$, the total degree of $\mathcal{T}_0 \left( p/q \right)$ is $\lfloor \frac{q-1}{2} \rfloor$. \end{cor} \section{2-bridge links} \label{ss: 2-bridge} Every 2-bridge link is determined by a number $\alpha \in \mathbb{Q}_0$. We denote this link as $L(\alpha)$. Its complement is $M(\alpha) = S^3-L(\alpha)$. It is well known that the compact manifold formed by removing an open tubular neighborhood of $L(\alpha)$ from $S^3$ can also be obtained by attaching a pair of 2-handles to a thickened 4-holed sphere along a pair of simple closed curves with slopes $1/0$ and $\alpha$. If we attach only the slope $\infty$ handle, the result is a handle body $H$. Define \[ \Gamma_H= \pi_1(\S)/\normal{b^2} = \big\langle k_0, k_1, k_2, k_3 \, \mid \, k_2=k_1^{-1}, \ k_3=k_0^{-1} \big\rangle = \langle k_0, k_1 \rangle \] and \[\Gamma_\alpha = \big\langle k_0, k_1 \, \big| \, \Omega(\alpha)^2 \big\rangle.\] Then the inclusions of the 4-holed sphere into $H$ and $M(\alpha)$ induce natural identifications of $\Gamma_H$ and $\Gamma_\alpha$ with the fundamental groups of $H$ and $M(\alpha)$. \begin{remarks} \label{rem: Dehn surgery} \[ \] \vspace{-.35in} \begin{enumerate} \item It is well-known that $L(\alpha)$ is a knot when the denominator of $\alpha$ is odd and is a 2-component link otherwise. \item If $\alpha \in \mathbb{Q}_0$ then there is a link complement $M_\alpha$ such that the set of knot complements in $\{ M(\gamma) \, | \, \gamma \in \partial(\alpha) \}$ is the same as the set of $(1,n)$-Dehn fillings on a particular unknotted component (crossing circle) of $M_\alpha$. Also, by adjusting $M_\alpha$ with a half twist through this crossing circle, we get a similar statement for the 2-component link complements in this set. See Figure \ref{fig: boundary links}. \end{enumerate} \end{remarks} \begin{figure}[h] \centering \includegraphics[width=2.5in]{boundarylink25.pdf} \caption{The manifolds obtained by doing $(1,n)$-Dehn filling on the unknotted cusps are precisely the 2-bridge links which correspond to the terms of $\partial(2/5) \subset \mathcal{G}$.} \label{fig: boundary links} \end{figure} The next lemma shows that the representations $\rho_{{\bf z},t}$ from Section \ref{sec: reps} are relevant to our discussion of $\Gamma_H$ and $\Gamma_\alpha$. \begin{lemma} \label{lem: descent} For every parameter pair $({\bf z},t)$, the representation $\rho_{{\bf z},t}$ descends to $\Gamma_H$. Moreover, if ${\bf z}$ satisfies $\mathcal{T}(\alpha)$ then $\rho_{{\bf z},t}$ descends further to $\Gamma_\alpha$. \end{lemma} \proof $\mathrm{Tr}\left( \rho_{{\bf z},t} (b)\right)=0$, so $\rho_{{\bf z},t} (b)$ has order two and $\rho_{{\bf z},t}$ descends to $\Gamma_H$. If ${\bf z}$ satisfies $\mathcal{T}(\alpha)$ then $\mathrm{Tr}\left( \rho_{{\bf z},t} \left( \Omega(\alpha)\right)\right)=0$ and $\rho_{{\bf z},t}$ descends further to $\Gamma_\alpha$. \endproof \section{Character varieties} We refer readers to \cite{CS} for background on $\text{SL}_2 \mathbb{C}$ character varieties and to \cite{BZ}, \cite{GM}, or \cite{LR} for background on $\text{PSL}_2 \mathbb{C}$ character varieties. Let ${\sf X}_H$ and ${\sf X}_\alpha$ be the affine algebraic sets of $\text{SL}_2 \mathbb{C}$ characters of $\Gamma_H$ and $\Gamma_\alpha$ whose algebraic components contain irreducible characters. Because $\Gamma_\alpha$ is a quotient of $\Gamma_H$, we may regard ${\sf X}_\alpha$ as a subset of ${\sf X}_H$. As in \cite{CS} and \cite{GM}, it is typical to use the functions \[ u= \chi(k_0), \quad w=\chi(k_1), \quad \text{and} \quad v=\chi(k_0k_1) \] as coordinates for $\chi$ in ${\sf X}_H$. In this paper, we are interested in the {\bf diagonal subvarieties} ${\sf D}_H \subseteq {\sf X}_H$ and ${\sf D}_\alpha \subseteq {\sf X}_\alpha$ cut out by the polynomial $u-w$. \begin{remarks} \label{rem: knots} \[ \] \vspace{-.35in} \begin{enumerate} \item If $L(\alpha)$ is a knot then $k_0$ and $k_1$ are conjugate in $\Gamma_\alpha$ and ${\sf D}_\alpha={\sf X}_\alpha$. \item If $L(\alpha)$ is a link, then every component of ${\sf X}_\alpha$ has dimension two. Since the components of ${\sf D}_\alpha$ have dimension one, ${\sf D}_\alpha$ is a proper subset of ${\sf X}_\alpha$. \item Whenever $L(\alpha)$ is hyperbolic, ${\sf D}_\alpha$ contains its holonomy characters. \end{enumerate} \end{remarks} The projection $(u,w,v) \to (u,v)$ from ${\sf D}_H$ to $\mathbb{C}^2$ is a bijection onto its image. So, by using $(u,v)$ as coordinates, we regard ${\sf D}_H$ and ${\sf D}_\alpha$ as affine subsets of $\mathbb{C}^2$. \begin{lemma} \label{lem: D(H)} ${\sf D}_H = \mathbb{C}^2$. Moreover, a character $(u_0,v_0) \in {\sf D}_H$ is reducible if and only if $(2-v_0)(2+v_0-u_0^2)=0$. \end{lemma} \proof Let $(u_0,v_0) \in \mathbb{C}^2$, take ${\bf z}=(x,z)$ so that \begin{align*} x^2&=2-v_0 &z^2&=2+v_0-u_0^2, \end{align*} and take $t \in \mathbb{C}$ to satisfy Equation \ref{eq: Markov} from Section \ref{sec: reps}. Lemma \ref{lem: descent} implies that $\rho_{{\bf z}, t} \colon\thinspace \Gamma_H \to \text{PSL}_2 \mathbb{C}$ is a representation. Using Equation \ref{eq: Markov}, it is possible to choose lifts of $\rho_{{\bf z},t}(k_0)$ and $\rho_{{\bf z},t}(k_1)$ to obtain a lift of $\rho_{{\bf z},t}$ to $\text{SL}_2 \mathbb{C}$ whose character $\chi$ satisfies $\chi(k_0)=u_0$ and $\chi(k_0k_1)=v_0$. The second part of the lemma holds by definition of $\rho_{{\bf z},t}$ (see the last sentence in Section \ref{sec: reps}). \endproof Let $\wh{\mathcal{T}}_0(\alpha) \in \mathbb{Z}[u,v]$ be the polynomial obtained from $\mathcal{T}_0(\alpha)$ by setting $X=2-v$ and $Z=2+v-u^2$. \begin{thm} \label{thm: SL} A character $\chi =(u_0, v_0) \in \mathbb{C}^2$ is an irreducible character in ${\sf D}_\alpha$ if and only if $\chi$ satisfies $\wh{\mathcal{T}}_0(\alpha)$ but not $(2-v) (2+v-u^2)$. \end{thm} \proof By Lemma \ref{lem: D(H)}, $\chi$ is reducible if and only if it satisfies $(2-v) (2+v-u^2)$. Together with Lemma \ref{lem: descent}, the proof of Lemma \ref{lem: D(H)} shows that if $\chi$ satisfies $\wh{\mathcal{T}}_0(\alpha)$ then $\chi \in {\sf D}_\alpha$. It remains only to show that every irreducible character in ${\sf D}_\alpha$ satisfies $\wh{\mathcal{T}}(\alpha)$. Assume, for a contradiction, that this is not the case. Using Proposition 3.2.1 of \cite{CS}, there is an irreducible plane curve ${\sf C} \subset {\sf D}_\alpha$ on which $\wh{\mathcal{T}}_0(\alpha)$ and $(2-v)(2+v-u^2)$ each have at most finitely many zeros. Suppose that $(u_0, v_0) \in \mathbb{C}$ avoids these zeros. As in the proof of Lemma \ref{lem: D(H)}, take ${\bf z}=(x_0,z_0)$ so that \begin{align*} x_0^2&=2-v_0 &z_0^2&=2+v_0-u_0^2, \end{align*} and take $t \in \mathbb{C}$ to satisfy Equation \ref{eq: Markov} with $x_0$ and $z_0$. As before, the restriction of $\rho_{{\bf z}, t}$ to $\Gamma_H$ lifts to $\text{SL}_2 \mathbb{C}$. This lift represents the character $(u_0, v_0)$ and so $b^2$ and $\Omega(\alpha)^2$ must map trivially under $\rho_{{\bf z},t}$. But because, $\wh{\mathcal{T}}_0(\alpha) \neq 0$, the image of $\Omega(\alpha)$ cannot have order 2. Therefore, $\Omega(\alpha) \in \ker \rho_{{\bf z}, t}$. Since $b^2$ and $\Omega(\alpha)$ map trivially under $\rho_{{\bf z},t}$, the image of $\pi_1 \mathbb{T}$ must be abelian. The expression $(2-v_0)(2+v_0-u_0^2)$ is not zero and commutator $[a,b]$ is $k_0^2$, so the definition of $\rho_{{\bf z}, t}$ implies that $t=\pm i$. By Equation \ref{eq: Markov}, we must have $u_0=0$. Hence, ${\sf C}$ must be the plane curve $\{ (0,v) \, | \, v \in \mathbb{C} \}$. We've seen that $\Omega(\alpha) \in \ker \rho_{{\bf z},t}$, Thus, $\mathcal{T}(x_0,z_0)^2=4$. This implies that, after substituting $x^2=2-v$ and $z^2=2+v$ into $f(\alpha)^2$, the function $f(\alpha)^2 \, \wh{\mathcal{T}}_0(\alpha)^2$ is never zero on ${\sf C}$. But $f(\alpha)^2 \in \{2-v, 2+v, 4-v^2\}$, so $f(\alpha)^2$ has at least one zero on ${\sf C}$. This is a contradiction. \endproof If $\rho \colon\thinspace \Gamma_\alpha \to \text{PSL}_2 \mathbb{C}$ is a representation, the traces of $\rho(k_0)$ and $\rho(k_1)$ are only defined up to sign. On the other hand, $\mathrm{Tr}\left(\rho(k_0) \right)^2$ and $\mathrm{Tr}\left( \rho(k_0k_1) \right)$ are well-defined. In fact, the polynomial map $(u^2, v)$ takes characters in ${\sf D}_\alpha$ to their induced characters in the $\text{PSL}_2 \mathbb{C}$ character variety $\overline{{\sf X}}_\alpha$ for $\Gamma_\alpha$. Let $\overline{{\sf D}}_\alpha$ be the image of ${\sf D}_\alpha$ under this map. From \cite{GM}, we know that every $\text{PSL}_2 \mathbb{C}$ representation for $\Gamma_\alpha$ lifts to $\text{SL}_2 \mathbb{C}$. This implies that, as in Remark \ref{rem: knots}, if $L(\alpha)$ is a knot, then $\overline{{\sf D}}_\alpha$ is equal to the entire $\text{PSL}_2 \mathbb{C}$ character variety for $\Gamma_\alpha$. It is natural to use $X=2-v$ and $Z=2+v-u^2$ to change coordinates on $\overline{{\sf D}}_\alpha$ and we do so for the remainder of this paper. The next result follows immediately from Theorem \ref{thm: SL}. \begin{thm} \label{thm: PSL} A point $\chi=(X_0,Z_0) \in \C^2$ is an irreducible character in $\overline{\sfD}_\alpha$ if and only if $X_0Z_0 \neq 0$ and $\chi$ satisfies the polynomial $\calT_0(\alpha)$. \end{thm} \subsection{Common factors and epimorphisms} \label{subsec: epi} Define $G_\alpha$ to be the stabilizer in $G$ of $\alpha\in \wh{\mathbb{Q}}$ and define $\wh{G}_\alpha$ to be the subgroup in $G$ generated by $G_\infty$ and $G_\alpha$. Let $\wh{G}_\alpha \{ \alpha, \infty\}$ be the union of the $\wh{G}_\alpha$-orbits of $\alpha$ and $\infty$. The main result of \cite{ORS}, states that if $\alpha' \in \wh{G}_\alpha \{ \alpha, \infty\}$ then there is an epimorphism $\Gamma_\alpha \to \Gamma_{\alpha'}$ which takes $k_j\in \Gamma_\alpha$ to $k_j \in \Gamma_{\alpha'}$. As an application of Corollary \ref{thm: PSL} and the action $G \times \wh{\mathbb{Q}} \to \wh{\mathbb{Q}}$, we give an elementary argument reproducing this result. For $\phi \in G$ let $\theta_\phi \colon\thinspace \mathbb{Z}[x,z] \to \mathbb{Z}[x,z]$ be the ring homomorphism determined by \[ \theta_\phi(x) = \mathcal{T}(\phi \cdot 0)\quad \text{and} \quad \theta_\phi(z) = \mathcal{T}(\phi \cdot 1).\] For a polynomial $p \in \mathbb{C}[x,z]$, let $\pi_p \colon\thinspace \mathbb{C}[x,z] \to \mathbb{C}[x,z]/(p)$ be the natural quotient homomorphism. The next pair of results describe the relationship between $\mathcal{T}$ and the action $G \times \wh{\mathbb{Q}} \to \wh{\mathbb{Q}}$. \begin{lemma} \label{lem: T action} If $\phi \in G$, $p \in \mathbb{C}[x,z]$, and $\mathcal{T}(\phi \cdot (1/0)) \in \ker \pi_p$ then \[ \pi_p \circ \mathcal{T} \circ \phi = \pi_p \circ \theta_\phi \circ \mathcal{T}. \] \end{lemma} \proof The map $\pi_p \circ \mathcal{T} \circ \phi$ is a UFR, so there is a unique ring homomorphism $\psi \colon\thinspace \mathbb{Z}[x,y,z] \to \mathbb{C}[x,z]/(p)$ such that $\pi_p \circ \mathcal{T} \circ \phi = \psi \circ \mathcal{U}$. The map $\psi$ is uniquely determined by \[ \psi(x)=\pi_p \circ \mathcal{T}(\phi \cdot 0), \quad \psi(y)=\pi_p \circ \mathcal{T}(\phi \cdot \infty)=0, \quad \text{and} \quad \psi(z)=\pi_p \circ \mathcal{T}(\phi \cdot \infty).\] Hence $\psi = \pi_p \circ \theta_\phi \circ \psi_\mathcal{T}$. Since $\mathcal{T}= \psi_\mathcal{T} \circ \mathcal{U}$, this proves the lemma. \endproof \begin{prop}\label{prop: factors} If $\alpha \in \wh{\mathbb{Q}}$ and $p \in \mathbb{C}[x,z]$ such that $\mathcal{T}(\alpha) \in \ker \pi_p$ then \[ \pi_p \circ \mathcal{T} \circ \phi = \pm \pi_p \circ \mathcal{T}\] for every $\phi \in \wh{G}_\alpha$. \end{prop} \proof To prove the theorem, it is enough to show that the conclusion holds separately for $\phi \in G_\infty$ and for $\phi \in G_\alpha$. Let \[ \phi_1 = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix} \quad \text{and} \quad \phi_2= \begin{bmatrix} -1 & 2 \\ 0 & 1 \end{bmatrix}\] and notice that $\phi_1$ and $\phi_2$ generate $G_\infty$. Also, \begin{align*} \phi_1 \cdot 0 & = 0 & \phi_2 \cdot 0 &= 2\\ \phi_1 \cdot 1 & = -1 & \phi_2 \cdot 1&=1. \end{align*} By the second sentence in the proof of Lemma \ref{lem: fac}, $\theta_{\phi_1}$ fixes $x$ and reverses the sign of $z$. Similarly, $\theta_{\phi_2}$ fixes $z$ and reverses the sign of $z$. For $j=1,2$, $\mathcal{T} (\phi_j \cdot \infty) = 0$, so Lemmas \ref{lem: fac} and \ref{lem: T action} imply that \begin{align} \label{eq: G_infty} \pi_q \circ \mathcal{T} \circ \phi_j &= \pm \pi_q \circ \mathcal{T}\end{align} for every $q \in \mathbb{C}[x,z]$. Since $G_\infty = \langle \phi_1, \phi_2 \rangle$, the same formula holds if we replace $\phi_j$ with any $\phi \in G_\infty$. Now take $\psi \in G$ so that $\psi \cdot \alpha = \infty$ and note that $G_\alpha = \psi^{-1} G_\infty \psi$. Let $\theta$ denote both the isomorphism $\theta_{\psi^{-1}}$ as well as the induced map on quotient rings. \[\begin{tikzcd}[column sep=large] \mathbb{C}[x,z] \arrow{r}{\theta} \arrow{d}[swap]{\pi_p} & \mathbb{C}[x,z] \arrow{d}{\pi_{\theta(p)}}\\ \mathbb{C}[x,z]/(p) \arrow{r}{\theta} & \mathbb{C}[x,z]/(\theta(p)) \end{tikzcd} \] Since $\psi^{-1} \cdot \infty = \alpha$, Lemma \ref{lem: T action} and the diagram above give \begin{align} \pi_p \circ \mathcal{T} \circ \psi^{-1} &= \pi_p \circ \theta \circ \mathcal{T} \nonumber \\ &= \theta \circ \pi_{\theta(p)} \circ \mathcal{T}. \label{eq: psi} \end{align} In particular, \begin{align*} \pi_p \circ \mathcal{T} &= \pi_p \circ \mathcal{T} \circ \psi^{-1} \circ \psi \\ &= \theta \circ \pi_{\theta(p)} \circ \mathcal{T} \circ \psi. \end{align*} Take $\xi \in G_\alpha$. Then $\xi = \psi^{-1} \phi \psi$ for some $\phi \in G_\infty$. Then, using Equations \ref{eq: G_infty} and \ref{eq: psi}, we have \begin{align*} \pi_p \circ \mathcal{T} \circ \xi &= \theta \circ \pi_{\theta(p)} \circ\mathcal{T} \circ \phi \circ \psi \\ &= \pm \theta \circ \pi_{\theta(p)} \circ \mathcal{T} \circ \psi \\ &= \pm \pi_p \circ \mathcal{T}. \end{align*} \endproof The next corollary is immediate. \begin{cor}\label{cor: factors} If $\alpha' \in \wh{G}_\alpha \{ \alpha, \infty\}$ then every factor of $\calT(\alpha)$ divides $\calT(\alpha')$. \end{cor} \begin{cor} \label{cor: epi} Suppose that $\alpha \in \wh{\Q}$ and $M(\alpha)$ is hyperbolic. If $\alpha' \in \wh{G}_\alpha\{\alpha, \infty\}$ then there is an epimorphism $\Gamma_\alpha \to \Gamma_{\alpha'}$ taking $k_j\in \Gamma_\alpha$ to $k_j \in \Gamma_{\alpha'}$. \end{cor} \proof Since $M(\alpha)$ is hyperbolic, we may take $\chi =(X_0, Z_0) \in \overline{{\sf D}}_\alpha$ to be the character of a holonomy representation for $\Gamma_\alpha$. By Corollary \ref{thm: PSL}, $\chi$ satisfies $\mathcal{T}_0(\alpha)$ and $X_0Z_0 \neq 0$. Proposition \ref{prop: factors} implies that $\chi$ also satisfies $\mathcal{T}_0(\alpha')$. Corollary \ref{thm: PSL} implies that $\chi$ also corresponds to a character for a representation for $\Gamma_{\alpha'}$. Since $\chi$ is an irreducible character for $\Gamma_H$, we may choose a single representation $\rho \colon\thinspace \Gamma_H \to \text{PSL}_2 \mathbb{C}$ which represents $\chi$ and factors through both $\Gamma_\alpha$ and $\Gamma_{\alpha'}$. The corresponding representation $\Gamma_\alpha \to \text{PSL}_2 \mathbb{C}$ is faithful, so we obtain an epimorphism as claimed in the statement of the corollary. \endproof \begin{quest} Lee and Sakuma show in \cite{LS} that the converse of Corollary 7.7 holds. Is there an elementary proof of this using Farey recursion? \end{quest} \subsection{Relationship to \cite{MPV}} \label{subsec: MPV} Our work here can be easily reconciled with that in \cite{MPV}, wherein the authors discuss the the character varieties of double twist knots. They describe these knots with a pair of integers $k$ and $l$, where $l$ is even and $k>0$, and denote them as $J(k,l)$. The following facts can be shown with straightforward induction arguments. \begin{enumerate} \item The group presentation used by \cite{MPV} for the knot $J(k,l)$ corresponds exactly to our presentation for $\Gamma_{\gamma_{k,l}}$ where \[ \gamma_{k,l} = \frac{1+l (k-1)}{1+lk}.\] For fixed $k$, these numbers form the sequence obtained from $\partial\left(\frac{k-1}{k}\right)$ by deleting every other term in such a way that the corner $v_1$ survives. \item The polynomial given in Proposition 3.8 of \cite{MPV} which determines the $\text{PSL}_2 \mathbb{C}$ character variety for $J(k,l)$ becomes $\pm \mathcal{T}_0(\gamma_{k,l})$ after letting $y=2-X-Z$ and $r=2-Z$. \end{enumerate} In view of the recursion matrices for $\mathcal{T}$, the substitution $s=\mathcal{T}(\alpha)$ is natural while considering the terms of $\partial(\alpha)$. Lemma \ref{lem: fac} tells us that the value $S=s^2$ can be expressed as a polynomial in $\mathbb{Z}[X,Z]$. For $J(k,l)$, we have $S=\mathcal{T}\left( \frac{k-1}{k} \right)^2$. Since the numbers $\frac{k-1}{k}$ are in $\partial(1)$, their images under $\mathcal{T}$ satisfy the recursion given by $\left( \begin{smallmatrix} 0 & 1 \\ -1 & z \end{smallmatrix}\right)$ and induction shows that $S=\mathcal{T}\left( \frac{k-1}{k} \right)^2$ is linear in $X$. So, as shown in \cite{MPV}, the map $(X,Z) \mapsto (S,Z)$ gives a birational change of coordinates for $\overline{{\sf D}}_{\gamma_{k,l}}$. \begin{enumerate} \item[(3)] In Section 4 of \cite{MPV}, the authors introduce polynomials in $\mathbb{Z}[r,t]$ whose corresponding plane curves have projective closures in $\mathbb{P}^1 \times \mathbb{P}^1$ which realize the smooth models for the double twist knots. If we set $t=2-S$ and $r=2-Z$ in their polynomials, the result is the same (up to sign) as when we change $X$ to $S$ in $\mathcal{T}_0\left( \gamma_{k,l} \right)$ as described above. \end{enumerate} Item (3) suggests that it might be fruitful to consider the maps $(X,Z) \mapsto (S,Z)$ and the techniques of \cite{MPV} more generally across the 2-bridge link family. \section{Riley polynomials and holonomy representations} \label{sec: Riley} Suppose $\alpha \in \mathbb{Q}_0$. A {\bf p-rep} for $\Gamma_\alpha$ is an irreducible $\text{PSL}_2 \mathbb{C}$ representation for $\Gamma_\alpha$ whose character satisfies $u^2=w^2=4$ (or equivalently $Z=-X$). In particular, characters of p-reps for $\Gamma_\alpha$ lie on $\overline{{\sf D}}_\alpha$. Define $\psi_\Lambda \colon\thinspace \mathbb{Z}[X,Z] \to \mathbb{Z}[X]$ to be the ring homomorphism defined by $X \mapsto X$ and $Z \mapsto -X$. Define \[\Lambda_\alpha = \psi_\Lambda \circ \mathcal{T}_0(\alpha).\] The next result is a direct consequence of Corollary \ref{thm: PSL}. \begin{cor} \label{cor: p-reps} A point $(X_0,-X_0) \in \mathbb{C}^2$ is the character of of an irreducible p-rep for $\Gamma_\alpha$ if and only if $X_0 \neq 0$ and $\Lambda_\alpha(X_0)=0$. When this is the case, $(X_0,-X_0)$ is a character for the representation determined by \begin{align*} k_0 &\mapsto \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} & k_1 &\mapsto \begin{bmatrix} 1 & 0 \\ -X_0 & 1 \end{bmatrix}. \end{align*} \end{cor} The {\bf Riley polynomial} for a number $\alpha \in \mathbb{Q}_0$ with odd denominator is defined in \cite{RR}. In Theorem 2 of \cite{RR}, Riley shows that the Riley polynomial for $\alpha$ is monic and has degree $\frac{1}{2}(q-1)$, where $q$ is the denominator of $\alpha$. Also, as part of this this theorem, Riley shows that $X_0$ satisfies the Riley polynomial for $\alpha$ if and only if the assignment \begin{align*} k_0 &\mapsto \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} & k_1 &\mapsto \begin{bmatrix} 1 & 0 \\ -X_0 & 1 \end{bmatrix} \end{align*} determines a p-rep for $\Gamma_\alpha$. Corollary \ref{cor: degree T_0} shows that the degree of $\Lambda_\alpha$ is the same as the degree of the Riley polynomial, which establishes the next result. \begin{cor} \label{cor: Riley polynomial} If $\alpha \in \Q_0$ has odd denominator then, up to sign, $\Lambda_\alpha$ is the Riley polynomial. \end{cor} Suppose $\alpha=\frac{p}{q} \in \mathbb{Q}_0$. It follows from Thurston's geometrization theorems that $M(\alpha)$ admits a complete hyperbolic structure with finite volume if and only if $p \notin \{1, q-1\}$. The corresponding holonomy representations for $\Gamma_\alpha$ are always p-reps. In particular, there is a root of $\mathcal{T}_0(\alpha)$ which provides the holonomy as in Corollary \ref{cor: p-reps}. It is well-known that the traces of the holonomy for a knot complement $M(\alpha)$ are algebraic integers. In fact, whenever the holonomy representation of a hyperbolic 3-manifold has non-integer traces, the manifold contains a closed essential surface. Hatcher and Oertel show in \cite{HO} that no 2-bridge link contains a closed essential surface and so their holonomy representations are integral. According to Alan Reid, Riley was also aware that the p-rep polynomials for two component 2-bridge links are monic. In the present setting, it is not difficult to reproduce this result. Here, we show that $\Lambda_\alpha$ is monic for every $\alpha \in \mathbb{Q}_0$. \begin{thm} \label{thm: monic} If $\alpha \in \mathbb{Q}_0$ then $\Lambda_{\alpha}$ is monic. \end{thm} \proof Let $d$ be the denominator of $\alpha$. Since $\Lambda_0=\Lambda_1=\Lambda_{1/2}$ the theorem holds when $d\leq 2$. Suppose then, that $d\geq 3$ and that the theorem holds for elements of $\mathbb{Q}_0$ whose denominators are smaller than $d$. As usual, Lemma \ref{lem: properside} provides a Farey pair $\{ \gamma, \beta \}$ with $\gamma \in \mathbb{Q}_0$ and $\beta \in \wh{\mathbb{Q}}_0$ so that \[ \alpha = \gamma \oplus \gamma \oplus \beta\] and the denominators of $\gamma$, $\beta$, and $\gamma \oplus \beta$ are all less than $d$. Also, because $d \geq 3$, $\beta \neq \frac{1}{0}$. Write $\gamma=p/q$ and $\beta=r/s$. Define \[ Q= \begin{cases} 1& \text{if } s \text{ is even} \\ X & \text{if } rs \text{ is odd} \\ -X & \text{if } r \text{ is even}. \end{cases} \] From Lemma \ref{lem: f quot} and the proof of Lemma \ref{lem: fac}, \[ \Lambda_\alpha = -\Lambda_\beta + Q \, \Lambda_\gamma \, \Lambda_{\gamma \oplus \beta}.\] Using Lemma \ref{cor: degree T_0} to compute degrees, we have \[ \deg \Lambda_\alpha - \deg \Lambda_\beta = \left\lfloor \frac{2q+s-1}{2} \right\rfloor - \left\lfloor \frac{s-1}{2} \right\rfloor = q\] which is positive. Therefore, the leading coefficient of $\Lambda_\alpha$ is the same as that of $Q \, \Lambda_\gamma \, \Lambda_{\gamma \oplus \beta}$. This coefficient is one, by the inductive assumption. \endproof \begin{cor} If $G \subset \text{PSL}_2 \mathbb{C}$ is a Kleinian group which uniformizes a hyperbolic 2-bridge link then the traces (defined up to sign) of the elements of $G$ are algebraic integers. \end{cor} \proof $G$ is conjugate to the group \[ \left\langle \begin{bmatrix} 1& 1\\ 0 & 1 \end{bmatrix}, \ \begin{bmatrix} 1& 0\\ -X_0 & 1 \end{bmatrix} \right\rangle\] where $X_0$ is a non-zero root of $\Lambda_\alpha$ for some $\alpha \in \mathbb{Q}_0$. The trace of the product of these two matrices is $2-X_0$ and it follows that the traces of $G$ lie in the ring $\mathbb{Z}[X_0]$. By Theorem \ref{thm: monic}, we know that this ring is made up entirely of algebraic integers. \endproof We conclude with three observations made from the data we've collected. First, our computer experiments show that, except for $\Lambda_{1/4}$, $\Lambda_{p/q}$ has a non-trivial factorization over $\mathbb{Q}$ for every even $q$ which is less than 300. In contrast, it is not difficult to find $\alpha \in \mathbb{Q}$ for which $\Lambda_\alpha$ is irreducible. For instance, Hoste and Shanahan prove in \cite{HS3} that this is the case for each of the twist knots $L\left( \frac{n}{2n+1}\right)$. In a similar vein, Theorem 3 of \cite{RR} states that Riley polynomials have no repeated factors. On the other hand, our experiments find many $\alpha$'s with even denominator less than 300 for which $\Lambda_\alpha$ has factors with multiplicity larger than one. In almost every such case, the factor with high multiplicity is the monomial $X$. Amongst the numbers we searched, we found exactly three exceptions to this. If $\alpha= 7/24$ then $\Lambda_\alpha$ is divisible by $(X^2-1)^2$ and if $\alpha \in \{41/264, \,103/264\}$ then $\Lambda_\alpha$ is divisible by $(X^2-1)^3$. We remark that, in \cite{RW}, Theorem 3 of \cite{RR} is used to show that there is no 2-bridge knot whose trace field contains $\mathbb{Q}(i)$ as a subfield. Finally, Question 1.7 of \cite{MPV} asks whether there is an $\alpha \in \mathbb{Q}$ with odd denominator and numerator not equal to one for which $\mathcal{T}_0(\alpha)$ is irreducible over $\mathbb{Q}$ but $\Lambda_\alpha$ factors non-trivially. They found no such examples amongst the double twist knots with crossing numbers at most 98. Since there are many $\alpha$'s with even denominator (links) for which $\mathcal{T}_0(\alpha)$ is irreducible, the observation above provides many examples with {\em even} denominators. However, if we look only at $\alpha$'s with odd denominators (knots), we find no examples up to denominator 200. \section{Lists} \label{sec: lists} This section consists of lists of polynomials computed using the techniques of this paper. \begin{center} $T_0(\alpha)$ with $\alpha \in \mathbb{Q} \cap \left[ 0, \frac{1}{2} \right]$ and denominator at most $18$. \end{center} \begin{align*} 1/3 && X - 1 \\ 1/4 && X - 2\\ 1/5 && X^{2} - 3 X + 1\\ 2/5 && X Z - Z - 1\\ 1/6 && {\left(X - 1\right)} {\left(X - 3\right)}\\ 1/7 && X^{3} - 5 X^{2} + 6 X - 1\\ 2/7 && X^{2} Z - 3 X Z + 2 Z - 1\\ 3/7 && X^{2} Z - X Z - 2 X + 1\\ 1/8 && {\left(X^{2} - 4 X + 2\right)} {\left(X - 2\right)}\\ 3/8 && X^{2} Z - 2 X Z - X + Z\\ 1/9 && {\left(X^{3} - 6 X^{2} + 9 X - 1\right)} {\left(X - 1\right)}\\ 2/9 && X^{3} Z - 5 X^{2} Z + 7 X Z - 2 Z - 1\\ 4/9 && X^{2} Z^{2} - X Z^{2} - 3 X Z + 2 Z + 1\\ 1/10 && (X^2 - 3X + 1)(X^2 - 5X + 5) \\ 3/10 && X^3Z - 4X^2Z + 5XZ - 2X - 2Z + 3 \\ 1/11 && X^5 - 9X^4 + 28X^3 - 35X^2 + 15X - 1 \\ 2/11 && X^4Z - 7X^3Z + 16X^2Z - 13XZ + 3Z - 1 \\ 3/11 && X^4Z - 5X^3Z + 8X^2Z - X^2 - 4XZ + X + 1 \\ 4/11 && X^3Z^2 - 3X^2Z^2 - X^2Z + 3XZ^2 - Z^2 + Z + 1 \\ 5/11 && X^3Z^2 - X^2Z^2 - 4X^2Z + 3XZ + 3X - 1 \\ \end{align*} \begin{align*} 1/12 && \scriptstyle (X^2 - 4X + 1)(X - 1)(X - 2)(X - 3) \\ 5/12 && \scriptstyle (XZ - Z - 2)(XZ - 1)(X - 1) \\ 1/13 && \scriptstyle X^6 - 11X^5 + 45X^4 - 84X^3 + 70X^2 - 21X + 1 \\ 2/13 && \scriptstyle X^5Z - 9X^4Z + 29X^3Z - 40X^2Z + 22XZ - 3Z - 1 \\ 3/13 && \scriptstyle X^5Z - 7X^4Z + 17X^3Z - 16X^2Z - 2X^2 + 4XZ + 5X - 1 \\ 4/13 && \scriptstyle X^4Z^2 - 5X^3Z^2 + 9X^2Z^2 - 3X^2Z - 7XZ^2 + 8XZ + 2Z^2 - 5Z + 1 \\ 5/13 && \scriptstyle X^4Z^2 - 3X^3Z^2 - 2X^3Z + 3X^2Z^2 + 3X^2Z - XZ^2 + X^2 - XZ - X + 1 \\ 6/13 && \scriptstyle X^3Z^3 - X^2Z^3 - 5X^2Z^2 + 4XZ^2 + 6XZ - 3Z - 1 \\ 1/14 && \scriptstyle (X^3 - 5X^2 + 6X - 1)(X^3 - 7X^2 + 14X - 7) \\ 3/14 && \scriptstyle X^5Z - 8X^4Z + 23X^3Z - 28X^2Z - X^2 + 13XZ + 2X - 2Z + 1 \\ 5/14 && \scriptstyle X^4Z^2 - 4X^3Z^2 - X^3Z + 6X^2Z^2 - 4XZ^2 + 3XZ + Z^2 + 2X - 2Z - 1 \\ 1/15 && \scriptstyle (X^4 - 9X^3 + 26X^2 - 24X + 1)(X^2 - 3X + 1)(X - 1) \\ 2/15 && \scriptstyle X^6Z - 11X^5Z + 46X^4Z - 91X^3Z + 86X^2Z - 34XZ + 4Z - 1 \\ 4/15 && \scriptstyle (X^3Z - 3X^2Z + 2XZ - 1)(X^2Z - 4XZ + 4Z - 1) \\ 7/15 && \scriptstyle X^4Z^3 - X^3Z^3 - 6X^3Z^2 + 5X^2Z^2 + 10X^2Z - 6XZ - 4X + 1 \\ 1/16 && \scriptstyle (X^4 - 8X^3 + 20X^2 - 16X + 2)(X^2 - 4X + 2)(X - 2) \\ 3/16 && \scriptstyle X^6Z - 10X^5Z + 38X^4Z - 68X^3Z + 58X^2Z - 2X^2 - 22XZ + 7X + 3Z - 4 \\ 5/16 && \scriptstyle X^5Z^2 - 6X^4Z^2 + 14X^3Z^2 - 4X^3Z - 16X^2Z^2 + 15X^2Z + 9XZ^2 - 18XZ - 2Z^2 + 3X + 7Z - 4 \\ 7/16 && \scriptstyle (X^3Z^2 - 2X^2Z^2 - 3X^2Z + XZ^2 + 4XZ + X - Z)(XZ - 2) \\ 1/17 && \scriptstyle X^8 - 15X^7 + 91X^6 - 286X^5 + 495X^4 - 462X^3 + 210X^2 - 36X + 1 \\ 2/17 && \scriptstyle X^7Z - 13X^6Z + 67X^5Z - 174X^4Z + 239X^3Z - 166X^2Z + 50XZ - 4Z - 1 \\ 3/17 && \scriptstyle X^7Z - 11X^6Z + 47X^5Z - 98X^4Z + 103X^3Z - X^3 - 51X^2Z + 3X^2 + 9XZ - 1 \\ 4/17 && \scriptstyle X^6Z^2 - 9X^5Z^2 + 31X^4Z^2 - 50X^3Z^2 - 3X^3Z + 36X^2Z^2 + 14X^2Z - 8XZ^2 - 18XZ + 4Z + 1 \\ 5/17 && \scriptstyle X^6Z^2 - 7X^5Z^2 + 19X^4Z^2 - 3X^4Z - 25X^3Z^2 + 13X^3Z + 16X^2Z^2 - 18X^2Z - 4XZ^2 + 2X^2 + 8XZ - 4X + 1 \\ 6/17 && \scriptstyle X^5Z^3 - 5X^4Z^3 - X^4Z^2 + 10X^3Z^3 - 10X^2Z^3 + 6X^2Z^2 + 5XZ^3 + 3X^2Z - 8XZ^2 - Z^3 - 3XZ + 3Z^2 - 1 \\ 7/17 && \scriptstyle X^5Z^3 - 3X^4Z^3 - 4X^4Z^2 + 3X^3Z^3 + 9X^3Z^2 - X^2Z^3 + 5X^3Z - 6X^2Z^2 - 9X^2Z + XZ^2 - 2X^2 + 4XZ + 4X - 1 \\ 8/17 && \scriptstyle X^4Z^4 - X^3Z^4 - 7X^3Z^3 + 6X^2Z^3 + 15X^2Z^2 - 10XZ^2 - 10XZ + 4Z + 1 \\ 1/18 && \scriptstyle (X^3 - 6X^2 + 9X - 1)(X^3 - 6X^2 + 9X - 3)(X - 1)(X - 3) \\ 5/18 && \scriptstyle (X^5Z^2 - 7X^4Z^2 + 18X^3Z^2 - 2X^3Z - 20X^2Z^2 + 7X^2Z + 8XZ^2 - 5XZ + X - 2Z - 1)(X - 1) \\ 7/18 && \scriptstyle (X^4Z^3 - 3X^3Z^3 - 3X^3Z^2 + 3X^2Z^3 + 5X^2Z^2 - XZ^3 + 3X^2Z - 2XZ^2 - 3XZ - X + 2Z + 1)(X - 1) \\ \end{align*} \newpage \begin{center} Riley polynomials $\Lambda_\alpha(X)$ with $\alpha \in \mathbb{Q} \cap \left[ 0, \frac{1}{2} \right]$ and denominator at most $20$. \end{center} \begin{align*} 1/3 && X - 1 \\ 1/4 && X - 2 \\ 1/5 && X^2 - 3 X + 1 \\ 2/5 && -X^2 + X - 1 \\ 1/6 && (X - 1) (X - 3) \\ 1/7 && X^3 - 5 X^2 + 6 X - 1 \\ 2/7 && -X^3 + 3 X^2 - 2 X - 1 \\ 3/7 && -X^3 + X^2 - 2 X + 1 \\ 1/8 && (X^2 - 4 X + 2) (X - 2) \\ 3/8 && -(X^2 - 2 X + 2) X \\ 1/9 && (X^3 - 6 X^2 + 9 X - 1) (X - 1) \\ 2/9 && -X^4 + 5 X^3 - 7 X^2 + 2 X - 1 \\ 4/9 && X^4 - X^3 + 3 X^2 - 2 X + 1 \\ 1/10 && (X^2 - 3 X + 1) (X^2 - 5 X + 5) \\ 3/10 && -(X^2 - X - 1) (X^2 - 3 X + 3) \\ 1/11 && X^5 - 9 X^4 + 28 X^3 - 35 X^2 + 15 X - 1 \\ 2/11 && -X^5 + 7 X^4 - 16 X^3 + 13 X^2 - 3 X - 1 \\ 3/11 && -X^5 + 5 X^4 - 8 X^3 + 3 X^2 + X + 1 \\ 4/11 && X^5 - 3 X^4 + 4 X^3 - X^2 - X + 1 \\ 5/11 && X^5 - X^4 + 4 X^3 - 3 X^2 + 3 X - 1 \\ 1/12 && (X^2 - 4 X + 1) (X - 1) (X - 2) (X - 3) \\ 5/12 && (X^2 - X + 2) (X^2 + 1) (X - 1) \\ 1/13 && X^6 - 11 X^5 + 45 X^4 - 84 X^3 + 70 X^2 - 21 X + 1 \\ 2/13 && -X^6 + 9 X^5 - 29 X^4 + 40 X^3 - 22 X^2 + 3 X - 1 \\ 3/13 && -X^6 + 7 X^5 - 17 X^4 + 16 X^3 - 6 X^2 + 5 X - 1 \\ 4/13 && X^6 - 5 X^5 + 9 X^4 - 4 X^3 - 6 X^2 + 5 X + 1 \\ 5/13 && X^6 - 3 X^5 + 5 X^4 - 4 X^3 + 2 X^2 - X + 1 \\ 6/13 && -X^6 + X^5 - 5 X^4 + 4 X^3 - 6 X^2 + 3 X - 1 \\ 1/14 && (X^3 - 5 X^2 + 6 X - 1) (X^3 - 7 X^2 + 14 X - 7) \\ 3/14 && -(X^3 - 3 X^2 + 2 X - 1) (X^3 - 5 X^2 + 6 X + 1) \\ 5/14 && (X^3 - X^2 + 1) (X^3 - 3 X^2 + 4 X - 1) \\ \end{align*} \begin{align*} 1/15 && \scriptstyle (X^4 - 9 X^3 + 26 X^2 - 24 X + 1) (X^2 - 3 X + 1) (X - 1) \\ 2/15 && \scriptstyle -X^7 + 11 X^6 - 46 X^5 + 91 X^4 - 86 X^3 + 34 X^2 - 4 X - 1 \\ 4/15 && \scriptstyle (X^4 - 3 X^3 + 2 X^2 + 1) (X^3 - 4 X^2 + 4 X + 1) \\ 7/15 && \scriptstyle -X^7 + X^6 - 6 X^5 + 5 X^4 - 10 X^3 + 6 X^2 - 4 X + 1 \\ 1/16 && \scriptstyle (X^4 - 8 X^3 + 20 X^2 - 16 X + 2) (X^2 - 4 X + 2) (X - 2) \\ 3/16 && \scriptstyle -(X^4 - 6 X^3 + 10 X^2 - 2 X - 2) (X^3 - 4 X^2 + 4 X - 2) \\ 5/16 && \scriptstyle (X^4 - 4 X^3 + 6 X^2 - 2 X - 2) (X^3 - 2 X^2 + 2) \\ 7/16 && \scriptstyle -(X^4 - 2 X^3 + 4 X^2 - 4 X + 2) (X^2 + 2) X \\ 1/17 && \scriptstyle X^8 - 15 X^7 + 91 X^6 - 286 X^5 + 495 X^4 - 462 X^3 + 210 X^2 - 36 X + 1 \\ 2/17 && \scriptstyle -X^8 + 13 X^7 - 67 X^6 + 174 X^5 - 239 X^4 + 166 X^3 - 50 X^2 + 4 X - 1 \\ 3/17 && \scriptstyle -X^8 + 11 X^7 - 47 X^6 + 98 X^5 - 103 X^4 + 50 X^3 - 6 X^2 - 1 \\ 4/17 && \scriptstyle X^8 - 9 X^7 + 31 X^6 - 50 X^5 + 39 X^4 - 22 X^3 + 18 X^2 - 4 X + 1 \\ 5/17 && \scriptstyle X^8 - 7 X^7 + 19 X^6 - 22 X^5 + 3 X^4 + 14 X^3 - 6 X^2 - 4 X + 1 \\ 6/17 && \scriptstyle -X^8 + 5 X^7 - 11 X^6 + 10 X^5 + X^4 - 10 X^3 + 6 X^2 - 1 \\ 7/17 && \scriptstyle -X^8 + 3 X^7 - 7 X^6 + 10 X^5 - 11 X^4 + 10 X^3 - 6 X^2 + 4 X - 1 \\ 8/17 && \scriptstyle X^8 - X^7 + 7 X^6 - 6 X^5 + 15 X^4 - 10 X^3 + 10 X^2 - 4 X + 1 \\ 1/18 && \scriptstyle (X^3 - 6 X^2 + 9 X - 1) (X^3 - 6 X^2 + 9 X - 3) (X - 1) (X - 3) \\ 5/18 && \scriptstyle (X^4 - 3 X^3 + X^2 + 2 X + 1) (X^3 - 4 X^2 + 5 X - 1) (X - 1) \\ 7/18 && \scriptstyle -(X^4 - X^3 + X^2 + 1) (X^3 - 2 X^2 + 3 X - 1) (X - 1) \\ 1/19 && \scriptstyle X^9 - 17 X^8 + 120 X^7 - 455 X^6 + 1001 X^5 - 1287 X^4 + 924 X^3 - 330 X^2 + 45 X - 1 \\ 2/19 && \scriptstyle -X^9 + 15 X^8 - 92 X^7 + 297 X^6 - 541 X^5 + 553 X^4 - 296 X^3 + 70 X^2 - 5 X - 1 \\ 3/19 && \scriptstyle -X^9 + 13 X^8 - 68 X^7 + 183 X^6 - 269 X^5 + 211 X^4 - 80 X^3 + 18 X^2 - 9 X + 1 \\ 4/19 && \scriptstyle X^9 - 11 X^8 + 48 X^7 - 105 X^6 + 121 X^5 - 73 X^4 + 20 X^3 + 6 X^2 - 3 X + 1 \\ 5/19 && \scriptstyle X^9 - 9 X^8 + 32 X^7 - 55 X^6 + 45 X^5 - 19 X^4 + 16 X^3 - 10 X^2 - 3 X - 1 \\ 6/19 && \scriptstyle -X^9 + 7 X^8 - 20 X^7 + 25 X^6 - X^5 - 31 X^4 + 24 X^3 + 6 X^2 - 9 X - 1 \\ 7/19 && \scriptstyle -X^9 + 5 X^8 - 12 X^7 + 15 X^6 - 9 X^5 - X^4 + 4 X^3 - 2 X^2 - X + 1 \\ 8/19 && \scriptstyle X^9 - 3 X^8 + 8 X^7 - 13 X^6 + 17 X^5 - 17 X^4 + 12 X^3 - 6 X^2 + X + 1 \\ 9/19 && \scriptstyle X^9 - X^8 + 8 X^7 - 7 X^6 + 21 X^5 - 15 X^4 + 20 X^3 - 10 X^2 + 5 X - 1 \\ 1/20 && \scriptstyle (X^4 - 8 X^3 + 19 X^2 - 12 X + 1) (X^2 - 3 X + 1) (X^2 - 5 X + 5) (X - 2) \\ 3/20 && \scriptstyle -(X^5 - 8 X^4 + 21 X^3 - 20 X^2 + 7 X - 2) (X^4 - 6 X^3 + 11 X^2 - 6 X - 1) \\ 7/20 && \scriptstyle -(X^5 - 4 X^4 + 7 X^3 - 4 X^2 - X + 2) (X^4 - 2 X^3 + X^2 + 2 X - 1) \\ 9/20 && \scriptstyle (X^4 + 3 X^2 + 1) (X^3 - X^2 + 3 X - 2) (X^2 - X + 1) \\ \end{align*} \bibliographystyle{plain}
\section{Introduction} In the standard description of Cosmology the early Universe went through a phase of accelerated expansion known as inflation. Through this inflationary period quantum fluctuations of the primordial fields became classical perturbations which are in turn the seeds for late-time observables such as the anisotropies of the Cosmic Microwave Background (CMB) and the distribution of large-scale structure (LSS) of the Universe such as dark matter halos and galaxies. Extensive work has been done with CMB anisotropies, culminating in the tight constraints on parameters such as $f_{nl}$ given by the latest Planck results \citep{planck2015}. However, the constraining power of the CMB has nearly reached its limits and will ultimately be superseded by observations of the large-scale structure of the Universe; this is simply because the three-dimensional galaxy distribution can provide more information than the two-dimensional map of the CMB. This goal is facilitated by upcoming large data sets offered by galaxy surveys such as the Dark Energy Survey (DES) \citep{DES1, DES2}, the Large Synoptic Survey Telescope (LSST) \citep{LSST}, the ESA Euclid Satellite \citep{Euclid} and the Dark Energy Spectroscopic Instrument (DESI) \citep{DESI}. One of the most active areas of cosmological research today is therefore to understand the collapse of matter and evolution of large scale structure in the Universe. Extra value can be obtained from the addition of LSS observational data as it can be cross-correlated and combined with CMB data, e.g. through weak lensing \citep{lensing}, for a wealth of new information. Standard single field slow-roll inflation generates only small primordial non-Gaussianities (PNG) that slow roll supressed \citep{maldacena}, which is consistent with the null detection presented in latest Planck results \citep{Planck}. Due to the linearity of CMB physics and the approximately Gaussian initial conditions most CMB information is encoded in the power spectrum $C_l$. This is not the case for LSS as non-linear gravitational interaction trandfers information from the power spectrum to higher order correlators. For example, at mildly non-linear scales the bispectrum is the primary diagnostic as it exceeds the power spectrum in terms of cosmological information. A recent comprehensive forecasting of constraints from the galaxy power spectrum and bispectrum \citep{forecast} has shown that the galaxy bispectrum leads to 5 times better bounds than the power spectrum alone, giving much tighter constraints for local-type PNG than current limits from Planck. This work is more complete and realistic than previous forecasts, e.g. \citep{forecast1,forecast2,forecast3,forecast4}, as they combined in their analysis different factors that were previously considered independently. The bispectrum has a stronger dependence on cosmologica parameters so can provide tighter constraints than the power spectrum for the same signal to noise and can help break degeneracies in parameter space , notably those between $\sigma_8$ and bias \citep{bias}. Many inflationary scenarios, such as those inspired by fundamental theories like superstring theory, or alternatives to inflation typically yield small, but measurable, PNGs that would be tell-tale signatures of new physics. In addition to constraining and testing early universe theories, the bispectrum can be used to test alternative scenarios such as those that modify standard Einstein gravity. Measurements of the galaxy bispectrum has been done for existing galaxy survey data from the Baryon Oscillation Spectroscopic Survey (BOSS) \citep{BOSS1, BOSS2, sdssi, sdssii, sdssiii}. There are many complications when extracting information from LSS compared to the CMB. At the time when recombination took place and CMB photons were released (i.e. redshift $z=1100$), inhomogeneities in the universe were small, therefore CMB physics is linear and can be well modelled by perturbation theories. By contrast, we still do not have a solid theoretical understanding of the non-linear gravitational evolution of matter and galaxy formation. A combination of perturbation theory, e.g. an effective field theory (EFT) approach \citep{EFT}, and nonlinear halo models has been shown to characterise the dark matter power spectrum and bispectrum very well at small and large scales, but the bispectrum at mildly non-linear regimes remain poorly understood \citep{Andrei}. This paper is outlined as follows: in \Cref{previous} we will give an overview on non-Gaussianity and the three-point correlator of LSS, including in particular a summary of the \texttt{MODAL-LSS}{} method for reconstructing any theoretical bispectrum or the full bispectrum of an observational or simulated data set. The main results of this paper, including quantitative bi-spectral comparisons between different dark matter codes, non-Gaussian covariances of the \texttt{MODAL-LSS}{} estimator, and comparisons between simulations and theory, will be presented in \Cref{work}, where we also address the difficulties in the latter. We conclude our paper in \Cref{sec:conclusions}. \section{Previous work} \label{previous} \subsection{Basics of non-Gaussianity} \label{sec:basics-non-gauss} At early times before matter collapsed to form structures, the matter distribution in the Universe was highly uniform. In the absence of any primordial non-Gaussianity, $\delta$ is Gaussian distributed and can be fully described by its two-point correlation function, or in Fourier space its power spectrum: \begin{align} \expval{\delta(\mathbf{k}) \delta(\mathbf{k}')}=(2\pi)^3 \delta_D(\mathbf{k}+\mathbf{k}') P(k), \label{PS} \end{align} where $\delta_D$ is the Dirac delta function. At late times this is no longer the case as gravitational collapse induces non-Gaussianities. For mildly non-linear scales the primary diagnostic is the three point correlation function or bispectrum $B_\delta(k_1, k_2, k_3)$: \begin{align} &\expval{\delta(\mathbf{k}_1) \delta(\mathbf{k}_2) \delta(\mathbf{k}_3)} \nonumber \\ &\qquad=(2\pi)^3 \delta_D (\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3) B_\delta(k_1,k_2,k_3). \label{bispectrum} \end{align} Due to statistical isotropy and homogeneity the bispectrum only depends on the wavenumbers $k_i$. Additionally the delta function, arising from momentum conservation, imposes the triangle condition on the wavevectors so the three $k_i$ when taken as lengths must be able to form a triangle. \subsection{Bispectrum shapes \label{sec:shap-non-gauss}} Bispectra are naturaly 3D objects unlike power spectra which are only 1D. The particular dependence of a bispectra on the three $k_i$ is known as its shape. The shapes of popular interest in CMB analysis are inspired by various inflationary scenarios, but we are more interested in a few phenomenological shapes that will help us capture the behaviour of the matter bispectrum at late times. Here we present a few of these templates popular in the literature, i.e. the tree-level bispectrum and its extensions, the nine-parameter model and the 3-shape model. This enables us to investigate any primordial non-Gaussianities through observational data by subtracting off the dominant contributions from gravitational collapse. \subsubsection{Tree-level bispectrum} By solving the dark matter equations of motion perturbatively, at lowest order we can derive the tree-level bispectrum \citep{Bernardeau}: \begin{align} &B^{\text{tree}}(k_1,k_2,k_3)= \nonumber \\ &\quad 2P_{\text{lin}}(k_1) P_{\text{lin}}(k_2)F^{(s)}_2 (\mathbf{k}_1,\mathbf{k}_2)+2\,\text{perms.}, \label{eq:tree_shape} \end{align} where the $F^{(s)}_2$ kernel takes the form \begin{align} F^{(s)}_2(\mathbf{k}_1,\mathbf{k}_2)=\frac{5}{7}+ \frac{1}{2}\frac{\mathbf{k}_1\cdot\mathbf{k}_2}{k_1 k_2} \left(\frac{k_1}{k_2}+\frac{k_2}{k_1}\right)+\frac{2}{7} \frac{(\mathbf{k}_1\cdot\mathbf{k}_2)^2}{k_1^2 k_2^2}. \label{F2_EdS} \end{align} and $P_{\text{lin}}$ is the linear power spectrum. This technically only applies in an Einstein-de Sitter universe for which $\Omega_m=1$ and $\Omega_\Lambda=0$, and hence the linear growth factor $D_1=a$. We are interested instead in the late time universe where $\Omega_\Lambda>0$ so we modify $F^{(s)}_2$ to become \begin{align} F^{(s),\Lambda}_2(\mathbf{k}_1,\mathbf{k}_2) &=\frac{1}{2}(1+\epsilon)+ \frac{1}{2}\frac{\mathbf{k}_1\cdot\mathbf{k}_2}{k_1 k_2} \left(\frac{k_1}{k_2}+\frac{k_2}{k_1}\right) \nonumber \\ &\qquad +\frac{1}{2}(1-\epsilon) \frac{(\mathbf{k}_1\cdot\mathbf{k}_2)^2}{k_1^2 k_2^2}, \label{F2} \end{align} where $\epsilon\approx-(3/7)\Omega_m^{-1/143}$ (\citep{bouchet}, and correcting for a mistake in \citep{Bernardeau}). The tree-level bispectrum is a very useful shape for characterising the matter bispectrum at large scales where density perturbations are small. It fails at smaller scales when perturbation theory breaks down so we need additional shapes for a good fit to the bispectrum in those regimes. The authors of \citep{Andrei,transients} have extended the tree-level shape by replacing $P_{\text{lin}}$ by the non-linear power spectrum $P_{\text{NL}}$ and we shall follow their example here. \subsubsection{Nine-parameter model} The tree-level bispectrum fails to describe the matter bispectrum accurately even at mildly non-linear regimes. A way of extending perturbation theories without resorting to loop corrections is with phenomenological corrections to the kernel $F^{(s)}_2$ by fitting to simulations. One such example was introduced in \citep{9param} which proposed \begin{align} &F^{\text{eff}}_2(\mathbf{k}_1,\mathbf{k}_2)= \frac{5}{7}a(n_1,k_1)a(n_2,k_2) \nonumber \\ &\quad+\frac{1}{2}\frac{\mathbf{k}_1\cdot \mathbf{k}_2}{k_1 k_2}\left(\frac{k_1}{k_2} +\frac{k_2}{k_1}\right) b(n_1,k_1)b(n_2,k_2) \nonumber \\ &\quad+\frac{2}{7}\frac{(\mathbf{k}_1\cdot \mathbf{k}_2)^2}{k_1^2 k_2^2} c(n_1,k_1)c(n_2,k_2), \label{9param} \end{align} where \begin{align} a(n,k)&=\frac{1+\sigma_8^{a_6}(z) [0.7Q_3(n)]^{1/2} (qa_1)^{n(k)+a_2}}{1+(qa_1)^{n(k)+a_2}} \\ b(n,k)&=\frac{1+0.2a_3(n(k)+3)(qa_7)^{n(k)+3+a_8}} {1+(qa_7)^{n(k)+3.5+a_8}} \\ c(n,k)&=\frac{1+4.5a_4/[1.5+(n(k)+3)^4] (qa_5)^{n(k)+3+a_9}}{1+(qa_5)^{n(k)+3.5+a_9}}. \end{align} Here $q=k/k_{\text{NL}}$, where $k_{\text{NL}}$ which is the scale at which perturbation theory breaks down and is found by solving the equation $k_{\text{NL}}^3 P_{\text{lin}}(k_{\text{NL}},z)=2\pi^2$. The functions $n(k)$ and $Q_3(n)$ are defined as: \begin{align} n(k)&=\frac{d\log P_{\text{lin}}(k)}{d\log k} \\ Q_3(n)&=\frac{4-2^n}{1+2^{n+1}}. \\ \end{align} The 9 parameters $a_i$ were fitted to simulations with an error threshold of 10\% in the $k$-range of $0.03\,h^{-1}\text{Mpc}\leq k\leq 0.4\,h^{-1}\text{Mpc}$ and redshift range of $0\leq z \leq 1.5$, and take the values of \begin{align} &a_1=0.484 \quad &&a_2=3.740 \quad &&a_3=-0.849 \nonumber \\ &a_4=0.392 \quad &&a_5=1.013 \quad &&a_6=-0.575 \nonumber \\ &a_7=0.128 \quad &&a_8=-0.722 \quad &&a_9=-0.926. \nonumber \\ \end{align} \subsubsection{Local shape} The local, or squeezed, bispectrum shape is another popular example. Its name derives from the local type non-Gaussianity which is generated simply by adding a term proportional to the square of the Gaussian field $\phi_{G}$: to itself \begin{align} \label{eq:local_NG} \phi_{NG}=\phi_{G}+f_{nl}(\phi_{G}^2-\langle\phi_{G}^2\rangle), \end{align} where $f_{nl}$ is the non-linearity parameter that gives the degree of non-Gaussianity, and the term in angle brackets is added to ensure $\phi_{NG}$ has zero mean. It can be shown that the bispectrum of $\phi_{NG}$ takes the form \begin{align} \label{eq:local_shape} &B^{\text{local}}(k_1,k_2,k_3) = \frac{1}{3} [P_\phi(k_1)P_\phi(k_2) \nonumber \\ &\qquad\qquad+P_\phi(k_2)P_\phi(k_3)+ P_\phi(k_3)P_\phi(k_1)], \end{align} where $P_\phi(k)\propto k^{n_s}$ is the power spectrum of $\phi_G$ and $n_s$ is the scalar spectral index. There are two ways of promoting this into late times. The easy, and incorrect, way is to replace $P_\phi$ with the linear power spectrum: \begin{align} \label{eq:squeez_shape} &B^{\text{squeez}}(k_1,k_2,k_3) = \frac{1}{3} [P_{\text{lin}}(k_1)P_{\text{lin}}(k_2) \nonumber \\ &\qquad\qquad+P_{\text{lin}}(k_2)P_{\text{lin}}(k_3)+ P_{\text{lin}}(k_3)P_{\text{lin}}(k_1)]. \end{align} Since the linear power spectrum $P_{\text{lin}}(k)\propto k^{n_s-4}$ for large $k$, $B^{\text{squeez}}$ peaks for squeezed triangle configurations where one of the $k$'s is much smaller than the other two, e.g. $k_1\ll k_2,k_3$. This shape is, however, not the correct extension since at large scales $B\propto D^3_1$ where $D_1$ is the linear growth factor, whereas $P_{\text{lin}}$ grows as $D^2_1$. Using $\delta(\mathbf{k},z)=M(k,z)\phi_{NG}(\mathbf{k})$ and\footnote{ $T(k)$ denotes the transfer function, $\Omega_M$ is the present-day matter density parameter, and $H_0$ is the Hubble parameter.} $M(k,z)=\frac{2 D_1(z)T(k) k^2}{3\Omega_M H_0^2}$ we obtain \begin{align} \label{eq:local_late_shape} &B^{\text{local,late}}(k_1,k_2,k_3) \nonumber \\ &= M(k_1)M(k_2)M(k_3) B^{\text{local}}(k_1,k_2,k_3) \nonumber \\ &\propto \sqrt{\frac{P_{\text{lin}}(k_1)P_{\text{lin}}(k_2) P_{\text{lin}}(k_3)}{(k_1k_2k_3)^{n_s}}}( k_1^{n_s-2}k_2^{n_s-2}k_3^{2} \nonumber \\ &\qquad+k_1^{2}k_2^{n_s-2}k_3^{n_s-2}+k_1^{n_s-2}k_2^{2}k_3^{n_s-2}). \end{align} \subsubsection{Constant shape} Another useful shape is the constant shape produced by equilateral triangles $k_1=k_2=k_3$: \begin{align} \label{eq:const_shape} B^{\text{const}}(k_1,k_2,k_3) &= B, \end{align} where $B$ is, expectedly, a constant. This is the bispectrum shape obtained by a set of Poisson-distributed point sources, for instance the late time matter distribution at small scales which consists of point-like dark matter halo particles. The constant shape is therefore ideal for describing the late time matter bispectrum at small scales. \subsubsection{3-shape model} The authors of \citep{Andrei} have proposed a benchmark model that utilises 3 basic bispectrum shapes to build a phenomenological model for the matter bispectrum calibrated to simulations, very much akin to the HALOFIT model \citep{halofit} which was introduced to capture the behaviour of the matter power spectrum. For greater flexibility of the model they allowed the shapes to have scale-dependent amplitudes $f_i(K)$ with $K=k_1+k_2+k_3$ for a better fit to the data. The 3-shape bispectrum is the following linear combination of the constant, squeezed and tree-level shapes: \begin{align} &B_{\text{3-shape}}(k_1,k_2,k_3) \nonumber \\ &= f_{1h}(K)B^{\text{const}}(k_1,k_2,k_3) +f_{2h}(K)B^{\text{squeez}}(k_1,k_2,k_3) \nonumber \\ &\quad +f_{3h}(K)B^{\text{treeNL}}(k_1,k_2,k_3), \label{eqn:3-shape} \end{align} where $B^{\text{const}}$ and $B^{\text{squeez}}$ are given by \Cref{eq:const_shape,eq:squeez_shape}. The tree-level shape is based on \Cref{eq:tree_shape} except we have replaced the linear power spectrum with the non-linear power spectrum obtained from simulations: \begin{align} &B^{\text{treeNL}}(k_1,k_2,k_3)= \nonumber \\ &\quad 2P_{\text{NL}}(k_1) P_{\text{NL}}(k_2)F^{(s),\Lambda}_2 (\mathbf{k}_1,\mathbf{k}_2)+2\,\text{perms.}, \label{treeNL} \end{align} The amplitudes $f_i(K)$ are found by fitting each of these shapes to the three halo model components. For a comprehensive review on the halo model bispectrum please see \citep{Andrei}. The one-halo bispectrum has been shown to correlate very well with the constant shape with the following choice of Lorentzian fitting function: \begin{equation} f_{1h}(K)=\frac{A}{(1+bK^2)^2}, \end{equation} where $A$ and $b$ are redshift-dependent functions through the linear growth factor $D(z)$: \begin{align} A&=\frac{2.45\times10^6D(z)^8}{0.8+0.2\,D(z)^{-3}}\\ b&=0.054\,D(z)^{2.2}. \end{align} The two-halo bispectrum has a strong correlation with the squeezed shape but has several notable shortcomings \citep{halo1,halo2,halo3}. To resolve these deficiencies Valageas and Nishimichi developed a halo-PT model \citep{haloPT1,haloPT2} that combines the halo model with perturbation theory. The fitting function \begin{align} f_{2h}(K)=\frac{C}{(1+DK^{-1})^3}. \end{align} with this choice of coefficients $C$ and $D$ \begin{align} C&=140\,D(z)^{-5/4}\\ D&=1.9\,D(z)^{-3/2} \end{align} gives a good fit to simulations. Finally, the three-halo bispectrum is simply non-linear tree-level shape predicted for large scales so an exponential fitting function is introduced to suppress it at small scales: \begin{equation} f_{3h}(K)=\exp(-K/E). \end{equation} An approximate fit for $E$ to simulations is \begin{align} E=7.5\,k_{\text{NL}}(z). \end{align} \subsection{Estimating Non-Gaussianity} \label{estimate} Generally bispectra can be parameterised by $f_{nl}B^{th}$, where the non-linearity parameter $f_{nl}$ can be thought of as the amplitude of this particular bispectrum and $B^{th}$ described the shape. Our goal is to find an optimal estimator for $f_{nl}$ for a given shape. It can be shown that the optimal estimator for $f_{nl}$ in the limit of weak non-Gaussianity and under the assumptions of statistical isotropy and homogeneity takes the form: \begin{align} &\hat{f}_{nl}= \frac{(2\pi)^6}{N_{th}} \int_{\mathbf{k}_1,\mathbf{k}_2,\mathbf{k}_3} \frac{\delta_D(\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3) B^{th}(k_1,k_2,k_3)}{P(k_1)P(k_2)P(k_3)} \nonumber \\ &\qquad\times\left(\delta_{\mathbf{k}_1}\delta_{\mathbf{k}_2} \delta_{\mathbf{k}_3}-3\expval{\delta_{\mathbf{k}_1} \delta_{\mathbf{k}_2}}\delta_{\mathbf{k}_3}\right). \label{fnl} \end{align} where $\int_{\mathbf{k}_1,\mathbf{k}_2,\mathbf{k}_3}=\int \frac{d^3k_1}{(2\pi)^3}\frac{d^3k_2}{(2\pi)^3}\frac{d^3k_3}{(2\pi)^3}$. The purpose of the linear term used above ( $\expval{\delta_{\mathbf{k}_1} \delta_{\mathbf{k}_2}}\delta_{\mathbf{k}_3}$ ), analogous to that used in CMB analysis, is that it suppresses mode couplings due to anisotropic effects e.g. incomplete survey coverage. Clearly this is not an issue for the work on simulations in this paper so we will neglect it, noting that it could be important for observational analysis. To work out the normalisation factor $N_{th}$ we impose the condition that $\langle\hat{f}_{nl}\rangle=1$ if the theoretical model is indeed the correct underlying bispectrum, i.e. if $B^{th}=B^{\text{correct}}_\delta$ where $\expval{\delta(\mathbf{k}_1) \delta(\mathbf{k}_2)\delta(\mathbf{k}_3)}\equiv(2\pi)^3 \delta_D(\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3) f_{nl} B^{\text{correct}}_\delta(k_1,k_2,k_3)$. After taking the statistical average of $\hat{f}_{nl}$ over different realisations of $\delta$ we get \begin{align} &\expval{\hat{f}_{nl}}= \nonumber \\ &\quad\frac{1}{N_{th}}\frac{V}{\pi} \int_{\mathcal{V}_B}dV_k\, k_1k_2k_3 \frac{B^{th}(k_1,k_2,k_3)B_\delta(k_1,k_2,k_3)}{P(k_1)P(k_2)P(k_3)}, \label{expectation} \end{align} where $dV_k\equiv dk_1dk_2dk_3$, and the superscript `$\text{correct}$' has been dropped for brevity. $\mathcal{V}_B$ is the bispectrum domain defined by the triangle condition imposed on the wavenumbers $k_i$ such that $\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3=0$, together with a chosen resolution limit $k_1,k_2,k_3<k_{max}$. Setting $B^{th}=B_\delta$ and demanding $\expval{\hat{f}_{nl}}=1$ gives the normalisation factor as \begin{align} N_{th} &= \frac{V}{\pi} \int_{\mathcal{V}_B}dV_k\, k_1k_2k_3 \frac{[B(k_1,k_2,k_3)]^2}{P(k_1)P(k_2)P(k_3)}. \label{nth} \end{align} The form of \Cref{expectation} suggests we should define inner products between bispectra as\footnote{We use square brackets $[\,\,]$ for inner products to avoid confusion with expectation values, which are labelled with angle brackets $\expval{}$.} \begin{align} \left[B_i,B_j\right] \equiv \frac{V}{\pi} \int_{\mathcal{V}_B}dV_k\, k_1k_2k_3 \frac{B_i(k_1,k_2,k_3)B_j(k_1,k_2,k_3)}{P(k_1)P(k_2)P(k_3)}. \label{inner_product} \end{align} This naturally motivates the definition of the signal-to-noise (SN) weighted bispectrum, \begin{align} B_i^{SN}(k_1,k_2,k_3) \equiv \sqrt{\frac{k_1k_2k_3}{P(k_1)P(k_2)P(k_3)}} B_i(k_1,k_2,k_3). \label{SN} \end{align} This SN-weighted bispectrum is relevant for observations of the matter bispectrum and is useful for providing forecasts for future surveys. The bispectrum domain $\mathcal{V}_B$ takes the form of a tetrapyd in $k$-space as shown in \Cref{tetrapyd}. It is the union of a tetrahedral region and a triangular pyramid on top. Plotting the full tetrapyd obscures it inner structure, and we have found it useful to split it in half to make apparent its internal morphology. As illustrated in \Cref{tetrapyd_split}, different bispectrum shapes can be distinguished through the regions in the tetrapyd where they give the strongest signal. In \Cref{fig:theory_bis} we show the bispectra shapes introduced in \Cref{sec:shap-non-gauss}. The bispectra plots are in this paper generated with \texttt{ParaView} \citep{paraview}, an open source scientific visualisation tool. \begin{figure*}[!htb] \begin{subfigure}[b]{0.42\textwidth} \includegraphics[width=\textwidth]{tetrapyd3Dk.pdf} \caption{The full tetrapyd bispectrum domain consists of a tetrahedral region (blue) defined by the wavevector triangle condition $\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3=0$, together with a pyramidal region (green) bounded by the resolution limit $k_{\text{max}}$. To show the internal structure of the tetrapyd we split it along the red dashed line to obtain \Cref{tetrapyd_split}. \citep{Andrei}} \label{tetrapyd} \end{subfigure} ~ \begin{subfigure}[b]{0.42\textwidth} \includegraphics[width=\textwidth]{tetrapyd3Dk_split_slim.pdf} \caption{The split 3D tetrapyd region showing only the back half with $k_1<k_2$. Colour-coded regions show the location of the `squeezed' (red), `flattened' (green) and `equilateral' or `constant' (blue) shape signals. The scale dependence of the bispectrum is reflected by the $K\equiv k_1+k_2+k_3=\text{const.}$ cross sectional planes. \citep{Andrei}} \label{tetrapyd_split} \end{subfigure} \caption{Tetrahedral geometry of the allowed bispectrum combination $B(k_1,k_2,k_3)$.} \end{figure*} \begin{figure*} \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{theo_bis_6_1000_4_682_6400_49_z0p500_0.66857_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \caption{Tree-level shape, $k_{max}=0.4$} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{theo_bis_6_1000_4_682_6400_55_z0p500_0.66857_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \caption{Nine-parameter model, $k_{max}=0.4$} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{theo_bis_6_1000_4_682_1280_56_z0p500_3.34285_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \caption{Scaled Tree-level shape, $k_{max}=2$} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{theo_bis_6_1000_4_682_1280_57_z0p500_3.34285_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \caption{Scaled squeezed shape, $k_{max}=2$} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{theo_bis_6_1000_4_682_1280_58_z0p500_3.34285_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \caption{Scaled constant shape, $k_{max}=2$} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{theo_bis_6_1000_4_682_1280_52_z0p500_3.34285_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \caption{3-shape model, $k_{max}=2$} \end{subfigure} \caption{The bispectrum shapes introduced in \Cref{sec:shap-non-gauss} plotted at redshift $z=0.5$ up to various $k_{max}$.} \label{fig:theory_bis} \end{figure*} \subsubsection{Correlators Between Bispectra \label{corr}} Using \Cref{expectation} we can further define 4 correlators between bispectra. The shape correlator, $\mathcal{S}$, is defined by \begin{align} \mathcal{S}(B_i,B_j) \equiv \frac{\left[B_i,B_j\right]} {\sqrt{\left[B_i,B_i\right]\left[B_j,B_j\right]}}, \label{eqn:shape} \end{align} and is restricted to $-1\leq\mathcal{S}\leq1$. It can be thought of as the cosine between $B_i$ and $B_j$. To quantify how well the magnitudes of $B_i$ and $B_j$ match each other we define the amplitude correlator $\mathcal{A}$ as \begin{align} \mathcal{A}(B_i,B_j) \equiv \sqrt{\frac{\big[B_i,B_i\big]} {\big[B_j,B_j\big]}}. \end{align} We can combine the information given by the shape and amplitude correlators into a single quantity known as the total correlator $\mathcal{T}$: \begin{align} &\mathcal{T}(B_i,B_j) \equiv 1- \sqrt{\frac{ \left[B_j-B_i,B_j-B_i\right]}{\left[B_j,B_j\right]}} \nonumber \\ &\quad= 1-\sqrt{1-2\mathcal{S}(B_i,B_j)\mathcal{A}(B_i,B_j)+ \mathcal{A}^2(B_i,B_j)}. \label{total} \end{align} The total correlator is a stringent test of correlation between bispectra, as both misalignment ($\mathcal{S}<1$) or a difference in amplitude ($\mathcal{A}\neq1$) lead to a decrease in $\mathcal{T}$. Later on we will use $\mathcal{T}$ to test the ability of \texttt{MODAL-LSS}{} to reconstruct theoretical bispectra (see \Cref{sec:modal-methodology}). We can interpret $\mathcal{T}$ physically as follows. Let $B_T$ be the true bispectrum and $B_A$ be an approximation to $B_T$. Now suppose we constrain each of these templates with \Cref{fnl} to obtain $f^T_{NL}$ and $f^A_{NL}$. The variance of each estimate is given by \begin{align} \sigma^2_i = \expval{{f^i_{NL}}^2} = N_i^{-1} = \left[B_i,B_i\right]^{-1} \end{align} and the variance of the difference between the two estimates is given by \begin{align} \sigma^2_{diff} &= \expval{\left(f^T_{NL} - f^A_{NL} \right)^2} \nonumber\\ &= \frac{1}{(N_T N_A)^2} \left[N_A B_T - N_T B_A , N_A B_T - N_T B_A \right] \nonumber\\ &= \frac{N_A - 2 \left[ B_A, B_T\right] + N_T}{N_A N_T} \end{align} If we take the ratio of $\sigma_{diff}$ and $\sigma_A$ then we get \begin{align} \frac{\sigma^2_{diff}}{\sigma^2_A} &=1 - 2 \frac{1}{N_T}\left[ B_A, B_T\right] + \frac{N_A}{N_T} \nonumber\\ & \left( 1 - \mathcal{T}(B_T,B_A) \right)^2 \end{align} This allows us to identify $1-\mathcal{T}$ as the coefficient of variation $c_v$ \citep{everitt}. Therefore if $B_A$ is used as a proxy for $B_T$, $1-\mathcal{T}$ gives us the standard deviation between our estimate of $f_{NL}$ and the true value as a fraction of our error bar, ie: \begin{align} \sigma_{diff} = \left( 1 - \mathcal{T} \right) \sigma \end{align} $\mathcal{T}$ is appropriate for comparing theoretical bispectra, but its performance is easily degraded by cosmic variance and hence another correlator is needed when simulation/observational data is involved. The $f_{nl}$ correlator, named as such due to its similarity to the $\langle\hat{f}_{nl}\rangle$ parameter in \Cref{expectation} above, again combines the shape and amplitude correlators: \begin{align} f_{nl}(B_i,B_j) &\equiv \frac{\big[B_i,B_j\big]}{\big[B_j,B_j\big]} \nonumber \\ &= \mathcal{S}(B_i,B_j)\mathcal{A}(B_i,B_j). \label{fnl_corr} \end{align} This can be interpreted as simply correlation between our estimate of $f_{NL}$ with the true value, normalised by the true value. \begin{align} \frac{\expval{ f^T_{NL} f^A_{NL}}}{\expval{ {f^T_{NL}}^2 }} &= \frac{1}{N_A} \left[B_T,B_A\right] \nonumber\\ &= f_{nl}(B_T,B_A) \end{align} \subsection{\texttt{MODAL-LSS}{} Methodology} \label{sec:modal-methodology} For general bispectra the 9-dimensional integral in the $\hat{f}_{NL}$ estimator (\Cref{fnl}) is computationally intractable. This computation barrier has been solved by a separable method introduced in \citep{MODAL}. This \texttt{MODALl} method has been applied to Planck CMB analysis with great success \citep{Planck}. This approach was adapted analyse the bispectrum of the large scale structure of the universe in \citep{MODAL-LSS}, which iwas aptly named \texttt{MODAL-LSS}{}. Here we outline the \texttt{MODAL-LSS}{} methodology. \subsubsection{\texttt{MODAL-LSS}{} Basis} We first approximate the SN-weighted theoretical bispectrum in \Cref{SN} by expanding it in a general seperable basis (see also \Cref{fig:modal_expansion_cartoon}): \begin{align} &\sqrt{\frac{k_1k_2k_3}{P(k_1)P(k_2)P(k_3)}}B^{th}(k_1,k_2,k_3) \nonumber \\ &\quad\approx\sum_n^{n_{max}} \alpha^Q_n Q^{\texttt{MODAL-LSS}{}}_n(k_1/k_{max},k_2/k_{max},k_3/k_{max}). \label{expand} \end{align} The basis functions ${Q^{\texttt{MODAL-LSS}{}}_n}$ are symmetrised products over one dimensional functions $q_r$: \begin{align} Q^{\texttt{MODAL-LSS}{}}_n (x,y,z) \equiv q_{\{r}(x)q_{s}(y)q_{t\}}(z), \end{align} with $\{\dots\}$ representing symmetrisation over the indices $r,s,t$, and each $n$ corresponds to a combination of $r,s,t$. $k_{max}$ is the resolution of the tetrahedral domain defined above. The choice of $q_r$ is arbitrary and there are many sensible choices including $k$-bins (which are localised in $k$-space), wavelets (which are localised in real space), Fourier modes, etc. We adopt polynomials since they offer efficient compression of the data so fewer modes can be used without information loss. Note that the ${Q^{\texttt{MODAL-LSS}{}}_n}$ form a complete basis for the expansion of $B^{th}$, but naturally we truncate the expansion at some $n_{max}$ depending on the accuracy required. For convenience in our discussion below we will assume that the truncation causes errors are tiny and assume that \Cref{expand} is exact. \begin{figure*} \begin{align} \vcenter{\hbox{\includegraphics[width=0.2\linewidth]{{theo_bis_1000_2048_49_z0p000_0.25_cropped}.jpeg}}} =\,\alpha_1 \vcenter{\hbox{\includegraphics[width=0.2\linewidth]{{theo_bis_1000_2048_Q0_z0p000_0.25_cropped}.jpeg}}} +\,\alpha_2 \vcenter{\hbox{\includegraphics[width=0.2\linewidth]{{theo_bis_1000_2048_Q2_z0p000_0.25_cropped}.jpeg}}} +\,\alpha_3 \vcenter{\hbox{\includegraphics[width=0.2\linewidth]{{theo_bis_1000_2048_Q6_z0p000_0.25_cropped}.jpeg}}} +\cdots \end{align} \caption{A cartoon demonstrating the \texttt{MODAL-LSS}{} expansion. Here we are expanding the tree level bispectrum (\Cref{eq:tree_shape}) as a linear combination of the $Q^{\texttt{MODAL-LSS}{}}_n$ basis functions (represented by the tetrapyds), each of which is weighted by an $\alpha_n$ coefficient.} \label{fig:modal_expansion_cartoon} \end{figure*} It has been shown that the convergence of the sum in \Cref{expand} is independent of the choice of polynomials $q_r$. Different choices of polynomials only change the individual $\alpha^Q_n$ but not the sum. As such we choose our polynomials in order to ensure numerical stability of the method on the tetrahedral domain $\mathcal{V}_B$. Currently we find shifted Legendre polynomials $\tilde{P}_l(x)=P_l(2x-1)$ perform well and are adopted for $q_r$ as they demonstrate better orthogonality at low $n$ and encapsulate the behaviour of the bispectrum at non-linear scales very well. Calculation of higher order polynomials also demonstrates good numerical stability when calculated recursively. Another issue is the mapping between $n$ and $r,s,t$. The ordering of this mapping is arbitrary, here we have adopted `slice ordering' which orders the triples by the sum $r+s+t$. A sub-ordering is introduced along each column in cases of degeneracy, i.e. \begin{align}\label{eq:slicingorder} &\underline{0 \rightarrow 000} \quad 4 \rightarrow 111 \quad~\, 8 \rightarrow 022\quad 12 \rightarrow 113 \nonumber \\ & \underline{1\rightarrow 001} \quad 5 \rightarrow 012 \quad~\, 9 \rightarrow 013 \quad 13 \rightarrow 023 \nonumber \\ & 2 \rightarrow 011 \quad \underline{6 \rightarrow 003}\quad \underline{10 \rightarrow 004} \quad 14 \rightarrow 014 \\ &\underline{ 3 \rightarrow 002} \quad 7 \rightarrow 112 \quad 11 \rightarrow 122 \quad \underline{15 \rightarrow 005} ~\cdots\,, \nonumber \end{align} where the lines mark the end of each overall polynomial order. Using the \texttt{MODAL-LSS}{} expansion in \Cref{expand} we can rewrite $\hat{f}_{nl}$ in \Cref{fnl} as: \begin{align} \hat{f}_{nl} & =\frac{(2\pi)^6}{N_{th}} \int_{\mathbf{k}_1,\mathbf{k}_2,\mathbf{k}_3} \delta_D(\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3) \nonumber \\ & \qquad\qquad\times\frac{\sum_n \alpha^Q_n q_{\{r}(\frac{k_1}{k_{max}})q_s(\frac{k_2}{k_{max}}) q_{t\}}(\frac{k_3}{k_{max}})}{\sqrt{k_1P(k_1)k_2P(k_2)k_3P(k_3)}} \nonumber \\ & \qquad\qquad\times\left(\delta_{\mathbf{k}_1}\delta_{\mathbf{k}_2}\delta_{\mathbf{k}_3}- \langle\delta_{\mathbf{k}_1}\delta_{\mathbf{k}_2} \rangle\delta_{\mathbf{k}_3}\right) \nonumber \\ & =\frac{(2\pi)^3}{N_{th}} \sum_n \alpha^Q_n \int d^3 x \int\frac{\prod_i d^3k_i}{(2\pi)^9} e^{i(\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3)\cdot\mathbf{x}} \nonumber \\ & \qquad\qquad\times\frac{q_{\{r}( \frac{k_1}{k_{max}})q_s(\frac{k_2}{k_{max}})q_{t\}}( \frac{k_3}{k_{max}})}{\sqrt{k_1P(k_1)k_2P(k_2)k_3P(k_3)}} \nonumber \\ & \qquad\qquad\times\left(\delta_{\mathbf{k}_1}\delta_{\mathbf{k}_2}\delta_{\mathbf{k}_3}- \langle\delta_{\mathbf{k}_1}\delta_{\mathbf{k}_2} \rangle\delta_{\mathbf{k}_3}\right) \nonumber \\ & =\frac{(2\pi)^3}{N_{th}} \sum_n \alpha^Q_n \int d^3 x \bigg[M_r(\mathbf{x})M_s(\mathbf{x})M_t(\mathbf{x}) \nonumber \\ & \qquad\qquad-\langle M_{\{r}(\mathbf{x})M_s(\mathbf{x}) \rangle M_{t\}}(\mathbf{x})\bigg], \label{eqn:fnl_sub} \end{align} where in the second line we have used the integral from of the delta function with variable $\mathbf{x}$, and we defined \begin{align} M_r(\mathbf{x}) \equiv \int\frac{d^3k}{(2\pi)^3}\frac{\delta_{\mathbf{k}}q_r(k/k_{max})} {\sqrt{kP(k)}}e^{i\mathbf{k}\cdot\mathbf{x}}, \label{Mfunc} \end{align} which is an inverse Fourier transform\footnote{Here the choice of the polynomials $q_r$ becomes important. For example, the integral in \Cref{Mfunc} convergences poorly for large $r$ if we choose monomials $q_r=x^r$.}. Note that there is no symmetrisation over $r,s,t$ in the first term inside the square brackets as the product is already symmetric. As we are only analysing simulation data which approximately homogeneous and isotropic we can ignore the second term in the square brackets as it evaluates to zero. We then introduce \begin{align} \beta^Q_n = (2\pi)^3\int d^3x \,M_r(\mathbf{x})M_s(\mathbf{x})M_t(\mathbf{x}) \label{betaQ} \end{align} which allows us to express $\hat{f}_{nl}$ in a simple and elegant form: \begin{align} \hat{f}_{nl} = \frac{1}{N_{th}}\sum_n \alpha^Q_n \beta^Q_n. \label{simple} \end{align} The beta coefficients $\beta^Q_n$ are approximately analogous (there is a subtly we will meet in the next section) to the alpha coefficients $\alpha^Q_n$ but they are used in the expansion of observational/simulation bispectra instead of theoretical ones. In summary, we have reduced the complicated integral in \Cref{fnl} to a the calculation of $\alpha^Q_n$ and $\beta^Q_n$ coefficients. The computation of $\alpha^Q_n$ coefficients is a non-trivial problem but has been made efficient by the authors of \citep{modal_HPC} whose implementation which we use here. The $\beta^Q_n$ coefficients on the other hand only require a number of (inverse) Fourier transforms (evident upon inspection of \Cref{Mfunc}) which can be evaluated efficiently with the fast Fourier transform (FFT) algorithm\footnote{We use the \texttt{FFTW3} \citep{FFTW05} implementation of the algorithm.}, together with an integral over the spatial extent of the data set (\Cref{betaQ}) which can highly parallelised with Open Multi-Processing (\texttt{OpenMP}). \subsubsection{An orthogonal basis \label{sec:ortho_basis}} Unlike the theoretical bispectrum the observational/simulation bispectrum is a statistical quantity, and and it can only be estimated through different realisations of the density field $\delta$. We expand the estimated observational bispectrum $\hat{B}_\delta$ in the following way: \begin{align} &\sqrt{\frac{k_1k_2k_3}{P(k_1)P(k_2)P(k_3)}}\hat{B}_\delta(k_1,k_2,k_3) \nonumber \\ &\quad=\sum_n^{n_{max}} \tilde{\beta}^Q_n Q_n(k_1/k_{max},k_2/k_{max},k_3/k_{max}), \label{eqn:modal_est} \end{align} the expectation value of which is the true underlying observational bispectrum $B_\delta\equiv\langle\hat{B}_\delta\rangle$: \begin{align} &\sqrt{\frac{k_1k_2k_3}{P(k_1)P(k_2)P(k_3)}}B_\delta(k_1,k_2,k_3) \nonumber \\ &\quad=\sum_n^{n_{max}} \langle\tilde{\beta}^Q_n\rangle Q_n(k_1/k_{max},k_2/k_{max},k_3/k_{max}). \label{tilde} \end{align} We have introduced these new beta coefficients \footnote{We could have instead to reversed the placement of the tilde to make $\alpha^Q_n$ and $\beta^Q_n$ more analogous, but we have adopted this notation as it more closely represents the computational flow of the method.} $\tilde{\beta}^Q_n$. To relate $\tilde{\beta}^Q_n$ to $\beta^Q_n$ we substitute \Cref{tilde} into \Cref{expectation}: \begin{align} \langle\hat{f}_{nl}\rangle &= \frac{1}{N_{th}}\frac{V}{\pi} \int_{\mathcal{V}_B}dV_k\, \sum_{nm}\alpha_n^Q \langle\tilde{\beta}^Q_n\rangle Q_nQ_m \nonumber \\ &= \frac{1}{N_{th}}\sum_{nm}\alpha_n^Q \langle\tilde{\beta}^Q_n\rangle \gamma_{nm}, \label{fnl_Q} \end{align} where\footnote{Note that when a large number of modes are used, this integral evaluated with a regular grid on the tetrapyd domain and with FFTs differs greatly, especially in the limit of a low number of grid points. We conclude that discrete sampling has a different effect on direct integration compared to when FFTs are used, and to ensure internal consistency of the $\alpha$ and $\beta$ coefficients we evaluate $\gamma_{nm}$ separately by integration on the tetrapyd for $\alpha_n^Q$ and via FFTs for $\beta_n^Q$ to rotate them into the $\{R_n\}$ basis. For large grids $N_g>\mathcal{O}(1024)$ the memory requirements of computing $\gamma_{nm}$ with FFTs are too great, but we have verified that for such grids the two methods give consistent results and hence direct integration is used instead. See \Cref{appendix_C} for more details. } \begin{align} \gamma_{nm}\equiv\frac{V}{\pi}\int_{\mathcal{V}_B}dV_kQ_nQ_m \label{gamma} \end{align} is the inner product between the $Q_n$ functions on the tetrapyd domain. Generally speaking $\gamma_{nm}$ is not diagonal since the $Q_n$ functions are not orthogonal to each other. Comparing this with the expectation value of \Cref{simple} we obtain \begin{align} \langle\beta^Q_n\rangle = \sum_m \gamma_{nm}\langle\tilde{\beta}^Q_m\rangle \Rightarrow \beta^Q_n = \sum_m \gamma_{nm}\tilde{\beta}^Q_m. \label{eqn:beta_basis} \end{align} While $\beta^Q_n$ may be straightforward to evaluate numerically through \Cref{betaQ}, it often proves simpler to use an orthonormalised version we create by diagonalising $\gamma_{nm}$. We therefore introduce a basis $\{R_n\}$ which is defined relative to $\{Q_n\}$ by \begin{align} R_n\equiv\lambda_{nm}Q_m \Leftrightarrow Q_p\equiv(\lambda^{-1})_{pq}R_q \label{eqn:RQconv} \end{align} such that it is orthonormal on the tetrapyd domain: \begin{align} \frac{V}{\pi}\int_{\mathcal{V}_B}dV_kR_nR_m=\delta_{nm}. \label{orthonormal} \end{align} From \Cref{gamma,orthonormal} we deduce that $\gamma=\lambda^{-1}(\lambda^{-1})^T$. Choosing $R_n$ to have the same polynomial order as $Q_n$ forces this $\lambda$ to be the Cholesky decomposition. This is equivalent to a performing a modified Gram-Schmitt orthonormalisation of the $Q_n$ directly. We now apply the expansion in the $\{R_n\}$ basis: \begin{align} &\sqrt{\frac{k_1k_2k_3}{P(k_1)P(k_2)P(k_3)}}B^{th}(k_1,k_2,k_3) \nonumber \\ &\quad=\sum_n^{n_{max}} \alpha^R_n R_n(k_1/k_{max},k_2/k_{max},k_3/k_{max}), \\ &\sqrt{\frac{k_1k_2k_3}{P(k_1)P(k_2)P(k_3)}}B_\delta(k_1,k_2,k_3) \nonumber \\ &\quad=\sum_n^{n_{max}} \langle\beta^R_n\rangle R_n(k_1/k_{max},k_2/k_{max},k_3/k_{max}). \end{align} Note that due to the orthonormality of the $R_n$ functions we do not need two sets of $\beta$ coefficients in this basis. Since $\sum_n\alpha^Q_nQ_n=\sum_n\alpha^R_nR_n$, one can derive the following relationships between the coefficients in the $\{Q_n\}$ and $\{R_n\}$ bases: \begin{align} \alpha^R_n=\sum_m(\lambda^{-1})^T_{nm}\alpha^Q_m,\quad \beta^R_n=\sum_m(\lambda^{-1})^T_{nm}\tilde{\beta}^Q_m, \end{align} which allows us to write \begin{align} \langle\hat{f}_{nl}\rangle = \frac{1}{N_{th}}\sum_n \alpha^R_n \langle\beta^R_n\rangle. \end{align} One can very easily show this is consistent with \Cref{fnl_Q} above. Using the \texttt{MODAL-LSS}{} ansatz with \Cref{nth} above we find that $N_{th}=\sum_n \alpha^R_n\alpha^R_n$. Therefore if the theoretical and data bispectrum match perfectly, i.e. $B^{th}=B_\delta$ and hence $\langle\hat{f}_{nl}\rangle = 1$, we deduce that $\langle\beta^R_n\rangle = \alpha^R_n$. \subsubsection{Numerical implementation\label{subsec:num}} An implementation of the \texttt{MODAL-LSS}{} method has already produced some good results \citep{MODAL-LSS}. The code has since been completely overhauled and parallelised with \texttt{OpenMP} and multi-threaded \texttt{FFTW} for a dramatic reduction in run time, allowing us to estimate the bispectra of much larger simulations and also using more modes. We are now able to estimate the bispectrum of $2048^3$ density grids with $n_{max}=\mathcal{O}(1000)$ modes in $\sim35$ minutes using 512 CPU-cores, a significant improvement in run time and resolution over the analysis of $512^3$ grids with $n_{max}=\mathcal{O}(50)$ in \citep{MODAL-LSS}. We would like to emphasise that the computational costs for bispectrum estimation with \texttt{MODAL-LSS}{} scales with the size of the density grid and is a tiny fraction of the costs of N-body runs, and thus can be included in existing pipelines with little additional cost. Another innovation to improve the performance of \texttt{MODAL-LSS}{} is the introduction of custom modes based on the separable bispectrum shapes given in \Cref{sec:shap-non-gauss}. Explicitly we split the SN-weighted versions of tree-level bispectrum (\Cref{eq:tree_shape}) and late-time local bispectrum (\Cref{eq:local_late_shape}) as follows (Note that $P(k)$ represents the non-linear power spectrum of choice): \begin{itemize} \item The tree-level bispectrum requires 6 custom polynomials: \begin{itemize} \item $q^{\text{tree}}_0(k)=\sqrt{\frac{k}{P(k)}}\frac{5}{14}$ \item $q^{\text{tree}}_1(k)=\sqrt{\frac{k}{P(k)}}P(k)$ \item $q^{\text{tree}}_2(k)=-\sqrt{\frac{k}{P(k)}}P(k)k^2$ \item $q^{\text{tree}}_3(k)=\sqrt{\frac{k}{P(k)}}\frac{P(k)}{k^2}$ \item $q^{\text{tree}}_4(k)=\sqrt{\frac{k}{P(k)}}\frac{3}{14}k^2$ \item $q^{\text{tree}}_5(k)=\sqrt{\frac{k}{P(k)}}\frac{1}{14}k^4$ \end{itemize} which are combined into these 4 modes: \begin{itemize} \item $Q^{\text{tree}}_0 = q_{\{1}(x)q_{1}(y)q_{0\}}(z)$ \item $Q^{\text{tree}}_1 = q_{\{2}(x)q_{3}(y)q_{0\}}(z)$ \item $Q^{\text{tree}}_2 = q_{\{1}(x)q_{3}(y)q_{4\}}(z)$ \item $Q^{\text{tree}}_3 = q_{\{3}(x)q_{3}(y)q_{5\}}(z)$ \end{itemize} \item The late-time local bispectrum requires 2 custom polynomials: \begin{itemize} \item $q^{\text{local,late}}_0(k)=\sqrt{\frac{k}{P(k)}} \sqrt{P_{\text{lin}}(k)}k^{n_s/2-2}$ \item $q^{\text{local,late}}_1(k)=\sqrt{\frac{k}{P(k)}} \sqrt{P_{\text{lin}}(k)}k^{2-n_s/2}$ \end{itemize} resulting in a single mode: \begin{itemize} \item $Q^{\text{local,late}}_0 = q_{\{0}(x)q_{0}(y)q_{1\}}(z)$ \end{itemize} \end{itemize} These custom modes help pick up general features in the matter bispectra, which combined with the $Q_n$ functions ensures an effective reconstruction of any dark matter bispectrum signal. \begin{figure*} \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{theo_bis_6_1000_4_682_6400_55_z0p500_0.66857_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{recon_bis_6_1000_4_682_6400_55_z0p500_0.66857_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{residual_bis_6_1000_4_682_6400_55_z0p500_0.66857_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \end{subfigure} \caption{The nine-parameter up to $k_{max}=0.4\,h\,\text{Mpc}^{-1}$ by direct calculation (left), its reconstruction by \texttt{MODAL-LSS}{} with 1000 modes (middle) and the residuals between them (right). Note the change of scale in the colour bars. } \label{fig:modal_theory_6400} \end{figure*} \begin{figure*} \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{theo_bis_6_1000_4_682_1280_52_z0p500_3.34285_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{recon_bis_6_1000_4_682_1280_52_z0p500_3.34285_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{residual_bis_6_1000_4_682_1280_52_z0p500_3.34285_408_bispectrum_tetrapyd.h5_cropped}.jpeg} \end{subfigure} \caption{The 3-shape model up to $k_{max}=2.0\,h\,\text{Mpc}^{-1}$ by direct calculation (left), its reconstruction by \texttt{MODAL-LSS}{} with 1000 modes (middle) and the residuals between them (right). Note the change of scale in the colour bars. } \label{fig:modal_theory_1280} \end{figure*} \begin{table*} \begin{tabular}{c|c|c|c|c|c|c} \multirow{2}{*}[-1ex]{Bispectrum shape} & \multirow{2}{*}[-1ex]{$n_{max}$} & \multicolumn{2}{c|}{$k_{max}=0.4\,h\,\text{Mpc}^{-1}$} & \multicolumn{2}{c|}{$k_{max}=2.0\,h\,\text{Mpc}^{-1}$} & Computational cost \\[1ex] \cline{3-6} \rule{0pt}{3ex} & & $1-\mathcal{S}_{\alpha,th}$ & $1-\mathcal{T}_{\alpha,th}$ & $1-\mathcal{S}_{\alpha,th}$ & $1-\mathcal{T}_{\alpha,th}$ & (CPU-minutes) \\[1ex] \hhline{=|=|=|=|=|=|=} \rule{0pt}{3ex} \multirow{4}{*}{Tree-level bispectrum} & $50^*$ & \num{6.7e-4} & \num{3.6e-2} & \num{1.3e-3} & \num{5.1e-2} & 160 \\ & 10 & 0 & 0 & 0 & 0 & 90 \\ & 50 & 0 & 0 & 0 & 0 & 160 \\ & 200 & 0 & 0 & 0 & 0 & 370 \\ & 1000 & 0 & 0 & 0 & 0 & 1600 \\[1ex] \hhline{-|-|-|-|-|-|-} \rule{0pt}{3ex} \multirow{4}{*}{Nine-parameter model} & $50^*$ & \num{6.6e-4} & \num{3.6e-2} & - & - & 450 \\ & 10 & \num{3.3e-4} & \num{2.6e-2} & - & - & 390 \\ & 50 & \num{2.2e-4} & \num{2.1e-2} & - & - & 450 \\ & 200 & \num{7.9e-5} & \num{1.3e-2} & - & - & 660 \\ & 1000 & \num{2.2e-5} & \num{6.7e-3} & - & - & 1870 \\[1ex] \hhline{-|-|-|-|-|-|-} \rule{0pt}{3ex} \multirow{4}{*}{3-shape model} & $50^*$ & \num{3.5e-4} & \num{2.6e-2} & \num{5.6e-5} & \num{1.1e-2} & 190 \\ & 10 & \num{5.8e-4} & \num{3.4e-2} & \num{3.8e-4} & \num{2.8e-2} & 120 \\ & 50 & \num{1.1e-4} & \num{1.5e-2} & \num{6.0e-5} & \num{1.1e-2} & 190 \\ & 200 & \num{1.6e-5} & \num{5.7e-3} & \num{1.2e-5} & \num{4.9e-3} & 400 \\ & 1000 & 0 & 0 & 0 & 0 & 1610 \\[1ex] \end{tabular} \caption{ The performance of \texttt{MODAL-LSS}{} at reconstructing different theoretical bispectrum shapes at different $k_{max}$ while varying the number of modes used in the reconstruction. $50^*$ indicates only shifted Legendre polynomials and no custom modes were used, highlighting the strength of the custom modes in capturing desired bispectrum signals. We use the shape $\mathcal{S}_{\alpha,th}$ and total correlator $\mathcal{T}_{\alpha,th}$ introduced in \Cref{total_alpha} to assess the accuracy of the reconstructed bispectra. It is clear that the total correlator is a much more stringent test than the shape correlator. With 1000 modes we obtain $\mathcal{T}_{\alpha,th}>0.99$ in all cases, giving us high confidence in the validity of the \texttt{MODAL-LSS}{} expansion. Note that we omit the nine-parameter model at $k_{max}=2.0\,h\,\text{Mpc}^{-1}$ since it is ill-defined at such non-linear scales. We give the computational cost of the method by the CPU-minutes required to reconstruct the theoretical bispectra on a $2048^3$ grid in pure \texttt{OpenMP} mode. It demonstrates better than linear scaling with $n_{max}$ which shows the highly optimised nature of the code. The performance also scales with $N_{grid}^3$, where $N_{grid}$ is the number of grid points, and will therefore run much faster for analyses that do not require such high resolution. } \label{fig:total_alphas} \end{table*} We conclude this section by assessing the accuracy of the \texttt{MODAL-LSS}{} expansion. This is only possible with theoretical bispectra where we know the true answer since statistical noise will always be present in simulations\footnote{We have however made comprehensive tests of the \texttt{MODAL-LSS}{} algorithm for estimating bispectrum of density fields, detailed in \Cref{appendix_C}.}. A qualitative comparison is illustrated in \Cref{fig:modal_theory_6400,fig:modal_theory_1280} where we plot the theoretical and reconstructed bispectra as well as the residuals between them different $k_{max}$. Quantitatively we evaluate both the shape and total correlator between a theoretical bispectrum $B^{th}$ and its \texttt{MODAL-LSS}{} counterpart $\sum_n\alpha^R_nB^R_n$, where \begin{align} &B^R_n(k_1,k_2,k_3) = \nonumber \\ &\quad\sqrt{\frac{P(k_1)P(k_2)P(k_3)} {k_1k_2k_3}}R_n(k_1/k_{max},k_2/k_{max},k_3/k_{max}). \end{align} Using \Cref{eqn:shape,total} we find that \begin{align} \mathcal{S}_{\alpha,th}&\equiv\mathcal{S}(\sum_n\alpha^R_nB^R_n,B^{th}) =\sqrt{\frac{\sum_n(\alpha^R_n)^2}{\left[B^{th},B^{th}\right]}}, \nonumber \\ \mathcal{T}_{\alpha,th}&\equiv\mathcal{T}(\sum_n\alpha^R_nB^R_n,B^{th}) =1-\sqrt{1-\frac{\sum_n(\alpha^R_n)^2}{\left[B^{th},B^{th}\right]}}, \label{total_alpha} \end{align} where we have used the orthonormality of the ${R_n}$ basis functions to obtain\footnote{Note that in principle $B^{th}=\sum^\infty_n\alpha^R_nB^R_n$.} $\left[\sum_n\alpha^R_nB^R_n ,B^{th}\right]=\sum_n(\alpha^R_n)^2$. We tested \texttt{MODAL-LSS}{} with a range of bispectrum shapes, including the tree-level bispectrum (\Cref{treeNL}), nine-parameter model (\Cref{9param}) and the 3-shape model (\Cref{eqn:3-shape}), at different $k_{max}$ and number of modes up to $n_{max}=1000$ (\Cref{fig:total_alphas}). \texttt{MODAL-LSS}{} is able to reconstruct all bispectrum shapes with $\mathcal{T}_{\alpha,th}>99\%$ at different $k$-ranges, and improvements can certainly be made by using more modes. This result justifies our decision to take the approximation in \Cref{expand} to be exact. This also gives us confidence that \texttt{MODAL-LSS}{} can very accurately estimate simulation and observational bispectra. The computational cost of \texttt{MODAL-LSS}{} is estimated by the CPU-minutes used when reconstructing the various bispectrum. The code for reconstructing theoretical bispectra is parallelised with hybrid \texttt{MPI-OpenMP} but the tests here were ran with pure \texttt{OpenMP} and 1 thread per CPU core. Note that this may not be the optimal number of threads and further reductions in run time may be possible. \subsection{Sources of error in bispectrum estimation} \label{sec:error} In order to make meaningful comparisons between simulation/observational data with theoretical predictions one must have a thorough understanding of the errors that occur in our measurements. Since the main focus of this paper is on simulations we will not discuss observational effects such as survey geometry and redshift-space distortions (RSD). The main contributions we consider here are Poisson shot noise, covariance of the \texttt{MODAL-LSS}{} estimator, and aliasing due to the use of FFTs, all of which are relevant for the analysis of observational data in the future. \subsubsection{Shot noise contribution to the power spectrum and bispectrum} Since dark matter halos and galaxies are discrete tracers of their respective density fields, measurements of their statistics are biased relative to the true values that are of interest to us. This is known as \emph{Poisson shot noise}. This effect is well known for the power spectrum and bispectrum, and we quote here the relationships between the statistics of the discrete sample and the underlying continuous field: \begin{align} P_n(k)&=P(k)+\frac{1}{\bar{n}} \label{eqn:ps_shot}\\ B_n(k_1,k_2,k_3)&=B(k_1,k_2,k_3) \nonumber \\ &\quad+\frac{1}{\bar{n}}[ P(k_1)+P(k_2)+P(k_3)]+\frac{1}{\bar{n}^2}, \end{align} where the subscript $n$ denotes the discrete number density and $\bar{n}$ is the mean number density of the sample. When making comparisons between theoretical and simulation bispectra in \Cref{sub:sim_theory} one simply has to subtract the shot noise contribution in the simulation bispectra before calculating any correlators. \subsubsection{Covariance of estimators} The variance of an estimator is given by its covariance matrix $C_X$ which can be written schematically as: \begin{align} C_X&\equiv\text{cov}(\hat{X}(\theta),\hat{X}(\theta')) \nonumber \\ &=\expval{\hat{X}(\theta)\hat{X}(\theta')} - \expval{\hat{X}(\theta)}\expval{\hat{X}(\theta')}. \end{align} In addition to calculating covariance matrices numerically through simulations we also need a framework to calculate them (semi-)analytically as a consistency check. \vspace{2ex} \paragraph{Power spectrum covariance} We first give a brief introduction to matter power spectrum estimation and the calculation of its covariance as this has been widely discussed in the literature. This will prepare us for the discussion on the bispectrum covariance later. Consider for example estimating the power spectrum by binning it in $k$-space and averaging over all modes within each bin \cite{blot2,peacock}: \begin{align} \hat{P}(k)=\frac{k_F^3}{(2\pi)^3}\int_k \frac{d^3p}{V_s(k)} \left|\delta(\mathbf{p})\right|^2, \end{align} where $k_F=2\pi/L=(1/\delta^D(\mathbf{0}))^{1/3}$ is the fundamental frequency of the simulation box of length $L$, and the integral is performed over all modes that lie in the spherical shell $\left|\mathbf{p}-k\right|\leq\Delta k/2$ which has width $\Delta k$. The normalisation factor $V_s$ is the volume of the shell: $V_s=\int_k d^3p=4\pi k^2\Delta k + \pi(\Delta k)^3/3$. This estimator is unbiased because \begin{align} \expval{\hat{P}(k)} &=\frac{k_F^3}{(2\pi)^3}\int_k \frac{d^3p}{V_s(k)} \expval{\left|\delta(\mathbf{p})\right|^2} =\frac{k_F^3}{(2\pi)^3} \expval{\left|\delta(k)\right|^2} \nonumber \\ &=\frac{k_F^3}{(2\pi)^3}(2\pi)^3\delta(\mathbf{0})P(k) =P(k). \end{align} The covariance matrix for this estimator is \begin{align} &C_P(k,k') \nonumber \\ ={}&\frac{k_F^6}{(2\pi)^6}\int_k \frac{d^3p}{V_s(k)} \int_{k'} \frac{d^3q}{V_s(k')} \expval{\delta^*_p\delta_p\delta^*_q\delta_q}-P(k)P(k') \nonumber \\ ={}&\frac{2k_F^3}{V_s(k)}P^2(k)\delta_{k,k'} \nonumber \\ &\qquad+ \frac{k_F^6}{(2\pi)^6}\int_k \frac{d^3p}{V_s(k)} \int_{k'} \frac{d^3q}{V_s(k')} \expval{\delta^*_p\delta_p\delta^*_q\delta_q}_c, \nonumber \\ ={}&\frac{2k_F^3}{V_s(k)}P^2(k)\delta_{k,k'} \nonumber \\ &\qquad+ \frac{k_F^3}{(2\pi)^3}\int_k \frac{d^3p}{V_s(k)} \int_{k'} \frac{d^3q}{V_s(k')} T(\mathbf{p},-\mathbf{p},\mathbf{q},-\mathbf{q}), \label{eqn:PS_cov} \end{align} where we have expanded the four-point correlator in terms of its connected pieces\footnote{Other contributions vanish since $\expval{\delta}=0$ by definition.}: $\expval{\delta^*_p\delta_p\delta^*_q\delta_q}= \expval{\delta^*_p\delta_p}\expval{\delta^*_q\delta_q}+ \expval{\delta^*_p\delta^*_q}\expval{\delta_p\delta_q}+ \expval{\delta^*_p\delta_q}\expval{\delta^*_q\delta_p}+ \expval{\delta^*_p\delta_p\delta^*_q\delta_q}_c$, and the trispectrum $T$ is defined by $\expval{\delta(\mathbf{k}_1) \delta(\mathbf{k}_2) \delta(\mathbf{k}_3)\delta(\mathbf{k}_4)}_c =(2\pi)^3 \delta_D (\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3 +\mathbf{k}_4)T(\mathbf{k}_1,\mathbf{k}_2,\mathbf{k}_3, \mathbf{k}_4)$ where the subscript $c$ denotes \emph{connected}. Connected $n$-point correlators with $n>2$ vanish if $\delta$ is a Gaussian field, but e.g. gravitational evolution induces mode coupling and hence non-Gaussianity in the form of higher order correlators. The first term in \Cref{eqn:PS_cov} is the \emph{Gaussian} contribution to the power spectrum covariance and can be estimated with $\hat{P}$; the Kronecker delta $\delta_{k,k'}$ enforces the diagonality of the Gaussian covariance. The trispectrum term is the non-Gaussian covariance which is non-trivial to estimate directly from simulations or calculate theoretically. Crucially the non-Gaussian covariance does not scale inversely with the number of modes in each bin unlike the Gaussian covariance \cite{blot2,cov}; this also applies to the bispectrum. However they both scale inversely with the simulation box size through $k_F^3$, and clearly can both be suppressed by averaging over different simulation realisations. \paragraph{Covariance of the \texttt{MODAL-LSS}{} estimator} Now we turn our attention to the covariance of the \texttt{MODAL-LSS}{} bispectrum estimator (\Cref{eqn:modal_est}), which is unbiased because \begin{align} &\sqrt{\frac{k_1k_2k_3}{P(k_1)P(k_2)P(k_3)}} \expval{\hat{B}_\delta(k_1,k_2,k_3)} \nonumber \\ ={}&\sum_n^{n_{max}} \expval{\tilde{\beta}^Q_n} Q_n(k_1/k_{max},k_2/k_{max},k_3/k_{max}) \nonumber \\ ={}&\sum_n^{n_{max}} \alpha^Q_n Q_n(k_1/k_{max},k_2/k_{max},k_3/k_{max}), \nonumber \\ ={}&\sqrt{\frac{k_1k_2k_3}{P(k_1)P(k_2)P(k_3)}} B_\delta(k_1,k_2,k_3). \end{align} The covariance of $\hat{B}_\delta$, $C_B$, is given by: \begin{align} &C_B(k_1,k_2,k_3,k_1',k_2',k_3') \nonumber \\ ={}&\sqrt{\frac{P_1P_2P_3P_1'P_2'P_3'} {k_1k_2k_3k_1'k_2'k_3'}}\sum_{mn}^{n_{max}} \expval{\tilde{\beta}^Q_m\tilde{\beta}^Q_n} Q_mQ_n' \nonumber \\ &\quad-B(k_1,k_2,k_3)B(k_1',k_2',k_3') \nonumber \\ ={}&\sqrt{\frac{P_1P_2P_3P_1'P_2'P_3'} {k_1k_2k_3k_1'k_2'k_3'}}\sum_{mnop}^{n_{max}} (\gamma^{-1})_{om}(\gamma^{-1})_{pn} \expval{\beta^Q_m\beta^Q_n}Q_oQ_p' \nonumber \\ &\quad-B(k_1,k_2,k_3)B(k_1',k_2',k_3'), \label{eqn:bis_cov} \end{align} where $P_1=P(k_1)$ etc., and the arguments of the $Q_n$ basis functions have been suppressed for brevity. We have also used \Cref{eqn:beta_basis} to convert from $\tilde{\beta}^Q_n$ to $\beta^Q_n$. In order to evaluate $\expval{\beta^Q_m\beta^Q_n}$ we write $\beta^Q_n$ as follows using \Cref{eqn:fnl_sub}: \begin{align} &\beta^Q_n \nonumber \\ ={}&(2\pi)^6\int_{\mathbf{k}_1,\mathbf{k}_2,\mathbf{k}_3} \frac{\delta_{\mathbf{k}_1}\delta_{\mathbf{k}_2}\delta_{\mathbf{k}_3} Q_n}{\sqrt{k_1k_2k_3P_1P_2P_3}} \delta_D(\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3) \nonumber \\ ={}&(2\pi)^3\int d^3x\int_{\mathbf{k}_1,\mathbf{k}_2,\mathbf{k}_3} \frac{\delta_{\mathbf{k}_1}\delta_{\mathbf{k}_2}\delta_{\mathbf{k}_3} Q_n}{\sqrt{k_1k_2k_3P_1P_2P_3}} e^{i(\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3)\cdot\mathbf{x}}, \label{eqn:beta_estimator} \end{align} which leads to this rather messy expression: \begin{align} &\expval{\beta^Q_m\beta^Q_n} \nonumber \\ ={}&(2\pi)^{12}\int_{1,2,3,1',2',3'} \frac{Q^{\vphantom{\prime}}_m}{\sqrt{k^{\vphantom{\prime}}_1k_2k_3P_1P_2P_3}} \frac{Q_n'}{\sqrt{k_1'k_2'k_3'P_1'P_2'P_3'}} \nonumber \\ &\quad\times\delta_D(\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3) \delta_D(\mathbf{k}_1'+\mathbf{k}_2'+\mathbf{k}_3') \nonumber \\ &\quad\times\expval{\delta_{\mathbf{k}^{\vphantom{\prime}}_1} \delta_{\mathbf{k}^{\vphantom{\prime}}_2} \delta_{\mathbf{k}^{\vphantom{\prime}}_3} \delta_{\mathbf{k}_1'}\delta_{\mathbf{k}_2'}\delta_{\mathbf{k}_3'}}, \label{eqn:six-point} \end{align} where we further abbreviate the integral over the 6 wavevectors to $\int_{1,2,3,1',2',3'}\equiv\int\frac{\prod_{i=1}^3 d^3k_i}{(2\pi)^9} \frac{\prod_{i=1}^3 d^3k_i'}{(2\pi)^9}$. With some difficulty this can be rewritten as: \begin{widetext} \begin{align} &\expval{\beta^Q_m\beta^Q_n} \nonumber \\ ={}&6(2\pi)^{3}\gamma_{mn}+\alpha^Q_m\alpha^Q_n +V(2\pi)^{12}\int_{1,2,3,1',2',3'} \frac{Q^{\vphantom{\prime}}_m}{\sqrt{k^{\vphantom{\prime}}_1k_2k_3P_1P_2P_3}} \frac{Q_n'}{\sqrt{k_1'k_2'k_3'P_1'P_2'P_3'}} \delta_D(\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3) \delta_D(\mathbf{k}_1'+\mathbf{k}_2'+\mathbf{k}_3') \nonumber \\ &\quad\times \Bigg( (2\pi)^3\delta_D(\mathbf{k}_3-\mathbf{k}_3') B(k_1,k_2,k_3')B(k_1',k_2',k_3) +8\,\text{perms} \nonumber \\ &\qquad+ (2\pi)^3 \delta_D(\mathbf{k}_1+\mathbf{k}_1') T(\mathbf{k}_2,\mathbf{k}_3,\mathbf{k}_2',\mathbf{k}_3')P(k_1) +8\,\text{perms}+ P_5(\mathbf{k}_1,\mathbf{k}_2,\mathbf{k}_3,\mathbf{k}_1', \mathbf{k}_2',\mathbf{k}_3')\Bigg). \label{betaQ2} \end{align} where the pentaspectrum $P_5$ is defined by $\expval{\delta(\mathbf{k}_1) \delta(\mathbf{k}_2) \delta(\mathbf{k}_3)\delta(\mathbf{k}_4) \delta(\mathbf{k}_5)\delta(\mathbf{k}_6)}_c =(2\pi)^3 \delta_D (\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3 +\mathbf{k}_4+\mathbf{k}_5+\mathbf{k}_6)P_5(\mathbf{k}_1,\mathbf{k}_2, \mathbf{k}_3,\mathbf{k}_4,\mathbf{k}_5,\mathbf{k}_6)$. \end{widetext} While there is no easy way to evaluate the last two set of terms involving the trispectrum and pentaspectrum, the Gaussian covariance of the $\beta^R_n$ is given trivially as \begin{align} \label{eqn:beta_cov} C^{\beta}_{mn} \equiv \expval{\beta^R_m\beta^R_n} - \expval{\beta^R_m}\expval{\beta^R_n} \approx 6(2\pi)^{3}\delta_{mn}, \end{align} which is diagonal. Unfortunately $C_B$ cannot be evaluated analytically, even in the Gaussian limit, since \Cref{eqn:bis_cov} yields \begin{align} &\sqrt{\frac{k_1k_2k_3k_1'k_2'k_3'} {P_1P_2P_3P_1'P_2'P_3'}} C_B(k_1,k_2,k_3,k_1',k_2',k_3') \nonumber \\ \approx{} &6(2\pi)^3\sum_{mn}^{n_{max}} Q_m'(k_1',k_2',k_3')(\gamma^{-1})_{mn}Q_n(k_1,k_2,k_3) \nonumber \\ ={}&6(2\pi)^3\sum_{n}^{n_{max}} R_n'(k_1',k_2',k_3')R_n(k_1,k_2,k_3) \label{eqn:bis_cov_final} \end{align} where we have used \Cref{eqn:RQconv} to convert from the $\{Q_n\}$ basis to $\{R_n\}$. The last line cannot be further simplified because in practice we can never use enough modes to ensure $\{R_n\}$ forms a complete basis. Nevertheless we can calculate the Gaussian covariance of $\hat{f}_{nl} = \sum_n \alpha^R_n \beta^R_n/\sum_n \alpha^R_n\alpha^R_n$ here which we will explore numerically in \Cref{sub:cov}: \begin{align} C_{f_{nl}} & \equiv \expval{\hat{f}_{nl}^2} - \expval{\hat{f}_{nl}}^2 \nonumber \\ & = \frac{\sum_{mn} \alpha^R_m\alpha^R_n\expval{\beta^R_m\beta^R_n} - (\sum_n \alpha^R_n\expval{\beta^R_n})^2} {(\sum_n \alpha^R_n\alpha^R_n)^2} \nonumber \\ & \approx \frac{1}{(\sum_n \alpha^R_n\alpha^R_n)^2} \Bigg(\sum_{mn} \alpha^R_m\alpha^R_n\left(6(2\pi)^3\delta_{mn} +\alpha^R_m\alpha^R_n\right) \nonumber \\ & \qquad\qquad\qquad\qquad - (\sum_n \alpha^R_n\alpha^R_n)^2\Bigg) \nonumber \\ & = \frac{6(2\pi)^3}{\sum_n \alpha^R_n\alpha^R_n}. \label{eqn:fnl_cov} \end{align} \paragraph{Suppression of large-scale variances} Large variances are prominent at large scales due to the finite volume of the simulation box or observational area leading to a lack of Fourier modes for statistical calculations. These are typically known as \emph{finite box} or \emph{cosmic variance} effects, although in the former case there is the added complication of mode coupling induced by non-linear gravitational evolution \citep{paired2}. These errors need to be controlled as to extract cosmological parameters from galaxy surveys, and there is evidence to suggest detection of new physics may require $\mathcal{O}(0.1\%)$ accuracy in simulations \citep{tobias}. While cosmic variance, which is defined by the observational volume of a given survey, is unavoldable, we could reduce \emph{finite box} errors in simulations by simply expanding the box or averaging multiple simulations. Unfortunatly both of these approaches are costly in terms of time and computational resources. For a more efficient way of obtaining ensemble averaged quantities such as the power spectrum and bispectrum the the authors of \citep{paired1,paired2} have proposed a method of pairing up simulations which have opposite phases in their initial conditions. The phase inversion has no affect on the statistical properties of the simulation thus the pairing up process does not bias power spectra and bispectra estimation. However, leading order contributions to the Gaussian covariances, which are the dominant contribution to cosmic variance, will cancel as they are out-of-phase with each other. We will quickly review the method. First we expand the late-time non-linear density field in standard perturbation theory (SPT) \citep{Bernardeau}: \begin{align} \delta(\mathbf{k},z)=\sum^\infty_{n=1}\delta_n(\mathbf{k},z), \end{align} where $\delta_1$ represents linear growth of the initial conditions, an $\delta_n$ are $n$ copies of $\delta_1$ convolved with the SPT kernels $F_n$. We can calculate the power spectrum in this formalism, expanding to 4th order in products of $\delta_1$ we obtain: \begin{align} P=P_{11}+P_{12}+P_{21}+P_{13}+P_{22}+P_{31}+\cdots, \end{align} where $P=\left<\delta\delta\right>$ and $P_{nm}$ denotes $P=\left<\delta_n\delta_m\right>$. Assuming Gaussian initial conditions so that $\delta_1$ is also Gaussian, we can use Wick's theorem to eliminate terms containing odd multiples of $\delta_1$, thus giving: \begin{align} P^{\text{Gaussian IC}}=P_{11}+P_{13}+P_{22}+P_{31}+\cdots. \end{align} The effect of phase inversion is to reverse the sign of $\delta_1$, and the pairing up procedure serves to annihilate the same odd-parity terms that are expected to vanish in the ensemble average, while leaving the signal terms, which have even parity, intact. On the other hand since the non-Gaussian covariances also have even parity they remain unaffected. The same applies for the bispectrum. The expansion in SPT is now (neglecting permutations) \begin{align} B&=B_{111}+B_{112}+B_{113}+B_{122} \nonumber \\ &\qquad+B_{114}+B_{123}+B_{222}+\cdots, \end{align} so that for Gaussian initial conditions we have \begin{align} B^{\text{Gaussian IC}}=B_{112}+B_{122}+B_{114}+B_{123}+B_{222}+\cdots. \end{align} Again we see that terms containing an odd number of $\delta_1$ vanish which coincides with the effect of pairing up phase inverted simulations. While the suppression of variance in power spectra estimation was explored in great detail in \citep{paired2} no equivalent test have been performed with the bispectrum, which we leave to future work. \subsubsection{Systematic offsets due to aliasing contributions \label{sec:aliasing}} \begin{figure*} \begin{subfigure}[b]{\textwidth} \begin{align} \vcenter{\hbox{\includegraphics[width=0.31\linewidth]{function_mult.jpeg}}} \,\times \vcenter{\hbox{\includegraphics[width=0.31\linewidth]{Dirac_comb_mult.jpeg}}} \,= \vcenter{\hbox{\includegraphics[width=0.31\linewidth]{result_mult.jpeg}}} \nonumber \end{align} \caption{Sampling in real space is a multiplication of the signal with a Dirac comb.} \label{fig:diraccomb_mult} \end{subfigure} \begin{subfigure}[b]{\textwidth} \begin{align} \vcenter{\hbox{\includegraphics[width=0.31\linewidth]{function_conv.jpeg}}} \,* \vcenter{\hbox{\includegraphics[width=0.31\linewidth]{Dirac_comb_conv.jpeg}}} \,= \vcenter{\hbox{\includegraphics[width=0.31\linewidth]{result_conv.jpeg}}} \nonumber \end{align} \caption{In Fourier space this becomes a convolution between the signal and a Dirac comb, resulting in multiple, aliased copies of the signal.} \label{fig:diraccomb_conv} \end{subfigure} \caption{Sampling in real and Fourier space (Figure 1 from \citep{digital}).} \end{figure*} \begin{figure*} \begin{subfigure}[b]{0.45\textwidth} \includegraphics[width=\linewidth]{no_aliasing} \caption{ If the sampling frequency is more than twice the highest frequency in the signal, then the aliased images that appear after convolving the signal with the Dirac comb do not overlap. In this case the signal is undistorted and can be uniquely restored. } \label{fig:no_alias} \end{subfigure} ~ \begin{subfigure}[b]{0.45\textwidth} \includegraphics[width=\linewidth]{full_aliasing} \caption{ On the other hand if the Nyquist criterion is not met, the images will then overlap with each other due to contributions from the higher frequencies, leading to significant distortions near the Nyquist frequency. There is no easy way to recover the original signal. } \label{fig:alias} \end{subfigure} \caption{If the sampling frequency is too low, aliasing occurs (Figure 2 from \citep{digital}).} \end{figure*} Virtually all power spectra and bispectra analyses are done with FFTs due to the efficiency of calculating Fourier transforms versus direct calculation of correlation functions in real space \citep{jing2005}. The first step in using FFTs is to put the particles on a regular grid. This involves a mass assignment scheme which dictates the weighting with which each particle is distributed across its surrounding grid points. Many of these schemes are well known in the literature, e.g. Nearest Grid Point (NGP), Cloud in cell (CIC) and Triangular Shaped Clouds (TSC) \citep{jing2005}, as well as higher order interpolation schemes such as Piecewise Cubic Spline (PCS) \citep{interlacing} and Daubechies wavelet transformations \citep{MAS}. The effect of this assignment manifests as a convolution with the density field which becomes a product with the corresponding window function $W(\mathbf{k})$ in Fourier space. In principle this can be corrected for easily by dividing out the window function in Fourier space. However even in this case the use of discrete FFTs inevitably leads to information loss \citep{digital}. By the Shannon sampling theorem \citep{shannon} all the information in a signal can be recovered if the sampling frequency is twice that of the highest frequency in the signal, i.e. with a sufficiently high sampling frequency a \emph{band-limited} signal can be reproduced without information loss. This is known as the \emph{Nyquist criterion}. The sampling theorem states that this limit is the Nyquist frequency $k_{Ny}=k_{max}/2=\pi/H$, where $k_{max}$ is the sampling frequency of the grid and $H$ is the grid spacing. For the purpose of estimating correlation functions with FFTs it is known than the cutoff frequency for the power spectrum is the Nyquist frequency $k_{Ny}$ \citep{jing2005,MAS,digital,interlacing}. For the bispectrum \citep{jeong} and \citep{interlacing} propose the limit for the bispectrum should be $2k_{Ny}/3$. There is a second serious problem associated with discrete grids which is the introduction of sampling artefacts near the Nyquist frequency. As explained in further detail in \citep{digital}, discrete sampling in real space is effectively a multiplication of the signal with a Dirac comb (\Cref{fig:diraccomb_mult}). In Fourier space this multiplication becomes a convolution operation, resulting in multiple images of the signal evenly spaced at the sampling frequency of the grid (\Cref{fig:diraccomb_conv}). In the case that the sampling frequency is more than twice the maximum frequency of the signal, as in \Cref{fig:no_alias}, then the images of the signal do not overlap each other and no artefacts are induced. Otherwise if higher frequencies are indeed present (\Cref{fig:alias}), which certainly holds true in cosmological contexts, then the copies of the replicated signal will overlap and distort the sampled signal near the Nyquist frequency. We demonstrate this effect with \texttt{GADGET-3}{} power spectra and bispectra in \Cref{fig:alias_ps_bis} (for details of the simulations see \Cref{sim} below). Here we find that the cutoff frequency for the bispectrum is the same as the power spectrum, $k_{Ny}$ in disagreement with the predictions of \citep{jing2005,MAS,digital,interlacing}. \begin{figure*} \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width=\linewidth]{ps_1280_z0p500_aliasing} \caption{ Ratio between \texttt{GADGET-3}{} power spectra estimated with FFT grids of different sizes. The baseline is the larger of the two CIC grids, and the pink, dashed lines indicate the Nyquist frequencies $k_{Ny}$ for the $512^3$ and $1024^3$ CIC grids. It is clear how aliasing contributions lead to overestimation of the power spectra near $k=k_{Ny}$, but the functional form of this overshoot cannot be calculated analytically. } \label{fig:alias_ps} \end{subfigure} ~ \begin{subfigure}[b]{0.47\textwidth} \includegraphics[width=\linewidth]{fnl_kmax_1280_z0p500_aliasing} \caption{ $f_{nl}$ correlators between \texttt{GADGET-3}{} bispectra estimated with the same FFT grids in \Cref{fig:alias_ps}. Again pink, dashed lines indicate $k_{Ny}$ for the various grids, but we additionally label $k=\frac{2}{3}k_{Ny}$ with blue, dashed lines to find the correct cutoff frequency. Contrary to \citep{jeong,interlacing} there is little to suggest that bispectrum estimation breaks down at $\frac{2}{3}k_{Ny}$, but rather at $k_{Ny}$ as for the power spectrum. } \label{fig:alias_bis} \end{subfigure} \caption{A demonstration of aliasing in the power spectrum and bispectrum for \texttt{GADGET-3}{} simulations.} \label{fig:alias_ps_bis} \end{figure*} \begin{figure*} \begin{subfigure}[b]{0.45\textwidth} \includegraphics[width=\linewidth]{asinc33} \end{subfigure} ~ \begin{subfigure}[b]{0.45\textwidth} \includegraphics[width=\linewidth]{asinc1025} \end{subfigure} \caption{ The aliased $\sinc$ function with $\asinc_M(k)$ with $M=33$ and 1025 plotted in units of the sampling frequency of the grid $k_{max}$. Unlike the Dirac comb $\asinc_M(k)$ is non-local and oscillatory between the peaks, leading to distortions and aliasing effects even for band-limited signals. As is evident in the $M=1025$ case, both of these effects can be mitigated by using finer sampling grids since the width of the primary peaks at its base is $2/M$, and the value of the function at $k=k_{Ny}=k_{max}/2$ is $1/M$. } \label{fig:asinc} \end{figure*} To derive this more rigorously we begin by denoting the FFT density grid in real space as \begin{align} \delta_n^f(\mathbf{r})=\Sh_r\left(\frac{\mathbf{r}}{H}\right) (\delta_n*W)(\mathbf{r}) \end{align} where the superscript $f$ labels an FFT quantity and the subscript $n$ indicates sampling with discrete objects as before. This is equivalent to the statement that the $\delta_n^f(\mathbf{r})$ is a multiplication of the sampling grid, i.e. the Dirac comb $\Sh_r(\mathbf{r})=\sum_{\mathbf{r}_g}\delta_D(\mathbf{r}-\mathbf{r}_g) =\sum_{\mathbf{n}}\delta_D(\mathbf{r}-H\mathbf{n})$ where $\mathbf{r}_g$ are the grid points and $\mathbf{n}\in\mathbb{Z}^3$ is a vector composed of integers, with the convolution between the density field sampled by discrete objects $\delta_n(\mathbf{r})$ and the window function $W(\mathbf{r})$ due to mass assignment. The Fourier Transform of this grid is $\delta_n^f(\mathbf{k})=\mathcal{F}[\delta^f_n(\mathbf{r})]$, but one should bear in mind that to obtain the FFT output one needs to further multiply this by the Dirac comb in $\mathbf{k}$-space, $\Sh_k(\mathbf{k})=\sum_{\mathbf{n}}\delta_D(\mathbf{k}-k_F\mathbf{n})$. The aliasing effects discussed in the previous paragraph becomes immediately apparent when one evaluates $\delta_n^f(\mathbf{k})$ explicitly which produces: \begin{align} \delta_n^f(\mathbf{k})=\sum_{\mathbf{n}} \delta_n(\mathbf{k}-k_{max}\mathbf{n})W(\mathbf{k}-k_{max}\mathbf{n}). \end{align} This is merely a restatement of \Cref{fig:diraccomb_conv}: sampling with a Dirac comb leads to aliased images spaced at intervals of $k_{max}$ in Fourier space. If the Nyquist criterion is satisfied, i.e. all frequencies in the signal satisfy $k<k_{max}/2=k_{Ny}$, then the images will not overlap and the signal remains undistorted (\Cref{fig:no_alias}). Otherwise aliasing artefacts will occur (\Cref{fig:alias}). The power spectrum we obtain via FFT, $P^f_n(k)$, is thus \begin{align} P^f_n(k)=\sum_{\mathbf{n}} \left(P\left(\left|\mathbf{k}-k_{max}\mathbf{n}\right|\right) +\frac{1}{\bar{n}}\right) \left|W\left(\mathbf{k}-k_{max}\mathbf{n}\right)\right|^2 \label{eqn:ps_alias} \end{align} where we have included the effects of Poisson shot noise. We can see that the aliasing contributions are most prominent near the Nyquist frequency $k_{Ny}$ as was the case for the density field. Finally we note that to obtain the true FFT output one must multiply the expression in \Cref{eqn:ps_alias} by $\Sh_f\left(\frac{\mathbf{k}}{k_F}\right) \Sh_f\left(\frac{\mathbf{-k}}{k_F}\right) =\Sh_f\left(\frac{\mathbf{k}}{k_F}\right)$. The equivalent expression for the FFT bispectrum is \begin{align} &B^f_n(k_1,k_2,k_3) \nonumber \\ ={}&\sum_{\mathbf{n}_1\mathbf{n}_2}\Bigg(B\left(q_1,q_2, \left|\mathbf{q}_1+\mathbf{q}_2\right|\right) \nonumber \\ &\qquad+\frac{1}{\bar{n}}[P(q_1)+P(q_2)+ P(\left|\mathbf{q}_1+\mathbf{q}_2\right|)] +\frac{1}{\bar{n}^2}\Bigg) \nonumber \\ &\quad\times W(\mathbf{q}_1)W(\mathbf{q}_2) W(-\mathbf{q}_1-\mathbf{q}_2), \label{eqn:bis_alias} \end{align} where $\mathbf{q}_i=\mathbf{k}_i-k_{max}\mathbf{n}_i$, and the multiplicative factor that gives the true FFT output becomes \begin{align} &\Sh_f\left(\frac{\mathbf{k}_1}{k_F}\right) \Sh_f\left(\frac{\mathbf{k}_2}{k_F}\right) \Sh_f\left(\frac{-\mathbf{k}_1-\mathbf{k}_2}{k_F}\right) \nonumber \\ ={}&\Sh_f\left(\frac{\mathbf{k}_1}{k_F}\right) \Sh_f\left(\frac{\mathbf{k}_2}{k_F}\right). \end{align} In principle this aliasing effect can be completely avoided by low-pass filtering the signal to remove the high-frequency contributions. This is equivalent to convolving the real-space signal with a $\sinc$ function \citep{digital}. However the $\sinc$ function is highly non-local and such an operation is computationally expensive since we would have to distribute all particles to every grid point. In addition we have assumed so far that our sampling operation in real space, i.e. $\Sh_r(\mathbf{r})$, has infinite extent, so that its Fourier transform is also an infinite Dirac comb. This cannot be achieved for practical reasons, and the Fourier transform of a truncated one-dimensional Dirac comb is the aliased $\sinc$ function $\asinc_M(k)$: \begin{align} \mathcal{F}\left[\frac{1}{M}\sum_{n=-\frac{M-1}{2}}^{\frac{M-1}{2}} \delta_D(r-Hn)\right] &=\frac{\sin(\pi kM/k_{max})}{M\sin(\pi k/k_{max})} \nonumber \\ &\equiv\asinc_M(k), \end{align} where we have introduced the normalisation factor $1/M$. We plot $\asinc_M(k)$ for $M=33$ and 1025 in \Cref{fig:asinc}, which correspond to sampling with FFT grids of size $32^3$ and $1024^3$ respectively. The aliased $\sinc$ function differ from the infinite Dirac comb in a very important way, i.e. its non-locality. When convolved with $\delta_n(\mathbf{r})$ the oscillatory features will distort the signal, and aliased images will always overlap even if the signal is band-limited. These aliasing contributions can be alleviated by low-pass filtering the signal, but one can not eradicate them nor uniquely restore the original signal \citep{digital}. However it should be noted that with sufficiently large $M$ one can typically neglect these contributions: the base width of the primary peaks is $2/M$ and the value of $\asinc_M(k)$ at the Nyquist frequency is $1/M$. Finally we remark that these finite, discrete sampling effects are exacerbated by the mass assignment procedure as the window function $W(\mathbf{k})$ also enters the aliased sum. This is a mild complication for the shot noise terms in \Cref{eqn:ps_alias,eqn:bis_alias} as $W\left(\mathbf{k}-k_{max}\mathbf{n}\right)$ are typically simple analytical expressions \citep{jing2005}. As for the product between the power spectrum and window function \citep{jing2005} proposed a procedure to cure these sampling effects iteratively by assuming the power spectrum $P(k)$ behaves like a power-law near the Nyquist frequency $k\sim k_{Ny}$. While this approximation seemed to work effectively for the power spectrum, it is not clear how one would similarly construct a simple analytical formula that captures the local behaviour of the bispectrum and higher order correlators effectively. While no method has been found to fully recover the bispectrum near the Nyquist frequency, various solutions have been put forward to diminish the effects of aliasing. A straightforward approach is using higher order interpolation kernels such as PCS or Daubechies wavelets which are closer approximations to the ideal low-pass filter. In particular the authors of \citep{MAS} claim that even with deconvolution of the corresponding window function, the power spectrum can be measured with the wavelets to an accuracy level of 2\% in for wavenumbers up to $0.7k_{Ny}$. Since particle-mesh simulation codes rely on FFTs for rapid calculations of the gravitational potential, the Daubechies wavelets may prove useful as an inexpensive yet accurate way of representing particles on a grid. An alternative method is to push the aliasing effects to higher $k$ by first `supersampling' the density field at some higher resolution than the one desired \citep{digital}. The super-sampled grid naturally has a higher Nyquist frequency thus we expect the aliasing effects at the target resolution to be much reduced. Finally we down-sample the super-sampled grid by deconvolving the relevant window function and removing all unwanted $k$-modes to obtain the signal sampled at the frequency of interest. The advantages of `supersampling' over other methods are its effectiveness at removing undesirable aliasing distortions \emph{at the target frequency}, and since low order mass assignment schemes such as CIC and TSC can be used for supersampling it is also computationally fast. However to super-sample at $n$ times the required resolution demands $n^3$ the amount of memory which can be a big limiting factor. A third method, propounded by \citep{interlacing}, sets out to remove the dominant aliasing contributions from odd images (cf. \Cref{fig:alias}) by interlacing two density grids that are shifted by half the grid spacing with respect to each other. The authors claim that the method, combined with a high order interpolation scheme such as PCS, can reduce systematic biases from aliasing to levels below 0.01\% all the way up to the Nyquist frequency for both power spectra and bispectra estimates. Investigation of these effects in the case opf the bispectrum is beyond the current scope of this paper and we leave it to future work. For the remainder of the paper we will instead avoid the issues mentioned above by simply limiting ourselves to $k<k_{max}/3 = \frac{2}{3}k_{Ny}$. \section{Results\label{work}} \subsection{Comparison between Dark Matter Simulation Codes} \label{sec:dark-matt-bisp} As we enter the age of precision cosmology we are ever more reliant on cosmological simulations to understand the dynamics of dark matter and baryons. Numerical simulations act as a buffer between theory and observation: we test cosmological models by matching simulation results to observational data, and hence obtain constraints on cosmological parameters. On the other hand since we only observe one universe we must turn to simulations to understand the statistical significance of our measurements. This is especially important with large galaxy data sets coming from current and near-future surveys such as DES, LSST, Euclid and DESI. While it would be ideal to use full N-body simulations to generate these so-called mock catalogues for statistical analysis, their huge demand for computational resources is prohibitive for generating the large number of simulations required for accurate estimates of covariances \citep{l-picola}. This has led to a proliferation of fast dark matter simulation tools, such as PINOCCHIO \citep{PINOCCHIO1,PINOCCHIO2}, Quick Particle Mesh (QPM) \citep{QPM}, Augmented Lagrangian Perturbation Theory (ALPT) \citep{ALPT} and the Comoving Lagrangian Acceleration method (COLA) \citep{tassev}. While the algorithms employed in all these methods are different, they all share the common aim of speeding up the simulation process at the expense of reduced accuracy at small scales. These fast methods are typically bench-marked against N-body codes with the power spectrum and other two-point clustering statistics, as well as some form of three-point correlation, e.g. the reduced bispectrum \begin{align} Q(k_1,k_2,k_3) = \frac{B(k_1,k_2,k_3)}{P(k_1)P(k_2)+P(k_2)P(k_3)+P(k_3)P(k_1)} \end{align} in some restricted domain. With \texttt{MODAL-LSS}{} we can incorporate full bispectrum estimation into the validation testing for these methods. The importance of these tests cannot be underestimated: the analysis in \citep{tobias} has shown that theoretical and numerical uncertainties can strongly influence the extent to which observational data can be used to put constraints on cosmological parameters and hence possibilities of detecting new physics. As a proof of concept we have elected to test the bispectra of three different fast dark matter methods, i.e. COLA, Particle-Mesh (PM) and second-order Lagrangian perturbation theory (2LPT) \citep{2LPT}, against the Tree-PM N-body code \texttt{GADGET-3}{} at various redshifts. \texttt{L-PICOLA}{} \citep{l-picola,scoccimarro} was used to generate the COLA, PM and 2LPT data due to its versatility and massively parallel performance, and its ability to generate and evolve the same 2LPT initial conditions used in our \texttt{GADGET-3}{} runs. This means that all final outputs share the same initial seed and random phases, thus eliminating the need for cosmic variance considerations when comparing them. \subsubsection{Fast dark matter algorithms} \label{sec:fast-dark-matter} Here we briefly summarise the three algorithms we test in this paper. For further details we refer the reader to relevant literature for 2LPT \citep{2LPT}, PM \citep{PM} and COLA \citep{l-picola,tassev}. \paragraph{2LPT} In Lagrangian perturbation theory (LPT) we track particles by their displacement $\bm{\psi}(\bm{q},t)$ from their initial position $\bm{q}$, i.e. $\bm{x}(t)=\bm{q}+\bm{\psi}(\bm{q},t)$, where $\bm{x}$ is the Eulerian position. First order in LPT leads to the well-known Zeldovich Approximation (ZA), which is particularly useful due to its analytical simplicity, and is often used to generate initial conditions for numerical simulations. However as shown in \citep{2lpt2} 2LPT is a superior method at limited additional computational cost, and has since replaced ZA as the standard. \paragraph{PM} The PM algorithm speeds up the calculation of gravitational forces though the use of a mesh: instead of summing all interactions between all the particles, we calculate the density field on a grid and use the Poisson equation to derive the gravitational potential in Fourier space. This computation is sped up greatly with FFTs, and it is straightforward to calculate the forces in real space at each grid point with the gradient of the potential and an inverse-FFT. The force on each particle is found by reversing the interpolation scheme used to place the particles on the grid. Here we use \texttt{L-PICOLA}{}'s implementation of the PM algorithm which is based on \texttt{PMCODE} \citep{pmcode}. \paragraph{COLA} While the 2LPT produces excellent results at large scales, it quickly becomes deficient going into smaller scales as it fails to capture the full non-linearity of the system. The COLA algorithm is an efficient extension of 2LPT, boasting both speed and accuracy by trying to recover the residual Lagrangian displacement $\bm{\psi}_{res}$ between the 2LPT displacement and the full non-linear counterpart. The extra computations rely on variables already calculated and stored, such as the LPT and 2LPT displacements and the gravitational potential, the last of which is provided by the PM method. \subsubsection{Simulation Data} \label{sim} In order to probe a range of scales we have chosen two simulation box sizes of $1280\,h^{-1}$ Mpc and $640\,h^{-1}$ Mpc\footnote{Corresponding to $k_F=0.005\,h\,\text{Mpc}^{-1}$ and $k_{Ny}=5.0\,h\,\text{Mpc}^{-1}$, and $k_F=0.01\,h\,\text{Mpc}^{-1}$ and $k_{Ny}=10.0\,h\,\text{Mpc}^{-1}$ respectively}. The 2LPT Gaussian initial conditions were generated using \texttt{L-PICOLA}{} at redshift $z_i=99$ to ensure the suppression of transients in power spectra and bispectra estimates of our simulations \citep{transients}, with an input linear power spectrum at redshift $z=0$ produced by \texttt{CAMB} \citep{CAMB}. A PM grid size of $2048^3$ was then used to evolve the $2048^3$ particles in each run where applicable. The fiducial cosmology is flat $\Lambda$CDM with extended Planck 2015 cosmological parameters (TT,TE,EE+lowP+lensing+ext, see \Cref{planck}). The expensive \texttt{GADGET-3}{} run was completed on the \texttt{COSMA} facility at Durham while the other codes and all subsequent analysis was finished with the \texttt{COSMOS} supercomputer at Cambridge. The small deviations in output redshifts between \texttt{GADGET-3}{} and \texttt{L-PICOLA}{} were corrected with the appropriate linear growth factor \begin{align} \label{eq:D_1} D_1(a)=\frac{E(a)}{D_{1,0}}\int^a_0\frac{da'}{a'^3E^3(a')} \end{align} where \begin{align} \label{eq:E} E(a)=\frac{H(a)}{H_0}=\sqrt{\Omega_ma^{-3}+\Omega_\Lambda} \end{align} for a flat cosmology, and \begin{align} \label{eq:D_10} D_{1,0}=\int^1_0\frac{da'}{a'^3E^3(a')} \end{align} is introduced to normalise $D_1(z=0) = 1$. \begin{table*}[!htb] \small \begin{subtable}{0.48\textwidth} \begin{tabular}{c|c|c} Description & Symbol & Value \\[1ex] \hhline{=|=|=} \rule{0pt}{3ex} Hubble constant & $H_0$ & 67.74 $\text{km}\,\text{s}^{-1}$ \\ Physical baryon density parameter & $\Omega_b h^2$ & 0.02230 \\ Matter density parameter & $\Omega_m$ & 0.3089 \\ Dark energy density parameter & $\Omega_{\Lambda}$ & 0.6911 \\ Fluctuation amplitude at $8h^{-1}$ Mpc & $\sigma_8$ & 0.8196 \\ Scalar spectral index & $n_s$ & 0.9667 \\ Primordial amplitude & $10^9A_s$ & 2.142 \end{tabular} \caption{Planck 2015 cosmological parameters (rightmost column of Table 4 in \citep{planck2015})} \end{subtable} \hspace{3ex} \begin{subtable}{0.45\textwidth} \begin{tabular}{c|c|c} Description & Symbol & Value \\[1ex] \hhline{=|=|=} \rule{0pt}{3ex} Physical neutrino density parameter & $\Omega_{\nu} h^2$ & 0.000642 \\ Number of effective neutrino species & $N_{eff}$ & 3.046 \\ Curvature density parameter & $\Omega_{k}$ & 0.0000 \\ \end{tabular} \caption{Extensions to base $\Lambda$CDM parameters (rightmost column of Table 5 in \citep{planck2015})} \end{subtable} \caption{For consistency between the Planck parameters and the \texttt{CAMB} output we incorporated one massive neutrino species with a small energy density. The lack of radiation and neutrino evolution in \texttt{L-PICOLA}{} and \texttt{GADGET-3}{} has led us to define the matter power spectrum to consist only of cold dark matter and baryons, hence the raised value of $\sigma_8$ instead of the Planck value of 0.8159. The pivot scale for $n_s$ is 0.05 $\text{Mpc}^{-1}$.} \label{planck} \end{table*} In addition to \Cref{planck}, the following are the key parameters we used to generate the initial power spectrum and evolve the initial conditions: \paragraph{\texttt{CAMB}} We use only cold dark matter (CDM) and baryons to define the matter power spectrum and $\sigma_8$, i.e. {transfer\_power\_var = 8}. The relevant neutrino parameters are {massless\_neutrinos = 2.046} and {massive\_neutrinos = 1}. \paragraph{\texttt{L-PICOLA}{}} Three different logarithmic time steppings in $a$ were used to test the accuracy of COLA: $\Delta(\ln a) = 0.01$ (the same time-stepping we use for \texttt{GADGET-3}{}), 0.046 and 0.23. They correspond to 460, 100 and 20 time-steps from $z=99$ to $z=0$ respectively. \paragraph{\texttt{GADGET-3}{}} We used \citep{transients,crocce2006} as guides in setting the parameters to ensure high numerical accuracy in our simulations: { MaxRMSDisplacementFac = 0.1, ErrTolIntAccuracy = 0.01, MaxSizeTimestep = 0.01, ErrTolTheta = 0.2} and {ErrTolForceAcc = 0.002}. A smoothing length of $0.05L/N$ where $L$ is the simulation box size and $N=2048$ is the number of particles per dimension was used. \subsubsection{Simulation Power Spectra} \begin{figure*} \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width=\linewidth]{ps_lpicola_gadget_1280_z0p500} \end{subfigure} ~ \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width=\linewidth]{ps_lpicola_gadget_640_z0p500} \end{subfigure} \caption{ Ratio between the power spectra of the various fast dark matter codes and \texttt{GADGET-3}{} for the 2 simulation boxes. All the power spectrum estimates were performed with \texttt{GADGET-3}{}. The sub-par performance of 2LPT and COLA with a coarse time-stepping of $\Delta(\ln a) = 0.23$ is unsurprising, but the $\Delta(\ln a)_{0.046}$ COLA simulation with compares quite favourably with PM and the $\Delta(\ln a)_{0.01}$ COLA with at a fraction of the computational cost. As noted by its authors the ability to reproduce the matter power spectrum at a reasonable accuracy but with reduced computational resources compared to conventional PM methods is the strength of the COLA method \citep{l-picola}. } \label{fig:powerspec} \end{figure*} We estimated the power spectra of our simulations with \texttt{GADGET-3}{}. To minimise errors coming from aliasing effects the power spectra of each simulation was estimated three times: once with a $2048^3$ PM grid and two further times by `folding' \citep{fold} that grid onto itself by factors of 2 and 4 respectively. The disadvantage of this folding method is the reduction in the number of modes at large scales leading to greater cosmic variance. We therefore combine these three power spectra together to guarantee precision over the entire $k$-ranges considered here. We did not observe shot noise in the power spectra of the initial conditions, and due to large number densities used did not find it necessary to correct for shot noise in the simulation outputs (cf. \Cref{eqn:ps_shot}). \Cref{fig:powerspec} shows the ratio between the power spectra of the fast codes and \texttt{GADGET-3}{} at redshift $z=0.5$. While 2LPT and $\Delta(\ln a)_{0.23}$ COLA compare poorly to \texttt{GADGET-3}{} as expected, the power of the COLA algorithm to imitate the performance of PM in fewer time-steps is shown by the $\Delta(\ln a)_{0.046}$ case. It should be noted that PM does perform slightly better than COLA when the same number of time-steps are used. \subsubsection{Simulation Bispectra} \begin{figure*} \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Gadget3_2048_1280_run1_z9p000_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{Redshift $z=9$} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Gadget3_2048_1280_run1_z3p000_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{Redshift $z=3$} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Gadget3_2048_1280_run1_z2p000_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{Redshift $z=2$} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Gadget3_2048_1280_run1_z1p000_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{Redshift $z=1$} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Gadget3_2048_1280_run1_z0p500_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{Redshift $z=0.5$} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Gadget3_2048_1280_run1_z0p000_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{Redshift $z=0$} \end{subfigure} \caption{ Redshift evolution of the estimated bispectra from a $1280\,h^{-1}$ Mpc \texttt{GADGET-3}{} simulation, plotted up to $k_{max}=2.0\,h\,\text{Mpc}^{-1}$. This shows clearly how the flattened tree-level signal dominates the early time bispectra, but the constant shape brought about by the aggregation of matter takes over at late times. To emphasise this point we have scaled the maxima of the colour bars for redshifts $z=3\rightarrow0$ relative to redshift $z=9$ by the appropriate linear growth factor, $D_1(z)/D_1(z=9)$. The SN-weighted tree-level bispectrum grows as $D_1(z)$, and the saturation of the signal for redshifts $z=1,0.5,0$ demonstrate faster growth than that dictated by perturbation theory in the non-linear regime. It is remarkable that the only shape generated by the collapse of dark matter into halos is the constant shape. Therefore after $z~2$ we observe a steady growth in the strength of the signal but very little change in the bispectrum morphology. } \label{fig:gadget20} \end{figure*} \begin{figure*} \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Residual_2048_1280_run1_2LPT_z0p500_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{2LPT} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Residual_2048_1280_run1_20_z0p500_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{$\Delta(\ln a)_{0.23}$ COLA} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Residual_2048_1280_run1_100_z0p500_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{$\Delta(\ln a)_{0.01}$ COLA} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Residual_2048_1280_run1_z0p500_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{$\Delta(\ln a)_{0.046}$ COLA} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Residual_2048_1280_run1_nocola_z0p500_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{PM} \end{subfigure} ~ \begin{subfigure}[b]{0.32\textwidth} \includegraphics[width=\linewidth]{{Residual_2048_1280_run1_boost_z0p500_bispectrum_tetrapyd_1000_1_4_408_3.34285_1.99786_cropped}.jpeg} \caption{Boosted $\Delta(\ln a)_{0.01}$ COLA} \end{subfigure} \caption{ Bispectrum residuals at redshift $z=0.5$ between the $1280\,h^{-1}$ Mpc fast dark matter and \texttt{GADGET-3}{} simulations, plotted up to $k_{max}=2.0\,h\,\text{Mpc}^{-1}$. The lack of non-linear signal in the fast dark matter simulations is evident, leading to a deficient constant shape in their bispectra. } \label{fig:residuals} \end{figure*} The density field of the simulations were first obtained via a CIC mass assignment. A smoothed \texttt{GADGET-3}{} power spectrum\footnote{Smoothing is necessary at large scales where the lack of modes creates large variance in the estimated power spectrum, and was achieved by `dividing' out the variance: \begin{align} \hat{P}_{smooth}(k,z)=\hat{P}_{var}(k,z)\frac{P_L(k,z)}{\hat{P}_{IC}(k,z_i)} \times \frac{D_1^2(z_i)}{D_1^2(z)} \end{align} where $\hat{P}_{var}(k,z)$ is the original, variance-contaminated, power spectrum estimate, $P_L(k,z)$ is the linear power spectrum computed by \texttt{CAMB} at the same redshift and $\hat{P}_{IC}(k,z_i)$ is the estimated power spectrum of the initial conditions. This step is crucial for producing a smooth theoretical bispectrum since they often take the non-linear power spectrum as input, and a simulation power spectrum is usually chosen for that purpose to ensure fair comparison between simulation and theory (see \Cref{sub:sim_theory}).} at the appropriate redshifts were used in the signal-to-noise weighting of the bispectrum (\Cref{SN}). In \Cref{fig:gadget20} we show the estimated bispectra for the $1280\,h^{-1}$ Mpc \texttt{GADGET-3}{} simulations described in \Cref{sim} up to $k_{max}=2.0\,h\,\text{Mpc}^{-1}$. We choose this resolution to best highlight the transition from the tree-level dominant signal seen in early redshifts to the strong constant shape presence induced by non-linear gravitational evolution at late times. In particular we see that this happens most prominently from redshift $z=3$, where there is still some competition between the flattened and equilateral signals, to redshift $z=2$, in which the constant shape has taken over. This is one of the many advantages of estimating the full bispectrum, as its morphology typically offers unique information regarding structure formation that cannot be gained from the power spectrum. Another point of note is that the formation of dark matter halos through virialisation generates only one bispectrum shape which is the constant shape, as evidenced by the lack of change in the bispectrum past $z=2$ bar a growth in signal strength. We also show the bispectrum residuals between the fast dark matter codes and \texttt{GADGET-3}{} in \Cref{fig:residuals}. The inability of the fast codes to resolve small scale structure is illustrated by the lack of constant shape signal in their bispectra. These pictures agrees qualitatively with the power spectra results in \Cref{fig:powerspec}. To make quantitative comparisons we invoke the correlators introduced in \Cref{corr}. The $f_{nl}$ correlators of the fast dark matter codes with \texttt{GADGET-3}{}: \begin{align} f_{nl}(\hat{B}_{\text{DM}},\hat{B}_{\texttt{GADGET-3}{}}) &=\frac{\sum_n\beta^R_{\text{DM},n}\beta^R_{\texttt{GADGET-3}{},n}} {\sum_n(\beta^R_{\texttt{GADGET-3}{},n})^2} \end{align} are shown in \Cref{fig:bis_dm}; we do not plot the shape correlators as they only provide redundant information. The first thing to note is a striking resemblance to the power spectra plots in \Cref{fig:powerspec}, as the power spectrum enters the $f_{nl}$ correlator through the weighted inner products between bispectra (\Cref{inner_product}). Since we use the \texttt{GADGET-3}{} power spectrum for the weighting, bispectra comparisons will inevitably be biased by the lack of power in the fast dark matter power spectra. To address this issue and show the differences due to the bispectrum alone we propose boosting the power spectrum of the fast code in Fourier space: \begin{align} \label{eq:boost} \delta_{\text{DM}}(\mathbf{k})\rightarrow \sqrt{\frac{\hat{P}_{\texttt{GADGET-3}{}}(k)}{\hat{P}_{\text{DM}}(k)}} \delta_{\text{DM}}(\mathbf{k}). \end{align} The residuals between the boosted $1280\,h^{-1}$ Mpc $\Delta(\ln a)_{0.01}$ COLA simulation and \texttt{GADGET-3}{} is shown in \Cref{fig:residuals}, demonstrating more than a 3x reduction in magnitude compared to the unboosted COLA and PM runs. More quantitatively the boosted $\Delta(\ln a)_{0.01}$ COLA bispectra also show much improved $f_{nl}$ correlation with \texttt{GADGET-3}{} as seen in \Cref{fig:bis_dm}. We therefore conclude this is an effective yet relatively inexpensive\footnote{To obtain a smooth boosting factor in \Cref{eq:boost} we require one \texttt{GADGET-3}{} and one fast code run that share the same initial conditions. This only has to be done once as the boosting factor should be reasonably realisation-independent.\label{smooth}} method to improve the performance of fast simulation codes. Nevertheless a dip in correlation at small scales remain after boosting which reflects that there is bispectrum information lost which is independent of the power spectrum. \begin{figure*} \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width=\linewidth]{fnl_kmax_1280_z0p500_betas} \caption{} \end{subfigure} ~ \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width=\linewidth]{fnl_kmax_640_z0p500_betas} \caption{} \end{subfigure} \caption{ $f_{nl}$ correlators between the bispectra of fast dark matter codes and \texttt{GADGET-3}{}. The similarities of these plots to those in \Cref{fig:powerspec} is due to the power spectrum weighting present in inner products between bispectra (\Cref{inner_product}), thus a mismatch in power spectra naturally leads to discrepancies in bispectrum comparisons. This may suggest that the differences we see here are due to the power spectrum alone, but clearly this is not the case since the `boosted' COLA simulation has an identical power spectrum to \texttt{GADGET-3}{} yet still suffers from a lack of bispectrum signal at small scales. However, the improved performance of the boosted COLA bispectrum demonstrates the effectiveness of the `boosting' method. } \label{fig:bis_dm} \end{figure*} \subsection{Gaussian vs Non-Gaussian covariances \label{sub:cov}} \begin{figure*} \includegraphics[width=0.55\textwidth]{fnl_kmax_z0p500_error_bars_boost} \caption{ The full covariance of the $f_{nl}$ correlator estimated using 10 COLA runs compared to the Gaussian contribution calculated using \Cref{eqn:fnl_cov} with the 3-shape model. The two begin to diverge significantly at $k\sim0.1\,h\,\text{Mpc}^{-1}$, signalling the dominance of non-Gaussian covariances. Since the covariance scales inversely as the cube of the box size, in order to combine the estimates from the different simulations we have re-scaled them accordingly against the $5120\,h^{-1}$ Mpc runs. The purple points are the best-fit to the full covariance with the function $f=A k^{-a}+B k^{-b}$ and the parameters $A=3.2477\times10^{-6},B=1.5871\times10^{-3},a=2.8339,b=0.2409$. } \label{fig:cov} \end{figure*} The extent to which we can put constraints on cosmological parameters through the bispectrum is dependent on the covariance of \texttt{MODAL-LSS}{} estimator. To find the full covariance we first average over 10 boosted COLA realisations for an estimate of the mean bispectrum $\bar{\beta}$, then calculate the variance in $f_{nl}(\beta,\bar{\beta})$ as an estimate for $C_{f_{nl}}$ (\Cref{eqn:fnl_cov}). The computational cost of COLA runs are sufficiently low that additional to the $1280\,h^{-1}$ Mpc and $640\,h^{-1}$ Mpc boxes we have also completed runs with $5120\,h^{-1}$ Mpc and $2560\,h^{-1}$ Mpc box sizes\footnote{Since we do not have \texttt{GADGET-3}{} simulations for the $5120\,h^{-1}$ Mpc and $2560\,h^{-1}$ Mpc boxes we estimate the dark matter power spectrum by boosting a COLA run as follows. First we repeat the smoothing procedure detailed in \Cref{smooth} to obtain a smoothed COLA power spectrum, then estimate the appropriate boosting factor with the $1280\,h^{-1}$ Mpc one.}, so that we can explore the regime where Gaussian covariances dominate. We have made a least-squares fit of the full covariance $\sqrt{C_{f_{nl}}}$ with the \texttt{curve\_fit} algorithm in \texttt{Scipy}, using the default Levenberg-Marquardt method \citep{lm}. We model the full covariance a sum of two power laws: $f=A k^{-a}+B k^{-b}$, which represents the Gaussian and non-Gaussian contributions respectively. The best-fit is obtained using the following values for these parameters: $A=4.6480\times10^{-6},B=1.0900\times10^{-3},a=2.5978,b=0.2315$. Our estimates are shown in \Cref{fig:cov} where we also plot the Gaussian covariances calculated using \Cref{eqn:fnl_cov} with the 3-shape model $\alpha^R_n$ coefficients. It is clear that while the Gaussian covariance continues to diminish in the non-linear regime due to more modes being available, the non-Gaussian covariance starts to dominate at $k\sim0.1\,h\,\text{Mpc}^{-1}$ and then asymptotes towards$\sim0.1\%$. This has important consequences on e.g. Fisher matrix forecasts, especially if non-Gaussian covariances are not taken in account which could strongly skew theoretical error estimates. While the combination of power spectrum and bispectrum is superior to using the power spectrum alone, the improvement may not be as significant as one might have hoped due to this plateauing in the bispectrum covariance. \subsection{Comparison between Dark Matter Simulations and Theory \label{sub:sim_theory}} \begin{figure*} \begin{subfigure}[b]{0.36\textwidth} \includegraphics[width=\linewidth]{{L-PICOLA_256_1280_avg10000_z99p000_bispectrum_1000_1_4_85_0.412334_0.412334_cropped}.jpeg} \caption{10000 averaged $256^3$ COLA runs} \end{subfigure} ~ \begin{subfigure}[b]{0.36\textwidth} \includegraphics[width=\linewidth]{{L-PICOLA_512_1280_DP_IC_avg10_z99p000_bispectrum_1000_1_4_85_0.412334_0.412334_cropped}.jpeg} \caption{10 averaged $512^3$ COLA runs} \end{subfigure} \begin{subfigure}[b]{0.36\textwidth} \includegraphics[width=\linewidth]{{L-PICOLA_1024_1280_DP_IC_avg10_z99p000_bispectrum_1000_1_4_85_0.412334_0.412334_cropped}.jpeg} \caption{10 averaged $1024^3$ COLA runs} \end{subfigure} ~ \begin{subfigure}[b]{0.36\textwidth} \includegraphics[width=\linewidth]{{L-PICOLA_2048_1280_DP_IC_avg10_z99p000_bispectrum_1000_1_4_85_0.412334_0.412334_cropped}.jpeg} \caption{10 averaged $2048^3$ COLA runs} \end{subfigure} \begin{subfigure}[b]{0.36\textwidth} \includegraphics[width=\linewidth]{{theo_bis_6_1000_4_85_1280_49_z99p000_0.412334_85_bispectrum_tetrapyd_cropped}.jpeg} \caption{Tree-level bispectrum} \end{subfigure} \caption{ The reconstructed bispectra from averaged 2LPT IC, and the desired signal, i.e. the tree-level bispectrum, plotted up to $k_{max}=0.41\,h\,\text{Mpc}^{-1}$ . The colour scale is chosen to show the full range of the tree-level bispectrum, leading to significant saturation for the simulation bispectra. With increeasing FFT grid size the IC bispectrum morphology approaches the theoretical one, but the amplitude remains grossly inflated. } \label{fig:z99} \end{figure*} The development of the \texttt{MODAL-LSS}{} toolkit is to allow straightforward comparisons between bispectra, either from simulations, observational data, or theory. In that cause we first test our method by estimating the bispectrum of 2LPT initial conditions (IC) generated by \texttt{L-PICOLA}{}, using the fact that it should reproduce the tree-level bispectrum. We used a range of grid sizes to generate the initial conditions, and to combat cosmic variance at large scales we average over multiple realisations. Similar to the test in \Cref{subsec:num} we use \Cref{eqn:shape,fnl} to find that \begin{align} \mathcal{S}_{\beta,\alpha}&=\frac{\sum_n\beta^R_n\alpha^R_n} {\sqrt{\sum_n(\beta^R_n)^2\sum_n(\alpha^R_n)^2}}, \nonumber \\ f_{nl}^{\beta,\alpha}&=\frac{\sum_n\beta^R_n\alpha^R_n}{\sum_n(\alpha^R_n)^2}. \end{align} The correlators between the averaged runs and the tree-level bispectrum are shown in \Cref{tab:z99}, and we also plot the reconstructed simulation bispectra in \Cref{fig:z99}. \begin{table*} \begin{tabular}{c|c|c|c|c|c|c|c|c} \multirow{2}{*}[-1ex]{$k_{max}\,(h\,\text{Mpc}^{-1})$} & \multicolumn{2}{c|}{10000 averaged $256^3$ runs} & \multicolumn{2}{c|}{10 averaged $512^3$ runs} & \multicolumn{2}{c|}{10 averaged $1024^3$ runs} & \multicolumn{2}{c}{10 averaged $2048^3$ runs} \\[1ex] \cline{2-9} \rule{0pt}{3ex} & $\mathcal{S}_{\beta,\alpha}$ & $f_{nl}^{\beta,\alpha}$ & $\mathcal{S}_{\beta,\alpha}$ & $f_{nl}^{\beta,\alpha}$ & $\mathcal{S}_{\beta,\alpha}$ & $f_{nl}^{\beta,\alpha}$ & $\mathcal{S}_{\beta,\alpha}$ & $f_{nl}^{\beta,\alpha}$ \\[1ex] \hhline{=|=|=|=|=|=|=|=|=} \rule{0pt}{3ex}0.4123 & 0.9300 & 11.12 & 0.9339 & 5.603 & 0.9469 & 3.072 & 0.9583 & 1.830 \\ 0.8296 & - & - & 0.9501 & 6.076 & 0.9613 & 3.228 & 0.9794 & 1.895 \\ 1.6690 & - & - & - & - & 0.9696 & 3.442 & 0.9830 & 1.950 \\ 3.3429 & - & - & - & - & - & - & 0.9870 & 2.064 \\[1ex] \hhline{-|-|-|-|-|-|-|-|-} \end{tabular} \caption{ Comparisons between averaged 2LPT IC bispectra and the tree-level bispectrum, where the IC have been generated with different grid sizes. The poor shape correlation at low $k$ cannot be caused by cosmic variance alone due to the high number of runs used, and a clear trend of scale dependence can be seen in the $f_{nl}$ correlator. } \label{tab:z99} \end{table*} The poor shape correlation ($<95\%$) for low $k$ is a strong indication that something is wrong with the IC, but cosmic variance cannot be the only source of error since a very large number of runs were used in the $256^3$ case. We have also ruled out shot noise since it is not the correct shape. Moreover the large amplitude of the simulation bispectra leads to an inflated $f_{nl}$ in a way that is dependent on the size of the FFT grid used. We propose this failure of the IC code to reproduce the correct bispectrum is due to both (i) transients, as discussed in \citep{transients,semiclassical}, and (ii) grid effects. Similar problems were observed in \citep{glass}, and subsequently alleviated by the use of glass initial conditions. With more sophisticated technology at hand now we shall investigate this further in the near future. \begin{figure*} \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width=\linewidth]{{shape_kmax_betas_gadget_1280_49_noise}.jpeg} \caption{Shape correlator} \end{subfigure} ~ \begin{subfigure}[b]{0.48\textwidth} \includegraphics[width=\linewidth]{{fnl_kmax_betas_gadget_1280_49_noise}.jpeg} \caption{$f_{nl}$ correlator} \end{subfigure} \caption{ Correlators between a $1280\,h^{-1}$ Mpc \texttt{GADGET-3}{} simulation and the tree-level bispectrum at various redshifts. Transients is the likely suspect for the especially poor shape correlation at low $k$ at redshift $z=9$. } \label{fig:bis_z} \end{figure*} Another obvious candidate for our tests is the redshift evolution of a simulation. It is natural to expect a faithful adherence to the tree-level bispectrum at earlier times, even at high $k$. With the passage of time, and hence gravitational collapse, the non-linear signal will eventually dominate at small scales, leading to significant deviations from perturbation theory. This is shown clearly in \Cref{fig:bis_z}, where we compare the $1280\,h^{-1}$ Mpc \texttt{GADGET-3}{} simulation to the tree-level bispectrum. As the smallest FFT grid we use in bispectrum estimation is $256^3$ we unfortunately miss out on the observationally relevant scales of $k\sim0.1\,h\,\text{Mpc}^{-1}$, but our efforts to recover the tree-level bispectrum in larger simulations (i.e. 1280 and $2560\,h^{-1}$ Mpc) have failed, probably due to the same issues we encountered when we tried to extract the initial conditions bispectra. Transients are the most likely explanation for the poor shape correlation at low $k$, especially at redshift $z=9$, as the correlation improves with time when these modes decay away. \section{Conclusions \label{sec:conclusions}} In this paper we present the newly improved \texttt{MODAL-LSS}{} code for efficiently computing the bispectrum of any 3D input density field. This code enables us to do high precision analysis with the dark matter bispectrum from large N-body simulations or faster alternative codes, and to make detailed quantitative comparisons between theory and simulations. By exploiting highly optimised numerical libraries, we were able to incorporate 1000 separable modes in the bispectrum analysis (relative to 50 modes previously \citep{MODAL-LSS}), also including specially tailored modes to accurately recover the tree-level bispectrum. This allows convergence to a much broader range of nonlinear gravitational and primordial bispectra and makes generic non-Gaussian searches feasible in huge future galaxy surveys. First, we have addressed a few common areas where errors in the \texttt{MODAL-LSS}{} estimator can be significant, i.e. shot noise, the covariance of the estimator, and aliasing effects from using FFTs. Shot noise in the bispectrum is well-known and required little discussion. The full covariance of the \texttt{MODAL-LSS}{} estimator was derived for the first time, but the non-Gaussian contributions to the covariance appear to be analytically intractable, even with the separable modal expansion, so we can only estimate the Gaussian covariance, and we must tackle the problem numerically. While others have investigated of discrete FFT methods on bispectrum estimation, we find that contrary to other estimators the \texttt{MODAL-LSS}{} estimator breaks down at the same frequency as power spectra estimators, i.e. at the Nyquist frequency $k_{Ny}$, rather than at $\frac{2}{3}k_{Ny}$. We believe this is not a consequence of the \texttt{MODAL-LSS}{} method but rather a general result in bispectrum estimation since the aliasing effects come from the discrete sampling of the density field and not the use of FFTs itself. With many large galaxy data-sets on the horizon, there is a pressing need for fast mock catalogue codes. While these fast codes are designed to only replicate the accuracy of N-body codes at large scales without resolving finer structure, we have found a simple and effective way to enhance their performance. A comparison between the 2LPT, PM and COLA algorithms against \texttt{GADGET-3}{} shows 2LPT is deficient in both the power spectrum and bispectrum, while the COLA algorithm is successful in giving comparable performance to PM with fewer time-steps. Noting that the drop in bispectrum at large scales might be influenced by the power spectrum, we attempted to rectify this by boosting the power spectrum of the COLA simulation and saw a significant reduction in the power lost. Finally we address the theoretical modelling of the dark matter bispectrum by examining the full covariance of the \texttt{MODAL-LSS}{} estimator, showing that non-Gaussian contributions begin to dominate at $k\sim0.1\,h\,\text{Mpc}^{-1}$ and plateaus towards $\sim0.1\%$. This is a significant adjustment as the non-Gaussian covariance is difficult to calculate even numerically, leading to the use of only the Gaussian covariance in most Fisher matrix forecasts. In principle, this will lead to gross underestimates of the theoretical error and thus the ability to put constraints on cosmological parameters. To show the power of the \texttt{MODAL-LSS}{} method in testing theoretical models against simulations we have compared (i) 2LPT initial conditions against the tree-level bispectrum, and (ii) a \texttt{GADGET-3}{} simulation against the tree-level bispectrum at various redshifts. We have observed problematic transient modes and grid effects that affect the initial conditions, where the tree-level bispectrum should be recovered after averaging over many realisations. These effects propagate and persist to late times on the largest scales, as shown in a \texttt{GADGET-3}{} comparison, and must be addressed in the initial conditions. \section{Acknowledgements} \label{sec:acknowledgements} We are especially grateful to Tobias Baldauf for many enlightening conversations and for his frequent useful advice. We are also very grateful for discussions with Marc Manera and Marcel Schimmittfull, who pioneered the first MODAL approach to the LSS bispectrum \citep{MODAL-LSS}. Kacper Kornet and Juha Jaykka provided invaluable technical support for \texttt{MODAL-LSS}{} code optimisation and dealing with this large in-memory pipeline. JRF and EPS acknowledge support from STFC Consolidated Grant ST/P000673/1. This work was undertaken on the COSMOS Shared Memory system at DAMTP, University of Cambridge operated on behalf of the STFC DiRAC HPC Facility. This equipment is funded by BIS National E-infrastructure capital grant ST/J005673/1 and STFC grants ST/H008586/1, ST/K00333X/1. This work used the COSMA Data Centric system at Durham University, operated by the Institute for Computational Cosmology on behalf of the STFC DiRAC HPC Facility (www.dirac.ac.uk). This equipment was funded by a BIS National E-infrastructure capital grant ST/K00042X/1, DiRAC Operations grant ST/K003267/1 and Durham University. DiRAC is part of the National E-Infrastructure.
\section{#1}} \renewcommand{\theequation}{\thesection.\arabic{equation}} \DeclareMathOperator{\diag}{diag} \newcommand{\begin{eqnarray}}{\begin{eqnarray}} \newcommand{\end{eqnarray}}{\end{eqnarray}} \newcommand{\partial}{\partial} \newcommand{\nonumber}{\nonumber} \newcommand{\Tr }{{\rm Tr}} \newcommand{{\rm Str}}{{\rm Str}} \newcommand{{\rm Sdet}}{{\rm Sdet}} \newcommand{{\rm Pf}}{{\rm Pf}} \newcommand{\left ( \begin{array}{cc}}{\left ( \begin{array}{cc}} \newcommand{\end{array} \right )}{\end{array} \right )} \newcommand{\left ( \begin{array}{c}}{\left ( \begin{array}{c}} \newcommand{\end{array} \right )}{\end{array} \right )} \newcommand{\hat m}{\hat m} \newcommand{\hat a}{\hat a} \newcommand{\hat z}{\hat z} \newcommand{\hat \zeta}{\hat \zeta} \newcommand{\hat x}{\hat x} \newcommand{\hat y}{\hat y} \newcommand{\tilde{m}}{\tilde{m}} \newcommand{\tilde{a}}{\tilde{a}} \newcommand{\rm U}{\rm U} \newcommand{\frac{1}{2}}{\frac{1}{2}} \newcommand{\gamma_5}{\gamma_5} \newcommand{\mathcal{L}}{\mathcal{L}} \newcommand{\mathcal{O}}{\mathcal{O}} \newcommand{\bar{q}}{\bar{q}} \newcommand{\slashed{D}}{\slashed{D}} \newcommand{^\dagger}{^\dagger} \newcommand{^{-1}}{^{-1}} \newcommand{{\rm sign}}{{\rm sign}} \newcommand{\tilde{c}}{\tilde{c}} \newcommand{\mathop{\mathrm{erf}}}{\mathop{\mathrm{erf}}} \newcommand{\mathop{\mathrm{erfc}}}{\mathop{\mathrm{erfc}}} \newcommand{\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}}{\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}} \newcommand{(\ref{Eq:CondTrace0}-\ref{Eq:strength})}{(\ref{Eq:CondTrace0}-\ref{Eq:strength})} \newcommand{{\it Ensemble 1}}{{\it Ensemble 1}} \newcommand{{\it Ensemble 2}}{{\it Ensemble 2}} \newcommand{{\it Ensemble 3}}{{\it Ensemble 3}} \newcommand{{\it Ensemble 4}}{{\it Ensemble 4}} \begin{document} \title[Universal Broadening of Zero Modes] {\bf{Universal Broadening of Zero Modes:}\\ A General Framework and Identification} \author{M. Kieburg} \author{A. Mielke} \affiliation{Faculty of Physics, Bielefeld University, P.O. Box 100131, D-33501 Bielefeld, Germany} \author{K. Splittorff} \affiliation{Niels Bohr Institute, University of Copenhagen, Blegdamsvej 17, 2100 Copenhagen, Denmark} \begin{abstract} We consider the smallest eigenvalues of perturbed Hermitian operators with zero modes, either topological or system specific. To leading order for small generic perturbation we show that the corresponding eigenvalues broaden to a Gaussian random matrix ensemble of size $\nu\times\nu$, where $\nu$ is the number of zero modes. This observation unifies and extends a number of results within chiral random matrix theory and effective field theory and clarifies under which conditions they apply. The scaling of the former zero modes with the volume differs from the eigenvalues in the bulk, which we propose as an indicator to identify them in experiments. These results hold for all ten symmetric spaces in the Altland-Zirnbauer classification and build on two facts. Firstly, the broadened zero modes decouple from the bulk eigenvalues and secondly, the mixing from eigenstates of the perturbation form a Central Limit Theorem argument for matrices. \end{abstract} \date{\today} \maketitle \newpage \section{Introduction} \label{Sec:Introduction} When studying the local (microscopic) spectral statistics of eigenvalues of operators, random matrix theory (RMT) provides universal results, see e.g.~\cite{Mehta,GMG,book} and references therein. One particular intriguing regime of eigenvalues is that close to the origin or at a spectral gap. These eigenvalues hold information about the large scale properties of the underlying system, because they are of the order of inverse system size. For instance, analysis of Dirac eigenvalues close to the origin has lead to a greater understanding of chiral symmetry breaking in QCD~\cite{VerbZahed,VerbaarschotThreeFold,JacBeta2,DOTV}. The form of RMT relevant for a given physical system depends on the symmetries of the system. Not only the pure symmetry classes have been of interest, see~\cite{Mehta,book,Dyson,Martin,Casell,BernardLeClair,Magnea} for symmetry classifications in RMT and~\cite{VerbaarschotThreeFold,Dyson,Hueffmann,Casell2,AlexMartin,Ludwig,DFI,Slager2,MarioJac,Chiu,Slager1,MarioTim} for the classification of these symmetries in physical systems. It has been necessary to extend the random matrix models to two-matrix models, see e.g.~\cite{PandeyMehta,MehtaPandey,FHN,NF99,KTNK,KatoriTanemura,AN,MarioTakuya,AKMV} or even many matrix models like products and sums, e.g.~\cite{BougerolLacroix,QiuWicks,Kumar,AkemannIpsen,ACK,Mario2017} and references therein. Those models describe transitions between different symmetry classes. These are needed because no realistic system is completely pure, but usually perceives perturbations from its environment. Degeneracies are vulnerable to perturbations which violate the condition that caused the degeneracy. For example topological zero modes are broadened due to residual interactions that break topology. This broadening can be used as a measure of the perturbation strength~\cite{DelDebbio:2005qa,DWW2011,DHS2012,KieburgWilson,CGRSZ}. Topological modes are relevant in both high energy physics~\cite{VerbZahed,VerbaarschotThreeFold,JacBeta2,DOTV,LeutSmil,RMT_2_EFT-1,RMT_2_EFT-2,ADMNUniversality,Srednicki} and condensed matter systems~\cite{Chiu,Ivanov,Kitaev,HK,BagretsAltland,BeenakkerMajorana,Wilczek,BeenakkerRMT,Elliot}. For solid state physics, interactions in many-body systems perturbed by thermal fluctuations of the kind found in topological superconductors has been proposed to broaden zero modes~\cite{Kitaev,HK,BeenakkerMajorana,Wilczek,Hamiltonian,ZKM,Neven,Dumitrescu}. An analogous structure is found in Quantum Chromodynamics (QCD) for discretised fermions on a lattice~\cite{KieburgWilson,DSV,ADSV,MarioJacWilson}. Surprisingly in the latter example, the broadening of the zero eigenvalues coincides with the statistics of a finite-dimensional Gaussian random matrix model~\cite{KieburgWilson,DSV,ADSV,MarioJacWilson}, which have been corroborated by lattice simulations~\cite{DelDebbio:2005qa,DWW2011,DHS2012,CGRSZ}. These observations were surprising because universality of the spectral statistics, and thus agreement with RMT, usually only holds in the limit of a large number of eigenvalues, while the number of zero modes has been finite in these systems. A similar observation was found for outliers above the bulk of the spectrum, see, e.g., the mathematical review~\cite{Capitaine}. The statistics of outlier commonly play an enormous role in time series analysis and, thus, statistics~\cite{book}. In the present work, we want to investigate the mechanism behind these finite size universalities and we will see in Section \ref{Sec:Universality} that it is a mechanism similar to the Central Limit Theorem. The main assumption needed to realise this is, in physical terms, that the zero modes are sufficiently delocalised in the eigenbasis of the perturbation. We will consider average spectral properties, which could be an average over gauge fields, as in QCD, or an average over disorder in solid state systems. In the present work, we model the physical ensemble average by an average over the Haar measure of the unitary matrix which expresses the unperturbed zero modes in the eigenbasis of the perturbation. This assumption is motivated by the fact that a perturbation that affects topology must be on a global scale. The short-distance dynamics of the corresponding modes are therefore averaged out. It has been pointed out~\cite{BagretsAltland} that it is difficult to distinguish between accumulation of eigenvalues around the origin and perturbed topological modes in experiments. We propose to look at the different scaling behaviours of the eigenvalues and show that perturbed zero modes broaden with the system size in a way that is not shared by the bulk. Our proposal is to exploit this difference as an indicator. The intuition behind this is that an accumulation of eigenvalues near zero will be part of the same ensemble as the first excited state, whereas perturbed zero modes behave as a separate finite-dimensional ensemble and therefore have a different scaling behaviour with the volume of the system and the coupling constant. This scaling property was first observed for lattice QCD in~\cite{DelDebbio:2005qa} and understood within that context in~\cite{DSV,ADSV}. We show that it holds true for all ten symmetric spaces in the Altland-Zirnbauer classification and clarify the assumptions under which the $\nu\times\nu$ RMT behaviour of the near zero modes holds. These results in the limit of large number of zero modes are also expected to be relevant for analysis of correlation matrices when applying a power map, see \cite{Powermap}. Our starting point is a situation where a Hermitian operator $\hat{A}$ is perturbed by another Hermitian operator $\hat{S}$, \begin{eqnarray} \hat{K} = \hat{A} + \alpha \hat{S}. \label{Eq:ModelIntro} \end{eqnarray} We want to investigate the statistical properties of this operator, that is, the spectrum of eigenvalues upon an ensemble average. The coupling constant $\alpha$ will be chosen to be small such that first order perturbation theory can be applied. The procedure of the proof is as follows. In Section \ref{Sec:Idea} we specify what is meant by ``small," where we also explain how to cut the Hilbert space to one of finite size $N$. The size $N$ will be sent to infinity at the end of the day. We crystallise our assumptions in Section \ref{Sec:Model}, in particular the three conditions on $\hat{A}$, $\hat{S}$, and $\alpha$. For this purpose we show that the spectrum of the former zero modes decouple from the bulk for small $\alpha$. We also discuss that the first order perturbation theory becomes exact for $N\to\infty$ under the assumed conditions for all ten symmetry classes of Hermitian operators~\cite{Dyson,Martin,Casell,AlexMartin}. In Section \ref{Sec:Universality} we then average over the part of the eigenbasis change between $\hat{A}$ and $\hat{S}$ associated with the zero modes of $\hat{A}$. The non-trivial change of basis creates a self average and forms a Central Limit Theorem for matrices. Our analysis deals with all ten symmetry classes in a unified way. Our results are substantiated by numerics of some examples in Section \ref{Sec:Applications} that we expect will find some interest in lattice QCD and systems with Majorana modes in condensed matter system. In Section \ref{Sec:Conclusion} we conclude and discuss our results. \section{Estimates of Scales}\label{Sec:Idea} We start with a general unperturbed Hermitian operator $\hat{A}$. This operator might be a Hamiltonian, a Euclidean Dirac operator or another quantity. Due to its Hermiticity, we can decompose it in its eigenvalues $\lambda_j$ and its normalised eigenvectors $|\psi_j\rangle$, i.e. \begin{equation}\label{specdec:A} \hat{A}=\sum_j \lambda_j|\psi_j\rangle\langle\psi_j|. \end{equation} Here, we include degeneracies of the spectrum and zeros. The operator may even have a continuum spectrum. In this case, we perform a finite volume UV cut-off for our analysis and let the volume $V$ go to infinity afterwards. Technically, we send the dimension $N$ of the Hilbert space to infinity, but the dimension is proportional to the volume of the system, $N\propto V$. This is true in QCD~\cite{KieburgWilson,DSV,ADSV,MarioJacWilson} and is expected to hold in condensed matter systems~\cite{AKMV,KimAdam} too. Usually, other quantities like the number of colours and the representation of the gauge group or the size of the spins and the number of particles enter into $N$ as well. Let us assume that $\hat{A}$ has a fixed number $\nu>0$ of zero modes and the eigenvalues are ordered so that $|\lambda_k|>|\lambda_{N}|$ for all $k>N$ and $|\psi_j\rangle$ for $j=1,\dots,\nu$ form an orthonormal basis of the zero mode space. This ordering corresponds to the UV cut-off; the first $N$ eigenvalues are also the $N$ smallest. So we consider the truncated operator \begin{equation}\label{trunc:A} \hat{A}^{(N)}=\sum_{j=\nu+1}^N \lambda_j|\psi_j\rangle\langle\psi_j|. \end{equation} This operator may be represented by a matrix \begin{equation} \sum_j \lambda_j|\psi_j\rangle\langle\psi_j|\hat{=}\left(\begin{array}{c|c} A'=\diag(\lambda_{\nu+1},\ldots,\lambda_N) & 0 \\ \hline 0 & 0 \end{array}\right) \end{equation} The notation ``$\hat{=}$" will be used to indicate that the truncated operator in the eigenbasis of $\hat{A}$ is a finite-dimensional matrix. We want to address how a generic additive Hermitian perturbation $\hat{S}$ broadens the eigenvalues of the zero modes for the operator \begin{equation} \label{def:H} \hat{K} = \hat{A} + \alpha \hat{S}=\lim_{N\to\infty} (\hat{A}^{(N)}+\alpha \hat{S}^{(N)})=\lim_{N\to\infty} \hat{K}^{(N)} \end{equation} with a small coupling constant $\alpha$ and the truncation of the perturbation $\hat{S}$ of the form \begin{equation}\label{trunc:S} \hat{S}^{(N)}=\sum_{j,k=1}^N\langle \psi_j|\hat{S}|\psi_k\rangle\ |\psi_j\rangle\langle \psi_k|. \end{equation} Note that $|\psi_j\rangle$ are still the eigenstates of $\hat{A}$. Since we are only interested in the leading effects of $\hat{S}$ on the zero modes, we work in a perturbative regime. To this purpose, we first need to identify what the correct scale of $\alpha$ is in terms of $\hat{A}$, $\hat{S}$, and $N$. Additionally, we have to specify how $\hat{S}$ describes a {\it generic perturbation}. To get a feeling for the questions above, we do standard perturbation theory ignoring the fact that the spectra of $\hat{A}$ and $\hat{S}$ may vary over different scales. A more rigorous approach can be found in Section \ref{Sec:CondOp}. The first order perturbation of the zero eigenvalues is given by the eigenvalues of the perturbation matrix \begin{equation}\label{first_order} \hat{K}_1^{\rm(zero)}= \alpha \sum_{j',j=1}^\nu\langle \psi_j|\hat{S}|\psi_{j'}\rangle\ |\psi_j\rangle\langle \psi_{j'}|\ , \end{equation} where the subscript denotes the order of the perturbation. This perturbation is only dominant if it is smaller than the second order perturbation given by the eigenvalues of \begin{equation}\label{second_order} \hat{K}_2^{\rm(zero)}=-\alpha^2\sum_{j',j=1}^\nu\left(\sum_{k=\nu+1}^N\frac{\langle \psi_j|\hat{S}|\psi_k\rangle\langle \psi_k|\hat{S}|\psi_{j'}\rangle}{\lambda_k}\right)|\psi_j\rangle\langle \psi_{j'}|\ . \end{equation} The first and second order corrections are of equal magnitude when the largest singular value of $\hat{K}_2^{\rm(zero)}$ becomes of the same order as the smallest singular value of $\hat{K}_1^{\rm(zero)}$. In Section \ref{Sec:Universality}, we argue that $\langle \psi_j|\hat{S}|\psi_{j'}\rangle$ are Gaussian distributed on the scale $\sqrt{\Tr (\hat{S}^{(N)})^2}/N$ for large $N$ and sufficient mixing between the eigenbases of $\hat{A}$ and $\hat{S}$. The mixing is important for the Matrix Central Limit Theorem argument. The estimates of the smallest and largest singular value follow from, respectively, \begin{equation}\label{heuristic:alpha.3} \begin{split} \left|\left|\left(\{\langle \psi_j|\hat{S}|\psi_{j'}\rangle\}_{i,j=1,\ldots,\nu}\right)^{-1}\right|\right|_{\rm op}\propto&\frac{\sqrt{\Tr (\hat{S}^{(N)})^2}}{N},\\ \left|\left|\left\{\sum_{k=\nu+1}^N\frac{\langle \psi_j|\hat{S}|\psi_k\rangle\langle \psi_k|\hat{S}|\psi_{j'}\rangle}{\lambda_k}\right\}_{i,j=1,\ldots,\nu}\right|\right|_{\rm op}\leq& \frac{\Tr (\hat{S}^{(N)})^2}{N^2|\lambda_{\nu+1}|} \end{split} \end{equation} with $||.||_{\rm op}$ being the operator norm, meaning the largest singular value of the operator. From this we find the simple estimate \begin{equation}\label{heuristic:alpha.4} \frac{1}{N}\frac{\sqrt{\Tr (\hat{S}^{(N)})^2}}{|\lambda_{\nu+1}|}\,\alpha\ll1 \end{equation} for the coupling constant $\alpha$. When the non-zero eigenvalues of $\hat{S}$ are of order $1$ and the smallest eigenvalue of $\hat{A}$ is of order $1/N$, we obtain $\sqrt{N}\alpha\ll1$, a relation which is well-known in lattice QCD~\cite{KieburgWilson,DSV,ADSV,MarioJacWilson}. Note that for certain ensembles the second order correction disappears due to symmetry. In this case we have to compare to the higher orders. This observation hints at the fact that we essentially need a different bound for $\alpha$ for the general situation. This is found in Section \ref{Sec:Model}. The discussion therein remains completely unaffected whether or not the second order perturbation theory vanishes. As already mentioned, the heuristic approach above does not necessarily take into account that $\hat{A}$ as well as $\hat{S}$ may have several parts of their spectra that scale differently. Usually the smallest non-zero eigenvalue of $\hat{A}^{(N)}$ is of order $1/N$, see~\cite{VerbZahed,VerbaarschotThreeFold,JacBeta2,DOTV,LeutSmil,RMT_2_EFT-1,RMT_2_EFT-2,ADMNUniversality,Srednicki}. Moreover, the largest eigenvalue of $\hat{S}$ can even exceed the one of $\hat{A}$ as it is the case for the Wilson-Dirac operator~\cite{Wilson}. In such cases $\alpha$ can never be perturbative for the whole spectra but only for a certain subspectrum like the zero modes. Equation~\eqref{heuristic:alpha.3} sets the scale where the perturbative approach of describing the broadening of the zero modes applies. \section{Preparations}\label{Sec:Model} The ensemble average we will consider is an average over the part of the transformation between the eigenbases of $\hat{A}$ and $\hat{S}$ associated with the zero modes. The full transformation is unitary and denoted by $U$. That is, diagonalising $\hat{S}^{(N)}=\sum_{l=1}^N s_l |\phi_l\rangle\langle\phi_l|$, we may write $U=\{\langle\psi_j|\phi_l\rangle\}_{j,l=1,\ldots,N}$. The matrices $U$ will be drawn from the Haar measure of the group corresponding to the considered symmetry class, see Table~\ref{tab:quantities}. To motivate this form of the average, note that almost regardless what the eigenvalues $s_l$ are, the coefficients $\langle\psi_j|\phi_l\rangle\langle\phi_l|\psi_{j'}\rangle$ behave in a generic case like random variables. ``Generic" here means that these statements hold when averaging over the eigenvectors. We will later split $U$ into a part corresponding to the zero modes and a part corresponding to the rest of the spectrum. Considering the leading order term $\hat{K}_1^{\rm(zero)}$ we note that each matrix entry can be expressed as a sum \begin{equation}\label{Eq:Sum} \langle\psi_j|\hat{S}|\psi_{j'}\rangle=\sum_{l=1}^N s_l \langle\psi_j|\phi_l\rangle\langle\phi_l|\psi_{j'}\rangle. \end{equation} The perturbation matrix for the zero modes is the part $j,j'=1,\ldots,\nu$. The Central Limit Theorem tells us that in the case of uncorrelated and identically distributed summands, the sum would be Gaussian. In Section \ref{Sec:Universality}, we extend the Central Limit Theorem to the sum \eqref{Eq:Sum} where neither the independence nor the identicalness is given. The fulcrum of our setup is that, for large $N$, the perturbation matrix for the zero modes becomes independent of the exact values of $s_l$. This requires the inverse participation ratio $\sum_{l=1}^{N}|\langle\psi_{j}|\phi_{l}\rangle|^4$ to be sufficiently small for $j=1,\dots,\nu$. We show that all matrix entries with $j,j'=1,\ldots,\nu$ become Gaussian independent up to some symmetry relations due to this sum. That is, we show that this sum and, accordingly, the matrix entries are Gaussian. It hence follows that the eigenvalues obey a $\nu\times\nu$ Gaussian RMT. We want to corroborate our statements from the previous section by listing the conditions under which the matrix valued Central Limit Theorem holds, see Subsection~\ref{Sec:CondOp}. Thereafter, in Subsection~\ref{Sec:Secular}, we explain why the first order perturbation theory becomes exact in the limit $N\to\infty$. Because the Central Limit Theorems depend on the symmetry class of the operators, we briefly review some of their particularities in Subsection~\ref{Sec:symmetryclass} and introduce our notation which is employed in Section \ref{Sec:Universality}. \subsection{Conditions on the Operators}\label{Sec:CondOp} We need the behaviour of the number of eigenvalues of $\hat{S}^{(N)}$ that are of the same order as its maximal singular value $\sigma_{\max}^{(N)}=||\hat{S}^{(N)}||_{\rm op}$ when $N$ goes to infinity. We recall that $||\hat{S}^{(N)}||_{\rm op}$ denotes the operator norm, meaning the largest singular value. A quantity which estimates the scaling of this number is the ratio between the $l^2$-norm and the operator norm, \begin{equation} q^{(N)}=\frac{\sqrt{\Tr (\hat{S}^{(N)})^2}}{||\hat{S}^{(N)}||_{\rm op}}\in[1,\sqrt{N}]. \end{equation} This quantity is akin to a participation ratio for eigenvalues. With the help of this definition, we assume the following conditions \begin{eqnarray} \Tr \hat{S}^{(N)} &=& 0, \label{Eq:CondTrace0}\\ \lim_{N\to\infty} q^{(N)} &=& \infty,\label{Eq:Gap}\\ \alpha &=& o\left(\frac{1}{||\hat{S}^{(N)}||_{\rm op}}\sqrt{\frac{N}{\Tr (A')^{-2}}}\right).\label{Eq:strength} \end{eqnarray} The first condition is not mandatory but simplifies the notation below. If the trace does not vanish the whole spectrum is shifted by $\Tr \hat{S}^{(N)}/N$. Hence, after a redefinition $\hat{S}^{(N)}-(\Tr \hat{S}^{(N)}/N)\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N\to \hat{S}^{(N)}$ we end up with Equation \eqref{Eq:CondTrace0}. Additionally, it helps us avoid the completely degenerate case $\hat{S}\propto \leavevmode\hbox{\small1\kern-3.8pt\normalsize1}$ where the Gaussian broadening of the zero modes collapses to a Dirac delta function (the spectrum is only shifted). This also shows that our results hold for any exact mode in a spectral gap. The first true condition is Equation \eqref{Eq:Gap}. It guarantees the Gaussian random matrix approximation describing the broadening of the zero modes, see Section \ref{Sec:Universality}. Physically, the condition~\eqref{Eq:Gap} tells us that there are enough eigenvalues inducing self-averaging due to the the relative change of the eigenvectors of $\hat{A}$ and $\hat{S}$ for the Matrix Central Limit Theorem to apply. That is, there is sufficient delocalisation. Note that this condition does not carry any information about the strength of the perturbation since the quotient $q^{(N)}$ is scale-invariant. The bound on the strength of the perturbation is covered by condition~\eqref{Eq:strength}. It resembles Equation \eqref{heuristic:alpha.4} and describes when the first order approximation applies. One can show that Equation \eqref{Eq:strength} yields a stronger bound than Inequality \eqref{heuristic:alpha.4}, \begin{equation}\label{estimate} \frac{N}{||(A')^{-1}||_{\rm op}\sqrt{\Tr (\hat{S}^{(N)})^2}}\geq \frac{N}{q^{(N)}\sqrt{\Tr (A')^{-2}}||\hat{S}^{(N)}||_{\rm op}}\geq \frac{\sqrt{N}}{\sqrt{\Tr (A')^{-2}}||\hat{S}^{(N)}||_{\rm op}}. \end{equation} The stricter bound is necessary to truncate the perturbation series after the first term. The interpretation is that $A'$ has to have a spectral gap where the former zero modes can live without being perturbed by the bulk. \subsection{Secular Equation of the Broadened Zero Eigenvalues}\label{Sec:Secular} Here we derive the first order perturbation from the secular equation of the whole system and study in detail the bounds for its validity. As in Section \ref{Sec:Idea}, we choose to work in the eigenbasis of the truncated Hermitian operator $\hat{A}^{(N)}$. In this basis $\hat{S}^{(N)}$ takes the block form (for the rest of our analysis, we represent the operators as $N\times N$ matrices $\hat{S}^{(N)}\hat{=}S^{(N)}$) \begin{eqnarray} US^{(N)}U^\dagger =\left(\begin{array}{c|c} S_1 & S_2\\ \hline S_2^\dagger & S_3 \end{array}\right). \label{Eq:newbasis} \end{eqnarray} Here we have explicitly written the unitary matrix $U_{i,k}=\langle\psi_i|\phi_k\rangle$ which changes from the eigenbasis of $S^{(N)}$ to $A^{(N)}$, that is \begin{eqnarray} [US^{(N)}U^\dagger]_{i,j} = U_{i,k}S^{(N)}_{k,k'}[U^\dagger]_{k',j} =\langle\psi_i|\phi_k\rangle\langle\phi_k|\Big(\sum_{l=1}^Ns_l|\phi_l\rangle\langle\phi_l|\Big)|\phi_{k'}\rangle\langle\phi_{k'}|\psi_j\rangle \ , \end{eqnarray} where $k$ and $k'$ are summed over. Since the zero modes of $A^{(N)}$ make up the final $\nu$ rows of $U$ it is useful to introduce the symbol $U_2$ for this part of $U$, i.e., $[U]_{l,k}=[U_2]_{l,k}=\langle\psi_l|\phi_k\rangle$, where $l=N-\nu+1,\ldots,N$. Likewise we introduce the symbol $U_1$ for the first part of $U$, i.e., $[U]_{m,k}=[U_1]_{m,k}=\langle\psi_m|\phi_k\rangle$, where $m=1,\ldots,N-\nu$. We do not make assumptions about the nature of these zero modes. They may be of topological origin, like anti-symmetry or chirality, or are given by peculiarities of the unperturbed system $\hat{A}$. Moreover, the symmetry classes of $\hat{A}$ and $\hat{S}$ are still open and will be discussed in the next subsection as well as in Section \ref{Sec:Universality}. Thence, we have not yet chosen the group $\mathcal{K}$ from where we draw the unitary matrix $U$ via the corresponding Haar measure, see Table~\ref{tab:quantities}. To derive the first order perturbation of the secular equation of an eigenvalue $\lambda$, we start with the secular equation of the whole system $K^{(N)}=A^{(N)}+\alpha S^{(N)}$, i.e. \begin{equation} \det(K^{(N)}-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N)=0. \end{equation} Employing the invariance of the determinant under the adjoint action of a unitary matrix we can rephrase this equation into the block form~\eqref{Eq:newbasis}, \begin{equation}\label{eq:sec.b} \begin{split} \det(K^{(N)}-\lambda \leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N) =&\det\left(\begin{array}{c|c} A'+\alpha S_1-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu} & \alpha S_2\\ \hline \alpha S_2^\dagger & \alpha S_3-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu \end{array}\right) \\ =& \det(A'-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu}) \det\left(\begin{array}{c|c} \leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu} + \alpha (A'-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu})^{-1} S_1 & \alpha (A'-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu})^{-1} S_2\\ \hline \alpha S_2^\dagger & \alpha S_3-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu \end{array}\right) \\ =&\det\left(A' - \lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu}\right) \det\left(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu} + \alpha (A'-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu})^{-1} U_1 S U_1^\dagger \right)\\ &\times \det\left[\alpha U_2 S U_2^\dagger - \lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu - \alpha U_2 S U_1^\dagger\left(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu} + \alpha\left(A' - \lambda \leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu}\right)^{-1} U_1 S U_1^\dagger \right)^{-1} \right.\\ &\times\left. \alpha \left(A' - \lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu}\right)^{-1} U_1 S U_2^\dagger \right] \\ =&\det\left(A' - \lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu}\right)\det\left(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N+\alpha S^{(N)}U_1^\dagger(A'-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu})^{-1} U_1\right)\\ &\times\det\left(\alpha U_2[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N+\alpha S^{(N)}U_1^\dagger(A'-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu})^{-1} U_1]^{-1}S^{(N)}U_2^\dagger -\lambda \leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu\right). \end{split} \end{equation} In the second equality we pull out the factor $(A'-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu})$ in the first $N-\nu$ rows of the determinant. Then we have expanded the second determinant in its two blocks on the diagonal and exploited the explicit expression for $S_{1,2,3}$. The last line follows from the expression of inverse matrices as a Neumann series. In the next step we make use of the bound of $\alpha$. Since the gap of $A'$ must not be allowed to close via the broadening of the zero modes, we need the smallest singular value of $A'$, which is $||(A')^{-1}||_{\rm op}$, to be much bigger than the largest singular value of $\alpha U_2[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N+\alpha S^{(N)}U_1^\dagger(A')^{-1} U_1]^{-1}SU_2^\dagger$. Therefore, the dependence on $\lambda$ in the first two determinants of Equation \eqref{eq:sec.b} can be dropped so that those terms cannot vanish. This spectral gap between $A'$ and $\alpha U_2[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N+\alpha S^{(N)}U_1^\dagger(A')^{-1} U_1]^{-1}S^{(N)}U_2^\dagger$ can most easily be seen when simplifying the latter. We can drop the term $\alpha S^{(N)}U_1^\dagger(A')^{-1} U_1$ because it is on average smaller than $\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N$. To see this let us choose an arbitrary vector $|\chi\rangle\in\mathbb{C}^N$. Then the square norm of $\alpha U_1^\dagger(A')^{-1} U_1S^{(N)}|\chi\rangle$ is on average \begin{equation} \int_{\mathcal{K}} d\mu(U)\alpha^2\langle\chi|S^{(N)}U_1^\dagger(A')^{-2} U_1 S^{(N)}|\chi\rangle=\frac{\alpha^2\Tr (A')^{-2}}{N}\langle\chi|(S^{(N)})^2|\chi\rangle\leq\frac{\alpha^2\Tr (A')^{-2}||S^{(N)}||_{\rm op}^2}{N}\ll1, \end{equation} where we used that each of the groups $\mathcal{K}$ comprises the symmetric group of permutations which immediately leads to the right hand side, cf.~Subsection~\ref{Sec:symmetryclass}. The second moment also vanishes as can be checked by \begin{equation} \begin{split} \int_{\mathcal{K}} d\mu(U)\alpha^4(\langle\chi|S^{(N)}U_1^\dagger(A')^{-2} U_1 S^{(N)}|\chi\rangle)^2=&\frac{\alpha^4(c_1\Tr (A')^{-4}+c_2(\Tr (A')^{-2})^2)}{N^2}\langle\chi|(S^{(N)})^2|\chi\rangle^2\\ \leq&\frac{\alpha^4(|c_1|\Tr (A')^{-4}+|c_2|(\Tr (A')^{-2})^2)||S^{(N)}||_{\rm op}^4}{N^2}, \end{split} \end{equation} where $c_1$ and $c_2$ are two constants that are of order unity for large $N$. Here, we used the fact that \begin{equation} \int_{\mathcal{K}} d\mu(U)|U_{ij}|^2|U_{il}|^2\overset{N\gg1}{\propto} \frac{1}{N^2},\ {\rm for}\ i,j,l=1,\ldots,N, \end{equation} for all of the groups $\mathcal{K}$ in Subsection~\ref{Sec:symmetryclass} and that $S^{(N)}|\chi\rangle\langle\chi|S^{(N)}$ is of rank one. Moreover we have $\Tr (A')^{-4}\leq (\Tr (A')^{-2})^2$ because $(A')^{-2}$ is positive definite. Hence, it holds \begin{equation} \int_{\mathcal{G}} d\mu(U)\alpha^4(\langle\chi|S^{(N)}U_1^\dagger(A')^{-2} U_1 S^{(N)}|\chi\rangle)^2\leq(|c_1|+|c_2|)\frac{\alpha^4(\Tr (A')^{-2})^2||S^{(N)}||_{\rm op}^4}{N^2}\ll1. \end{equation} Therefore, on average each singular value of $\alpha S^{(N)}U_1^\dagger(A')^{-1} U_1$ is much smaller than unity and the term can be neglected in the sum $\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N+\alpha S^{(N)}U_1^\dagger(A')^{-1} U_1$. Now we are ready to argue that $\lambda$ can be omitted in the combination $A'-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu}$ in the final determinant of \eqref{eq:sec.b}. This decouples the spectrum such that $\lambda$ measures the eigenvalues of \begin{equation}\label{eq:secondmat} \alpha U_2[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N+\alpha S^{(N)}U_1^\dagger(A')^{-1} U_1]^{-1}S^{(N)}U_2^\dagger\approx\alpha U_2S^{(N)}U_2^\dagger. \end{equation} In Section \ref{Sec:Universality} we show that the matrix $U_2S^{(N)}U_2^\dagger$ is distributed according to a Gaussian random matrix where each matrix entry has the standard deviation $\sqrt{\Tr (S^{(N)})^2}/N$. Due to the fixed and finite dimension $\nu$ (the number of the former zero modes), also the largest eigenvalue of the matrix \eqref{eq:secondmat} is of the order $\sqrt{\Tr (S^{(N)})^2}/N$. We conclude that \begin{equation} \alpha \ll\frac{N}{||(A')^{-1}||_{\rm op}\sqrt{\Tr (S^{(N)})^2}} \end{equation} is needed to drop $\lambda$ in $A'-\lambda\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N-\nu}$. This is given from Equation \eqref{estimate}. Summarising, with our assumed conditions~(\ref{Eq:CondTrace0}--\ref{Eq:strength}) the broadened zero modes are completely described by the leading order term $K_1^{\rm(z)}=\alpha S_3=\alpha U_2 S^{(N)}U_2^\dagger$. As we will show in Section \ref{Sec:Universality}, this matrix takes generically the form of a Gaussian random matrix. \subsection{Symmetry Classes} \label{Sec:symmetryclass} To see a broadening of finitely many zero modes we need an ensemble average. Otherwise we have only finitely many peaks somewhere about the origin. The ensemble average considered here will be an average over the matrix $U_2=\{\langle\psi_j|\phi_l\rangle\}_{j = N - \nu + 1,\dots,N, l = 1,\dots,N}$. We choose $U_2$ to be Haar-distributed in a Stiefel manifold of one of the groups $\mathcal{K}$ in Table \ref{tab:quantities}. Note that we do not require all of $U$ to be Haar-distributed. The nature of the groups $\mathcal{K}$ strongly depends on what the generic symmetry class of $S_3=U_2SU_2^\dagger$ is. There are ten symmetry classes of Hermitian operators in total that $S_3$ can take. Those have been classified by Altland and Zirnbauer~\cite{Martin,AlexMartin}. Five of the ten classes exhibit a chiral symmetry and the other five do not. We start with the latter. \subsubsection{Non-Chiral Classes} The non-chiral symmetries can be described through the three number fields of real ($\mathbb{R}$), complex ($\mathbb{C}$), and quaternion ($\mathbb{H}$) numbers. These three fields each have a corresponding group, which are the orthogonal matrices ${\rm O}(N)$, the unitary matrices ${\rm U}(N)$, and the unitary symplectic matrices ${\rm USp}(N)$ with $N$ even. They are the maximal compact subgroups of the general linear groups $\mathcal{G}={\rm Gl}_{\mathbb{R}}(N),{\rm Gl}_{\mathbb{C}}(N),{\rm Gl}_{\mathbb{H}}(N)$, respectively. There are two Hermitian subsets invariant under ${\rm O}(N)$ which are the real symmetric matrices $\mathcal{H}={\rm Sym}(N)$ and the imaginary antisymmetric matrices $\mathcal{H}={\rm ASym}(N)$. The same holds true for the quaternion case where we have the self-dual Hermitian matrices $\mathcal{H}={\rm Self}(N)$ and the anti-self-dual Hermitian matrices $\mathcal{H}={\rm ASelf}(N)$. For the complex case only the Hermitian matrices $\mathcal{H}={\rm Herm}(N)$ are invariant under ${\rm U}(N)$. The matrix $S_3=U_2 S^{(N)}U_2^\dagger$ has to be in one of these five matrix sets when it is not generically chiral. Since only the projection of $U$ to its last $\nu$ rows is of interest, we do not average over the whole group $\mathcal{K}={\rm O}(N),{\rm U}(N),{\rm USp}(N)$ but only over the corresponding Stiefel manifolds $\mathcal{K}_\nu={\rm O}(N)/{\rm O}(N-\nu),{\rm U}(N)/{\rm U}(N-\nu),{\rm USp}(N)/{\rm USp}(N-\nu)$; for the last case also $\nu$ has to be even. In our calculations in Section \ref{Sec:Universality}, we need the fact that $\mathcal{K}_\nu$ can be embedded into $\nu\times N$ matrices which are given by the matrix spaces $\mathcal{G}_\nu={\rm Mat}_{\mathbb{R}}(\nu,N),{\rm Mat}_{\mathbb{C}}(\nu,N),{\rm Mat}_{\mathbb{H}}(\nu,N)$. We denote with $\mathcal{H}_\nu$ the matrix space from which $S_3$ is drawn. \begin{table} \begin{tabular}{|c||c|c|c|c|} \hline RMT & Cartan Class & $\mathcal{H}_\nu$ & Matrix Structure \\ \hline\hline GUE & A & ${\rm Herm}(\nu)$ & $S_3=S_3^\dagger\in\mathbb{C}^{\nu\times \nu}$ \\ \hline GOE & AI & ${\rm Sym}(\nu)$ & $\overset{\ }{S_3=S_3^T=S_3^*\in\mathbb{R}^{\nu\times \nu}}$ \\ \hline GSE & AII & ${\rm Self}(\nu)$ & $\overset{\ }{\begin{array}{c} \displaystyle S_3=\tau_2S_3^T\tau_2=\tau_2S_3^*\tau_2\in\mathbb{C}^{\nu\times \nu},\ \nu\in2\mathbb{N}\end{array}}$ \\ \hline GAOE & B$\mid$D & ${\rm ASym}(\nu)$ & $\overset{\ }{\begin{array}{c} \displaystyle S_3=-S_3^T=-S_3^*\in\imath\mathbb{R}^{\nu\times\nu}\end{array}}$ \\ \hline GASE & C & ${\rm ASelf}(\nu)$ & $\overset{\ }{\begin{array}{c} \displaystyle S_3=-\tau_2S_3^T\tau_2=-\tau_2S_3^*\tau_2\in\mathbb{C}^{\nu\times\nu},\ \nu\in2\mathbb{N}\end{array}}$ \\ \hline\hline $\chi$GUE & AIII & ${\rm Mat}_{\mathbb{C}}(p',n')$ & $\overset{\ }{\begin{array}{c} \displaystyle S_3=\left[\begin{array}{cc} 0 & W_3 \\ W_3^\dagger & 0 \end{array}\right],\ W_3\in\mathbb{C}^{p'\times n'}\end{array}}$ \\ \hline $\chi$GOE & B$\mid$DI & ${\rm Mat}_{\mathbb{R}}(p',n')$ & $\overset{\ }{\begin{array}{c} \displaystyle S_3=\left[\begin{array}{cc} 0 & W_3 \\ W_3^\dagger & 0 \end{array}\right],\ W_3=W_3^*\in\mathbb{R}^{p'\times n'}\end{array}}$ \\ \hline $\chi$GSE & CII & ${\rm Mat}_{\mathbb{H}}(p',n')$ & $\overset{\ }{\begin{array}{c} \displaystyle S_3=\left[\begin{array}{cc} 0 & W_3 \\ W_3^\dagger & 0 \end{array}\right],\ W_3=\tau_2W^*\tau_2\in\mathbb{C}^{p'\times n'},\ p',n'\in2\mathbb{N}\end{array}}$ \\ \hline\hline GBOE & CI & ${\rm Sym}_{\mathbb{C}}(\nu/2)$ & $\overset{\ }{\begin{array}{c} \displaystyle S_3=\left[\begin{array}{cc} 0 & W_3 \\ W_3^\dagger & 0 \end{array}\right],\ W_3=W_3^T\in\mathbb{C}^{\nu/2\times \nu/2},\ \nu\in2\mathbb{N} \end{array}}$ \\ \hline GBSE & DIII & ${\rm ASym}_{\mathbb{C}}(\nu/2)$ & $\overset{\ }{\begin{array}{c} \displaystyle S_3=\left[\begin{array}{cc} 0 & W_3 \\ W_3^\dagger & 0 \end{array}\right],\ W_3=-W_3^T\in\mathbb{C}^{\nu/2\times \nu/2},\ \nu\in2\mathbb{N} \end{array}}$ \\ \hline \end{tabular} \caption{The ten symmetry classes given in terms of the acronym of the Gaussian random matrix ensemble (first column, notation follows~\cite{MarioTim}) and the symbol along the Cartan classification scheme (second column, see~\cite{Martin,Casell,AlexMartin}). The third column represents the matrix space in which $S_3$ lives, and the fourth column shows its structure in matrix form. The matrix $\tau_2$ is the second Pauli matrix. In the first five rows we listed the non-chiral classes followed by the three classical chiral ensembles where $p+n=N$ and $p'+n'=\nu$. The two Boguliubov--de Gennes classes are given in the last two rows. For the symplectic cases (third, fifth and eighth row) the dimensions $N,\nu, p,\ldots$ have to be all even. This table is continued in Table~\ref{tab:quantities}. }\label{tab:symmetryclasses} \end{table} \begin{table} \begin{tabular}{|c||c|c|c|c|} \hline RMT & $\mathcal{K}_\nu$ & $\mathcal{G}_\nu$ & $\mathcal{P}_\nu$ & $\gamma$ \\ \hline\hline GUE & $\displaystyle\frac{{\rm U}(N)}{{\rm U}(N-\nu)}$ & ${\rm Mat}_{\mathbb{C}}(\nu,N)$ & ${\rm Herm}(\nu)$ & $1$ \\ \hline GOE & $\displaystyle\frac{{\rm O}(N)}{{\rm O}(N-\nu)}$ & ${\rm Mat}_{\mathbb{R}}(\nu,N)$ & ${\rm Sym}(\nu)$ & $1/2$ \\ \hline GSE & $\displaystyle\frac{{\rm USp}(N)}{{\rm USp}(N-\nu)}$ & ${\rm Mat}_{\mathbb{H}}(\nu,N)$ & ${\rm Self}(\nu)$ & $1/2$ \\ \hline GAOE & $\displaystyle\frac{{\rm O}(N)}{{\rm O}(N-\nu)}$ & ${\rm Mat}_{\mathbb{R}}(\nu,N)$ & ${\rm Sym}(\nu)$ & $1/2$ \\ \hline GASE & $\displaystyle\frac{{\rm USp}(N)}{{\rm USp}(N-\nu)}$ & ${\rm Mat}_{\mathbb{H}}(\nu,N)$ & ${\rm Self}(\nu)$ & $1/2$ \\ \hline\hline $\chi$GUE & $\displaystyle\frac{{\rm U}(p)}{{\rm U}(p-p')}\times\frac{{\rm U}(n)}{{\rm U}(n-n')}$ & ${\rm Mat}_{\mathbb{C}}(p',p)\oplus{\rm Mat}_{\mathbb{C}}(n',n)$ & ${\rm Herm}(p')\oplus{\rm Herm}(n')$ & $1$ \\ \hline $\chi$GOE & $\displaystyle\frac{{\rm O}(p)}{{\rm O}(p-p')}\times \frac{{\rm O}(n)}{{\rm O}(n-n')}$ & ${\rm Mat}_{\mathbb{R}}(p',p)\oplus{\rm Mat}_{\mathbb{R}}(n',n)$ & ${\rm Sym}(p')\oplus{\rm Sym}(n')$ & $1/2$ \\ \hline $\chi$GSE & $\displaystyle\frac{{\rm USp}(p)}{{\rm USp}(p-p')}\times\frac{{\rm USp}(n)}{{\rm USp}(n-n')}$ & ${\rm Mat}_{\mathbb{H}}(p',p)\oplus{\rm Mat}_{\mathbb{H}}(n',n)$ & ${\rm Self}(p')\oplus{\rm Self}(n')$ & $1/2$ \\ \hline\hline GBOE & $\displaystyle\frac{{\rm U}(N/2)}{{\rm U}((N-\nu)/2)}$ & ${\rm Mat}_{\mathbb{C}}(\nu/2,N/2)$ & ${\rm Herm}(\nu/2)$ & $1/2$ \\ \hline GBSE & $\displaystyle\frac{{\rm U}(N/2)}{{\rm U}((N-\nu)/2)}$ &${\rm Mat}_{\mathbb{C}}(\nu/2,N/2)$ & ${\rm Herm}(\nu/2)$ & $1/2$ \\ \hline \end{tabular} \caption{ Continuation of Table~\ref{tab:symmetryclasses} where the order of the rows is the same. The first column shows again the acronym of the corresponding ensemble. The corresponding Stiefel manifold, which we obtain after projecting the eigenvectors $U=\{\langle\psi_j|\phi_l\rangle\}_{j,l=1,\ldots,N}$ to the broadened zero modes $U_2$, is given in the second column, and the third column shows the flat matrix space in which $\mathcal{K}_\nu$ is embedded. This embedding is needed in our calculations in Section \ref{Sec:Universality}. The same is also true for the Hermitian matrix spaces given in the fourth column, that are employed to rewrite the Haar measures as Gaussian integrals. The parameter $\gamma$ in the last column appears at several places in the derivation too. It is essentially the exponent of the determinant that can be obtained by a multivariate Gaussian integral. }\label{tab:quantities} \end{table} \subsubsection{Chiral Classes} When chiral symmetry is present the situation is slightly more complicated. There are the three standard chiral symmetry classes~\cite{VerbaarschotThreeFold}, where \begin{equation}\label{chiral} \hat{S}^{(N)}\hat{=}\left(\begin{array}{cc} 0 & W \\ W^\dagger & 0 \end{array}\right) \end{equation} comprises a real ($W\in {\rm Mat}_{\mathbb{R}}(p,n)\hat{=}\mathcal{H}$), complex ($W\in {\rm Mat}_{\mathbb{C}}(p,n)\hat{=}\mathcal{H}$), or a quaternion ($W\in {\rm Mat}_{\mathbb{H}}(p,n)\hat{=}\mathcal{H}$ with $p$ and $n$ even) matrix with $p+n=N$. Here the notion ``$\hat{=}$" carries the additional meaning that there is a unitary matrix for the ensemble where $S^{(N)}$ is drawn from to write it in this form. The matrix $U=\diag(V_1,V_2)$ can be chosen in a block diagonal form with $(V_1,V_2)\in\mathcal{K}={\rm O}(p)\times{\rm O}(n),{\rm U}(p)\times{\rm U}(n),{\rm USp}(p)\times{\rm USp}(n)$. The remaining two symmetry classes are of the Bogoliubov--de Gennes type where $W$ is either complex symmetric ${\rm Sym}_{\mathbb{C}}(p=n=N/2)\hat{=}\mathcal{H}$ or complex antisymmetric ${\rm ASym}_{\mathbb{C}}(p=n=N/2)\hat{=}\mathcal{H}$. In both cases the unitary group $\mathcal{K}={\rm U}(N/2)$ keeps this structure invariant, but the unitary matrix $U=\diag(V_1,V_2)$ satisfies the condition $V_1=V_2^*$. To get the statistics of the cut-out $S_3$ we assume that the projection is symmetry-preserving, meaning $S$ and $S_3$ share the same symmetry class though they are of different dimensions. The matrix $S_3$ should be also chiral, \begin{equation}\label{chiral.b} S_3\hat{=}\left(\begin{array}{cc} 0 & W_3 \\ W_3^\dagger & 0 \end{array}\right) \end{equation} with $W_3$ being $p'\times n'$ dimensional, where the dimensions satisfy $p'\leq p$, $n'\leq n$, and $p'+n'=\nu\leq N$. Due to this projection we have to effectively integrate over the Stiefel manifolds $\mathcal{K}_\nu={\rm O}(p)/{\rm O}(p-p')\times {\rm O}(n)/{\rm O}(n-n'),{\rm U}(p)/{\rm U}(p-p')\times{\rm U}(n)/{\rm U}(n-n'),{\rm USp}(p)/{\rm USp}(p-p')\times{\rm USp}(n)/{\rm USp}(n-n')$ for the three classical chiral ensembles. As for the non-chiral ensembles we need their embedding in a flat vector space which here is $\mathcal{G}_\nu={\rm Mat}_{\mathbb{R}}(p',p)\oplus{\rm Mat}_{\mathbb{R}}(n',n),{\rm Mat}_{\mathbb{C}}(p',p)\oplus{\rm Mat}_{\mathbb{C}}(n',n),{\rm Mat}_{\mathbb{H}}(p',p)\oplus{\rm Mat}_{\mathbb{H}}(n',n)$. For the two Boguliubov--de Gennes classes the two spaces are $\mathcal{K}_\nu={\rm U}(N/2)/{\rm U}((N-\nu)/2)$ and $\mathcal{G}_\nu={\rm Mat}_{\mathbb{C}}((N-\nu)/2,N/2)$. Here let us emphasise that for these two cases $N$ as well as $\nu$ are assumed to be even. The above discussion is summarised in Tables~\ref{tab:symmetryclasses} and~\ref{tab:quantities}. \section{Central Limit Theorems for Matrices}\label{Sec:Universality} In this section, we want to answer the question what the distribution of the matrix $S_3 = U_2S^{(N)}U_2^\dagger$ of finite size $\nu\times \nu$ is when $N$ becomes large. We here ignore the overall factor $\alpha$ as the perturbative expansion of the zero modes has already taken place, see Subsection~\ref{Sec:Secular}. We study the non-chiral, the classical chiral, and the Bogoliubov--de Gennes classes separately in Subsections~\ref{Sec:CondUn1},~\ref{Sec:CondUn2}, and~\ref{Sec:CondUn2}. For all ten symmetry classes we find that under the conditions~(\ref{Eq:CondTrace0}-\ref{Eq:strength})\ $S_3$ is distributed by a Gaussian in the limit of large $N$. Results from effective field theory~\cite{MarioJacWilson,KimAdam} suggest that these results hold for an even more general setting when the unitary submatrix $U_2$ is not Haar distributed. \subsection{Gaussian Limit for Non-Chiral $S_3$} \label{Sec:CondUn1} We define the distribution of $S'=\kappa S_3$, with $\kappa=N/\sqrt{\Tr (S^{(N)})^2}$, via a Dirac delta function, \begin{equation}\label{Eq:DensSbar} p(S') = \int_{\mathcal{K}_\nu} d\mu(U_2) \delta\left(S' - \kappa U_2S^{(N)}U_2^\dagger\right), \end{equation} where $d\mu(U_2)$ is the normalised Haar measure of the Stiefel manifold $\mathcal{K}_\nu$, see the first five rows of Tables~\ref{tab:symmetryclasses} and~\ref{tab:quantities}. We have contained the scaling explicitly in $\kappa$ to simplify later calculations. The Haar measure has also a representation as a Dirac delta function over the larger set $\mathcal{G}_\nu$, \begin{equation}\label{Eq:Haar} \int_{\mathcal{K}_\nu}d\mu(U_2) f(U_2) =\frac{\int_{\mathcal{G}_\nu} dU_2 f(U_2)\delta(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-U_2U_2^\dagger)}{\int_{\mathcal{G}_\nu} dU_2 \delta(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-U_2U_2^\dagger)}. \end{equation} with an arbitrary integrable function $f$. Both Dirac delta functions can be expressed as Gaussian integrals over the symmetric spaces $\mathcal{H}_\nu$ for Equation \eqref{Eq:DensSbar} and $\mathcal{P}_\nu$ for Equation \eqref{Eq:Haar}. Thus, we start with the expression \begin{equation}\label{calc:nonchi.1} \begin{split} p(S')=&\lim_{\epsilon\to0} \frac{\int_{\mathcal{G}_\nu} dU_2\int_{\mathcal{P}_\nu}dP f_\epsilon(U_2,S')\exp[ \epsilon \gamma N\Tr (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-i P)^2+\gamma N\Tr (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-U_2U_2^\dagger)(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-i P)]}{\int_{\mathcal{G}_\nu} dU_2\int_{\mathcal{P}_\nu}dP\exp[ \epsilon \gamma N\Tr (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-i P)^2+\gamma N\Tr (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-U_2U_2^\dagger)(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-i P)]},\\ f_\epsilon(U_2,S')=&\frac{\int_{\mathcal{H}_\nu}dH\exp[ -\epsilon\Tr H^2+i\Tr (S' - \kappa U_2S^{(N)}U_2^\dagger)H]}{\int_{\mathcal{H}_\nu}d\bar{S}\int_{\mathcal{H}_\nu}dH\exp[- \Tr H^2- \Tr \bar{S}^2/4]} \end{split} \end{equation} to analyse the large $N$ behaviour. The shift in $H$ guarantees that the integral over $U_2$ is absolutely integrable and the denominators normalize the integrals properly. The factor $\gamma N$ in the $P$-dependent part of the exponent is introduced in foresight of the saddle point approximation when taking $N\to\infty$. Here $\gamma $ is a parameter depending on the symmetry class and can be read off from Table~\ref{tab:quantities}. Due to the absolute integrability of the integrals we can interchange them. This allows us to carry out the integral over $U_2$ which is now a Gaussian over a $\nu\times N$ dimensional matrix yielding a determinant. Thence, we find \begin{equation}\label{calc:nonchi.2} \begin{split} p(S')=&\lim_{\epsilon\to0} \frac{\int_{\mathcal{P}_\nu}dP\widetilde{f}_\epsilon(P,S')\exp[\epsilon \gamma N\Tr (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-i P)^2+\gamma N\Tr (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-i P)]}{\int_{\mathcal{P}_\nu}dP\exp[\epsilon \gamma N\Tr (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-i P)^2+\gamma N\Tr (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-i P)]\det^{-\gamma N}[\gamma N (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-iP)]},\\ \widetilde{f}_\epsilon(P,S')=&\frac{\int_{\mathcal{H}_\nu}dH\exp[-\epsilon\Tr H^2+i\Tr S'H]\det^{-\gamma}[\gamma N\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N\otimes (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-iP)+i \kappa S^{(N)}\otimes H]}{\int_{\mathcal{H}_\nu}d\bar{S}\int_{\mathcal{H}_\nu}dH\exp[- \Tr H^2- \Tr \bar{S}^2/4]}, \end{split} \end{equation} where the exponent $\gamma$ depends on the symmetry class and can be read off from Table~\ref{tab:quantities}. For $N$ large enough, the limit $\epsilon\to0$ can be performed for the integral over $P$ because the determinant guarantees the convergence. However, we still need this regularisation for the integral over $H$. We therefore do the saddle point analysis of the simplified version \begin{equation}\label{calc:nonchi.3} \begin{split} p(S')=& \frac{\int_{\mathcal{P}_\nu}dP g(P,S')\exp[ -i\gamma N\Tr P]\det^{-\gamma N}[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-iP]}{\int_{\mathcal{P}_\nu}dP\exp[-i\gamma N\Tr P]\det^{-\gamma N}[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-iP]},\\ g(P,S')=&\lim_{\epsilon\to0}\frac{\int_{\mathcal{H}_\nu}dH\exp[-\epsilon\Tr H^2+i\Tr S'H]\det^{-\gamma}[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N\nu} +i\gamma^{-1} S^{(N)}/\sqrt{\Tr (S^{(N)})^2}\otimes H(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_\nu-iP)^{-1}]}{\int_{\mathcal{H}_\nu}d\bar{S}\int_{\mathcal{H}_\nu}dH\exp[- \Tr H^2- \Tr \bar{S}^2/4]}, \end{split} \end{equation} where we have written out $\kappa$. For large $N$, we rescale $P\to P/\sqrt{\gamma N}$ in the enumerator as well as in the denominator. This allows us to perform the limit for the $P$ integral exactly with Lebesgue's dominated convergence theorem. We have also written out $\kappa$. This implies that the $P$-integrand becomes the Gaussian $\exp[-\Tr P^2/2]$ via a Taylor expansion. Hence we obtain \begin{equation}\label{calc:nonchi.4} \begin{split} \lim_{N\to\infty}p(S')=& \lim_{N\to\infty}\lim_{\epsilon\to0}\frac{\int_{\mathcal{H}_\nu}dH\exp[-\epsilon\Tr H^2+i\Tr S'H]\det^{-\gamma}[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N\nu} +i\gamma^{-1} S^{(N)}/\sqrt{\Tr (S^{(N)})^2}\otimes H]}{\int_{\mathcal{H}_\nu}d\bar{S}\int_{\mathcal{H}_\nu}dH\exp[- \Tr H^2- \Tr \bar{S}^2/4]}. \end{split} \end{equation} The limit of the integral over $H$ results from an expansion of the determinant which is \begin{equation}\label{calc:nonchi.5} {\rm ln}\,{\det}^{-\gamma}\left[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N\nu} +i \frac{S^{(N)}}{\gamma\sqrt{\Tr (S^{(N)})^2}}\otimes H\right]=\gamma\sum_{j=1}^\infty\frac{1}{j}\Tr \left(-i \frac{S^{(N)}}{\gamma\sqrt{\Tr (S^{(N)})^2}}\right)^j \Tr H^j. \end{equation} The first term ($j=1$) vanishes because of condition~\eqref{Eq:CondTrace0} and the coefficient for $j=2$ becomes $-1/(2\gamma)$. The other terms for $j>2$ can be estimated as follows, \begin{equation}\label{calc:nonchi.6} \left|\frac{\Tr(S^{(N)})^j}{(\Tr (S^{(N)})^2)^{j/2}}\right|\leq\frac{||S^{(N)}||_{\rm op}^{j-2}\Tr (S^{(N)})^2}{(\Tr (S^{(N)})^2)^{j/2}}=\frac{1}{(q^{(N)})^{j-2}}\overset{N\to\infty}{\rightarrow}0 \end{equation} resulting from the condition \eqref{Eq:Gap}. Therefore, the determinant can be approximated by a Gaussian telling us that we can set $\epsilon=0$. Eventually we arrive at \begin{equation}\label{result:non-chiral} \begin{split} \lim_{N\to\infty}p(S')=& \frac{\int_{\mathcal{H}_\nu}dH\exp[-\Tr H^2/(2\gamma)+i\Tr S'H]}{\int_{\mathcal{H}_\nu}d\bar{S}\int_{\mathcal{H}_\nu}dH\exp[- \Tr H^2- \Tr \bar{S}^2/4]}=\frac{\exp[-\gamma\Tr {S'}^2/2]}{\int_{\mathcal{H}_\nu}d\bar{S}\exp[- \gamma\Tr \bar{S}^2/2]}, \end{split} \end{equation} which is the main result of the section. We conclude that the former zero eigenvalues are broadened by the matrix $\alpha S_3$ which is distributed like a Gaussian random matrix with standard deviation $\alpha\sqrt{\Tr (S^{(N)})^2/(\gamma N^2)}$ for large $N$. \subsection{Gaussian Limit of $S_3$ for one of the three Standard Chiral Classes} \label{Sec:CondUn2} The three classical chiral ensembles can be dealt with in a similar way to the five non-chiral ensembles in the previous section. We anew replace the normalised Haar measure of $\mathcal{K}_\nu$ by a Gaussian integral over $\mathcal{G}_\nu$ and $\mathcal{P}_\nu$ and the Dirac delta function in $S'$ by a Gaussian integral on $\mathcal{H}_\nu$. Thus, Equation~\eqref{calc:nonchi.1} still holds only for the respective spaces, see the sixth to eighth row of the Tables~\ref{tab:symmetryclasses} and~\ref{tab:quantities}. The difference shows in the structure of the matrices. While the matrix $\gamma N (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_N-iP)=\diag(\gamma p(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{p'}-iP_1),\gamma n (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{n'}-iP_2))$ is block diagonal, one block is of size $p'\times p'$ and the other of size $n'\times n'$, the matrices \begin{equation}\label{calc:chi.1} S^{(N)}=\left(\begin{array}{cc} 0 & W \\ W^\dagger & 0 \end{array}\right)\ {\rm as\ well\ as}\ H=\left(\begin{array}{cc} 0 & X \\ X^\dagger & 0 \end{array}\right) \end{equation} consist of off-diagonal blocks of size $p\times n$ and $n\times p$ as well as $p'\times n'$ and $n'\times p'$, respectively. Note that we weight the two blocks of $P$ differently, again in foresight of the saddle point analysis. With this in mind one can perform the integral over $U_2=\diag(\widetilde{V}_1,\widetilde{V}_2)$ leading to the counterpart of Equation \eqref{calc:nonchi.2} with the appropriate matrix spaces and the exponent $\gamma$ as given in Table~\ref{tab:quantities}. Here we use the identity \begin{equation}\label{calc:chi.2} \begin{split} &\int_{\mathcal{G}_\nu}d(\widetilde{V}_1,\widetilde{V}_2)\exp\Big[-\gamma p\Tr \widetilde{V}_1^\dagger(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{p'}-iP_1) \widetilde{V}_1-\gamma n\Tr \widetilde{V}_2^\dagger (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{n'}-iP_2) \widetilde{V}_2\\ &-i\kappa\Tr \widetilde{V}_1^\dagger X \widetilde{V}_2 W^\dagger-i\kappa\Tr\widetilde{V}_2^\dagger X^\dagger \widetilde{V}_1 W\Big]\\ \propto&\ {\det}^{-\gamma}\left[\begin{array}{cc} \gamma p\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_p\otimes (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{p'}-iP_1) & i\kappa W\otimes X \\ i\kappa W^\dagger\otimes X^\dagger & \gamma n\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_n\otimes (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{n'}-iP_2) \end{array}\right], \end{split} \end{equation} which can be readily computed. The rest of the calculation does not differ much from the non-chiral situation. First we can take the limit $\epsilon\to0$ in the $P$-integral because the convergence is given by the determinant and the limit $N\to\infty$, which implies that $p/N$ and $n/N$ are fixed since the number of zero modes shall be fixed, can be done for $P$ exactly after rescaling $P_1\to P_1/\sqrt{\gamma p}$ and $P_2\to P_2/\sqrt{\gamma n}$. Finally, we expand the remaining determinant, \begin{equation}\label{calc:chi.3} \begin{split} &{\det}^{-\gamma}\left[\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N\nu}+\left(\begin{array}{cc} 0 & \displaystyle i\frac{\kappa}{\gamma\sqrt{pn}} W\otimes X \\ \displaystyle i\frac{\kappa}{\gamma\sqrt{pn}} W^\dagger\otimes X^\dagger & 0 \end{array}\right)\right]\\ =&\gamma\sum_{j=1}^\infty\frac{1}{j}\Tr\left(-\frac{N^2}{\gamma^2 pn \Tr(S^{(N)})^2} WW^\dagger\right)^j\Tr(XX^\dagger)^j. \end{split} \end{equation} In view of $2\Tr (WW^\dagger)^j=\Tr(S^{(N)})^{2j}$, we can exploit the same estimation as in Equation \eqref{calc:nonchi.6} such that only the term for $j=1$ survives. The leftover Gaussian integral over $H$ can be carried out and we obtain the result \begin{equation}\label{result:chiral} \begin{split} \lim_{N\to\infty}p(S')=& \frac{\exp[-\gamma pn\Tr {S'}^2/N^2]}{\int_{\mathcal{H}_\nu}d\bar{S}\exp[- \gamma pn\Tr \bar{S}^2/N^2]}. \end{split} \end{equation} Consequently, the matrix $\alpha S_3$ is again distributed along a Gaussian random matrix with a standard deviation $\alpha\sqrt{\Tr(S^{(N)})^2/(2\gamma pn)}$. \subsection{Gaussian Limit for the Boguliubov--de Gennes types of $S_3$} \label{Sec:CondUn3} For the two Boguliubov--de Gennes cases we have almost the same situation as in other three chiral classes only that for $U_2=\diag(\widetilde{V}_1,\widetilde{V}_2)$ we have additionally the condition $\widetilde{V}_2=\widetilde{V}_1^*$. For this reason, the matrix $P$ satisfies the diagonal block form $P=\diag(\widetilde{P},\widetilde{P}^*)$ with $\widetilde{P}\in{\rm Herm}(\nu/2)$. The matrices $S^{(N)}$ and $H$ attain the chiral forms~\eqref{calc:chi.1} with the additional conditions $W^T=\pm W$ and $X^T=\pm X$, both relations with the same sign. Starting with Equation \eqref{calc:nonchi.1} only with the corresponding matrix spaces, see last two rows of the Tables~\ref{tab:symmetryclasses} and~\ref{tab:quantities}, as well as replacing $N$ by $N/2$ and setting $\gamma=1/2$ in the exponential functions, we need the counterpart of Equation \eqref{calc:chi.2} which is \begin{equation}\label{calc:BdG.1} \begin{split} &\int_{\mathcal{G}_\nu}d\widetilde{V}_1\exp\left[-N\Tr \widetilde{V}_1^\dagger(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{\nu/2}-i\widetilde{P}) \widetilde{V}_1/2-i\kappa\Tr \widetilde{V}_1^\dagger X \widetilde{V}_1^* W^\dagger-i\kappa\Tr \widetilde{V}_1^T X^\dagger \widetilde{V}_1 W\right]\\ \propto&\ {\det}^{-1/2}\left[\frac{N}{2}\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_2\otimes\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N/2}\otimes (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{\nu/2}-i\widetilde{P})+i\kappa(\tau_3-i\tau_1)\otimes X\otimes W^\dagger+i\kappa(\tau_3+i\tau_1)\otimes X^\dagger\otimes W\right]\\ =&\ {\det}^{-1/2}\left[\begin{array}{cc} \displaystyle\frac{N}{2}\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N/2}\otimes (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{\nu/2}-i\widetilde{P}) & 2i\kappa X^\dagger \otimes W \\ 2i\kappa X\otimes W^\dagger & \displaystyle\frac{N}{2}\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{N/2}\otimes (\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_{\nu/2}-i\widetilde{P}) \end{array}\right], \end{split} \end{equation} with $\tau_j$ the three Pauli matrices. The second line is obtained after decomposing $\widetilde{V}_1$ into real and imaginary part and the third line can be found by performing a rotation with $\exp[i\pi(\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}_2-\tau_3)/4]\exp[i \pi \tau_2/4]$. The saddle point expansion can be achieved by rescaling $\widetilde{P}\to \widetilde{P}/\sqrt{\gamma N}$ and the Taylor expansion of the determinant works along Equation \eqref{calc:chi.3}. We hereby again find the Gaussian distribution \begin{equation}\label{result:BdG} \begin{split} \lim_{N\to\infty}p(S')=& \frac{\exp[-\Tr {S'}^2]}{\int_{\mathcal{H}_\nu}d\bar{S}\exp[- \Tr \bar{S}^2]}, \end{split} \end{equation} which implies that $\alpha S_3$ is a Gaussian random matrix with standard deviation $\alpha\sqrt{\Tr(S^{(N)})^2/(2N^2)}$ in the limit $N\to\infty$. \section{Scaling and Application}\label{Sec:Applications} Let us analyse the scaling behaviour of the spectra in more detail. As mentioned above, the smallest eigenvalue of $A^{(N)}$ is typically on the scale $N^{-1}$. We may therefore zoom in on the microscopic spectrum around the origin if we consider rescaled eigenvalues \begin{eqnarray} x = N \lambda\ ,\label{Eq:EigRescale} \end{eqnarray} where $\lambda$ are the eigenvalues of $K^{(N)}$, in the limit $N\to \infty$. Following \eqref{heuristic:alpha.4}, the width of the former zero eigenvalues is $\alpha\sqrt{\Tr S^2}/N$ and the smallest eigenvalues of A are $1/N$. Rescaling of the eigenvalues according to \eqref{Eq:EigRescale} yields a broadening of $\alpha\sqrt{\Tr S^2}$. Assuming $\Tr S^2\sim N$ and fixed $\alpha$, the width of the rescaled broadened zero modes scale as $\sqrt{N}$. We will demonstrate how this different scaling can be used as an experimental identifier of topological modes. We also illustrate this in Figure \ref{Fig:Scaling} (a). \begin{figure} \hspace{-0.39\linewidth} \textbf{(a)}\hspace{0.47\linewidth} \textbf{(b)}\hfill\\ \centering \includegraphics[width=0.49\linewidth,angle=0]{ScalingComparison.pdf} \includegraphics[width=0.49\linewidth,angle=0]{Ensemble3_n_33_nu_3_Nmatrices_1000000_a_10promille.pdf} \caption{ \textbf{(a)} Identification of former topological modes: A comparison of the ratio between the width of the smallest eigenvalue and the position of the second smallest eigenvalue as a function of the matrix size $N$ for {\it Ensemble 1}\ ($\nu=1$) and {\it Ensemble 2}\ ($\nu=0$) in Section \ref{Sec:Example}. We have normalised the mean of each curve. The coupling constant is set to $\alpha= 0.01 \sqrt{\Tr A^{-2}}||S||_{\rm op}/\sqrt{N}$ according to \eqref{Eq:strength}. The ensemble size is $10^{5}$. \textbf{(b)} The density of the smallest eigenvalues for {\it Ensemble 4}\ with $n = 33$ and $\nu=3$ from Section \ref{Sec:Example}. The Monte Carlo simulation (blue error bars, $10^{6}$ matrices generated) and the theoretical distribution of the GUE of size $3\times 3$ (red solid curve) are compared, see \eqref{Eq:rhoGUE}. } \label{Fig:Scaling} \end{figure} \subsection{Application to Experiments}\label{Sec:ApplicationsExp} We wish to relate the scaling with $N$ to physical quantities. We here use a result from the $\epsilon$-regime of effective field theory, namely that the size of the matrix scales linearly with the volume of the system. We refer to \cite{RMT_2_EFT-1,RMT_2_EFT-2} for the full derivation, but the general idea is to calculate the non-linear $\sigma$-model (or chiral Lagrangian) of the random matrix model, which for all classes has the form \begin{eqnarray} S &=& \int d^4x\left[\Tr \left(\partial_\mu U\partial^\mu U^{-1}\right)+\Tr M(U+U^{-1})\right] . \end{eqnarray} The exact nature of the Goldstone field $U$ will depend on the class. As we consider the low-energy modes around the origin, where dynamics are frozen out \cite{DOTV,GasserLeutwylerThermo,GasserLeutwylerSym}, the potential term becomes the most important. Constructing the Lagrangian directly from the matrix model leads to the identification $V\sim N$. This means that under the above assumptions, the width of the broadened modes scale as $\sqrt{V}$. The proposed identifier is therefore the ratio $\sigma_0/\mu_1$, where $\sigma_0$ is the width of the ground state distribution, and $\mu_1$ is the mean position of the first excited state. If this scales significantly different from 1, it is safe to conclude a system with a broadened zero mode. This scaling is also found in the literature of lattice QCD and has helped to explain the unusual behaviour observed in lattice simulations \cite{DSV,ADSV}. \subsection{Example Ensembles}\label{Sec:Example} For the numerical checks, we compare the following four ensembles. We first draw a fixed $A^{(N)}$ and $S^{(N)}$ and then we average over $U$ for the Hamiltonian $K^{(N)}=A^{(N)}+\alpha US^{(N)}U^\dagger$. {\it Ensemble 1}\textit{:} To illustrate a particular condensed matter application we consider a direct sum of two antisymmetric matrices that are the same up to a sign, corresponding to particle-hole-symmetry \cite{Chiu,BeenakkerRMT,Neven}. This ensemble is perturbed by off-diagonal blocks in order to model topological superconductors carrying Majorana modes. The ensemble has the form \begin{eqnarray}\label{Eq:EnsAntiRand} K^{(N)} &=& \left(\begin{matrix} iM & 0\\ 0 & -iM \end{matrix}\right) + \alpha O\left(\begin{matrix} 0 & iW\\ -iW^T & 0 \end{matrix}\right)O^T\ ,\ M = -M^T\ . \end{eqnarray} The matrices $M$ and $W$ are real and of dimension $2n+\nu$, and $M$ is antisymmetric. So for $\alpha=0$ and $\nu = 1$ the model exhibits two generic zero modes. The matrices are generated once via i.i.d.~entries uniform on the interval $[-1,1]$ and then kept fixed. The ensemble average is only done via the orthogonal matrix $O$. The full matrix $K^{(N)}$ is of size $N = 4n+2\nu$ and imaginary antisymmetric, and for $\alpha>0$ no exact modes are present. For $\nu=1$ the two zero modes are broadened by the coupling. They form a $2\times 2$ imaginary antisymmetric Gaussian ensemble. {\it Ensemble 2}\textit{:} To illustrate the different scalings of broadened zero eigenvalues and bulk eigenvalues, we also consider an ensemble for comparison of the form \begin{eqnarray}\label{Eq:EnsAntiNone} K^{(N)} = iA^{(N)} + i\alpha OS^{(N)}O^T\ ,\ K^{(N)} = {K^{(N)}}^\dagger = -{K^{(N)}}^T \end{eqnarray} with matrix size $N=2n$ and no further substructure. This ensemble never has exact zero modes in contrast to the models covered by our discussion. We again draw all matrix entries of $A$ and $S$ i.i.d.~once, uniformly from the interval $[-1,1]$. Afterwards we keep them fixed and average over the orthogonal matrices $O$ only. \begin{figure} \hspace{-0.39\linewidth} \textbf{(a)}\hspace{0.47\linewidth} \textbf{(b)}\hfill\\ \includegraphics[width=0.49\linewidth,angle=0]{UnitaryEnsemble_Nmatrices_100000_a_10promille_Ensemble1.pdf} \includegraphics[width=0.49\linewidth,angle=0]{UnitaryEnsemble_Nmatrices_100000_a_10promille_Ensemble2.pdf} \caption{ The microscopic density for Monte Carlo simulations of an ensemble with a single topological mode and one without (see \ref{Eq:EnsAntiRand} and \ref{Eq:EnsAntiNone}) for different matrix sizes. Here we have also averaged over the spectrum for visual clarity. The eigenvalues have been rescaled according to \eqref{Eq:EigRescale} to keep the distance between the smallest eigenvalues of the order $1$. We compare the difference between a topological and a non-topological mode. We see the former topological mode broaden with $N$. The ensemble size is $10^{5}$ and the bin size is roughly $0.2$ for (a) plot and $0.1$ for (b). The density in (a) is shown on logarithmic scale to keep both peaks visible in the same plot, but a zoom-in is provided. } \label{Fig:Density} \end{figure} In Figure \ref{Fig:Density} we compare the microscopic densities about the origin for both \textit{Ensembles 1} and \textit{2}. In both plots we have rescaled the eigenvalues according to \eqref{Eq:EigRescale} to keep the mean inter-eigenvalue distance of order 1. We have also averaged over the spectrum of $A$ and $S$, which was not the case in Figure \ref{Fig:Scaling} (a). This is done to increase the contrast of the scaling of the eigenvalues with the volume $V$ represented by $N$. As predicted in Section \ref{Sec:ApplicationsExp}, the perturbed zero mode in {\it Ensemble 1}\ changes with the volume in the rescaled variables, whereas the same does not happen for the smallest eigenvalue in {\it Ensemble 2}. However, averaging over the spectrum is not necessary as we show in Figure \ref{Fig:Scaling} (a), where we plot the ratio $\sigma_0/\mu_1$ as a function of the matrix size $N$. We suggest this quantity as an identifier for topological or other system specific zero modes. We rescale $\alpha ||S||_{\rm op}\sqrt{\Tr A^{-2}}/\sqrt{N}\to \alpha$ to keep the coupling constant on the same scale for all matrix sizes, see \eqref{Eq:strength}. As we do not average over the spectrum, the variance of the individual modes partially obscures the scaling, but it is still visible. If an average over the spectrum is also performed, the difference becomes even clearer, cf. Figure \ref{Fig:Density}. {\it Ensemble 3}\textit{:} To illustrate that degeneracy of the perturbation is irrelevant as long as it satisfies the conditions (\ref{Eq:CondTrace0}-\ref{Eq:strength}), we consider an ensemble very similar to {\it Ensemble 1}, except that the perturbation is proportional to the second Pauli matrix. That is, \begin{eqnarray}\label{Eq:EnsAntiGam} K^{(N)} &=& \left(\begin{matrix} iM_1 & 0\\ 0 & iM_2 \end{matrix}\right) + i\alpha O\left(\begin{matrix} 0 & \leavevmode\hbox{\small1\kern-3.8pt\normalsize1}\\ -\leavevmode\hbox{\small1\kern-3.8pt\normalsize1} & 0 \end{matrix}\right)O^T\ ,\\ && M_1 = -{M_1}^T\ ,\ M_2 = -{M_2}^T\ .\nonumber \end{eqnarray} $M_1$ and $M_2$ are real antisymmetric, but independent as the eigenvalues would otherwise be shifted rather than perturbed. These are chosen fixed with i.i.d.~entries on the interval $[-1,1]$ while the average is over the orthogonal matrix $O$. With this ensemble we would like to emphasise the generality of the conditions (\ref{Eq:CondTrace0}-\ref{Eq:strength}). That is, the matrix Central Limit Theorem stated above describes the limit for a broad class of ensembles. This similarity is illustrated in Figure \ref{Fig:Compare} where we compare Monte Carlo simulations to the corresponding theoretical curves derived in Section \ref{Sec:Universality}. \begin{figure} \hspace{-0.39\linewidth} \textbf{(a)}\hspace{0.47\linewidth} \textbf{(b)}\hfill\\ \centering \includegraphics[width=0.49\linewidth,angle=0]{Ensemble1_n_33_nu_1_Nmatrices_1000000_a_10promille.pdf} \includegraphics[width=0.49\linewidth,angle=0]{Ensemble4_n_33_nu_1_Nmatrices_1000000_a_10promille.pdf} \caption{ Distribution of the two smallest eigenvalues of {\it Ensemble 1}\ (a) and {\it Ensemble 3}\ (b) in Section \ref{Sec:Example}. In both ensembles the unperturbed Hamiltonian $A$ is imaginary, antisymmetric and block-diagonal of dimension $N=134$ so that it has two zero eigenvalues. The perturbation $S$ is a full generic imaginary matrix $i \alpha W$ ({\it Ensemble 1}) on the off-diagonal block and a constant matrix $i\alpha \leavevmode\hbox{\small1\kern-3.8pt\normalsize1}$ ({\it Ensemble 3}) with $\alpha=0.01$. The Monte Carlo simulations (blue error bars, $10^{6}$ matrices generated) are compared with our theoretical RMT predictions that are Gaussian distributions with the correct variances derived in Section \ref{Sec:Universality} (red solid curves). } \label{Fig:Compare} \end{figure} {\it Ensemble 4}\textit{:} As an application to QCD, more precisely lattice QCD, where chirality is broken by a perturbation \cite{DWW2011,DHS2012,KieburgWilson,DSV,ADSV,MarioJacWilson}, we consider the following model \begin{eqnarray}\label{Eq:EnsCh} K^{(N)} &=& \left(\begin{matrix} 0 & M\\ M^\dagger & 0 \end{matrix}\right) + \alpha USU^\dagger\ . \end{eqnarray} $M$ is a complex $(n+\nu)\times n$ matrix with no further symmetries, $S$ is a complex hermitian matrix, and $U$ is unitary and Haar-distributed. As before the only average we perform is over $U$. The index $\nu$ determines the number of exact zero modes, which allows us to have any number of broadened modes, unlike the antisymmetric ensembles. The $\nu$ zero modes from the chiral ensemble are all broadened by the perturbation, which is hermitian and has no further symmetry. This means that the former zero modes are distributed according to a Gaussian unitary ensemble of size $\nu\times \nu$ \cite{Mehta} \begin{eqnarray}\label{Eq:rhoGUE} \rho^\nu_{\rm GUE}(\lambda) &=& \frac{1}{2\sigma}\sum_{j=0}^{\nu-1} \varphi_j\left(\frac{\lambda}{\sigma}\right)^2\ ,\\ \varphi_j(\lambda) &=& \frac{1}{\sqrt{2^j j! \sqrt{\pi}}} e^{-\lambda^2/2} H_j(\lambda)\nonumber \end{eqnarray} with $\sigma = \alpha\sqrt{\Tr (S^{(N)})^2/(\gamma N^2)}$ the Hermite polynomials corresponding to the weight $e^{-\lambda^2}$. In Figure \ref{Fig:Scaling} (b) we compare the broadening of this ensemble to the theoretical prediction with the width found in Section \ref{Sec:CondUn1}. \section{Conclusion} \label{Sec:Conclusion} We have presented a general mechanism explaining the observation of the universal broadening of degenerate eigenvalues inside a spectral gap when a generic perturbation is switched on. This universality states that the broadening follows the statistics of a finite-dimensional Gaussian random matrix ensemble. Exactly the finite dimensionality is surprising because one usually expects that spectral universality only holds in the limit of large matrix dimensions. This new universality relies on a self-average of the change of basis $U_2=\{\langle\psi_j|\phi_l\rangle\}_{j,l= N - \nu + 1,\dots,N}$ between the unperturbed operator $A$ and the perturbation $S$ associated with the zero modes of $A$. In the present work, we have averaged over all bases transformations $U_2$ drawn from the Haar measure of the group associated to the respective symmetry class. Yet lattice simulations in QCD~\cite{DelDebbio:2005qa,DWW2011,DHS2012,CGRSZ} strongly suggest that the measure can be relaxed to something non-uniform. As a further study it is natural to investigate what happens if the assumption of an average over the full Haar measure is loosened. In our analysis, we quantified the conditions under which this universal broadening holds. The three conditions~(\ref{Eq:CondTrace0}-\ref{Eq:strength}) are rather mild and have very natural physical interpretations like the relation between closing of the spectral gap and the coupling strength $\alpha$. Especially, we recover the critical scaling of $\alpha$ found in lattice QCD with Wilson fermions~\cite{DelDebbio:2005qa,DWW2011,DHS2012,CGRSZ} and in the RMT-models for Majorana modes in disordered quantum wires~\cite{AKMV,KimAdam}. As a possible application we have suggested that our results may be used to distinguish topological modes in the bulk from modes in the bulk. The scaling behaviour in the system size and the coupling parameter $\alpha$ of the broadening for the eigenvalues of the two kind of modes is completely different. Consequently, this scaling might provide an ideal indicator of experiments. {\it Acknowledgements:} We would like to thank J.~J.~M.~Verbaarschot and G.~Akemann for interesting discussions on the subject. The first idea for the symmetry breaking in topological superconductors was conceived in collaboration with P.~H.~Damgaard, K.~Flensberg, and E.~B.~Hansen. K.~S.~would like to thank A. Altland for discussions. Support by the German research council (DFG) through CRC 1283: ``Taming uncertainty and profiting from randomness and low regularity in analysis, stochastics and their applications" (M.~K.) and International Research Training Group 2235 Bielefeld-Seoul "Searching for the regular in the irregular: Analysis of singular and random systems" (A.~M.) is kindly acknowledged. A.~M.~would also like to thank Stony Brook University for their hospitality in October 2017 and "Bielefeld Graduate School in Theoretical Sciences Mobility Grant" for funding the stay. {\it E-mail address:} \noindent M.~Kieburg: \url{<EMAIL>}\\ A.~Mielke: \url{<EMAIL>}\\ K.~Splittorff: \url{<EMAIL>}
\section{Introduction} Often the classification decision of a deep neural network (DNN) is hard to interpret, hindering its practical employment in critical applications such as health-care. An explanation can help an end-user to establish trust or help a machine-learning practitioner to understand or debug deep models. We distinguish between two types of explanations: post-hoc rationalizations and introspections. The former is generated by a second neural network that justifies the output of the decision maker, e.g., a language model explaining the classification decision of a vision model by mentioning discriminative features of the object~\cite{hendricks2016generating,hendricks2018grounding}. Post-hoc rationales help the end user to understand the model by generating explanations in a way similar to how humans justify behaviors/decisions of each other, e.g., ``The car is accelerating because there are no other car in its lane''~\cite{KRDCA18}. On the other hand, introspections may reveal the internal thought process of the decision maker to help a machine learning practicioner to understand of the model, e.g., by visualizing features~\cite{Springenberg14, Zhou16, Selvaraju17, Srinivas19}, saliency maps~\cite{Simonyan13, PetsiukDS18}, interpretable features~\cite{adel18}, and modular networks~\cite{andreas2016NeuralMN}. In this work, we combine both of these traits in a single model. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{images/XOC_teaser.pdf} \caption{Our explainable decision tree model is composed of two agents. The \textit{decision-tree classifier} (blue) asks questions that expect a yes/no answer from the \textit{binary-attribute observer} (red). At every step, the classifier uses the binary response to update its class prediction. The thought process resembles a binary decision tree.} \label{fig:modelTeaser} \end{figure} We propose to formulate the classification task as a communication protocol between two agents. Our Explainable Observer-Classifier (XOC) framework exposes a decision path in the form of an explainable decision tree by breaking down the decision process into many small decisions (see Figure~\ref{fig:modelTeaser}). Our setup consists of a decision-tree classifier (blue) agent and a binary-attribute observer (red) agent. The blue agent does not have access to any image information, but instead has to infer the image class by asking binary questions about the image. The red agent tries to answer these questions with yes/no by looking at the image. This process is repeated until the classifier reaches a decision about the image class. For instance in Figure~\ref{fig:modelTeaser}, by asking if the object is furry and receiving the answer ``yes'', the classifier learns that the object is an animal rather than a vehicle. The second question -- ``does it have whiskers?'' -- then allows the classifier to discriminate between the remaining two classes (cat and dog) to conclude that the object is a dog. The introspective explanations correspond to the binary subdecisions that form an interpretable decision tree whereas the post-hoc rationales are obtained by conditioning the binary answers to a set of human-interpretable class-attributes, giving the communication a semantic meaning. Our contributions are: 1) We propose to integrate introspection and post-hoc explanations into a single framework where two agents collaboratively solve an image-classification task via explainable binary decisions. 2) We showcase on six datasets that our model outperforms classic decision trees and qualitatively demonstrate that our model learns attributes that lead to explainable decision chains. 3) We propose zero-shot learning as a testbed for interpretability and show that our learned attributes outperform semantic embeddings extracted from Wikipedia. \section{Related Work} We review prior work on deep learning with decision trees, multi-agent communication, and interpretable machine learning related to ours. \myparagraph{Decision Trees with Neural Networks.} Adaptive Neural Trees~\cite{Tanno18} directly model the neural network as a decision tree, where each node and edge correspond to one or more modules of the network. Our model is self-adapting by using a recurrent network in the classifier that can be easily rolled out to a greater depth without changing the architecture or number of weights. The prior work closest to ours is the Deep Neural Decision Forest (dNDF)~\cite{KontschiederFCB16}, which first uses a CNN to determine the routing probabilities on each node and then combines nodes to an ensemble of decision trees that jointly make the prediction. Our method differs in that we focus on explainability by explicitly only considering a hard binary decision at each node while dNDF uses soft decisions, making a large portion of the tree responsible for the predictions, and, thus, it is harder to interpret. \myparagraph{Multi-Agent Communication.} Learning to communicate in a multi-agent setting has gained interest with the emergence of deep reinforcement learning \cite{FoersterAFW16, HavrylovT17, LazaridouHTC18, CaoLLLTC18, JiangL18, DasGRBPRP19, Corona19}. For instance, image reference games are used to study the emergence of language~\cite{LazaridouHTC18} and how agents can learn to communicate more effectively even when concepts are being misunderstood~\cite{Corona19}. Most related to our work, \cite{FoersterAFW16} propose the use of an agent that composes a message of categorical symbols and another agent that uses the information in these messages to solve a referential game. For discrete symbols, they also rely on the Gumbel-softmax estimator, but, in contrast to our model, the focus is not on explainability, i.e., it does not allow the fine-grained introspection. \myparagraph{Explainability.} The importance of explanations for an end-user has been studied from the psychological perspective~\cite{lombrozo2012, Miller19}, showing that humans use explanations as a guidance for learning and understanding by building inferences and seeking propositions or judgments that enrich their prior knowledge about the goal in question. Explainability has been recently growing as a field in computer vision and machine learning~\cite{hendricks2016generating, park2018multimodal, andreas2016NeuralMN, zintgraf2017visualizing}. Textual explanations are explored by \cite{hendricks2016generating} where the task is to generate sentences that realize class specificity and image relevance. \cite{andreas2016NeuralMN} compose collections of jointly trained neural modules into deep networks for question answering by decomposing the questions into their linguistic substructures and using these structures to dynamically instantiate modular networks with reusable components. As for visual explanations, \cite{zintgraf2017visualizing} propose to apply a prediction-difference analysis to a specific input. \cite{park2018multimodal} utilize a visual-attention module that justifies the predictions of deep networks. Grad-CAM~\cite{Selvaraju17} uses the gradients of any target concept to produce a localization map highlighting the important regions in the image that lead to the prediction based on an intermediate network layer. FullGrad~\cite{Srinivas19} combines importance scores of both the intermediate feature maps and the input to capture both local and global relevance with respect to the network's output. Interpretable CNNs~\cite{Zhang17} modify the convolutional layer, such that each filter map corresponds to an object part in the image, and a follow-up work~\cite{Zhang18} uses a classical decision tree to explain the predictions based on the learned object-part filters. \cite{ChattopadhyayMS19} establishes the connection between causality and network attribution and \cite{Schwab19} propose a model agnostic way of training a causal explanation model that interprets a given predictive model. Following the convention of~\cite{park2018multimodal}, our model combines introspective explanations where a deep network as the decision maker is trained to explain its own decision with post-hoc rationalizations which is useful in increasing trust for the end user in a single framework. \begin{figure*}[t] \centering \includegraphics[width=\linewidth]{images/binary_decision_blocks_XOC_cvpr.pdf} \caption{XOC Model. A single communication step is shown. The \textit{decision-tree classifier} uses the hidden state \(h_{t-1}\) of its LSTM (yellow) to choose a single attribute \(a_{c_t}\) through its \(f_{\text{QuestMLP}}\). The classifier requests from the observer whether the attribute is present or absent in the image. The \textit{binary-attribute observer} uses its \(f_{\text{AttrMLP}}\) to decide about the presence/absence of attributes in the image using CNN features \(z\). As a binary response the observer returns its prediction \(d_t = \boldsymbol{\hat{a}}_{c_t}\). Finally, the classifier updates its state \(h_{t}\) with the binary response to improve its classification prediction \(\hat{y}_t\).} \label{fig:schemaAttribute} \end{figure*} \section{Explainable Observer-Classifier (XOC)} \label{sec:model} Our XOC model is set up as a sequential interaction between two agents to solve an image-classification task through communication. Having two different agents insures the two types of explanations that our framework provides. The classifier's decision tree allows introspection while the observer's predicted attributes provide rationales to make the communication human-understandable. In the following, we first explain how the observer-classifier communication is achieved and then detail the two agents in our XOC framework, i.e., the decision tree classifier and the binary attribute observer. \subsection{Observer-Classifier Communication} For any single image, our classifier starts with no prior knowledge. It sends a query message \(c_t\) to the observer requesting information about the image \(x\) or pre-extracted image features \(z\). The observer answers the query \(c_t\) in regard to the image \(x\) with a binary response \(d_t \in \{0, 1\}\). The classifier uses \(d_t\) to update its belief on the class \(y\) that the image belongs to. This constitutes one iteration \(t\) of the observer-classifier communication. The interaction repeats until a maximum number of steps is reached or until the classifier is confident in its decision. The objective of the two agents is to jointly learn to communicate the most important bit of information about the image at each time step, such that the classifier's label prediction improves. \myparagraph{Communication Protocol.} Each word in the vocabulary corresponds to a binary attribute \(a \in A\) that the observer predicts about a given image. The observer can learn to attach a human-understandable meaning to the words when annotated attribute data is available. This vocabulary is usually different for each dataset, but otherwise remains fixed. At each communication step \(t\), the classifier chooses one attribute \(a_{c_t}\) from the vocabulary, identified by its index \(c_t\), and requests the presence or absence of this attribute in the image. The observer then provides this binary information \(d_t\) based on its own prediction. We deliberately limit the observer's messages to be binary as for humans, clear yes/no answers are easier to interpret than probability values. \myparagraph{Discrete Messages.} Both the classifier and the observer communicate with discrete messages. The classifier indicates the attribute whose presence/absence is desired via the attribute index \(c_t\) and the observer produces the binary response \(d_t\). We need to ensure that \(c_t\) and \(d_t\) are discrete signals, while at the same time being differentiable to train the model end-to-end. The Gumbel-softmax estimator~\cite{JangGP16, MaddisonMT16} allows to sample from a discrete categorical distribution via the reparameterization trick~\cite{kingma2014, rezendeMW14} to obtain the gradients of this sampling process. To get a discrete sample with the Gumbel-softmax estimator, we sample \(g_i\) from a \(\textrm{Gumbel}\) distribution and then compute a continuous relaxation of the categorical distribution \begin{equation} \text{GumbelSoftmax}(\log \boldsymbol{\pi})_i = \frac{\exp((\log \pi_i + g_i)/\tau)}{\sum_{j=1}^K\exp((\log \pi_j + g_j)/\tau)} \end{equation} where \(\log \pi\) are the unnormalized log-probabilities of the categorical distribution and \(\tau\) is the temperature that parameterizes the discrete approximation. When \(\tau\) approaches 0, the output becomes a one-hot vector (binary when \(K=2\)) and otherwise, it is a continuous signal. Popular training strategies include annealing the parameter \(\tau\) over time or augmenting the Gumbel-softmax with an \(\arg \max\) function that discretizes the activation in the forward pass and a straight-through identity function in the backward pass. We resort to the second strategy as it guarantees the communication signals to always be discrete during training. \subsection{Decision-Tree Classifier} The main output of the classifier is the classification decision. The decision tree is a byproduct obtained by restricting the observer's response to be binary. Since the classifier only takes discrete inputs, we can map out all possible binary sequence paths up to a desired length at test time, which provides us with a binary tree structure. We construct the classifier as an LSTM~\cite{Hochreiter97} and a question-decoder module, \emph{Question MLP} (see Figure~\ref{fig:schemaAttribute}). The LSTM contains a hidden state \(h_t\) that encodes both the information the classifier gathers about the image and the question the classifier wants to pose to the observer. To decide which attribute information to request, the classifier uses \(f_{\text{QuestMLP}}\) decoding the last hidden state \(h_{t-1}\) into a categorical distribution \begin{equation} \log p(c_t|h_{t-1}) = f_{\text{QuestMLP}}(h_{t-1}) \end{equation} where \(p(c_t|h_{t-1})\) indicates the likelihood of requesting a particular attribute from the observer. We denote the attribute index \(c_t \in \{1, \dots, |A|\}\) as a sample from \(p(c_t|h_{t-1})\) obtained by applying the Gumbel-softmax estimator \begin{align} c_t &= \text{GumbelSoftmax}(f_{\text{QuestMLP}}(h_{t-1})). \end{align} Hence, \(c_t\) becomes a scalar index communicated to the observer, which, in return, responds whether the attribute with that index is present or absent in the image. After each iteration of the communication loop, the classifier updates its hidden state with the new information from the observer's binary response \(d_{t}\) to update its internal state \begin{equation} h_{t} = \text{LSTM}(h_{t-1}, d_t). \end{equation} Apart from generating the question, the hidden state \(h_t\) is also used to predict the class label \begin{equation} \hat{y}_t = \text{softmax}(W h_t + b) \end{equation} optimized with parameters \(W\) and \(b\). Since the primary objective of the classifier is to maximize the classification performance, we minimize the cross-entropy loss of the predicted class probabilities \(\hat{y}_t\) and the true class probabilities \(y\): \begin{equation} \mathcal{L} = \frac{1}{T} \sum_{t=1}^{T} \mathcal{L}_{CE}(y, \hat{y}_t) = - \frac{1}{T} \sum_{t=1}^{T} \sum_i y_i \log\hat{y}_{t,i}. \label{eq:clsloss} \end{equation} By averaging the cross-entropy loss over all \(T\) time steps, we encourage the model to predict the correct class in as few communication steps as possible. \subsection{Binary Attribute Observer} \label{sec:bin} The observer converts the binary responses of the classifier to human interpretable attributes via an attribute-prediction module, \emph{Attribute MLP} (see Figure~\ref{fig:schemaAttribute}) by predicting a set of learned binary attributes \(\boldsymbol{\hat{a}}\) about the image, independent of the classifier's query. To do this, the observer feeds its CNN image features \(z\) to \(f_{\text{AttrMLP}}\) that models a probability distribution over a set of learned binary attributes \begin{equation} \log p(\boldsymbol{\hat{a}}|z) = f_{\text{AttrMLP}}(z). \end{equation} By applying the Gumbel softmax estimator, we obtain binary attributes \(\boldsymbol{\hat{a}} \in \{0, 1\}^{|A|}\), an instantiation of \(p(\boldsymbol{\hat{a}}|z)\): \begin{align} \boldsymbol{\hat{a}} &= \text{GumbelSoftmax}(f_{\text{AttrMLP}}(z)). \end{align} The predicted attributes \(\boldsymbol{\hat{a}}\) are either discovered end-to-end with a classification loss as formulated in Equation~\ref{eq:clsloss} or they correspond to human-interpretable concepts formalized by the attribute loss as in Equation~\ref{eq:attrloss}. Whenever the classifier requests a particular attribute with its query \(c_t\), the observer simply returns the binarized attribute of the specified index to the observer. We denote this selection operation as $ d_t = \boldsymbol{\hat{a}}_{c_t}$. \myparagraph{Attribute Loss.} Minimizing the classification loss at each time step is equivalent to finding the binary split of the data that reduces the class-distribution entropy the most. In this regard, it is similar to what is usually referred to as information gain in classical decision trees. However, a split that best separates the data is not always easy to interpret, especially when the features used to do this split result from a non-linear transformation such as, in our case, with the perception CNN. We propose to learn attributes \(\boldsymbol{\hat{a}}\) that align with class-level human-annotated attributes \(\alpha\), and thus, making them interpretable. A second cross-entropy term encourages this correspondence: \begin{equation} \mathcal{L} = \frac{1}{T} \sum_{t=1}^T \Big[\mathcal{L}_{CE}(y, \hat{y}_t) + \lambda \mathcal{L}_{CE}(\alpha_{y,c_t}, \boldsymbol{\hat{a}}_{c_t})\Big] \label{eq:attrloss} \end{equation} weighted by a hyperparameter \(\lambda\). Here, \(\alpha_{y,c_t}\) corresponds to the ground-truth attribute label of class \(y\) that matches the observer's response \(\boldsymbol{\hat{a}}_{c_t}\). The final loss ($\mathcal{L}$) encourages the network to learn attributes that agree with human-annotated attributes while optimizing for classification accuracy. Note that the attribute loss is only imposed on those attributes employed by the model. If an attribute is deemed to not be useful, e.g., if an attribute is weak or hard to predict, the classifier can learn to ignore requesting that attribute. In that case, the attribute loss is not applied on that attribute, focusing the observer's training signal on predicting informative attributes. When $\lambda > 0$, our model learns to use ground-truth attributes in order to give the binary splits a semantic meaning. In this case, we can translate the communication into natural language. For instance, the classifier's question for attribute with index \(c_t\) can be interpreted as ``does it have whiskers?'' when \(a_{c_t}\) corresponds to attribute ``has whiskers''. When $\lambda = 0$, our model does not use any human-annotated attributes and automatically discovers attributes with no additional supervision. Either of these settings may be desirable given the application as we empirically show in the following section. \section{Experiments} { \setlength{\tabcolsep}{3pt} \renewcommand{\arraystretch}{1.4} \begin{table} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{l |c c c c c c} & AWA2 & CUB & aPY & MNIST & CIFAR-10 & ImageNet \\ \hline Attributes & \multicolumn{3}{c|}{available} & \multicolumn{3}{c}{not available}\\ \hline \# of images & 37K & 11K & 15K & 70K & 60K & 1.2M\\ \# of classes & 50 & 200 & 24 & 10 & 10 & 1K\\ \hline Dataset size & \multicolumn{2}{c|}{medium} & \multicolumn{3}{c|}{small} & large \\ \hline Difficulty & \multicolumn{1}{c|}{coarse} & \multicolumn{1}{c|}{fine} & \multicolumn{3}{c|}{coarse} & fine \end{tabular} } \caption{A summary of the datasets in terms of the availability of attributes, number of images/classes, dataset size (medium, small, and large-scale) and difficulty (coarse-grained and fine-grained)} \label{tab:datasets} \end{table} } In this section, we describe our experimental setup, provide quantitative and qualitative results demonstrating the performance of our model, and evaluate our learned attributes in zero-shot learning. \subsection{Experimental Setup} \myparagraph{Datasets and attributes.} We experiment on six datasets (see Table~\ref{tab:datasets} for a summary of dataset statistics). The small-scale MNIST~\cite{mnist98} consists of 60K/10K training/test examples from 10 handwritten digits and CIFAR-10~\cite{Krizhevsky09learningmultiple} contains 50K/10K training/test examples from 10 classes whereas the large-scale ImageNet~\cite{ILSVRC15} contains 1.2 million high-resolution images from 1000 categories. We validate our model on classification accuracy on MNIST, CIFAR-10, and ImageNet as human-annotated attributes are not available. AWA2~\cite{Lampert14}, CUB~\cite{WahCUB_200_2011}, aPY~\cite{Farhadi09} are three benchmark attribute datasets proposed by the computer vision community. AWA2 comprises $37,322$ images from 50 animal classes annotated with 85 attributes, e.g., furry, red, etc., while CUB contains $11,788$ images from 200 different bird species with 312 attributes, and aPY contains $15,339$ images from 32 classes with 64 attributes. Our XOC with the attribute loss requires ground-truth attributes. The attributes are collected manually by asking the relevance of an attribute for each class to experts. Since our model does not consider splits on soft probabilities but rather on hard binary decisions, it is beneficial to have binary attribute data. We binarize the attributes on all datasets with a threshold at 0.5, i.e., an attribute is present if more than 50\% of the annotations agree. \myparagraph{Experimental setting.} Unless it is stated explicitly, for all experiments across the datasets we randomly assign 20\% of each class as test data for image classification when an official classification test set is not provided. We randomly split 10\% of the training data as a validation set to tune hyperparameters. The MLPs consist of two layers with a ReLU non-linearity in between. It is beneficial to learn the temperature hyper-parameter \(\tau\) of the Gumbel-softmax estimator jointly with the network so we only choose an initial value for \(\tau\). During training, we always roll out the decision sequence to a maximum number of steps and during testing we stop as soon as the classifier reaches a confidence level specified by a \textit{threshold} parameter (or once the maximum number of decisions is reached, whatever happens first). We run all experiments 5 times and report the mean and standard deviation of the performance measures, e.g., classification accuracy. Values for all hyperparameters can be found in the supplementary material. { \setlength{\tabcolsep}{5pt} \renewcommand{\arraystretch}{1.2} \begin{table*}[t] \centering \begin{tabular}{l l l l l l l} Model & AWA2 & aPY & CUB & MNIST & CIFAR-10 & ImageNet\\ \midrule DT (baseline) & 78.03 \(\pm\) 0.39 & 64.29 \(\pm\) 0.64 & 19.33 \(\pm\) 0.29 & 93.08 \(\pm\) 0.22 & 92.46 \(\pm\) 0.18 & 55.21 \(\pm\) 1.03\\ IOC (ours) & \textbf{95.34} \(\pm\) 0.19 & \textbf{82.59} \(\pm\) 0.81 & \textbf{70.55} \(\pm\) 0.38 & \textbf{99.06} \(\pm\) 0.10 & \textbf{93.12} \(\pm\) 0.32 & \textbf{60.77} \(\pm\) 3.58 \vspace{0.12cm}\\ XDT (baseline) & 73.92 \(\pm\) 0.93 & 59.90 \(\pm\) 1.45 & 04.87 \(\pm\) 1.31 & N/A & N/A & N/A\\ XOC (ours) & \textbf{89.78} \(\pm\) 2.50 & \textbf{76.69} \(\pm\) 3.95 & \textbf{44.68} \(\pm\) 6.15 & N/A & N/A & N/A \vspace{0.12cm}\\ \end{tabular} \caption{Comparing our model XOC (with attributes) and its ablation IOC (without attributes) to the decision-tree baselines XDT and DT respectively (for XOC, $\lambda=0.25$). MNIST, CIFAR-10 and ImageNet do not have attributes, i.e., XOC and XDT are not applicable. We report the standard deviation over 5 runs. The rationalizations are not available (N/A) for MNIST, CIFAR-10 and ImageNet as these datasets do not have human-annotated attributes. } \label{tab:cls_acc} \end{table*} } \subsection{Baseline and Ablation Study} In this section, we compare our model XOC and its ablation IOC with two classical decision tree baselines XDT and DT as explained below. Note that the image features are extracted from a simple CNN for MNIST, ResNet-18 for CIFAR-10, and ResNet-152 pre-trained on ImageNet and fine-tuned on each of the datasets for AWA2, aPY, CUB and ImageNet. The resulting softmax classifier serves as non-explainable deep neural network that corresponds to the upper bound~\footnote{Note that, the non-explainable state-of-the art for AWA2, aPY, CUB, MNIST, CIFAR-10 and ImageNet is $96.04$\%, $88.78$\%, $80.12$\%, $99.28$\%, $93.02$\%, $73.01$\% respectively.}. After this pretraining, we fix the weights of the perception module and extract the same \(z\) for our explainable and introspective observer-classifier, i.e., XOC and IOC, as well as the explainable and non-explainable decision tree, i.e., XDT and DT. \myparagraph{Our model and ablations.} Our Explainable Observer-Classifier (XOC) model uses the attribute loss to incorporate explainable binary decisions. Hence, this model provides both introspection and rationalization. On the other hand, our Introspective Observer-Classifier (IOC) does not use an attribute loss, and therefore purely optimizes classification performance. Although it does not associate the binary decision with human-interpretable attributes, i.e., no rationalization, this model still provides a tree of the decision process, i.e., introspection. \myparagraph{Baselines.} Our first baseline is the classical decision tree (DT) on top of the same image features \(z\) from the perceptual module. At each time step, the dataset is split using a single dimension of \(z\) until a leaf node only contains samples of the same class or a regularization strategy leads to early stopping. In this case, no semantic meaning is attached to a split in the tree so this model served as a baseline for IOC, only introspection and no rationalization. To be directly comparable with XOC, we incorporate rationalizations into the decision tree baseline and call it the Explainable Decision Tree (XDT) as our second baseline. We give each split a semantic meaning by training a tree on top of predicted attributes. First, we train a MLP on top of the image features \(z\) to predict the binarized class attributes for each image using a binary cross-entropy loss analogously to the attribute loss of our XOC model. Secondly, we fit a decision tree on these predicted attributes for each image to determine the class label. Equivalently to our XOC model, the explainable decision-tree baseline splits on whether an attribute is present or not. For these decision tree baselines, we use the Gini impurity index as splitting criterion because it has a slight computational advantage over entropy-based methods~\cite{Raileanu2004}, such as information gain. We report the outcome with the best validation results after randomized hyperparameter search on regularization parameters, i.e., minimum sample size for splits, minimum reduction in impurity per split. \myparagraph{Results.} From the results in Table~\ref{tab:cls_acc} we observe that our model variants consistently outperform the decision-tree variants across all datasets. On CUB specifically, the classification accuracy of IOC is 3.5 times higher than DT ($70.55$\% vs $19.33$\%) and XOC is 11 times higher than XDT ($44.68$\% vs $4.87$\%). The decisions on fine-grained datasets, e.g. CUB, are extremely challenging to explain because they rely on nuances. As it is hard for non-experts to judge the correctness of the predictions, explanations in this domain are particularly important. ImageNet poses an extreme challenge for being a large-scale dataset that requires significantly bigger trees than the other datasets. As increasing the tree depth simply translates to increasing the number of binary decisions, i.e., time steps of the Observer-Classifier communication, our model scales linearly with the depth of the tree while the number of weights stays constant as opposed to classical decision trees that grow exponentially with the depth of the tree. Hence, in addition to outperforming the decision-tree baseline in terms of accuracy ($60.77$\% vs $55.21$\%), our IOC model scales better with increasing tree size. We also observe a tradeoff between classification accuracy and explainability across all datasets, e.g., classification accuracy decreases with improved explainability. In other words, introspective observer classifier (IOC) without the attribute loss achieves higher accuracy than explainable observer-classifier (XOC) with the attribute loss. Although for the challenging fine-grained dataset CUB the gap is larger, for the coarse-grained attribute datasets such as AWA2 and aPY, the gap reduces as expected. The CUB dataset is more challenging due to its fine grained nature as distinguishing between closely related classes requires a large number of class attributes, which leads to sparse attribute vectors and an imbalanced decision tree. Compared to the Decision Tree baselines of their kind, i.e., IOC vs DT and XOC vs XDT, our model variants achieve significantly higher accuracy across all datasets. By jointly optimizing the classification loss and the attribute loss, our XOC model can choose to ignore attributes that are not suitable for good decision-tree splits since predicting these attribute would only contribute to a larger penalty in the attribute loss. We specifically design the attribute loss, such that it only acts on attributes our XOC model uses. As a side-note, although our introspective model (IOC) works with constrained single-bit communications to improve explainability, it succeeds in maintaining the accuracy of the non-explainable state-of-the-art on the medium or small-scale and coarse-grained datasets such as AWA2 ($95.34$\% vs $96.04$\%), MNIST ($99.06$\% vs $99.28$\%), and CIFAR-10 ($93.12$\% vs $93.02$\%) which is already quite encouraging. \subsection{Agreement with Human-Judgement} { \setlength{\tabcolsep}{5pt} \renewcommand{\arraystretch}{1.2} \begin{table}[t] \centering \resizebox{0.98\columnwidth}{!}{% \begin{tabular}{l l l l} Images & AWA2 & aPY & CUB\\ \midrule Correct & 97.22 \(\pm\) 0.71 & 89.55 \(\pm\) 1.67 & 75.27 \(\pm\) 0.28\\ Incorrect & 83.95 \(\pm\) 1.57 & 74.39 \(\pm\) 3.70 & 71.52 \(\pm\) 2.35\\ All & 96.16 \(\pm\) 0.92 & 84.45 \(\pm\) 0.82 & 72.94 \(\pm\) 0.59 \end{tabular} } \caption{Agreement of XOC attributes with human-labeled attributes. We report the agreement in percent on correctly / incorrectly classified images and their average.} \label{tab:agr} \end{table} } \begin{figure*}[t] \centering \includegraphics[width=\linewidth, trim=0 0 0 0, clip]{images/expl_awa2_tree.pdf} \caption{Learned explainable decisions on AWA2 by our XOC model. We show the decision tree of the most likely path for each class, i.e., introspection, and give each decision a human-understandable meaning, i.e., rationalization. The tree exposes the thought process of our model, e.g., it decides to separate meat-eating animals from all other animals in the first step.} \label{fig:tree_awa2} \end{figure*} The attribute datasets contain the information that for every image a certain attribute is present or absent judged by an expert annotator. Using these expert judgements, we can evaluate our XOC model on how accurate its explainable decisions are. We extract the binary decisions of XOC (with $\lambda=0.25$) on the test set of AWA2, aPY, and CUB and calculate the percentage of how often a predicted attribute of XOC matched the ground-truth human label on a per-image basis. Thus, the agreement for a single image is calculated as \(\frac{1}{T}\sum_t \mathds{1}_{\alpha_{y,c_t}=\boldsymbol{\hat{a}}_{c_t}}\). We report the attribute agreement averaged by the correctly or incorrectly classified images and all images in Table~\ref{tab:agr}. Across datasets, the agreement drops significantly whenever an image is incorrectly classified. For instance while the agreement between human annotators and our learned attributes for correctly classified images is $97.22$\% on AWA2, it reduces to $83.95$\% for incorrectly classified images. Note that on an average our learned attributes are in line with the human judgement, e.g., $96.16$\% on AWA2. This shows that our model is faithful to its explanations as judged by experts. The practical implication of this experiment is as follows. Since humans understand the individual interpretable concepts, a user can spot inconsistencies in the explanation and, based on that, identify wrong predictions during test time because the explanation is flawed more often whenever the model is making a mistake. This is a step towards one of the goals of explainable AI, i.e., to allow users to make judgement calls whether or not to trust the system based on its explanations. \subsection{Qualitative Results} \label{sec:visu} \begin{figure}[t] \includegraphics[width=\columnwidth]{images/cifar10_tree.pdf} \caption{Learned decision tree on CIFAR-10 by our IOC ablation model which does not use attribute data, i.e., decisions cannot be named. We show the decision tree of the most likely path for each class, i.e., we can introspect that our model decides to separate animals from vehicles first.} \label{fig:cifar10} \end{figure} The main premise of our explainable observer-classifier (XOC) model is that the decision making process is explained by pointing to the tree branch, into which a certain image falls, and by the attribute being chosen at each node. By visualizing the tree, the user can get an explainable overview of the internal decision process of the whole classifier. We inspect the learned structure of the decision tree by illustrating the splits from our model on AWA2 in Figure~\ref{fig:tree_awa2}, where the left and right sub-tree indicates that the attribute is present or absent respectively. The first decision deals with identifying meat-eating animals, separating dogs, bears, cats, big cats, and foxes from all the other animals. These categories get further refined with each binary split building a hierarchical clustering that defines the XOC model's decision structure. Since the pool of attributes determines the vocabulary of the explanations, it is worth considering different types of attributes depending on the use case, e.g., when one desires to only use visual attributes. \begin{figure*}[t] \centering \includegraphics[width=\linewidth]{images/awa2_qual_expl.pdf} \caption{Decision process for two tiger images in AWA2 along with the current label prediction at each step. The lower (upper) path is taken when the attribute is present (absent) for a given class. Both images follow the same path except for the last decision of ``stripes''. For the white tiger as there are no stripes and it gets classified incorrectly as a lion.} \label{fig:qual_awa2} \end{figure*} On the other hand, our introspective observer-classifier (IOC) ablation model does not use the attribute loss, exposing the decision tree structure without assigning a semantic meaning to the decisions. Although IOC fails to assign an attribute to each branch, it still provides introspection into the model's intermediate class splits and can be applied on datasets without attribute information. Figure~\ref{fig:cifar10} shows the decision tree of IOC when applied on CIFAR-10, where we observe that the model separates the animal classes from the vehicles in the first binary decision. Zooming into the decision process on AWA2, we can investigate how our model treats counterfactuals, i.e., negative decisions. This is useful for the user as explanations are often contrastive~\cite{hendricks2018grounding}. In Figure~\ref{fig:qual_awa2}, when an image is misclassified, we inspect the point in the tree where the error occurred, exposing detailed information of when the image is mistaken to be from another class. The lower path corresponds to when the model thinks the attribute is present for a given class. Both images follow the same path for five decisions, the error occurs in the sixth decision. For the white tiger, our model decides ``no stripes'' and incorrectly classifies it as a lion. In addition, our XOC model depicts its current belief of the correct class at any time during the process, i.e., probability plots at every branch. This also reveals some critical binary decisions, when the predicted class changes drastically, such as the ``has stripes'' decision. This way, a user inspecting the individual rationals can make a more informed decision on the value of the model's predictions. \subsection{Zero-Shot Learning as a Testbed} \label{sec:zsl} { \setlength{\tabcolsep}{5pt} \renewcommand{\arraystretch}{1.2} \begin{table}[t] \centering \resizebox{0.98\columnwidth}{!}{% \begin{tabular}{l l l l l} \multicolumn{2}{l}{side information} & AWA2 (d) & aPY (d) & CUB (d)\\ \midrule w2v & learned & 41.0 (400) & 34.6 (400) & 25.9 (400)\\ IOC att & learned & 54.1 (40) & 36.0 (30) & 43.6 (100)\\ att & expert & 66.2 (85) & 38.0 (64) & 47.6 (312)\\ \end{tabular}% } \caption{Zero-shot learning with human-annotated attributes (att), attributes learned by our IOC (IOC att, i.e., $\lambda = 0$), by Word2Vec (w2v). (d = dimension)} \label{tab:zsl} \end{table} } Explanations are useful when they enable solving an independent task~\cite{lombrozo2012}. We argue that zero-shot learning (ZSL) is suitable for this purpose because solving this task requires using interpretable features as side information. Hence, the attribute quality directly affects the ZSL performance and evaluating our model on this task shows the effectiveness of our learned attributes. In ZSL since the training and test classes are disjoint, to predict the unseen class for a query image the model needs to transfer information using some form of side information, e.g., expert-annotated attributes. For a fair comparison, i.e., in order not to use any expert annotation, we set $\lambda = 0$ as in our IOC model. After obtaining the probabilities of each learned binary attribute via softmax, we stack the attributes in a per-class attribute vector and scale the attribute values to be between -1 and 1. For a particular class, the attributes are averaged over all images of the dataset. We use the same image features and proposed train-test split as in \cite{Xian17}. For zero-shot prediction, we use the SJE~\cite{Akata15} technique and compare ours with another learned embedding, Word2Vec~\cite{Mikolov13}. Our results in Table~\ref{tab:zsl} show that the attributes learned by our IOC model achieve $54.1\%$ accuracy, significantly outperforming Word2Vec with $41.0\%$. This behavior generalizes to other datasets. In fact, on aPY our learned attributes come close to the performance of human-annotated attributes ($36.0\%$ vs $38.0\%$). Moreover on the CUB dataset, our model outperforms Word2Vec by a large margin ($43.6\%$ vs $25.9\%$). This result is encouraging as it demonstrates that our learned attributes lead to discriminative and interpretable representations that are useful for tackling the challenging task of zero-shot learning. It also shows that our model learns representations more discriminative than the ones extracted from Wikipedia while being much lower dimensional, i.e., 40 vs 400 on AWA2, 30 vs 400 on aPy and 100 vs 400 on CUB. These results suggest that the hierarchical clustering from our decision tree carries an interpretable meaning without requiring any expert annotation. \section{Conclusion} In this work, we presented a two-agent framework that tackles the image-classification task using human-interpretable binary decisions as a hierarchical decision process. Trained end-to-end, our model achieves competitive accuracy to the state-of-the-art non-explainable models by revealing its internal thought process, i.e., introspection, and by relating its binary decisions to human-understandable concepts, i.e., rationalization. As indicated by our results that compare human-annotated attributes with our learned attributes, the hierarchical clustering and explainable binary decisions allow the user to better understand the iterative predictions of the network as well as help identify failure cases at test time. Proposing zero-shot learning as a testbed to evaluate explanations, we show promising results validating that our model indeed learns transferable and discriminative binary features across classes. \myparagraph{Acknowledgements} This work has received funding from the ERC under the Horizon 2020 program (grant agreement No. 853489) and DARPA XAI program. {\small \bibliographystyle{ieee_fullname}
\section{Introduction} A central problem in machine learning is estimating the gradient of the expectation of a random variable with respect to the parameters of the distribution $\deriv{}{\zeta}\expectw{x\sim\p{x;\zeta}}{\phi(x)}$. Some examples include: the gradient of the expected classification error of a model over the data generating distribution, the gradient of the expected evidence lower bound w.r.t. the variational parameters in variational inference \cite{hoffman2013stochastic}, or the gradient of the expected reward w.r.t. the policy parameters in reinforcement learning \cite{sutton1998reinforcement}. Usually, such an estimator is needed not just through a single computation, but through a computation graph; a good overview of related problems is given by \cite{schulman2015stocgraph}. Previously, Schulman et al. provided a method to obtain gradient estimators on stochastic computation graphs by differentiating a surrogate loss \cite{schulman2015stocgraph}. While the work provided an elegant method to obtain gradient estimators using automatic differentiation, the resulting {\it stochastic computation graph} framework has formal rules, which uniquely define one specific type of estimator, and it is not suitable for describing general gradient estimation techniques. For example, determinstic policy gradients \cite{silver2014deterministic} or total propagation \cite{pipps} are not covered by the framework. In contrast, in probabilistic inference, the successful probabilistic graphical model framework \cite{pearl2014probabilistic} only describes the structure of a model, while there are many different choices of algorithms to perform inference. We aim for a similar framework for gradient computation, which we call {\it probabilistic computation graphs}. Our framework uses the total derivative rule $\deriv{f}{a} = \pderivw{f}{a} + \pderivw{f}{b}\deriv{b}{a}$ to decompose the gradient into a sum of partial derivatives along different computational paths, while leaving open the choice of estimator for the partial derivatives. We begin by introducing typical gradient estimators in the literature, then explain our new theorem, novel estimators using a non-standard decomposition of the total derivative, and experimental results. \paragraph{Nomenclature} All variables will be considered as column vectors, and gradients are represented as matrices where each row corresponds to one output variable, and each column corresponds to one input variable---this allows applying the chain rule by simple matrix multiplication, i.e. $\deriv{f(\bfv{x})}{\bfv{y}} = \pderivw{f}{\bfv{x}}\pderivw{\bfv{x}}{\bfv{y}}$. Matrices are vectorised with the $\textup{vec}(*)$ operator, i.e. $\deriv{\Sigma}{\bfv{x}}$ means $\deriv{\textup{vec}(\Sigma)}{\bfv{x}}$. \section{Background: Gradients of expectations} \label{background} \subsection{Pathwise derivative estimators} This type of estimator relies on gradients of $\phi$ w.r.t. $\bfv{x}$, e.g. the Gaussian gradient identities: $\deriv{}{\mu}\expectw{\bfv{x}\sim\mathcal{N}(\mu,\Sigma)} {\phi(\bfv{x})} = \expectw{\bfv{x}\sim \mathcal{N}(\mu,\Sigma)}{\deriv{\phi(\bfv{x})}{\bfv{x}}}$ and $\deriv{}{\Sigma}\expectw{\bfv{x}\sim\mathcal{N}(\mu,\Sigma)} {\phi(\bfv{x})} = \frac{1}{2}\expectw{\bfv{x}\sim \mathcal{N}(\mu,\Sigma)}{\sderiv{\phi(\bfv{x})}{\bfv{x}}}$, cited in \cite{rezende2014stochasticBP}. The most prominent type of pathwise derivative estimator are reparameterization (RP) gradients. We focus our discussion on RP gradients, but we mentioned the Gaussian identities to emphasize that RP gradients are not the only possible pathwise estimators, e.g. the derivative w.r.t. $\Sigma$ given above does not correspond to an RP gradient. See \cite{rezende2014stochasticBP} for an overview of various options. \paragraph{RP gradient for a univariate Gaussian} To sample from $\mathcal{N}(\mu, \sigma^2)$, sample from a standard normal $\epsilon \sim \mathcal{N}(0,1)$, then transform this: $x = \mu + \sigma\epsilon$. The gradients are $\inderiv{x}{\mu} = 1$ and $\inderiv{x}{\sigma} = \epsilon$. The gradient can then be estimated by sampling: $\deriv{}{\zeta}\expect{\phi(x)} = \expect{\deriv{\phi(x)}{x} \deriv{x}{\zeta}}$. For multivariate Gaussians, one can use the Cholesky factor $L$ of $\Sigma= LL^T$ instead of $\sigma$. To differentiate the Cholesky decomposition see \cite{murray2016choldiv}. See \cite{rezende2014stochasticBP} for other distributions. For a general distribution $\p{\bfv{x};\zeta}$, the RP gradient defines a sampling procedure $\epsilon \sim \p{\epsilon}$ and a transformation $\bfv{x} = f(\zeta,\epsilon)$, which allows moving the derivative inside the expectation $\deriv{}{\zeta}\expectw{\bfv{x}\sim\p{\bfv{x};\zeta}} {\phi(\bfv{x})} = \expectw{\epsilon\sim\p{\epsilon}}{\deriv{\phi}{f}\deriv{f}{\zeta}}$. The RP gradient allows backpropagating the gradient through sampling operations in a graph. It computes \emph{partial derivatives} through a specific operation. \subsection{Jump gradient estimators} We introduce the categorization of {\it jump gradient estimators}. Unlike pathwise derivatives, which compute local partial derivatives and apply the chain rule through numerous computations, jump gradient estimators can estimate the \emph{total derivative} directly using only local computations---hence the naming: the gradient estimator jumps over multiple nodes in a graph without having to differentiate the nodes inbetween (this will become clearer in later sections in the paper). \paragraph{Likelihood ratio estimators (LR)} Any function $f(\bfv{x})$ can be stochastically integrated by sampling from an arbitrary distribution $\textup{q}(\bfv{x})$: $\int f(\bfv{x})\textup{d}\bfv{x} = \int \textup{q}(\bfv{x}) \frac{f(\bfv{x})}{\textup{q}(\bfv{x})}\textup{d}\bfv{x} = \expectw{\bfv{x}\sim \textup{q}}{f(\bfv{x})/\textup{q}(\bfv{x})}$. The gradient of an expectation can be written as $\int \phi(\bfv{x}) \deriv{\p{\bfv{x};\zeta}}{\zeta}\textup{d}\bfv{x}$. By picking $\textup{q}(\bfv{x}) = \p{\bfv{x}}$, and stochastically integrating, one obtains the LR gradient estimator: $\expect{\frac{\inderiv{\p{\bfv{x};\zeta}}{\zeta}} {\p{\bfv{x};\zeta}}\phi(\bfv{x})}$. One \emph{must} subtract a baseline from the $\phi(\bfv{x})$ values for this estimator to have acceptable variance: $\expect{\frac{\inderiv{\p{\bfv{x};\zeta}}{\zeta}} {\p{\bfv{x};\zeta}}(\phi(\bfv{x})-b)}$. In practice using $b = \expect{\phi}$ is a reasonable choice. If $b$ does not depend on the samples, then this leads to an unbiased gradient estimator. Leave-one-out baseline estimates can be performed to achieve an unbiased gradient estimator \cite{mnih2016looLR}. Other control variate techniques also exist, and this is an active area of research \cite{greensmith2004controlvariates}. In our recent work \cite{pipps}, we introduced the batch importance weighted LR estimator (BIW-LR) and baselines: {\bf BIW-LR:} $ \sum_{i=1}^P\sum_{j=1}^P \left(\frac{\text{d}{\p{\bfv{x}_{j};\zeta_i(\theta)}}/\text{d}{\theta}} {\sum_{k=1}^P\p{\bfv{x}_{j};\zeta_k}}(\phi(\bfv{x}_{j}) - b_{i})\right)/P $, where we use a mixture distribution $\textup{q} = \sum_{i}^P\p{\bfv{x};\zeta_i}/P$, and each $\zeta_i$ depends on another set of parameters $\theta$ (in our case the policy parameters), {\bf BIW-Baseline:} $b_{i} = \left(\sum_{j\neq i}^P c_{j,i}\phi(\bfv{x}_{j})\right)/\sum_{j\neq i}^Pc_{j,i}$, where the importance weights are $c_{j,i} = \p{\bfv{x}_{j};\zeta_{i}}/ \sum_{k=1}^P\p{\bfv{x}_{j};\zeta_{k}}$. \paragraph{Value function based estimators} Instead of using $\phi(\bfv{x})$ directly, one can learn an approximator $\estmr{\phi}(\bfv{x})$. The approximator will often require less computational time to evaluate, and could be used for estimating the derivatives. Both LR gradients and pathwise derivatives could be used with evaluations from the approximator. Moreover, it is not necessary to evaluate just one $\bfv{x}$ point of the estimator, but one could either use a larger number of samples, or try to directly compute the expectation---this leads to a Rao-Blackwellized estimator, which is known to have lower variance. Such estimators have been considered for example in RL in expected sarsa \cite{van2009theoretical, sutton1998reinforcement} as well as in the stochastic variational inference literature \cite{aueb2015local, tokui2017evaluating}, and also in policy gradients \cite{ciosek2017expected, asadi2017mean}. \section{Total stochastic gradient theorem} \label{tottheorem} Sec.~\ref{background} explained how to obtain estimators of the expectation through a single computation, while here we explain how to decompose the gradient of a complicated graph of computations into smaller sections, which can be readily estimated using the methods in Sec.~\ref{background}. In our framework, we work with the gradient of the marginal distribution. This more general problem directly gives one the gradient of the expectation as well, as the expectation is just a function of the marginal distribution. \subsection{Explanation of framework} \newtheorem{compdef}{Definition} We define {\it probabilistic computation graphs} (PCG). The definition is exactly equivalent to the definition of a standard directed graphical model, but it highlights our methods better, and emphasizes our interest in computing gradients, rather than performing inference. The main difference is the explicit inclusion of the {\it distribution parameters} $\zeta$, e.g. for a Gaussian, the mean $\mu$ and covariance $\Sigma$. \begin{compdef}[Probabilistic computation graph (PCG)] An acyclic graph with nodes/vertices $V$ and edges $E$, which satisfy the following properties: \begin{enumerate} \item Each node $i\in V$ corresponds to a collection of random variables with marginal joint probability density $\textup{p}(\bfv{x}_i;\zeta_i)$, where $\zeta_i$ are the possibly infinite parameters of the distribution. Note that the parameterization is not unique, and any parameterization is acceptable. \item The probability density at each node is conditionally dependent on the parent nodes: $\textup{p}(\bfv{x}_i|\bfv{Pa}_i)$ where $\bfv{Pa}_i$ are the random variables at the direct parents of node $i$. \item The joint probability density satisfies: $\textup{p}(\bfv{x}_1,...,\bfv{x}_n) = \prod_{i=1}^n\textup{p}(\bfv{x}_i|\bfv{Pa}_i)$ \item Each $\zeta_i$ is a function of its parents: $\zeta_i = f(\bfv{Pz}_i)$ where $\bfv{Pz}_i$ are the distribution parameters at the parents of node i. In particular: $\textup{p}(\bfv{x}_i; \zeta_i) = \int \textup{p}(\bfv{x}_i|\bfv{Pa}_i)\textup{p}(\bfv{Pa}_i;\bfv{Pz}_i)\textup{d} \bfv{Pa}_i$ \end{enumerate} \end{compdef} We emphasize that there is nothing stochastic in our formulation. Each computation is determinstic, although they may be analytically intractable. We also emphasize that this definition does not exclude deterministic nodes, i.e. the distribution at a node may be a Dirac delta distribution (a point mass). Later we will use this formulation to derive stochastic estimates of the gradients. \subsection{Derivation of theorem} \label{theoderiv} We are interested in computing the total derivative of the distribution parameters at one node $\zeta_i$ w.r.t. the parameters at another node $\text{d}\zeta_i/\text{d}\zeta_j$, e.g. nodes $i$ and $j$ could correspond to $\phi$ and $\bfv{x}$ in Sec.~\ref{background} respectively. By the total derivative rule: $\deriv{\zeta_i}{\zeta_j} = \sum_{\zeta_m\in \bfv{Pz}_i}\pderivw{\zeta_i}{\zeta_m}\deriv{\zeta_m}{\zeta_j}$. Iterating this equation on the $\text{d}\zeta_m/\text{d}\zeta_j$ terms leads to a sum over paths from node $j$ to node $i$: \begin{equation} \label{eq:tot1} \deriv{\zeta_i}{\zeta_j} = \sum_{Paths(j\rightarrow i)}~~~ \prod_{Edges (k,l)\in Path}\pderivw{\zeta_l}{\zeta_k} \end{equation} This equation holds for any deterministic computation graph, and is also well known in e.g. the OJA community \cite{naumann2008optimal}. This equation trivially leads to our {\it total stochastic gradient theorem}, which states that the sum over paths from A to B can be written as a sum over paths from A to intermediate nodes and from the intermediate nodes to B. Fig.~\ref{totpaths} provides examples of the paths in Eq.~\ref{eq:tot2} below. \newtheorem{totstoc}{Theorem} \begin{totstoc}[Total stochastic gradient theorem] Let $i$ and $j$ be distinct nodes in a probabilistic computation graph, and let $IN$ be any set of intermediate nodes, which block the paths from $j$ to $i$, i.e. $IN$ is such that there does not exist a path from $j$ to $i$, which does not pass through a node in $IN$. We denote $\{a\rightarrow b\}$ is the set of paths from $a$ to $b$, and $\{a\rightarrow b\}/c$ is the set of paths from $a$ to $b$, where no node along the path except for $b$ is allowed to be in set c. Then the total derivative $\textup{d}\zeta_i/\textup{d}\zeta_j$ can be written with the equation below: \begin{equation} \label{eq:tot2} \deriv{\zeta_i}{\zeta_j} = \sum_{m \in IN} \left( {\color{red}\left(\color{black} \sum_{s\in\{m\rightarrow i\}}~~~ \prod_{(k,l)\in s} \pderivw{\zeta_l}{\zeta_k}\color{red}\right)} {\color{blue}\left(\color{black}\sum_{r\in\{j\rightarrow m\}/IN}~~~ \prod_{(p,t)\in r}\pderivw{\zeta_t}{\zeta_p}\color{blue}\right)} \right) \end{equation} \end{totstoc} Equations~\ref{eq:tot1} and \ref{eq:tot2} can be combined to give: \begin{equation} \label{eq:tot3} \deriv{\zeta_i}{\zeta_j} = \sum_{m \in IN} \left( \left( \deriv{\zeta_i}{\zeta_m} \right) \left(\sum_{r\in\{j\rightarrow m\}/IN}~~~ \prod_{(p,t)\in r}\pderivw{\zeta_t}{\zeta_p}\right) \right) \end{equation} Note that an analogous theorem could be derived by swapping $r\in\{j\rightarrow m\}/IN$ and $s\in\{m\rightarrow i\}$ with $r\in\{j\rightarrow m\}$ and $s\in\{m\rightarrow i\}/IN$ respectively. This leads to the equation below: \begin{equation} \label{eq:tot4} \deriv{\zeta_i}{\zeta_j} = \sum_{m \in IN} \left( \left(\sum_{r\in\{m\rightarrow i\}/IN}~~~ \prod_{(p,t)\in r}\pderivw{\zeta_t}{\zeta_p}\right) \left( \deriv{\zeta_m}{\zeta_j} \right) \right) \end{equation} We will refer to Equations~\ref{eq:tot3} and \ref{eq:tot4} as the second and first half {\it total gradient equations} respectively. \begin{figure} \begin{subfigure}{.5\columnwidth} \centering \begin{tikzpicture} \tikzstyle{main}=[circle, minimum size = 6mm, thick, draw =black!80, node distance = 6mm] \tikzstyle{connect}=[-latex, thick] \tikzstyle{box}=[rectangle, draw=black!100] \node[main, fill = white!100] (j) [label=center:$j$] { }; \node[main, fill = white!100] (r1) [right=of j] { }; \node[main, fill = green!30] (r2) [right=of r1] {}; \node[main, fill = green!30] (r21) [above=of j] { }; \node[main, fill = green!30] (r22) [right=of r21, label=center:$m$] { }; \node[main, fill = white!100] (r23) [right=of r22] { }; \node[main, fill = white!100] (i) [above=of r23, label=center:$i$] { }; \path (j) edge [connect] (r1) (r1) edge [connect] (r2) (r2) edge [connect] (r23) (j) edge [connect] (r21) (r23) edge [connect, color = red!100] (i) (r21) edge [connect] (r22) (r22) edge [connect, color = red!100] (r23) (j) edge [connect, color = blue!100] (r22) (r22) edge [connect, color = red!100] (i); \end{tikzpicture} \caption{$\{j\rightarrow m\}$ paths may not pass through green nodes.} \end{subfigure} \begin{subfigure}{.5\columnwidth} \centering \begin{tikzpicture} \tikzstyle{main}=[circle, minimum size = 6mm, thick, draw =black!80, node distance = 6mm] \tikzstyle{connect}=[-latex, thick] \tikzstyle{box}=[rectangle, draw=black!100] \node[main, fill = white!100] (j) [label=center:$j$] { }; \node[main, fill = white!100] (r1) [right=of j] { }; \node[main, fill = green!30] (r2) [right=of r1] {}; \node[main, fill = green!30] (r21) [above=of j, label=center:$m$] { }; \node[main, fill = green!30] (r22) [right=of r21] { }; \node[main, fill = white!100] (r23) [right=of r22] { }; \node[main, fill = white!100] (i) [above=of r23, label=center:$i$] { }; \path (j) edge [connect] (r1) (r1) edge [connect] (r2) (r2) edge [connect] (r23) (j) edge [connect, color = blue!100] (r21) (r23) edge [connect, color = red!100] (i) (r21) edge [connect, color = red!100] (r22) (r22) edge [connect, color = red!100] (r23) (j) edge [connect] (r22) (r22) edge [connect, color = red!100] (i); \end{tikzpicture} \caption{$\{m\rightarrow i\}$ paths may pass through green nodes.} \end{subfigure} \caption{Example paths in Equation~\ref{eq:tot2}. The green nodes correspond to the intermediate nodes $IN$.} \label{totpaths} \end{figure} \subsection{Gradient estimation on a graph} \label{seq:ancgrad} Here we clarify one method how the partial derivatives through the nodes $m \in IN$ in the previous section can be estimated. We use the following properties of the estimators in Sec.~\ref{background}: \begin{itemize} \item \emph{Pathwise derivative estimators} compute partial derivatives through a single edge, e.g. $\pderivw{\zeta_m}{\zeta_j}$ \item \emph{Jump gradient estimators} sum the gradients across all computational paths between two nodes and directly compute total derivatives, e.g. $\deriv{\zeta_i}{\zeta_m}$ \end{itemize} The task is to estimate the derivative of the expectation at a distal node $i$ w.r.t. the parameters at an earlier node $j$: $\deriv{}{\zeta_j} \expectw{\bfv{x}_i \sim \p{\bfv{x}_i;\zeta_i}} {\bfv{x}_i}$, through an intermediate node $m$. Note that $\expect{\bfv{x}_i}$ can be picked as one of the distribution parameters in $\zeta_i$. The true $\zeta$ are intractable, so we perform an ancestral sampling based estimate $\estmr{\zeta}$, i.e. we sample sequentially from each $\textup{p}(\bfv{x}_*|\textup{Pa}_*)$ to get a sample through the whole graph, then $\estmr{\zeta}_*$ will simply be the parameters of $\textup{p}(\bfv{x}_*|\textup{Pa}_*)$. We refer to one such sample as a {\it particle}. We use a batch of $P$ such particles $\estmr{\zeta}_* = \{\estmr{\zeta}_{*,c}\}_c^P$ to obtain a mixture distribution as an approximation to the true distribution. Such a sampling procedure has the properties $\p{\bfv{x};\zeta} = \int \p{\bfv{x};\estmr{\zeta}}\p{\estmr{\zeta}} \textup{d}\estmr{\zeta}$ and $\expectw{\bfv{x}_i \sim \p{\bfv{x}_i;\zeta_i}}{\bfv{x}_i} = \expectw{\estmr{\zeta}_i\sim \p{\estmr{\zeta}_i;\zeta_j}} {\expectw{\bfv{x}_i \sim \p{\bfv{x}_i;\estmr{\zeta}_i}}{\bfv{x}_i}}$. For simplicity in the explanation, we further assume that the sampling is reparameterizable, i.e. $\p{\estmr{\zeta}_m;\zeta_j} = \int f(\estmr{\zeta}_m;\zeta_j, \epsilon_m)\p{\epsilon_m}\textup{d}\epsilon_m$. We can write $\deriv{}{\zeta_j} \expectw{\estmr{\zeta}_i\sim \p{\estmr{\zeta}_i;\zeta_j}} {\expectw{\bfv{x}_i \sim \p{\bfv{x}_i;\estmr{\zeta}_i}}{\bfv{x}_i}} = \expectw{\epsilon_m\sim \p{\epsilon_m}} {\pderivw{\estmr{\zeta}_m}{\zeta_j}\deriv{}{\estmr{\zeta}_m} \expectw{\bfv{x}_i \sim \p{\bfv{x}_i;\estmr{\zeta}_i}}{\bfv{x}_i}}$. The term $\pderivw{\estmr{\zeta}_m}{\zeta_j}$ will be estimated with a pathwise derivative estimator. The remaining term $\deriv{}{\estmr{\zeta}_m} \expectw{\bfv{x}_i \sim \p{\bfv{x}_i;\estmr{\zeta}_i}}{\bfv{x}_i}$ will be estimated with any other estimator, e.g. a jump estimator could be used. We summarize the procedure for creating gradient estimators from $j$ to $i$ on the whole graph: \begin{enumerate} \item Choose a set of intermediate nodes $IN$, which block the paths from $j$ to $i$. \item Construct pathwise derivative estimators from $j$ to the intermediate nodes $IN$. \item Construct total derivative estimators from $IN$ to $i$, and apply Eq.~\ref{eq:tot3} to combine the gradients. \end{enumerate} \section{Relationship to policy gradient theorems} \label{reltopol} In typical model-free RL problems \cite{sutton1998reinforcement} an agent performs actions $\bfv{u} \sim \pi(\bfv{u}_t|\bfv{x}_t;\theta)$ according to a stochastic policy $\pi$, transitions through states $\bfv{x}_t$, and obtains costs $c_t$ (or conversely rewards). The agent's goal is to find the policy parameters $\theta$, which optimize the expected return $G = \sum_{t=0}^H c_t$ for each episode. The corresponding probabilistic computation graph is provided in Fig.~\ref{modelfreepol}. In the literature, two "gradient theorems" are widely applied: the policy gradient theorem \cite{sutton2000policy}, and the deterministic policy gradient theorem \cite{silver2014deterministic}. These two are equivalent in the limit of no noise \cite{silver2014deterministic}. \paragraph{Policy gradient theorem} \begin{equation} \label{polgrad} \deriv{}{\theta}\expect{G} = \expect{\sum_{t=0}^{H-1} \deriv{\log \pi(\bfv{u}_t|\bfv{x}_t;\theta)}{\theta} \estmr{Q}_t(\bfv{u}_t,\bfv{x}_t)} \end{equation} \paragraph{Deterministic policy gradient theorem} \begin{equation} \label{detpolgrad} \deriv{}{\theta}\expect{G} = \expect{\sum_{t=0}^{H-1} \deriv{\bfv{u}_t}{\theta}\deriv{\estmr{Q}_t(\bfv{u}_t,\bfv{x}_t)} {\bfv{u}_t}} \end{equation} $\estmr{Q}_t$ corresponds to an estimator of the remaining return $\sum_{h=t}^{H-1}c_{h+1}$ from a particular state $\bfv{x}$ when choosing action $\bfv{u}$. For Eq.~\ref{polgrad} any estimator is acceptable, even a sample based estimate could be used. For Eq.~\ref{detpolgrad}, $\estmr{Q}$ is usually a differentiable surrogate model. Fig.~\ref{modelfreepol} shows how these two theorems correspond to the same probabilistic computation graph. The intermediate nodes are the actions selected at each time step. The difference lies in the choice of jump estimator to estimate the total derivative following the intermediate nodes---the policy gradient theorem uses an LR gradient, whereas the deterministic policy gradient theorem uses a pathwise derivative to a surrogate model. We believe that the derivation based on a PCG is more intuitive than previous algebraic proofs \cite{sutton2000policy,silver2014deterministic}. \begin{figure} \begin{subfigure}{.5\columnwidth} \centering \begin{tikzpicture} \tikzstyle{main}=[circle, minimum size = 6mm, thick, draw =black!80, node distance = 4mm] \tikzstyle{connect}=[-latex, thick] \tikzstyle{box}=[rectangle, draw=black!100] \node[main, fill = white!100] (x0) [label=center:$\bfv{x}_0$] { }; \node[main, fill = white!100] (x1) [right=of x0,label=center:$\bfv{x}_1$] {}; \node[main, fill = green!30] (u0) [below=of x0,label=center:$\bfv{u}_0$] {}; \node[main, fill = green!30] (u1) [below=of x1, label=center:$\bfv{u}_1$] {}; \node[main, fill = white!100] (x2) [right=of x1, label=center:$\bfv{x}_2$] {}; \node[main, fill = green!30] (u2) [below=of x2, label=center:$\bfv{u}_2$] {}; \node[main, fill = white!100] (x3) [right=of x2, label=center:$\bfv{x}_3$] {}; \node[main, fill = white!100] (c1) [above=of x1, label=center:$c_1$] {}; \node[main, fill = white!100] (c2) [above=of x2, label=center:$c_2$] {}; \node[main, fill = white!100] (c3) [above=of x3, label=center:$c_3$] {}; \node[main, fill = white!100] (G) [above=of c2, label=center:$G$] {}; \node[main, fill = white!100] (theta) [below=of u1, label=center:$\theta$] {}; \path (x0) edge [connect] (x1) (x0) edge [connect] (u0) (x1) edge [connect] (u1) (u0) edge [connect] (x1) (x1) edge [connect] (x2) (x2) edge [connect, color=red!100] (x3) (x2) edge [connect, color=red!100] (u2) (u1) edge [connect, color=red!100] (x2) (u2) edge [connect, color=red!100] (x3) (x1) edge [connect] (c1) (x2) edge [connect, color=red!100] (c2) (x3) edge [connect, color=red!100] (c3) (c1) edge [connect] (G) (c2) edge [connect, color=red!100] (G) (c3) edge [connect, color=red!100] (G) (theta) edge [connect] (u0) (theta) edge [connect, color=blue!100] (u1) (theta) edge [connect] (u2); \end{tikzpicture} \caption{Classical model-free policy gradient} \label{modelfreepol} \end{subfigure} \begin{subfigure}{.5\columnwidth} \centering \begin{tikzpicture} \tikzstyle{main}=[circle, minimum size = 6mm, thick, draw =black!80, node distance = 4mm] \tikzstyle{connect}=[-latex, thick] \tikzstyle{box}=[rectangle, draw=black!100] \node[main, fill = white!100] (x0) [label=center:$\bfv{x}_0$] { }; \node[main, fill = green!30] (x1) [right=of x0,label=center:$\bfv{x}_1$] {}; \node[main, fill = white!100] (u0) [below=of x0,label=center:$\bfv{u}_0$] {}; \node[main, fill = white!100] (u1) [below=of x1, label=center:$\bfv{u}_1$] {}; \node[main, fill = green!30] (x2) [right=of x1, label=center:$\bfv{x}_2$] {}; \node[main, fill = white!100] (u2) [below=of x2, label=center:$\bfv{u}_2$] {}; \node[main, fill = green!30] (x3) [right=of x2, label=center:$\bfv{x}_3$] {}; \node[main, fill = white!100] (c1) [above=of x1, label=center:$c_1$] {}; \node[main, fill = white!100] (c2) [above=of x2, label=center:$c_2$] {}; \node[main, fill = white!100] (c3) [above=of x3, label=center:$c_3$] {}; \node[main, fill = white!100] (G) [above=of c2, label=center:$G$] {}; \node[main, fill = white!100] (theta) [below=of u1, label=center:$\theta$] {}; \path (x0) edge [connect] (x1) (x0) edge [connect] (u0) (x1) edge [connect] (u1) (u0) edge [connect] (x1) (x1) edge [connect] (x2) (x2) edge [connect, color=red!100] (x3) (x2) edge [connect, color=red!100] (u2) (u1) edge [connect, color=blue!100] (x2) (u2) edge [connect, color=red!100] (x3) (x1) edge [connect] (c1) (x2) edge [connect, color=red!100] (c2) (x3) edge [connect, color=red!100] (c3) (c1) edge [connect] (G) (c2) edge [connect, color=red!100] (G) (c3) edge [connect, color=red!100] (G) (theta) edge [connect] (u0) (theta) edge [connect, color=blue!100] (u1) (theta) edge [connect] (u2); \end{tikzpicture} \caption{Model-based state-space LR gradient} \label{modelbasedpol} \end{subfigure} \caption{Probabilistic computation graphs for model-based and model-free LR gradient estimation.} \label{LRPCG} \end{figure} \section{Novel algorithms} \label{novintro} In Sec.~\ref{seq:ancgrad} we explained how a particle-based mixture distribution is used for creating gradient estimators. In the following sections, we instead take advantage of these particles to estimate a different parameterization $\Gamma$, directly for the marginal distribution. Although the algorithms have general applicability, to make a concrete example, we explain them in reference to model-based policy gradients using a differentiable model considered in our previous work \cite{pipps}, for which the PCG is given in Fig.~\ref{modelbasedpol}. Stochastic value gradients \cite{heess2015learning}, for example, share the same PCG. \subsection{Density estimation LR (DEL)} \label{DEL} Following the explanation in Sec.~\ref{novintro}, one could attempt to estimate the distribution parameters $\Gamma$ from a set of sampled particles, then apply the LR gradient using the estimated distribution $\textup{q}(\bfv{x};\Gamma)$. In particular, we will approximate the density as a Gaussian by estimating the mean $\estmr{\mu} = \sum_i^P\bfv{x}_i/P$ and variance $\estmr{\Sigma} = \sum_i^P(\bfv{x}_i-\estmr{\mu})^2/(P-1)$. Then, using the standard LR trick, one can estimate the gradient $\sum_i^P\deriv{\log \textup{q}(\bfv{x}_i)}{\theta}(G_i-b)$, where $\textup{q}(\bfv{x})=\mathcal{N}(\estmr{\mu},\estmr{\Sigma})$. To use this method, one must compute derivatives of $\estmr{\mu}$ and $\estmr{\Sigma}$ w.r.t. the particles $\bfv{x}_i$, then carry the gradient to the policy parameters using the chain rule while differentiating through the model, which is straight-forward. We refer to our new method as the DEL estimator. Importantly, note that while $\textup{q}(\bfv{x})$ is used for estimating the gradient, it is not in any way used for modifying the trajectory sampling.\\ {\bf Advantages of DEL:} One can use LR gradients even if no noise is injected into the computations. \\ {\bf Disadvantages of DEL:} The estimator is biased, and density estimation can be difficult. \subsection{Gaussian shaping gradient (GS)} \label{GS} \begin{wrapfigure}[15]{r}{0.40\linewidth} \centering \begin{tikzpicture} \tikzstyle{main}=[circle, minimum size = 6mm, thick, draw =black!80, node distance = 4mm] \tikzstyle{connect}=[-latex, thick] \tikzstyle{box}=[rectangle, draw=black!100] \node[main, fill = white!100] (x0) [label=center:$\bfv{x}_0$] { }; \node[main, fill = green!30] (x1) [right=of x0,label=center:$\bfv{x}_k$] {}; \node[main, fill = white!100] (u0) [below=of x0,label=center:$\bfv{u}_0$] {}; \node[main, fill = white!100] (u1) [below=of x1, label=center:$\bfv{u}_1$] {}; \node[main, fill = green!30] (x2) [right=of x1, label=center:$\bfv{x}_2$] {}; \node[main, fill = white!100] (u2) [below=of x2, label=center:$\bfv{u}_2$] {}; \node[main, fill = green!30] (x3) [right=of x2, label=center:$\bfv{x}_m$] {}; \node[main, fill = white!100] (u3) [below=of x3, label=center:$\bfv{u}_3$] {}; \node[main, fill = green!30] (x4) [right=of x3, label=center:$\bfv{x}_4$] {}; \node[main, fill = white!100] (c1) [above=of x1, label=center:$c_1$] {}; \node[main, fill = white!100] (c2) [above=of x2, label=center:$c_2$] {}; \node[main, fill = white!100] (c3) [above=of x3, label=center:$c_m$] {}; \node[main, fill = white!100] (c4) [above=of x4, label=center:$c_4$] {}; \node[main, fill = white!100] (G) [above=of c2, label=center:$G$] {}; \node[main, fill = white!100] (theta) [below=of u1, label=center:$\theta$] {}; \path (x0) edge [connect] (x1) (x0) edge [connect] (u0) (x1) edge [connect, color=red!100] (u1) (u0) edge [connect, color=blue!100] (x1) (x1) edge [connect, color=red!100] (x2) (x2) edge [connect, color=red!100] (x3) (x2) edge [connect, color=red!100] (u2) (x3) edge [connect] (u3) (x3) edge [connect] (x4) (u1) edge [connect, color=red!100] (x2) (u2) edge [connect, color=red!100] (x3) (u3) edge [connect] (x4) (x1) edge [connect] (c1) (x2) edge [connect] (c2) (x3) edge [connect, color=magenta!50] (c3) (x4) edge [connect] (c4) (c1) edge [connect] (G) (c2) edge [connect] (G) (c3) edge [connect, color=magenta!50] (G) (c4) edge [connect] (G) (theta) edge [connect, color=blue!100] (u0) (theta) edge [connect] (u1) (theta) edge [connect] (u2) (theta) edge [connect] (u3); \end{tikzpicture} \caption{Computational paths in Gaussian shaping gradient} \label{GSpic} \end{wrapfigure} Until now, all RL methods have used the second half total gradient equation (Eq.~\ref{eq:tot3}). Might one create estimators that use the first half equation (Eq.~\ref{eq:tot4})? Fig.\ref{GSpic} gives an example of how this might be done. We propose to estimate the density at $\bfv{x}_m$ by fitting a Gaussian on the particles. Then $\inderiv{\expect{c_m}}{\Gamma_m}$ (the pink edges) will be estimated by sampling from this distribution (or by any other method of integration). This leaves the question of how to estimate $\inderiv{\Gamma_m}{\theta}$ (all paths from $\theta$ to $\bfv{x}_m$). Using the RP method is straight-forward. To use the LR method, we first apply the second half total gradient equation on $\inderiv{\Gamma_m}{\theta}$ to obtain terms $\sum_{r\in\{\theta\rightarrow x_k\}/IN}\prod_{(p,t)\in r}\pderivw{\zeta_{t}}{\zeta_{p}}$ (blue edges) and $\deriv{\Gamma_m}{\zeta_{x_k}}$ (red edges). In the scenarios we consider, the first of these terms is a single path, and will be estimated using RP. The second term is more interesting, and we will estimate this using an LR method. As we are using a Gaussian approximation, the distribution parameters $\Gamma_m$ are the mean and variance of $\bfv{x}_m$, which can be estimated as $\mu_m = \expect{\bfv{x}_m}$ and $\Sigma_m = \expect{\bfv{x}_m\bfv{x}_m^T} - \mu_m\mu_m^T$. We can obtain LR gradient estimates of these terms $\deriv{}{\zeta_{x_k}}\expect{\bfv{x}_m} = \expectw{\bfv{x}_k\sim \textup{p}(\bfv{x}_k;\zeta_{x_k})} {\deriv{\log\textup{p}(\bfv{x_k};\zeta_{x_k})}{\zeta_{x_k}}(\bfv{x}_m-\bfv{b}_\mu)}$, $\deriv{}{\zeta_{x_k}}\expect{\bfv{x}_m\bfv{x}_m^T} = \expectw{\bfv{x}_k\sim \textup{p}(\bfv{x}_k;\zeta_{x_k})} {\deriv{\log\textup{p}(\bfv{x_k};\zeta_{x_k})}{\zeta_{x_k}}(\bfv{x}_m\bfv{x}_m^T- \bfv{b}_\Sigma)}$ and $\deriv{}{\zeta_{x_k}}(\mu\mu^T) = 2\mu\deriv{}{\zeta_{x_k}}\expect{\bfv{x}_m^T}$. In practice, we perform a sampling based estimate $\estmr{\zeta}_{x_k}$, and one might be concerned that the estimators are conditional on the sample $\estmr{\zeta}_{x_k}$, but we are interested in unconditional estimates. We will explain that the conditional estimate is equivalent. For the variance, note that $\mu_m$ is an estimate of the unconditional mean, so the whole estimate directly corresponds to an estimate of the unconditional variance. For the mean, apply the rule of iterated expectations: $\expectw{\bfv{x}_k\sim\p{\bfv{x}_k;\zeta_{x_k}}}{\bfv{x}_m} = \expectw{\estmr{\zeta}_{x_k}\sim \p{\estmr{\zeta}_{x_k}}} {\expectw{\bfv{x}_k\sim\p{\bfv{x}_k;\estmr{\zeta}_{x_k}}} {\bfv{x}_m}}$ from which it is clear that the conditional gradient estimate is an unbiased estimator for the gradient of the unconditional mean. \paragraph{Efficient algorithm for accumulating gradients} In Fig.~\ref{GSpic}, for each $\bfv{x}_k$ node, we want to perform an LR jump to every $\bfv{x}_m$ node after $k$ and compute a gradient with the Gaussian approximation of the distribution at node $m$. We will accumulate across all nodes during a backwards pass in a backpropagation like manner. Note that for each $k$ and each $m$, we can write the gradient as $\deriv{\expect{c_m}}{\Gamma_m}\deriv{\Gamma_m}{\zeta_{x_k}} (\deriv{\zeta_{x_k}}{\bfv{u}_{k-1}} \deriv{\bfv{u}_{k-1}}{\theta})$. The term $\deriv{\expect{c_m}}{\Gamma_m}\deriv{\Gamma_m}{\zeta_{x_k}}$ is estimated as $\deriv{\expect{c_m}}{\Gamma_m}\bfv{z}_m \deriv{\log\textup{p}(\bfv{x_k};\zeta_{x_k})}{\zeta_{x_k}}$, where $\bfv{z}_m$ corresponds to a vector summarizing the $\bfv{x}_m-\bfv{b}_\mu$, etc. terms above. Note that $\deriv{\expect{c_m}}{\Gamma_m}\bfv{z}_m$ is just a scalar quantity $g_m$. We thus use an algorithm which accumulates a sum of all $g$ during a backwards pass, and sums over all $m$ nodes at each $k$ node. See Alg.~\ref{alg:total-prop} for a detailed explanation of how it fits together with total propagation \cite{pipps}. The final algorithm essentially just replaces the usual cost/reward with a modified value, and such an approach would also be applicable in model-free policy gradient algorithms using a stochastic policy and LR gradients. \paragraph{Two interpretations of GS} 1. We are making a Gaussian approximation of the marginal distribution at a node. 2. We are performing a type of reward shaping based on the distribution of the particles. In particular we are essentially promoting the trajectory distributions to stay unimodal, such that all of the particles concentrate at one "island" of reward rather than splitting the distribution between multiple regions of reward---this may simplify optimization. \begin{algorithm}[tb] \caption{Gaussian shaping gradient with total propagation} \label{alg:total-prop} \begin{algorithmic} \State Gaussian shaping gradient for model-based policy search while combining both LR and RP variants using total propagation---an algorithm introduced in our previous work \cite{pipps}. \State {\bfseries Forward pass:} Sample a set of particle trajectories. \State {\bfseries Backward pass:}\\ \State {\bfseries Initialise:} $\deriv{G_{T+1}}{\zeta_{T+1}} = \bfv{0}$, $\deriv{J}{\theta} = \bfv{0}$, $G_{T+1} = 0$ \Comment $\zeta$ are the distribution parameters, e.g. all of the $\mu$ and $\sigma$ for each particle \For{$t=T$ {\bfseries to} $1$} \State $\mu_t = \expect{\bfv{x}_t}$; $\Sigma_t = \expect{\bfv{x}_t\bfv{x}_t^T} - \mu_t\mu_t^T$ \Comment Estimate the marginal distribution as a Gaussian \State {\bfseries Compute:} $\deriv{\expect{c_t}}{\mu_t}$ and $\deriv{\expect{c_t}}{\Sigma_t}$, e.g. by sampling from this Gaussian, and using the RP gradient \For{{\bfseries each} particle $i$} \State $\bfv{m}_{i,t}$ = $\bfv{x}_{i,t}-\mu_t$; $\bfv{v}_{i,t}$ = $\textup{vec}\left(\bfv{x}_{i,t}\bfv{x}_{i,t}^T - \expect{\bfv{x}_t\bfv{x}_t^T}\right)$; $\bfv{w}_{i,t} = \textup{vec}\left(\bfv{m}_{i,t}\mu_t^T\right)$ \Comment $\textup{vec}(*)$ is a vectorization operator which stacks the elements in a matrix/tensor into a column vector \State $g_{i,t} = \deriv{\expect{c_t}}{\mu_t}\bfv{m}_{i,t} + \deriv{\expect{c_t}}{\Sigma_t}(\bfv{v}_{i,t}-2\bfv{w}_{i,t})$ \Comment $g$ is a scalar replacing the usual cost/reward \State $G_{i,t} = G_{i,t+1} + g_{i,t}$ \Comment $G$ is the return (the cost of the remaining trajectory) \State $\deriv{\expect{c_t}}{\bfv{x}_{i,t}} = \deriv{\expect{c_t}}{\mu_t}\deriv{\mu_t}{\bfv{x_{i,t}}} + \deriv{\expect{c_t}}{\Sigma_t}\deriv{\Sigma_t}{\bfv{x_{i,t}}}$ \Comment Direct derivative of expected cost for the RP gradient \State $\deriv{\bfv{\zeta}_{i,t+1}}{\bfv{x}_{i,t}} = \pderivw{\bfv{\zeta}_{i,t+1}}{\bfv{x}_{i,t}} + \deriv{\bfv{\zeta}_{i,t+1}}{\bfv{u}_{i,t}}\deriv{\bfv{u}_{i,t}}{\bfv{x}_{i,t}}$ \State $\deriv{G_{i,t}^{RP}}{\zeta_{i,t}} = (\deriv{G_{i,t+1}}{\zeta_{i,t+1}} \deriv{\zeta_{i,t+1}}{\bfv{x}_{i,t}} + \deriv{\expect{c_t}}{\bfv{x}_{i,t}})\deriv{\bfv{x}_{i,t}}{\zeta_{i,t}}$ \State $\deriv{G_{i,t}^{LR}}{\zeta_{i,t}} = G_{i,t}\deriv{\log \textup{p}(\bfv{x}_{i,t})}{\zeta_{i,t}}$ \Comment In principle, one could further subtract a baseline from $G$ \State $\deriv{G_{i,t}^{RP}}{\theta} = \deriv{G_{i,t}^{RP}} {\zeta_{i,t}}\deriv{\zeta_{i,t}}{\bfv{u}_{i,t-1}}\deriv{\bfv{u}_{i,t-1}}{\theta}$ \State $\deriv{G_{i,t}^{LR}}{\theta} = \deriv{G_{i,t}^{LR}} {\zeta_{i,t}}\deriv{\zeta_{i,t}}{\bfv{u}_{i,t-1}}\deriv{\bfv{u}_{i,t-1}}{\theta}$ \EndFor \State $\sigma^2_{RP} = \text{trace}(\variance{\deriv{G_{i,t}^{RP}}{\theta}})$; $\sigma^2_{LR} = \text{trace}(\variance{\deriv{G_{i,t}^{LR}}{\theta}})$ \Comment The sample variance of the particles \State $k_{LR} = 1/\left(1+\frac{\sigma^2_{LR}}{\sigma^2_{RP}}\right)$ \Comment Weight to combine LR and RP estimators \State $\deriv{J}{\theta} = \deriv{J}{\theta} + k_{LR}\frac{1}{P}\sum_i^P \deriv{G_{i,t}^{LR}}{\theta} + (1-k_{LR})\frac{1}{P}\sum_i^{P} \deriv{G_{i,t}^{RP}}{\theta}$ \Comment Combine LR and RP in $\theta$ space \For{{\bfseries each} particle $i$} \State $\deriv{G_{i,t}}{\zeta_{i,t}} = k_{LR}\deriv{G_{i,t}^{LR}}{\zeta_{i,t}} + (1-k_{LR})\deriv{G_{i,t}^{RP}}{\zeta_{i,t}}$ \Comment Combine LR and RP in state space \EndFor \EndFor \end{algorithmic} \end{algorithm} \section{Experiments} We performed model-based RL simulation experiments from the PILCO papers \cite{deisenroth2011pilco, deisenroth2015gppilco}. We tested the cart-pole swing-up and balancing problems to test our GS approach, as well as combinations with total propagation \cite{pipps}. We also tested the DEL approach on the simpler cart-pole balancing-only-problem to show the feasibility of the idea. We compared particle-based gradients with our new estimators to PILCO. In our previous work \cite{pipps}, we had to change the cost function to obtain reliable results using particles---one of the primary motivations of the current experiments was to match PILCO's results using the same cost as the original PILCO had used (this is explained in greater detail in Section~\ref{discuss}). \subsection{Model-based policy search background} We consider a model-based analogue to the model-free policy search methods introduced in Section~\ref{reltopol}. The corresponding probabilistic computation graph is given in Fig.~\ref{modelbasedpol}. Our notation follows our previous work \cite{pipps}. After each episode all of the data is used to learn separate Gaussian process models \cite{gpbook} of each dimension of the dynamics, s.t. $\p{\Delta x_{t+1}^a} = \mathcal{GP}(\tilde{\bfv{x}}_t)$, where $\tilde{\bfv{x}} = [\bfv{x}_t^T,\bfv{u}_t^T]^T$ and $\bfv{x}\in\mathbb{R}^D$, $\bfv{u}\in\mathbb{R}^F$. This model is then used to perform "mental simulations" between the episodes to optimise the policy by gradient descent. We used a squared exponential covariance function $k_a(\tilde{\bfv{x}},\tilde{\bfv{x}}') = s_a^2\exp(-(\tilde{\bfv{x}} - \tilde{\bfv{x}}')^T\Lambda_a^{-1}(\tilde{\bfv{x}} - \tilde{\bfv{x}}'))$. We use a Gaussian likelihood function, with noise hyperparameter $\sigma_{n,a}^2$. The hyperparameters, $\{s, \Lambda, \sigma_n\}$ are trained by maximizing the marginal likelihood. The predictions have the form $\textup{p}(\bfv{x}_{t+1}^a) = \mathcal{N}(\mu(\tilde{\bfv{x}}_t), \sigma_f^2(\tilde{\bfv{x}}_t)+\sigma_n^2)$, where $\sigma_f^2(\tilde{\bfv{x}}_t)$ is an uncertainty about the model, and depends on the availability of data in a region of the state-space. \subsection{Setup} The cart-pole consists of a cart that can be pushed back and forth, and an attached pole. The state space is $[s, \beta, \dot{s}, \dot{\beta}]$, where $s$ is the cart position and $\beta$ the angle. The control is a force on the cart. The dynamics were the same as in a PILCO paper \cite{deisenroth2015gppilco}. The setup follows our prior work \cite{pipps}. \paragraph{Common properties in tasks} The experiments consisted of 1 random episode followed by 15 episodes with a learned policy, where the policy is optimized between episodes. Each episode length was 3s, with a 10Hz control frequency. Each task was evaluated separately 100 times with different random number seeds to test repeatability. The random number seeds were shared across different algorithms. Each episode was evaluated 30 times, and the cost was averaged, but note that this was done only for evaluation purposes---the algorithms only had access to 1 episode. The policy was optimized using an RMSprop-like learning rule \cite{tieleman2012rmsprop} from our previous work \cite{pipps}, which normalizes the gradients using the sample variance of the gradients from different particles. In the model-based policy optimization, we performed 600 gradient steps using 300 particles for each policy gradient evaluation. The learning rate and momentum parameters were $\alpha = 5\times10^{-4}$, $\gamma = 0.9$ respectively---the same as in our previous work. The output from the policy was saturated by $\textup{sat}(u) = 9\sin(u)/8 + \sin(3u)/8$, where $u = \tilde{\pi}(\bfv{x})$. The policy $\tilde{\pi}$ was a radial basis function network (a sum of Gaussians) with 50 basis functions and a total of 254 parameters. The cost functions were of the type $1 - \exp(-(\bfv{x}-\bfv{t})^TQ(\bfv{x}-\bfv{t}))$, where $\bfv{t}$ is the target. We considered two types of cost functions: 1) \textit{Angle Cost}, a cost where $Q = \textup{diag}([1,1,0,0])$ is a diagonal matrix, 2) \textit{Tip Cost}, a cost from the original PILCO papers, which depends on the distance of the tip of the pendulum to the position of the tip when it is balanced. These cost functions are conceptually different---with the \textit{Tip Cost} the pendulum could be swung up from either direction, with the \textit{Angle Cost} there is only one correct direction. The base observation noise levels were $\sigma_s = 0.01 ~\textup{m}$, $\sigma_\beta = 1 ~\textup{deg}$, $\sigma_{\dot{s}} = 0.1 ~\textup{m}/\textup{s}$, $\sigma_{\dot{\beta}} = 10 ~\textup{deg}/\textup{s}$, and these were modified with a multiplier $k\in\{10^{-2},1\}$, such that $\sigma^2=k\sigma^2_{base}$. \paragraph{Cart-pole swing-up and balancing} In this task the pendulum starts hanging downwards, and must be swung up and balanced. We took some results from our previous work \cite{pipps}: PILCO; reparameterization gradients (RP); Gaussian resampling (GR); batch importance weighted LR, with a batch importance weighted baseline (LR); total propagation combining BIW-LR and RP (TP). We compared to the new methods: Gaussian shaping gradients using the BIW-LR component (GLR), Gaussian shaping gradients combining BIW-LR and RP variants using total propagation (GTP). Moreover, we tested GTP when the model noise variance was multiplied by 25 (GTP$+\sigma_n$). \paragraph{Cart-pole balancing with DEL estimator} This task is much simpler---the pole starts upright and must be balanced. The experiment was devised to show that DEL is feasible and may be useful if further developed. The \textit{Angle Cost} and the base noise level were used. \subsection{Results} The results are presented in Table~\ref{cpexps} and in Fig.~\ref{learningeff}. Similarly to our previous work \cite{pipps}, with low noise, methods which include LR components do not work well. However, the GTP$+\sigma_n$ experiments show that injecting more noise into the model predictions can solve the problem. The main important result is that GTP matches PILCO in the \textit{Tip Cost} scenarios. In our previous work \cite{pipps}, one of the concerns was that TP had not matched PILCO in this scenario. Looking only at the costs in Fig.~\ref{swingupall} and \ref{swinguppeak} does not adequately display the difference. In contrast, the success rates show that TP did not perform as well. The success rates were measured both by a threshold which was calibrated in previous work (final loss below 15) as well as by visually classifying all experimental runs. Both methods agreed. The losses of the peak performers at the final episode were ~~~TP: $11.14\pm1.73$,~~~ GTP: $9.78\pm0.40$, ~~~PILCO: $9.10\pm0.22$, which also show that TP was significantly worse. While the peak performers were still improving, the remaining experiments had converged. PILCO still appears slightly more data-efficient; however, the difference has little practical significance as the required amount of data is low. Also note that in Fig.~\ref{swingupall} TP has smaller variance. The larger variance of GTP and PILCO is caused by outliers with a large loss. These outliers converged to a local minimum, which takes advantage of the tail of the Gaussian approximation of the state distribution---this contrasts with prior suggestions that PILCO performs exploration using the tail of the Gaussian \cite{deisenroth2011pilco}. \begin{table} \caption{Success rate of learning cart-pole swing-up} \vskip 0.1in \label{cpexps} \centering \begin{tabular}{llllllllll \toprule Cost func. & $\sigma_o^2$ multiplier & PILCO & RP & GR & LR & TP & GTP & GLR & GTP$+\sigma_n$\\ \midrule Angle Cost & $k = 10^{-2}$ & {\bf 0.88} & 0.69 & 0.63 & 0.57 & {\bf 0.82} & 0.65 & 0.42 & {\bf 0.88}\\ Angle Cost & $k = 1$ & 0.79 & 0.74 & 0.89 & {\bf 0.96} & {\bf 0.99} & {\bf 0.9} & {\bf 0.93} &\\ Tip Cost & $k = 10^{-2}$ & {\bf 0.92} & 0.44 & 0.47 & 0.36 & 0.54 & 0.6 & 0.45 & 0.8\\ Tip Cost & $k = 1$ & {\bf 0.73} & 0.15 & {\bf 0.68} & 0.28 & 0.48 & {\bf 0.69} & 0.35 &\\ \bottomrule \end{tabular} \vskip -0.1in \end{table} \begin{figure}[!t] \centering \begin{subfigure}{.32\textwidth} \includegraphics[width=\textwidth]{DELoutput.pdf} \caption{Cart-pole balancing only\\\mbox{}} \label{delbalancing} \end{subfigure} \begin{subfigure}{.32\textwidth} \includegraphics[width=\textwidth]{CartAlloutput3.pdf} \caption{Swing-up and balancing\\ \mbox{\hspace{2.4ex}} All experimental runs} \label{swingupall} \end{subfigure} \begin{subfigure}{.32\textwidth} \includegraphics[width=\textwidth]{CartPeakoutput3.pdf} \caption{Swing-up and balancing\\ \mbox{\hspace{2.4ex}} Top 40 experimental runs} \label{swinguppeak} \end{subfigure} \caption{Data-efficiency and performance of learning algorithms on cart-pole tasks. Figures~\ref{swingupall} and \ref{swinguppeak} correspond to the $k=1$, \textit{Tip Cost} case.} \label{learningeff} \end{figure} \subsection{Discussion} \label{discuss} Our work demystifies the factors which contributed to the success of PILCO. It was previously suggested that the Gaussian approximations in PILCO smooth the reward, and cause unimodal trajectory distributions, simplifying the optimization problem \cite{andrew,gal2016nnpilco}. In our previous work \cite{pipps}, we showed that the main advantage was actually that it prevents the curse of chaos/exploding gradients. In the current work we decoupled the gradient and reward effects, and provided evidence that both factors contributed to the success of Gaussian distributions. While GR often has similar performance to GTP, there is an important conceptual difference: GR performs resampling, hence the trajectory distribution is not an estimate of the true trajectory distribution. Moreover, unlike resampling, GTP does not remove the temporal dependence in particles, which may be important in some applications. \section{Conclusions \& future work} We have created an intuitive graphical framework for visualizing and deriving gradient estimators in a graph of probabilistic computations. Our method provides new insights towards previous policy gradient theorems in the literature. We derived new gradient estimators based on density estimation (DEL), as well as based on the idea to perform a \emph{jump estimation} to an intermediate node, not directly to the expected cost (GS). The DEL estimator needs to be further developed, but it has good conceptual properties as it should not suffer from the curse of chaos nor does it require injecting noise into computations. The GS estimator allows differentiating through discrete computations in a manner that will still allow backpropagating pathwise derivatives. Finally, we provided additional evidence towards demystifying the success of the popular PILCO algorithm. We hope that our work could lead towards new automatic gradient estimation software frameworks which are not only concerned with computational speed, but also the accuracy of the estimated gradients. \subsubsection*{Acknowledgments} We thank the anonymous reviewers for useful comments. This work was supported by OIST Graduate School funding and by JSPS KAKENHI Grant Number JP16H06563 and JP16K21738.
\section{Introduction} \label{sec:introduction}% Automatic detection of epileptic events in EEG data is a challenging problem. On the one hand the detection of all epileptic events, especially during live-monitoring sessions, is desireable. On the other hand not too many epilepsy alarms should be triggered. This represents a common classification problem aiming at high detection rate as well as a high specificity. Current approaches to solve this problem use very sophisticated techniques, like the combination of wavelet transform with classical machine learning classification approaches \cite{Ahmadi:2017,Acharya:2012PCA,Acharya:2012ICA} or instead with a deep convolutional neural network \cite{Acharya:2018}. Dimensionality reduction of deterministic multi-variate time-series is another ambitious problem. Most of the currently available tools of dimensionality reduction, like PCA~\cite{Pearson:1901} or ICA~\cite{Hyvaerinen.Oja:2000a} and modifications thereof, make a \emph{stochasticity} assumption on the time-series on which they can be applied. Presumably due to the lack of better matching techniques they are often used for dimensionality reduction of deterministic time-series even if its assumptions are not fulfilled. Recently~\cite{Seifert.Korn.Hartmann.Uhl:2018a} the authors proposed a new method for dimensionality reduction of deterministic time-series: dynamical component analysis (DyCA). This method relys on a determinacy assumption on the time-series. The projection onto a lower-dimensional space is then found by solving a generalized eigenvalue problem. The eigenvalues of the generalized eigenproblem of DyCA measure the quality of the assumption of linear determinism for the investigated data. For certain conditions the corresponding eigenvectors together with some linear transforms yield an optimal projection to represent the signal by a deterministic non-linear differential equation. Since EEG data during an epileptic event is known to be of deterministic structure~\cite{vanVeen.Liley:2006}, while the EEG data during normal activity is of stochastic nature, we assume that the detection of epileptic events might be possible by investigating the generalized eigenvalues of DyCA. In this article we examine this approach and demonstrate the power of DyCA with respect to the obtained trajectories in phase space by projecting the original signal onto the DyCA eigenvectors. The DyCA eigenvalues are utilized to implement a novel seizure detection algorithm and its results in terms of specificity, false discovery rate and miss rate are compared to other studies \cite{Acharya:2012PCA,Acharya:2012ICA,Acharya:2018}. The paper is structured as follows. In Section~\ref{sec:DyCA} we present the basic concepts underlying DyCA and demonstrate the formulation of the dimensionality reduction process. Section~\ref{sec:EpilepsyDeterminism} deals with the assumption and confirmation of a deterministic model of EEG data of epileptic seizures. In Section~\ref{sec:SeizureDetection} a DyCA-based method for detection of epileptic seizures is evaluated and compared. Finally the results are discussed (Section~\ref{sec:Discussion}) and concluded (Section~\ref{sec:Conclusion}). \section{Dynamical Component Analysis (DyCA)} \label{sec:DyCA}% Dynamical Component Analysis (DyCA) is a recently-proposed~\cite{Seifert.Korn.Hartmann.Uhl:2018a} method for dimensionality reduction of deterministic time-series and can be derived as follows. Assume, given a high-dimensional deterministic time-series $q(t) \in \mathbb{R}^N$ with dynamics governed by a low-dimensional system of ordinary differential equations, the signal can be decomposed into \begin{equation} \label{eq:DecompositionHighDimSignal} q(t) = \sum_{i=1}^{n} x_i(t) w_i \end{equation} using time-dependent amplitude $x_i(t)$ and vectors $w_i \in \mathbb{R}^N$ with $n \ll N$. The amplitudes are then assumed to be governed by a set of ordinary differential equations, divided into a set of linear differential equations, \begin{equation} \label{eq:LinearEquationsDynamics} \begin{split} \dot{x}_1 &= \sum_{k=1}^n a_{1,k} x_k \\ &\vdots \\ \dot{x}_m &= \sum_{k=1}^n a_{m,k} x_k , \end{split} \end{equation} and a set of non-linear differential equations with smooth functions~$f_i$: \begin{equation} \label{eq:NonlinearEquationsDynamics} \begin{split} \dot{x}_{m+1} &= f_{m+1}(x_1,\dots,x_n) \\ &\vdots \\ \dot{x}_n &= f_n(x_1,\dots,x_n). \end{split} \end{equation} Furthermore we assume that $m \geq n/2$, i.e.\, there exist more linear than non-linear equations, and that every amplitude $x_i$ associated to a non-linear equation appears in the right-hand side of at least one of the linear equations without knowing the coefficients $a_{i,k}$ or the smooth functions $f_i$. Then projection vectors, $u_i, v_j \in \mathbb{R}^N $, can be found containing the dynamics by minimizing the cost function \begin{equation} \label{eq:DyCACostFunction} D(u,v,a) = \frac{\timeavg{\norm{\dot{q}^\top u - \sum_j a_j q^\top v_j}_2^2}}{\timeavg{\norm{\dot{q}^\top u}_2^2}}, \end{equation} where $\timeavg{\argument}$ denotes the average over time. The rational behind this is that at a minimum of $D$ all the information on how to project onto the non-linear parts is contained in $\sum_j a_j q^\top v_j$ and for the linear parts it is contained in $\dot{q}^\top u$. The minima of $D$ for the vectors $u$ can be determined by a generalized eigenvalue problem \begin{equation} \label{eq:DyCAEigenproblem} C_1 C_0^{-1} C_1^\top u = \lambda C_2 u, \end{equation} with correlation matrices $C_0 = \timeavg{q q^\top}, C_1 = \timeavg{\dot{q} q^\top}$, and $C_2 = \timeavg{\dot{q} \dot{q}^\top}$. Furthermore there exists the connection $u = \lambda C_2^{-1} C_1 \sum_j a_j v_j$. Thus by projecting onto \begin{equation} \label{eq:DyCAProjectionSpace} \mathsf{span}\{u_1, \dots, u_m, C_1^{-1} C_2 u_1, \dots, C_1^{-1} C_2 u_m\} = \mathbb{R}^n \end{equation} all relevant information is received. On the other hand, the eigenvalues of the generalized eigenproblem~\eqref{eq:DyCAEigenproblem} reveal something more, as then the cost function~\eqref{eq:DyCACostFunction} takes the value \begin{equation} \label{eq:MinValueDyCACostFunction} D_{\min} = 1 - \lambda. \end{equation} Thus the number of the generalized eigenvalues with a value of approximately $1$ are a measure of the number of linear equations contained in the data. In the subsequent sections this connection will be exploited to detect regions in time-series with highly deterministic parts, like epileptic seizures. \section{Epilepsy - deterministic EEG data} \label{sec:EpilepsyDeterminism}% Unlike a first thought might suggest, during epileptic events the EEG data is much more regular than during normal phases. Indeed there are even models suggesting Shilnikov chaos to appear during epileptic seizures~\cite{vanVeen.Liley:2006,Friedrich.Uhl:1996a}. In its easiest form a system showing Shilnikov chaos can be described by a set of three differential equations of the form \begin{equation} \label{eq:ShilnikovChaos} \begin{split} \dot{x}_1 &= x_2 \\ \dot{x}_2 &= x_3 \\ \dot{x}_3 &= f(x_1,x_2,x_3), \end{split} \end{equation} with a non-linear smooth function $f$. Thus one can assume that the assumptions of DyCA are fulfilled and DyCA can be applied to epileptic EEG data. Fig.~\ref{fig:WindowedDyCAEpilepsy} presents the three largest eigenvalues of DyCA applied to a moving window of an EEG dataset with an epilectic seizure. Each investigated window has a length of three seconds and 90\,\% overlap. An epileptic seizure occurs in-between window number 600 to approx. 700. \begin{figure} \centering \includegraphics[width=0.45\textwidth]{Eigenvalues} \caption{The three largest eigenvalues of DyCA on moving windows of EEG data. In the background the Fz-electrode is shown in grey (right axis). } \label{fig:WindowedDyCAEpilepsy} \end{figure} \begin{figure*} \centering \includegraphics[width=\textwidth]{ProjectionComparison} \caption{The projected trajectory of DyCA compared with PCA and ICA trajectories. Only the DyCA projection resembles a homoclinic orbit of Shilnikov chaos. The color indicates the time evolution.} \label{fig:ShilnikovChaosHomoclinic} \end{figure*} A clear jump of the first three eigenvalues is observed during seizure. This confirms the assumed low-dimensional deterministic behaviour in ictal phases of the signal. This observation in one dataset is investigated on a broader data basis in section~\ref{sec:SeizureDetection} and a possible application of DyCA as seizure detection algorithm is discussed. Considering the ODE~\eqref{eq:ShilnikovChaos} as a model of the epileptic seizure, two eigenvalues are expected to be close to the value of $1$. Fig.~\ref{fig:WindowedDyCAEpilepsy} shows this behavior within the seizure: the blue and the red line representing the two largest eigenvalues are clearly closer to the value of 1 than the third eigenvalue. By choosing an appropriate threshold, DyCA allows for an identification of projection vectors leading to amplitudes which obey a linear set of ODEs. Fig.~\ref{fig:ShilnikovChaosHomoclinic} shows on the right hand side the three-dimensional trajectory of the amplitudes corresponding to the eigenvectors $u_1$ and $u_2$ and vector $v_1$. The structure of the trajectory is clearly observable and the typical homoclinic orbit of Shilnikov chaos is shown. DyCA represents a significant improvement compared to the 3D-trajectories in phase space spanned by the projection onto the first three PCA vectors or the best ICA vectors. \section{Detection of seizure events} \label{sec:SeizureDetection}% We now investigate the utilization of the DyCA-eigenvalues for the detection of epileptic seizure events. For this a moving window frame runs over the data and the DyCA eigenvalues are calculated on the current window. The largest eigenvalues are compared against a threshold. If the eigenvalues are larger than the threshold, it is assumed that the current window contains an epileptic seizure. To measure the quality of the classification method specificity (SPC), false discovery rate (FDR) and miss rate/false negative rate (FNR) were calculated. The specificity is the number of windows correctly classified as not containing a seizure relative to the number of windows not containing a seizure. The false discovery rate is the ratio of windows falsely classified as containing a seizure over all windows classified as containing a seizure. The miss rate is the number of windows falsely classified as not containing a seizure in relation to the number of all windows containing a seizure. In our test setting DyCA detection was applied on six EEG data sets of patients with absences, which are a special kind of epileptic seizures. The mean length of the data sets is 411 seconds containing absences of length ranging from 4 to 25 seconds. The size of the moving window was taken as three seconds. As step size for the movement of the window 10~\% of the window size were taken. This results in windows having 90~\% overlap. A window was labeled as seizure if the whole window was contained in the pre-labeled seizure. That is windows contained only partly in the seizure are labeled as not being in the seizure. This results in a mean prevalence of $2.32 \pm 2.18~\%$. No further pre-processing techniques, like filtering, were applied to the data. On each window the DyCA eigenvalues were compared to a threshold. In Fig.~\ref{fig:1lambda} the SPC, FDR, and FNR are shown for classification if only the largest eigenvalue is compared against the threshold. Analogously Fig.~\ref{fig:2lambda} shows SPC, FDR, and FNR for classification comparing the two largest eigenvalues against the threshold. \begin{figure} \centering \includegraphics[width=0.45\textwidth]{ErrorBarPlot} \caption{The specificity (green), false discovery rate (blue), and miss rate (red) plotted against the threshold for the largest eigenvalue. The shaded area shows the standard deviation with respect to different data sets.} \label{fig:1lambda} \end{figure} \begin{figure} \centering \includegraphics[width=0.45\textwidth]{ErrorBarPlot2} \caption{The specificity (green), false discovery rate (blue), and miss rate (red) plotted against the threshold for the two largest eigenvalues. The shaded area shows the standard deviation with respect to different data sets.} \label{fig:2lambda} \end{figure} \section{Discussion} \label{sec:Discussion}% Considering the small prevalence the results in Fig.~\ref{fig:1lambda} and Fig.~\ref{fig:2lambda} indicate that the two largest eigenvalues should be considered, since then the specificity reaches 99~\%. This supports from a data-driven point of view the theoretical considerations in \cite{vanVeen.Liley:2006}. The choice of the threshold can be adapted to the application in mind. If the detection of all seizures as soon as possible is wanted and false alarms are acceptable the threshold should be lowered. If one is only interested in finding examples of appearing seizures a higher threshold should be chosen. The high standard deviation and relative high values of the false discovery rate is due to the labeling process of the windows. Since requiring that the whole window is contained in the seizure, windows containing only small parts outside the seizure are labeled as no seizure even though the deterministic part might be dominant. The detection algorithm can be adjusted to obtain a specificity of nearly 99.7~\% and still have a miss rate of 20~\%. \section{Conclusion} \label{sec:Conclusion}% In this paper we presented dynamical component analysis (DyCA) as an alternative to PCA and ICA reducing the dimensionality of multi-variate time series based on the assumption of an underlying dynamical system. Comparing the 3D-trajectories in phase space we obtained by DyCA more obvious structures than obtained by PCA and ICA (Fig.~\ref{fig:ShilnikovChaosHomoclinic}). Applying DyCA to EEG data of epileptic seizures we implemented a novel seizure detection algorithm and obtained good results (specificity of nearly 99.7~\%) in comparison with other studies using more complex tools for detection: In \cite{Acharya:2018} using a deep convolutional neural network for detection, a specificity of only 90~\% was reached. Further studies used wavelet transform or wavelet packet decomposition combined with ICA~\cite{Acharya:2012ICA} or PCA~\cite{Acharya:2012PCA} and different classifiers. They reach a specificity of 97~\% with ICA and 99~\% with PCA as intermediate step. Generally, it might be advantageous for some applications to use DyCA instead of ICA or PCA as intermediate step for more refined classification methods. This is subject of work in progress and will be presented in upcoming papers. \vfill\pagebreak \bibliographystyle{IEEEbib}
\section{Introduction} Widespread sensor network applications such as health monitoring using wireless sensors \cite{amin2018robust} and the Internet of things (IoT)\cite{chandana2018weather}, as well as applications like stock market trading and vehicular networks \cite{du2015effective}, require sending several status updates to their designated recipients (called monitors). Outdated information in the monitoring facility may lead to undesired situations. As a result, having the data at the monitor as fresh as possible is crucial. In order to quantify the freshness of the received status update, the age of information(AoI) metric was introduced in~\cite{kaul2012real}. For an update received by the monitor, AoI is defined as the time elapsed since the generation of the update. AoI captures the timeliness of status updates, which is different from other standard communication metrics like delay and throughput. It is affected by the inter-arrival time of updates and the delay that is caused by queuing during update processing and transmission. In this paper, we consider AoI in a multiple-server network. We assume that a number of shared sources are sensed and then the data is transmitted to the monitor by $n$ independent servers. For example, the sources of information can be some shared environmental parameters, and independently operated sensors in the surrounding area obtain such information. For another example, the source of information can be the prices of several stocks which is transmitted to the user by multiple independent service providers. Throughout this paper, a sensor or a service provider is called a server, since it is responsible to serve this update to the monitor. We assume that status updates arrive at the servers independently according to Poisson random processes, and the server is modeled as a queue whose service time for an update is exponentially distributed. We assume information sources are independent and are sensed by $n$ independent servers. In \cite{kaul2012real}, authors considered the single-source single-server and first-come-first-serve (FCFS) queue model and determined the arrival rate that minimizes AoI. Different cases of multiple-source single-server under FCFS and last-come-first-serve (LCFS) were considered in \cite{yates2018age} and the region of feasible age was derived. In \cite{yates2018status, yates2018network}, the system is modeled as a source that submits status updates to a network of parallel and serial servers, respectively, for delivery to a monitor and AoI is evaluated. The parallel-server network is also studied in \cite{kam2016effect} when the number of servers is 2 or infinite, and the average AoI for FCFS queue model was derived. Authors in \cite{kadota2016minimizing} formulated a discrete-time decision problem in order to find a scheduling policy for minimizing the expected weighted sum of AoI. A multi-source multi-hop setting in broadcast wireless networks was investigated in \cite{farazi2018age} and a fundamental lower bound on the average AoI was derived. Different scheduling policies with throughput constraints were considered in \cite{kadota2018optimizing} to minimize AoI. Another age-related metric of peak AoI was introduced in \cite{costa2016age}, which corresponds to the age of information at the monitor right before the receipt of the next update. The average peak AoI minimization in IoT networks and wireless systems was considered in \cite{abd2018average, he2016optimal}. The problem of minimizing the average age in energy harvesting sources by manipulating the update generation process was studied in \cite{wu2018optimal, feng2018minimizing}. Maximizing energy efficiency of wireless sensor networks that include constraints on AoI is investigated in \cite{valehi2017maximizing}. In this paper, we study the average age of information as in~\cite{kaul2012real}. We mainly consider LCFS with preemption in service (in short, LCFS) queue model, namely, upon the arrival of a new update, the server immediately starts to serve it and drops any old update being served. We derive a closed-form formula of the average AoI for LCFS and a single source. For multiple sources, AoI formula is derived for arbitrary number of sources and $n=2,3$ servers. In addition, the heterogeneous network with a single source is considered. To obtain the AoI, we use the stochastic hybrid system (SHS) analysis similar to \cite{yates2018status, yates2018age}. This paper is organized as follows. Section \ref{sec:preliminaries} formally introduces the system model of interest, and provides preliminaries on SHS. In subsection \ref{LCFS}, we derive the average age of information formula by applying SHS method to our model when we have a signle information source and the network is homogeneous. In subsection \ref{multiple} we derive AoI for arbitrary number of information sources when $n=2,3$. In section \ref{hetro-sec}, we investigate the heterogeneous network when we have a single source and $n=2,3$ and find the optimal arrival rate at each server when $n=2$. At the end, the conclusion follows in section \ref{conc}. \section{System Model and Preliminaries} \label{sec:preliminaries} Notation: in this paper, we use boldface for vectors, and normal font with a subscript for its elements. For example, for a vector $\mathbf{x}$, the $j$-th element is denoted by $x_j$. For non-negative integers $a$ and $b \geq a$, we define $[a:b] \triangleq \{a, \ldots, b\}$, $[a]\triangleq [1:a]$. If $a > b$, $[a:b] = \emptyset$. In this section, we first present our network model, and then briefly review the stochastic hybrid system analysis from \cite{yates2018age}. The network consists of $m$ information sources that are sensed by $n$ independent servers as illustrated in Figure \ref{fig2}. Updates after going through separate links are aggregated at the monitor side. The interest of this paper is the average AoI at the monitor. Server $j$ collects updates of source $i$ following a Poisson random process with rate $\lambda_{j}^{(i)}$ and the service time is an exponential random variable with average $\frac{1}{\mu_{j}}$, independent of all other servers, $j \in [n], i \in [m]$. A network is called homogeneous if $\lambda_{j}^{(i)}=\lambda^{({i})}, \mu_j=\mu$, for all $j \in [n], i \in [m]$, otherwise, it is heterogeneous. In case of a single source in a homogeneous network, we denote $\lambda^{({1})}$ simply by $\lambda$. Consider a particular source. Suppose the freshest update at the monitor at time $t$ is generated at time $u(t)$, the \emph{age of information} at the monitor (in short, AoI) is defined as $\Delta(t) =t-u(t)$, which is the time elapsed since the generation of the last received update. From the definition, it is clear that AoI linearly increases at a unit rate with respect to $t$, except some reset jumps to a lower value at points when the monitor receives a fresher update from the source. The age of information of our network is shown in Figure \ref{fig1}. Let $t_{1}, t_{2},\dots, t_N$ be the generation time of all updates at all servers in increasing order. The black dashed lines show the age of every update. Let $T_{1}, T_{2},\dots, T_N$ be the receipt time of all updates. The red solid lines show AoI. We note a key difference between the model in this work and most previous models. Updates come from different servers, therefore they might be out of order at the monitor and thus a new arrived update might not have any effect on AoI because a fresher update is already delivered. As an example, from the $6$ updates shown in Figure \ref{fig1}, \emph{useful} updates that change AoI are updates $1,3,4$ and $6$, while the rest are disregarded as their information when arrived at the monitor is obsolete. Thus among all the received updates for AoI analyses, we only need to consider the \emph{useful} ones that lead to a change in AoI. \begin{figure} \centering \includegraphics[width=0.42\textwidth]{model2.pdf} \caption{The $n$-server monitoring network with $S_{1},S_{2},...,S_{n}$ being the servers and $I_{1},I_{2},...,I_m$ being the independent information sources, sending the updates from the sources to the monitor.} \label{fig2} \end{figure} \begin{figure} \centering \includegraphics[width=0.4\textwidth]{AoI.eps} \caption{AoI for a network with $n$ servers.} \label{fig1} \end{figure} The average AoI is the limit of the average age over time $\Delta \triangleq \lim_{T \to \infty} \int_0^T \Delta(t) \big/ T$, and for a stationary ergodic system, it is also the limit of the average age over the ensemble $\Delta= \lim_{t \to \infty} \mathbb{E}[\Delta(t)]$. \begin{comment} Based on \cite[Thm. 1]{yates2018age} for a stationary ergodic status updating system we have: \begin{equation}\label{eq1} \Delta= \frac{\mathbb{E}{[YT]}+ \mathbb{E}{[Y^2]}/2}{\mathbb{E}{[Y]}}, \end{equation} where $Y$ is the inter-arrival time of useful updates at the monitor and $T$ is the time each useful update spends in the system. Calculating closed-form expressions of \eqref{eq1} is not tractable in general. \end{comment} In the paper, we view our system as a stochastic hybrid system (SHS) and apply a method first introduced in \cite{yates2018age} in order to calculate AoI. We can thus obtain the average AoI under LCFS with preemption in service, or in short, LCFS. In SHS, the state is composed of a discrete state and a continuous state. The discrete state $q(t) \in \mathcal{Q}$, for a discrete set $\mathcal{Q}$, is a continuous-time discrete Markov chain (e.g., to represent the number of idle servers in the network), and the continuous-time continuous state $\mathbf{x}(t) = [x_0(t),x_1(t),\dots,x_n(t)] \in \mathbb{R}^{n+1}$ is the stochastic process for AoI. We use $x_0(t)$ to represent the age at the monitor, and $x_j(t)$ for the age at the $j$-th server, $j=1,2,\dots,n$. Graphically, we represent each state $q \in \mathcal{Q}$ by a node. For the discrete Markov chain $q(t)$, transitions happen from one state to another through directed transition edge $l$, and the time spent before the transition occurs is exponentially distributed with rate $\lambda{(l)}$. Note that it is possible to transit from the same state to itself. The transition occurs when an update arrives at a server, or an update is received at the monitor. Thus the transition rate is the update arrival rate or the service rate $\lambda{(l)} \in [\lambda_{1}^{(1)},...,\lambda_{n}^{(m)}, \mu_{1},...,\mu_{n}]$. Denoted by $L'_{{q}}$ and $L_{{q}}$ the sets of incoming and outgoing transitions of state $q$, respectively. When transition $l$ occurs, we write that the discrete state transits from $q_l$ to $q_l^\prime$. For instance, if we have $2$ states and considering the transition $l$ from state $1$ to state $2$, we have $q_{l}=1$ and $q_{l}^{\prime} = 2$ which shows that state $2$ is an outgoing transition for state $1$ and state $1$ is an incoming transition for state $2$. For a transition, we denote that the continuous state changes from $\mathbf{x}$ to $\mathbf{x}^\prime$. In our problem, this transition is linear in the vector space of $\mathbb{R}^{n+1}$, i.e., $\mathbf{x}^\prime=\mathbf{x}A_{l}$, for some real matrix $A_{l}$ of size $(n+1) \times (n+1)$. Note that when we have no transition, the age grows at a unit rate for the monitor and relevant servers, and is kept unchanged for irrelevant servers. Hence, within the discrete state $q$, $\mathbf{x}(t)$ evolves as a piece-wise linear function in time, namely, $\frac{\partial{\mathbf{x}(t)}}{\partial{t}} = \mathbf{b}_{q}$, for some $ \mathbf{b}_q \in \{0,1\}^{n+1}$. In other words, the age grows at a unit rate for the monitor and relevant servers; and the age is kept unchanged for irrelevant servers. For our purpose, we consider the discrete state probability \begin{equation} \pi_{\hat{q}} (t) \triangleq \mathop{\mathbb{E}}[\delta_{\hat{q},q(t)}] =P[q(t)=\hat{q}], \end{equation} and the correlation between the continuous state $\mathbf{x}(t)$ and the discrete state $q(t)$: \begin{equation} \mathbf{v}_{\hat{q}} = [v_{\hat{q}0} (t),\dots, v_{\hat{q}n} (t)] \triangleq \mathop{\mathbb{E}}[\mathbf{x}(t) \delta_{\hat{q},q(t)}]. \end{equation} Here $\delta_{\cdot,\cdot}$ denotes the Kronecker delta function. When the discrete state $q(t)$ is ergodic, $\mathbf{\pi}_q(t)$ converges uniquely to the stationary probability ${\mathbf{\pi}}_q$, for all $q \in \mathcal{Q}$. We can find these stationary probabilities from the following set of equations knowing that $\sum_{q \in \mathcal{Q}}^{}\pi_{q} = 1$, \begin{align*} {\mathbf{\pi}}_{{q}} \sum_{l \in L_{{q}}}^{} \lambda{(l)}= \sum_{l \in L^\prime_{{q}}}^{} \lambda{(l)} {\mathbf{\pi}}_{q_l}. \quad {q} \in \mathcal{Q} \end{align*} A key lemma we use to develop AoI for our LCFS queue model is the following from \cite{yates2018age}, which was derived from the general SHS results in \cite{hespanha2006modelling}. \begin{lemma} \label{lem:yates} \cite{yates2018age} If the discrete-state Markov chain $q(t)$ is ergodic with stationary distribution ${\pi}$ and we can find a non-negative solution of $ \{{\mathbf{v}}_{{q}}, {q} \in \mathcal{Q} \}$ such that \begin{equation}\label{eq:yateslemma} {\mathbf{v}}_{{q}} \sum_{l \in L_{{q}}}^{} \lambda{(l)}= \mathbf{b}_{{q}} {\pi}_{{q}} + \sum_{l \in L^\prime_{{q}}}^{} \lambda{(l)} {\mathbf{v}}_{q_l} A_{l}, \quad {q} \in \mathcal{Q}, \end{equation} then the average age of information is given by \begin{align} \Delta= \sum_{{q} \in \mathcal{Q}}^{} {v}_{{q} {0}}. \end{align} \end{lemma} \section{AoI in Homogeneous Networks} \subsection{Single Source Multiple Sensors} \label{LCFS} In this section, we present AoI calculation with the LCFS queue for the single-source $n$-server homogeneous network. In this network, upon arrival of a new update, each server immediately drops any previous update in service and starts to serve the new update. Note that to compute the average AoI, Lemma \ref{lem:yates} requires solving $|\mathcal{Q}|(n+1)$ linear equations of $ \{{\mathbf{v}}_{{q}}, {q} \in \mathcal{Q} \}$. To obtain explicit solutions for these equations, the complexity grows with the number of discrete states. Since the discrete state typically represents the number of idle servers in the system for homogeneous servers, $|\mathcal{Q}|$ should be $n+1$. In the following, we introduce a method inspired by \cite{yates2018status} to reduce the number of discrete states and efficiently describe the transitions. We define our continuous state $\mathbf{x}$ at a time as follows: the first element of $\mathbf{x}$ is AoI at the monitor ($x_{0}$), the second is always the freshest update among all updates in the servers, the third is always the second freshest update in the servers, etc. With this definition we always have $x_{1} \leq x_{2} \leq .... \leq x_{n}$, for any time. Note that the index $i$ of $x_i$ does not represent a physical server index, but the $i$-th smallest age of information among the $n$ servers. The physical server index for $x_i$ changes with each transition. We say that the server corresponding to $x_i$ is the $i$-th \emph{virtual} server. A transition $l$ is triggered by (i) the arrival of an update at a server, or (ii) the delivery of an update to the monitor. Recall that we use $\mathbf{x}$ and $\mathbf{x}'$ to denote AoI continuous state vector right before and after the transition $l$. When one update arrives at the monitor and the server for that update becomes idle, we put a \emph{fake update} to the server using the method introduced in \cite{yates2018status}. Thus we can reduce the calculation complexities and only have one discrete state indicating that all servers are virtually busy. We denote this state by $q=0$. In particular, we put the current update that is in the monitor to an idle server until the next update reaches this server. This assumption does not affect our final calculation for AoI, because even if the fake update is delivered to the monitor, AoI at the monitor does not change. When an update is delivered to the monitor from the $k$-th virtual server, the server becomes idle and as previously stated, receives the fake update. The age at the monitor becomes $x'_0=x_k$, and the age at the $k$-th server becomes $x'_k = x'_0=x_k$. In this scenario, consider the update at the $j$-th virtual server, for $j>k$. Its delivery to the monitor does not affect AoI since it is older than the current update of the monitor, i.e., $x_j \ge x_k = x'_0$. Hence, we can adopt a \emph{fake preemption} where the update for the $j$-th virtual server, for all $k \le j \le n$, is preempted and replaced with the fake current update at the monitor. Physically, these updates are not preempted and as a benefit, the servers do not need to cooperate and can work in a distributed manner. \begin{figure} \centering \includegraphics[width=0.2\textwidth]{figure2.png} \caption{SHS for our model with $n$ servers.} \label{fig3} \end{figure} \begin{table} \centering \begin{tabular}{ cccccccccc } $l$ & $\lambda{(l)}$ & $\mathbf{x}^\prime$ =$\mathbf{x}A_{l}$ \\ \hline $0$ & $\lambda$ & $[x_{0},0,x_{2},x_{3},x_{4},...,x_{n}]$ \\ \hline $1$ & $\lambda$ & $[x_{0},0,x_{1},x_{3},x_{4},...,x_{n}]$ \\ \hline $2$ & $\lambda$ & $[x_{0},0,x_{1},x_{2},x_{4},...,x_{n}]$ \\ \hline & $\vdots$ & $\vdots$ \\ \hline $n-1$ & $\lambda$ & $[x_{0},0,x_{1},x_{2},x_{3},..,x_{n-1}]$ \\ \hline $n$ & $\mu$ & $[x_{1},x_{1},x_{1},x_{1},...,x_{1}]$ \\ \hline $n+1$ & $\mu$ & $[x_{2},x_{1},x_{2},x_{2},...,x_{2}]$ \\ \hline $n+2$ & $\mu$ & $[x_{3},x_{1},x_{2},x_{3},...,x_{3}]$ \\ \hline & $\vdots$ & $\vdots$ \\ \hline $2n-1$ & $\mu$ & $[x_{n},x_{1},x_{2},x_{3},...,x_{n}]$ \\ \end{tabular} \caption{Table of transformation for the Markov chain in Figure~\ref{fig3}.} \label{table:table 1} \end{table} By utilizing virtual servers, fake update, and fake preemption, we reduce SHS to a single discrete state with linear transition $A_l$. We illustrate our SHS with discrete state space of $Q=\{0\}$ in Figure \ref{fig3}. The stationary distribution ${\pi}_{0}$ is trivial and ${\pi}_{0}=1$. We set $\mathbf{b}_{q}=[1,...,1]$ which indicates that the age at the monitor and the age of each update in the system grows at a unit rate. The transitions are labeled $l \in \{0,1,...,2n-1\}$ and for each transition $l$ we list the transition rate and the transition mapping in Table \ref{table:table 1}. For simplicity, we drop the index $q=0$ in the vector $\mathbf{v}_0$, and write it as $\mathbf{v}=[v_0,v_1,\dots,v_n]$. Because we have one state, $\mathbf{x}A_{l}$ and $\mathbf{v}A_{l}$ are in correspondence. Next, we describe the transitions in Table \ref{table:table 1}. {\bf Case I.} $l=0,1,..,n-1:$ When a fresh update arrives at virtual server $l+1$, the age at the monitor remains the same and $x_{l+1}$ becomes zero. This server has the smallest age, so we take this zero and reassign it to the first virtual server, namely, $x^\prime_{1}=0$. In fact virtual servers $1,2,\dots,l+1$ all get reassigned virtual server numbers. Specifically, after transition $l$, virtual server $l+1$ becomes virtual server $1$, and virtual server $1$ becomes virtual server $2$,..., virtual server $l$ becomes virtual server $l+1$. The transition rate is the arrival rate of the update, $\lambda$. The matrix $A_l$ is \vspace{-0.35cm} \begin{footnotesize} \begin{align} \bordermatrix{ ~ & 0 & 1 & 2 & \dots & l+1 & l+2 & \dots & n \cr 0 & 1 & & & & & & & \cr 1 & & 0 & 1 & & & & & \cr \vdots & & & & \ddots & & & & \cr l & & & & & 1 & & & \cr l+1 & & & & & & 0 & & \cr l+2 & & & & & & 1 & & \cr \vdots & & & & & & & \ddots & \cr n & & & & & & & & 1 \cr }. \end{align} \end{footnotesize} \vspace{-0.35cm} \noindent{\bf Case II.} $l=n,n+1,..,2n-1:$ When an update is received at the monitor from virtual server $l+1-n$, the age at the monitor changes to $x_{l+1-n}$ and this server becomes idle. Using fake updates and fake preemption we assign $x'_{j}=x_{l+1-n}$, for all $l+1-n \le j \le n$. The transition rate is the service rate of a server, $\mu$. The matrix $A_l$ is \vspace{-0.25cm} \begin{footnotesize} \begin{align} \bordermatrix{ ~ & 0 & 1 & \dots & l-n & l+1-n & \dots & n \cr 0 & 0 & & & & & & \cr 1 & & 1 & & & & & \cr \vdots & & & \ddots & & & & \cr l-n & & & & 1 & & & \cr l+1-n & 1 & 0 & \dots & 0 & 1 & \dots & 1 \cr l+2-n & 0 & & \dots & \dots & \dots & \dots & 0 \cr \vdots & \vdots & & & & & & \vdots \cr n & 0 & & \dots & \dots & \dots & \dots & 0 \cr }. \end{align} \end{footnotesize} \vspace{-0.25cm} \noindent Below we state our main theorem on the average AoI for the single-source $n$-server network. \begin{theorem} \label{theory} The age of information at the monitor for homogeneous single-source $n$-server network where each server has a LCFS queue is: \vspace{-.3cm} \begin{small} \begin{align} \label{AoI_single_source} &AoI = \frac{1}{\mu} \left[ \frac{1}{n \rho} \sum\limits_{j = 1}^{n-1} \prod\limits_{i=1}^{j } \frac{\rho (n-i+1)}{i + (n-i) \rho}+ \frac{1}{n \rho} + \frac{1}{n^2 } \prod\limits_{i=1}^{n-1} \frac{\rho (n-i+1)}{i + (n-i) \rho} \right], \end{align} \end{small} \vspace{-.3cm} \noindent where $\rho = \frac{\lambda}{\mu}$. \end{theorem} \begin{proof} Recall that $\mathbf{v}$ denotes the vector $\mathbf{v}_0$ for the single state $q=0$. By Lemma \ref{lem:yates} and the fact that there is only one state, we need to calculate the vector $\mathbf{v}$ as a solution to \eqref{eq:yateslemma}, and the $0$-th coordinate $v_{0}$ is AoI at the monitor. As we mentioned $\mathbf{v}A_{l}$ is in correspondence with $\mathbf{x}A_{l}$, so we have: \vspace{-.4cm} \begin{small} \begin{align} (n\lambda+n\mu){\mathbf{v}}= & \quad \quad [1,1,1,1,1,1,1,...,1] \nonumber \\ &+\lambda[v_{0},0,v_{2},v_{3},v_{4},...,v_{n}] \nonumber \\ &+\lambda[v_{0},0,v_{1},v_{3},v_{4},...,v_{n}] \nonumber \\ &+\lambda[v_{0},0,v_{1},v_{2},v_{4},...,v_{n}] \nonumber \\ & \quad \quad \quad \quad \vdots \quad \quad \quad \quad \quad \vdots \nonumber \\ &+\lambda[v_{0},0,v_{1},v_{2},v_{3},...,v_{n-1}] \nonumber \\ &+\mu[v_{1},v_{1},v_{1},v_{1},v_{1},...,v_{1}] \nonumber \\ &+\mu[v_{2},v_{1},v_{2},v_{2},v_{2},...,v_{2}] \nonumber \\ &+\mu[v_{3},v_{1},v_{2},v_{3},v_{3},...,v_{3}] \nonumber \\ & \quad \quad \quad \quad \vdots \quad \quad \quad \quad \quad \vdots \nonumber \\ &+\mu[v_{n},v_{1},v_{2},v_{3},...,v_{n-1},v_{n}] \label{eq:main}. \end{align} \end{small} \vspace{-.3cm} \noindent From the $0$-th coordinate of \eqref{eq:main}, we have $(n\lambda+n\mu)v_{0}= 1+n\lambda v_{0} + \mu \sum_{j=1}^{n} v_{j}$, implying \begin{align} v_{0}= \frac{1}{n\mu} + \frac{\sum_{j=1}^{n} v_{j}}{n} \label{eq3}. \end{align} From the $1$-st coordinate of \eqref{eq:main}, it follows that $v_{1}~=~\frac{1}{n\lambda}$. Then, to calculate $v_{0}$, we have to calculate $v_{i}$ for $i \in \{2,...,n\}$. From the $i$-th coordinate of \eqref{eq:main}, \vspace{-0.35cm} \begin{small} \begin{align} ((n-i+1)\lambda+(i-1)\mu) v_{i} = 1+ \mu \sum_{j=1}^{i-1} v_{j} +\lambda (n-i+1) v_{i-1}. \label{w2} \end{align} \end{small} \vspace{-0.4cm} \noindent For $i \in \{2,3,...,n-1\} $, from \eqref{w2}, we obtain \begin{align*} (i\mu +(n-i)\lambda)(v_{i+1}-v_{i}) = \lambda (n-i+1) (v_{i}-v_{i-1}) . \end{align*} Hence, $w_{i+1} \triangleq v_{i+1}-v_{i} =\frac{\lambda (n-i+1)}{(i\mu +(n-i)\lambda)} w_i$. \noindent Setting $i=2$ in \eqref{w2}, we have \begin{align} ((n-1)\lambda+\mu)v_{2}=1+ \mu v_{1} +\lambda (n-1)v_{1}. \label{w_2_source} \end{align} Simplifying \eqref{w_2_source}, we obtain $w_{2}=v_{2}-v_{1}=\frac{1}{(n-1)\lambda+\mu}$. Therefore, we write \begin{align} w_j &= \frac{1}{n \lambda} \prod\limits_{i=1}^{j-1} \frac{\lambda (n-i+1)}{i \mu + (n-i) \lambda}, 2 \le j \le n. \label{w_j} \end{align} Finally, setting $i=n$ in \eqref{w2}, \begin{align} (\lambda+ (n-1)\mu)v_{n}= 1+ \mu \sum_{j=1}^{n-1} v_{j}+ \lambda v_{n-1} , \end{align} implying $ \mu \sum_{i=1}^{n} v_{i} = \mu \sum_{j=1}^{n-1} v_{j}+\mu v_{n} = (\lambda+ (n-1)\mu)v_{n} + \mu v_{n} -1 - \lambda v_{n-1}. $ Hence, \begin{align}\label{eq2} \frac{1}{n} \sum_{i=1}^{n} v_{i} = \frac{\lambda}{n\mu} w_{n} +v_{n}-\frac{1}{n\mu}. \end{align} Combining \eqref{eq3} and \eqref{eq2}, we obtain the average AoI as \begin{align*} AoI = v_0=v_{n} +\frac{\lambda}{n\mu} w_{n} =\sum_{j=2}^{n} w_{j} +\frac{1}{n\lambda} +\frac{\lambda}{n\mu} w_{n}, \end{align*} which is simplified to \eqref{AoI_single_source} using \eqref{w_j}. \end{proof} Figure \ref{fig4} shows AoI when the total arrival rate $n\lambda$ is fixed and $n=1,2,3,4,10$. We observe that for up to $4$ servers, a significant decrease in AoI occurs with the increase of $n$. However, increasing the number of servers beyond $4$ provides only a negligible decrease in AoI. \begin{figure} \centering \includegraphics[width = 0.43\textwidth]{lcfs.eps} \caption{AoI versus the number of servers, for fixed total arrival rate. For each server, the service rate $\mu=1$ and the total arrival rate $n\lambda$ is shown in the x-axis.} \label{fig4} \end{figure} In Figure \ref{fig6}, LCFS (with preemption in service), LCFS with preemption in waiting, and FCFS queue models are compared numerically. As can be seen from the figure, LCFS outperforms the other two queue models, which coincides with the intuition that exponential service time is memoryless and older updates in service should be preempted. Moreover, we observe that the optimal arrival rate for FCFS queue is approximately $0.5$ for all $n \le 50$. \begin{figure} \centering \includegraphics[width=0.45\textwidth]{compare_all.eps} \caption{Comparison of LCFS, FCFS, and LCFS with preemption in waiting (LCFS-W). The number of servers is $n=4$ and $\mu=1$ for each server.} \label{fig6} \end{figure} \subsection{Multiple Sources Multiple Sensors} \label{multiple} In this subsection, we present AoI calculation with the LCFS queue for the $m$-source $n$-server homogeneous network. The arrival rate of source $i$ at any server is $ \lambda_{j}^{(i)}= \lambda^{(i)} $, for all $i~\in~[m], j~\in ~[n]$. The arrival rate of the sources other than source $i$ is $\overline{\lambda^{(i)}} ~\triangleq~\sum_{i' \neq i} \lambda^{(i')}, i~ \in~[m]$. The service rate at any server is $\mu$. Let $\Delta_{i}$ denote the average AoI at the monitor for source $i~ \in~[m]$. Without loss of generality, we calculate $\Delta_1$ for source $1$. In the queue model, upon arrival of a new update from any source, each server immediately drops any previous update in service and starts to serve the new update. The continuous state $\mathbf{x}$ represents the age for source $1$, and similar to the single-source case, it is defined as follows: $x_0$ is AoI of source $1$ at the monitor, $x_1$ is the age of the freshest update among all updates of source $1$ in the servers, $x_2$ corresponds to the second freshest update in the servers, etc. Therefore $x_{1} \leq x_{2} \leq .... \leq x_{n}$, for any time. Using fake updates and fake preemption as explained in Section~\ref{LCFS}, we obtain an SHS with a single discrete state and $3n$ transitions described below: \begin{comment} \begin{itemize} \item $0\le l \le n-1$: A fresh update arrives at virtual server $1 \le l+1 \le n$ from source 1: this fresh update becomes the freshest update: so $x_1' = 0$. Now, the old freshest update becomes the second freshest update, that is $x_2' = x_1$, and so on. Then $\mathbf{x}' = [x_0,0, x_1, \ldots,x_{l}, x_{l+2}, \ldots,x_{n } ]$. The transition rate is~$\lambda^{(1)}$. \item $n\le l \le 2n-1$: A fresh update arrives at virtual server $1 \le l+1-n \triangleq l' \le n$ from source $i \neq 1$: The age at the source does not change $x_0' = x_0$. The $l'$-th freshest update is lost. Moreover, if the virtual server $l'$ does complete service, it does not reduce the age of the process of interest. Thus, the $l'$-th virtual server becomes the $n$-th virtual server. Therefore, we have $\mathbf{x}' = [x_0,x_1, \ldots, x_{l' -1}, x_{l' +1} \ldots , x_{n}, x_0]$. The transition rate is $\overline{\lambda^{(1)}}$. \item $2 n\le l \le 3n-1$: the update in the $l+1-2n \triangleq h $ is delivered. The age $x_0$ is reset to $x_{h}$ and the virtual server $h$ becomes idle. using fake update and fake preemption, we reset $x_l' = x_h, h \le j \le n$. The transition rate is $\mu$. \end{itemize} \end{comment} {\bf Case I.} $l \in [0: n-1]$: A fresh update arrives at virtual server $l$ from source 1. This update is the freshest update, so $x_1' = 0$. Now, the previous freshest update becomes the second freshest update, that is $x_2' = x_1$, and so on. Then $\mathbf{x}' = [x_0,0, x_1, \ldots,x_{l}, x_{l+2}, \ldots,x_{n } ]$. The transition rate is~$\lambda^{(1)}$. {\bf Case II.} $l \in [n: 2n-1]$: A fresh update arrives at virtual server $l' \triangleq l+1-n$ from source $i \neq 1$. The age at the monitor does not change, namely, $x_0' = x_0$. The $l'$-th freshest update is preempted. Moreover, if the virtual server $l'$ does complete service, it does not reduce the age of the source of interest. Thus, the $l'$-th virtual server becomes the $n$-th virtual server with age $x_0$. Therefore, we have $\mathbf{x}' = [x_0,x_1, \ldots, x_{l' -1}, x_{l' +1} \ldots , x_{n}, x_0]$. The transition rate is $\overline{\lambda^{(1)}}$. {\bf Case III.} $l \in [2n: 3n-1]$: the update of source $1$ in virtual server $h \triangleq l+1-2n $ is delivered. The age $x_0$ is reset to $x_{h}$ and the virtual server $h$ becomes idle. Using fake update and fake preemption, we reset $x_l' = x_h, h \le j \le n$. The transition rate is $\mu$. Dropping the index $q=0$ and denoting $\mathbf{v}_0=\mathbf{v}=[v_0,v_1,\dots,v_n]$, the system of equations for the model is \begin{align} n \mu v_{0} &= 1 + \mu \sum_{i=1}^{n} v_{i} , \nonumber\\ v_{1}(\overline{\lambda^{(1)}}+n\lambda^{(1)})&=1+ \overline{\lambda^{(1)}}v_{2}, \nonumber\\ n (\lambda + \mu ) v_i &= 1 + (i-1) \lambda^{(1)} v_i + (n-i+1) \lambda^{(1)} v_{i-1} \nonumber\\ &+i \overline{\lambda^{(1)}} v_{i+1} + (n-i) \overline{\lambda^{(1)}} v_i \nonumber\\ &+ \mu \sum\limits_{j=1}^{i-1} v_j + (n-i+1) \mu v_i, \quad 2 \le i \le n, \label{equiv_system} \end{align} \noindent where $v_{n+1} \triangleq v_0$ and $\lambda=\overline{\lambda^{(1)}}+\lambda^{(1)}=\sum_{i=1}^{n} \lambda_i$. The theorems below state the average AoI for $n=2,3$ servers, and determine the optimal arrival rate given the sum arrival rate. \begin{theorem} \label{prop:all_2_servers} Let $AoI_{i}$ denote AoI at the monitor for source $i$. For $m$ information sources and $n=2$ servers, we have \begin{align} \Delta_{i} = \frac{1}{2 (\lambda + \mu)} + \frac{\lambda + \mu}{2 \mu \lambda^{(i)}}, \quad 1 \leq i \leq m. \label{all_2_servers} \end{align} \end{theorem} \begin{proof} From \eqref{equiv_system}, we write \begin{comment} \begin{align*} v_0 &= \frac{1}{n \mu} + \frac{v_1 +v_2}{n}, v_1 = \frac{1}{\lambda + \lambda_1} + \frac{\lambda_2 v_2 }{\lambda + \lambda_1} \\ v_2 &= \frac{1}{\lambda + \lambda_2 + \mu } + \frac{(\lambda_1 +\mu) v_1 }{\lambda + \lambda_2 + \mu } + \frac{n \lambda_2 v_0 }{\lambda + \lambda_2 + \mu } \end{align*} \end{comment} \begin{align*} n (\lambda + \mu) [v_0,v_1,v_2] &= [1,1,1] \\ +& \lambda^{(1)} [v_0, 0, v_2] \\ +& \lambda^{(1)} [v_0, 0, v_1] \\ +& \overline{\lambda^{(1)}} [v_0, v_2, v_0] \\ +& \overline{\lambda^{(1)}} [v_0, v_1, v_0] \\ +& \mu [v_1, v_1, v_1] \\ +& \mu [v_2, v_1, v_2] \end{align*} From the $0$-th coordinate, we have \begin{align*} n (\lambda + \mu)v_0 &= 1 + n \lambda v_0 + \mu (v_1 +v_2)\\ n \mu v_0 &= 1 + \mu (v_1 +v_2) \\ v_0 &= \frac{1}{n \mu} + \frac{v_1 +v_2}{n} \end{align*} From the $1$-st coordinate, we have \begin{align*} 2 (\lambda + \mu)v_1 &= 1 + \overline{\lambda^{(1)}} (v_1 +v_2) + 2 \mu v_1 \\ 2 \lambda v_1 &= 1 + \overline{\lambda^{(1)}} v_1 + \overline{\lambda^{(1)}} v_2 \\ (\lambda + \lambda^{(1)}) v_1 &= 1 + \lambda_2 v_2 \\ v_1 &= \frac{1}{\lambda + \lambda^{(1)}} + \frac{\overline{\lambda^{(1)}} v_2 }{\lambda + \lambda^{(1)}} \end{align*} From the $2$-nd coordinate, we have \begin{align*} 2 (\lambda + \mu)v_2 = 1 + \lambda^{(1)} (v_1 +v_2) + 2 \overline{\lambda^{(1)}} v_0 + \mu (v_1 +v_2) \\ 2 (\lambda + \mu)v_2 = 1 + (\lambda^{(1)} +\mu) v_1 + (\lambda^{(1)} +\mu ) v_2 + 2 \overline{\lambda^{(1)}} v_0 \\ ( \lambda + \overline{\lambda^{(1)}} + \mu )v_2 = 1 + (\lambda^{(1)} +\mu) v_1 + n \overline{\lambda^{(1)}} v_0 \\ v_2 = \frac{1}{\lambda + \overline{\lambda^{(1)}} + \mu } + \frac{(\lambda^{(1)} +\mu) v_1 }{\lambda + \overline{\lambda^{(1)}} + \mu } + \frac{n \overline{\lambda^{(1)}} v_0 }{\lambda + \overline{\lambda^{(1)}} + \mu } \end{align*} Solving these equations followed by algebraic simplifications results in \eqref{all_2_servers}. \end{proof} \begin{theorem} \label{prop:all_3_servers} For $m$ information sources and $n=3$ servers, we have \begin{align*} \Delta_i = \frac{1}{3 \mu} \frac{(5 \rho^{(1)} + 2 (\rho + 1)^2) (\rho + 1)}{2 \rho^3 + 5 \rho^{(1)} \rho + 2 \rho^{(1)}}, \quad 1 \leq i \leq m, \end{align*} where $\rho= \frac{\lambda}{\mu}$ and $\rho^{(i)}= \frac{\lambda^{(i)}}{\mu}$. \end{theorem} \begin{proof} \begin{align*} n (\lambda + \mu) [v_0,v_1,v_2,v_3] = &[1,1,1,1] \\ + \lambda^{(1)} & [v_0, 0, v_2, v_3] \\ + \lambda^{(1)} &[v_0, 0, v_1, v_3] \\ + \lambda^{(1)} &[v_0, 0, v_1, v_2] \\ + \overline{\lambda^{(1)}} & [v_0, v_2, v_3, v_0] \\ + \overline{\lambda^{(1)}} &[v_0, v_1, v_3,v_0] \\ + \overline{\lambda^{(1)}} &[v_0, v_1, v_2, v_0 ] \\ + \mu &[v_1, v_1, v_1, v_1] \\ + \mu &[v_2, v_1, v_2, v_2] \\ + \mu &[v_3, v_1, v_2, v_3]. \end{align*} At the $0$-th coordinate \begin{align*} n (\lambda + \mu) v_0 &= 1 + n\lambda v_0 + \mu (v_1 +v_2 +v_3) \\ n \mu v_0 &= 1 + \mu(v_1 +v_2 +v_3) \\ v_0 &= \frac{1}{n \mu} +\frac{v_1 +v_2 +v_3}{3} \end{align*} At the $1$-st coordinate \begin{align*} 3 (\lambda + \mu) v_1 &= 1 + \overline{\lambda^{(1)}} v_2 + 2 \overline{\lambda^{(1)}} v_1 + 3 \mu v_1 \\ 3 \lambda v_1 &= 1 + \overline{\lambda^{(1)}} v_2 + 2 \overline{\lambda^{(1)}} v_1 \\ (\lambda + 2 \lambda^{(1)} )v_1 &= 1 + \overline{\lambda^{(1)}} v_2 \\ v_1 &= \frac{1}{\lambda + 2 \lambda^{(1)}} + \frac{\overline{\lambda^{(1)}}}{\lambda + 2 \lambda^{(1)}}v_2 \end{align*} At the $2$-nd coordinate \begin{align*} 3 (\lambda + \mu) v_2 = 1 + \lambda^{(1)} v_2 + 2 \lambda^{(1)} v_1 + 2 \overline{\lambda^{(1)}} v_3\\ + \overline{\lambda^{(1)}} v_2 + \mu v_1 + 2 \mu v_2,\\ (3\lambda + 3 \mu -\lambda^{(1)} -\overline{\lambda^{(1)}}- 2 \mu) v_2 = 1+ \\ (2 \lambda^{(1)} + \mu) v_1 + 2 \overline{\lambda^{(1)}} v_3, \\ ( 2 \lambda + \mu) v_2 = 1 + (2 \lambda^{(1)} + \mu) v_1 + 2 \overline{\lambda^{(1)}} v_3 \\ \end{align*} At the $3$-rd coordinate \begin{align*} (3 \lambda + 3 \mu) v_3 = 1 + 2 \lambda^{(1)} v_3 + \lambda^{(1)} v_2 +\\ 3 \overline{\lambda^{(1)}} v_0 + \mu (v_1 + v_2 +v_3), \\ (3 \lambda + 3 \mu - 2 \lambda^{(1)} - \mu) v_3 = 1 + \mu v_1 + (\lambda^{(1)} + \mu) v_2 \\ (\lambda + 2 \overline{\lambda^{(1)}} + 2 \mu)v_3 = 1 + \mu v_1 + (\lambda^{(1)} + \mu) v_2 \end{align*} Then, we have \begin{align} v_0 = \frac{(\lambda + \mu) (2 \lambda^2 + 4 \lambda \mu + 2 \mu^2 + 5 \lambda^{(1)} \mu)}{6 \lambda^3 \mu + 15 \lambda^{(1)} \lambda \mu^2 + 6 \lambda^{(1)} \mu^3}, \end{align} And the age is \begin{align*} v_0 &= \frac{(\lambda + \mu) ( 2 (\lambda+ \mu)^2 + 5 \lambda^{(1)} \mu)}{3 \mu (2 \lambda^3 + 5 \lambda \lambda^{(1)} \mu + 2 \lambda^{(1)} \mu^2 ) } \\ &= \frac{(\lambda + \mu) ( 2 (\lambda+ \mu)^2 + 5 \lambda^{(1)} \mu)}{3 \mu (2 \lambda^{(1)} (\lambda + \mu)^2 + 2 \lambda^2 \overline{\lambda^{(1)}} + \lambda \lambda^{(1)} \mu )} \\ &= \frac{1}{3 \mu} \frac{(5 \rho^{(1)} + 2 (\rho + 1)^2) (\rho + 1)}{2 \rho^3 + 5 \rho^{(1)} \rho + 2 \rho^{(1)}}. \end{align*} \end{proof} \begin{theorem} \label{convex} Consider $m$ information sources and $n = 2$ servers. The optimal arrival rate ${\lambda^{(i)}}^*$ minimizing the weighted sum of AoIs in theorem \ref{prop:all_2_servers}, i.e., $w_1 \Delta_1 + w_2 \Delta_2+...+w_n \Delta_n$ for $w_i \geq 0$, subject to the constraint $\lambda^{(1)}+ \lambda^{(2)}+...+ \lambda^{(m)} = \lambda$, is given by \begin{align*} {\lambda^{(i)}}^{*}=\frac{\lambda \sqrt{w_i} }{\sum_{i=1}^{m} \sqrt{w_i}}, i \in [m]. \end{align*} \end{theorem} \begin{proof} The objective function that we are trying to minimize is convex (it is obvious from the second derivative matrix) and therefore we just have to put the derivative with respect to each $\lambda^{(i)}$ equal to zero. \begin{align} \label{deri} \frac{\partial}{\partial \lambda^{(i)}} ( w_1 \Delta_1 + w_2 \Delta_2+...+w_n \Delta_n +a(\sum_{i=1}^{n} \lambda^{(i)}-\lambda)) =0, \end{align} for i $\in [m]$. Simplifying \eqref{deri} results in: \begin{align} \frac{w_{1}}{(\lambda^{(1)})^{2}}= \frac{w_{2}}{(\lambda^{(2)})^{2}}=\dots=\frac{w_{n}}{(\lambda^{(n)})^{2}}=a. \end{align} Knowing the fact that $\lambda^{(1)}+ \lambda^{(2)}+...+ \lambda^{(m)} = \lambda$, we obtain the result in theorem~\ref{convex}. \end{proof} \section{Heterogeneous Network for a Single Source} \label{hetro-sec} In this section, we consider a single source and assume that the arrival and service rates of the servers are arbitrary. We denote by $\lambda_{j}^{(1)} \triangleq \lambda_j$ the arrival rate of the single source at server $j$, and $\mu_j$ the service rate of server $j \in [n]$. For this setting, we can no longer use the same technique used in the homogeneous case to reduce the state space and derive AoI. In particular, we need to keep track of the age of updates at the physical servers as well as their ordering, resulting in $n!$ number of states. In the following, we illustrate the steps for deriving AoI in the case of $n=2,3$ servers. \begin{theorem} Consider $m=1$ source and $n=2$ heterogeneous servers. The AoI is given by \begin{small} \begin{align} \label{single_soure_2_hetereg_servers} &\Delta= \\ &\frac{1}{\mu_{1}+\mu_{2}} + \frac{1}{\lambda_{1}+\lambda_{2}}+\frac{1}{\mu_{1}+\mu_{2}} \frac{1}{\lambda_{1}+\lambda_{2}} (\frac{\mu_{1}\lambda_{2}}{\lambda_{1}+\mu_{2}} + \frac{\mu_{2}\lambda_{1}}{\lambda_{2}+\mu_{1}}).\nonumber \end{align} \end{small} \end{theorem} \begin{proof} We define state $1$ as the state that server $1$ contains a fresher update compared to server $2$ and state $2$ as the state that server $2$ has the fresher update. Upon arrival of an update at each server or receipt of an update at the monitor, we observe some self-transition and intra-state transitions. Transitions rate and mappings are illustrated in Table~\ref{table2}. \vspace{0.25cm} \begin{table} \centering \begin{tabular}{ cccccccccc } $l$ & $\lambda{(l)}$ & Transition&$\mathbf{x}^\prime$ =$\mathbf{x}A_{l}$ & $v_{q_{l}} A_{l}$&\\ \hline $1$ & $\lambda_{1}$ & $1 \rightarrow 1 $ & $[x_{0},0,x_{2}]$ &$[v_{10},0,v_{12}]$&\\ \hline $2$ & $\lambda_{1}$ & $2 \rightarrow 1 $ & $[x_{0},0,x_{2}]$ &$[v_{20},0,v_{22}]$&\\ \hline $3$ & $\lambda_{2}$ & $1 \rightarrow 2 $&$[x_{0},x_{1},0]$ &$[v_{10},v_{11},0]$&\\ \hline $4$ & $\lambda_{2}$ & $2 \rightarrow 2 $&$[x_{0},x_{1},0]$ &$[v_{20},v_{21},0]$&\\ \hline $5$ & $\mu_{1}$ & $1 \rightarrow 1 $ & $[x_{1},x_{1},x_{1}]$ &$[v_{11},v_{11},v_{11}]$&\\ \hline $6$ & $\mu_{1}$ & $2 \rightarrow 2 $&$[x_{1},x_{1},x_{2}]$ &$[v_{21},v_{21},v_{22}]$&\\ \hline $7$ & $\mu_{2}$ & $1 \rightarrow 1 $&$[x_{2},x_{1},x_{2}]$ &$[v_{12},v_{11},v_{12}]$&\\ \hline $8$ & $\mu_{2}$ & $2 \rightarrow 2 $&$[x_{2},x_{2},x_{2}]$ &$[v_{22},v_{22},v_{22}]$& \\ \end{tabular} \caption{Table of transitions for $n=2$ heterogeneous servers.} \label{table2} \end{table} Steady states probabilities are found knowing that $\pi_{1}+\pi_{2}=1$ and $\pi_{1} \lambda_{2}= \pi_{2} \lambda_{1}$. Therefore, we will have $\mathbf{\pi}=[\frac{\lambda_{1}}{\lambda_{1}+\lambda_{2}}, \frac{\lambda_{2}}{\lambda_{1}+\lambda_{2}}]$. \begin{multline} (\lambda_{1}+\lambda_{2}+\mu_{1}+\mu_{2})\mathbf{v_{1}}= b_{1} \pi_{1}+ \lambda_{1}(v_{10},0,v_{12})+\lambda_{1}(v_{20},0,v_{22}) \\+ \mu_{1}(v_{11},v_{11},v_{11})+\mu_{2}(v_{12},v_{11},v_{12}) \end{multline} \begin{multline} (\lambda_{1}+\lambda_{2}+\mu_{1}+\mu_{2})\mathbf{v_{2}}= b_{2} \pi_{2}+ \lambda_{2}(v_{10},v_{11},0)+\lambda_{2}(v_{20},v_{21},0) \\+ \mu_{1}(v_{21},v_{21},v_{22})+\mu_{2}(v_{22},v_{22},v_{22}) \end{multline} Where $\mathbf{v_{1}}=(v_{10},v_{11},v_{12})$ and $\mathbf{v_{2}}=(v_{20},v_{21},v_{22})$. Therefore, we have six equations and six unknowns here. We can easily see that $v_{11}=\frac{\pi_{1}}{\lambda_{1}+\lambda_{2}}$ and $v_{22}=\frac{\pi_{2}}{\lambda_{1}+\lambda_{2}}$. \begin{align*} v_{12}&= \frac{\pi_{1}}{\lambda_{2}+\mu_{1}}+\frac{\lambda_{1}\pi_{2}}{(\lambda_{1}+\lambda_{2})(\lambda_{2}+\mu_{1})}+\frac{\mu_{1}\pi_{1}}{(\lambda_{1}+\lambda_{2})(\lambda_{2}+\mu_{1})} \\ &= \pi_{1} (\frac{1}{\lambda_{1}+\lambda_{2}} + \frac{1}{\lambda_{2}+\mu_{1}}) \end{align*} \begin{align*} v_{21}&=\frac{\pi_{2}}{\lambda_{1}+\mu_{2}}+\frac{\lambda_{2}\pi_{1}}{(\lambda_{1}+\lambda_{2})(\lambda_{1}+\mu_{2})}+\frac{\mu_{2}\pi_{2}}{(\lambda_{1}+\lambda_{2})(\lambda_{1}+\mu_{2})} \\ &= \pi_{2} (\frac{1}{\lambda_{1}+\lambda_{2}} + \frac{1}{\lambda_{1}+\mu_{2}}) \end{align*} \begin{equation*} (\lambda_{1}+\lambda_{2}+\mu_{1}+\mu_{2})v_{10}=\pi_{1}+\lambda_{1}v_{10}+\lambda_{1}v_{20}+\mu_{1}v_{11}+\mu_{2}v_{12} \end{equation*} \begin{equation*} (\lambda_{1}+\lambda_{2}+\mu_{1}+\mu_{2})v_{20}=\pi_{2}+\lambda_{2}v_{10}+\lambda_{2}v_{20}+\mu_{1}v_{21}+\mu_{2}v_{22} \end{equation*} We add this 2 equations together and simplify it. Age of Information at the monitor is equal to $v_{10}+v_{20}$ which is: \begin{align*} & AoI= \frac{1}{\mu_{1}+\mu_{2}}+ \frac{\mu_{1}(v_{11}+v_{21})+\mu_{2}(v_{12}+v_{22})}{\mu_{1}+\mu_{2}}= \\ &\frac{1}{\mu_{1}+\mu_{2}} + \frac{1}{\lambda_{1}+\lambda_{2}}+\frac{1}{\mu_{1}+\mu_{2}} \frac{1}{\lambda_{1}+\lambda_{2}} (\frac{\mu_{1}\lambda_{2}}{\lambda_{1}+\mu_{2}} + \frac{\mu_{2}\lambda_{1}}{\lambda_{2}+\mu_{1}}) \end{align*} \end{proof} Next, for $n=2$ servers, we find the optimal arrival rates of servers, ${\lambda_1}^{*},{\lambda_2}^{*}$, given fixed service rates $\mu_1,\mu_2$ and sum arrival rate $\lambda \triangleq \lambda_1+\lambda_2$. The optimal ${\lambda_1}^{*}$ is illustrated in Figure~\ref{optimal_lambda}. \begin{figure} \centering \includegraphics[width = 0.4\textwidth]{optim.eps} \caption{Optimal value of $\lambda_1$ as a function of $\mu_1$. $\lambda_1+\lambda_2=\lambda, \mu_1+\mu_2=100$.} \label{optimal_lambda} \end{figure} \begin{theorem} \label{thm:optimal_lambda_heto_n_2} For $m=1$ and $n=2$ heterogeneous servers, given $\mu_1,\mu_2$ and fixed $\lambda_1+\lambda_2=\lambda$, the optimal ${\lambda_{1}}^{*}$ satisfies \noindent $\bullet$ if $\mu_{1} < \mu_{2}$ and $\mu_{2}^2 - \frac{\mu_{1}(\lambda+\mu_{1})(\lambda+\mu_{2})}{\mu_{2}} < 0$, \begin{align*} {\lambda_{1}}^{*}=\frac{-(\mu_{2}+c(\lambda+\mu_{1}))+\sqrt{\mu_{1}(\lambda+\mu_{2})(2+\frac{\mu_{2}}{\lambda+\mu_{1}}+\frac{\lambda+\mu_{1}}{\mu_{2}})}}{1- \frac{\mu_{1}(\lambda+\mu_{2})}{\mu_{2}(\lambda+\mu_{1})}}, \end{align*} \noindent $\bullet$ if $\mu_{1} < \mu_{2}$ and $\mu_{2}^2 - \frac{\mu_{1}(\lambda+\mu_{1})(\lambda+\mu_{2})}{\mu_{2}} \geq 0: $ $ {\lambda_1}^{*}=0, {\lambda_2}^{*}=\lambda,$ \noindent $\bullet$ if $\mu_{1}>\mu_{2}$ and $\mu_{1}^2 \geq \frac{\mu_{2}(\lambda+\mu_{1})(\lambda+\mu_{2})}{\mu_{1}}:$ ${\lambda_{1}}^{*}=\lambda, {\lambda_{2}}^{*}=0,$ \noindent $\bullet$ if $\mu_{1}>\mu_{2}$ and $\mu_{1}^2 < \frac{\mu_{2}(\lambda+\mu_{1})(\lambda+\mu_{2})}{\mu_{1}}$. \begin{align*} {\lambda_{1}}^{*}= \lambda-\frac{-(\mu_{1}+\frac{(\lambda+\mu_{2})}{c})+\sqrt{\mu_{2}(\lambda+\mu_{1})(2+\frac{\mu_{1}}{\lambda+\mu_{2}}+\frac{\lambda+\mu_{2}}{\mu_{1}})}}{1- \frac{\mu_{2}(\lambda+\mu_{1})}{\mu_{1}(\lambda+\mu_{2})}}, \end{align*} \end{theorem} \noindent where $c= \frac{\mu_{1}(\lambda+\mu_{2})}{\mu_{2}(\lambda+\mu_{1})}$. \begin{proof} In order to find the optimal values of $\lambda_{1}$ and $\lambda_{2}$ for a given values of $\mu_1,\mu_{2}, \lambda$ where $\lambda_{1}+\lambda_{2}=\lambda$, we set the derivative of the following equation with respect to $\lambda_{1}$, $\lambda_{2}$ and $a$ to zero. \begin{align*} \frac{1}{\mu_{1}+\mu_{2}}+ \frac{\mu_{1}(v_{11}+v_{21})+\mu_{2}(v_{12}+v_{22})}{\mu_{1}+\mu_{2}} - a(\lambda_{1}+\lambda_{2}-\lambda) \end{align*} \begin{align*} \frac{\partial AoI}{\partial \lambda_{1}} = \frac{-1}{(\lambda_{1}+\lambda_{2})^2} -\frac{\mu_{1}\lambda_{2}(2\lambda_{1}+\lambda_{2}+\mu_{2})}{(\lambda_{1}+\lambda_{2})^2 (\lambda_{1}+\mu_{2})^2}\\+\frac{(\lambda_{2}+\mu_{1})(\mu_{2}\lambda_{2})}{(\lambda_{1}+\lambda_{2})^2 (\lambda_{2}+\mu_{1})^2}-a =0 \end{align*} \begin{align*} \frac{\partial AoI}{\partial \lambda_{2}} = \frac{-1}{(\lambda_{1}+\lambda_{2})^2} -\frac{\mu_{2}\lambda_{1}(2\lambda_{2}+\lambda_{1}+\mu_{1})}{(\lambda_{1}+\lambda_{2})^2 (\lambda_{2}+\mu_{1})^2}\\+\frac{(\lambda_{1}+\mu_{2})(\mu_{1}\lambda_{1})}{(\lambda_{1}+\lambda_{2})^2 (\lambda_{1}+\mu_{2})^2}-a =0 \end{align*} Also, we know that $\lambda_{1}+\lambda_{2}=\lambda$. With some algebraic simplification we reach to this $2nd$ order polynomial in order to find the optimal value of $\lambda_{1}$ and consequently $\lambda_{2}$. \begin{align} \label{opti} \lambda_{1}^2 (1-c)+ 2\lambda_{1} (\mu_{2}+c(\lambda+\mu_{1})) + \mu_{2}^2 - c(\lambda+\mu_{1})^2, \end{align} \noindent where $c= \frac{\mu_{1}(\lambda+\mu_{2})}{\mu_{2}(\lambda+\mu_{1})}$. When $c=1$ it is equivalent to $\mu_{1}=\mu_{2}$ and the equation \ref{opti} becomes a first order polynomial which results in $\lambda_{1}=\lambda_{2}= \frac{\lambda}{2}$. This polynomial has $2$ real roots because of its positive discriminant and therefore solving the equation \ref{opti} gives us $2$ possible candidate for our optimization problem. When $\mu_{1} < \mu_{2}$ then $c<1$. Knowing the fact that for $2$ roots of \ref{opti} we have, \begin{align*} r_{1}+r_{2} = \frac{\mu_2 + \frac{\mu_{1}(\lambda+\mu_{2})}{\mu_{2}}}{c-1}, \\ r_{1}r_{2} = \frac{\mu_{2}^2 - \frac{\mu_{1}(\lambda+\mu_{1})(\lambda+\mu_{2})}{\mu_{2}}}{1-c}. \end{align*} As a result, when $\mu_{1} < \mu_{2}$ and $\mu_{2}^2 - \frac{\mu_{1}(\lambda+\mu_{1})(\lambda+\mu_{2})}{\mu_{2}} \geq 0$, the $2$ roots are negative and therefore in this regime our optimal values become $\lambda_{1}=0, \lambda_{2}=\lambda$. When $\mu_{1} < \mu_{2}$ and $\mu_{2}^2 - \frac{\mu_{1}(\lambda+\mu_{1})(\lambda+\mu_{2})}{\mu_{2}} \geq 0$, the positive root is the optimal rate which is equal to: \begin{align*} \lambda_{1}=\frac{-(\mu_{2}+c(\lambda+\mu_{1}))+\sqrt{\mu_{1}(\lambda+\mu_{2})(2+\frac{\mu_{2}}{\lambda+\mu_{1}}+\frac{\lambda+\mu_{1}}{\mu_{2}})}}{1- \frac{\mu_{1}(\lambda+\mu_{2})}{\mu_{2}(\lambda+\mu_{1})}}. \end{align*} Similarly by writing the $2-nd$ order polynomial for $\lambda_{2}$, we reach to the conclusion that when $\mu_{1}>\mu_{2}$ , if $\mu_{1}^2 \geq \frac{\mu_{2}(\lambda+\mu_{1})(\lambda+\mu_{2})}{\mu_{1}}$ the optimal rates are $\lambda_{1}=\lambda, \lambda_{2}=0$. In the regime that $\mu_{1}>\mu_{2}$ and $\mu_{1}^2 < \frac{\mu_{2}(\lambda+\mu_{1})(\lambda+\mu_{2})}{\mu_{1}}$, the positive root is the optimal rate. \begin{align*} \lambda_{2}= \frac{-(\mu_{1}+\frac{(\lambda+\mu_{2})}{c})+\sqrt{\mu_{2}(\lambda+\mu_{1})(2+\frac{\mu_{1}}{\lambda+\mu_{2}}+\frac{\lambda+\mu_{2}}{\mu_{1}})}}{1- \frac{\mu_{2}(\lambda+\mu_{1})}{\mu_{1}(\lambda+\mu_{2})}}. \end{align*} \end{proof} \vspace{0.1cm} When $\mu_1=\mu_2$ the optimal rates that minimize AoI are ${\lambda_{1}}^{*}={\lambda_{2}}^{*}=\frac{\lambda}{2}$. As Figure \ref{optimal_lambda} illustrates, for $\mu_1=\mu_2=50$, optimal rates are ${\lambda_{1}}^{*}=\frac{\lambda}{2}$ and in the regimes that one of the service rates is much greater than the other one, AoI minimizes when all the updates are sent to the server with greater service rate. \begin{theorem} Consider $m=1$ source and $n=3$ heterogeneous servers. The AoI is given by \begin{align} \label{1_source_3_hetereg_servers} AoI=\frac{1}{\sum_{i=1}^{3} \mu_{i}} + \frac{\mu_{1}\sum_{j=1}^{6} v_{j1}+\mu_{2}\sum_{j=1}^{6} v_{j2}+\mu_{3}\sum_{j=1}^{6} v_{j3}}{\sum_{i=1}^{3} \mu_{i}} \end{align} \end{theorem} \begin{proof} In this case, we'll have $6$ states and have to solve $24$ equations to find $24$ unknowns. It seems quite troublesome to solve $24$ equations, however it seems to be quite straightforward. We have $18$ transitions for arrivals(we have $6$ states and $3$ servers) and $18$ transitions for arrivals at the monitor(depending on update coming from which server and which state it was before). For the sake of simplicity we define our states as $(1,2,3)$ equal to state $1$ which means update in server $1$ is the freshest update and update in server $2$ is the second freshet update. $(1,3,2)$ equal to state $2$ indicating that age of information in each server follows the order of $x_{1}\leq x_{3}\leq x_{2}$. $(2,1,3)$ equal to state $3$, $(2,3,1)$ state $4$, $(3,1,2)$ state $5$, and $(3,2,1)$ state $6$. After each transitions $\mathbf{x}$ changes to $\mathbf{x^\prime}$. When a new update arrives at server $i$ with rate $\lambda_{i}$, $x_{0}$ remains the same no matter which state we were at, $x_{i}$ becomes zero and the rest remains unchanged. For example if $i=1$, $x_{2}$ and $x_{3}$ remain unchanged. When an update arrives at the monitor from server $i$ with rate $\mu_{i}$, $x_{0}$ takes the value of age ($x_{i}$) of the received update. All the servers that have larger "age" will be preempted and on the vector $\mathbf{x^\prime}$ their value becomes equal to $x_{i}$ which is equivalent to consider a fake update inserted into to those servers after preemption. First we need to calculate our steady state probabilities. After writing down the equations and some simplifications, we will reach to the following equations: \begin{align*} \pi_{1} (\lambda_{2}+\lambda_{3}) = \lambda_{1} (\pi_{3}+\pi_{4}) \\ \pi_{2} (\lambda_{2}+\lambda_{3}) = \lambda_{1} (\pi_{5}+\pi_{6}) \\ \pi_{3} (\lambda_{1}+\lambda_{3}) = \lambda_{2} (\pi_{1}+\pi_{2}) \\ \pi_{4} (\lambda_{1}+\lambda_{3}) = \lambda_{2} (\pi_{5}+\pi_{6}) \\ \pi_{5} (\lambda_{1}+\lambda_{2}) = \lambda_{3} (\pi_{1}+\pi_{2}) \\ \pi_{6} (\lambda_{1}+\lambda_{2}) = \lambda_{3} (\pi_{3}+\pi_{4}) \\ \end{align*} Knowing that $\sum_{i=1}^{6} \pi_{i} =1$, we can find all the steady states probabilities. \begin{align*} \pi_{1}=\frac{\lambda_{1}}{\lambda_{2}+\lambda_{3}} \frac{\lambda_{2}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}, \\ \pi_{2}=\frac{\lambda_{1}}{\lambda_{2}+\lambda_{3}} \frac{\lambda_{3}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}, \\ \pi_{3}=\frac{\lambda_{2}}{\lambda_{1}+\lambda_{3}} \frac{\lambda_{1}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}, \\ \pi_{4}=\frac{\lambda_{2}}{\lambda_{1}+\lambda_{3}} \frac{\lambda_{3}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}, \\ \pi_{5}=\frac{\lambda_{3}}{\lambda_{1}+\lambda_{2}} \frac{\lambda_{1}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}, \\ \pi_{6}=\frac{\lambda_{3}}{\lambda_{1}+\lambda_{2}} \frac{\lambda_{2}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}. \\ \end{align*} We can easily find these $6$ parameter values. \begin{align*} v_{11}=\frac{\pi_{1}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}, v_{21}= \frac{\pi_{2}}{\lambda_{1}+\lambda_{2}+\lambda_{3}} \\ v_{32}=\frac{\pi_{3}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}, v_{42}=\frac{\pi_{4}}{\lambda_{1}+\lambda_{2}+\lambda_{3}} \\ v_{53}=\frac{\pi_{5}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}, v_{63}=\frac{\pi_{6}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}. \end{align*} \begin{align*} v_{12}&=\frac{\pi_{1}+\lambda_{1}v_{32}+\lambda_{1}v_{42}+\mu_{1}v_{11}}{\lambda_{2}+\lambda_{3}+\mu_{1}}, \\ &= \pi_{1} (\frac{1}{\lambda_{1}+\lambda_{2}+\lambda_{3}} + \frac{1}{\lambda_{2}+\lambda_{3}+\mu_{1}})\\ v_{23}&=\frac{\pi_{2}+\lambda_{1}v_{53}+\lambda_{1}v_{63}+\mu_{1}v_{21}}{\lambda_{2}+\lambda_{3}+\mu_{1}}, \\ &= \pi_{2} (\frac{1}{\lambda_{1}+\lambda_{2}+\lambda_{3}} + \frac{1}{\lambda_{2}+\lambda_{3}+\mu_{1}})\\ v_{31}&=\frac{\pi_{3}+\lambda_{2}v_{11}+\lambda_{2}v_{21}+\mu_{2}v_{32}}{\lambda_{1}+\lambda_{3}+\mu_{2}}, \\ &= \pi_{3} (\frac{1}{\lambda_{1}+\lambda_{2}+\lambda_{3}} + \frac{1}{\lambda_{1}+\lambda_{3}+\mu_{2}})\\ v_{43}&=\frac{\pi_{4}+\lambda_{2}v_{53}+\lambda_{2}v_{63}+\mu_{2}v_{42}}{\lambda_{1}+\lambda_{3}+\mu_{2}}, \\ &= \pi_{4} (\frac{1}{\lambda_{1}+\lambda_{2}+\lambda_{3}} + \frac{1}{\lambda_{1}+\lambda_{3}+\mu_{2}})\\ v_{51}&=\frac{\pi_{5}+\lambda_{3}v_{11}+\lambda_{3}v_{21}+\mu_{3}v_{53}}{\lambda_{1}+\lambda_{2}+\mu_{3}}, \\ &= \pi_{5} (\frac{1}{\lambda_{1}+\lambda_{2}+\lambda_{3}} + \frac{1}{\lambda_{1}+\lambda_{2}+\mu_{3}})\\ v_{62}&=\frac{\pi_{6}+\lambda_{3}v_{32}+\lambda_{3}v_{42}+\mu_{3}v_{63}}{\lambda_{1}+\lambda_{2}+\mu_{3}}\\ &= \pi_{6} (\frac{1}{\lambda_{1}+\lambda_{2}+\lambda_{3}} + \frac{1}{\lambda_{1}+\lambda_{2}+\mu_{3}}). \end{align*} We calculated all the variables that are needed in this step for calculating these $6$ variables. \begin{align*} v_{13}=\frac{\pi_{1}+\lambda_{1}v_{33}+\lambda_{1}v_{43}+\mu_{1}v_{11}+\mu_{2}v_{12}}{\lambda_{2}+\lambda_{3}+\mu_{1}+\mu_{2}}, \\ v_{22}=\frac{\pi_{2}+\lambda_{1}v_{52}+\lambda_{1}v_{62}+\mu_{1}v_{21}+\mu_{3}v_{23}}{\lambda_{2}+\lambda_{3}+\mu_{1}+\mu_{3}},\\ v_{33}=\frac{\pi_{3}+\lambda_{2}v_{13}+\lambda_{2}v_{23}+\mu_{1}v_{31}+\mu_{2}v_{32}}{\lambda_{1}+\lambda_{3}+\mu_{1}+\mu_{2}}, \\ v_{41}=\frac{\pi_{4}+\lambda_{2}v_{51}+\lambda_{2}v_{61}+\mu_{2}v_{42}+\mu_{3}v_{43}}{\lambda_{1}+\lambda_{3}+\mu_{2}+\mu_{3}},\\ v_{52}=\frac{\pi_{5}+\lambda_{3}v_{12}+\lambda_{3}v_{22}+\mu_{1}v_{51}+\mu_{3}v_{53}}{\lambda_{1}+\lambda_{2}+\mu_{1}+\mu_{3}}, \\ v_{61}= \frac{\pi_{6}+\lambda_{3}v_{31}+\lambda_{3}v_{41}+\mu_{2}v_{62}+\mu_{3}v_{63}}{\lambda_{1}+\lambda_{2}+\mu_{2}+\mu_{3}}. \end{align*} Using the $12$ calculated variable before and also considering equations for $(v_{13},v_{33})$, $(v_{22},v_{52})$, and $(v_{41},v_{61})$ together we can calculate all these $6$ variables. AoI is equal to $\sum_{i=1}^{6} v_{i0}$. After writing equations for these $6$ variables and adding them together, we can finally calculate AoI. \begin{align*} AoI=\frac{1}{\sum_{i=1}^{3} \mu_{i}} + \frac{\mu_{1}\sum_{j=1}^{6} v_{j1}+\mu_{2}\sum_{j=1}^{6} v_{j2}+\mu_{3}\sum_{j=1}^{6} v_{j3}}{\sum_{i=1}^{3} \mu_{i}} \end{align*} \end{proof} \section{Conclusion} \label{conc} In this paper, we studied the age of information in the presence of multiple independent servers monitoring several information sources. We derived AoI for the LCFS queue model using SHS analysis when we had a homogeneous network and a single source. We also provided the AoI formula for $m$ sources and $n=2,3$ servers in a homogeneous network. For a heterogeneous network, cases of $n=2,3$ servers when we have a single source were investigated and AoI formula was derived. From the simulation, it is observed that LCFS outperforms LCFS with preemption in waiting and FCFS for a homogeneous single information source network. Future directions include deriving explicit formula of AoI for multiple sources in a homogeneous and heterogeneous sensing networks where the update arrival rate and/or the service rate are different among the servers for any number of sources and servers. \bibliographystyle{IEEEtran}
\section{Introduction}\label{sec:int} Natural phenomena are almost always influenced by different types of random noise. In order to better understand the world around us, it is important to study random perturbations of dynamical systems. In the continuous dynamical systems setup, the focus then shifts from the study of the behavior of deterministic differential equations to that of differential equations with switching (piecewise deterministic Markov processes) or stochastic differential equations with switching. The long-term behavior of these systems can be analyzed by a careful study of the ergodic properties of the induced Markov processes. Quite often, the ``white noise'' in the system is small compared to the deterministic component. In such cases, one is usually interested in knowing how well the deterministic system approximates the stochastic one. It is common to model continuous-time phenomena by stochastic differential equations of the type \begin{equation}\label{eq1.1} dx^\delta(t)=f(x^\delta(t))dt+\sqrt{\delta}\sigma(x^\delta(t))dW(t), \end{equation} where $f(\cdot)$ and $\sigma(\cdot)$ are sufficiently smooth functions, $W(\cdot)$ is a standard $m$-dimensional Brownian motion, and $\delta>0$ is a small parameter. If we let $\delta\downarrow 0$, one would expect that the solutions of \eqref{eq1.1} converge, in an appropriate sense, to that of a deterministic differential equation. Versions of this problem have been studied extensively starting with Freidlin and Wentzell \cite{FW70, FW98}, Fleming \cite{WF}, Kifer \cite{K81} and Day \cite{D82}. If the process $x^\delta(t)$ has a unique ergodic probability measure $\mu^\delta$ for each $\delta>0$ and the origin of the corresponding deterministic ODE \begin{equation}\label{eq1.2} dx=f(x)dt, \end{equation} is a globally asymptotic equilibrium point, Holland established in \cite{CH1} asymptotic expansions of the expectation of the underlying functionals with respect to the unique ergodic probability measures $\mu^\delta$. In addition, in \cite{CH}, Holland considered the case when the ODE \eqref{eq1.2} has an asymptotically stable limit cycle and proved the weak convergence of the family $(\mu^\delta)_{\delta>0}$ to the unique stationary distribution that is concentrated on the limit cycle of the process from \eqref{eq1.2}. Our interest in the current problem stems from applications in ecology. Quite often, one models the dynamics of populations with continuous-time processes. This way we inherently assume that organisms can respond instantaneously to changes in the environment. However, in some cases the dynamics are better described by discrete-time models, in which demographic decisions are not made continuously. In order to model more complex systems, one has to analyze `hybrid' systems where both continuous and discrete dynamics coexist. Such systems arise naturally in ecology, engineering, operations research, and physics as well as in emerging applications in wireless communications, internet traffic modeling, and financial engineering; see \cite{YZ} for more references. Recently, there has been renewed interest in studying piecewise deterministic Markov processes (PDMP) \cite{D84}. One may describe a PDMP by the use of a two component process. The first component is a continuous state process represented by the solution of a deterministic differential equation, whereas the second component is a discrete event process taking values in a finite set. This discrete event process is often modeled as a continuous-time Markov chain with a finite state space. At any given instance, the Markov chain takes a value (say $i$ in the state space), and the process sojourns in state $i$ for a random duration. During this period, the continuous state follows the flow given by a differential equation associated with $i$. Then at a random instance, the discrete event switches to another state $j\not =i$. The Markov chain sojourns in $j$ for a random duration, during which, the continuous state follows another flow associated with the discrete state $j$. A careful study of such processes has recently led to a better understanding of predator-prey communities where the predator evolves much faster than the prey \cite{C16} and for a possible explanation of how the competitive exclusion principle from ecology, which states that multiple species competing for the same number of small resources cannot coexist, can be violated because of switching \cite{BL16,HN18}. It is natural to study the SDE counter-part of PDMP, that is, SDE with switching. Similarly to the piecewise deterministic Markov processes mentioned in the previous paragraph, in this setting one follows a specific system of SDE for a random time after which the discrete event switches to another state, and the process is governed by a different system of SDE. The resulting stochastic process has a discrete component (that switches among a finite number of discrete states) and a continuous component (the solution of SDE associate with each fixed discrete event state). We refer the reader to \cite{YZ} for an introduction to SDEs with switching. Most of the work inspired by Freidlin and Wentzell has been concerned with local phenomena that involve the exit times and exit probabilities from neighbourhoods of equilibria. One usually uses the theory of large deviations to analyze the exit problem from the domain of attraction of a stable equilibrium point. There are more complicated situations, as the one we treat in this paper, in which large deviation techniques are not sufficient, and one needs to analyze the distributional scaling limits for the exit distributions \cite{B11}. There have been some previous important studies for multiscale systems with fast and slow scales \cite{DS12, DSW12}. These previous papers have looked at large deviations in the related setting where one has a slow diffusion and the coefficients are fastly oscillating. However, in contrast to our framework, the fast oscillations come from having periodic coefficients and introducing a factor $\frac{1}{\varepsilon}$ into the periodic component of the coefficients. The way the fast oscillations are introduced in these previous papers is similar to how it is done when one does stochastic homogenization. In the present paper, the switching comes from a discrete random process $\alpha^\varepsilon$. In this paper, we consider dynamical systems represented by switching diffusions, in which the switching is rapidly varying whereas the diffusion is slowly changing. To be more precise, let $(\Omega, \mathcal{F}, \{\mathcal{F}_t\}, \mathbb{P})$ be a filtered probability space satisfying the usual conditions. Consider the process $(X^{\varepsilon,\delta})_{t\geq 0}$ defined by \begin{equation}\label{eq2.1} dX^{\varepsilon,\delta}(t)=f(X^{\varepsilon,\delta}(t), \alpha^\varepsilon(t))dt+\sqrt{\delta}\sigma(X^{\varepsilon,\delta}(t), \alpha^\varepsilon(t))dW(t) , \ X^{\varepsilon,\delta}(0)=x,\end{equation} where $W(t)$ is an $m$-dimensional standard Brownian motion, $\alpha^\varepsilon(t)$ is a finite-state Markov chain that is independent of the Brownian motion and that has a state space $\mathcal{M}=\{1,..., m_0\}$ and generator $Q/\varepsilon=\big(q_{ij}/\varepsilon\big)_{m_0\times m_0}$, $X^{\varepsilon,\delta}$ is an $\mathbb{R}^d$-valued process, $f: \mathbb{R}^d\times\mathcal{M}\to\mathbb{R}^d, \sigma: \mathbb{R}^d\times\mathcal{M}\to\mathbb{R}^{d\times m},$ and $\varepsilon, \delta>0$ are two small parameters. We assume that the matrix $Q$ is irreducible. The irreducibility of $Q$ implies that the Markov chain associated with $Q$, which will be denoted by $(\tilde \alpha(t))_{t\geq 0}$, is ergodic thus has a unique stationary distribution $(\nu_1,\dots,\nu_{m_0})$. We denote by $X^{\varepsilon,\delta}_{x, i}(t)$ the solution of \eqref{eq2.1} at time $t\geq0$ when the initial value is $(x,i)$ and by $\alpha^\varepsilon_i(t)$ the Markov chain started at $i$. Let us explore, intuitively, what happens when $\varepsilon$ and $\delta$ are very small. In this setting, $\alpha^\varepsilon(t)$ converges very fast to its stationary distribution $(\nu_1,\dots,\nu_{m_0})$ while the diffusion is asymptotically small. As a result, on each finite time interval $[0,T]$ for $T>0$, a solution of equation \eqref{eq2.1} can be approximated by the solution $\overline X_x(t)$ to \begin{equation}\label{eq2.2} d\overline X(t)=\overline f(\overline X(t))dt, \ \overline X(0)=x, \end{equation} where $\overline f(x)=\sum_{i=1}^{m_0}f(x, i)\nu_i$. However, if in lieu of a finite time horizon, we look at the process on the infinite time horizon $[0,\infty)$, it is not clear that $\overline X_x(t)$ is a good approximation. Suppose that equation \eqref{eq2.2} has a stable limit cycle. A natural question is whether the invariant measures $(\mu^{\varepsilon,\delta})$ of the processes \eqref{eq2.1} converge weakly as $\varepsilon\downarrow 0$ and $\delta\downarrow 0$, to the measure concentrated on the limit cycle. This is the main problem that we address in the current paper. In order to do this, we substantially extend the results of \cite{CH} by considering the presence of both small diffusion and rapid switching. Because of the presence of both the switching and the diffusion we need to develop new mathematical techniques. In addition, even if there is no switching and we are in the SDE setting of \cite{CH}, our assumptions are weaker than those used in \cite{CH}. \begin{rmk} One might be interested in the following natural generalization of the setting presented above. The switching process $\alpha^\varepsilon$ can be state dependent, that is \[ \mathbb{P}\{\alpha^\varepsilon(t+\Delta)=j~|~\alpha^\varepsilon=i, X^{\varepsilon,\delta}(s),\alpha^\varepsilon(s), s\leq t\}=q_{ij}(X^{\varepsilon,\delta}(t))\Delta+o(\Delta). \] As long as the generator $Q(x)=(q_{ij}(x))$ is irreducible for each $x\in\mathbb{R}^d$ one can show that on each finite time interval $[0,T]$ one can approximate the process from \eqref{eq2.1} if $\varepsilon,\delta$ are small by \[ d\overline X = \overline f(\overline X(t))dt, \overline X(0)=x, \] where $\overline f(x)=\sum_{i=1}^{m_0} f(x,i)\nu_i(x)$ and $(\nu_1(x),\dots,\nu_{m_0}(x))$ is the stationary distribution of a Markov chain with generator $Q(x)=(q_{ij}(x))$. We will explain through a sequence of remarks that our results hold for this generalization. \end{rmk} The rest of the paper is organized as follows. The main assumptions and results appear in Section \ref{sec:2}. In Section \ref{sec:3}, we estimate the exit time of the solutions of \eqref{eq2.1} from neighborhoods around the stable manifolds of the critical points of $\overline f$. The proof of the main result is presented in Section \ref{sec:4}. In Section \ref{sec:5}, we apply our results to a general predator-prey model. In addition to showcasing our result in a specific setting, the proofs from Section \ref{sec:5} are interesting on their own right as they are quite technical and require the development of new tools. Finally, in Section \ref{sec:6}, we provide some numerical examples to illustrate our results from the predator-prey setting from Section \ref{sec:5}. \subsection{Assumptions and main results}\label{sec:2} We denote by $A'$ the transpose of a matrix $A$, by $|\cdot|$ the Euclidean norm of vectors in $\mathbb{R}^d$, and by $\|A\|:=\sup\{|Ax|: x\in\mathbb{R}^d, |x|=1\}$ the operator norm of a matrix $A\in \mathbb{R}^{d\times d}$. We also define $a\wedge b:=\min\{a, b\}$, $a\vee b:=\max\{a, b\}$, and the closed ball of radius $R>0$ centered at the origin $B_R:=\{x\in\mathbb{R}^d:|x|\leq R\}$. We recall some definitions due to Conley \cite{C78}. Suppose we are given a flow $(\Phi_t(\cdot))_{t\in\mathbb{R}}$. A compact invariant set $K$ is called \textit{isolated} if there exists a neighborhood $V$ of $K$ such that $K$ is the maximal compact invariant set in $V$. A collection of nonempty sets $\{M_1,\dots,M_k\}$ is a \textit{Morse decomposition} for a compact invariant set $K$ if $M_1,\dots,M_k$ are pairwise disjoint, compact, isolated sets for the flow $\Phi$ restricted to $K$ and the following properties hold: 1) For each $x\in K$ there are integers $l=l(x)\leq m=m(x)$ for which the \textit{alpha limit set} of $x$, $\hat\alpha(x)=\bigcap_{t\leq 0} \overline{\{\Phi_s(x), s\in(-\infty,t] \}}$, satisfies $\hat\alpha(x)\subset M_l$ and the \textit{omega limit set} of $x$, $\hat\omega(x):=\bigcap_{t\geq 0} \overline{\{\Phi_s(x), s\in[t,\infty) \}}$, satisfies $\hat\omega(x)\subset M_m$ 2) If $l(x)=m(x)$ then $x\in M_l=M_m$. \begin{asp}\label{asp1} We impose the following assumptions for the processes modeled by the systems \eqref{eq2.1} and \eqref{eq2.2}. \begin{enumerate}[(i)] \item For each $i\in \mathcal{M}$, $f(\cdot, i)$ and $\sigma(\cdot, i)$ are locally Lipschitz continuous. \item There is an $a>0$ and a twice continuously differentiable real-valued, nonnegative function $\Phi(\cdot)$ satisfying $\lim\limits_{R\to\infty}\inf\{\Phi(x): |x|\geq R\}=\infty$ and $(\nabla \Phi)'(x)f(x,i) \leq a(\Phi(x)+1)$, for all $(x, i)\in\mathbb{R}^d\times\mathcal{M}$. \item The vector field $\overline f(\cdot)$ has finitely many equilibrium points $\{x_1,\dots,x_{n_0-1}\}$ and a unique limit cycle $\Gamma$. The equilibrium points are either sources or hyperbolic points. \item There exists a Morse decomposition $\{M_1, M_2,\cdots, M_{n_0}\}$ of the flow associated with $\overline f$ such that $M_{n_0}=\Gamma$ is the limit cycle and for any $i<n_0$ we have $M_i=\{x_i\}$ where $x_i$ is an equilibrium point. \item There exists $\varepsilon_0>0$ such that for all $0<\varepsilon<\varepsilon_0$, the system \eqref{eq2.1} has a unique solution. Furthermore, for any $0<\varepsilon<\varepsilon_0$, the process $(X^{\varepsilon,\delta}(t), \alpha^{\varepsilon,\delta}(t))$ has the strong Markov property and has an invariant measure $\mu^{\varepsilon,\delta}$. The family $(\mu^{\varepsilon,\delta})_{0<\varepsilon<\varepsilon_0}$ is tight, i.e., for any $\gamma>0$ there exists an $R=R_\eta>0$ such that $\mu^{\varepsilon,\delta}(B_R)>1-\gamma$ for all $0<\varepsilon<\varepsilon_0$. \end{enumerate} \end{asp} \begin{rmk} We note that using Assumption (ii), we can work in a compact state space $\mathcal{K}\subset \mathbb{R}^n$ if the diffusion term from \eqref{eq2.1} is zero. Assumptions (i) and (ii) are needed in order to deduce the existence and boundedness of a unique solution to equation \eqref{eq2.1} in the absence of the diffusion term. Assumption (iv) is used to make sure that there exist no heteroclinic cycles. Assumption (v) ensures that \eqref{eq2.1} has a unique solution that is strong Markov. Sufficient conditions that imply uniqueness and the strong Markov property exist in the literature \cite{MY, YZ}. \end{rmk} \begin{rmk} In \cite{CH} the author studied \eqref{eq1.1} under the assumptions that \begin{enumerate} \item [(A1)] $f,\sigma\in C^2(\mathbb{R}^d)$. \item [(A2)] The system \eqref{eq1.2} has a unique limit cycle. \item [(A3)] There exists at most a finite number of critical points $x^*$ of $f$. At each critical point the Jacobian matrix has only positive real parts and the matrix $\sigma'\sigma$ is positive definite. \item [(A4)] For any compact set $B$ not containing critical points and any $u>0$ there exists $T>0$ such that if $x\in B$, then \[ d(x^0_x(t),\Gamma)<u,~\text{for}~t\geq T. \] \item [(A5)] There exists $\delta_0>0$ such that for $0<\delta<\delta_0$ the stochastic differential equation has a unique ergodic measure $\mu_\delta$. Furthermore, the family $(\mu_{\delta})_{0<\delta<\delta_0}$ is tight in $\mathbb{R}^d$. \end{enumerate} Our work generalizes \cite{CH} significantly in the following aspects. First, we work with two types of randomness - one comes from the diffusion term and the other from the switching mechanism. Second, Assumption \ref{asp1} (i) is weaker than (A1). Third, we can have any hyperbolic fixed points whereas assumptions (A3)-(A4) imply that all fixed points are sources and the deterministic system converges uniformly to the limit cycle. In addition, we do not need $\sigma'\sigma$ to be positive definite at the critical points. \end{rmk} \begin{rmk} There are several papers which look at the exit time asymptotics near hyperbolic fixed points of small perturbations of dynamical systems \cite{K81, B08,B11}. We do not assume like in these paper that the noise is uniformly elliptic and we have to deal with the additional complications of a stable limit cycle as well as the switching due to $\alpha^\varepsilon$. \end{rmk} Let $T_\Gamma>0$ be the period of the limit cycle $\Gamma$. We can define a probability measure $\mu^0$, which is independent of the starting point $y\in \Gamma$, by \begin{equation}\label{e:mu0} \mu^0(\cdot)=\dfrac1{T_\Gamma}\int_0^{T_\Gamma} \boldsymbol{1}_{\{\overline X_y(s)\in \cdot\}}ds, \end{equation} where $\overline X_y(t)$ is the solution to equation \eqref{eq2.2} starting at $ \overline X(0)=y$ and $\boldsymbol{1}_{\{\cdot\}}$ is the indicator function. The measure $\mu^0(\cdot)$ is the averaged occupation measure of the process $\overline X$ restricted to the limit cycle $\Gamma$. Throughout the paper, we assume that $\delta$ depends on $\varepsilon$, i.e. $\delta= \delta(\varepsilon)$, and $\lim\limits_{\varepsilon\downarrow 0}\delta (\varepsilon)=0$. We will investigate the asymptotic behavior of the invariant probability measures $\mu^{\varepsilon,\delta}$ as $\varepsilon \downarrow 0$ in the following three cases: \begin{equation}\label{eq:ep-dl} \lim\limits_{\varepsilon\downarrow 0}\dfrac{\delta}\varepsilon=\left\{\begin{array}{ll}l\in(0,\infty), &\mbox{ case 1}\\0, &\mbox{ case 2}\\\infty, &\mbox{ case 3}.\end{array}\right. \end{equation} The multi-scale modeling approach we use is similar to the one from \cite{HY14}. \begin{asp}\label{asp2}We impose additional conditions corresponding to the cases from \eqref{eq:ep-dl}. \begin{enumerate} \item[1)] Suppose $\lim_{\epsilon\downarrow 0}\frac{\delta}{\varepsilon}=l\in (0,\infty)$. For any critical point $x^*$ of $\overline f$ there exists $i^*\in \mathcal{M}$ such that $\beta'f(x^*, i^*)\ne 0$ or $\beta'\sigma(x^*, i^*)\ne0$ where $\beta$ is a normal vector of the stable manifold of \eqref{eq2.2} at $x^*$. \item[2)] Suppose $\lim_{\epsilon\downarrow 0}\frac{\delta}{\varepsilon}=0$. For any critical point $x^*$ of $\overline f$ there exists $i^*\in \mathcal{M}$ such that $\beta'f(x^*, i^*)\ne 0$ where $\beta$ is a normal vector of the stable manifold of \eqref{eq2.2} at $x^*$. \item[3)] Suppose $\lim_{\epsilon\downarrow 0}\frac{\delta}{\varepsilon}=\infty$. For any critical point $x^*$ of $\overline f$, there exists $i^*\in \mathcal{M}$ such that $\beta'\sigma(x^*, i^*)\ne 0$ where $\beta$ is a normal vector of the stable manifold of \eqref{eq2.2} at $x^*$. \end{enumerate} \end{asp} The intuition for the conditions of Assumption \ref{asp2} is the following. In case 2, since $\delta$ tends to $0$ much faster than $\varepsilon$, for sufficiently small $\delta$, the behavior of $X^{\varepsilon,\delta}(t)$ will be close to the process $\xi^{\varepsilon}(t)$ defined by \begin{equation}\label{eq2.3} d\xi^\varepsilon(t)=f\big(\xi^\varepsilon(t),\alpha^\varepsilon(t)\big)dt. \end{equation} We denote from now on by $\xi^{\varepsilon}_{x, i}(t)$ the solution of \eqref{eq2.3} at time $t\geq 0$ if the initial condition is $(x,i)$. If for each $i\in \mathcal{M}$, $f(x^*, i)=0$ at a critical point $x^*$ of $\overline f$, the Dirac mass function at $x^*$, $\boldsymbol\delta_{x^*}$, will be an invariant measure for $\xi^\varepsilon(t)$. Because of this, the sequence of invariant probability measures $(\mu^{\varepsilon,\delta})$ (or one of its subsequences) may converge to $\boldsymbol\delta_{x^*}$. In order to have the weak convergence of $(\mu^{\delta, \varepsilon})_{\varepsilon>0}$ to the measure $\mu^0$, we need to assume that there is an $i^*\in\mathcal{M}$ such that $\beta'f(x^*, i^*)\ne0$ where $\beta$ is a normal vector of the stable manifold of \eqref{eq2.2} at $x^*$. This guarantees that the process from \eqref{eq2.3} gets pushed away from the equilibrium $x^*$ and away from the stable manifold (where it could get pushed back towards the equilibrium). In case 3, the switching is very fast compared to the diffusion term, so for small $\varepsilon$ the process will behave like \[ d \eta^\varepsilon(t) = \overline f(\eta^\varepsilon(t))dt + \sqrt{\delta}\sigma(\eta^\varepsilon(t),i)dW(t). \] In order for the limit of $(\mu^{\varepsilon,\delta})$ not to put mass on the critical point $x^*$ of $\overline f$, we need to suppose that there exists an $i^*\in\mathcal{M}$ such that $\beta'\sigma(x^*, i^*)\ne0$ where $\beta$ is a normal vector of the stable manifold of \eqref{eq2.2} at $x^*$ For case 1, since both the switching and the diffusion are on a similar scale, we need to assume that for each critical point $x^*$ of $\overline f$ there is $i^*\in\mathcal{M}$ satisfying either $\beta'\sigma(x^*, i^*)\ne0$ or $\beta'f(x^*, i^*)\ne0$. The next theorem is the main result of this paper. \begin{restatable}{thm}{main}\label{t:main} Suppose Assumptions \ref{asp1} and \ref{asp2} hold. The family of invariant probability measures $(\mu^{\varepsilon,\delta})_{\varepsilon>0}$ converges weakly to the measure $\mu^0$ given by \eqref{e:mu0} in the sense that for every bounded and continuous function $g:\mathbb{R}^d\times\mathcal{M}\to \mathbb{R}$, $$\lim\limits_{\varepsilon\to0}\sum_{i=1}^m\int_{\mathbb{R}^d} g(x, i)\mu^{\varepsilon,\delta}(dx, i)=\dfrac1{T_\Gamma}\int_{0}^{T_\Gamma}\overline g(\overline X_y(t))dt,$$ where $T_\Gamma$ is the period of the limit cycle, $y\in\Gamma$ and $\overline g(x)=\sum_{i\in\mathcal{M}}g(x, i)\nu_i$. \end{restatable} \begin{rmk}\label{r:state} Theorem \ref{t:main} still holds if the switching component $\alpha^\varepsilon$ is state-dependent with generator $Q(x)=(q_{ij}(x))_{\mathcal{M}\times\mathcal{M}}, x\in \mathbb{R}^d$ as long as $Q$ is bounded and satisfies the following conditions: \begin{itemize} \item For all $i, j$ the functions $q_{ii}(\cdot)$ and $\frac{q_{ij}(\cdot)}{q_{ii}(x\cdot)}$ are Lipschitz continuous. \item If $q_{ij}(x)>0$ for some $x\in\mathbb{R}^d$ then $\inf_{x\in\mathbb{R}^d} \frac{q_{ij}(x)}{|q_{ii}(x)|}>0$. \item For all $i$ we have $\inf_{x\in\mathbb{R}^d}|q_{ii}(x)|>0$. \item There exists $k\in\mathbb{N}$ such that we have $\inf_{x\in\mathbb{R}^d} \hat q^{(k)}_{ij}(x)>0$ where $\hat Q(x)=(0\vee q_{ij}(x))_{\mathcal{M}\times\mathcal{M}}$, and $\hat Q^k(x)=(\hat q^{(k)}_{ij}(x))$. \end{itemize} We explain how one can do this in Remark \ref{r:dens}. \end{rmk} \subsection{An application of Theorem \ref{t:main}} We will exhibit an example where the result of Theorem \ref{t:main} applies. Recently there has been renewed interest in stochastic population dynamics \cite{HN16, BL16, B18, HN18}. Suppose we have a predator-prey system of the form \begin{equation}\label{ex00} \left\{\begin{array}{lll} \displaystyle {d \over dt}{x}(t)=x(t)\left[ a- bx(t)-y(t)h(x(t), y(t))\right]\\ \displaystyle {d \over dt} y(t)=y(t)\left[- c- d y(t)+x(t)fh(x(t), y(t))\right] .\end{array}\right. \end{equation} Here $x(t), y(t)$ denote the densities of prey and predator at time $t\geq 0$, respectively; $a, b, c, d, f>0$ describe the per-capita birth/death and competition rates, and $xh(x,y), yh(x,y)$ are the functional responses of the predator and the prey. For instance, if $h(x, y)$ is constant, the model is the classical Lotka-Volterra one \cite{L25, V28, GH79}. If $$h(x, y)=\dfrac{m_1}{m_2(i)+m_3x+m_4y},$$ the functional response is of Beddington-DeAngelis type \cite{CC01}. The setting of \eqref{ex00} is very general and encompasses many of the models used in the ecological literature. We explore what happens in the fast-switching slow-noise limit for the following noisy extension of \eqref{ex00} \begin{equation}\label{ex1} \left\{\begin{array}{lll}d{X^{\varepsilon,\delta}}(t)=X^{\varepsilon,\delta}(t)\varphi\big(X^{\varepsilon,\delta}(t), Y^{\varepsilon,\delta}(t), \alpha^\varepsilon(t))dt+\sqrt{\delta}\lambda(\alpha^\varepsilon(t))X^{\varepsilon,\delta}(t)dW_1(t)\\ d{Y^{\varepsilon,\delta}}(t)=Y^{\varepsilon,\delta}(t)\psi\big(X^{\varepsilon,\delta}(t), Y^{\varepsilon,\delta}(t), \alpha^\varepsilon(t))dt+\sqrt{\delta}\rho(\alpha^\varepsilon(t))Y^{\varepsilon,\delta}(t)dW_2(t).\end{array}\right. \end{equation} Here \bed\begin{array}{rl} &\!\!\!\displaystyle \varphi(x, y, i)=a(i)-b(i)x-yh(x, y, i) \ \hbox{ and }\\ &\!\!\!\displaystyle \psi(x, y, i)=-c(i)-d(i)y+f(i)xh(x, y, i), \end{array}\eed where $a(\cdot), b(\cdot), c(\cdot), d(\cdot), f(\cdot), \lambda(\cdot), \rho(\cdot)$ are positive functions defined on $\mathcal{M}$, $\delta=\delta(\varepsilon)$ depends on $\varepsilon$, $\lim\limits_{\varepsilon\to0}\delta=0$, $W_1(t)$ and $W_2(t)$ are independent Brownian motions, and $\alpha^\varepsilon$ is an independent Markov chain with generator $Q/\varepsilon$. As before, the generator $Q$ is assumed to be irreducible so that the Markov chain has a unique stationary distribution given by $(\nu_1,\dots,\nu_{n_0})$. The function $h(\cdot, \cdot, \cdot)$ is assumed to be positive, bounded, and continuous on $\mathcal{M}\times\mathbb{R}^2_+$. For $g(\cdot)= a(\cdot), b(\cdot), c(\cdot), d(\cdot), f(\cdot), \varphi(\cdot), \psi(\cdot)$, define the \textit{averaged quantities} $\overline g:=\sum g(i)\nu_i$, $g_m=\min\{g(i):i\in\mathcal{M}\}, g_M=\max\{g(i):i\in\mathcal{M}\}$. Set $h_1(x, y):=\sum h(x, y, i)\nu_i$ and $h_2(x, y):=\sum f(i)h(x, y, i)\nu_i.$ The existence and uniqueness of a global positive solution to \eqref{ex1} can be proved in the same manner as in \cite{JJ} or \cite{CDN} and is therefore omitted. We denote by $Z^{\varepsilon,\delta}_{z, i}(t)=(X^{\varepsilon, \delta}_{z, i}(t), Y^{\varepsilon, \delta}_{z, i}(t))$ the solution to \eqref{ex1} with initial value $\alpha^{\varepsilon}(0)=i\in\mathcal{M}, Z^{\varepsilon,\delta}_{z, i}(0)=z\in\mathbb{R}^{2}_+.$ Consider the averaged equation \begin{equation}\label{ex2} \left\{\begin{array}{lll} \displaystyle {d \over dt}{X}(t)=X(t)\overline\varphi(X(t), Y(t)) =X(t)\left[\overline a-\overline bX(t)-Y(t)h_1(X(t), Y(t))\right]\\ \displaystyle {d \over dt} Y(t)=Y(t)\overline\psi(X(t), Y(t)))=Y(t)\left[-\overline c-\overline d Y(t)+X(t)h_2(X(t), Y(t))\right] .\end{array}\right. \end{equation} We denote by $\overline Z_z(t)=(\overline X_z(t), \overline Y_z(t))$, the solution to \eqref{ex2} with initial value $\overline Z_z(0)=z$. \begin{asp}\label{asp5.1} The following properties hold. \begin{enumerate} \item The system \eqref{ex2} has a finite number of positive equilibria and a unique stable limit cycle $\Gamma$. In addition, any positive solution not starting at an equilibrium converges to the stable limit cycle. \item The inequality $$\frac{\overline a}{\overline b}h_2\left(\frac{\overline a}{\overline b}, 0\right)>\overline c$$ is satisfied. \end{enumerate}\end{asp} \begin{rmk} Note that the Jacobian of $\Big(x\overline\phi(x,y), y\overline\psi(x,y)\Big)^\top$ at $\left(\frac{\overline a}{\overline b}, 0\right)$ has two eigenvalues: $-\overline c+\frac{\overline a}{\overline b}h_2(\frac{\overline a}{\overline b}, 0)$ and $-\frac{\overline b^2}{\overline a}<0$. If $-\overline c+\frac{\overline a}{\overline b}h_2(\frac{\overline a}{\overline b}, 0)<0$, then $\left(\frac{\overline a}{\overline b}, 0\right)$ is a stable equilibrium of \eqref{ex2}, which violates condition (i) of Assumption \ref{asp5.1}. This shows that condition (ii) is often contained in condition (i). We note that the model \eqref{ex2} is quite general and as such conditions on the parameters for the existence and uniqueness of a limit cycle are in general complicated. \end{rmk} We can apply Theorem \ref{t:main} to this model if we can verify part (v) of Assumption \ref{asp1} since the other conditions are clearly satisfied. Since the process $\alpha^\varepsilon(t)$ is ergodic and the diffusion is nondegenerate, an invariant probability measure of the solution $Z^{\varepsilon,\delta}(t)$ is unique if it exists. It is unlikely that one could find a Lyapunov-type function satisfying the hypothesis of \cite[Theorem 3.26]{YZ} in order to prove the existence of an invariant probability measure. In addition, the tightness of the family of invariant probability measures $(\mu^{\varepsilon,\delta})_{\varepsilon>0}$ cannot be proved using the methods from \cite{DDT, DDY}. These difficulties can be overcome with the help of a new technical tool. We partition the domain $(0,\infty)^2$ into several parts and then construct a truncated Lyapunov-type function. We then estimate the average probability that the solution belongs to a specific part of our partition. This then allows us to prove that the family of invariant probability measures $(\mu^{\varepsilon,\delta})_{\varepsilon>0}$ is tight on the interior of $\mathbb{R}_+^2$, i.e. for any $\eta>0$, there are $0<\varepsilon_0,\delta_0<1< L$ such that for all $\varepsilon<\varepsilon_0,\delta<\delta_0$, the unique invariant measure $\mu^{\varepsilon,\delta}$ of $(Z^{\varepsilon,\delta}(t), \alpha^\varepsilon(t))$ satisfies $$\mu^{\varepsilon,\delta}([ L^{-1}, L]^2)\geq 1-\eta.$$ We are able to prove the following result. \begin{restatable}{thm}{mainnex}\label{thm5.1} Suppose Assumption {\rm\ref{asp5.1}} holds. For sufficiently small $\delta$ and $\varepsilon$, the process given by \eqref{ex1} has a unique invariant probability measure $\mu^{\varepsilon,\delta}$ with support in $\mathbb{R}_+^{2,\circ}$ $($where $\mathbb{R}^{2,\circ}_+$ denotes the interior of $\mathbb{R}^2_+)$. In addition: \begin{enumerate} \item[a)] If $\lim\limits_{\varepsilon\to0}\dfrac\delta\varepsilon=l\in(0,\infty]$, the family of invariant measures $(\mu^{\varepsilon,\delta})_{\varepsilon>0}$ converges weakly to $\mu^0$, the occupation measure of the limit cycle of \eqref{ex2}, as $\varepsilon\to0$ (in the sense of Theorem \ref{t:main}). \item[b)] If $\lim\limits_{\varepsilon\to0}\dfrac\delta\varepsilon=0$ and at each critical point $(x^*, y^*)$ of $(\overline\varphi(x, y), \overline\psi(x, y))$, there is $i^*\in\mathcal{M}$ such that either $\varphi(x^*, y^*, i^*)\ne0$ or $\psi(x^*, y^*, i^*)\ne0$, then the family of invariant measures $(\mu^{\varepsilon,\delta})_{\varepsilon>0}$ converges weakly to $\mu^0$, the occupation measure of the limit cycle of \eqref{ex2}, as $\varepsilon\to0$. \end{enumerate} \end{restatable} \begin{rmk} We note that on any finite time interval $[0,T]$ the solutions to \eqref{ex1} converge to the solutions of \eqref{ex2}. However, in ecology, people are interested in the long term behavior of ecosystems as $T\to \infty$. Therefore, the above result shows rigorously that \eqref{ex2} gives the correct long-term behavior. \end{rmk} \subsection{Sketch of proof of Theorem \ref{t:main}} Because some parts of the proofs are very technical, in order to offer some intuition to the reader we present the main ideas in this subsection. Condition (v) of Assumption \ref{asp1} is a tightness assumption for the family of invariant measures $(\mu^{\varepsilon,\delta})_{0<\varepsilon<\varepsilon_0}$. This implies that any weak limit of $(\mu^{\varepsilon,\delta})_{0<\varepsilon<\varepsilon_0}$ is an invariant measure of the limit system \eqref{eq2.2}. The main technical issue is to show that any subsequential limit of $(\mu^{\varepsilon,\delta})_{0<\varepsilon<\varepsilon_0}$ does not assign any mass to any of the fixed points of $\overline f$. This is done by a careful analysis of the nature of the deterministic and stochastic systems near the attracting region $\chi_l:=\{y: \lim_{t\to\infty}\overline X_y(t)=x_l\}$, of an equilibrium $x_l$ of $\overline f$. Note that if $x_l$ is a source then $\chi_l=\{x_l\}$ while if $x_l$ is hyperbolic $\chi_l$ can be an unbounded set. This makes the problem hard. In Section \ref{sec:3}, using large deviation techniques, we establish the following uniform estimate for the probability that the processes $X_{x,i}^{\varepsilon,\delta}$ and $\overline X_x$ are close on a fixed time interval: For any $R$, $T$, and $\gamma>0$, there is a $\kappa=\kappa(R,\gamma, T)>0$ such that \begin{equation}\label{sk1} \mathbb{P}\left\{\left|X^{\varepsilon,\delta}_{x,i}(t)-\overline X_x(t)\right|\geq\gamma ~\text{for some}~t\in [0,T] \right\}<\exp\left(-\frac{\kappa}{\varepsilon+\delta}\right), x\in B_R. \end{equation} The main task is to estimate the time of exiting the attracting region, $\chi_l\cap B_R$, of an equilibrium $x_l$. To be precise, we show that $X_{x,i}^{\varepsilon,\delta}$ leaves small neighborhoods of $\chi_l\cap B_R$ with strictly positive probability in finite time if we start close to $\chi_l\cap B_R$. We find uniform lower bounds for these probabilities. In fact, for any sufficiently small $\Delta>0$ and sufficiently large $R>0$ to include all the sets $M_i, i=1,\dots,n_0$, we can find $\theta_1,\theta_3>0$, $H^\Delta_l>0$, and $ \varepsilon_{l}(\Delta)$ such that for $\varepsilon<\varepsilon_{l}(\Delta)$, \begin{equation}\label{sk2} \mathbb{P}\left\{\widetilde \tau^{\varepsilon,\delta}_{x, i}\leq H^\Delta_l\right\}\geq\psi^{\Delta,\varepsilon}:=\exp\left(-\dfrac{\Delta}{\varepsilon+\delta}\right),\,|x-x_l|<\theta_1, \end{equation} where $$\widetilde \tau^{\varepsilon,\delta}_{x, i}:=\inf\{t\geq 0: X^{\varepsilon,\delta}_{x,i}(t)\in B_R \text{ and } {\rm dist}(X^{\varepsilon,\delta}_{x,i}(t),\chi_l)\geq \theta_3\}.$$ We prove the estimate \eqref{sk2} in the different cases as follows: \begin{enumerate} \item [1)] Suppose that there is an $i^*\in\mathcal{M}$ satisfying $\beta'f(x_l,i^*)\neq 0$, where $\beta$ is a normal unit vector of the stable manifold of \eqref{eq2.2} at $x_l$. Then we estimate the time $\alpha^\varepsilon(t)$ stays in $i^*$ and consider the diffusion in this fixed state, that is \[ dZ^\delta(t)=f(Z^\delta(t), i^*)dt+\sqrt{\delta}\sigma(Z^\delta(t), i^*)dW(t). \] Since the drift $f(x,i^*)$ is nonzero and pushes us away from the stable manifold of $x^*$, and the diffusion term is small, we can estimate the exit time $\widetilde\tau^{\varepsilon,\delta}_{x, i}$. \item [2)] Suppose $\lim_{\varepsilon\to0}\frac{\delta}{\varepsilon}\in(0,\infty]$ and there is an $i^*$ such that $\beta'\sigma(x_l,i^*)\neq 0$. If $\lim_{\varepsilon\to0}\frac{\delta}{\varepsilon}<\infty$, suppose in addition that $\beta'f(x_l,i)=0, i\in \mathcal{M}$. We estimate the time $\alpha^\varepsilon(t)$ to be in $i^*$ and consider the diffusion component in the direction $\beta$ in this fixed state \[ dZ^{\varepsilon,\delta} = \sqrt{\delta}\beta'\sigma(Z^{\varepsilon,\delta},\alpha^\varepsilon)dW(t) \] Since the diffusion coefficient does not vanish close to $x_l$, we can do time change so that we get a Brownian motion. Then we can estimate the probability that the exit time exceeds a given number. Ultimately, we show that $Z^{\varepsilon,\delta}$ and $\beta'X^{\varepsilon,\delta}$ are close to each other. \end{enumerate} Comparing the rates in \eqref{sk1} with \eqref{sk2} is key to prove the main result in Section \ref{sec:4} (see e.g. \cite{CH, kifer12}). The idea is to estimate the time of exiting the attracting region, $\chi_l\cap B_R$, of an equilibrium $x_l$ as well as the time of coming back to this region. Then we prove that eventually, the probability of entering $\chi_l\cap B_R$ is very small compared to the probability of exiting the region. If we start with $\overline X(0)$ close to $\chi_l\cap B_R$ then after a finite time $\overline X$ will be close to one of the equilibrium points or the limit cycle. Using this together with \eqref{sk1} and \eqref{sk2} we get that there exist neighborhoods $N_1, G_1$ of $\chi_l\cap B_R$ with $N_1\subset G_1$ such that \[ \mathbb{P}\{\tau^{\varepsilon,\delta}_{x,i}<L\}>\dfrac1{8}\psi^{\Delta,\varepsilon}, x\in N_1 \] for some constant $L>0$ and $$\tau^{\varepsilon,\delta}_{x,i}=\inf\{t\geq0: X_{x,i}^{\varepsilon,\delta}(t)\in B_R\setminus G_1\}.$$ This can be leveraged into showing that with high probability, if we start in $N_1$, we will leave the region $G_1\supset N_1$ in a finite, uniformly bounded, time: \begin{equation}\label{sk3} \mathbb{P}\left\{\tau^{\varepsilon,\delta}_{x,i}<T^{\varepsilon,\delta}_{\Delta,1}\right\}>\frac12, x\in N_1 \end{equation} where $T^{\varepsilon,\delta}_{\Delta,1}:=C\exp\left(\dfrac{\Delta}{\varepsilon+\delta}\right)$. Using \eqref{sk1} we can find a constant $\hat T>0$, independent of $\varepsilon$ such that \begin{equation}\label{sk4} \mathbb{P}\left\{X^{\varepsilon, \delta}_{x, i}(\hat T)\notin G_1 \right\}\geq1-\exp\Big(-\dfrac{\kappa}{\varepsilon+\delta}\Big), x\in B_R\setminus N_1 \end{equation} and that \begin{equation}\label{sk5} \mathbb{P}\left\{X^{\varepsilon, \delta}_{x, i}(t)\notin N_1, \ ~\text{for all}~ t\in[0,\hat T]\right\}\geq1-\exp\Big(-\dfrac{\kappa}{\varepsilon+\delta}\Big), x\in B_R\setminus G_1. \end{equation} Note that $T^{\varepsilon,\delta}_{\Delta,1}\to\infty$ as $\varepsilon\to 0$. However, if we pick $\Delta<\kappa/2$, we have \begin{equation}\label{sk6} \lim_{\varepsilon\to 0}T_{\Delta,1}^{\varepsilon,\delta}\exp\left(-\dfrac{\kappa}{\varepsilon+\delta}\right)= \lim_{\varepsilon\to 0}\exp\left(\dfrac{\Delta}{\varepsilon+\delta}\right)\exp\left(-\dfrac{\kappa}{\varepsilon+\delta}\right)= 0. \end{equation} The estimate \eqref{sk6} shows the exit time is not long compared to the good rate of large deviations, which will be used to show that invariant measures cannot put much mass on the equilibria. Let $\widetilde X^{\varepsilon, \delta}(t)$ be the stationary solution, whose distribution is $\mu^{\varepsilon,\delta}$ for every time $t\geq 0$. Let $\tau^{\varepsilon,\delta}$ be the first exit time of $\widetilde X^{\varepsilon, \delta}(t)$ from $G_1$. We can show that for any $\eta>0$ we can find $R>0$ such that $\mu^{\varepsilon,\delta}(N_1)\leq 2\eta$ by using \eqref{sk4}, \eqref{sk5}, and \eqref{sk6} to find the probabilities of the events \begin{align*} K_1^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \tau^{\varepsilon,\delta}\geq T_{\Delta,1}^{\varepsilon,\delta}, \widetilde X^{\varepsilon,\delta}(0)\in N_1\Big\}\\ K_2^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \tau^{\varepsilon,\delta}< T_{\Delta,1}^{\varepsilon,\delta}, \widetilde X^{\varepsilon,\delta}(0)\in N_1\Big\}\\ K_3^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \widetilde X^{\varepsilon,\delta}(0)\in B_R\setminus N_1\Big\}\\ K_4^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \widetilde X^{\varepsilon,\delta}(0)\notin B_R\Big\}. \end{align*} Similar arguments show that for any $\eta>0$, we can find $R>0$ and neighborhoods $N_1,\dots, N_{n_0-1}$ of $\chi_1\cap B_R,\dots, \chi_{n_0-1}\cap B_R$ such that $$\limsup_{\varepsilon\to0} \mu^{\varepsilon,\delta}(\cup_{j=1}^{n_0-1}N_j)\leq 2^{n_0}\eta.$$ Using this fact together with Assumption \ref{asp1} and Lemma \ref{lm2.2} we can establish, by a straightforward modification of the proof of \cite[Theorem 1]{CH}, that for any $\eta>0$ there is neighborhood $N$ of the limit cycle $\Gamma$ such that $$\liminf_{\varepsilon\downarrow 0} \mu^{\varepsilon,\delta} (N)>1-2^{n_0}\eta.$$ \section{Estimates for the first exit times}\label{sec:3} Define for any $i=1,\dots,n_0$ and $\theta>0$, the sets $\chi_i:=\{y: \lim_{t\to\infty}{\rm dist}(\overline X_y(t),M_i)=0\}$ and $M_{i,\theta}:=\{y: {\rm dist}(y, M_i)<\theta\}$. Let $R_0>1$ be large enough such that $B_{R_0-1}$ contains all $M_i$, $i=1,\dots, n_0$. Fix $\theta_0\in(0,1)$ such that $\{M_{i,2\theta_0}, i=1,\dots, n_0\}$ are mutually disjoint and $M_{i,2\theta_0}\cap \chi_j=\emptyset$ for $j<i$. For any $\eta>0$, let $R=R_\eta>0$ such that $\mu^{\varepsilon,\delta}(B_R)>1-\eta$ and $R<R_0$. The following is a well-known exponential martingale inequality (see \cite[Theorem 1.7.4]{XM}). \begin{lm}\label{l:exp}(Exponential martingale inequality) Suppose $(g(t))$ is a real-valued $\mathcal{F}_t$-adapted process and $\int_0^Tg^2(t)dt<\infty$ almost surely. Then for any $a,b>0$ one has $$\mathbb{P}\left\{\sup_{t\in[0, T]}\left[\int_0^tg(s)dW(s)-\dfrac{a}{2}\int_0^tg^2(s)ds\right]>b\right\}\leq e^{-ab}.$$ \end{lm} We will make use of this lemma repeatedly in the proofs to follow. The next result gives us estimates on how close the solutions to \eqref{eq2.1} and \eqref{eq2.3} are on a finite time interval if they have the same starting points. The argument of the proof is pretty standard. For completeness, it relegated to Appendix \ref{a:1}. \begin{lm}\label{lm2.2} For any $R$, $T$, and $\gamma>0$, there is a $\kappa=\kappa(R,\gamma, T)>0$ such that $$\mathbb{P}\left\{\left|X^{\varepsilon,\delta}_{x,i}(t)-\overline X_x(t)\right|\geq\gamma ~\text{for some}~t\in [0,T] \right\}<\exp\left(-\frac{\kappa}{\varepsilon+\delta}\right), x\in B_R.$$ \end{lm} \begin{lm}\label{lm3.1} Let $N$ be an open set in $\mathbb{R}^d$ and let $\check\tau_{x, i}^{\varepsilon, \delta}$ be any stopping time. Suppose that there is an $\ell>0$ such that for all starting points $(x, i)\in N\times\mathcal{M}$ one has $\mathbb{P}\{\check\tau_{x, i}^{\varepsilon, \delta}<\ell\}\geq a^{\varepsilon,\delta}>0$, where $\lim\limits_{\varepsilon\to0}a^{\varepsilon,\delta}=0$. Then $\mathbb{P}\left\{\check\tau_{x, i}^{\varepsilon, \delta}<\dfrac{\ell}{a^{\varepsilon,\delta}}\right\}>1/2$ for $(x, i)\in N\times\mathcal{M}$ if $\varepsilon$ is sufficiently small. \end{lm} \begin{lm}\label{lm2.5} The following properties hold: \begin{enumerate} \item For any $\theta>0, R>0$, there exists $\widetilde T_1>0$ such that for any $y\in B_R$, $\overline X_y(t)\in M_{k,\theta}$ for some $t<\widetilde T_1$, and some $k\in\{1,\dots, n_0\}$. \item For any $y\in B_R\setminus\chi_1$ and any $\theta>0$, there exists $\widetilde t_y>0$ such that $\overline X_y(t_y)\in\bigcup_{k=2}^{n_0} M_{k,\theta}$. \item For any $\theta_1>0$, $R\geq R_0$, there exists $\theta_2>0$ such that ${\rm dist}(\overline X_y(t), \chi_1)>\theta_2$ for any $t>0$ and $y\in B_R$ satisfying ${\rm dist}(y,\chi_1)>\theta_1$. \item Let $\beta$ be a normal unit vector of the stable manifold of \eqref{eq2.2} at an equilibrium $x_l$. Then for any $m>0$, we can find $\widetilde\theta_0>0$ such that $\{y: |\beta' y|\geq\theta, |y|\leq m\theta\}\cap\chi_l=\emptyset$ for any $\theta\in(0,\widetilde\theta_0]$ \end{enumerate} \end{lm} The following lemmas show that the process leaves small neighborhoods around the equilibrium points with strictly positive probability in finite time if we start close to the equilibrium points. Furthermore, this probability can be bounded below uniformly for all starting points close to the equilibrium. We need this because we want to show the convergence of the process to the limit cycle $\Gamma$. \begin{lm}\label{lm3.2} Consider an equilibrium $x_l$ and suppose there exists $i^*\in\mathcal{M}$ such that $\beta' f(x_l, i^*)\ne 0$ where $\beta$ is a normal unit vector of the stable manifold of \eqref{eq2.2} at $x_l$. Then for any $\Delta>0$ that is sufficiently small and any $R>R_0$, we can find $\theta_1,\theta_3>0$, $H^\Delta_l>0$, and $ \varepsilon_{l}(\Delta)$ such that for $\varepsilon<\varepsilon_{l}(\Delta)$, $$\mathbb{P}\left\{\widetilde \tau^{\varepsilon,\delta}_{x, i}\leq H^\Delta_l\right\}\geq\psi^{\Delta,\varepsilon}:=\exp\left(-\dfrac{\Delta}{\varepsilon}\right),\,x\in M_{l,\theta_1},$$ where $$\widetilde \tau^{\varepsilon,\delta}_{x, i}:=\inf\{t\geq 0: X^{\varepsilon,\delta}_{x,i}(t)\in B_R \text{ and } {\rm dist}(X^{\varepsilon,\delta}_{x,i}(t),\chi_l)\geq \theta_3\}.$$ \end{lm} \begin{proof} Suppose without loss of generality that $x_l=0$. Let $\beta$ be a normal vector of the stable manifold at $0$ such that $|\beta|=1$ and $\beta'f(0, i^*)>0$. Since $f$ is locally Lipschitz we can find $a_1>0$ such that \begin{equation}\label{e:a} \beta'f(x, i^*)>a_1>0, |x|<\theta_0. \end{equation} Then $A_1:=\sup_{x<\theta_0}\left\{\frac{|f(x,i^*)|}{\beta'f(x,i^*)}\right\}<\infty$. Since $\beta$ is perpendicular to the tangent of the stable manifold at $0$, we can find $\theta_2\in\left(0, \frac1{2+3A_1}\left(\frac{a_1\Delta}{4|q_{i^*i^*}|}\wedge\theta_0\right)\right)$ such that \begin{equation}\label{e:dist} {\rm dist}(L_l^{\theta_2}, \chi_l):=\theta_3>0 \end{equation} where \begin{equation}\label{defL1} L_l^{\theta_2}=\{x: |x|\leq(2+3A_1)\theta_2 \text{ and } |\beta'x|>\theta_2\}. \end{equation} The continuous dependence of the solutions of \eqref{eq2.2} on the starting point and the fact that $0$ is an equilibrium of \eqref{eq2.2} imply that $\overline X$ stays close to $0$ for a finite time if the starting point is close enough to $0$. Using this, we can derive from Lemma \ref{lm2.2} that there exist numbers $\theta_1\in(0,\theta_2)$ and $k>0$ such that \begin{equation}\label{lm3.2-e1} \mathbb{P}\left\{| X_{x,i}^{\varepsilon,\delta}(t)|<\theta_2, 0<t<1+\frac{1}{|q_{i^*i^*}|}\right\}>1-\exp\left(-\frac{k}{\varepsilon+\delta}\right)\, \text{ for all } x\in M_{l,\theta_1}, i\in\mathcal{M}. \end{equation} First, we consider the case $\alpha^\varepsilon(0)=i^*$. Because of the independence of $\alpha^\varepsilon(\cdot)$ and $W(\cdot)$, if $\alpha^\varepsilon(t)=i^*$ for all $t\in\Big[0, \frac{\Delta}{|q_{i^*i^*}|}\Big]$, the process $X^{\varepsilon, \delta}_{x, i^*}(\cdot)$ has the same distribution on the time interval $\Big[0, \frac{\Delta}{|q_{i^*i^*}|}\Big]$ as that of $Z^{\delta}_x$ given by \begin{equation}\label{e:Z} dZ^\delta(t)=f(Z^\delta(t), i^*)dt+\sqrt{\delta}\sigma(Z^\delta(t), i^*)dW(t). \end{equation} Define the bounded stopping time $$\rho^{\varepsilon,\delta}_x:=\dfrac{\Delta}{|q_{i^*i^*}|}\wedge \inf\{t>0: |Z_x^\delta(t)|\geq \theta_0\}\wedge \inf\{t>0: \beta'Z_x^\delta(t)\geq \theta_2\}.$$ We have \begin{equation}\label{e:betaZ} \beta'Z_x^\delta(\rho_x^{\varepsilon,\delta})=\beta'x+\int_0^{\rho^{\varepsilon,\delta}_x}\beta'f(Z_x^\delta(s), i^*)ds+\int_0^{\rho^{\varepsilon,\delta}_x}\sqrt{\delta}\beta'\sigma(Z_x^\delta(s), i^*)dW(s), |x|\leq \theta_0. \end{equation} By the exponential martingale inequality from Lemma \ref{l:exp}, there exists a constant $m_3>0$ independent of $\delta$ such that $$\mathbb{P}\left(\Omega^{\varepsilon,\delta,1}_{x}\right)>\frac34 \text{ and }\mathbb{P}\left(\Omega^{\varepsilon,\delta,2}_{x,i}\right)>\frac34$$ where \bed\begin{array}{rl} &\!\!\!\displaystyle \Omega^{\varepsilon,\delta,1}_{x}:=\Bigg\{-\int_0^t\sqrt{\delta}\beta'\sigma(Z_x^\delta(s), i^*)dW(s) \\ &\displaystyle \quad\qquad\qquad -\dfrac1{\sqrt{\delta}}\int_0^t\delta\beta'\sigma(Z_x^\delta(s), i^*)\sigma(Z_x^\delta(s), i^*)'\beta ds<m_3\sqrt{\delta}, t\in\left[0,{\rho^{\varepsilon,\delta}_x}\right]\Bigg\} \end{array}\eed and \bed\begin{array}{rl} &\!\!\!\displaystyle \Omega^{\varepsilon,\delta,2}_{x}:=\Bigg\{\left|\int_0^t\sqrt{\delta}\sigma(Z_x^\delta(s), i^*)dW(s)\right| \\ &\displaystyle \quad\qquad\qquad -\dfrac1{\sqrt{\delta}}\int_0^t\delta\left|\sigma(Z_x^\delta(s), i^*)\sigma(Z_x^\delta(s), i^*)'\right| ds<m_3\sqrt{\delta}, t\in\left[0,{\rho^{\varepsilon,\delta}_x}\right]\Bigg\}. \end{array}\eed This implies that \begin{equation}\label{e:12} \mathbb{P}\left(\Omega^{\varepsilon,\delta,1}_{x}\cap \Omega^{\varepsilon,\delta,2}_{x,i}\right)>\frac{1}{2}. \end{equation} Using \eqref{e:a} and \eqref{e:betaZ} we note that on the set $\Omega^{\varepsilon,\delta,1}_{x}$ \begin{equation}\label{lm3.2-e7} \begin{aligned} \beta'Z_x^\delta(\rho_x^{\varepsilon,\delta})>&\beta'x+\int_0^{\rho^{\varepsilon,\delta}_x}\beta'f(Z_x^\delta(s), i^*)ds\\ & -\dfrac1{\sqrt{\delta}}\int_0^{\rho^{\varepsilon,\delta}_x}\beta'\delta\sigma(Z_x^\delta(s), i^*)'\sigma(Z_x^\delta(s), i^*)\beta ds-m_3\sqrt{\delta}\\ \geq&-\theta_2+\int_0^{\rho^{\varepsilon,\delta}_x}a_1ds-m_3\sqrt{\delta} \end{aligned} \end{equation} Let $\delta$ be so small that $m_3\sqrt{\delta}<\dfrac{a_1}2\dfrac{\Delta}{|q_{i^*i^*}|}$. If $\rho^{\varepsilon,\delta}_x(\omega)=\dfrac{\Delta}{|q_{i^*i^*}|}$ for some $\omega\in\Omega^{\varepsilon,\delta,1}_{x,i}$, using $\theta_2\leq\dfrac{a_1\Delta}{4|q_{i^*i^*}|}=\dfrac{a_1{\rho^{\varepsilon,\delta}_x}}4$, we get $$|\beta'Z_x^\delta({\rho^{\varepsilon,\delta}_x}(\omega))|\leq \theta_2< -\theta_2+a_1{\rho^{\varepsilon,\delta}_x}-m_3\sqrt{\delta},$$ which contradicts \eqref{lm3.2-e7}. As a result, if $x\leq\theta_2, \omega\in\Omega^{\varepsilon,\delta,1}_{x}$ and $\delta$ is sufficiently small, we have \begin{equation}\label{e:O1rho} \rho^{\varepsilon,\delta}_x(\omega)<\dfrac{\Delta}{|q_{i^*i^*}|}, \end{equation} and by \eqref{e:betaZ} we have \begin{equation}\label{lm3.2-e9} \begin{aligned} \int_0^{\rho^{\varepsilon,\delta}_x}\beta'f(Z_x^\delta(s), i^*)ds \leq& |\beta'Z_x^\delta(\rho_x^{\varepsilon,\delta})|+|\beta'x|+\sqrt{\delta}\int_0^{\rho^{\varepsilon,\delta}_x}\left|\sigma(Z_x^\delta(s), i^*)\sigma(Z_x^\delta(s), i^*)'\right| ds+m_3\sqrt{\delta} \\ <&3\theta_2 \end{aligned} \end{equation} on $\Omega^{\varepsilon,\delta,1}_{x}\cap \Omega^{\varepsilon,\delta,2}_{x}$. Using \eqref{e:Z} and \eqref{lm3.2-e9}, one sees that if $\delta$ is sufficiently small and $|x|<\theta_2$ then for $\omega\in \Omega^{\varepsilon,\delta,1}_{x}\cap \Omega^{\varepsilon,\delta,2}_{x}$, \begin{equation}\label{lm3.2-e8} \begin{aligned} |Z_x(\rho^{\varepsilon,\delta}_x)|<&|x|+\int_0^{\rho^{\varepsilon,\delta}_x}|f(Z_x(t),i^*)|dt+\sqrt{\delta}\int_0^{\rho^{\varepsilon,\delta}_x}\left|\sigma(Z_x^\delta(s), i^*)\sigma(Z_x^\delta(s), i^*)'\right| ds+m_3 \sqrt{\delta}\\ <&2\theta_2+A_1 \int_0^{\rho^{\varepsilon,\delta}_x}\beta'f(Z_x(t),i^*)dt\\ <&(2+3A_1)\theta_2<\theta_0, \end{aligned} \end{equation} Combining \eqref{lm3.2-e8} with the definition of $\rho^{\varepsilon,\delta}_x$ shows that $\beta'Z_x(\rho^{\varepsilon,\delta}_x)=\theta_2$ and $|Z_x(\rho^{\varepsilon,\delta}_x)|<(2+3A_1)\theta_2$ on $ \Omega^{\varepsilon,\delta,1}_{x}\cap \Omega^{\varepsilon,\delta,2}_{x}$. As a result of this and \eqref{e:12}, if $|x|\leq\theta_2$, $$\mathbb{P} \left\{ \beta 'Z_x(t)\geq\theta_2, |Z_x(t)|\leq(2+3A_1)\theta_2 \text{ for some } t\in\left[0,\frac\Delta{|q_{i^*i^*}|}\right]\right\}\geq \mathbb{P}\left(\Omega^{\varepsilon,\delta,1}_{x}\cap \Omega^{\varepsilon,\delta,2}_{x,i}\right)>\frac{1}{2}.$$ Let $$\zeta^{\varepsilon, \delta}_{x, i}:=\inf\{t>0: \beta' X^{\varepsilon,\delta}_{x,i}(t)\geq\theta_2, |X^{\varepsilon,\delta}_{x,i}|\leq(2+3A_1)\theta_2\}=\inf\{t>0: X^{\varepsilon,\delta}_{x,i}\in L_l^{\theta_2}\}.$$ Using the independence of $\alpha^\varepsilon$, the paragraph before equation \eqref{e:Z}, and the last two equations, we obtain \begin{equation}\label{lm3.2-e2} \mathbb{P}\left\{\zeta^{\varepsilon, \delta}_{x, i^*}\leq \dfrac{\Delta}{|q_{i^*i^*}|}\right\}> \dfrac12\mathbb{P}\left\{\alpha^\varepsilon_{i^*}(t)=i^*, \ ~\text{for all}~ t\in\left[0, \dfrac{\Delta}{|q_{i^*i^*}|}\right]\right\}=\dfrac12\exp\left(-\dfrac{\Delta}{\varepsilon}\right), \text{ if } |x|\leq\theta_1. \end{equation Since $\alpha^\varepsilon(t)$ is ergodic, for any sufficiently small $\varepsilon$, i.e., small enough $\Delta$, \begin{equation}\label{lm3.2-e3} \mathbb{P}\{\alpha^\varepsilon_i(t)=i^* \mbox{ for some } t\in [0, 1]\}>{3 \over 4}, i\in\mathcal{M}. \end{equation By the strong Markov property, we derive from \eqref{lm3.2-e1}, \eqref{lm3.2-e2}, and \eqref{lm3.2-e3} that for all $(x,i)\in M_{l,\theta_1}\times\mathcal{M}$ and for $\varepsilon$ sufficiently small \begin{equation}\label{lm3.2-e5} \mathbb{P}\left\{\zeta^{\varepsilon, \delta}_{x, i}<1+\dfrac{\Delta}{|q_{i^*i^*}|}\right\}\geq {1\over 4}\exp\left(-\dfrac{\Delta}{\varepsilon}\right). \end{equation} The proof is complete by combining this estimate with \eqref{e:dist}. \end{proof} \begin{lm}\label{lm3.3} Suppose that $\lim\limits_{\varepsilon\to0}{\delta\over\varepsilon}=r>0$. Assume that at the equilibrium point $x_l$, one has $f(x_l, i)=0$ for all $i\in\mathcal{M}$, and there is $i^*\in\mathcal{M}$ for which $\beta'\sigma(x_l,i)\ne 0$, where $\beta$ is a normal unit vector of the stable manifold of \eqref{eq2.2} at $x_l$. Then for any sufficiently small $\Delta>0$ and any $R>R_0$, we can find $\theta_1,\theta_3>0$, $H^\Delta_l>0$, and $ \varepsilon_{l}(\Delta)>0$ such that for $\varepsilon<\varepsilon_{l}(\Delta)$, $$\mathbb{P}\left\{\widetilde \tau^{\varepsilon,\delta}_{x, i}\leq H^\Delta_1\right\}\geq\psi^{\Delta,\varepsilon}:=\exp\Big(-\dfrac{\Delta}{\delta}\Big),~\text{for all}~\,(x,i)\in M_{l,\theta_1}\times\mathcal{M},$$ where $$\widetilde \tau^{\varepsilon,\delta}_{x, i}=\inf\{t\geq 0: X^{\varepsilon,\delta}_{x,i}(t)\in B_R \text{ and } {\rm dist}(X^{\varepsilon,\delta}_{x,i}(t),\chi_l)\geq \theta_3\}.$$ \end{lm} \begin{proof} We can assume without loss of generality that $x_l=0$ and $\lim\limits_{\varepsilon\to0}{\delta\over\varepsilon}=1$. Since $\sigma$ is locally Lipschitz, we can find $a_2>0$ such that \begin{equation}\label{e:a2} a_2<\beta'(\sigma\sigma')(y, i^*)\beta, |y|< \theta_0. \end{equation} Let $K_l>0$ be such that $|f(x,i)|<K_l|x|$ and $|(\sigma'\sigma)(x,i)|<K_l$ if $|x|<\theta_0, i\in \mathcal{M}$. Fix $T>0$ such that $\dfrac{a_2\nu_{i^*}T}{2}>1$ and let $\theta_1>0$ be such that \begin{equation}\label{e:theta1} (2+K_lT)^2e^{K_lT}\theta_1<\theta_ \end{equation} and ${\rm dist}(L_l^{\theta_1}, \chi_l):=\theta_3>0$ where \begin{equation}\label{defL1} L_l^{\theta_1}:=\{x: |x|\leq (2+K_lT)^2e^{K_lT}\theta_1 \text{ and } |\beta'x|>\theta_1\}. \end{equation} Define $$\zeta_{t,x, i}:=\inf\left\{u>0:\int_0^u\beta'(\sigma\sigma')\left(\left(1\wedge\frac{\theta_0}{|X^{\varepsilon, \delta}_{x, i}(s)|}\right)X^{\varepsilon, \delta}_{x, i}(s),\alpha^\varepsilon_i(s)\right)\beta ds\geq t\right\}.$$ For all $t\geq 0$, we have by \eqref{e:a2} and the ergodicity of the Markov chain $\alpha^\varepsilon_i$ that $$\mathbb{P}(\zeta_{t,x,i}<\infty)=1, |x|<\theta_0.$$ As a result the process $(M(t))_{t\geq 0}$ defined by $$M(t)=\int_0^{\zeta_{t,x,i}}\beta'\sigma\left(\left(1\wedge\frac{\theta_0}{|X^{\varepsilon, \delta}_{x, i}(s)|}\right)X^{\varepsilon, \delta}_{x, i}(s),\alpha^\varepsilon_i(s)\right)dW(s)$$ is a Brownian motion. This follows from the fact that $M(t)$ is a continuous martingale with quadratic variation $[M,M]_t=t, t\geq 0$. Set $\theta_2:=(2+K_lT)\theta_1$. Since $M(1)$ has the distribution of a standard normal, for sufficiently small $\delta$, we have the estimate \begin{equation}\label{e:Omega2} \mathbb{P}\{\sqrt{\delta}M(1)>\theta_2\}\geq\dfrac12\exp\left(-\dfrac{\theta_2^2}{\delta}\right), |x|<\theta_0. \end{equation} Using the large deviation principle (see \cite{HYZ}), we can find $a_3=a_3(T)>0$ such that \begin{equation}\label{ergodic-alpha} \mathbb{P}\left\{\dfrac{1}{T}\int_0^{T}\boldsymbol{1}_{\{\alpha_i^\varepsilon(s)=i^*\}}ds>\dfrac{\nu_{i^*}}2\right\}\geq1-\exp\left(-\dfrac{a_3}{\varepsilon}\right). \end{equation} Equation \eqref{e:a2}, the definition of $\zeta_{t,x,i}$, and $\dfrac{a_2\nu_{i^*}T}{2}>1$ yield \bed\begin{array}{rl} &\!\!\!\displaystyle \mathbb{P}\left\{\int_0^T\beta'(\sigma\sigma')\left(\left(1\wedge\frac{\theta_0}{|X^{\varepsilon, \delta}_{x, i}(s)|}\right)X^{\varepsilon, \delta}_{x, i}(s),\alpha^\varepsilon_i(s)\right)\beta ds \geq \dfrac{a_2\nu_{i^*}T}{2} \right\}\geq1-\exp\left(-\dfrac{a_3}{\varepsilon}\right),~|x|<\theta_0,\end{array}\eed which leads to \begin{equation}\label{e:zeta1} \mathbb{P}\{\zeta_{1, x, i}\leq T\}\geq1-\exp\left(-\dfrac{a_3}{\varepsilon}\right), |x|<\theta_0. \end{equation} Define for $|x|<\theta_0$, $i\in\mathcal{M}$ $$ \begin{aligned} \Omega_{x,i}^{\varepsilon,\delta,3}:=\bigg\{&\left|\sqrt{\delta}\int_0^{t}\sigma\left(\left(1\wedge\frac{\theta_0}{|X^{\varepsilon, \delta}_{x, i}(s)|}\right)X^{\varepsilon, \delta}_{x, i}(s),\alpha^\varepsilon_i(s)\right)dW(s)\right|\\ &\quad<\dfrac{\theta_2}\delta\int_0^t\delta\left|(\sigma'\sigma)\left(\left(1\wedge\frac{\theta_0}{|X^{\varepsilon, \delta}_{x, i}(s)|}\right)X^{\varepsilon, \delta}_{x, i}(s),\alpha^\varepsilon_i(s)\right)\right|ds+\theta_2\leq (K_lT+1)\theta_2, t\in[0,T]\bigg\} \end{aligned} $$ and note that the last inequality holds by the definition of $K_l$. By Lemma \ref{l:exp} \begin{equation}\label{e:Omega3} \mathbb{P}(\Omega_{x,i}^{\varepsilon,\delta,3})\geq 1-\exp\left(-\frac{2\theta_2^2}{\delta}\right), |x|<\theta_0. \end{equation} Define the stopping time $$\zeta_{x,i}=\inf\{t>0: |\beta'X^{\varepsilon,\delta}_{x,i}(t)|\geq\theta_1\}\wedge \inf\{t>0: |X^{\varepsilon,\delta}_{x,i}(t)|\geq (K_l+2)\theta_2e^{K_lT} \}.$$ If $|x|\leq\theta_1$ and $\omega\in\{\sqrt{\delta}M(1)>\theta_2\}\cap \{\zeta_{1,x,i}\leq T\}\cap \Omega_{x,i}^{\varepsilon,\delta,3}$, we claim that we must have \begin{equation}\label{ezT} \zeta_{x,i}<T. \end{equation} We argue by contradiction. Suppose the three events $\{\sqrt{\delta}M(1)>\theta_2\}$, $\{\zeta_{1,x,i}\leq T\}$, and $\{\zeta_{x, i}\geq\zeta_{1,x,i}\}$ happen simultaneously. Then we get the contradiction \begin{align*} \theta_2=(2+K_lT)\theta_1& <\sqrt{\delta}M(1)=\sqrt{\delta}\int_0^{\zeta_{1,x,i}}\beta'\sigma\left(\left(1\wedge\frac{\theta_0}{|X^{\varepsilon, \delta}_{x, i}(s)|}\right)X^{\varepsilon, \delta}_{x, i}(s),\alpha^\varepsilon_i(s)\right)dW(s)\\ & \leq |\beta'X^{\varepsilon, \delta}_{x, i}(\zeta_1)|+|\beta'x|+\Big|\int_0^{\zeta_{1,x,i}}\beta'f(X^{\varepsilon, \delta}_{x, i}(s),\alpha^\varepsilon_i(s))ds\Big|\\ & \leq2\theta_1+\int_0^{\zeta_{1,x,i}}K_l|\beta'X^{\varepsilon,\delta}_{x,i}(s)|ds< (2+K_lT)\theta_1=\theta_2, \end{align*} where we used that $\left(1\wedge\frac{\theta_0}{|X^{\varepsilon, \delta}_{x, i}(s)|}\right)X^{\varepsilon, \delta}_{x, i}(s)=X^{\varepsilon, \delta}_{x, i}(s)$ if $s<\zeta_{x,i}$ by the definition of $\zeta_{x,i}$ and \eqref{e:theta1}. For $|x|\leq\theta_1$ and $\omega\in\{\sqrt{\delta}M(1)>\theta_2\} \cap \{\zeta_{x,i}\leq T\}\cap \Omega_{x,i}^{\varepsilon,\delta,3}$, for any $0\leq t\leq \zeta_{1,x,i}\leq T$, $$ \begin{aligned} |X^{\varepsilon,\delta}_{x,i}(t)|\leq& |x|+ \sqrt{\delta}\left|\int_0^{t}\sigma\big(X^{\varepsilon, \delta}_{x, i}(s),\alpha^\varepsilon_i(s)\big)dW(s)\right| +\int_0^t|f(X^{\varepsilon, \delta}_{x, i}(s),\alpha^\varepsilon_i(s))|ds\\ <& (K_lT+2)\theta_2+K_l\int_0^t |X^{\varepsilon, \delta}_{x, i}(s)|ds. \end{aligned} $$ This together with Gronwall's inequality implies that $$|X^{\varepsilon,\delta}_{x,i}(t)|< (K_lT+2)\theta_2 e^{K_l T}, t\in [0, \zeta_{x,i}]$$ Thus for $|x|\leq\theta_1$ and $\omega\in\{\sqrt{\delta}M(1)>\theta_2\}\cap \{\zeta_{x,i}\leq T\}\cap \Omega_{x,i}^{\varepsilon,\delta,3}$, we have that $\zeta_{x,i}<T$ and $X^{\varepsilon,\delta}_{x,i}(\zeta_{x,i})<(K_lT+2)\theta_2 e^{K_l T}$ and $\beta' X^{\varepsilon,\delta}_{x,i}(\zeta_{x,i})\geq\theta_1$. Since $\theta_2<a_3$ and $\lim_{\varepsilon\to 0}\frac{\delta}{\varepsilon}=1$ we have by \eqref{e:Omega2}, \eqref{e:zeta1}, \eqref{e:Omega3} and \eqref{ezT} that for all sufficiently small $\varepsilon$ $$ \mathbb{P}(\{\sqrt{\delta}M(1)>\theta_2\}\cap \{\zeta_{x,i}\leq T\}\cap \Omega_{x,i}^{\varepsilon,\delta,3})\geq\dfrac14\exp\left(-\dfrac{\theta_2^2}\delta\right) \geq \dfrac14\exp\left(-\dfrac{\Delta}\delta\right), |x|<\theta_1 $$ if $\Delta<\theta_2^2$, which completes the proof. \end{proof} \begin{lm}\label{lm3.4} Suppose that $\lim\limits_{\varepsilon\to0}\dfrac\delta\varepsilon=\infty$. Assume that at the equilibrium point $x_l$ one can find $i^*\in\mathcal{M}$ such that $\beta'\sigma(x_l,i^*)\ne 0$ where $\beta$ is a normal unit vector of the stable manifold of \eqref{eq2.2} at $x_l$. Then for any sufficiently small $\Delta>0$ and any $R<R_0$ we can find $\theta_1,\theta_3>0$, $H^\Delta_l>0$,and $ \varepsilon_{1}(\Delta)$ such that for $\varepsilon<\varepsilon_{1}(\Delta)$, $$\mathbb{P}\left\{\widetilde \tau^{\varepsilon,\delta}_{x, i}\leq H^\Delta_l\right\}\geq\psi^{\Delta,\varepsilon}:=\exp\Big(-\dfrac{\Delta}{\delta}\Big)~\text{for all}~\,(x,i)\in M_{l,\theta_1}\times\mathcal{M} ,$$ where $$\widetilde \tau^{\varepsilon,\delta}_{x, i}=\inf\{t\geq 0: X^{\varepsilon,\delta}_{x,i}(t)\in B_R \text{ and } {\rm dist}(X^{\varepsilon,\delta}_{x,i}(t),\chi_l)\geq \theta_3\}.$$ \end{lm} \begin{proof} Assume, as in the previous lemmas, that $x_l=0$. Pick a number $a_2>0$ for which $$a_2<\beta'(\sigma\sigma')(y, i^*)\beta, |y|<\theta_0.$$ Let $K_l>0$ be such that $|\overline f(x)|<K_l|x|$ and $|(\sigma'\sigma)(x,i)|<K_l$ whenever $|x|<\theta_0$, and fix $T>0$ such that $\dfrac{a_2\nu_{i^*}T}{2}>1$. Let $\theta_1>0$ be such that $(3+K_lT)^2e^{K_lT}\theta_1<\theta_0$ and ${\rm dist}(L_l^{\theta_1}, \chi_l):=\theta_3>0$ where \begin{equation}\label{defL11} L_l^{\theta_1}=\{x: |x-x_l|\leq (3+K_lT)^2e^{K_lT}\theta_1 \text{ and } |\beta'(x-x_l)|>\theta_1\}. \end{equation} Define $\theta_2=(3+K_lT)\theta_1$ and let $a_2, M(t), T, \zeta_{1,x,i}$ be as in the proof of Lemma \ref{lm3.3}. Arguing as in the proof of \eqref{e:zeta1}, we can find $a_3>0$ such that $$\mathbb{P}\big\{\zeta_{1,x,i}\leq T\big\}\geq 1-\exp\left(-\dfrac{a_3}\varepsilon\right), |x|<\theta_0.$$ Since $\overline f(0)=0$, we can apply the large deviation principle (see \cite{HYZ}) to show that there is $\kappa=\kappa(\Delta)>0$ such that \begin{equation}\label{e:estA} \mathbb{P}(A)\geq 1-\exp\left(-\dfrac{\kappa}\varepsilon\right), \end{equation} where $A:=\left\{\left|\int_0^{u}f(0,\alpha_i^\varepsilon(s))ds\right| <\theta_1, \text{ for all } u\in[0,T]\right\}$. The estimates \bed\begin{array}{rl} M(1) &\!\!\!\displaystyle =\int_0^{\zeta_{1,x,i}}\beta'\sigma(X^{\varepsilon,\delta}_{x, i}(s), \alpha_i^\varepsilon(s))dW(s)\\ &\!\!\!\displaystyle \leq |\beta'X^{\varepsilon, \delta}_{x, i}(\zeta_{1,x,i})|+|\beta'x|+\Big|\int_0^{\zeta_{1,x,i}}\beta' f(0,\alpha_i^\varepsilon(s))ds\Big|\\ &\displaystyle \ +\int_0^{\zeta_{1,x,i}}\big|\beta'\big(f(X^{\varepsilon, \delta}_{x, i}(s),\alpha_i^\varepsilon(s))-f(0,\alpha_i^\varepsilon(s))\big)\big|ds. \end{array}\eed and $$ \begin{aligned} |X^{\varepsilon,\delta}_{x,i}(t)|\leq& |x|+ \sqrt{\delta}\left|\int_0^{t}\sigma\big(X^{\varepsilon, \delta}_{x, i}(s),\alpha_i^\varepsilon(s)\big)dW(s)\right| +\int_0^t|\overline f(X^{\varepsilon, \delta}_{x, i}(s))|ds\\ &+\int_0^t |\overline f(X^{\varepsilon, \delta}_{x, i}(s))-f(X^{\varepsilon, \delta}_{x, i}(s),\alpha_i^\varepsilon(s)|ds \end{aligned} $$ together with arguments similar to those from the proof of Lemma \ref{lm3.3} show that $$ \mathbb{P}\left\{ X^{\varepsilon,\delta}_{x,i}(t)\in L_l^{\theta_1} \text{ for some } t\in[0,T]\right\}\geq\dfrac14\exp\left(-\frac{\Delta}\delta\right), (x,i)\in M_{l,\theta_1}\times\mathcal{M} $$ if $\delta$ is sufficiently small. \end{proof} \begin{rmk}\label{r:dens} The results in this section still hold true if one assumes the generator $Q(\cdot)$ of $\alpha(\cdot)$ is state dependent -- see an explanation of the exact setting in Remark \ref{r:state}. By the large deviation principle in \cite[Section 3]{budhiraja2018large} and the truncation arguments in Lemma \ref{lm2.1}, we can obtain Lemma \ref{lm2.2} for the case of state-dependent switching. It should be noted that while \cite{budhiraja2018large} only considers Case 1 of \eqref{eq:ep-dl}, using the variational representation, the arguments in \cite[Section 3]{budhiraja2018large} can be applied to obtain Lemma \ref{lm2.2} for the other cases. We can also infer from the large deviation principle that \eqref{lm3.2-e3}, \eqref{ergodic-alpha} and \eqref{e:estA} hold in this setting. As a result, Lemmas \ref{lm3.2}, \ref{lm3.3} and \ref{lm3.4} hold. These lemmas, in combination with the proofs from Section \ref{sec:4} imply that the main result, Theorem \ref{t:main}, remains unchanged if one has state-dependent switching. \end{rmk} \section{Proof of the main result}\label{sec:4} This section provides the proofs of the convergence of $\mu^{\varepsilon,\delta}$ for the three cases given in \eqref{eq:ep-dl}. \begin{prop}\label{p:nbhd} For every $\eta>0$, there exists $R>R_0$ and neighborhoods $N_1,\dots, N_{n_0-1}$ of $\chi_1\cap B_R,\dots, \chi_{n_0-1}\cap B_R$ such that $$\limsup_{\varepsilon\to0} \mu^{\varepsilon,\delta}(\cup_{j=1}^{n_0-1}N_j)\leq 2^{n_0}\eta.$$ \end{prop} \begin{proof} For any $\eta>0$, let $R>R_0$ be such that $\mu^{\varepsilon,\delta}(B_R)\geq 1-\eta.$ Define $$S_1=\{y\in B_R: {\rm dist}(y,\chi_1\cap B_R)< \theta_0\}$$ In view of Lemma \ref{lm2.5}, there exists $c_2>0$ such that for all $t\geq 0$ \begin{equation}\label{extra-e3.1} {\rm dist}(\overline X_y(t), \chi_1)\geq 2c_2\,\text{ for any }\,y\in B_R\setminus S_1. \end{equation} Define $$G_1=\{y\in B_R: {\rm dist}(y,\chi_1\cap B_R)< c_2\}.$$ There exists $c_3>0$ such that \begin{equation}\label{extra-e3.8} {\rm dist}(\overline X_y(t), \chi_1)\geq 2c_3 \text{ for any }y\in B_R\setminus G_1,\,t\geq 0. \end{equation} Note that we have $2c_3\leq c_2$ and $2c_2\leq\theta_0$. Define $$N_1=\{y\in B_R: {\rm dist}(y,\chi_1\cap B_R)< c_3\}$$ In view of Lemma \ref{lm2.5}, for any $y\notin\chi_1$, there exists $\widetilde t_y$ such that $\overline X_y(\widetilde t_y)\in M_{i,\theta_0}\cap (B_R\setminus S_1)$ for some $i>1$. This fact together with the continuous dependence of solutions to initial values and \eqref{extra-e3.1} implies that there exists $\hat T>0$ such that \begin{equation}\label{extra-e3.3} {\rm dist}(\overline X_y(t), \chi_1)\geq 2c_2\,\text{ for any }\,t\geq \hat T, y\in B_R\setminus N_1. \end{equation} Let $\kappa=\kappa(R,c_3, \hat T)$ be as in Lemma \ref{lm2.2} and $\Delta<\frac{\kappa}2$ and $\theta_1$ and $\psi^\Delta_\varepsilon$ be as in one of the Lemmas \ref{lm3.2}, \ref{lm3.3} and \ref{lm3.4} (depending on which case we are considering). We have \begin{equation}\label{extra-e3.6} \mathbb{P}(\widetilde \tau_{x,i}^{\varepsilon,\delta}<H^\Delta)\geq\psi^\Delta_\varepsilon, x\in M_{1,\theta_1} \end{equation} where, as in Section \ref{sec:3}, the stopping time is $$\widetilde \tau^{\varepsilon,\delta}_{x, i}=\inf\{t\geq 0: X^{\varepsilon,\delta}_{x,i}(t)\in B_R \text{ and } {\rm dist}(X^{\varepsilon,\delta}_{x,i}(t),\chi_1)\geq \theta_3\}.$$ Define $$\tau^{\varepsilon,\delta}_{x,i}=\inf\{t\geq0: X_{x,i}^{\varepsilon,\delta}(t)\in B_R\setminus G_1\}.$$ It follows from part (1) of Lemma \ref{lm2.5} that for any $x\in N_1$, there exists a $\widetilde T_1>0$ such that $\overline X_x(t_x)\in \bigcup_{j=1}^{n_0} M_{j,\frac{\theta_1}2}\text{ for some } t_x\leq \widetilde T_1$. Suppose $\overline X_x(t_x)\in \bigcup_{j=2}^{n_0}M_{j,\frac{\theta_1}2}$. Note that $\bigcup_{j=2}^{n_0} M_{j,\frac{\theta_1}2} \cap M_{1,c_3}=\emptyset$, $\theta_1<\theta_0$ and that by construction, $M_{1,2\theta_0}\cap \chi_j=\emptyset, j>1$. These facts imply that $\bigcup_{j=2}^{n_0} M_{j,\frac{\theta_1}2}\cap N_1=\emptyset$. This together with Lemma \ref{lm2.2} and \eqref{extra-e3.3} implies \begin{equation}\label{ex.e1} \mathbb{P}\{\tau^{\varepsilon,\delta}_{x,i}<\tilde T_1+\hat T\}>\frac12 \end{equation} for small $\varepsilon>0$. When $\varepsilon$ is sufficiently small, we have by Lemma \ref{lm2.2} (applied with $\gamma=\frac{\theta_1}{2})$ that for any $x\in N_1$ satisfying $\overline X_x(t_x)\in M_{1,\frac{\theta_1}2}$ that \begin{equation}\label{extra-e3.4} \mathbb{P}\{X^{\varepsilon,\delta}_{x,i}(t_x)\in M_{1,\theta_1}\}>\frac12. \end{equation} Similarly to \eqref{extra-e3.3}, there exists a $\widetilde T_2>0$ such that $$ {\rm dist}(\overline X_y(t), \chi_1)\geq 2c_2\,\text{ for any }\,t\geq \widetilde T_2, y\in B_R, {\rm dist}(y,\chi_1)\geq\theta_3, $$ which implies that by Lemma \ref{lm2.2}, for sufficiently small $\varepsilon>0$, \begin{equation}\label{extra-e3.5} \mathbb{P}\left\{{\rm dist}(X^{\varepsilon,\delta}_{x,i}(\widetilde T_2), \chi_1)\geq c_2\right\}>\frac{1}{2}\,\text{ for any }\, x\in B_R, {\rm dist}(x,\chi_1)\geq\theta_3, i\in\mathcal{M}. \end{equation} Putting together \eqref{extra-e3.6}, \eqref{extra-e3.4}, and \eqref{extra-e3.5} we deduce that \begin{equation}\label{ex.e2} \mathbb{P}\{\tau^{\varepsilon,\delta}_{x,i}<\widetilde T_1 +H^\Delta+\widetilde T_2\}>\dfrac1{4}\psi^\Delta_{\varepsilon}. \end{equation} for $\varepsilon$ sufficiently small. Combining \eqref{ex.e1} and \eqref{ex.e2}, we get that \begin{equation}\label{ex.e22} \mathbb{P}\{\tau^{\varepsilon,\delta}_{x,i}<H^\Delta+\widetilde T_1+\widetilde T_2+\hat T\}>\dfrac1{8}\psi^\Delta_{\varepsilon}, x\in N_1. \end{equation} Define $T^{\varepsilon,\delta}_{\Delta,1}:=4\dfrac{H^\Delta+\widetilde T_1+\widetilde T_2+\hat T}{\psi_{\varepsilon,\delta}^\Delta}$. Applying Lemma \ref{lm3.1} to \eqref{ex.e22}, we have \begin{equation}\label{ex.e3} \mathbb{P}\left\{\tau^{\varepsilon,\delta}_{x,i}<T^{\varepsilon,\delta}_{\Delta,1}\right\}>\frac12, x\in N_1. \end{equation} We will argue by contradiction that $\limsup\limits_{\varepsilon\to0}\mu^{\varepsilon,\delta}(N_1)\leq 2\eta$. Assume that $\limsup\limits_{\varepsilon\to0}\mu^{\varepsilon,\delta}(N_1)>2\eta>0$. Since $\Delta<\kappa/2$, we have \begin{equation}\label{e:TD} \lim_{\varepsilon\to 0}T_{\Delta,1}^{\varepsilon,\delta}\exp\left(-\dfrac{\kappa}{\varepsilon+\delta}\right)= 0. \end{equation} Let $\widetilde X^{\varepsilon, \delta}(t)$ be the stationary solution, whose distribution is $\mu^{\varepsilon,\delta}$ for every time $t\geq 0$. Let $\tau^{\varepsilon,\delta}$ be the first exit time of $\widetilde X^{\varepsilon, \delta}(t)$ from $G_1$. Define the events \begin{align*} K_1^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \tau^{\varepsilon,\delta}\geq T_{\Delta,1}^{\varepsilon,\delta}, \widetilde X^{\varepsilon,\delta}(0)\in N_1\Big\}\\ K_2^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \tau^{\varepsilon,\delta}< T_{\Delta,1}^{\varepsilon,\delta}, \widetilde X^{\varepsilon,\delta}(0)\in N_1\Big\}\\ K_3^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \widetilde X^{\varepsilon,\delta}(0)\in B_R\setminus N_1\Big\}\\ K_4^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \widetilde X^{\varepsilon,\delta}(0)\notin B_R\Big\}. \end{align*} Note that the above events are disjoint and have union $N_1$. As such $$\mu^{\varepsilon,\delta}(N_1)=\sum_{n=1}^4\mathbb{P}\{K_n^{\varepsilon, \delta}\}.$$ Using \eqref{ex.e3}, we get that \begin{equation}\label{e:K1K4} \mathbb{P}(K_1^{\varepsilon, \delta})\leq \dfrac12\mu^{\varepsilon,\delta}(N_1) \ \hbox{ and } \ \mathbb{P}(K_4^{\varepsilon, \delta})\leq 1-\mu^{\varepsilon,\delta}(B_R)< \eta. \end{equation} Next, we estimate $\mathbb{P}(K_3^{\varepsilon, \delta}).$ It follows from Lemma \ref{lm2.2}, \eqref{extra-e3.8}, and \eqref{extra-e3.3} that if $\varepsilon$ is sufficiently small then $$\mathbb{P}\left\{X^{\varepsilon, \delta}_{x, i}(\hat T)\notin G_1 \right\}\geq1-\exp\Big(-\dfrac{\kappa}{\varepsilon+\delta}\Big), x\in B_R\setminus N_1$$ and $$\mathbb{P}\left\{X^{\varepsilon, \delta}_{x, i}(t)\notin N_1, \ ~\text{for all}~ t\in[0,\hat T]\right\}\geq1-\exp\Big(-\dfrac{\kappa}{\varepsilon+\delta}\Big), x\in B_R\setminus G_1.$$ Using the last two estimates together with the Markov property one sees that for any $x\in B_R\setminus G_1, i\in\mathcal{M}, s\in[0,T_{\Delta,1}^{\varepsilon,\delta}]$, \begin{equation}\label{e4.3} \begin{aligned} \mathbb{P}\Big\{ X_{x,i}^{\varepsilon, \delta}&(s )\in N_1\Big\}\\ =&\mathbb{P}\Big\{ X_{x,i}^{\varepsilon, \delta}(s )\in N_1, X_{x,i}^{\varepsilon,\delta}(\hat T)\notin B_R\setminus G_1 \Big\}\\ &+\sum_{n=2}^{\lfloor s /\hat T\rfloor }\mathbb{P}\Big\{ X_{x,i}^{\varepsilon, \delta}(s )\in N_1, X_{x,i}^{\varepsilon,\delta}(n\hat T)\notin B_R\setminus G_1 , X_{x,i}^{\varepsilon,\delta}(\iota\hat T)\in B_R\setminus G_1 , \iota=1,...,n-1\Big\}\\ &+\mathbb{P}\Big\{ X_{x,i}^{\varepsilon, \delta}(s )\in N_1, X_{x,i}^{\varepsilon,\delta}(\iota\hat T)\in B_R\setminus G_1 , \iota=1,...,[s /\hat T]\Big\}\\ \leq& \mathbb{P}\Big\{ X_{x,i}^{\varepsilon,\delta}(\hat T)\notin B_R\setminus G_1\Big\}+\sum_{n=2}^{\lfloor s /\hat T\rfloor}\mathbb{P}\Big\{ X_{x,i}^{\varepsilon,\delta}(n\hat T)\notin B_R\setminus G_1 , X_{x,i}^{\varepsilon,\delta}((n-1)\hat T)\in B_R\setminus G_1 \} \\ &+\mathbb{P}\left\{X^{\varepsilon, \delta}_{x, i}(t)\in N_1, \,\text{ for some } t\in \left[\left\lfloor s /\hat T\right\rfloor\hat T, \left\lfloor s /\hat T\right\rfloor\hat T+\hat T\right], X^{\varepsilon, \delta}_{x, i}\left(\left\lfloor s /\hat T\right\rfloor\hat T\right)\in B_R\setminus G_1 \right\}\\ \leq&\left(\left\lfloor s /\hat T\right\rfloor+1\right)\exp\left(-\dfrac{\kappa}{\varepsilon+\delta}\right)\\ \leq&\left(s /\hat T+1\right)\exp\left(-\dfrac{\kappa}{\varepsilon+\delta}\right), \end{aligned} \end{equation} where $\lfloor s /\hat T\rfloor $ denotes the integer part of $s /\hat T$. Note that similar arguments show that \eqref{e4.3} also holds for all $s\in[\hat T,T^{\varepsilon,\delta}_{x,i}]$ and $x\in B_R \setminus N_1$. It follows from this with $s=T_{\Delta,1}^{\varepsilon,\delta}$, $$\mathbb{P}(K_3^{\varepsilon, \delta})=\mathbb{P}\left\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \widetilde X^{\varepsilon,\delta}(0)\in B_R\setminus N_1\right\}\leq\left(T_{\Delta,1}^{\varepsilon,\delta}/\hat T+1\right)\exp\left(-\dfrac{\kappa}{\varepsilon+\delta}\right).$$ This together with \eqref{e:TD} implies that \begin{equation}\label{e:K3} \lim_{\varepsilon\downarrow 0}\mathbb{P}(K_3^{\varepsilon,\delta})=0. \end{equation} Using \eqref{e4.3} and the strong Markov property, we get \begin{equation}\label{e:K2} \begin{aligned} \mathbb{P}(K_2^{\varepsilon, \delta})=&\mathbb{P}\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta})\in N_1, \tau^{\varepsilon,\delta}< T_{\Delta,1}^{\varepsilon,\delta}, \widetilde X^{\varepsilon,\delta}(0)\in N_1\Big\}\\ =&\int_0^{T_{\Delta,1}^{\varepsilon,\delta}}\mathbb{P}\{\tau^{\varepsilon,\delta}\in dt\}\left[\sum_{i\in\mathcal{M}}\int_{\partial G_1}\mathbb{P}\left\{ X_{x,i}^{\varepsilon, \delta}(T_{\Delta,1}^{\varepsilon,\delta}-t)\in N_1\right\}\mathbb{P}\left\{\alpha^\varepsilon(t)=i, \widetilde X^{\varepsilon, \delta}(t)\in dx\right\}\right]\\ \leq& \left(T_{\Delta,1}^{\varepsilon,\delta}/\hat T+1\right)\exp\left(-\dfrac{\kappa}{\varepsilon+\delta}\right)\\ \to&0\text{ as } \varepsilon\to0 \,\text{ due to }\,\eqref{e:TD}. \end{aligned} \end{equation} Putting together the estimates \eqref{e:K1K4}, \eqref{e:K2}, and \eqref{e:K3}, we see that $$\limsup\limits_{\varepsilon\to0}\mu^{\varepsilon,\delta}(N_1)\leq \dfrac12\limsup\limits_{\varepsilon\to0}\mu^{\varepsilon,\delta}(N_1)+0+0+\eta,$$ which contradicts the assumption that $\limsup\limits_{\varepsilon\to0}\mu^{\varepsilon,\delta}(N_1)>2\eta$. We have therefore shown that \[ \lim_{\varepsilon\to 0} \mu^{\varepsilon,\delta}(N_1)\leq 2\mu. \] Define $$S_2=\{y\in B_R\setminus S_1: {\rm dist}(y,\chi_2\cap B_R\setminus S_1)< \theta_0\}.$$ There exists $c_4>0$ such that ${\rm dist}(\overline X_y(t), \chi_1)\geq 2c_4$ for any $y\in B_R\setminus S_1$. Define $$G_2=\{y\in B_R\setminus S_1: {\rm dist}(y,\chi_2\cap (B_R\setminus S_1))< c_4\}$$ There exists $c_5>0$ such that ${\rm dist}(\overline X_y(t), \chi_1)\geq 2c_5$ for any $y\in B_R\setminus G_1$. Define $$N_2=\{y\in B_R\setminus S_1: {\rm dist}(y,\chi_1\cap B_R\setminus S_1)< c_5\}$$ Let $\hat T_2$ be such that $\overline X_y(\hat T_2)\in B_R\setminus(S_1\cup S_2)$ given that $y\in B_R\setminus(S_1\cup N_2)$. We can show, just as above, that there exists a $T_{\Delta,2}^{\varepsilon,\delta}$ such that $\lim_{\varepsilon\to\infty} T_{\Delta,2}^{\varepsilon,\delta}\exp\left(-\dfrac{\kappa}{\varepsilon+\delta}\right)=0$ and $$\mathbb{P}\{\tau_{x,i}^{\varepsilon,\delta}<T_{\Delta,2}^{\varepsilon,\delta}\}>\frac12.$$ Define events \begin{align*} K_{1,2}^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,2}^{\varepsilon,\delta})\in N_2, \tau_2^{\varepsilon,\delta}\geq T_{\Delta,2}^{\varepsilon,\delta}, \widetilde X^{\varepsilon,\delta}(0)\in N_2\Big\}\\ K_{2,2}^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,2}^{\varepsilon,\delta})\in N_2, \tau_2^{\varepsilon,\delta}< T_{\Delta,2}^{\varepsilon,\delta}, \widetilde X^{\varepsilon,\delta}(0)\in N_2\Big\}\\ K_{3,2}^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,2}^{\varepsilon,\delta})\in N_2, \widetilde X^{\varepsilon,\delta}(0)\in B_R\setminus (S_1\cup N_2)\Big\}\\ K_{4,2}^{\varepsilon, \delta}&=\Big\{\widetilde X^{\varepsilon, \delta}(T_{\Delta,2}^{\varepsilon,\delta})\in N_2, \widetilde X^{\varepsilon,\delta}(0)\notin B_R\setminus S_1\Big\}. \end{align*} Applying the same arguments as in the previous part, we can show that $\limsup_{\varepsilon\to 0} \mu^{\varepsilon,\delta}(N_2)\leq 4\eta$. Continuing this process, we can construct neighborhoods $N_1,\dots, N_{n_0-1}$ of $\chi_1\cap B_R$, $\dots$,$\chi_{n_0-1}\cap B_R$ such that $$\limsup_{\varepsilon\to0} \mu^{\varepsilon,\delta}(\cup_{j=1}^{n_0-1}N_j)\leq 2^{n_0}\eta.$$ \end{proof} \main* \begin{proof} We have proved in Proposition \ref{p:nbhd} that for any $\eta>0$ we can find $R>0$ and neighborhoods $N_1,\dots, N_{n_0-1}$ of $\chi_1\cap B_R,\dots, \chi_{n_0-1}\cap B_R$ such that $$\limsup_{\varepsilon\to0} \mu^{\varepsilon,\delta}(\cup_{j=1}^{n_0-1}N_j)\leq 2^{n_0+1}\eta.$$ Using this fact together with Assumption \ref{asp1} and Lemma \ref{lm2.2}, by a straightforward modification of the proof of \cite[Theorem 1]{CH}, we can establish that for any $\vartheta>0$ there is neighborhood $N$ of the limit cycle $\Gamma$ such that $$\liminf_{\varepsilon\downarrow 0} \mu^{\varepsilon,\delta} (N)>1-\vartheta.$$ \end{proof} \section{Proof of Theorem \ref{thm5.1}}\label{sec:5} To proceed, we first need some auxiliary results. \begin{lm}\label{lm5.1} There exist numbers $ K_1, K_2>0$ such that for any $0<\varepsilon,\delta<1$ and any $(i_0, z_0)\in\mathcal{M}\times\mathbb{R}^{2,\circ}_+$, we have $$\dfrac1t\mathbb{E}\int_0^t|Z_{z_0, i_0}^{\varepsilon,\delta}(s)|^2ds\leq K_1(1+|z_0|), t\geq1,$$ and $$\limsup\limits_{t\to\infty}\mathbb{E}|Z_{z_0, i_0}^{\varepsilon,\delta}(t)|^2\leq K_2.$$ \end{lm} \begin{proof} Let $\theta<\min\{f_Mb(i), d(i): i\in\mathcal{M}\}$. Define $$\hat K_1=\sup\limits_{(x, y, i)\in\mathcal{M}\times\mathbb{R}^2_+}\{f_Mx(a(i)-b(i)x)-y(c(i)+d(i)y)+ \theta(x^2+y^2)\}<\infty.$$ Consider $\hat V(x, y, i)=f_M x+y.$ We can check that $\mathcal{L}^{\varepsilon,\delta}\hat V(x, y, i)\leq\hat K_1-\theta(x^2+y^2),$ where $\mathcal{L}^{\varepsilon,\delta}$ the generator associated with \eqref{ex1} (see \cite[p. 48]{MY} or \cite{YZ} for the formula of $\mathcal{L}^{\varepsilon,\delta}$). Similarly, we can verify that there is $\hat K_2>0$ such that for all $\varepsilon<1,\delta<1$, $\mathcal{L}^{\varepsilon,\delta} (\hat V^2(x, y, i))\leq\hat K_2-\hat V^2(x, y, i)$. For each $k >0$, define the stopping time $\sigma_k=\inf\{t: x(t)+y(t)>k\}.$ By the generalized It\^o formula for $\hat V(x(t), y(t),\alpha^\varepsilon(t))$ \begin{equation}\label{ex3} \begin{aligned} \mathbb{E} \hat V(Z_{z_0, i_0}^{\varepsilon,\delta}(t\wedge\sigma_k), \alpha^\varepsilon(t\wedge\sigma_k)) &= \hat V(z_0, i_0)+\mathbb{E}\int_0^{t\wedge\sigma_k}\mathcal{L}^{\varepsilon,\delta}\hat V(Z_{z_0, i_0}^{\varepsilon,\delta}(s), \alpha^\varepsilon(s))ds\\ &\leq f_M x_0+y_0+\mathbb{E}\int_0^{t\wedge\sigma_k}\big[\hat K_1-\theta|Z_{z_0, i_0}^{\varepsilon,\delta}(s)|^2\big]ds. \end{aligned} \end{equation} Hence $$\theta\mathbb{E}\int_0^{t\wedge\sigma_k}|Z_{z_0, i_0}^{\varepsilon,\delta}(s)|^2ds\leq f_M x_0+y_0+\hat K_1t.$$ Letting $k\to\infty$ and dividing both sides by $\theta t$ we have \begin{equation}\label{ex3b} \dfrac1t\mathbb{E}\int_0^t|Z_{z_0, i_0}^{\varepsilon,\delta}(s)|^2ds\leq \dfrac{f_M x_0+y_0}{\theta t}+\dfrac{\hat K_1}\theta. \end{equation} Applying the generalized It\^o formula to $e^{t}\hat V^2(Z_{z_0, i_0}^{\varepsilon,\delta}(t), \alpha^{\varepsilon}(t))$, \begin{equation}\label{ex3a} \begin{aligned} \mathbb{E} e^{t\wedge\sigma_k}&\hat V^2(Z_{z_0, i_0}^{\varepsilon,\delta}(t\wedge\sigma_k), \alpha^{\varepsilon}(t\wedge\sigma_k))\\ &= \hat V^2(z_0, i_0)+\mathbb{E}\int_0^{t\wedge\sigma_k}e^s\big[(\hat V^2(Z_{z_0, i_0}^{\varepsilon,\delta}(s), \alpha^\varepsilon(s))+\mathcal{L}^{\varepsilon,\delta}\hat V^2(Z_{z_0, i_0}^{\varepsilon,\delta}(s), \alpha^\varepsilon(s))\big]ds\\ &\leq(f_M x_0+y_0)^2+\hat K_2\mathbb{E}\int_0^{t\wedge\sigma_k}e^sds\leq (f_M x_0+y_0)^2+\hat K_2 e^t. \end{aligned} \end{equation} Taking the limit as $k\to\infty$, and then dividing both sides by $e^t$, we have \begin{equation}\label{ex3c} \mathbb{E} \big[f_MX_{z_0, i_0}^{\varepsilon,\delta}(t)+Y_{z_0, i_0}^{\varepsilon,\delta}(t)\big]^2\leq (f_M x_0+y_0)^2e^{-t}+\hat K_2. \end{equation} The assertions of the lemma follow directly from \eqref{ex3b} and \eqref{ex3c}. \end{proof} \begin{lm}\label{lm5.1a} There is a number $K_3>0$ such that $$\dfrac1t\mathbb{E}\int_0^t\Big[ \varphi^2(Z_{z, i}^{\varepsilon,\delta}(s), \alpha_i^\varepsilon(s))+\psi^2(Z_{z, i}^{\varepsilon,\delta}(s), \alpha_i^\varepsilon(s))\Big]ds\leq K_3(1+|z|)$$ for all $\varepsilon,\delta\in (0, 1], z\in\mathbb{R}^{2,\circ}_+, t\geq 1$. \end{lm} \begin{proof} Since the function $h(\cdot, \cdot, i)$ is bounded, we can find $C>0$ such that $$\varphi^2(z, i)+\psi^2(z, i)\leq C(1+|z|^2).$$ The claim follows by an application of Lemma \ref{lm5.1}. \end{proof} Recall that the two equilibria of \eqref{ex2} on the boundary are both hyperbolic. Note that the Jacobian of $\Big(x\overline\phi(x,y), y\overline\psi(x,y)\Big)^\top$ at $\left(\frac{\overline a}{\overline b}, 0\right)$ has two eigenvalues: $-\overline c+\frac{\overline a}{\overline b}h_2\left(\frac{\overline a}{\overline b}, 0\right)>0$ and $-\frac{\overline b^2}{\overline a}<0$. At $(0,0)$, the two eigenvalues are $\overline a>0$ and $-\overline c<0$, respectively. If we consider the weighted average Lyapunov exponent, we can see that the growth rate of $\dfrac{2\overline c}{\overline a} \frac{d\ln X(t)}{dt}+\frac{d\ln Y(t)}{dt}$ is positive both at $(0,0)$ and $\left(\frac{\overline a}{\overline b}, 0\right)$. This suggests we should look at $\dfrac{2\overline c}{\overline a} \frac{d\ln X(t)}{dt}+\frac{d\ln Y(t)}{dt}$ in order to prove that the dynamics of \eqref{ex2} is pushed away from the boundary. Then we can use approximation arguments to obtain the tightness of $(Z^{\varepsilon,\delta})$ on $\mathbb{R}^{2,\circ}_+$. Define $$\Upsilon(z,i):=\frac{2\overline c}{\overline a}\varphi(z,i)+\psi(z,i)$$ and $$\overline\Upsilon(z):=\frac{2\overline c}{\overline a}\overline\varphi(z)+\overline\psi(z).$$ We have the following lemma. \begin{lm}\label{lm5.2} Let $\gamma_0=\dfrac12 \Big(\overline c\wedge \big(-\overline c+\frac{\overline a}{\overline b}h_1(\frac{\overline a}{\overline b}, 0)\big)\Big)>0.$ For any $H>\frac{\overline a}{\overline b}+1$, there are numbers $T, \beta>0$ such that for all $z\in\{(x,y)\in\mathbb{R}^2_+\,|\, x\wedge y\leq\beta, x\vee y\leq H\}$ \begin{equation}\label{e0-lm5.2} \overline X_z(T)\vee\overline Y_z(T)\leq H \text{ and } \dfrac1{T}\int_0^{T}\overline\Upsilon(\overline Z_z(t))dt\geq\gamma_0. \end{equation} \end{lm} \begin{proof} Since $\lim\limits_{t\to\infty}\overline Z_{(0, y)}(t)\to (0,0), \ \forall y\in\mathbb{R}_+$ and \begin{equation}\label{e1-lm5.2} \overline\Upsilon(0,0)=\frac{2\overline c}{\overline a}\overline\varphi(0,0)+\overline\psi(0,0)=\frac{2\overline c}{\overline a}\overline a- \overline c=\overline c\geq 2\gamma_0, \end{equation} there exists $T_1>0$ such that \begin{equation}\label{e2-lm5.2} \dfrac1t\int_0^t\overline\Upsilon(\overline Z_{(0, y)}(s))ds\geq\frac32\gamma_0\,\text{ for }\,t\geq T_1,\,y\in[0,H]. \end{equation} By \eqref{e1-lm5.2} and the continuity of $\overline\Upsilon(\cdot)$, there exists $\beta_1\in (0, \frac{\overline a}{\overline b})$ such that \begin{equation}\label{e3-lm5.2} \overline\Upsilon(x,0)\geq \frac74\gamma_0,\text{ if } x\leq\beta_1. \end{equation} Since $$\overline\Upsilon\left(\frac{\overline a}{\overline b},0\right)=\frac{2\overline c}{\overline a}\overline\varphi \left(\frac{\overline a}{\overline b},0\right)+\overline\psi \left(\frac{\overline a}{\overline b},0\right)=-\overline c+\frac{\overline a}{\overline b}h_1 \left(\frac{\overline a}{\overline b},0\right)\geq2\gamma_0$$ and $$\lim\limits_{t\to\infty}\overline Z_{(x, 0)}(t)\to \left(\frac{\overline a}{\overline b},0\right), \ \forall x>0,$$ there exists a $T_2>0$ such that \begin{equation}\label{e5-lm5.2} \dfrac1t\int_0^t\overline\Upsilon(\overline Z_{(x, 0)}(s))ds\geq\frac74\gamma_0\,\text{ for }\,t\geq T_2,\,x\in[\beta_1,H]. \end{equation} Let $\overline M_H=\sup_{x\in[0,H]}\left\{|\overline\Upsilon(x,0)|\right\} $, $\overline t_{x}=\inf\{t\geq0: X_{x,0}\geq\beta_1\}$ and $T_3=\left(4\frac{\overline M_H}{\gamma_0}+7\right)T_2$. It can be seen from the equation of $\overline X(t)$ that $\overline X_{(x,0)}(t)\in[\beta_1,H]$ if $t\geq \overline t_x, x\in(0,\beta_1]$. For $t\geq T_3$, we can use \eqref{e3-lm5.2} and \eqref{e5-lm5.2} to estimate $\frac1t\int_0^t\overline\Upsilon(\overline Z_{(x, 0)}(s))ds$ in the following three cases. {\bf Case 1}. If $t-T_2\leq \overline t_x\leq t$ then $$ \begin{aligned} \int_0^t\overline\Upsilon(\overline Z_{(x, 0)}(s))ds &= \int_0^{\overline t_x}\overline\Upsilon(\overline Z_{(x, 0)}(s))ds +\int_{\overline t_x}^t\overline\Upsilon(\overline Z_{(x, 0)}(s))ds\\ &\geq \frac74\gamma_0(t-T_2)-T_2\overline M_H\geq\frac32\gamma_0t,\,\,\bigg(\text{since }\, t\geq \Big(4\frac{\overline M_H}{\gamma_0}+7\Big)T_2\bigg). \end{aligned} $$ {\bf Case 2}. If $\overline t_x\leq t-T_2$, then $$ \begin{aligned} \int_0^t\overline\Upsilon(\overline Z_{(x, 0)}(s))ds &= \int_0^{\overline t_x}\overline\Upsilon(\overline Z_{(x, 0)}(s))ds +\int_{\overline t_x}^t\overline\Upsilon(\overline Z_{(x, 0)}(s))ds\\ &\geq \frac74\gamma_0(t-\overline t_x)+\frac74\gamma_0\overline t_x\geq\frac32\gamma_0t. \end{aligned} $$ {\bf Case 3}. If $\overline t_x\geq t$, then $$ \begin{aligned} \int_0^t\overline\Upsilon(\overline Z_{(x, 0)}(s))ds &= \int_0^{\overline t_x}\overline\Upsilon(\overline Z_{(x, 0)}(s))ds \geq \frac74\gamma_0\overline t_x\geq\frac32\gamma_0t. \end{aligned} $$ As a result, \begin{equation}\label{e6-lm5.2} \dfrac1t\int_0^t\overline\Upsilon(\overline Z_{(x, 0)}(s))ds\geq\frac32\gamma_0,\,\text{ if } t\geq T_3, x\in(0,H]. \end{equation} Let $T=T_1\vee T_3$. By the continuous dependence of solutions on initial values, there is $\beta>0$ such that \begin{equation}\label{e7-lm5.2} \overline X_z(T)\vee\overline Y_z(T)\leq H \text{ and } \dfrac1T\int_0^T\left|\overline\Upsilon(\overline Z_{z_1}(s))-\overline\Upsilon(\overline Z_{z_2}(s))\right|ds\leq \frac12\gamma_0 \end{equation} given that $|z_1-z_2|\leq\beta, z_1,z_2\in[0,H]^2.$ Combining \eqref{e2-lm5.2}, \eqref{e6-lm5.2} and \eqref{e7-lm5.2} we obtain the desired result. \end{proof} Generalizing the techniques in \cite{DY}, we divide the proof of the eventual tightness into two lemmas. \begin{lm}\label{lm5.3} For any $\Delta>0$, there exist $\varepsilon_0, \delta_0, T>0$ and a compact set $\mathcal K\subset\mathbb{R}^{2,\circ}_+$ such that $$\liminf\limits_{k\to\infty}\dfrac1k\sum_{n=0}^{k-1}\mathbb{P}\left\{Z^{\varepsilon,\delta}_{z_0, i_0}(nT)\in \mathcal K\right\}\geq 1-\dfrac\Delta3\, \text{ for any }\, \varepsilon<\varepsilon_0, \delta<\delta_0, z\in\mathbb{R}^{2,\circ}_+.$$ \end{lm} \begin{proof} For any $\Delta>0$, let $H=H(\Delta)>\frac{\overline a}{\overline b}+1$ be chosen later and define $D=\{(x, y): 0<x, y\leq H\}$. Let $T>0$ and $\beta>0$ such that \eqref{e0-lm5.2} is satisfied and $D_1=\{(x, y): 0<x, y\leq H, x\wedge y<\beta\}\subset D$. Define $V(x, y)=-\frac{2\overline c}{\overline a}\ln x-\ln y+ C$ where $C$ is a positive constant such that $V(z)\geq0\,\forall\, z\in D$. In view of the generalized It\^o formula, $$ \begin{aligned} V(Z_{z, i}^{\varepsilon,\delta}(t))-V(z)=&\int_0^t\left[-\Upsilon\big(Z_{z, i}^{\varepsilon,\delta}(s), \alpha^\varepsilon(s)\big)+\dfrac{\delta}2\left(\frac{2\overline c}{\overline a}\lambda^2(\alpha^\varepsilon(s))+\rho^2(\alpha^\varepsilon(s))\right)\right]ds\\ &-\frac{2\overline c}{\overline a}\int_0^t\sqrt{\delta}\lambda(\alpha^\varepsilon(s))dW_1(s)-\int_0^t\sqrt{\delta}\rho(\alpha^\varepsilon(s))dW_2(s). \end{aligned} $$ For $A\in\mathcal{F}$, using Holder's inequality and It\^o's isometry, we have \begin{equation}\label{ex11} \begin{aligned}\mathbb{E}\Big(\boldsymbol{1}_{A}&\big|V(Z_{z, i}^{\varepsilon,\delta}(T))-V(z)\big|\Big)\\ \leq&\left|\mathbb{E}\boldsymbol{1}_A\int_0^{T}\Upsilon\big(Z_{z, i}^{\varepsilon,\delta}(t), \alpha^\varepsilon(t)\big)dt\right|+\mathbb{E}\boldsymbol{1}_A\int_0^{T}\dfrac{\delta}2\left(\frac{2\overline c}{\overline a}\lambda^2(\alpha^\varepsilon(t))+\rho^2(\alpha^\varepsilon(t))\right)dt\\&+\frac{2\overline c}{\overline a}\mathbb{E}\boldsymbol{1}_A\left|\int_0^{T}\sqrt{\delta}\lambda(\alpha^\varepsilon(t))dW_1(t)\right|+\mathbb{E}\boldsymbol{1}_A\left|\int_0^{T}\sqrt{\delta}\rho(\alpha^\varepsilon(t))dW_2(t)\right|\\ \leq&T(\mathbb{E}\boldsymbol{1}_A)^{\frac12}\left(\mathbb{E}\int_0^{T}\left[\Upsilon\big(Z_{z, i}^{\varepsilon,\delta}(t), \alpha^\varepsilon(t)\big)+\dfrac\delta2\left(\frac{2\overline c}{\overline a}\lambda^2(\alpha^\varepsilon(t))+\rho^2(\alpha^\varepsilon(t))\right)\right]dt\right)^{\frac12}\\ &+\delta\sqrt{\mathbb{P}(A)}\left(\mathbb{E}\int_0^T\left(\frac{2\overline c}{\overline a}\lambda^2(\alpha^\varepsilon(t))+\rho^2(\alpha^\varepsilon(t))\right)dt\right)^{\frac12}\\ \leq& K_4T(1+|z|)\sqrt{\mathbb{P}(A)}, \end{aligned} \end{equation} where the last inequality follows from \eqref{lm5.1a} and the boundedness of $\rho(i)$ and $\lambda(i)$. If $A=\Omega$, we have \begin{equation}\label{ex11a} \dfrac1{T}\mathbb{E}\Big(\big|V(Z_{z, i}^{\varepsilon,\delta}(T))-V(z)\big|\Big)\leq K_4(1+|z|). \end{equation} Let $\hat H_{T}>H$ such that $\overline X_z(t)\vee \overline Y_z(t)\leq \hat H_{T}$ for all $z\in[0,H]^2,\, 0\leq t\leq {T}$ and $$\overline{d}_H=\sup\left\{\left|\dfrac{\partial \overline\Upsilon}{\partial x}(x, y)\right|, \left|\dfrac{\partial \overline\Upsilon}{\partial y}(x, y)\right|: (x,y)\in\mathbb{R}^2_+, x\vee y\leq \hat H_{T}\right\}.$$ Let $\varsigma>0$. Lemma \ref{lm2.2} implies that there are $\delta_0,\varepsilon_0$ such that if $\varepsilon<\varepsilon_0,\delta<\delta_0$, \begin{equation}\label{ex5} \mathbb{P}\left\{|\overline X_z(t)-X_{z, i}^{\varepsilon,\delta}(t)|+|\overline Y_z(t)-Y_{z, i}^{\varepsilon,\delta}(t)|<1\wedge\dfrac{\gamma_0}{2\overline{d}_H}, ~\text{for all}~ t\in[0,{T}]\right\}>1-\dfrac\varsigma6, \,z\in \overline D. \end{equation} On the other hand, if $|\overline X_z(t)-X_{z, i}^{\varepsilon,\delta}(t)|+|\overline Y_z(t)-Y_{z, i}^{\varepsilon,\delta}(t)|<1\wedge\dfrac{\gamma_0}{2\overline d_H}$, we have \begin{equation}\label{ex6} \begin{aligned} \bigg|\dfrac{1}{T}\int_0^{T}&\Upsilon(Z_{z, i}^{\varepsilon,\delta}(t), \alpha^\varepsilon(t))dt - \dfrac{1}{T}\int_0^{T}\overline\Upsilon(\overline Z_{z, i}(t))dt\bigg|\\ \leq&\dfrac1{T}\left|\int_0^{T}\Big(\overline\Upsilon(Z_{z, i}^{\varepsilon,\delta}(t))-\overline\Upsilon(\overline Z_{z, i}(t))\Big)dt\right|\\ & +\dfrac1{T}\left|\int_0^{T}\Big(\Upsilon(Z_{z, i}^{\varepsilon,\delta}(t), \alpha^\varepsilon(t))-\overline\Upsilon(Z_{z, i}^{\varepsilon,\delta}(t))\Big)dt\right|\\ \leq&\dfrac{\gamma_0}2+\dfrac{F_H}{T}\int_0^{T}\sum_{j\in\mathcal{M}}\big|\boldsymbol{1}_{\{\alpha^\varepsilon(t)=j\}}-v_j\big|dt \end{aligned} \end{equation} where $F_H:=\sup\{|\Upsilon(z, i)| i\in\mathcal{M}, z\in[0, K_{T}+1]^2\}.$ In view of \cite[Lemma 2.1]{HYZ}, \begin{equation}\label{ex7} \mathbb{E}\bigg|\dfrac1T\int_0^{T}\sum_{j\in\mathcal{M}}\big|\boldsymbol{1}_{\{\alpha^\varepsilon(t)=j\}}-v_j\big|dt\bigg|^2=\mathbb{E}\bigg|\dfrac\varepsilon{T}\int_0^{T/\varepsilon}\sum_{j\in\mathcal{M}}\big|\boldsymbol{1}_{\{\alpha(t)=j\}}-v_j\big|dt\bigg|^2\leq \dfrac{\kappa}{T}\varepsilon \end{equation} for some constant $\kappa>0.$ On the one hand, \begin{equation}\label{ex9} \mathbb{E}\dfrac1{T}\left|\int_0^{T}\Big(-\frac{2\overline c}{\overline a}\lambda(\alpha^\varepsilon(t))dW_1(t)-\rho(\alpha^\varepsilon(t))dW_2(t)\Big)\right|^2\leq\frac{4\overline c^2}{\overline a^2}\lambda_M^2+\rho_M^2. \end{equation} Combining \eqref{e0-lm5.2}, \eqref{ex5}, \eqref{ex6}, \eqref{ex7}, and \eqref{ex9}, we can reselect $\varepsilon_0$ and $\delta_0$ such that for $\varepsilon<\varepsilon_0,\delta<\delta_0$ we have \begin{equation}\label{ex8} \mathbb{P}\left\{\dfrac{-1}{T}\int_0^{T}\Upsilon(\alpha^\varepsilon(t), Z_{z, i}^{\varepsilon,\delta}(t))dt\leq-0.5\gamma_0\right\}\geq 1-\dfrac\varsigma3,\,z\in D_1, i\in\mathcal{M}, \end{equation} \begin{equation}\label{ex8b} \mathbb{P}\Big\{X_{z, i}^{\varepsilon,\delta}(T)\vee Y_{z, i}^{\varepsilon,\delta}(T)\leq H \mbox{ (or equivalently } Z_{z, i}^{\varepsilon,\delta}(T)\in D)\Big\}\geq1-\dfrac\varsigma3, z\in D_1 ,\end{equation} and \begin{equation}\label{ex8a} \mathbb{P}\left\{\delta\vartheta+\dfrac{\sqrt{\delta}}{T}\left|\int_0^{T}\Big(\frac{2\overline c}{\overline a}\lambda(\alpha^\varepsilon(t))dW_1(t)+\rho(\alpha^\varepsilon(t))dW_2(t)\Big)dt\right|<0.25\gamma_0\right\}>1-\dfrac\varsigma3 \end{equation} where $\vartheta=\frac12\left(\frac{2\overline c}{\overline a}\lambda_M^2+\rho_M^2\right).$ Consequently, for any $(z, i)\in D_1\times\mathcal{M}$, there is a subset $\Omega_{z, i}^{\varepsilon,\delta}\subset\Omega$ with $\mathbb{P}(\Omega_{z, i}^{\varepsilon,\delta})\geq1-\varsigma$ in which we have $Z_{z, i}^{\varepsilon,\delta}(T)\in D$ and \begin{equation}\label{ex10} \begin{aligned} \dfrac1{T}\big(V(Z_{z, i}^{\varepsilon,\delta}({T}))-V(z)\big)\leq&\dfrac{-1}{T}\int_0^{T}\Upsilon(\alpha^\varepsilon(t), Z_{z, i}^{\varepsilon,\delta}(t))dt+\delta\vartheta\\&+\dfrac1{T}\Big|\int_0^{T}\sqrt{\delta}\Big(\frac{2\overline c}{\overline a}\lambda(\alpha^\varepsilon(t))dW_1(t)+\rho(\alpha^\varepsilon(t))dW_2(t)\Big)\Big|\\ \leq& -0.25\gamma_0 \end{aligned} \end{equation} On the other hand, we deduce from \eqref{ex11a} that for $z\in D$, \begin{equation}\label{ex10a} \mathbb{P}\left\{\dfrac1{T}\big(V(Z_{z, i}^{\varepsilon,\delta}({T}))-V(z)\big)\leq\Lambda\right\}\geq 1-\varsigma, \end{equation} where $\Lambda :=\frac{ K_4(1+2H)}\varsigma$. Moreover, it also follows from \eqref{ex11a} that for $z\in D\setminus D_1$ $$\mathbb{E} V(Z_{z, i}^{\varepsilon,\delta}({T})\leq \sup_{z\in D\setminus D_1}\big(V(z)+ K_4{T}|z|\big).$$ Define \begin{equation}\label{ex10d} L_1:=\sup_{z\in D\setminus D_1}V(z)+\Lambda T,~ L_2:=L_1+0.25\gamma_0, \end{equation} as well as $D_2:=\{(x, y)\in\mathbb{R}^{2,\circ}_+: (x, y)\in D, V(x, y)>L_2\}$ and $U(z)=V(z)\vee L_1.$ It is clear that \begin{equation}\label{ex12a} U(z_2)-U(z_1)\leq|V(z_2)-V(z_1)| \text{ for any }z_1, z_2\in\mathbb{R}^{2\circ}_+. \end{equation} It follows from \eqref{ex11} that for any $\delta,\varepsilon<1$, $A\in\mathcal{F}$, and $z\in D$, we have \begin{equation}\label{ex12} \dfrac1{T}\mathbb{E}\boldsymbol{1}_{A}\Big|V(Z_{z, i}^{\varepsilon,\delta}(T))-V(z)\Big|\leq K_4(2H+1)\sqrt{\mathbb{P}(A)} .\end{equation} Applying \eqref{ex12} and \eqref{ex12a} with $A=\Omega\setminus\Omega_{z, i}^{\varepsilon,\delta}$, we get \begin{equation}\label{ex12b} \dfrac1{T}\mathbb{E}\boldsymbol{1}_{\Omega\setminus\Omega_{z, i}^{\varepsilon,\delta}}\Big[U(Z_{z, i}^{\varepsilon,\delta}(T))-U(z)\Big]\leq K_4(2H+1)\sqrt{\varsigma},\text{ if } z\in D_1. \end{equation} In view of \eqref{ex10}, for $z\in D_2\text{ we have }V\big(Z_{z, i}^{\varepsilon,\delta}(T)\big)<V(z)-0.25\gamma_0T.$ By the definition of $D_2$, we also have $L_1\leq V(z)-0.25\gamma_0T.$ Thus, for any $z\in D_2$ and $\omega\in\Omega^{\varepsilon,\delta}_{z, i}$ $$U\big(Z_{z, i}^{\varepsilon,\delta}(T)\big)=L_1\vee V\big(Z_{z, i}^{\varepsilon,\delta}(T)\big)\leq V(z)-0.25\gamma_0T=U(z)-0.25\gamma_0T,$$ which implies \begin{equation}\label{ex10c} \dfrac1{T}\Big[\mathbb{E}\boldsymbol{1}_{\Omega_{z, i}^{\varepsilon,\delta}}U(Z_{z, i}^{\varepsilon,\delta}({T}))-\mathbb{E}\boldsymbol{1}_{\Omega_{z, i}^{\varepsilon,\delta}}U(z)\Big]\leq-0.25\gamma_0\mathbb{P}(\Omega_{z, i}^{\varepsilon,\delta})\leq -0.25\gamma_0(1-\varsigma). \end{equation} Combining \eqref{ex12b} with \eqref{ex10c} \begin{equation}\label{ex13} \dfrac1{T}\Big[\mathbb{E} U(Z_{z, i}^{\varepsilon,\delta}({T}))-U(z)\Big]\leq-0.25\gamma_0(1-\varsigma)+ K_4(2H+1)\sqrt{\varsigma}, \ \forall z\in D_2. \end{equation} For $z\in D_1\setminus D_2$, and $\omega\in\Omega_{z, i}^{\varepsilon,\delta}$, we have from \eqref{ex10} that $ V(Z_{z, i}^{\varepsilon,\delta}({T}))\leq V(z)$. This shows that $U(Z_{z, i}^{\varepsilon,\delta}({T}))=L_1\vee V(Z_{z, i}^{\varepsilon,\delta}({T}))\leq U(z)=V(z)\vee L_1.$ Hence, for $z\in D_1\setminus D_2$ and $\omega\in \Omega_{z, i}^{\varepsilon,\delta}$ one has $$U(Z_{z, i}^{\varepsilon,\delta}({T}))-U(z)\leq 0.$$ This and \eqref{ex12b} imply \begin{equation}\label{ex14} \dfrac1{T}\Big[\mathbb{E} U(Z_{z, i}^{\varepsilon,\delta}({T}))-U(z)\Big]\leq K_4(2H+1)\sqrt{\varsigma}, \ \forall z\in D_1\setminus D_2. \end{equation} If $z\in D\setminus D_1$, $U(z)=L_1$ and we have from \eqref{ex10a} and \eqref{ex10d} that $$\mathbb{P}\big\{U(Z_{z, i}^{\varepsilon,\delta}({T}))=L_1\big\}= \mathbb{P}\big\{V(Z_{z, i}^{\varepsilon,\delta}({T}))\leq L_1\big\}\geq 1-\varsigma.$$ Thus $$\mathbb{P}\{U(Z_{z, i}^{\varepsilon,\delta}({T}))=U(z)\}\geq 1-\varsigma.$$ Use \eqref{ex12} and \eqref{ex12a} again to arrive at \begin{equation}\label{ex16} \dfrac1{T}\Big[\mathbb{E} U(Z_{z, i}^{\varepsilon,\delta}({T}))-U(z)\Big]\leq K_4(2H+1)\sqrt{\varsigma}, \ \forall \,z\in D\setminus D_1. \end{equation} On the other hand, equations \eqref{ex11a} and \eqref{ex12a} imply \begin{equation}\label{ex17} \dfrac1{T}\Big[\mathbb{E} U(Z_{z, i}^{\varepsilon,\delta}({T}))-U(z)\Big]\leq K_4(1+|z|), \ z\in\mathbb{R}^{2,\circ}_+. \end{equation} Pick an arbitrary $(z_0, i_0)\in\mathbb{R}^{2,\circ}_+\times\mathcal{M}$. An application of the Markov property yields $$ \begin{aligned} \dfrac1{T}\Big[&\mathbb{E} U(Z_{z_0, i_0}^{\varepsilon,\delta}((n+1){T}))-\mathbb{E} U(Z_{z_0, i_0}^{\varepsilon,\delta}({nT}))\Big]\\ &=\sum_{i\in\mathcal{M}}\int_{\mathbb{R}^{2,\circ}_+}\dfrac1{T}\Big[\mathbb{E} U(Z_{z, i}^{\varepsilon,\delta}({T}))-U(z)\Big]\mathbb{P}\Big\{Z_{z_0, i_0}^{\varepsilon,\delta}(n{T})\in dz, \alpha^\varepsilon(t)=i\Big\}. \end{aligned} $$ Combining \eqref{ex13}, \eqref{ex14}, \eqref{ex16}, and \eqref{ex17}, we get $$ \begin{aligned} \dfrac1{T}\Big[\mathbb{E}& U(Z_{z_0, i_0}^{\varepsilon,\delta}((n+1){T}))-\mathbb{E} U(Z_{z_0, i_0}^{\varepsilon,\delta}({nT}))\Big]\\ \leq&-\big[0.25\gamma_0(1-\varsigma)- K_4(2H+1)\sqrt{\varsigma}\big]\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(n{T})\in D_2\big\}\\ & + K_4(2H+1)\sqrt{\varsigma}\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(n{T})\in D\setminus D_2\big\}\\ &+ K_4 \mathbb{E}\boldsymbol{1}_{\{Z_{z_0, i_0}^{\varepsilon,\delta}(n{T})\notin D\}}\big(1+|Z_{z_0, i_0}^{\varepsilon,\delta}(n{T})|\big)\\ \leq&-0.25\gamma_0(1-\varsigma)\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(n{T})\in D_2\big\}+ K_4(2H+1)\sqrt{\varsigma}\\ &+ K_4\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(nT)\notin D\big\}\mathbb{E}\big(1+|Z_{z_0, i_0}^{\varepsilon,\delta}(nT)|\big). \end{aligned} $$ Note that \bed\begin{array}{rl} &\!\!\!\displaystyle \liminf\limits_{k\to\infty}\dfrac1k\sum_{n=0}^{k-1}\dfrac1{T}\Big[\mathbb{E} U(Z_{z_0, i_0}^{\varepsilon,\delta}((n+1){T}))-\mathbb{E} U(Z_{z_0, i_0}^{\varepsilon,\delta}({nT}))\Big]\\ &\displaystyle \ =\liminf\limits_{k\to\infty}\dfrac1{kT}\mathbb{E} U(Z_{z_0, i_0}^{\varepsilon,\delta}(k{T}))\geq0. \end{array}\eed This forces \begin{equation}\label{ex17a} \begin{aligned} 0.25\gamma_0(1-\varsigma)&\limsup\limits_{k\to\infty}\dfrac1k\sum_{n=0}^{k-1}\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(n{T})\in D_2\big\}\\ \leq & K_4(2H+1)\sqrt{\varsigma}+ K_3\limsup\limits_{k\to\infty}\dfrac1k\sum_{n=1}^k\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(nT)\notin D\big\}\mathbb{E}\big(1+|Z_{z_0, i_0}^{\varepsilon,\delta}(nT)|\big). \end{aligned} \end{equation} In view of Lemma \ref{lm5.1}, we can choose $H=H(\Delta)$ independent of $(z_0, i_0)$ such that \begin{equation}\label{ex18} \limsup\limits_{t\to\infty}\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(t)\notin D\big\}\leq \limsup\limits_{t\to\infty}\dfrac{\mathbb{E}(|Z_{z_0, i_0}^{\varepsilon,\delta}(t)|)} {H}\leq\dfrac{\Delta}{6} ,\end{equation} and \bed\begin{array}{rl}&\!\!\!\displaystyle K_4\limsup\limits_{t\to\infty}\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(t)\notin D\big\}\mathbb{E}\big(1+|Z_{z_0, i_0}^{\varepsilon,\delta}(t)|\big)\\ &\displaystyle \ \leq K_4\limsup\limits_{t\to\infty}\dfrac{\Big[\mathbb{E}\big(1+|Z_{z_0, i_0}^{\varepsilon,\delta}(t)|\big)\Big]^2}{H}\leq\dfrac{0.1\gamma_0}{6}\Delta. \end{array}\eed Hence, we have \begin{equation}\label{ex19} K_4\limsup\limits_{k\to\infty}\dfrac1k\sum_{n=1}^k\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(nT)\notin D\big\}\mathbb{E}\big(1+|Z_{z_0, i_0}^{\varepsilon,\delta}(nT)|\big)\leq\dfrac{0.1\gamma_0}{6}\Delta. \end{equation} Choose $\varsigma=\varsigma(H)>0$ such that $0.25\gamma_0(1-\varsigma)\geq0.2\gamma_0$ and $ K_4(2H+1)\sqrt{\varsigma}\leq\dfrac{0.1\gamma_0}{6}\Delta$ and let $\varepsilon_0=\varepsilon_0(\varsigma, H),\delta_0(\varsigma, H)$ such that \eqref{ex8}, \eqref{ex8b}, and \eqref{ex8a} hold. As a result, we get from \eqref{ex17a} and \eqref{ex19} that \begin{equation}\label{ex20} \limsup\limits_{k\to\infty}\dfrac1k\sum_{n=1}^k\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(nT)\in D_2\big\}\leq \dfrac{\Delta}{6}. \end{equation} This together with \eqref{ex18} and \eqref{ex20} shows that for any $\varepsilon<\varepsilon_0, \delta<\delta_0$, we have \begin{equation}\label{ex21} \liminf\limits_{k\to\infty}\dfrac1k\sum_{n=1}^k\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(nT)\in D\setminus D_2\big\}\geq1- \dfrac{\Delta}3. \end{equation} One can conclude the proof by noting that the set $D\setminus D_2$ is a compact subset of $\mathbb{R}^{2,\circ}_+$. \end{proof} \begin{lm}\label{lm5.4} There are $ L>1$, $\varepsilon_1=\varepsilon(\Delta)>0$, and $\delta_1=\delta_1(\Delta)>0$ such that as long as $0<\varepsilon<\varepsilon_1, 0<\delta<\delta_1$, we have $$\liminf\limits_{T\to\infty}\dfrac1T\int_0^T\mathbb{P}\{Z^{\varepsilon,\delta}_{z_0, i_0}(t)\in [ L^{-1}, L]^2\}\geq 1-\Delta, (z_0, i_0)\in\mathbb{R}^{2,\circ}_+\times\mathcal{M}.$$ \end{lm} \begin{proof} Let $D$ and $T$ as in Lemma \ref{lm5.3}. Since $D\setminus D_2$ is a compact set in $\mathbb{R}^{2,\circ}_+$, by a modification of the proof of \cite[Theorem 2.1]{JJ}, we can show that there is a positive constant $ L>1$ such that $\mathbb{P}\{Z_{z, i}(t)\in [ L^{-1}, L]^2\}>1-\dfrac\Delta3, z\in D\setminus D_2, i\in M, 0\leq t\leq T$. Hence, it follows from the Markov property of the solution that \bed\begin{array}{rl} &\!\!\!\displaystyle\mathbb{P}\{Z_{z_0, i_0}^{\varepsilon, \delta}(t)\in[ L^{-1}, L]^2\}\\ &\displaystyle\quad \geq \Big(1-\dfrac{\Delta}3\Big)\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(jT)\in D\setminus D_2\big\}, t\in[jT, jT+T].\end{array}\eed Consequently, \begin{align*} \liminf\limits_{k\to\infty}\dfrac1{kT}&\int_{0}^{kT}\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(t)\in [ L^{-1}, L]^2\big\}\,dt\\&\geq \Big(1-\dfrac{\Delta}3\Big)\liminf\limits_{k\to\infty}\dfrac1{k}\sum_{j=0}^{k-1}\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(jT)\in D\setminus D_2)\big\}\geq 1-\Delta. \end{align*} It is readily seen from this estimate that $$\liminf\limits_{T\to\infty}\dfrac1{T}\int_{0}^{T}\mathbb{P}\big\{Z_{z_0, i_0}^{\varepsilon,\delta}(t)\in [ L^{-1}, L]^2\big\}dt\geq 1-\Delta.$$ \end{proof} \mainnex* \begin{proof} The conclusion of Lemma \ref{lm5.4} is sufficient for the existence of a unique invariant probability measure $\mu^{\varepsilon,\delta}$ in $\mathbb{R}^{2,\circ}_+\times\mathcal{M}$ of $(Z^{\varepsilon,\delta}(t), \alpha^\varepsilon(t))$ (see \cite{LB} or \cite{MT}). Moreover, the empirical measures $$\dfrac1t\int_0^t\mathbb{P}\big\{Z^{\varepsilon,\delta}_{z_0,i_0}(s)\in \cdot\big\}ds, t>0$$ converge weakly to the invariant measure $\mu^{\varepsilon,\delta}$ as $t\to\infty$. Applying Fatou's lemma to the above estimate yields $$\mu^{\varepsilon,\delta}([ L^{-1}, L]^2)\geq \Delta, \ \forall \,\varepsilon<\varepsilon_0, \delta<\delta_0.$$ This tightness implies Theorem \ref{thm5.1}. \end{proof} \subsection{An Example} \label{sec:6} In this section we provide a specific example under the setting of Section \ref{sec:5}. We consider the following stochastic predator-prey model with Holling functional response in a switching regime \begin{equation}\label{nex1} \left\{\begin{array}{ll} \displaystyle dx^{\varepsilon,\delta} (t)&\!\!\! \displaystyle =\bigg[r(\alpha^\varepsilon(t))x^{\varepsilon,\delta}(t)\left(1-\dfrac{x^{\varepsilon,\delta}(t)}{K(\alpha^\varepsilon(t)}\right)-\dfrac{m(\alpha^\varepsilon(t))x^{\varepsilon,\delta}(t)y^{\varepsilon,\delta}(t)}{a(\alpha^\varepsilon(t)) +b(\alpha^\varepsilon(t))x^{\varepsilon,\delta}(t)}\bigg]dt\\ & \quad \ +\sqrt{\delta}\lambda(\alpha^\varepsilon(t))x^{\varepsilon,\delta}(t)dW_1(t)\\ \displaystyle dy^{\varepsilon,\delta}(t)&\!\!\! \displaystyle =y^{\varepsilon,\delta}(t)\bigg[-d(\alpha^\varepsilon(t))+\dfrac{e(\alpha^\varepsilon(t)) m(\alpha^\varepsilon(t))x^{\varepsilon,\delta}(t)}{a(\alpha^\varepsilon(t))+b(\alpha^\varepsilon(t))x^{\varepsilon,\delta}(t)}-f(\alpha^\varepsilon(t))y^{\varepsilon,\delta}(t)\bigg]dt\\ &\quad \ +\sqrt{\delta}\rho(\alpha^\varepsilon(t))x^{\varepsilon,\delta}(t)dW_2(t),\end{array}\right. \end{equation} where $W_1$ and $W_2$ are two independent Brownian motions, $\alpha^\varepsilon(t)$ is a Markov chain, that is independent of the Brownian motions, with state space $\mathcal{M}=\{1, 2\}$ and generator $Q/\varepsilon$ where $$Q = \left( \begin{array}{rr} -1 & 1 \\ 1 & -1 \\ \end{array} \right),$$ and $r(1)=0.9, r(2)=1.1, K(1)=4.737, K(2)=5.238, m(1)=1.2, m(2)=0.8, a(1)=a(2)=1, b(1)=b(2)=1, d(1)=0.85, d(2)=1.15, e(1)=1, e(2)=2.5, f(1)=0.03, f(2)=0.01, \lambda(1)=1, \lambda(2)=2, \rho(1)=3, \rho(2)=1$. As $\varepsilon$ and $\delta$ tend to 0, solutions of equation \eqref{nex1} converge to the corresponding solutions of \begin{equation}\label{nex2} \left\{\begin{array}{lll}\displaystyle {d \over dt} {x}(t)=x(t)\left(1-\dfrac{x(t)}{5}\right)-\dfrac{x(t)y(t)}{1+x(t)}, \\ \displaystyle {d \over dt} {y}(t)=y(t)\left(-1+\dfrac{1.6x(t)}{1+x(t)}-0.02y(t)\right) \end{array}\right. \end{equation} on any finite time interval $[0,T]$. The system \eqref{nex2} has the unique equilibrium $(x^*, y^*)=(1.836, 1.795)$. Modifying \cite[Theorem 2.6]{SR} it can be seen that the solution of equation \eqref{nex2} has a unique limit cycle $\Gamma$ that attracts all positive solutions except for $(x^*, y^*)$. Moreover, it is easy to check that the drift \begin{equation}\label{nex4} \left(\begin{array}{l}r(i)x(t)\left(1-\dfrac{x(t)}{K(i)}\right)-\dfrac{m(i)x(t)y(t)}{a(i)+b(i)x(t)}\\ y(t)\left(-d(i)-\dfrac{e(i)m(i)x(t)}{a(i)+b(i)x(t)}\right)-f(i)y(t)\end{array}\right) \end{equation} does not vanish at $(1.836, 1.795)$. The assumptions of Theorem \ref{thm5.1} hold in this example. As a result, the family $(\mu^{\varepsilon,\delta})_{\varepsilon>0}$ converges weakly as $\varepsilon\downarrow 0$ to the stationary distribution of \eqref{nex2} that is concentrated on the limit cycle $\Gamma$. We illustrate this convergence in Figures \ref{f1}, \ref{f2} and \ref{f3} below by graphing sample paths of \eqref{nex1} for different values of $(\varepsilon,\delta)$. \begin{figure}[h] \centering \includegraphics[totalheight=2.2in,width=2.1in]{X_0_001.png} \includegraphics[totalheight=2.2in,width=2.1in]{X_0_00005.png} \includegraphics[totalheight=2.2in,width=2.1in]{X_limit.png} \caption{From left to right: Graphs of the $x^{\varepsilon,\delta}(t)$ component of \eqref{nex1} with $(\varepsilon,\delta)=(0.001, 0.001)$, $(\varepsilon,\delta)=(0.00005, 0.00005)$ and $x(t)$ of the averaged system \eqref{nex2} respectively.} \label{f1} \end{figure} \begin{figure}[h] \centering \includegraphics[totalheight=2.2in,width=2.1in]{Y_0_001.png} \includegraphics[totalheight=2.2in,width=2.1in]{Y_0_00005.png} \includegraphics[totalheight=2.2in,width=2.1in]{Y_limit.png} \caption{From left to right: Graphs of the $y^{\varepsilon,\delta}(t)$ component of \eqref{nex1} with $(\varepsilon,\delta)=(0.001, 0.001)$, $(\varepsilon,\delta)=(0.00005, 0.00005)$ and $y(t)$ of the averaged system \eqref{nex2} respectively.} \label{f2} \end{figure} \begin{figure}[h] \centering \includegraphics[totalheight=2.2in,width=2.1in]{figure1.png} \includegraphics[totalheight=2.2in,width=2.1in]{figure2.png} \includegraphics[totalheight=2.2in,width=2.1in]{figure3.png} \caption{Phase portraits of \eqref{nex1} for different values of $\varepsilon$ and $\delta$.} \label{f3} \end{figure} {\bf Acknowledgments.} The research of Nguyen H. Du was supported in part by NAFOSTED n$_0$ 101.02 - 2011.21. Three of the authors were supported in part by the National Science Foundation under grants DMS-1207667 (George Yin), DMS-1853463 (Alexandru Hening) and DMS-1853467 (Dang Nguyen). \clearpage \bibliographystyle{amsalpha}
\section{Introduction} Traditionally, steps of relational database design include Conceptual, Logical and Physical modelling. The theory behind these steps is well-understood and is part of the syllabus of many databases courses. Yet, database professionals often consider Logical Design (normalisation) too cumbersome and do not apply normalisation theory, despite the clear advantages of normalised database designs. Badia and Lemire~\cite{CallToArms} also highlight that conceptual and logical models do not always carry enough information about database semantics thereby leading the architect to a sub-optimal design. We use \emph{attributed port graphs} to represent a relational schema and its semantics. Port graphs are graphs where edges are connected to nodes at specific points, called ports. In port graphs, nodes, edges and ports can have attributes, which are used to represent properties of the system modelled. In this paper we focus on using port graphs in the logical phase of database design. We show that port graphs are a good choice of data structure to store relational metadata and can be transformed without the loss of metadata. To specify the transformations applied to relational schemata, we use \textit{port graph rewriting systems}, a general class of graph rewriting systems~\cite{Courcelle90}. The implementation framework we use is \textsc{Porgy}\xspace~\cite{FernandezKP18} -- a visual, interactive tool for the specification, simulation and analysis of systems based on port graph rewriting. \textsc{Porgy}\xspace provides a graphical interface, where users can define a system and specify its dynamics by means of port graph rewrite rules and strategies. Port graphs have node, port and edge \emph{attributes}, whose values are taken into account in port graph morphisms (used to define rewriting steps) and in strategy expressions (to control the application of rules). \textit{Strategic graph programs}~\cite{FernandezKP18}, consisting of an initial port graph and a set of rewrite rules controlled by a strategy, are the essence of \textsc{Porgy}\xspace. The strategy language offers separate primitives to select subgraphs of the model as focusing positions for rewriting and to select the rewrite rules to be applied, following the separation of concerns principle which makes programs easier to maintain and adapt. The strategy language also allows users to define strategies using not only operators to combine graph rewriting rules but also operators to deal with graph traversal and management of rewriting positions in a graph. \textsc{Porgy}\xspace provides a visual representation of the set of rewrite derivations (a \emph{derivation tree}) and includes features such as cycle detection, to facilitate debugging. We extend the rule language by adding the possibility to specify application conditions for a rule. That is, as part of a rewrite step, in the rule editor, users can define a set of conditions which are evaluated after a morphism has been found. The rewrite step is applied only if the rule condition evaluates to true. As a use-case we provide a set of port graph rewriting rules and a strategy to calculate the transitive closure of a set of functional dependencies. Although there are a number of tools already available to do the same, a distinctive advantage of our implementation is that it is visual and backtrackable (thanks to the derivation tree feature of \textsc{Porgy}\xspace). Our strategy is sound, complete and terminating, given the restriction that there are no cyclical dependencies in the schema. Summarising, our contributions are: \begin{enumerate} \item a new visual language, based on port graphs, for logical design of relational schemata, \item generic application conditions for rules (a port graph rewriting language extension), \item a strategic graph program to find the transitive closure of a set of functional dependencies. \end{enumerate} This last contribution is a key step towards building strategic graph programs to find minimal covers, candidate keys and Third Normal Form (3NF) relation schemata. \emph{Related Work.} Graph theory and graph rewriting is by no means a new addition to the set of tools that have been used for relational database design. In~\cite{EmbleyM11} hypergraphs are used and their well-formed property (called a canonical hypergraph) determines the quality of design they represent. The authors of \cite{SaiedianS96} used directed graphs to find all candidate keys of a relation in polynomial time. A special family of labelled graphs, FD-graphs, were introduced in \cite{AusielloDS83} to obtain meaningful closures of a set of functional dependencies. In terms of graph transformations and rewriting we highlight two works. Hypergraph rewriting was used in \cite{BatiniD78} for the manipulation of functional dependencies and Triple Graph Grammars were used in \cite{JahnkeZundorf99} to optimize an already existing schema. Section~\ref{sec:portgraphdb} translates the work presented in~\cite{AusielloDS83} to port graphs and extends it. \emph{Organization.} This paper is organised as follows. We briefly review relational database theory and port graph rewriting background in Section~\ref{sec:background}. We present our port graph visual language for logical design of relation schemata in Section~\ref{sec:portgraphdb}. In Section~\ref{sec:rulecond} we define the syntax of the language for generic rule application conditions. Section~\ref{sec:tcstrat} illustrates how the visual language and the generic rule application conditions can be used to find the transitive closure of a set of FDs. We then conclude in Section~\ref{sec:conclusion} by highlighting how these results can be used in future work. \section{Background} \label{sec:background} In this section we will review the definitions and background in relational databases and port graph rewriting that we are going to use throughout this paper. Due to space constraints, for formal definitions and proofs, this section will refer the reader to the relevant works rather than recalling them. We will also briefly review related work that used graphs to represent or transform relational schemata. \subsection{Relational Database Design} We assume that the reader is familiar with the theory of logical design of relational databases~\cite{Codd70,Codd71a}. In particular, the definitions of: \textit{relation schema}, \textit{attribute}, \textit{candidate key} and \textit{functional dependency} (FD)~\cite{Codd70,Codd71a}. We refer to a single attribute with letters from the beginning of the alphabet $A, B, \ldots$ and to attribute sets with letters from the end of the alphabet $X, Y, Z$. This paper will denote the set of all FDs of a relation schema $\Sigma_R$ or just $\Sigma$, where appropriate. We also assume familiarity with the inference rules of functional dependencies, also known as Armstrong's Axioms~\cite{BeeriFH77}: Transitivity, Trivial Dependency, Augmentation, Union, Decomposition, Pseudotransitivity. We call the set of all FDs that can be inferred from $\Sigma$, using Armstrong's Axioms, the \textit{syntactic closure} $\Sigma^+$. It was shown that Armstrong's Axioms are sound and complete, which means that they find only and all (respectively) semantically correct dependencies. This work assumes that a) FDs are in canonical form ie. only single attributes appear on the right-hand sides of the FDs and b) there are no cyclical dependencies. \subsection{Port Graph Rewriting} \label{subsec:pg} An attributed port graph is a labelled attributed graph where nodes have specific points-of-connection called ports, and edges that are attached to ports. In this subsection we recall the most important port graph rewriting constructs from Sections 2 and 3 of~\cite{FernandezKP18}, where the full formal definitions can also be found. A \emph{port graph rewrite rule} is a port graph $L \Rightarrow_C R$ consisting of two subgraphs $L$ and $R$ together with an \emph{arrow} node that links them. Each rule is characterised by its arrow node, which has a unique name (the rule's label), a condition \emph{Where} restricting the rule's matching, and ports to control the rewiring operations when rewriting steps are computed. Edges that run between ports of $L$, $R$ and the arrow node are coloured red by \textsc{Porgy}\xspace to distinguish them from normal edges. We recall the definition of the \emph{matching morphism} that states that a \emph{match} $g(L)$ of the left-hand side is found in $G$ if there is a total port graph morphism $g$ from $L$ to $G$ such that if the arrow node has an attribute \emph{Where} with value $C$, then $g(C)$ is true in $G$. $C$ is of the form $\textit{saturated}(p_1) \wedge ... \wedge \textit{saturated}(p_n) \wedge B$. The predicate $\textit{saturated}(g(p_i))$ is true if there are no edges between $g(p_i)$ and ports outside $g(L)$ in $G$ -- this ensures that no edges will be left dangling in rewriting steps. $B$ is a Boolean expression such that all its variables occur in $L$. To aid visual design of rewrite rules, \textsc{Porgy}\xspace allows us to name nodes in $L$ and $R$ but these are treated by the system as \emph{node name variables}. This means that node name variables identify the nodes on both sides of the rule but are instantiated when $g(L)$ is found using actual values from the matching nodes. Our contribution to the rewrite rule language is to provide the functionality of generic application conditions. This task was two-fold: we created a grammar for $B$ and implemented a \textsc{Porgy}\xspace Rule Editor plug-in (called Rule Conditions). We also recall here that a \textit{strategic graph program} consists of a \emph{located graph} (a port graph with two distinguished subgraphs that specify the locations where rewriting should take place or not), a set of \emph{located rewrite rules}, and a \emph{strategy expression}. In a located graph $G_{P}^Q$, $P$ represents the \emph{position} subgraph of $G$ where rewriting steps may take place and $Q$ represents the \emph{banned} subgraph of $G$ where rewriting steps are forbidden. A located rewrite rule $L \Rightarrow_C R_{M}^N$ can update $P$ and $Q$ in a rewrite step such that $P'=(P \setminus g(L)) \cup g(M)$ and $Q'= (Q \setminus g(L)) \cup g(N)$. Our work to find the transitive closure is implemented in the form of a strategic graph program. \subsection{Abstract Reduction Systems} \label{subsec:ars} We use the theoretical framework of Abstract Reduction Systems (ARS)~\cite[Chapter~2]{termrewrite} to prove termination. Various techniques to construct termination proofs have been published and we shall recall one here. This technique requires the embedding of the ARS $(A, \longrightarrow)$ into another ARS $(B, >)$ of which we know that it terminates. Our choice, $(\mathbb{N}, >)$ terminates because every descending chain $a_0 > a_1 > \ldots$ is finite. \begin{definition}[Monotone mapping] The mapping $\varphi : A \longrightarrow B$ is monotone if $x \longrightarrow x' \Rightarrow \varphi(x) > \varphi(x')$. $\varphi$ is also known as the \emph{measure function}. \end{definition} It does not automatically follow from the above that to prove termination of an abstract reduction system it suffices to find a measure function $\varphi$ to embed the system into, for example, $(\mathbb{N}, >)$. But if we can prove that the ARS is finitely branching then we can make use of the following lemma: \begin{lemma} \label{lemma:terminates} A finitely branching reduction terminates iff there is a monotone embedding into $(\mathbb{N}, >)$. \end{lemma} \section{A Visual Language for Relational Schema Design} \label{sec:portgraphdb} We now show how relational schemata (using functional dependencies only) can be modelled as attributed port graphs. We use the $'.'$ (dot, member-of) operator to refer to a particular port of a node. We define relation schema attributes and FDs as nodes. The fact that an attribute belongs to the right- or left-hand side of a FD is represented by edges. However, when adding FDs to the visual language, we face a challenge. Because of the semantics of a FD (i.e. LHS determines RHS), strategic graph programs executed on this visual language have to be able to distinguish between LHS and RHS attributes of FDs. A non-trivial FD must have at least one attribute on both sides where (RHS $\not\subseteq$ LHS). Also, as per the separation of concerns principle, a FD has to be aware of the list of attributes on its sides, not the other way around. Formally, we say that: \begin{definition}[Functional Dependency Port Graph, FDPG] \label{def:fdpg} Let $R$ be a relation schema and $\Sigma$ its set of functional dependencies. A {\em Funtional Dependency Port Graph} representing $\Sigma$ is an attributed port graph~\cite{FernandezKP18} $G_\Sigma=( V,P,E,D )_{{\cal F}}$ and is defined as: \begin{itemize} \item $V = V_A \cup V_{FD}$ is a union of two disjoint sets of nodes: \begin{itemize} \item $V_A$: set of Attribute nodes, one node for every attribute in $R$; \item $V_{FD}$: set of Functional Dependency nodes, one node for every functional dependency in $\Sigma$; \end{itemize} \item $P = P_A \cup P_{FD}$ is a union of two defined sets of ports: \begin{itemize} \item $P_A = \{pFD\}$ and \item $P_{FD} = \{pFDLHS, pFDRHS\}$; \end{itemize} \item $E$ is a finite set of edges between ports; two ports may be connected by only one edge; \item $D$ a set of records~\cite{FernandezKP18}; \end{itemize} and a set ${{\cal F}}$ of functions $Connect$, $Attach$ and ${\cal L}$ such that: \begin{itemize} \item Connect: for each edge $e \in E$, $Connect(e)$ is the pair $(p_1,p_2)$ of ports connected by $e$ where the only allowed pairs are (pFD, pFDLHS) and (pFDRHS, pFD). For every dependency $\varphi \in \Sigma: X \to A$ the pFD port of every attribute node corresponding to $X$ will be connected to the pFDLHS port of the dependency node corresponding to $\varphi$ and the pFDRHS port of the FD node $\varphi$ will be connected to the pFD port of the attribute node representing $A$. \item Attach: \begin{itemize} \item for each port $p \in P_A$, $Attach(p)$ is the node $n \in V_A$ to which the port belongs; \item for each port $p \in P_{FD}$, $Attach(p)$ is the node $n \in V_{FD}$ to which the port belongs; \end{itemize} \item ${\cal L}$ a labelling function~\cite{FernandezKP18}. \end{itemize} \end{definition} The following properties directly follow from Definition~\ref{def:fdpg}. \begin{property}[Cardinality of set $V$] In a FDPG $G_\Sigma=( V,P,E,D )_{{\cal F}}$, $|V| = |V_A| + |V_{FD}| = |R| + |\Sigma|$. \begin{proof} The mappings $R \to V_A$ and $\Sigma \to V_{FD}$ are bijections. \end{proof} \end{property} \begin{property}[Cardinality of set $E$] Given the set of functional dependencies $\Sigma = \{\varphi_1,\ldots,\varphi_k\}$ and a FDPG $G_\Sigma=( V,P,E,D )_{{\cal F}}$, $|E| = |\Sigma| + \sum_{i=1}^{k} |LHS(\varphi_i)|$. \begin{proof} Number of edges = one right-hand side edge per dependency + sum of the sizes of the left-hand side of each functional dependency. \end{proof} \end{property} We implement FDPGs in PORGY. Firstly, using the set $D$ of records, we introduce an attribute called \emph{RelDbType} which denotes the role of the node in the relational context. Every new node and port created in a FDPG-based logical model have to have a constant \emph{RelDbType} value, placing it in the appropriate set of $V_A, V_{FD}, P_A$ or $P_{FD}$. Attribute nodes have \emph{RelDbType} = ATTR, FD nodes have \emph{RelDbType} = FD. The port of an attribute that handles the connection to either side of a FD has \emph{RelDbType} = pFD. The LHS and RHS connection ports of a FD node have \emph{RelDbType} = FDLHS and FDRHS, respectively. Both FDLHS and FDRHS ports have an integer attribute \emph{FunctionalArity} defined that allows the system to store the number of attributes on each side. This is required because the matching algorithm does not enforce exact arity since a particular port can be connected to other ports outside the match found, however, when matching on FDs and their LHSs, every single LHS attribute has to be in the matching subgraph. \begin{figure}[h] \centering \begin{overpic}[scale=0.7]{fdpgexample.png} \texttt{ \put(0,40) { {\parbox{2in} { \scriptsize{ \underline{node:}\\ viewLabel="A"\\ RelDbType="ATTR"\\ \underline{port:}\\ RelDbType="pFD" }}}} \put(180,40) { {\parbox{2in} { \scriptsize{ \underline{node:}\\ viewLabel="FD2"\\ RelDbType="FD"\\ \underline{LHS port:}\\ viewLabel="LHS"\\ RelDbType="FDLHS"\\ FunctionalArity=1\\ \underline{RHS port:}\\ viewLabel="RHS"\\ RelDbType="FDRHS"\\ FunctionalArity=1 }}}} \put(335,50) { {\parbox{2in} { \scriptsize{ \underline{node:}\\ viewLabel="C"\\ RelDbType="ATTR"\\ \underline{port:}\\ RelDbType="pFD" }}}} } \end{overpic} \caption{The functional dependency $A \to C$.} \label{fig:fdpgexample} \end{figure} Both FD and ATTR nodes have an integer UID attribute that allows the rules to assign a numeric identity value to them. This is useful when a rule adds a new FD and we want control over the value of the unique identifier. We make use of the built-in \emph{viewLabel} attribute to assign meaningful node name constants (in models) and variables (in rules) to nodes. Figure~\ref{fig:fdpgexample} shows a functional dependency $A \to C$ as a port graph, with the relevant attribute values. Based on the FD-path definition of Ausiello et al.~\cite{AusielloDS83} we define an FDPG-path as follows: \begin{definition}[FDPG-Path] \label{def:fdpgpath} Given an FDPG $G_\Sigma=(V,P,E,D)_{{\cal F}}$, an attribute node set $X \subseteq V_A$ and an attribute node $j \in V_A$, a (directed) FDPG-Path $\langle X, j \rangle$ from $X$ to $j$ is a minimal subgraph $G_\Sigma' = (V',P',E',D')_{{\cal F}'}$ of $G_\Sigma$ such that $X \cup \{j\} \subseteq V_A'$ and one of the following conditions holds: \begin{enumerate} \item there exists $v \in V_{FD}'$ such that for all $x_i \in X, (x_i.pFD, v.pFDLHS) \in E'$ and $(v.pFDRHS, j.pFD) \in E'$, i.e. there exists $v \in V_{FD}'$ such that $X$ is the set of all left-hand side attributes and $j$ is the right-hand side attribute of the functional dependency represented by $v$; \item there exist $v \in V_{FD}'$ and $k \in V_A'$ such that $(k.pFD, v.pFDLHS) \in E'$ and $(v.pFDRHS, j.pFD) \in E'$ and there is an FDPG-Path $\langle X, k \rangle$ included in $G_\Sigma'$; \item there exist $v \in V_{FD}'$ and $K \subseteq V_A'$ such that for all $k_i \in K, (k_i.pFD, v.pFDLHS) \in E'$ \\ and $(v.pFDRHS, j.pFD) \in E'$ and $n$ FDPG-Paths $\langle X, k_1\rangle, \ldots \langle X, K_n \rangle$ are included in $G_\Sigma'$. \end{enumerate} \end{definition} \begin{property}[Transitivity] \label{prop:trans} Condition 2 of Definition~\ref{def:fdpgpath} represents Armstrong's Transitivity axiom. \begin{proof} An FDPG-Path $\langle X, k \rangle$ represents FD $X \to k$. \\ Edges $(k.pFD, v.pFDLHS) \in E$ and $(v.pFDRHS, j.pFD) \in E$ represent FD $k \to j$. The fact that there is an FDPG-Path $\langle X,j \rangle$ means the FD $X \to j$ exists. \end{proof} \end{property} \begin{property}[Union] \label{prop:union} Condition 3 of Definition~\ref{def:fdpgpath} represents Armstrong's Union axiom. \begin{proof} The $n$ FDPG-Paths $\langle X, k_1\rangle, \ldots, \langle X, k_n \rangle$ represent FDs $X \to k_1, \ldots, X \to k_n$.\\ Edges $k_i \in K, (k_i.pFD, v.pFDLHS) \in E$ and $(v.pFDRHS, j.pFD) \in E$ represent FDs $k_1 \to j, \ldots, k_n \to j$. The fact that $n$ FDPG-Paths $\langle X, j \rangle$ exist means that $X \to k_1, \ldots, X \to k_n$ can be unified into $X \to K$. \end{proof} \end{property} We now turn our attention to extending the port graph rewriting language so that strategic graph programs can be created to find the transitive closure of a Functional Dependency Port Graph. \section{Generic Rule Application Conditions} \label{sec:rulecond} We recall the structure of the arrow node \emph{Where} attribute defined in Section~\ref{subsec:pg}. In this section we extend the rewrite rule language to provide the functionality of generic application conditions. Firstly, we define the context-free grammar for $B$, secondly, we present the \textsc{Porgy}\xspace Rule Editor plug-in (called Rule Conditions). The EBNF grammar for $B$ is defined in Figure~\ref{fig:rulecondgrammar}. The structure of the grammar was inspired by C++ and follows the operator precedence of C++, too. \grammarindent1.5in \begin{figure}[!htb] \centering \begin{framed} \begin{flushleft} \begin{grammar} <node> ::= '$n($' "valid LHS node id" '$)$' <edge> ::= '$e($' "valid LHS edge id" '$)$' <element attribute> ::= ( <node> | <edge> ) '.' "quoted_attribute_name" <factor> ::= "number" | "quoted_string" | '(' <expression> ')' | '$!$' <factor> \alt <element attribute> | 'max(' <expression> ',' <expression> ')' \alt 'min('~<expression>~','~<expression>')' | 'random('<factor>')' <term> ::= <factor> \{('$*$' | '$/$' | '$\%$') <factor>\} <expression> ::= <term> \{('$+$' | '$-$' ) <term>\} <comp operator> ::= '$==$' | '$!=$' | '$\textgreater$' | '$\textless$' | '$\textgreater=$' | '$\textless=$' <comparison> ::= <expression> <comp operator> <expression> | 'NotNode('"quoted_attribute_name" <comp operator> <expression>')' <logical expression> ::= <logical term> \{ '||' <logical term> \} <logical term> ::= <logical factor> \{ '\&\&' <logical factor> \} <logical factor> ::= <comparison> | '$!$' <logical factor> | '(' <logical expression> ')' <rule condition> ::= \{<logical expression>\}; \end{grammar} \end{flushleft} \end{framed} \caption{The rule application condition grammar.} \label{fig:rulecondgrammar} \end{figure} We point out that when referring to a {\tt node}\xspace or {\tt edge}\xspace the user has to use its internally assigned {\tt id}\xspace. Also, due to the implementation of \textsc{Porgy}\xspace, there is no {\tt port}\xspace construct in the grammar -- they have to be referred to as {\tt node}\xspace. This is because the underlying graph engine (\textsc{Tulip}\xspace) processes ports as nodes. Terminal {\tt number} can be any integer or floating-point number and {\tt quoted_string} is an arbitrary-length string made up of letters, digits and symbols in double quotes. Similarly, {\tt quoted_attribute_name} is a valid name of an attribute of {\tt node}\xspace, {\tt edge}\xspace or {\tt port}\xspace. We highlight the {\tt NotNode()}\xspace operator: it iterates all nodes of $G$ and checks if there exists a node with an attribute {\tt quoted_attribute_name} and if the comparison on them evaluates to true. Intuitively, if at least one such node is found in $G$, {\tt NotNode()}\xspace returns false. It is very important to note here that this check is performed on the entire graph $G$, not just in $g(L)$. This is fundamentally different from the rest of the rule application condition grammar, which only applies to $g(L)$. This is a consequence of the definition of the port graph rewrite rule which states that all variables in the Boolean expression of the \emph{Where} attribute have to occur in $L$, so that the matching algorithm can work with them. When a match $g(L)$ is found, all variables of $B$ are mapped so that their actual values can be found. However, when checking the absence of a node, we are not constrained by this, because we are not specifying a node in {\tt NotNode()}\xspace -- we are only specifying an attribute comparison that \emph{must} evaluate to false on all nodes of $G$. \textsc{Porgy}\xspace offers a modular plug-in system allowing developers to create Python/C++ plug-ins. We implemented an LL-parser for the above detailed context-free grammar in C++ using the Boost Spirit Parser Framework. This framework generates and executes the parser design-time and builds and evaluates an abstract syntax tree run-time. When evaluated, the Boolean result is ANDed to the rest of the arrow node \emph{Where} attribute by the matching algorithm. The parser ensures that all nodes, edges, ports and attributes referred to in the conditions exist on the LHS of the rule. We also added a UI extension to \textsc{Porgy}\xspace that allows users to specify and parse/check the rule conditions. A screenshot of PORGY with the Conditions editor is presented in Figure~\ref{fig:PorgyScreenshot}. Examples of rule conditions can be found in Section~\ref{sec:tcstrat}. \begin{figure}[!htb] \centering \includegraphics[scale=0.55]{PorgyChainTestCase.png} \caption{PORGY, an initial graph ($G0$), Transitivity\textsubscript{1} rule and the conditions editor.} \label{fig:PorgyScreenshot} \end{figure} \section{Transitive Closure Strategy} \label{sec:tcstrat} In this section we present the strategy to find the transitive closure of a set of FDs using the previously introduced visual language and rule conditions. In PORGY, the starting point of port graph rewriting, the original model, is referred to as G0. In our case, G0 is a Functional Dependency Port Graph, as defined in Section~\ref{sec:portgraphdb}. The task is to find a relational transitive closure of G0, i.e. to generate all the transitive dependencies. Inspired by the Chase Algorithm~\cite{AhoBU79,MaierMS79} we \emph{iterate} every FD in G0 (and also those added by the rules), apply the rules that detect a transitive dependency pattern and create the new FD. Once we have every possible new transitive dependency that goes through the iterated FD, we mark it \emph{visited}. We define two new Boolean node attributes: {\tt iter}\xspace to flag the node currently being iterated and {\tt visit}\xspace to permanently flag the node as visited. The two rules controlling the iteration are \emph{IterOn} and \emph{IterOff} (omitted). \emph{IterOn} randomly selects a node with attribute values {\tt RelDbType=FD}, {\tt iter=false}, {\tt visit=false} and sets the two flags: {\tt iter=true}, {\tt visit=true}. \emph{IterOff} rule selects the currently iterated FD node {\tt RelDbType=FD}, {\tt iter=true}, {\tt visit=true} and turns the iteration flag off: {\tt iter=false}, {\tt visit=true}. \begin{figure}[!htb] \centering \begin{overpic}[scale=0.35]{RuleTransitivity1.png} \texttt{ \put(2,103){F2} \put(100,63){F1} \put(152,71){A} \put(60,71){B} \put(254,100){F2} \put(353,128){F1} \put(408,100){A} \put(315,120){B} \put(350,20){{\parbox{2in} {\tiny{iter=F\{\tt visit}\xspace=F\\UID=F1.UID*F2.UID}}}} \put(0,90){{\parbox{2in} {\tiny{FDRHS.FunctionalArity=1}}}} \put(95,40){{\parbox{2in} {\tiny{FDLHS.FunctionalArity=1\\FDRHS.FunctionalArity=1\{\tt iter}\xspace=T\{\tt visit}\xspace=T}}}} \put(190,50){{\parbox{2in} {\tiny{\underline{Rule Condition:}\{\tt NotNode()}\xspace(UID==F1.UID*F2.UID)}}}} } \end{overpic} \caption{Transitivity\textsubscript{1} rule.} \label{fig:RuleTransitivity1} \end{figure} \begin{figure}[!htb] \centering \begin{overpic}[scale=0.35]{RuleTransitivity2.png} \texttt{ \put(6,140){F2} \put(2,95){F3} \put(100,90){F1} \put(70,155){C} \put(60,100){B} \put(155,100){A} \put(255,92){F3} \put(253,135){F2} \put(353,122){F1} \put(408,92){A} \put(315,115){B} \put(315,150){C} \put(345,15){{\parbox{2in} {\tiny{iter=F\{\tt visit}\xspace=F\\UID=F1.UID*F2.UID*F3.UID}}}} \put(0,80){{\parbox{2in} {\tiny{FDRHS.FunctionalArity=1}}}} \put(0,124){{\parbox{2in} {\tiny{FDRHS.FunctionalArity=1}}}} \put(95,65){{\parbox{2in} {\tiny{FDLHS.FunctionalArity=2\\FDRHS.FunctionalArity=1\{\tt iter}\xspace=T\{\tt visit}\xspace=T}}}} \put(180,50){{\parbox{2in} {\tiny{\underline{Rule Condition:}\{\tt NotNode()}\xspace(UID==F1.UID*F2.UID*F3.UID)}}}} } \end{overpic} \caption{Transitivity\textsubscript{2} rule.} \label{fig:RuleTransitivity2} \end{figure} The first two rules we created can be seen on Figures~\ref{fig:RuleTransitivity1}~and~\ref{fig:RuleTransitivity2}. These rules detect FDPG-Paths representing transitive functional dependency chains e.g. $X \to Y \to A$ which, per Armstrong's Transitivity Axiom, means that $X \to A$ holds. Red edges in the rules go through the \emph{bridge} arrow node ports. These edges mean that all edges from outside the matching subgraph into the port on the LHS end of the red edge are to be copied to connect to the port on the RHS end of the red edge. For example, the red edges running between the pFDLHS ports of nodes F2 in both rules and of node F3 in Transitivity\textsubscript{2} rule ensure that \begin{itemize} \item the pFDLHS port of the newly created dependency will be connected to all attributes that were on the LHS of F2 (and F3); \item the pFDLHS port of the new instance of F2 (and F3) will be connected to all attributes that were on the LHS of F2 (and F3) (the original dependency is preserved). \end{itemize} To offer extra, context-specific backtracking functionality, we assign prime number values to the UID attribute of every FD. When a new FD is created by any transitivity rule, the UID of the new FD is the product of the UIDs of the FDs that lead to the new FD. This is calculated and assigned by the Rule Algorithm feature of \textsc{Porgy}\xspace. We use the Rule Condition functionality specified in Section~\ref{sec:rulecond} to control the applicability of the Transitivity rules. For example, the condition {\tt NotNode(UID==F1.UID*F2.UID)} means that if there is a node in the entire graph being rewritten (not only the matching subgraph) with a value in UID equal to the product of the UIDs of F1 and F2 (meaning the transitive dependency has already been found) then the rule shouldn't apply. Finally, the strategy that uses the above defined rules is Strategy~\ref{alg:trancl}. The \emph{ResetVisitedFlags} rule sets the flags {\tt visit=F}, to allow for a whole new loop to run on all FD nodes. \begin{algorithm} 1. \hspace*{8pt} $\while{\tmatch{IterOn}} \doo{$\\ a) \hspace*{16pt} $\one{IterOn}$;\\ b) \hspace*{16pt} $\repeatt{\one{Transitivity_1}}$;\\ c) \hspace*{16pt} $\one{IterOff}$\\ \hspace*{12pt} };\\ 2. \hspace*{8pt} $\repeatt{\one{ResetVisitedFlags}}$;\\ 3. \hspace*{8pt} $\while{\tmatch{IterOn}} \doo{$\\ a) \hspace*{16pt} $\one{IterOn}$;\\ b) \hspace*{16pt} $\repeatt{\one{Transitivity_2}}$;\\ c) \hspace*{16pt} $\one{IterOff}$\\ \hspace*{12pt} } \caption{Transitive Closure Strategy}\label{alg:trancl} \end{algorithm} Note that the node being iterated (node name variable: F1) plays a pivotal role in the matching and its LHS subgraph increases in size as the \emph{FunctionalArity} of its FDLHS port increases. The Transitive Closure Strategy is explained as follows: \begin{enumerate} \item For as long as there is at least one FD node the strategy hasn't \emph{visited} and \emph{iterated}, do \begin{enumerate} \item Pick one such FD at random (with equal probabilites) and mark it \emph{visited} and \emph{iterated}, \item Find and apply all possible applications of the rule \emph{Transitivity\textsubscript{1}} with the FD node picked in the previous step as the pivotal node F1, \item Mark F1 \emph{visited} but \emph{not iterated}; \end{enumerate} \item Mark all FD nodes \emph{not visited}; \item For as long as there is at least one FD node the strategy hasn't \emph{visited} and \emph{iterated}, do \begin{enumerate} \item Pick one such FD at random (with equal probabilites) and mark it \emph{visited} and \emph{iterated}, \item Find and apply all possible applications of the rule \emph{Transitivity\textsubscript{2}} with the FD node picked in the previous step as the pivotal node F1, \item Mark F1 \emph{visited} but \emph{not iterated}; \end{enumerate} \end{enumerate} \begin{property}[Derivation Tree of Strategy~\ref{alg:trancl}] \label{prop:derivtreebranch} Every non-leaf node in the Derivation Tree of Strategy~\ref{alg:trancl} has only one child node. Conversely, there is only one leaf node. \begin{proof} From the semantics of strategic port graph programs~\cite{FernandezKP18} we know that strategy constructs we use (\tmatch{}, \while{}, \repeatt{\one{}} and \one{}) will not branch the Derivation Tree at all. The loop constructs we use execute their arguments sequentially as many times as they apply. \end{proof} \end{property} Rules \emph{IterOn}, \emph{IterOff} and \emph{ResetVisitedFlags} are omitted due to space constraints. We discuss the semantic and rewriting characteristics of Strategy~\ref{alg:trancl} in Theorems~\ref{thm:tcsound}, \ref{thm:tccomplete} and \ref{thm:terminating}. \begin{thm} \label{thm:tcsound} The Transitive Closure Strategy is sound. That is, it \textbf{only} finds functional dependencies that can be inferred from the original set of FDs using Armstrong's Axioms but ignoring the meaningless dependencies that would be generated by the Reflexivity axiom. \end{thm} \begin{proof} Let $\Sigma$ be a set of functional dependencies and $G_\Sigma=(V,P,E,D)_{{\cal F}}$ the FDPG representing $\Sigma$. Let $K,L \subset V_A$ be attribute node sets representing attribute sets $X, Y$ (resp.) and $n \in V_A$ an attribute node representing attribute $A$. We want to show that, after executing the Transitive Closure Strategy on $G_\Sigma$ obtaining $G_\Sigma'$, an FDPG-Path $\langle K,n \rangle$ exists in $G_\Sigma'$ \textbf{only if} the functional dependency $X \to A$ can be inferred from $\Sigma$ using Armstrong's axioms.\\ It follows from Definition~\ref{def:fdpgpath} and Properties~\ref{prop:trans}~and~\ref{prop:union} that the existence of FDPG-Path $\langle X,Y,A \rangle$ in a leaf node of the Derivation Tree means that either $\Sigma$ contained the explicit dependency $X \to A$ or that the Transitive Closure Strategy added it. Our rules and strategies (in fact, \textsc{Porgy}\xspace itself) follow the rewriting principle that only rules can change the structure of the graph, strategy expressions can not. We ignore rules \emph{IterOn} and \emph{IterOff} because they only affect values of node attributes \emph{iter} and \emph{visit} and not alter FDPG-Paths in the graph. This means we have to show that \emph{Transitivity\textsubscript{1..k}} rules create only valid FDPG-Paths. These rules detect FDPG-Paths $\langle K,L,n \rangle$, add a new Functional Dependency node to represent the transitive dependency $X \to A$, and (using plain and red edges) ensure that all LHS and RHS attributes are connected to the ports of the new dependency node. This creates the direct path $\langle K,n \rangle$. According to Definitions~\ref{def:fdpg} and \ref{def:fdpgpath} this new path is valid. \end{proof} \begin{thm} \label{thm:tccomplete} The Transitive Closure Strategy is complete. That is, it finds \textbf{all} functional dependencies that can be inferred from the original set of FDs using Armstrong's Axioms but ignoring the meaningless dependencies that would be generated by the Reflexivity axiom. \end{thm} \begin{proof} We know that Armstrong's Reflexivity, Transitivity and Union rules, together, form a complete system of inference rules. We have to show that these three rules can be deduced from the Transitive Closure Strategy, or more precisely, from rules \emph{Transitivity\textsubscript{1..k}}. As noted earlier, a repeating pattern forms on the left-hand side of F1 in our Transitivity rules as $k$ increases. A $k$-ary Armstrong's Union operation is performed by \emph{Transitivity\textsubscript{k}}. For example, \emph{Transitivity\textsubscript{2}}: if the left-hand sides of F2 and F3 are the same attribute set, and the rule simply copies those edges (which it does), then the system behaves as if it performed the Union operation. It is obvious from the structure of the FDPG-Rules that they perform what Armstrong's Transitivity rule does. \end{proof} \begin{thm} \label{thm:terminating} Let $\Sigma$ be a set of functional dependencies and $G_\Sigma=(V,P,E,D)_{{\cal F}}$ the FDPG representing $\Sigma$. The Transitive Closure Strategy (TCS) is a terminating program that never fails. That is, assuming that there are no cyclical dependencies in $\Sigma$, there is no infinite descending chain in the Derivation Tree. \end{thm} \begin{proof} \emph{Never fails.} We know from the semantics set out in~\cite{FernandezKP18} that the expressions $\whiledoo{C}{S}$ and $\repeatt{S}$ never fail. $\one{IterOn}$ will also never fail because $\while{\tmatch{IterOn}}$ will check if it is possible to execute it at all. $\one{IterOff}$ will always apply because every execution of it is preceded by an execution of \emph{IterOn} and \emph{Transitivity\textsubscript{k}} rules do not change the \emph{iter} and \emph{visited} values of any pre-existing nodes. \emph{Finitely branching.} It follows from Property~\ref{prop:derivtreebranch} that the Derivation Tree of the strategic graph program $(G_\Sigma$, TCS$)$ is finitely branching. \emph{Embedding.} We want to find an embedding of $(G_\Sigma$, TCS$)$ into $(\mathbb{N}, >)$. We do this by defining a measure for every loop in the strategy. For $\repeatt{\one{Transitivity_k}}$, the measure is the number of possible matches of the LHS subgraph of F1. This is a good measure because a) the Rule Condition on UID prevents re-application of the rule and b) even though the NEW node is added, it is not part of the LHS subgraph of F1. For $\whiledoo{\tmatch{IterOn}}{...}$ the measure is $|V_{FD}|_{G0} + |\Sigma^+| - |V_{FD}|_{Gi}$. That is, the initial number of FD nodes in $G_\Sigma$ plus the size of the transitive closure of $\Sigma$ less the number of FD nodes after the $i$th application of the loop. With one successful application of \emph{Transitivity\textsubscript{k}} the number of FD nodes increases therefore the measure decreases. Note that neither of these measures can be 0 or less. From these it follows that the above detailed measure provides a good monotone mapping into $(\mathbb{N}, >)$. Then from Lemma~\ref{lemma:terminates} it follows that the strategy terminates. \end{proof} \section{Conclusion} \label{sec:conclusion} Our results can be used to build a strategic graph program that takes the transitive closure as input and finds a minimal cover~\cite{AusielloDS83,Maier80}. From a minimal cover, all candidate keys of a relation schema can be found~\cite{SaiedianS96}. The minimal cover and the set of candidate keys can then be used as inputs to Bernstein's Synthesis Algorithm to synthesize Third Normal Form~\cite{Bernstein76} schemata. \emph{Future Work} Definition \ref{def:fdpg} may be generalized such that the Attribute nodes have a list of dependency ports, each element of the list corresponding to a type of data dependency that can exist in a database (e.g. multi-valued dependency). Converesely, each dependency type requires the introduction of its own Dependency node type. Each new Dependency node type may represent bilateral dependencies (LHS and RHS) or multilateral ones. Each new dependency type will require its own Path definition. \bibliographystyle{eptcs}
\section{Introduction}\label{sec:introduction}} \IEEEPARstart{P}{arallel} processing (or parallel computing) is a field in electrical engineering and computer science related to the application of many computers running in parallel to solve computationally intensive problems. The main goal of parallel processing is to provide users with performance which no single computer may deliver. Scheduling is an important task allowing parallel systems to perform efficiently and reliably. In general, scheduling can be considered as managing the execution of jobs which required certain resources in such way that certain optimality and/or feasibility criteria are met. Such optimality metrics can be minimal finish time, lowest monetary cost and so on.\par Divisible load is a special but widely used type of data which can be divided into arbitrary sizes and independently processed in parallel. The divisible loads may be commonly encountered in applications which are processing a great amount of similar data units. During the past decades, Divisible Load Theory (DLT) has been proved as a powerful tool for scheduling in parallel systems.\par This paper mainly studies a parallel system which has multiple sources and multiple processors. Sequential load distribution is used for the workload distributing procedure. Compared with regular single source load distribution systems, multiple sources have to be scheduled to communicate with the processing nodes in a specific sequence which solves the finish time optimization problem. When processing nodes have front-end processors, the nodes can compute and communicate at the same time. So both the scenarios of the processing nodes with or without front-ends are considered. Numerical tests and simulations show that the multi-source multi-processor system has significant improvement compared with single-source systems by reducing the system minimal finish time.\par In this paper, a monetary cost model is also proposed for estimating the overall computing power used by the system. The trade-off relationship between monetary cost and minimal finish time is discussed for different situations. Detailed suggestions are given for the user who has a time budget, a cost budget or both. \subsection{Background} In the past decade, parallel and distributed systems have become a very general application. To process large-scale, data-intensive loads, multiple processors are required to work in parallel. The most important task for a scheduling problem is to assign different amounts of data to these parallel computers and make them finish each partition in an acceptable temporal range. Parallel systems are often used in the areas that have heavy computation requirements.\par In order to study the processing of load for parallel and distributed computing, Divisible Load Theory (DLT) was created [1] [5] [18] [19] [22]. It assumes that communication and computation loads can be partitioned arbitrarily among numerous processors and being processed in parallel. In 1988 [1], Cheng's paper first gave an intuitive proof for the Divisible Load Theory’s optimality principle. Five years later, a formal proof was given and an extensive search to validate the result was run on an IBM mainframe. Since then, DLT was developed and studied with multiple network topologies. Topologies include bus networks [2], star networks, tree networks [3], meshes [4], grids [14] [15], etc. Nowadays, DLT has also been developed for more different environments. These include cloud networks [9] and sensor networks [7] [8]. It has become a powerful tool for modeling data-intensive computational problems.\par \subsection{Applications} Potential applications of Divisible Load Theory can be widely found in the fields of image processing, video processing, sensor networks, cloud networks, etc. The following section gives more details of these applications.\par \subsubsection{Image Processing} Image feature extraction is a highly used function in computer vision systems. There are mainly two phases of computation for image feature extraction. In the first phase, the image will be segmented into many pieces and be processed independently and locally by different processors. During this procedure, the local features of the image will be extracted. In the second phase of computation, local features from different processors are exchanged and then processed to extract the desired features. The first phase of image feature extraction can be considered to use DLT since the load can be arbitrarily divisible since there is no precedence relations [5].\par \subsubsection{Video Processing} Another application for DLT is video processing. With the rapid growth of digital TV and interactive media over broadcast networks, the need for high performance computing for broadcasting is much more important than earlier. Parallel processing is one of the best ways to meet the need for a considerable amount of data processing. The authors of [6] first applied the DLT paradigm to the video encoding process and designed a parallel video encoder which was shown to achieve a good performance. With the help of DLT, the precise modeling and minimization of the execution time of each phase of the video encoding process becomes an easy task.\par \subsubsection{Sensor Network} Wireless sensor networks (WSN) are spatially distributed autonomous sensors to monitor physical or environmental conditions, such as temperature, sound, pressure, etc, and then cooperatively pass their data through the network to a main location. The problem of load distribution in a large scale sensor network was defined as an optimization problem to minimize the overall finish time of the whole system [7] [8]. By finishing sensing tasks faster, a system could get the returned results more quickly and also save more energy and monetary cost. Since the data collected by multiple sensors may have no precedence relations, it can be considered as a divisible load. In this case, DLT can be applied to sensor network applications to improve their performance.\par \subsubsection{Cloud Network} Cloud computing is an on demand service in which shared resources, information, software and other devices are provided according to the clients requirement at specific time [9]. Cloud network provides continuity for large-scale service-oriented applications [10] [11]. For more details on cloud computing, refer to [12] [13] [16] [17].The users may require the whole cloud network to process a job which is very data-intensive. To process the job, efficient load balancing techniques are needed, which involves reassigning the total load to the individual nodes of the collective systems to make resource utilization effective and to improve the response time of the job. The Divisible Load Theory paradigm is a very powerful tool for solving the load balancing problem, as long as the load is arbitrarily divisible.\par \subsection{Motivations and Contributions} In most of the previous work of Divisible Load Theory, it is often assumed that there is only one source to store the original data. This source node may deliver the data fractions to each processing node in a sequential manner, which leads to a result that many processing nodes are idle when they do not have any data to process. This results in a waste of computing resources and lower efficiency. Nowadays, with the rapid development of network and cloud computing, it is very practical to store the original data in different databanks and later send it to different processors for further computation [17]. It is also very practical to adapt the multi-source topology to traditional networks. In this paper, the topology of two-level tree networks fed data by a data originator node is considered. The original data is stored in the data originator on the first layer, which is only one source node. In the second layer of the tree topology, there are a few source nodes, which receive load from the first layer and further transmit them to the third layer. Finally, the third layer contains many processing nodes that do the computing tasks in parallel.\par This paper is mainly focused on the last two layers of this two-level tree network. Compared with the previous work on multi-source systems, the study is separated into two cases, which is that the processors have front-end processors, or the processors are not equipped with front-end processors. Closed-form solutions are found for both of the scenarios to achieve the overall minimal finish time for the system. Moreover, a monetary cost model is developed to estimate the cost charged by using the processors' computing power. The trade-off between monetary cost and system finish time/ makespan will be given. More suggestions are discussed for the users who have monetary budgets to use the system, or have requirements to finish the task in a certain time range. \par \subsection{Organization} The rest of this proposal is organized as follows. Section 2 first briefly introduces the basics of a classic scheduling problem using Divisible Load Theory. Then in section 3, a multi-source multi-processor network topology is studied, which is divided by two cases: the processing nodes are equipped with front-end processors or the processing nodes are not equipped with front-end processors. Section 4 contains the numerical tests and simulations for this parallel distribution system. The system speedup and performance analysis using Amdahl's Law will be shown in section 5. In section 6, we investigate calculating the overall monetary cost of the distribution system. More detailed discussion of the trade-off between the minimal finish time and monetary cost is covered here. The conclusion and future works appears in section 7 and 8.\par \par The following notation is used in this proposal: \begin{enumerate} \item[$\beta_{i,j}$] The fraction of divisible load that is assigned from source $S_i$ to processor $P_j$. \item[$G_{i}$] The inverse communicating speed of source $S_i$. \item[$R_{i}$] The release time of source $S_i$. \item[$A_{j}$] The inverse computation speed of processor $P_j$. \item[$C_{j}$] The cost for processor $P_j$ to work for one unit of time. \item[$T_{f}$] The finish time of processing the entire job. \item[$J$] The total job (amount of data) that needs to be distributed and processed. \item[$Cost_{total}$] The overall monetary cost for the entire system. \item[$Budget_{cost}$] The user's budget for the monetary cost. \item[$Budget_{time}$] The user's budget for the finish time. \end{enumerate} \section{Basics for Divisible Load Theory (DLT)} This section mainly studies the basics for Divisible Load Theory. A fundamental model is given and a closed-form solution for the overall minimal finish time is presented. \subsection{Definition} Divisible Load Theory (DLT) is a methodology involving the linear and continuous modeling of partitionable computation and communication loads for parallel processing. There is a fundamental assumption for most of the divisible load studies. In order to achieve the minimal finish time, all of the processors should finish processing the fractions of load that are assigned to themselves at the same time. If not, the unfinished data can always be sent to the processors which already finished processing. A formal proof of this assumption was given in [2]. \subsection{Problem Formulation} \begin{figure}[h!] \centering \includegraphics[width=0.52\textwidth]{basic_DLT} \caption{A Load Distribution System with One Source and M Processors} \label{fig:ts} \end{figure} A basic model using DLT is shown in Figure 1. The topology is a single-level tree network. The top layer is a source node, which stores all the data after getting a work task. It transmits different amount of load partitions to the second layer of the tree, where there are M processing nodes. These processors can do parallel computing once each of them receive their fraction of load $\beta_j$. Each processor has a separate link to connect the source node for communication. Based on the assumption that the source can only communicate with one processor at a time, the arrangement of the communication between source and processors is as follows: \par First of all, the source node $S$ does sequential communication, which means that it communicates with the arranged order of processors {$P_1$, $P_2$, $P_3$, ..., $P_{M-1}$, $P_M$}. Secondly, to achieve shorter finish time of processing the whole task, the processing nodes are sorted by the descending order of their computing speed [5], which is $A_1 \leq A_2\leq A_3\leq...\leq A_{M-1}\leq A_M$ (please note that $A_j$ is the inverse computing speed of $P_j$). This makes the processors with faster computing speed start processing earlier than the ones with slower speed. As another result, the time that all the processors finishes processing, which is called finish time $T_f$ can be shorter.\par The main problem to solve is to find a load distribution plan that minimizes the overall system finish time $T_f$, which includes all the processing nodes as well as the source node. \par \begin{figure}[h!] \centering \includegraphics[width=9.5cm]{basic_DLT_Timing} \caption{Timing Diagram for a Single-level Single-source Tree Network (without Front-End Processors)} \label{fig:ts} \end{figure} Figure 2 is the timing diagram for this basic load distribution system. Here, $G$ denotes the inverse communication speed of source $S$ and $A_i$ is the inverse computing speed of processor $P_i$. The load fraction that source $S$ sends to processor $P_i$ is represented by $\beta_i$. The source node is not involved in the computing procedure. Each of the processors starts computing their fraction of load after finishing receiving it . They stop processing at the same time instant $T_f$ to achieve the minimal finish time of the whole system.\par There are several assumptions for the processors: Firstly, a processor can only compute after it has finished the communication unless it is equipped with a front-end processor.Secondly,The source can only communicate with one worker processor at a time.Lastly,There is no communication between the worker processors.\par The timing diagram indicates that source $S$ has continuous communication with the processors. Once it finishes sending load to processor $P_i$, it continues sending load to processor $P_{i+1}$. Since all of the processors finish processing at the same time, the following equations are written to represent the finish time for each processor. For processor $P_i$, its finish time equals the communication time that source communicated with $P_1$ to $P_{i-1}$, plus the computing time of $P_i$: \begin{eqnarray} T_{f} = \sum_{k = 1}^{i} \beta_{k}G + \beta_{i}A_{i}, \hspace{0.2cm} i = 1, 2,... , M \end{eqnarray} Also, based on the definition that $\beta_{i}$ is the fraction of load that source $S$ sends to processor node $P_{i}$, the following equation can be written to normalize the total amount of load which is processed by this system:\par \begin{eqnarray} \sum_{i = 1}^{M}\beta_{i} = 1 \end{eqnarray} Since there are $M+1$ unknowns and $M+1$ linear equations, load partitions $\beta_{1}, \beta_{2},... ,\beta_{M}$ can be uniquely solved as well as the system finish time $T_{f}$.\par \section[Scheduling for Multi-Source System]{Scheduling for Multi-Source Multi-Processor System} In this section, a multi-source, multi-processor load distribution system is studied. The study will be divided into two scenarios: the processing nodes with or without front-end professors. Here, front-end processor refers to a small-sized sub-processor which has the job of data collection and communication between source node and processing node. If a processing node is equipped with a front-end processor, it can start computing the data once it starts receiving it with the front-end processor.\par There is an assumption that it always take a much longer time to compute the data rather than transfer it. In this case, if the node continuous receiving data, it can achieve continuous processing, which is assumed to be more efficient and energy-wise.\par There is also an assumption that the load which need to be sent by each source to the children processors has already been received from the job allocator by the time when each source starts distributing load.\par Meanwhile, since there are multiple sources ($S_1\sim S_N$) that are distributing load fractions in parallel, they are sorted in order to achieve shorter finish time. The system would always start using the sources which have faster communication speeds so that the processors could get the load fractions earlier. In this section, they are sorted in the descending order of their communication speed, which is $G_1 \leq G_2\leq G_3\leq...\leq G_{N-1}\leq G_N$ (please be noted that $G_i$ is the inverse communication speed of $S_i$). In this paper, the link speeds is determined by the communication speeds of the sources. \subsection{Scheduling with Front-end Processor} \subsubsection{Network Topology} \begin{figure}[h!] \centering \includegraphics[width=9cm]{multi_source} \caption{Network Topology for a Multi-source Multi-processor Network} \label{fig:ts} \end{figure} Figure 3 is the network topology for a multi-source multi-processor network. It is a two-level tree topology. Compared with the single source single-level tree network discussed with Figure 1, this network has one more layer, which is a job allocator/originator $J$ that stores all of the data that is needed for computing. This job allocator distribute fractions of load to the second layer, where there are N source nodes. Then, the source nodes further distribute the load into smaller fractions and allocate them to M processing nodes on the third layer.\par For each source node $S_i$, the amount of load it obtains from job allocator $J$ is denoted by $\alpha _i$ , which equals to the total load that $S_i$ sends to all the processing nodes. So the following equations can be written: $\alpha_i=\sum_{j = 1}^{M}\beta_{i,j}$. By solving the minimization problem of system finish time, all of the values for $\beta_{i,j}$, where $i=1, 2, 3, ..., N; j=1, 2, 3,. .., M$ can be found. So in order to simplify the problem, this paper mainly focuses on the two lower layers of this network.\par \subsubsection{Problem Formulation} \begin{figure}[h!] \centering \includegraphics[width=9.2cm]{TimgingDiagramfrontend} \caption{Timing Diagram for a Multi-source Multi-processor Network (with Front-End Processors)} \label{fig:ts} \end{figure} The timing diagram for multi-source multi-processor distribution system is shown in Figure 4. Here, $\beta_{i,j}$ denotes the fraction of load that source $G_{i}$ sends to processor $P_{j}$. For source $S_{i}$ it can start sending load to the $P_{1}$ right after the time reaches its release time $R_{i}$, or after the previous source $S_{i-1}$ finishes sending load to $P_{1}$, whichever is later.\par The order that each source distributes load fractions to processors is the same as the order that the processors are sorted, which means that processors with faster computing speed receive load earlier than the ones with slower computing speed. For the processors, the order that they receive load fractions from different sources matches the order that the sources are sorted.\par Inspired by the previous work [17], the following part will discuss the constraints for this problem.\par \textbf {A. Constraints Introduced by Release Time}\par First, a new parameter is introduced for this system, which is called the release time of sources. It is denoted by $R_i$ and shows when source $S_i$ first become available for usage.\par \begin{figure}[h!] \centering \includegraphics[width=9cm]{creteria1} \caption{Timing Diagram for the First Processor Getting Load Fractions from Adjacent Sources} \label{fig:ts} \end{figure} Figure 5 shows the case that processor $P_{1}$ is getting load fractions from adjacent sources. The release times $R_{i}$ or $R_{i+1}$ may appear at any time point before the first fraction starting sending out from source $S_i$ or $S_{i+1}$.\par In order to achieve continuous computing in $P_{1}$, the start time of sending load fraction {$\beta_{i+1,1}G_{i}$} should be exactly the same or earlier than the end time when $P_{1}$ finishes processing the previous load fraction. Also, the start time that source $S_{i+1}$ sends the first load fraction must be later or equal to its release time $R_{i+1}$.\par From the discussion above, the following criteria for release time can be proved: \begin{eqnarray} R_{i+1}\leq\ R_{i}+ \beta_{i,1}A_{1}, \hspace{0.4cm} i = 1, 2,... , N-1 \end{eqnarray} \textbf {B. Constraints Introduced by Continuous Processing}\par The timing diagram is shown as Figure 4. It indicates that there might be some gaps between adjacent load fractions. In order to study them, they can be divided into two categories: gaps on sources, and gaps on processors.\par For gaps on sources, for example, load fraction {$\beta_{i,j}G_{i}$} and {$\beta_{i,j+1}G_{i}$} are the two fractions that source $S_{i}$, sends to processor $P_{j}$ and $P_{j+1}$ in a sequence. The gap may appear when the distribution of {$\beta_{i,j}G_{i}$} is already finished while $P_{j+1}$ is still getting load fraction {$\beta_{i-1,j+1}G_{i-1}$} from source $S_{i-1}$.\par For gaps on processors, for example, load fraction {$\beta_{i,j}G_{i}$} and {$\beta_{i+1,j}G_{i+1}$} are the two fractions that processor $P_{j}$, gets from source $S_{i}$ and $S_{i+1}$ in a sequence. As discussed above, in order to be energy-wise, continuous processing for all the processors is required. The following constraints can be written based on Figure 6:\par \begin{eqnarray} \begin{aligned} \beta_{i,j}A_{j}+\beta_{i+1j,}G_{i+1}\leq\beta_{i,j}G_{i}+\beta_{i,j+1}A_{j+1}\\ i = 1, 2,... , N-1, \hspace{0.4cm} j=1, 2, ..., M-1 \end{aligned} \end{eqnarray} \begin{figure}[h!] \centering \includegraphics[width=9cm]{creteria2} \caption{Timing Diagram for Adjacent Load Processing Tasks} \label{fig:ts} \end{figure} \textbf{C. Constraints Introduced by Finish Time}\par As the system timing diagram shows, the finish time for each processor equals the summation of two parts. The first part is the waiting time for processor $P_{j}$ to get the first load fraction, which is $R_{1}$ plus the time that $S_{1}$ distributes load fractions to processors $P_{1}$, $P_{2}$,..., $P_{j-1}$. The second part is the total processing time for the node to finish all the tasks. Since there might have many gaps during communication, the following criteria can be written as an inequality: \begin{eqnarray} \begin{aligned} T_f\geq R_{1}+\sum_{k= 1}^{j-1}\beta_{1,k}G_{1}+\sum_{k= 1}^{N}\beta_{k,j}A_{j},\\ j=1, 2, 3, ..., M \end{aligned} \end{eqnarray} \textbf{D. Constraints Introduced by Normalization}\par In order to normalize all the load fractions $\beta_{i,j}$, a parameter called total job $J$ is used: \begin{eqnarray} J=\sum_{i=1}^{N}\sum_{j=1}^{M}\beta_{i,j} \end{eqnarray} As a conclusion, an optimization problem is defined as the following:\par Given the number of sources (N), number of processors (M), each source sends load fractions to all the processors in a sequence, all the sources work in parallel, find the load fractions assigned to each processor from each source such that the total system finish time is minimized.\par Minimize $T_f$ such that:\par \begin{center} $R_{i+1}-R_{i}\leq\beta_{i,1}A_{1}, \hspace{0.4cm} i = 1, 2, 3, ..., N-1$\\ $\beta_{i,j}A_{j}+\beta_{i+1j,}G_{i+1}\leq\beta_{i,j}G_{i}+\beta_{i,j+1}A_{j+1}$, \\$i = 1, 2,... , N-1,$ \hspace{0.4cm} $j=1, 2, 3, ..., M-1$\\ $J=\sum_{i=1}^{N}\sum_{j=1}^{M}\beta_{i,j}$\\ $T_f\geq R_{1}+\sum_{k= 1}^{j}\beta_{1,k}G_{1}+\sum_{k= 1}^{N}\beta_{k,j}A_{j}$,\hspace{0.4cm}$j=1, 2, 3,..., M$ \end{center} In this problem, the variables are the system finish time $T_f$ and the load fractions $\beta_{i,j},\hspace{0.2cm} i=1, 2, 3, ..., N$ and $j=1, 2, 3, ..., M$. So it is a linear programming problem which has N * M + 1 variables.The solution of this problem is a point in a N * M + 1 dimensional space.\par \subsection{Scheduling without Front-end Processor} \subsubsection{Network Topology} This section mainly discusses the case in which all the processing nodes are not equipped with front-end processors. In this case, a node can only start processing the data once all of it's data has been received. The network topology remains the same as Figure 3, however the timing diagram is changed as Figure 7 shows.\par \begin{figure}[h!] \centering \includegraphics[width=9cm]{TimgingDiagramno} \caption{Timing Diagram for a Multi-source Multi-processor Network (without Front-End Processors)} \label{fig:ts} \end{figure} \subsubsection{Problem Formulation} From the timing diagram it can found that gaps may appear in the communication phase. In this research, two new parameters are used to mark the time stamps of the starting and ending time of sources distributing each load fraction:\par \begin{center} $TS_{i,j}$ \hspace{0.4cm} The time that source $S_{i}$ starts distributing load fraction $\beta_{i,j}$ to processor $P_{j}$.\\ $TF_{i,j}$ \hspace{0.4cm} The time that source $S_{i}$ ends distributing load fraction $\beta_{i,j}$ to processor $P_{j}$. \end{center} \textbf{A. Constraints Introduced by the Amount of Load for Each Load Fraction}\par Based on the definition of $TS_{i,j}$ and $TF_{i,j}$, the following equation is used to measure the length of each load transmission between sources and processors:\par \begin{eqnarray} \begin{aligned} TF_{i,j} - TS_{i,j}=\beta_{i,j}G_{i} , \\ \hspace{0.2cm} i=1, 2, 3, ..., N, \hspace{0.2cm} j=1, 2, 3, ..., M \end{aligned} \end{eqnarray} \textbf{B. Constraints Introduced by $TS_{i,j}$ and $TF_{i,j}$ on Processors}\par \begin{figure}[h!] \centering \includegraphics[width=8cm]{creteria21} \caption{The Relationship Between Two Adjacent Loads Transited to Processor $P_j$} \label{fig:ts} \end{figure} Figure 8 shows the relationship between two adjacent load transmissions on processor $P_j$. It is clearly assumed by the sequential communication that $S_{i+1}$ has to wait until $S_i$ finishes distributing load to $P_j$:\par \begin{eqnarray} \begin{aligned} TF_{i,j} \leq TS_{i+1,j} , \\ \hspace{0.4cm} i=1, 2, 3, ..., N-1, \hspace{0.4cm} j=1, 2, 3,..., M \end{aligned} \end{eqnarray} \textbf{C. Constraints Introduced by $TS_{i,j}$ and $TF_{i,j}$ on Sources}\par \begin{figure}[h!] \centering \includegraphics[width=8cm]{creteria22} \caption{The Relationship Between Two Adjacent Loads Transited by Source $S_i$} \label{fig:ts} \end{figure} Figure 9 shows the Relationship Between Two Adjacent Loads Transited by Source $S_i$. Similar with the discussion for the last constraint, $P_{j+1}$ has to wait until $P_j$ finishes receiving load from $S_i$:\par \begin{eqnarray} \begin{aligned} TF_{i,j} \leq TS_{i,j+1},\\ \hspace{0.4cm} i=1, 2, 3,..., N, \hspace{0.4cm} j=1, 2, 3, ..., M-1 \end{aligned} \end{eqnarray} \textbf{D. Constraints Introduced by Release Time}\par Firstly, the release time $R_1$ for the first source $S_1$ equals the starting time of distributing load fraction $\beta_{1,1}$:\par \begin{eqnarray} TS_{1,1}=R_1 \end{eqnarray} Secondly, the start time of the first load fraction transmission by each source should be equal or later than the release time of that source:\par \begin{eqnarray} TS_{i,1}\geq R_i, \hspace{0.4cm} i=2, 3, 4,..., N \end{eqnarray} To make the full use of each source, it should be keep on distributing load before the next source first become available at its release time:\par \begin{eqnarray} TF_{i-1,1}\geq R_{i}, \hspace{0.4cm} i=2, 3, 4,..., N \end{eqnarray} \textbf{E. Constraints Introduced by Finish Time}\par Each processing node starts processing right after it finishes receiving all the data for the sources. So the finish time of $P_j$ equals the summation of the finish time of transmitting last load fraction, which is $TF_{N,j}$, plus the computing time, $\sum_{i=1}^{N}\beta_{i,j}A_j$. Since this is an optimization problem, the finish time can be written as inequalities:\par \begin{eqnarray} T_f\geq TF_{N,j} + \sum_{i=1}^{N}\beta_{i,j}A_j ,\hspace{0.4cm} j=1, 2, 3,..., M \end{eqnarray} \textbf{F. Constraints Introduced by Normalization}\par As with the last case, the parameter total job $J$ is used to normalize all the load fractions $\beta_{i,j}$:\par \begin{eqnarray} J=\sum_{i=1}^{N}\sum_{j=1}^{M}\beta_{i,j} \end{eqnarray} Here is the summary of the optimization problem:\par Given the number of sources (N), number of processors (M), each source sends load fractions to all the processors in a sequence, all the sources work in parallel, find the load fractions assigned to each processor from each source such that the total system finish time is minimized. Minimize $T_f$ such that\par \begin{center} $TF_{i,j} - TS_{i,j}=\beta_{i,j}G_{i} ,\hspace{0.2cm} i=1, 2,3, ..., N, \hspace{0.2cm} j=1, 2, 3,..., M$\\ $TF_{i,j} \leq TS_{i+1,j} , \hspace{0.4cm} i=1, 2, 3,..., N-1, \hspace{0.4cm} j=1, 2,3, ..., M$\\ $TF_{i,j} \leq TS_{i,j+1}, \hspace{0.4cm} i=1, 2,3, ..., N, \hspace{0.4cm} j=1, 2, 3,..., M-1$\\ $TS_{1,1}=R_1$\\ $TS_{i,1}\geq R_i, \hspace{0.4cm} i=2, 3,4, ..., N$\\ $TF_{i-1,1}\geq R_{i}, \hspace{0.4cm} i=2, 3,4, ..., N$\\ $J=\sum_{i=1}^{N}\sum_{j=1}^{M}\beta_{i,j}$\\ $T_f\geq TF_{N,j}+\sum_{k= 1}^{N}\beta_{k,j}A_{j}\hspace{0.4cm}j=1, 2, 3,..., M$ \end{center} Similar to the last case that already has been studied, the variables are: the system finish time $T_f$, the load fractions $\beta_{i,j},\hspace{0.2cm} i=1, 2, ..., N$, and $j=1,2, ..., M$, and the starting time and finish time for the transaction of each fraction of load $TF_{i,j}$, and $TS_{i,j}$. So it is also a problem which can be solved by linear programming techniques.\par \section{Simulation and Numerical Tests} This section presents multiple simulation tests to prove the improvement of multi-source multi-processor distribution system compared with regular single-source system. A numerical test will firstly be presented to show a simple case. Later, more simulations will be tested to show how the system finish time will change as the number of sources/processors increases. \subsection{Numerical Test} In this numerical test, two distribution systems are created (one with front-end processor built with all processors and one without). The parameters used are listed in Table 1 and Table 2.\par \begin{table}[h] \caption{Parameters Used for the Numerical Test of Multi-source Multi-processor System (with Front-end Processors)} \begin{center} \begin{tabular}{||c c c c||} \hline $(G_1, G_2)$ & $(R_1, R_2)$ & $(A_1 ,A_2, ..., A_{5})$ & $J$ \\ \hline (0.2, 0.4) & (10, 50) & (2, 3, ..., 6) & 100 \\ \hline \end{tabular} \end{center} \end{table} \begin{figure}[h!] \centering \includegraphics[width=9cm]{amountofloadfromeachsource} \caption{Amount of Load Processed by Each Processor, Received From Both Sources (with Front-end Processors)} \label{fig:ts} \end{figure} Figure 10 is the summary of load fractions that each source sends to each processor. For Figure 11, the load that both first and second source sent to each processor are added and the amount of load that each processor computes is plotted. It is very clear that the processors with faster computing speeds do more processing work than the slower ones. By using the faster processors more than the slower ones, the system can minimize the finish time.\par \begin{figure}[h!] \centering \includegraphics[width=8cm]{totalloadprocessoedoneachprocessor} \caption{Amount of Load Assigned from Each Source to Each Processor (without Front-end Processors)} \label{fig:ts} \end{figure} \begin{table}[h] \caption{Parameters Used for the Numerical Test of Multi-source Multi-processor System (without Front-end Processors)} \begin{center} \begin{tabular}{||c c c c||} \hline $(G_1, G_2)$ & $(R_1, R_2)$ & $(A_1 ,A_2, A_3)$ & $J$ \\% [0.5ex] \hline (0.2, 0.2) & (0, 5) & (2, 3, 4) & 100 \\ \hline \end{tabular} \end{center} \end{table} \subsection{Finish Time Versus Increasing Number of Sources and Processors} \begin{table}[h] \caption{Parameters Used for Testing the System Minimal Finish Time} \begin{center} \begin{tabular}{||c c c c||} \hline $(G_1, G_2, G_3)$ & $(R_1, R_2, R_3)$ & $(A_1 ,A_2, A_3, ..., A_{20})$ & $J$ \\ \hline\hline (0.5, 0.6, 0.7) & (2, 3 ,4) & (1.1, 1.2, 1.3 ,... ,3) & 100 \\% [1ex] \hline \end{tabular} \end{center} \end{table} \begin{figure}[h!] \centering \includegraphics[width=8cm]{123SourcesNoFrontEnd} \caption{Minimal Finish Time vs. Number of Sources and Processors (without Front-end Processors)} \label{fig:ts} \end{figure} Figure 12 shows 3 cases in which the system has a single source, two sources or three sources in the system. Here all the processors are not equipped with front-end processors. The x-axis is the increasing number of processors working for the distribution system. The y-axis is the system minimal finish time in seconds. All the parameters used are the same as Table 3.\par As the figure shows, while adding more sources in the system, the overall finish time can be reduced since the added sources could help distributing load to the processors faster. Also, by increasing the number of processors used in the system, finish time is also reduced. This is because more processing resources are introduced to the system and the whole system can compute the data faster. In increasing the number of processors, the influence of adding them is becoming smaller, since the new processors have slower computing speed. So compared with faster processors which were added on earlier, they can improve the system in a less significant way. The parameters used in this simulation are listed in Table 3. The simulation result for the system with front-end processors is similar to Figure 12.\par \subsection{Finish Time Versus Different Job Sizes} \begin{figure}[h!] \centering \includegraphics[width=8cm]{Jsizewithfrontend} \caption{Minimal Finish Time vs. Number of Processors and Different Job Sizes (with Front-end Processors)} \label{fig:ts} \end{figure} Figure 13 demonstrates how the minimal finish time changes while the total job size varies. The distribution system with front-end processors was used in this simulation. There were three sources and up to 20 processors to do the simulation. The parameters used are the same as Table 3, except using three different job sizes. It is natural that the larger the job size is, the longer time the system needs to compute it. Based on the Figure 13, it can be found that the multi-source multi-processor system can have much more significant improvement while the job size is larger. For the case that the job size equals to 500, it saves about 50 percent of finish time by increasing the number of processors from three to seven. This gives us an evidence that the multi-source multi-processor job distribution system can significantly improve the performance of any large data center, sensor network, cloud network, etc.\par \section{Speedup and System Performance Analysis} In recent decades, Amdahl's Law is widely used as a formula to give the theoretical speedup of the execution of a task with fixed workload. Performance levels can be found by comparing different systems using Amdahl's Law with the same workload. \subsection{Introduction of Amdahl's Law} Amdahl's Law was firstly created by G.H Amdahl in 1967 [20] for discussing if it was practical and efficient to use a multiplicity of processors rather than a single processor to achieve better performance. In his work [21], a performance metric called "speedup" was used to predict the theoretical speedup of execution time when using multiple processors. It is the ratio of the solution time for one processor, T(1), to the solution time for multiple processors, T(p):\par \begin{eqnarray} \begin{aligned} S = \frac{T(1)}{T(p)} \end{aligned} \end{eqnarray} Since the main goal for this paper is to study the improvement of using multiple sources in the load distribution system compared with the traditional single-source systems, a new equation is used to show the speedup of using p sources and n processors over q source and n processors. \begin{eqnarray} \begin{aligned} S = \frac{T(1 \; source, n \; processors)}{T(p \; sources, n \; processors)} \end{aligned} \end{eqnarray} \subsection{Speedup Analysis and Simulations} In this problem, both the number of source nodes and the number of processing nodes can be increased. To adapt Amdahl's Law, either the number of sources or the number of processors is fixed to compare the system optimal finish time, which can be referred to the solution time in Amdahl's Law, with the finish time using less nodes.\par The simulation results are plotted in Figure 14 with the data in Table 4. In the simulation, the distribution system without front-end processors was used. In order to highlight the improvement of increasing the number of processors and sources, homogeneous nodes are being used during this simulation process.\par \begin{table}[h] \caption{Parameters Used for the Speedup and Performance Analysis} \begin{center} \begin{tabular}{||c c c c||} \hline $(G_1 ,G_2, ..., G_{10})$ & $(R_1 ,R_2, ..., R_{10})$ & $(A_1 ,A_2, A_3, ..., A_{18})$ & $J$ \\ \hline\hline (0.5, 0.5, ..., 0.5) & (0, 0, ..., 0) & (2, 2, ..., 2) & 100 \\ \hline \end{tabular} \end{center} \end{table} Figure 14 is the system finish time of the systems using 1, 2, 3, 5 and 10 sources and 1 to 18 processors. The x-axis indicates the increasing number of processors and the y-axis indicates the minimal system finish time which solved with the method discussed in previous section.\par Figure 15 is the speedup of the system using multiple sources and processors compared with single source and the corresponding number of processors. This plot was drawn with Equation 16 and the simulation values in Figure 14. The x-axis indicates the increasing number of processors and the y-axis indicates the speedup of the system with the corresponding number of sources and processors.\par Figure 15 shows that by adding more sources to the system, the speedup becomes larger. For example, the speedup for the system of 2 sources and 12 processors is around 1.59, comparing with the speedup using 3 sources/ 5 sources/ 10 sources (also 12 processors) to be 1.90/ 2.21/ 2.49. In this example, the speedup value of using 3 sources has an improvement of 19\% compared with the case using 2 sources. The speedup value of using 10 sources has an improvement of 57\%.\par The relative low values of speedup observed here are due to inefficiencies of the sequential distribution protocol [5].\par Meanwhile, by observing each fitted line of the speedup values, one can easily see that the speedup value for using the same number of source and increasing number of processors is also gradually getting larger. \par These observations further prove that the multi-source multi-processor system provides improvement for the load distribution system by reducing the system minimal finish time and boosting the system speedup level. \begin{figure}[h!] \centering \includegraphics[width=9cm]{nofrontend_homo011718} \caption{Minimal Finish Time for the System without Front-end Processors} \label{fig:ts} \end{figure} \begin{figure}[h!] \centering \includegraphics[width=9cm]{nofrontend_homo_speedup011718} \caption{Speedup for the System without Front-end Processors} \label{fig:ts} \end{figure} \section[Trade-off Analysis]{Trade-off Analysis for Minimal Finish Time and Monetary Cost} In this section, since the computing of jobs requires a great amount of computing power, a concept called monetary cost is introduced to measure the monetary cost for hiring the processors' computing power. Monetary cost was previously studied in [23] [24]. Here a trade-off analysis is presented with several suggestive plans given to users who have budgets on monetary cost, or have to finish processing the total data within a certain finish time, or have the budget for both money and time. In this section all the simulations are done with the network with front-end processors equipped with the processing nodes. \subsection{Definition of Monetary Cost} The term monetary cost is the cost for using sources or processors for processing the load. This paper mainly focus on the monetary cost for the processors. The monetary cost for processors $P_j$ is defined as $C_{j}$. The unit for them is cost/unit time. So the total cost for $P_j$ to process load fraction $\beta_{i,j}$ is $\beta_{i,j}A_jC_{j}$. The total monetary cost for the entire system to finish processing job $J$ is:\par \begin{eqnarray} Cost_{total}=\sum_{i=1}^{N}\sum_{j=1}^{M}\beta_{i,j}A_jC_{j} \end{eqnarray} In this paper, there is an assumption that the faster processors have more expensive monetary cost, which is: $C_1>C_2>...>C_M$. \subsection{Trade-off Analysis with a Cost Budget} This section is going to discuss how many processors should be used given a cost budget $Budget_{cost}$. Since both the number of sources and the number of processors influences the results, and this paper is mainly discussing the computing cost given by the processors. In the case, the number of sources is fixed to be two. The parameters used in this section are listed in Table 6.\par \begin{table}[h] \caption{Parameters Used for the Trade-off Analysis} \begin{center} \begin{tabular}{||c c c c c||} \hline $(G_1, G_2)$ & $(R_1, R_2)$ & $(A_1 ,A_2, ..., A_{20})$ & $(C_1, C_2, ..., C_{20})$ & $J$ \\% [0.5ex] \hline\hline (0.5, 0.6) & (2, 3) & (1.1, 1.2, ..., 3) & (29, 28, ..., 10) & 100 \\ \hline \end{tabular} \end{center} \end{table} \textbf{STEP 1. Plot the Number of Processors VS. Total Cost}\par \begin{figure}[h!] \centering \includegraphics[width=9cm]{totalCost2} \caption{System Total Monetary Cost of Computing VS. Number of Processors} \label{fig:ts} \end{figure} First, the relationship between the number of processors and total cost is plotted as Figure 16. The x-axis is the number of processors used in the distribution system, and y-axis is the total cost for computing, where the units are dollars. It is natural that the total computing cost is growing as the number of processors increases. However the growth rate is becoming smaller. This is because although more processors are used in the system, while solving the optimal problem of finish time, the slower/cheaper processors are assigned with much less amount of load to process. This makes them have less influence on the total cost. \par As an example, given that the budget for the system monetary cost is $Budget_{cost}=$3450 dollars. By looking into the list of total cost, the two closest solutions can be found:\par Using 6 processors: the total computing cost is about 3433.77 dollars;\par Using 7 processors: the total computing cost is about 3451.67 dollars.\par In this case, all the solutions that using less than or equal to 6 processors is within the budget of 3450 dollars.\par \textbf{STEP 2. Plot the Number of Processors VS. Gradient of Finish Time and the Gradient of $T_f$}\par \begin{figure}[h!] \centering \includegraphics[width=9cm]{minTf1 \label{fig:ts} \caption{System Minimal Finish Time VS. Number of Processors} \end{figure} Second, Figure 17 is plotted to show the relationship between the number of processors and system minimal finish time. \begin{figure}[h!] \centering \includegraphics[width=9cm]{gradiantTf2 \caption{Gradient of System Minimal Finish Time VS. Number of Processors} \label{fig:ts} \end{figure} Figure 18 shows the gradient of finish time. The definition of the gradient of $T_f$ is:\par \begin{eqnarray} Gradiant_{T_{f,m}}=\frac{T_{f,m\hspace{0.1cm}processors}-T_{f,m-1\hspace{0.1cm}processors}}{T_{f,m-1\hspace{0.1cm} processors}} \end{eqnarray} The values of the gradient of finish time demonstrates by what percentage can the new solution make the whole system finish the job faster. In this test result, $Gradient_{T_{f,5}}$ is about 8.4\%, and $Gradient_{T_{f,6}}$ is about 5.3\%. \par \textbf{STEP 3. The Trade-off Plan}\par Now let us discuss a trade-off plan. It is clear that when the number of processors increases, the finish time decreases but the monetary cost increases. So there must be a trade-off between finish time and monetary cost. Suppose when adding one more processor to the system, the finish time is reduced by less than 6\%, then the user may prefer using less processors to reduce the monetary cost rather than using one more processor to reduce finish time, which is already reaching a very low value. In this way, a good suggestion can be given to the user about how many processors should be used in the system to be within the budget of cost. In this example, the user should use 5 processors. \subsection{Trade-off Analysis with a Time Budget} This section is going to discuss how many processors should be used given the maximal of time that the total job needs to be finished distributing and processing, which is called $Budget_{time}$. The simulation results in the last section is used here.\par First, the user increases the number of processors from 1 to $m$, where $T_{f,m\hspace{0.1cm}processors}\leq Budget_{time}$, and $T_{f,m-1\hspace{0.1cm}processors}\geq Budget_{time}$. Since the finish time decreases as the number of processors increases, and $Budget_{time}$ is the maximum finish time that the user required, all the solutions that have more than $m$ processors could meet the requirement. For example, while $Budget_{time}$=32 seconds, all the solutions with equal to or more than 10 processors meets the requirement.\par Meanwhile, since the total computation monetary cost increases as the number of processors increases, with the purpose of saving money, the user should use as few processors as possible, which is $m$ processors. In the example, the user should pick 10 processors. \subsection{Trade-off Analysis with Both a Time Budget and a Cost Budget} In this section, both the time budget and the cost budget are considered. By combining the two graphs of number of processors versus finish time and total cost, the solution area which meet both of the requirements is highlighted.\par \textbf{CASE 1. The Two Solution Areas Overlapped}\par \begin{figure}[h!] \centering \includegraphics[width=9cm]{newtradeoff1} \caption{Two Solution Areas with Both a Time Budget and a Cost Budget: Case 1, Solution Areas are Overlapped} \label{fig:ts} \end{figure} In Figure 19, the x-axis is the number of processors involved in the test, the left y-axis is the total cost for the processors, and the right y-axis is the overall system minimal finish time. As Figure 19 shows, the solution area of $Cost_{total}\leq Budget_{cost}$ is highlighted in blue, and the solution area of $minT_{f}\leq Budget_{time}$ is highlighted in orange. They have a overlapped solution area, where the number of processors $m$ can varies from 6 to 12. All the systems from 6 to 12 processors satisfy both the cost budget and the time budget. \par \textbf{CASE 2. There is No Overlap Between Two Solution Areas}\par \begin{figure}[h!] \centering \includegraphics[width=9cm]{newtradeoff2} \caption{Two Solution Areas with Both a Time Budget and a Cost Budget: Case 2, Solution Areas have No Overlap} \label{fig:ts} \end{figure} Same as in the last figure, for Figure 20, the x-axis is the number of processors involved in the test, the left y-axis is the total cost for the processors, and the right y-axis is the overall system minimal finish time. In Figure 20, the two solution areas there $Cost_{total}\leq Budget_{cost}$ and $minT_{f}\leq Budget_{time}$ are highlighted. Since there is no overlap between these two areas, there is no solution to satisfy both the cost budget and the time budget. The user has to either increase the amount of money to spend on processing the whole job, or wait a longer time for the system to finish processing. \par \section{Conclusion} This paper studies the load distribution and finish time optimization problem for a multi-source, multi-processor network based on the two-level tree network topology. The study was divided into two scenarios: the processing nodes are equipped with or without front-end processors. Numerical tests and simulations results showed that the multi-source system has great improvement compared with single-source system, since the overall system minimal finish time is reduced significantly. Meanwhile, by increasing either the number of sources or processors, the finish time can be further reduced. Then, a monetary cost model is proposed to calculate the computing power used for the system. Finally, since monetary cost and minimal finish time has a trade-off relationship, three trade-off plans are demonstrated: 1. the user has a cost budget; 2. the user has a time budget; 3. the user has both a cost budget and a time budget. \section{Future Work} In this paper, it is assumed that if the source or processor has to communicate with multiple nodes, it uses sequential communication. This means that the source or processor could only communicate with one node at a time. However, with the rapid growth of the technology, it is very common to use the sources and processors which can do simultaneous communication with a bandwidth limitation. In the future work, the bandwidth parameters should to be modified to see how much faster the system can be improved.\par On the other hand, a more complicated but realistic scenario may have multiple jobs arrive at the processing nodes during the processing phase, which makes the processing speed become time-varying. Also, the sources' communication speed can also be time-varying due to the injection of some job distributing tasks. It will be a very valuable study to combine the current study with this scenario.\par Another interesting topic is the combination of Divisible Load Theory and Amdahl's Law. Amdahl's law is a formula used to find the maximum improvement possible by improving a particular part of a system. In parallel computing, Amdahl's law is mainly used to predict the theoretical maximum speedup for program processing using multiple processors. Since it is a very useful tool for predicting speedup, with the help of it, new methods can be discovered to improve parallel systems while adapting our current study to more complicated network topologies.\par \ifCLASSOPTIONcaptionsoff \newpage \fi
\section{Introduction} Large dense matrices are ubiquitous in scientific computing. The discretization of integral operators associated with elliptic PDEs results in systems that are dense and on the order of the mesh size. Schur complement methods exploiting dimension reduction in PDE discretizations give rise to large dense systems. Kernel-based machine learning algorithms generate large dense matrices describing pairwise relations between data points. Numerical optimization problems arising in inverse problems and data assimilation are generating ever-more exigent demands for manipulating large dense Hessians. Spatial statistics generates dense covariance matrices from ever larger data sets. The sizes of these matrices as they arise in practical applications make their direct storage prohibitive and would require algorithms of polynomial complexity for performing matrix-vector multiplication, matrix-matrix multiplication, factorization, and related linear algebra operations. Fortunately, many of these matrices described above have an underlying \emph{data sparse} structure, consisting of blocks many of which can be well-approximated by low rank factorizations. Even though the blocks are of varying sizes and locations in the matrix, tree-based data structures can be used to take advantage of this inherent data sparsity and organize the block approximations hierarchically, in effect compressing the dense matrix in an accuracy-controlled manner. The resulting representations, termed hierarchical matrices, provide an efficient and practical way of storing the dense matrices of very large dimension that appear in a broad range of settings. Hierarchical matrices can avoid superlinear growth in memory requirements and store $n\times n$ dense matrices in a scalable manner. For the $\mathcal{H}^2$ hierarchical representations considered in this paper, they require only $\mathcal{O}(kn)$ units of storage where $k$ is a representative rank for the low rank blocks. This asymptotically optimal storage requirement of hierarchical matrices is a critical advantage, particularly in GPU environments characterized by relatively small global memories. For many standard applications, the compressed hierarchical form produces a few orders-of-magnitude reduction in required memory compared to the equivalent dense representation and makes it possible to fit the matrix in the limited global memory of current generation GPUs, overcoming the disadvantage of the slow transfer of data between GPU and main memory. Efficient CPU hosted algorithms and software for hierarchical matrices are available~\cite{hlibpro} and have been used in a variety of applications. More recently a task-based parallel implementation was demonstrated on the Intel Phi~\cite{kriemann13}. In contrast, there have been only limited efforts in the development of algorithms appropriate for GPU environments. For example, a recent work accelerated some of the readily vectorizable portions of the computation, such as setting up an initial stiffness matrix \cite{borm15}. Another work used parallel work queues for $\mathcal{H}$-matrix vector multiplication \cite{pzaspel17}. However, methods addressing the core $\mathcal{H}^2$-matrix operations on GPUs are not yet available. The lack of high-performance GPU algorithms is likely due to the fact that the naturally recursive data structures and formulations of the hierarchical matrix algorithms do not readily map to the throughput-oriented architecture of GPUs. Alternative representations and algorithmic formulations are needed to exploit the memory hierarchy of GPUs, expose fine-grained parallelism, orchestrate data movement to hide latencies and reduce global memory transactions, and increase occupancy to enhance parallelism, in order to obtain performance. Because hierarchical matrices occupy conceptually a middle ground between dense and sparse matrices, they can inherit some of the powerful GPU advantages of working with regular memory access patterns and can also leverage ideas from algorithms for sparse linear algebra computations on GPUs~\cite{filippone17,bell12,bell09,merrill16} for working efficiently with the irregular patterns. This work seeks to develop GPU-resident data structures and associated data parallel algorithms for operating on hierarchical matrices. Specifically, we describe two algorithms including matrix-vector multiplication (HMV) and matrix compression that operate on flattened representations of the hierarchical matrix. Both algorithms are work optimal, $\mathcal{O}(n)$, and demonstrate high absolute performance on matrices of size up to $1M\times1M$ stored entirely on the GPU. The memory-bound HMV achieves more than $550\,$GB/s, surpassing the STREAM benchmark \cite{stream}, and the compute-bound hierarchical matrix compression achieves more than $850\,$GFLOPS/s on the Pascal P100 GPU. These two operations are foundational routines for almost all other algebraic operations on hierarchical matrices, including matrix multiplication, inversion, factorization and others. We plan to use them as the building blocks for a complete GPU $\mathcal{H}^2$-library. We also hope that by making available high performance implementations of these basic hierarchical matrix routines, we will encourage broader experimentation with hierarchical matrices in various applications. We employ the word ``experimentation'' advisedly, inasmuch as the numerical analysis of rank growth and error propagation in chains of hierarchical operations is not yet completely mature. It may be that the high compressibility will prove more practically tolerable in some applications than others. The rest of this paper is organized as follows. In Section 2, we describe the flattened data structures used to represent the row and column basis trees as well as the matrix tree that stores the matrix block data expressed in terms of these row and column bases. Section 3 describes a GPU matrix vector multiplication (HMV) algorithm and shows its performance on sample covariance matrices arising from 2D and 3D spatial statistics. Section 4 describes the hierarchical compression operation expressed in terms of batched QR and SVD operations, and analyzes the performance of its various phases on the same covariance matrices above. Discussion and conclusions are presented in Section 5. \section{Hierarchical matrices} \subsection{Flavors of hierarchical matrices} A great deal of work has been done in the development of representations that exploit the low rank structure of matrix blocks in a hierarchical fashion. We do not attempt to review this literature here except for mentioning a few representative works in this section. We refer the reader to \cite{hackbusch15,ballani16} for an introduction and survey. Hackbusch \cite{hackbusch99,hackbusch99} pioneered the concepts of hierarchical matrices in the form of $\mathcal{H}$ and $\mathcal{H}^2$ matrices as a way to generalize fast multipole methods, and developed a substantial mathematical theory for their ability to approximate integral operators and boundary value problems of elliptic PDEs. These ideas have been developed considerably over the years, for the construction and use of hierarchical matrices in solving discretized integral equations and preconditioning finite element discretizations of PDEs ~\cite{borm02,borm05,borm2010,grasedyck2003,grasedyck2009}. Hierarchically semi-separable (HSS) and hierarchically block-separable (HBS) are related and well-studied rank-structured representations that also use low rank blocks of a dense matrix in a hierarchical fashion. Matrices are semi-separable if their upper and lower triangular parts are, each, part of a low rank matrix. HSS matrices extend this idea and refer to matrices whose off-diagonal blocks are all of low rank and expressed in a nested basis. Their block structure is equivalent to what is also known as a weak admissibility criterion~\cite{hackbusch04}. HSS matrices have been shown to be useful representations for integral equations in the plane and for sparse systems of equations that can be reduced to matrices of this form, for example by using nested dissection on 2D grids. Fast factorization algorithms for HSS matrices have been developed in~\cite{xia10}. HBS matrices have a similar structure but emphasize the telescoping nature of the matrix factorization \cite{gillman2012direct} to use in the construction of direct solvers for integral equations \cite{Martinsson2013}. Hierarchically off-diagonal low rank (HODLR) matrices which simplify the HSS representation by using non-nested and separate bases for various matrix blocks have been used for fast factorizations in \cite{ambikasaran2013n}. \begin{figure}[t] \begin{center} \includegraphics[width=0.5\textwidth]{h2mat2d.pdf} \caption{A three-level hierarchical matrix with its dense $m \times m$ blocks shown in red and its low rank blocks shown in blue.} \label{fig:h2mat} \end{center} \vspace*{1em} \includegraphics[width=\textwidth]{tree2d-single.pdf} \caption{The low rank part of the matrix in Fig.~\ref{fig:h2mat} ``disassembled'' into its constituent basis trees ($\mathcal{U}$ and $\mathcal{V}$) and matrix tree ($\mathcal{S}$) representations. Representation is done level by level for all trees.} \label{fig:h2tree} \end{figure} \subsection{Structure of a general hierarchal matrix with nested bases} \label{sec:hmatrix_structure} In this paper, we use the $\mathcal{H}^2$ representation as it allows a general block structuring of the matrix, has asymptotically optimal memory complexity, and in practice results in a representation with a small memory footprint in applications. The representation achieves the $\mathcal{O}(n)$ memory complexity by exploiting two different types of hierarchies in the underlying matrix. One type of hierarchy is related to the granularity of matrix blocks where larger blocks that admit low rank approximations sit at higher levels in a tree representation of the matrix, whereas the smaller low rank blocks sit at the lower levels. Figure 1 illustrates a block partitioning of a sample matrix. The matrix has three different block sizes that admit a low rank representation and are shown in blue. The matrix also has some blocks that do not admit such a representation and are stored as dense matrices and are shown in red. We denote the low rank decomposition of a given block by $U S V^T$, where $S$ is a $k\times k$ matrix with $k$ generically denoting the rank of the block, and refer to $U$ and $V$ as the column and row bases in which the $S$ block data is expressed. The $S$ matrices are termed coupling matrices. The middle diagram of Figure 2 shows the levels of the matrix separated out. The bottom level contains the $S$ data of only the smallest blocks of the matrix, the next level up contains the $S$ data corresponding to the mid-sized blocks, and the level above it contains the $S$ data for the largest blocks of the partitioning. The top two levels of the tree illustrated here are empty because there are no blocks of the appropriate size that admit a low rank representation. This hierarchy of block partitioning is common to all hierarchical matrix formats, although the $\mathcal{H}$ and $\mathcal{H}^2$ representations offer the most flexibility and generality, as they do not place restrictions on the admissible partitionings. Low rank blocks of any size, as well as dense blocks, can be located anywhere in the matrix. The second hierarchy, specific to the $\mathcal{H}^2$ format, is related to the manner in which the low rank blocks are represented, using nested row and column bases, $U$ and $V$. Nestedness means that bases for the higher levels (larger blocks) may be obtained through suitable transformations of the bases of the lower levels and therefore need not be explicitly stored. Figure 2 illustrates how the bottom level of the basis trees is explicitly stored and can be directly used. For example, the block $(4,9)$ of the matrix of Figure 1 is a low rank block of the smallest size, therefore expressed as $U_4 S_{49} V_9^T$, with $U_4$ and $V_9$ explicitly stored at the leaves of the bases trees as shown. At the next level up, the bases do not have an explicit representation but each basis (denoted graphically by a circle) can be obtained, when needed, from its children through small transfer matrices. These nested bases allow significant reduction in storage and produce the algorithmically optimal memory complexity. The representation of the low rank portion of a hierarchical matrix $A_{n\times n}$ consists therefore of the tree triplet $\mathcal{U}$, $\mathcal{S}$, $\mathcal{V}$: \begin{itemize} \item The $\mathcal{U}$ tree organizes the row indices of the matrix hierarchically. We use a binary tree in this work but other organizations are possible. A node in the tree at level $l$ represents a row block at this level of the matrix and is used to store column basis vectors in which the data of the matrix blocks at level $l$ are expressed. Thin basis matrices $U$ of size $m \times k$ are stored explicitly at its leaves. Small interlevel transfer matrices $E$ of size $k_c \times k_p$ (referring to the ranks of the child and parent nodes) are stored at the higher levels and used to compute with the level-appropriate bases, which are never explicitly stored. When referring to a basis node as $U_i^l$, we refer to the node $i$ at level $l$ in the basis tree which is either stored explicitly at the leaves, or implicitly via the transfer matrices higher level of the tree. The relationship between a node $U_{i^+}^{l-1}$ and its children $U_{i_1}^l$ and $U_{i_2}^l$ uses the transfer matrices $E_{i_1}^l$ and $E_{i_2}^l$: \begin{equation} \label{eq:transfer} U_{i^+}^{l-1} = \begin{bmatrix} U_{i_1}^l & \\ & U_{i_2}^l \end{bmatrix} \begin{bmatrix} E_{i_1}^l \\ E_{i_2}^l \end{bmatrix}. \end{equation} Similarly, the $\mathcal{V}$ tree, consisting of explicit thin basis matrices at the leaves and small inter-level transfer matrices $F$, organizes column indices hierarchically and its nodes are used to represent the row basis vectors for the column blocks at various level of granularity. The structure of this tree need not be identical to that of $\mathcal{U}$, although the examples described in this paper come from symmetric matrices where we use the same block row and column trees. \item The $\mathcal{S}$ tree is an incomplete quadtree that stores the coupling matrices $S$ for all the blocks of the matrix. Other N-ary trees would be needed if the basis trees were not binary. As we describe below, the tree is stored level by level, with each level being a block sparse matrix. The sparsity pattern of the block sparse matrix at level $l$ is directly related to the low ranks blocks that exist at that level of granularity: a $k\times k$ coupling matrix exists in the entry $(i,j)$ of level $l$ if a block at that level of granularity exists in the hierarchical matrix partitioning. In that case, the corresponding matrix block is $U_i^l S_{ij}^l {V_j^l}^T$, where $U_i^l$ and $V_j^l$ are the column bases and row bases of block row $i$ and column block $j$ at level $l$, respectively. The non-zero block entries from all levels form the leaves of the quadtree, and collectively they cover all the low rank blocks of the matrix. The storage needed for $\mathcal{S}$ depends on the structure of the tree and the distribution of the leaves but assuming a bounded number of non-zero entries in the block rows/columns, a reasonable assumption in many applications, its memory requirements have optimal complexity, $\mathcal{O}(kn)$, where $k$ is a representative rank. \end{itemize} Besides the low rank blocks, a set of dense $m \times m$ matrices that are not compressed need to be also stored. The complement of the low rank leaves of the quadtree represents blocks of the original matrix that are not economically expressible as low rank factorizations and are more effectively stored in their explicit dense format. These dense leaves appear only at the finest level of the quadtree and in practical terms represent blocks of a fixed small size that is tuned to the execution hardware. We have used $m = 64$ for the examples in this paper. We store these dense blocks as a separate block sparse matrix and allow them to appear anywhere in the matrix. Notation. Table 1 summarizes the symbols used in the description of the tree algorithms on the hierarchal matrix. \begin{table}[!t] \footnotesize {\begin{tabular}{l c l} \hline Symbol & & Description \\ \cline{1-1} \cline{3-3} % $n$ & & matrix size \\ $m$ & & size of dense blocks \\ $k^{l}$ & & typical rank of blocks in matrix tree at level $l$ \\ $\mathcal{U}, \mathcal{V}$ & & block row and column basis trees, with explicit bases stored at leaves only\\ $U$, $V$ & & bases at the leaf level of $\mathcal{U}$ and $\mathcal{V}$ \\ $E$, $F$ & & transfer matrices for the $\mathcal{U}$ and $\mathcal{V}$ bases, respectively \\ $\mathcal{S}$ & & matrix quadtree of coupling matrix blocks \\ $i$, $j$ (or $i_1, i_2$, etc.) & & indices of block rows and block columns respectively \\ $i^+$ & & index of the parent block of block $i$ \\ $x(i)$ & & sub-vector of a vector $x$ corresponding to the block $i$ \\ $\hat{x}, \hat{y}$ & & vectors defined at every level in the basis trees \\ $\batch{U}$, $\batch{E}$, etc. & & batched $U$, $E$, etc.~arrays, marshaled for use by batched linear algebra kernels \\ \hline \end{tabular}} \caption{Notation used.} \label{table:notation} \end{table} \section{Strategies for Efficient GPU processing of $\boldsymbol{\mathcal{H}}$-matrix Trees} \label{sec:hmatrix_flattening} GPU routines are executed as kernels and can be called from the host CPU by specifying a launch configuration, organizing the GPU threads into thread blocks and thread blocks into grids. Launching a kernel causes a short stall (as much as 10 microseconds) as the kernel is prepared for execution. Let us call this stall the kernel launch overhead. For kernels that do a lot of processing, this stall is quite insignificant and does not impact performance; however, when the kernel execution is comparable to the overhead it presents a problem. All of the individual operations involved in $\mathcal{H}$-matrices are on very small matrix blocks. Execution of these operations using a kernel call per block will be limited by the kernel overhead. To minimize the impact of the overhead, operations are best executed in large batches \cite{batch_haidar}. Efficiently marshaling the operations into these batches is also key to a high performance implementation. To that end, we flatten the tree by levels and store the level data in contiguous chunks of memory where each matrix block is stored consecutively in column major order. Operation marshaling then involves specialized kernels that process each level in parallel to produce the necessary data for the linear algebra batch kernels. The benefits of this decomposition are two-fold: the marshaling kernels can access the level data in coalesced global memory reads and the batch kernels can execute without any knowledge of the tree data structure. Since every kernel call uses a single launch configuration, the operations handled by each batch routine must have the same size; in the $\mathcal{H}$-matrix setting, this translates to a fixed rank per level of the trees. Variable size batch kernels will be needed to overcome this limitation, but this will be the focus of future work. \subsection{Flattened Tree Structure} The flattened structure of the tree is represented by three arrays $head$, $next$, and $parent$ of node indices, with each node index referring to a block of rows/columns. The $head$ array contains the node index of the first child of a node while each entry in the $next$ array gives us the index of the next sibling of a node. The $parent$ array contains the parent node index of each node allowing us to traverse the tree in any direction. An example of this storage scheme for the structure of the basis tree is depicted in Figure \ref{fig:basis_tree_mem}. The node indices stored in this flattened structure are used by the marshaling routines of the various hierarchical operations to efficiently generate data from each level that can then be passed on to the batch kernels. The data can come from trees that share the same structure as the basis trees, such as the $\widehat{x}$ and $\widehat{y}$ trees of the MVM described in Section \ref{sec:hmvm_overview} and the $Z$ and $T$ trees of the orthogonalization described in Section \ref{sec:basis_orthogonalization}. \begin{figure}[!t] \begin{center} \begin{adjustbox}{width=0.9\linewidth} \begin{tabular} {c} \tikzset{ treenode/.style = {align=center, inner sep=0pt, text centered}, node/.style = {treenode, circle, black, draw=black, text width=1.5em, thick}, leaf/.style={rectangle,thick,draw,text width=0.35cm, text height = 0.7cm, text centered}, level 1/.style={sibling distance=40mm}, level 2/.style={sibling distance=20mm}, level 3/.style={sibling distance=10mm}, level 4/.style={sibling distance=5mm} } \begin{tikzpicture}[-,level/.style={level distance = 1.0cm}] \node [node] {1} child{ node [node] {2} child{ node [node] {4} child{ node [node] {8} {child {node [leaf] {1}}} } child{ node [node] {9} {child {node [leaf] {2}}} } } child{ node [node] {5} child{ node [node] {10} {child {node [leaf] {3}}}} child{ node [node] {11} {child {node [leaf] {4}}}} } } child{ node [node] {3} child{ node [node] {6} child{ node [node] {12} {child {node [leaf] {5}}} } child{ node [node] {13} {child {node [leaf] {6}}} } } child{ node [node] {7} child{ node [node] {14} {child {node [leaf] {7}}} } child{ node [node] {15} {child {node [leaf] {8}}} } } } ; \end{tikzpicture} \\ \\ \def1.2{1.5} \newcolumntype{C}{>{\centering\arraybackslash}p{2.5ex}} \begin{tabular}{|c|C|C|C|C|C|C|C|C|C|C|C|C|C|C|C|} \hline Level Pointers & 1 & 2 & 4 & 8 & 16 &&&&&&&&&& \\ \hline $parent$ & -&1&1&2&2&3&3&4&4&5&5&6&6&7&7 \\ \hline $head$ & 2&4&6&8&10&12&14&-&-&-&-&-&-&-&- \\ \hline $next$ & -&3&-&5&-&7&-&9&-&11&-&13&-&15&- \\ \hline \end{tabular} \end{tabular} \end{adjustbox} \end{center} \caption{Basis tree structure. Data associated with the basis tree uses the node numbers to locate the position of the node data in memory. Examples for the MVM operation include the $\hat{x}$ and $\hat{y}$ trees (in the nodes), the basis leaves (shown as rectangles), and the inter-level transfer matrices (in the nodes).} \label{fig:basis_tree_mem} \end{figure} \subsection{Marshaling Operations} Specialized marshaling kernels for each operation generate the data that batched linear algebra routines need to execute the operation. This includes the pointers to matrix blocks from a level as well as matrix block dimensions and we denote marshaled data by the $|||$ subscript. This data can then fed into the appropriate batch routines for execution using a single kernel call per level. Since the levels of the tree have been flattened into arrays, it is straightforward to parallelize using simple parallel transformations, either by a simple kernel or using libraries such as Thrust~\cite{bell2011thrust}. These transformations are executed very quickly and constitue a negligible portion of the execution time within each operation. Examples of the marshaling routine for a few of these operations are described in each section, such as the upsweep marshaling of the matrix vector operation described in Algorithm \ref{alg:hgemv_marshalupsweep} and the marshaling of the orthogonalization operation described in Algorithm \ref{alg:horthog_marshalupsweep}, with a few omitted for the sake of brevity. For the operations presented in this paper, we rely on high performance batched linear algebra kernels for QR and singular value decompositions. We do not describe these kernels here, as their details may be found in~\cite{BOUKARAM2017}. We also use the high performance matrix-matrix multiplication batched routines from the CUBLAS~\cite{cublas16} and MAGMA~\cite{dongarra14} libraries. \section{Hierarchical matrix-vector multiplication} \label{sec:HMVM} \subsection{Overview} \label{sec:hmvm_overview} In this section, we describe the different phases of the HMV algorithm and their efficient GPU implementations. \begin{figure}[!ht] \begin{center} \includegraphics[width=0.85\textwidth]{hmvm_large.pdf} \end{center} \caption{Overview of the HMV. Computation with the low rank blocks is split into three phases: upsweep, multiplication, and downsweep. The upsweep computes a tree $\hat{x}$ from the input vector $x$ by first projecting it to the basis leaves and then sweeping up the tree using the transfer matrices. $\hat{x}$ is then fed into the block sparse multiplication phase to produce the $\hat{y}$ tree. Finally, the downsweep computes the output vector $y$ by first accumulating partial sums within each level of $\hat{y}$ using the transfer matrices. The leaf level of $\hat{y}$ then contains the full sums in terms of the basis leaves which are expanded to form the output vector $y$ and added to the results of the dense matrix-vector product to produce the final result.} \label{fig:hmatvec} \end{figure} Since the hierarchical matrix may be viewed as the sum of a dense portion $A_D$ and a low rank portion $A_{LR}$ the products with $A_D$ and $A_{LR}$ are done separately (but concurrently when possible, as detailed below) and added as shown in Figure~\ref{fig:hmatvec}. The product of the dense blocks with the input vector is computed via a block sparse matrix vector multiplication routine. The product of the low rank blocks with the input is then computed in three additional phases: an upsweep phase, a multiplication phase, and a downsweep phase as illustrated in Figure~\ref{fig:hmatvec}. For intuition, we may think of this algorithm as the hierarchical generalization of the way we multiply a regular dense low rank matrix, $USV^T$, by a vector $x$. In this case we would do it in three phases: first apply the transpose of $V$ to $x$, then multiply the small resulting product by $S$, and then apply $U$ to obtain the final product. The hierarchical analogue first applies the transpose of the bases of all levels of $\mathcal{V}$ to $x$ by sweeping up the tree to compute the nodes of a vector tree $\widehat{x}$. The multiplication phase then computes a vector tree $\widehat{y}$ where each node in $\widehat{y}^l$ is the product of a block row of coupling matrices in $S^l$ with the corresponding nodes of $\widehat{x}^l$. The nodes of $\widehat{y}^l$ represent the level's partial contribution to the output vector expressed in the row basis $U^l$. Finally, a downsweep phase expands the nodes of $\widehat{y}$, multiplying them by the bases from the corresponding levels of $\mathcal{U}$ to produce the final output vector $y$. It is also worth noting that these phases of the HMV computation are very closely related to the phases of the fast multipole method~\cite{sfi14}. \subsection{Upsweep phase} The upsweep computes a tree $\widehat{x}$ as the products of the transposed nodes of the column basis $V$ with the input vector $x$; i.e. $\widehat{x}^{l}_j = {V^{l}_j}^T x(j)$ for all nodes $j$ within a level $l$, with $l$ in $0\cdots q$. This process is trivial for the leaves since they are stored explicitly; however the inner nodes are expressed in terms of their children using the relationship defined in Eq.~\ref{eq:transfer}. For simplicity, let us consider a parent node $j^+$ with two children $j_1$ and $j_2$. The node $\widehat{x}^{l-1}_{j^+}$ can be computed as: \begin{equation} \widehat{x}^{l-1}_{j^+} = \begin{bmatrix} F_{j_1}^{l}\supersuperscript & {F_{j_2}^{l}}\supersuperscript \end{bmatrix} \begin{bmatrix} {V_{j_1}^{l}}^T & \\ & {V_{j_2}^{l}}^T \\ \end{bmatrix} \begin{bmatrix} x(j_1)\\ x(j_2) \end{bmatrix} = {F_{j_1}^{l}}\supersuperscript \widehat{x}^{l}_{j_1} + {F_{j_2}^{l}}\supersuperscript \widehat{x}^{l}_{j_2}. \end{equation} We can compute every node in $\widehat{x}$ by starting at the leaves and sweeping up the tree using the above equation. To avoid the prohibitive overhead of $\mathcal{O}(n)$ kernel launches required to execute this operation recursively on the GPU, we use the flattened tree structure described in section \ref{sec:hmatrix_flattening} to compute $\widehat{x}$ level by level. The leaves are processed simply using a single batch matrix vector operation. Considering a binary tree for the basis trees, an upsweep kernel marshals the data for the operations in a level to generate two batches (one for each child) which are then executed by the batch matrix vector operation. Like all marshaling operations used in the rest of this paper, this marshaling operation uses the flattened tree structure described in Section \ref{sec:hmatrix_flattening} to efficiently generate the necessary pointer data for the batched routines, the $\batch{F}$, $\batch{x}$ and $\batch{y}$ pointer arrays in this operation, using a single kernel call. This leads us to Algorithm \ref{alg:hgemv_marshalupsweep} for marshaling the upsweep operations and Algorithm \ref{alg:upsweep2} to compute $\widehat{x}$. \begin{algorithm}[t] \caption{GPU upsweep marshaling routine} \label{alg:hgemv_marshalupsweep} \begin{algorithmic}[1] \Procedure{marshalUpsweep}{$F^{(l)}$, $\widehat{x}^{(l)}$, $\widehat{x}^{(l-1)}$} \State $n_p$ = levelptr$[l-1]$ \State $k_p$ = levelrank$[l-1]$ \State $n_c$ = levelptr$[l]$ \State $k_c$ = levelrank$[l]$ \ForAllp{$p = n_p \rightarrow n_c$} \State $i = p - n_p$ \Comment{{\small Batch index}} \State $c$ = head$[p]$ \State $c_i = 0$ \While {$c \neq \text{empty}$} \State $\batch{F}(c_i)[i] = $ ptr$\left(F^{(l)}\right) + (c - n_c) \times k_c \times k_p$ \Comment{{\small Extract level pointer data}} \State $\batch{x}(c_i)[i] = $ ptr$\left(\widehat{x}^{(l)}\right) + (c - n_c) \times k_c$ \State $\batch{y}(c_i)[i] = $ ptr$\left(\widehat{x}^{(l-1)}\right) + i \times k_p$ \State $c_i = c_i + 1$ \State $c = $ next$[c]$ \EndWhile \EndForAllp \EndProcedure \end{algorithmic} \end{algorithm} \begin{algorithm}[b] \caption{GPU upsweep algorithm for forming $\widehat{x}$} \label{alg:upsweep2} \begin{algorithmic}[1] \Procedure{upsweep}{$V$, $F$, $x$, $\widehat{x}$} \State $q$ = heightof$( \widehat{x} )$ \Comment{{\small \emph{leaf level, log(n/m)}}} \State gemvBatched$\left( \frac{n}{m}, V^T, ( {\tt batch} ) \, x , \widehat{x}^{q} \right)$ \For{$l$ = $q \rightarrow {}1$} \Comment{{\small \emph{up the $\mathcal{V}$ tree}}} \State $N$ = $n / m / 2^{q-l+1}$ \State $[\batch{F}^T, \batch{x}, \batch{y}]$ = marshalUpsweep$(F^{l}\supersuperscript, \widehat{x}^{l}, \widehat{x}^{l-1})$ \vspace{2pt} \For{$j$ = $1 \rightarrow 2$} \Comment{{\small \emph{binary tree}}} \State gemvBatched$(N, \batch{F}(j)^T, \batch{x}(j), \batch{y}(j))$ \EndFor \EndFor \EndProcedure \end{algorithmic} \end{algorithm} \subsection{Multiplication phase} The second phase of the computation builds a vector tree $\widehat{y}$, where each node $i$ in a level $l$ is the product of the block row $i$ of level $l$ of the coupling matrix tree with the corresponding nodes in $\widehat{x}$. This operation can be expressed as \begin{equation} \widehat{y}_i^{l} = \sum_{j \in \{b_i\}} S_{ij}^l \widehat{x}_j^{l} \end{equation} where $b_i$ is the set of column indexes of the matrix blocks in the block row $i$. We could follow the same marshaling approach as the upsweep, but given the potential nonuniform distribution of blocks in different rows as well as the obvious similarity to a block sparse matrix vector multiplication, we opt to generate block sparse row index data for the matrix tree. This data is efficiently generated once during the construction of the hierarchical matrix and stored per level of the matrix tree. Figure \ref{fig:bsr_example} shows an example of the block sparse row index data for a simple matrix. This leads us to Algorithm \ref{alg:mult} for the computation of $\widehat{y}$. \begin{figure} \begin{center} \begin{tabular}{c} $A=\begin{bmatrix} a & c & & & e & g \\ b & d & & & f & h \\ & & i & k & & \\ & & j & l & & \\ & & & & m & o \\ & & & & n & p \\ \end{bmatrix}$ \\ \\ \def1.2{1.5} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline Values & \emph{a} & \emph{b} & \emph{c} & \emph{d} & \emph{e} & \emph{f} & \emph{g} & \emph{h} & \emph{i} & \emph{j} & \emph{k} & \emph{l} & \emph{m} & \emph{n} & \emph{o} & \emph{p} \\ \hline ColIdx & 1 & 3 & 2 & 3 &&&&&&&&&&&& \\ \hline RowPtr & 1 & 3 & 4 & 5 &&&&&&&&&&&& \\ \hline \end{tabular} \end{tabular} \end{center} \caption{The BSR storage for a $6\times6$ matrix with $2\times2$ blocks.} \label{fig:bsr_example} \end{figure} \begin{algorithm}[t] \caption{GPU Matrix Tree Multiplication for $\widehat{y}$} \label{alg:mult} \begin{algorithmic} \Procedure{TreeMultiply}{$S$, $\widehat{x}$, $\widehat{y}$} \State $q$ = heightof$( \widehat{y} )$ \ForAllp{ $l$ = $1 \rightarrow q$} \State $\widehat{y}^{l}$ = blockSparseMV$( S^{l}, \widehat{x}^{l})$ \EndForAllp \EndProcedure \end{algorithmic} \end{algorithm} \subsection{Downsweep phase} After the multiplication phase, each level of the vector tree $\widehat{y}$ now contains a partial contribution of the output vector $y$ expressed in terms of the nodes of the block row basis $U$ at that level. We can finalize the computation by expanding the nodes of $\widehat{y}^l$ at each level $l$ as: \begin{equation} y(i) = y(i) + U_i^{l} \widehat{y}_i^{l}. \end{equation} Since we don't have an explicit representation of the inner nodes of the basis tree, we use the nested basis property to express the partial sum of a level with its child level in terms of the basis nodes of the child level. Taking a parent node $i^+$ at level $l-1$ and its two children $i_1$ and $i_2$ at level $l$, we have the partial sum: \begin{equation} U^{l-1}_{i^+} \widehat{y}^{l-1}_{i^+} + \begin{bmatrix} U^l_{i_1} \widehat{y}^l_{i_1} \\ U^l_{i_2} \widehat{y}^l_{i_2} \end{bmatrix} = \begin{bmatrix} U^l_{i_1} & \\ & U^l_{i_2} \end{bmatrix}\begin{bmatrix} E^l_{i_1} \widehat{y}^{l-1}_{i^+} \\ E^l_{i_2} \widehat{y}^{l-1}_{i^+} \end{bmatrix} + \begin{bmatrix} U^l_{i_1} \widehat{y}^l_{i_1} \\ U^l_{i_2} \widehat{y}^l_{i_2} \end{bmatrix} = \begin{bmatrix} U^l_{i_1} & \\ & U^l_{i_2} \end{bmatrix} \begin{bmatrix} E^l_{i_1} \hat{y}^{l-1}_{i^+} + \widehat{y}^l_{i_1}\\ E^l_{i_2} \hat{y}^{l-1}_{i^+} + \widehat{y}^l_{i_2} \end{bmatrix}. \end{equation} Sweeping down $\widehat{y}$ and setting each node $\widehat{y}_i^{l} = \widehat{y}_i^{l} + E_{i}^{l} \widehat{y}_{i^+}^{l-1}$, the level $l$ at each step now also contains the partial sum of $y$ for all levels above $l$ expressed in the nodes of $U^l$. The leaf level will then contain the complete sum which is finally expanded into $y$. We follow the same approach as in the upsweep, where each level is processed in parallel by first marshaling the operations and then executing using a batch matrix vector product. This leads us to Algorithm \ref{alg:downsweep} for computing $y$. The downsweep marshaling algorithm is structurally very similar to the upsweep marshaling routine described in Algorithm \ref{alg:hgemv_marshalupsweep} and is omitted for brevity. \begin{algorithm} \caption{GPU downsweep for computing $y$} \label{alg:downsweep} \begin{algorithmic}[1] \Procedure{downsweep}{$U$, $E$, $\widehat{y}$, $y$} \State $q$ = heightof$( \widehat{y} )$ \Comment{{\small \emph{leaf level, log(n/m)}}} \For{$l$ = $1 \rightarrow q$} \Comment{{\small \emph{down the $\mathcal{U}$ tree}}} \State $N$ = $n / m / 2^{q-l}$ \State $[\batch{E}, \batch{x}, \batch{y}]$ = marshalDownsweep$(E^{l}, \widehat{y}^{l-1}, \widehat{y}^{l})$ \State gemvBatched$(N, \batch{E}, \batch{x}, \batch{y})$ \EndFor \State gemvBatched$\left( \frac{n}{m}, U, \, \widehat{y}^{q}, y \right)$ \EndProcedure \end{algorithmic} \end{algorithm} \subsection{Kernel streaming} \label{sec_hmv_stream} The upper levels of the tree operations do not provide enough work to saturate the GPU and kernel overhead starts to impact performance for these levels. To overcome this, we can use streams to try to overlap some stages of the computation with the processing of the upper levels. Unfortunately, the scheduler will only launch a new kernel when the resources are available, which typically happens towards the end of the BSR multiplication kernel. It therefore makes most sense to overlap the dense multiplication portion of the computation with the low rank portion. Many GPUs support a feature called stream priorities that allow execution of a kernel on a low priority stream to be suspended in favor of a kernel on a higher priority stream. By setting the dense phase as the lowest priority and the tree operations as the highest priority, we can effectively hide the overhead and hardware underuse of the tree operations. The performance results below show the effect of this overlap which, as expected, is beneficial for relatively small sized problems. On larger problems, the work at the higher levels of the trees is a very tiny fraction of the overall computation and there is relatively little benefit derived from the overlap. The $\widehat{x}$ and $\widehat{y}$ trees are stored in temporary workspace, allowing the dense and low rank phases to overlap, requiring only a single stream synchronization between the dense phase and the final phase of the downsweep. \subsection{Performance results} \label{subsec_hmv_perf} To demonstrate the performance of the HMV operation, we generated two families of hierarchical covariance matrices for a spatial Gaussian process with $n = 2^{14}\cdots2^{20}$ observation points placed on randomly perturbed 2D and 3D regular grids in $[0, 1]^2$ and $[0, 1]^3$ respectively. The covariance matrices were generated using an isotropic exponential kernel with correlation length 0.1 in 2D and 0.2 in 3D~\cite{ambi16} and are representative of hierarchical matrices that arise in several applications \cite{hackbusch15}. The hierarchical matrices were generated \textit{ab initio} in the following way. The $n$ points are first partitioned into clusters using a KD-tree with a mean split, generating the index sets of the basis tree nodes. The basis and transfer matrices are then generated using Chebyshev interpolation \cite{borm05interpolation}. A dual traversal \cite{hackbush_2000,hackbush_2003} of the basis tree generates the quadtree described in Section \ref{sec:hmatrix_structure}, where the coupling matrices at the leaves are generated by evaluating the kernel at the interpolation points. The leaf size $m$ was set to 64, tuned to the P100 GPU, and a uniform rank of 64 was used for all levels of the matrix, corresponding to the use of $8\times8$ grids and $4\times4\times4$ Chebyshev grids in 2D and 3D respectively. The choice of the leaf size only influences performance and has no effect on the accuracy of the representation, since overall accuracy is limited by the low rank blocks. The resulting approximation error was less than $10^{-7}$ in 2D and less than $10^{-3}$ in 3D for all problem sizes, as measured by computing $\norm{Ax-A^\mathcal{H}x} / \norm{Ax}$ where $A$ is the exact (dense) covariance, $A^\mathcal{H}$ is its hierarchical representation, and $x$ is a randomly generated vector whose entries are sampled from a uniform $[0, 1]$ distribution. For the large problems, it is not possible to store the dense $A$ nor is it practical to perform the $\mathcal{O}(n^2)$ $A x$ product, and as a result we sampled 10\% of the rows and used the analytical expression of the matrix entries. While a rank of 64 may seem high for a leaf size of 64, it is often the case that the ranks at the leaves increase temporarily due to low rank updates that may be applied to the blocks of the matrix during hierarchical matrix operations. This rank will be reduced during compression and the effect on matrix vector multiplication performance is shown in Section \ref{sec:compperf}. \begin{figure} \begin{center} \begin{tikzpicture}[spy using outlines={rectangle,orange,magnification=5,size=4.2cm, connect spies, spy connection path={\draw[thick] (tikzspyonnode) -- (tikzspyinnode);}, every spy on node/.append style={ultra thick}, every spy in node/.append style={thick}}] \node [anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.3\textwidth]{2_14_structure.pdf} }; \begin{scope}[x={(image.south east)},y={(image.north west)}] \coordinate (p1) at (0.4,0.73); \coordinate (p2) at (2,0.5); \spy on (p1) in node [] at (p2); \end{scope} \end{tikzpicture} \end{center} \begin{center} \begin{tikzpicture}[spy using outlines={rectangle,orange,magnification=5,size=4.2cm, connect spies, spy connection path={\draw[thick] (tikzspyonnode) -- (tikzspyinnode);}, every spy on node/.append style={ultra thick}, every spy in node/.append style={thick}}] \node [anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.3\textwidth]{2_14_structure_3d.pdf} }; \begin{scope}[x={(image.south east)},y={(image.north west)}] \coordinate (p1) at (0.4,0.73); \coordinate (p2) at (2,0.5); \spy on (p1) in node [] at (p2); \end{scope} \end{tikzpicture} \end{center} \caption{Structure of the 2D (top) and 3D (bottom) sample covariance matrices used in the examples for $n = 2^{14}$, with a zoom on portions of them. Notice that the 3D problem does not have as many large blocks that admit a low rank approximation as the 2D problem and therefore results in a representation that has higher memory demand for the same accuracy.} \label{fig:samples} \end{figure} \begin{figure}[!ht] \centering \includegraphics[width=\textwidth]{hgemv_1.pdf} \caption{Breakdown of the HMV phases in percentages of total operation time in single (left) and double (right) precision on a P100 GPU showing that, for smaller problem sizes where the basis tree has very few levels, the upsweep and downsweep do not fully utilize the hardware.} \label{fig:hmv_profile} \end{figure} \begin{figure}[t] \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hgemv_2.pdf} \caption{Time for the HMV in single and double precision for a 2D problem.} \label{fig:hmv_2d} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hgemv_3.pdf} \caption{Time for the HMV in single and double precision for a 3D problem.} \label{fig:hmv_3d} \end{subfigure} \caption{Runtime of HMV on a single P100 GPU, showing asymptotically linear growth with problem size. Notice that the streamed version that allows overlapping between the dense and the low rank phases of HMV provides performance boost on small problems. On the larger problems, where the available bandwidth is saturated with the low rank data, the improvement due to overlapping is diminished.} \label{fig:hmv_timings} \end{figure} \begin{figure}[t] \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hgemv_4.pdf} \caption{Achieved bandwidth for the HMV in single and double precision for a 2D problem.} \label{fig:hmv_bw_2d} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hgemv_5.pdf} \caption{Achieved bandwidth for the HMV in single and double precision for a 3D problem.} \label{fig:hmv_bw_3d} \end{subfigure} \caption{Achieved bandwidth of HMV on a single P100 GPU with the streamed kernel achieving up to 78\% of the theoretical bandwidth peak of the GPU.} \label{fig:hmv_bandwidth} \end{figure} For illustration, Figure~\ref{fig:samples} shows the structure of the 2D and 3D covariance matrices for the $n = 2^{14}$ problem size. The small dense blocks of size $64\times64$ are shown in red in the zoomed details. As expected, the 3D matrix has more dense blocks and its low rank trees are bushier than those of the 2D matrix which puts more pressure on memory (or alternatively permit lower accuracy for the same memory footprint as a 2D problem of the same size). The performance results shown here are for these matrices in their original analytically-derived hierarchical form. The algebraic compression discussed in section~\ref{sec:compression} will reduce the memory footprint of the low rank portions substantially and further reduce the HMV time, as will be shown in section~\ref{sec:compperf}. Figure \ref{fig:hmv_profile} shows the profile of the execution of the HMV of the 3D problems in single and double precision. The upsweep and downsweep phases show relatively poor performance for the smaller problems sizes, since the small batches generated for the upper levels of the trees do not provide enough work to saturate the GPU, leading to lower performance during those phases. The impact of the smaller higher levels is alleviated as the problem size increases, where the larger lower levels that can saturate the GPU dominate the workload. Kernel streaming as discussed in Section \ref{sec_hmv_stream} allows us to increase hardware usage during those phases. Figures \ref{fig:hmv_2d} and \ref{fig:hmv_3d} show the execution time of the HMV in double and single precision for the 2D and 3D problems respectively. The streamed kernel shows up to $27\%$ performance improvement for the smaller problem sizes. We can also see the expected linear growth of the algorithm for all versions. We also compare the effect of using different batched kernels. All versions using the batched GEMV and block spMV kernels from~\cite{abdelfattah16a,abdelfattah16b} show significant improvements over the same algorithms implemented with the vendor provided routines in CUBLAS~\cite{cublas16} and CUSPARSE~\cite{cusparse16}. Since the matrix vector multiplication is a memory bound routine, we gauge the performance of the kernels by bandwidth. Since this operation is bandwidth limited, we compute performance as the total number of bytes transferred over total execution time. This includes all dense and coupling matrices in the matrix tree as well as the leaves and transfer matrices of the basis trees. Figures \ref{fig:hmv_bw_2d} and \ref{fig:hmv_bw_3d} show the achieved bandwidth of the various HMV kernels, with the streamed version achieving up to $78\%$ of the theoretical peak bandwidth of the P100 GPU. The improvement in achieved bandwidth over the non-streamed version that does not allow the overlap of the different portions of the computation is substantial for the small problem sizes. We note that performance was quite stable and reproducible between runs. \section{Hierarchical matrix compression} \label{sec:compression} \subsection{Overview} Compression is a core operation in hierarchical matrix algebra. For example, in the course of implementing BLAS3 operations, matrix blocks get added, generally producing increased apparent ranks. The matrix needs to be compressed in order to maintain the optimal complexity. The goal of compression is therefore to construct new nested row and columns bases in which the matrix blocks can be expressed more compactly, i.e., where blocks originally represented as $U_i S_{ij} V_j^T$ can be compressed into the form $U'_i S'_{ij} V_j^{\prime T}$ where the dimensions of $S'$ are smaller than the dimensions of $S$. The primary task here is to construct the common basis $U'_i$ in which all blocks of a given block row can be expressed, without incurring the quadratic cost that would be needed if a straight SVD of the whole row block is performed. The same goes for column blocks and $V'_j$ when the two bases $\mathcal{U}$ and $\mathcal{V}$ are different. Finally, once the compact and more efficient nested block row/column basis has been generated, the new $S'_{ij}$ for every matrix block is computed by a transformation of the form $T_{Ui} S_{ij} T_{Vj}^T$, leading to a smaller memory footprint and reduced hierarchical operation runtimes. The algorithms presented are adapted from~\cite{borm_2010} to fit the architecture of the GPU. In order to introduce the somewhat involved algorithm, let's first consider how the new basis for a block row $A_i^q$ at the finest level $q$ would be generated. $A$ here denotes only the low rank portions of the hierarchical matrix, since the dense blocks are not compressed. $A_i^q$ consists of $b$ low rank blocks expressed at level $q$ as $U_i S_{ij}V_{j}^T$ with $j=j_1 \cdots j_b$, and additional pieces representing the restriction of blocks from higher levels to their ``$t$'' rows as shown in Figure \ref{fig:matrix_block_row}. \begin{equation} A_i^q = U_i^q \begin{bmatrix} \substack{\text{portions of} \\ \text{ancestors}} \quad S_{ij_1}^q V_{j_1}^{q T} \cdots S_{ij_b}^q V_{j_b}^{q T} \end{bmatrix} = U_i^q B_i^{qT} \end{equation} The optimal basis can be generated by computing the SVD of $U_i^q B_i^{qT}$, truncating it to the desired approximation, and using the truncated left singular vectors as the new basis $U^{\prime q}_i$. This would however require the expensive SVD of the $O(n)$-sized $B_i^q$. In order to avoid it, we would first compute the QR decomposition of $B_i^q$ and then perform the SVD with the small $R$ factor. \begin{equation} A_i^q = U_i^q {B_i^q}^T = U_i^q (Q_i^q R_i^q)^T = \underbrace{U_i^q {R_i^q}^T}_{\text{new basis}} {Q_i^q}^T \end{equation} The optimal basis $U^{\prime q}_i$ is then simply the truncated left singular vectors of what might be thought of as a new weighted basis $U_i^q {R_i^q}^T$, and this finishes the process for level $q$. When we move to higher levels in the tree, we need to insure that the ${U'}$ bases remain nested. This requires additional singular value decompositions, but involving only small transfer matrices, as we go up $\mathcal{U}$ in an upsweep traversal described in Section \ref{sec:basis_truncation}. \begin{figure}[t] \centering \includegraphics[width=0.4\textwidth]{matrix_block_row.pdf} \caption{Matrix block row $A_i^q$ of the low rank portion of the hierarchical matrix for the sixth row of the leaf level. $A_i^q$ includes 5 blocks at level $q$ and sub-blocks coming from higher level block rows.} \label{fig:matrix_block_row} \end{figure} The task of computing $R_i^q$ of the QR decomposition of $B_i^q$ can be done efficiently by exploiting the nestedness of the bases. Let us assume that the QR decomposition of $B_{i^+}^{q-1}$, the parent block $i^+$ at level $q-1$, is available as $Q_{i^+}^{q-1} R_{i^+}^{q-1}$. Then, \begin{equation} \begin{split} A_i^q &= \begin{bmatrix} \substack{\text{$i$-portion of} \\ U_{i^+}^{q-1} {B_{i^+}^{q-1}}^T} \quad U_i^q S_{ij_1}^q V_{j_1}^{q T} \cdots U_i^q S_{ij_b}^q V_{j_b}^{q T} \end{bmatrix} \\ & = U_i^q \begin{bmatrix} E_i^q (Q_{i^+}^{q-1} R_{i^+}^{q-1})^T \quad S_{ij_1}^q V_{j_1}^{q T} \cdots S_{ij_b}^q V_{j_b}^{q T} \end{bmatrix} = U_i^q B_i^{qT} \end{split} \end{equation} with $B_i^q$ conveniently expressible as: \begin{equation} \label{eq:Btq} B_i^q = \begin{bmatrix} Q_{i^+}^{q-1} \; R_{i^+}^{q-1} E_i^{q T} \\ V_{j_1}^l S_{ij_1}^{q T} \\ \vdots \\ V_{j_b}^q S_{ij_b}^{q T} \end{bmatrix} = \textbf{diag}(Q_{i^+}^{q-1}, V_{j_1}^q, \cdots, V_{j_b}^q) \begin{bmatrix} R_{i^+}^{q-1} E_i^{qT} \\ S_{ij_1}^{q T} \\ \vdots \\ S_{ij_b}^{q T} \end{bmatrix}. \end{equation} Assuming the $V^q$ bases are orthogonal, the block diagonal matrix in Eq.~\ref{eq:Btq} is orthogonal and the QR of $B_i^q$ simply reduces to the QR of the small stack at the end of Eq.~\ref{eq:Btq} which involves only $b+1$ blocks, each being a small $k \times k$ coupling/transfer matrix, and therefore can be done quite efficiently. Since this QR uses the $R^{q-1}$ matrix from level $q-1$, the overall computation starts from the root and goes down the tree computing all the $R^l_i$ matrices for all levels in a downsweep traversal. As with previous operations, all blocks at a given level can obviously be processed in parallel. We also observe here that the $Q$ factors are not needed and a specialized QR decomposition avoiding their expensive storage and computation improves the performance of the algorithm. Orthogonalizing the $\mathcal{V}$ basis tree can be done in a pre-processing phase. A basis is orthogonal if $V_j^{lT} V_j^l$ is the identity matrix for all levels $l$. Orthogonalizing a basis involves performing QR on the finest level basis and then going up the tree to compute new transfer matrices that allow higher level nodes to satisfy the orthogonality condition. This is also done via additional QR operations involving the transfer matrices. In summary, the overall compression procedure consists of the following three computational steps: \begin{itemize} \item An upsweep of the basis trees to orthogonalize them. This step uses a sequence of batched QR calls, one per level, to produce an orthogonal basis. This is described in Section \ref{sec:basis_orthogonalization}. \item A downsweep of the basis trees, using the coupling blocks $S_{ij}$, to construct the $R_i$ factors for the new bases. This step uses a sequence of batched QR kernel calls, one per level, on the stacks at the end of Eq.~\ref{eq:Btq}. This is described in Section \ref{sec:basis_generation}. \item An upsweep of the basis tree to truncate the new bases to the desired tolerance. This step uses a sequence of batched SVD calls, again one per level, on the $U_iR_i$ bases to produce the new optimal basis. The $S_{ij}$ blocks are then transformed into these bases via batched matrix multiplication operations. This is described in Section \ref{sec:basis_truncation}. \end{itemize} \subsection{Basis orthogonalization} \label{sec:basis_orthogonalization} Orthogonalizing a nested basis tree $\mathcal{V}$ replaces it by a new nested basis where every node satisfies the orthogonality condition $V_j^{lT} V_j^l = I$. This is equivalent to the conditions that $V_j^{qT} V_j^q = I$ at the finest level $q$ and that the transfer matrices satisfy $\sum_{c} F_c^T F_c = I$ for all levels, where $c$ ranges over the two children of every node in the basis tree. Besides allowing the simplification in the $R$ computation algorithm, orthogonalizing the basis of an $\mathcal{H}$-matrix simplifies error computations and matrix projections. It is also structurally similar to the truncation algorithms described in Section \ref{sec:basis_truncation}. A by-product of orthogonalization is also a set of projection matrices that transform between the old basis and the new orthogonal one. These projection matrices are stored in a tree that shares the same structure as the basis tree, where processing each node of the basis tree produces a node in the projection tree $T_\mathcal{V}$. We assume here that $\mathcal{V} = \mathcal{U}$ and do not make a distinction between the row and column bases and drop the subscript $\mathcal{V}$ from $T$. If we denote by $Q^l_i$ the new orthogonal basis at level $l$, the original basis $V_j^l$ can be recovered as $Q_j^l T_j^l$. We will use this transformation to express the coupling matrices in the new orthogonal basis. As in the upsweep of the HMV algorithm, we perform the orthogonalization operation one level at a time, starting at the leaves and sweeping up the tree. Processing the leaves simply requires QR factorization of each leaf node where the $Q$ factor becomes the new orthogonal leaf and the $R$ factor is output into the leaf level of $T$. The inner nodes are expressed in terms of their children using the nested basis property and must be orthogonalized in a way that preserves this property. Given an inner node $j^+$ at level $l-1$ with children $j_1$ and $j_2$ at processed level $l$, we have \begin{equation*} V^{l-1}_{j^+} = \begin{bmatrix} V^{l}_{j_1} & \\ & V^{l}_{j_2} \end{bmatrix}\begin{bmatrix} F_{j_1}\\ F_{j_2} \end{bmatrix} = \begin{bmatrix} Q^{l}_{j_1} & \\ & Q^{l}_{j_2} \end{bmatrix}\begin{bmatrix} T^{l}_{j_1} F_{j_1}\\ T^{l}_{j_2} F_{j_2} \end{bmatrix} = \begin{bmatrix} Q^{l}_{j_1} & \\ & Q^{l}_{j_2} \end{bmatrix} Z \end{equation*} \begin{algorithm}[t] \caption{GPU orthogonalization upsweep marshaling routine} \label{alg:horthog_marshalupsweep} \begin{algorithmic}[1] \Procedure{marshalQRupsweep}{$Z, \widehat{T}^{(l)}, F^{(l)}$} \State $n_p$ = levelptr$[l-1]$ \State $k_p$ = levelrank$[l-1]$ \State $n_c$ = levelptr$[l]$ \State $k_c$ = levelrank$[l]$ \ForAllp{$p = n_p \rightarrow n_c$} \State $i = p - n_p$ \Comment{{\small Batch index}} \State $c$ = head$[p]$ \State $c_i = 0$ \While {$c \neq \text{empty}$} \State $\batch{Z}[c - n_c] = $ ptr$\left( Z \right) + i \times 2 \times k_c \times k_p + c_i$ \Comment{{\small Binary Tree}} \State $\batch{T}[c - n_c] = $ ptr$\left( \widehat{T}^{(l)} \right) + (c - n_c) \times k_c \times k_c$ \Comment{{\small Extract level pointer data}} \State $\batch{F}[c - n_c] = $ ptr$\left( F^{(l)} \right) + (c - n_c) \times k_c \times k_p$ \State $c_i = c_i + k_c$ \State $c = $ next$[c]$ \EndWhile \EndForAllp \EndProcedure \end{algorithmic} \end{algorithm} Forming the $2k^{l} \times k^{l-1}$ matrix $Z$, computing its QR factorization and using the two $k^{l} \times k^{l-1}$ blocks of the $Q$ factor as the new transfer matrices, gives us the new orthogonal inner nodes that satisfies the nested basis property. The $R$ factor is then output into level $l-1$ of the projection tree $T$. $Z$ is formed by first marshaling the operations based on the data in the projection tree and the basis tree transfer nodes and then operating on them using a batched matrix-matrix multiplication routine. $Z$ is then factorized using a batch QR factorization routine and the sub-blocks are copied back as the new transfer matrices using a marshaled batch copy operation. This leads us to Algorithm \ref{alg:horthog_marshalupsweep} for marshaling the orthogonalization upsweep operations and Algorithm \ref{alg:ortho} for computing the projection tree $T$ and the new orthogonal basis. The left side of Figure \ref{fig:horthog_project} depicts this operation for the binary basis tree. \begin{algorithm}[t] \caption{Basis Orthogonalization} \label{alg:ortho} \begin{algorithmic}[1] \Procedure{QRupsweep}{$V$, $F$, $T$} \State $q$ = heightof$( T )$ \Comment{{\small \emph{leaf level, log(n/m)}}} \State $[ V, \, T^{q} ] $ = qrBatched$\left( \frac{n}{m}, V \right)$ \For{$l$ = $q \rightarrow {}1$} \Comment{{\small \emph{up the tree}}} \State $N$ = $n / m / 2^{q-l}$ \State $[\batch{Z}, \batch{T}, \batch{F}]$ = marshalQRupsweep$( Z, T^{l}, F^{l})$ \State gemmBatched$(N, \batch{Z}, \batch{T}, \batch{F})$ \State $[\batch{Z}, \, T^{l-1}]$ = qrBatched$(N/2, \batch{Z})$ \State $\batch{F}$ = marshalQRunstack$(\batch{Z}, F^{l})$ \State $F^{l}$ = copyBatched$(\batch{F})$ \EndFor \EndProcedure \end{algorithmic} \end{algorithm} \begin{figure}[b] \centering \includegraphics[width=\textwidth]{horthog_project.pdf} \caption{Left: Basis orthogonalization starting from the leaves and sweeping up the tree to overwrite the basis with an orthogonal one and generate the projection tree $T$ (only a single level is depicted here). Right: Projection of the leaf level of coupling matrices into a new basis using a projection tree $T$. The new basis could be more compact, resulting in lower rank for the level.} \label{fig:horthog_project} \end{figure} \begin{algorithm}[ht] \caption{Projection of Coupling Matrices} \label{alg:qrmult} \begin{algorithmic}[1] \Procedure{Projection}{$T$, $S$} \ForAllp{ $l$ = $1 \rightarrow q$} \State $TS = \text{ws}(S^{l})$ \Comment{{\small \emph{Temporary workspace}}} \State $[\batch{ {T_U} }, \batch{S}, \batch{TS}, \batch{ {T_V} }]$ = marshalProjection$( T^{l}, S^{l}, TS )$ \State nb = sizeof($S^{l}$) \State gemmBatched$(\text{nb}, \batch{TS}, \batch{ {T_U} }, \batch{S})$ \State gemmBatched$(\text{nb}, S^{l}, \batch{TS}, \batch{ {T_V} }^T )$ \EndForAllp \EndProcedure \end{algorithmic} \end{algorithm} Finally, the projection phase transforms the coupling matrices of each matrix block $A^{l}_{ij}$ at level $l$ using the projection matrices stored in $T^{l}$: \begin{equation*} A^{l}_{ij} = U^{l}_i S^{l}_{ij} {V^{l\,T}_j} = Q^{l}_i \left(T^{l}_i S^{l}_{ij} T^{l\,T}_j \right) {Q^{l\,T}_j}. \end{equation*} The new coupling matrices are obtained by left and right multiplications with the computed projection matrices independently at all levels. The operations are first marshaled by level and then executed using batch matrix-matrix multiplication routines. This operation is described in Algorithm \ref{alg:qrmult} and depicted in the right panel of Figure \ref{fig:horthog_project} for a single level of the matrix tree. \subsection{Basis generation} In this phase we construct a basis tree $R$ for the block rows of the matrix tree. This tree will have the same structure as the row basis tree. Every node $i$ at every level $l$ will store the matrix $R_i^l$ which will postmultiply the corresponding $U_i^l$ to produce the new basis that will be truncated. As described earlier, $R_i^l$ depends on matrix data coming from bocks at level $l$ whose row basis node is $U_i$ and from higher level blocks that also span the block row $i$. Denoting the parent node of $i$ by $i^+$, the relevant block row $\bar{S}_i$ that enters the computation of $R_i^l$ is depicted in Figure \ref{fig:hbasisgen} and expressed as: \begin{equation*} \bar{S}_i = \begin{bmatrix} R_{i^+}^{l-1} E_i^{l\,T} \\ S_{ij_1}^{l\,T} \\ S_{ij_2}^{l\,T} \\ \vdots \\ S_{ij_b}^{l\,T} \\ \end{bmatrix} \end{equation*} where $b$ is the number of blocks in the block row at level $l$. The first block $R_{i^+}^{l-1} E_i^{lT}$ represents data coming from the levels of blocks above $l$. The node $R_i^{l}$ can then be computed as the $R$ factor of the QR factorization of $\bar{S}_i$. The tree is computed starting at the root of the matrix tree followed by a sweep down to the leaves. Marshaling the block row from the matrix tree data and the parent level of $R$ into a batch matrix-matrix multiplication and a batch transpose operation allows us to quickly form $\bar{S}_i$ for a level. This matrix is then fed into a batch QR factorization routine that does not form $Q$. The marshaling routine for this operation makes use of the generated BSR data of the level of the matrix tree and is described in Algorithm \ref{alg:marshalbasisgen}. Putting everything together leads us to Algorithm \ref{alg:basis} to form the tree $R$. \begin{figure}[b] \centering \includegraphics[width=0.85\textwidth]{hbgen.pdf} \caption{Constructing $R_i^l$ from its parent level, the matrix tree row data, and transfer matrices.} \label{fig:hbasisgen} \end{figure} \begin{algorithm}[t] \caption{GPU Basis Generation marshaling routine} \label{alg:marshalbasisgen} \begin{algorithmic}[1] \Procedure{marshalBasisGen}{$R^{l-1}, E^l, S^l$} \State $n_r$ = levelrows$[l]$ \State $k_p$ = levelrank$[l-1]$ \State $k_c$ = levelrank$[l]$ \ForAllp{$r = 1 \rightarrow n_r$} \State $b_s = $ rowPtr $[r]$ \State $b_e = $ rowPtr $[r+1]$ \State $p_r = $ parent $[r]$ \State $\batch{RE}[r] = $ ptr $\left( \bar{S} \right) + r \times ld_S \times k_c$ \Comment{{\small $ld_S$ = rows of $\bar{S}$}} \State $\batch{R}[r] = $ ptr $\left( R^{l-1} \right) + p_r \times k_p \times k_p$ \State $\batch{E}[r] = $ ptr $\left( E^l \right) + r \times k_p \times k_p$ \For {$i = b_s \rightarrow b_e$} \State $\batch{\bar{S}}[i] = $ ptr$\left( \bar{S} \right) + i \times ld_S \times k_c + k_p + (i - b_s) \times k_c$ \State $\batch{S}[i] = $ ptr$\left( S^{(l)} \right) + i \times k_c \times k_c$ \EndFor \EndForAllp \EndProcedure \end{algorithmic} \end{algorithm} \label{sec:basis_generation} \begin{algorithm}[ht] \caption{Basis Generation} \label{alg:basis} \begin{algorithmic}[1] \Procedure{BasisGeneration}{$E$, $S$, $R$} \State $q$ = heightof$( R )$ \Comment{{\small \emph{leaf level, log(n/m)}}} \State $R^{0} = 0$ \For{$l$ = $1 \rightarrow q$} \Comment{{\small \emph{down the matrix tree}}} \State $N$ = $n / m / 2^{q-l}$ \Comment{{\small \emph{number of block rows}}} \State nb = sizeof($S^l$) \Comment{{\small \emph{ number of blocks in level $l$ }}} \State $[\batch{RE}, \batch{R}, \batch{E}, \batch{S}, \batch{\bar{S}}] $ = marshalBasisGen$( R^{l-1}, E^l, S^l)$ \State gemmBatched$( N, \batch{RE}, \batch{R}, \batch{E}^T )$ \State transposeBatched$(\text{nb}, \batch{S}, \batch{\bar{S}})]$ \State $R^l$ = qrBatched*$(N, \bar{S} )$ \Comment{{\small \emph{ Q not computed }}} \EndFor \EndProcedure \end{algorithmic} \end{algorithm} \subsection{Basis truncation} \label{sec:basis_truncation} \begin{algorithm}[hb] \caption{Basis Truncation} \label{alg:trunc} \begin{algorithmic}[1] \Procedure{SVDupsweep}{$U$, $E$, $R$, $T$, $\epsilon$} \State $q$ = heightof$( T )$ \Comment{{\small \emph{leaf level, log(n/m)}}} \State $W = $ gemmBatched$\left( \frac{n}{m}, U, R^{q} \right)$ \Comment{{\small \emph{new basis}}} \State $[ W, \widetilde{k}^{(q)} ] $ = svdBatched $\left( \frac{n}{m}, W , \epsilon \right)$ \Comment{{\small \emph{truncate the basis}}} \State $T^{q}$ = gemmBatched$\left( \frac{n}{m}, W^T, U \right)$ \Comment{{\small \emph{transformation between bases}}} \State $U = W$ \Comment{{\small \emph{replace basis by the new one}}} \For{$l$ = $q \rightarrow {}1$} \Comment{{\small \emph{up the tree}}} \State $N$ = $n / m / 2^{q-l}$ \State $[\batch{T}, \batch{E}]$ = marshalSVDupsweep$(T^l, E^l)$ \State $Z$ = gemmBatched$(N, \batch{T}, \batch{E})$ \State $W$ = gemmBatched$(N/2, Z, R^{l-1})$ \State $[W, \widetilde{k}^{l-1}]$ = svdBatched$(N/2, W, \epsilon)$ \State $T^{l-1}$ = gemmBatched$\left( N/2, W^T, Z \right)$ \State $\batch{F}$ = marshalSVDunstack$(W, F^l)$ \State $F^l$ = copyBatched$(\batch{F})$ \EndFor \EndProcedure \end{algorithmic} \end{algorithm} Once the $R$ matrix of each block row is computed, we can generate the new compressed basis tree, which allows the ranks of the blocks at every level $l$ to decrease from $k^l$ to $\widetilde{k}^{l}$ while maintaining a prescribed accuracy $\epsilon$ in the approximation. This is the heart of algebraic compression. The truncation process is structurally similar to the upsweep of the orthogonalization in that processing the nodes produces projection matrices which are then used to sweep up the tree; however processing each node involves different computational kernels. For the leaf nodes $U_i^{q}$, we first use $R_i^q$ to produce a new basis node $W_i^{q} = U_i^{q} R_i^{qT}$. We then compute the singular value decomposition of $W_i^{q}$ and produce the truncated basis by discarding singular vectors corresponding to values that are less than a threshold relative to the largest singular value. As we impose a constant rank per level, we use a fast reduction to compute the maximum truncated rank $\widetilde{k}^{q}$ for the given tolerance at the leaf level. The truncated left singular vectors $Q_i^{q}$ will be the new compact basis node. Finally, the projection matrix into the new basis is computed as $T_i^{q} = Q_i^{qT} U_i^{q}$. Processing the inner nodes of the tree follows the same procedure as the orthogonalization: we form the $2\widetilde{k}^{l} \times k^{l-1}$ matrix $Z$ using the original transfer matrices and the projection matrices. We then compute a weighted $Z$ matrix, $W^{l}_i = Z_i R_i^l$, and proceed to compute its truncated singular value decomposition. The two $\widetilde{k}^{l} \times \widetilde{k}^{l-1}$ blocks of the truncated left singular vectors $Q_i^{l}$ will be the new transfer matrices for the truncated inner node, and the projection matrix is computed as $T_i^{l} = Q_i^{lT} Z_i$. The marshaling procedures are very similar to those of the orthogonalization with the addition of applying the factor $R$ to the original basis. The operations are then carried out by batch singular value decompositions and matrix-matrix multiplications. This leads us to Algorithm \ref{alg:trunc} for producing the new compact basis and the corresponding projection matrix tree $T$ given a relative threshold $\epsilon$ for truncation. Finally, the projection of the coupling matrices is carried out in the same way as the projection phase of the orthogonalization procedure, using marshaled batch matrix-matrix multiplications with the projection matrix tree produced by Algorithm \ref{alg:trunc}. \subsection{Performance results} \label{sec:compperf} We study the performance of the GPU compression procedure using the same two families of 2D and 3D covariance matrices described in Section \ref{subsec_hmv_perf} for HMV. The matrices were originally generated as hierarchical matrices in a generic polynomial basis. As a result, their representation is not particularly memory efficient and algebraic compression can be therefore expected to produce new compressed hierarchical representation to reduce their memory footprint in an accuracy controllable way. \begin{table}[ht] \centering \def1.2{1.2} \begin{tabular}{|c|c|c|c|} \hline Problem size & $\frac{\norm{A^{\mathcal{H}}_2 - A^{\mathcal{H}}_1}_F}{\norm{A^{\mathcal{H}}_1}_F}$ & $\frac{\norm{Ax-A^{\mathcal{H}}_1x}}{\norm{Ax}}$ & $\frac{\norm{Ax-A^{\mathcal{H}}_2x}}{\norm{Ax}}$ \\ \hline \hline $2^{14}$ & $6.40 \times 10^{-8}$ & $3.33 \times 10^{-7}$ & $3.12 \times 10^{-7}$ \\ $2^{15}$ & $9.85 \times 10^{-8}$ & $3.60 \times 10^{-7}$ & $3.36 \times 10^{-7}$ \\ $2^{16}$ & $1.14 \times 10^{-7}$ & $3.47 \times 10^{-7}$ & $3.50 \times 10^{-7}$ \\ $2^{17}$ & $1.52 \times 10^{-7}$ & $3.50 \times 10^{-7}$ & $3.58 \times 10^{-7}$ \\ $2^{18}$ & $1.74 \times 10^{-7}$ & $3.49 \times 10^{-7}$ & $3.47 \times 10^{-7}$ \\ $2^{19}$ & $2.19 \times 10^{-7}$ & $3.52 \times 10^{-7}$ & $3.48 \times 10^{-7}$ \\ \hline \end{tabular} \caption{Compression errors for the 2D problem using a truncation threshold of $10^{-7}$.} \label{fig:htrunc_err_2d} \end{table} \begin{table}[ht] \centering \def1.2{1.2} \begin{tabular}{|c|c|c|c|} \hline Problem size & $\frac{\norm{A^{\mathcal{H}}_2 - A^{\mathcal{H}}_1}_F}{\norm{A^{\mathcal{H}}_1}_F}$ & $\frac{\norm{Ax-A^{\mathcal{H}}_1x}}{\norm{Ax}}$ & $\frac{\norm{Ax-A^{\mathcal{H}}_2x}}{\norm{Ax}}$ \\ \hline \hline $2^{14}$ & $1.33 \times 10^{-3}$ & $9.10 \times 10^{-4}$ & $9.54 \times 10^{-4}$ \\ $2^{15}$ & $1.75 \times 10^{-3}$ & $9.49 \times 10^{-4}$ & $1.03 \times 10^{-3}$ \\ $2^{16}$ & $2.08 \times 10^{-3}$ & $9.19 \times 10^{-4}$ & $9.35 \times 10^{-4}$ \\ $2^{17}$ & $2.35 \times 10^{-3}$ & $9.62 \times 10^{-4}$ & $9.70 \times 10^{-4}$ \\ $2^{18}$ & $2.85 \times 10^{-3}$ & $9.78 \times 10^{-4}$ & $9.62 \times 10^{-4}$ \\ $2^{19}$ & $2.83 \times 10^{-3}$ & $9.76 \times 10^{-4}$ & $9.68 \times 10^{-4}$ \\ \hline \end{tabular} \caption{Compression errors for the 3D problem using a truncation threshold of $10^{-3}$.} \label{fig:htrunc_err_3d} \end{table} Tables \ref{fig:htrunc_err_2d} and \ref{fig:htrunc_err_3d} show the compression errors for the 2D and 3D problems respectively. In this table, $A$ refers to the exact dense covariance (that is never formed but whose entries have analytical expressions from the underlying kernel), $A^\mathcal{H}_1$ refers to the hierarchal matrix approximation of the covariance generated using the generic Chebyshev polynomial basis described earlier, and $A^\mathcal{H}_2$ refers to the algebraically compressed covariance. The $A^\mathcal{H}_2$ matrices were generated using a truncation threshold of $10^{-7}$ for the 2D problems and $10^{-3}$ for the 3D problems. These thresholds were chosen to correspond to the errors that already existed in the $A^\mathcal{H}_1$ matrix approximation so that the algebraic compression does not introduce further approximation errors. Therefore the reduction in memory footprint comes purely from the generation of more efficient bases to represent the matrix. \begin{figure} \centering \includegraphics[width=\textwidth]{horthog_1.pdf} \caption{Breakdown of the orthogonalization phases in percentages of total operation time in single (left) and double (right) precision on a P100 GPU, showing that the projection phase dominates the runtime.} \label{fig:horthog_profile} \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{horthog_2.pdf} \caption{Time for the orthogonalization in single and double precision for a 2D problem.} \label{fig:horthog_2d} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{horthog_3.pdf} \caption{Time for the orthogonalization in single and double precision for a 3D problem.} \label{fig:horthog_3d} \end{subfigure} \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{horthog_4.pdf} \caption{Performance of orthogonalization in single and double precision for a 2D problem.} \label{fig:horthog_perf_2d} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{horthog_5.pdf} \caption{Performance of orthogonalization in single and double precision for a 3D problem.} \label{fig:horthog_perf_3d} \end{subfigure} \caption{Runtime and achieved performance of the orthogonalization on a single P100 GPU. Note the asymptotic linear growth with problem size. Double and single precision times are closer to each other than expected due to the performance of the CUBLAS batched \texttt{gemm} routines.} \label{fig:horthog_perf} \end{figure} \begin{figure} \centering \includegraphics[width=\textwidth]{hcompress_1.pdf} \caption{Breakdown of the compression phases in percentages of total operation time in single (left) and double (right) precision on a P100 GPU, showing that the truncation and basis generation phases dominate the computation.} \label{fig:htrunc_profile} \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hcompress_2.pdf} \caption{Time for the compression in single and double precision for a 2D problem.} \label{fig:htrunc_2d} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hcompress_3.pdf} \caption{Time for the compression in single and double precision for a 3D problem.} \label{fig:htrunc_3d} \end{subfigure} \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hcompress_4.pdf} \caption{Performance of compression in single and double precision for a 2D problem.} \label{fig:htrunc_perf_2d} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hcompress_5.pdf} \caption{Performance of compression in single and double precision for a 3D problem.} \label{fig:htrunc_perf_3d} \end{subfigure} \caption{Runtime and achieved performance of compression on a single P100 GPU, showing asymptotically linear growth with problem size.} \label{fig:htrunc_perf} \end{figure} The first column of Tables \ref{fig:htrunc_err_2d} and \ref{fig:htrunc_err_3d} shows the relative error between the original hierarchical matrix $A^\mathcal{H}_1$ and the compressed matrix $A^\mathcal{H}_2$ in the Frobenius norm. As expected, these errors are on the order of the truncation threshold used in the compression. We note here that the Frobenius norm error is computed, quite inexpensively, in the course of the truncation operation and does not require a separate post-processing operation. This is a useful feature for applications that require adaptive tolerances and fine error control inside chains of hierarchical operations. The second and third columns show the relative error pre- and post-compression respectively, measured in the 2-norm $\norm{Ax - A^\mathcal{H}x} / \norm{Ax}$ where $x$ is a random vector whose entries are uniformly distributed. For the large problems where it is too expensive to compute $Ax$, we randomly sampled $10\%$ of the rows and scaled the resulting error. As expected, comparing the second and third columns shows that compression with the appropriate thresholds had little to no effect on the accuracy of the resulting matrix. \begin{figure} \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hcompress_mem_1.pdf} \caption{Effect of the compression on memory for the 2D problem with a truncation threshold of $10^{-7}$.} \label{fig:hmem_2d} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hcompress_mem_2.pdf} \caption{Effect of the compression on memory for the 3D problem with a truncation threshold of $10^{-3}$.} \label{fig:hmem_3d} \end{subfigure} \label{fig:hmem} \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hcompress_hgemv_1.pdf} \caption{Effect of the compression on HMV for the 2D problem.} \label{fig:htrunc_hmv2d} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{hcompress_hgemv_2.pdf} \caption{Effect of the compression on HMV for the 3D problem.} \label{fig:htrunc_hmv3d} \end{subfigure} \caption{Effect of the compression on memory and runtime for the 2D and 3D problems, showing significant memory savings for the low rank portion and the HMV time.} \label{fig:htrunc_hmv} \end{figure} We first profile and measure the performance of the orthogonalization kernel. Figure \ref{fig:horthog_profile} shows the percentage of total operation time spent in each of the three phases of the orthogonalization in single and double precision. It is easy to see that the projection phase dominates the runtime for the larger problem sizes, making the computational kernel at the core of this operation, the batched matrix-matrix multiplication, the main performance limiter. On the P100 GPU and for small matrix sizes, the CUBLAS batched \texttt{gemm} routines we use show lackluster performance and stand to be improved; the single precision performance is actually quite close to that of the double precision. We see this effect in the runtimes of the orthogonalization in Figures \ref{fig:horthog_2d} and \ref{fig:horthog_3d}; however, the expected linear growth of the algorithm remains. As the kernels involved in this computation are compute bound, Figures \ref{fig:horthog_perf_2d} and \ref{fig:horthog_perf_3d} show the performance in single and double precision for the 2D and 3D problems in GFLOP/s. Overall however, the orthogonalization phase represents a relatively small percentage (10--15\%) of the total compression time. Figure \ref{fig:htrunc_profile} shows the runtime profile of the compression in single and double precision where both truncation and basis generation phases are dominant due to the relatively costly SVD operations on the basis nodes and the QR decompositions on the coupling matrix data, especially when compared to the matrix-matrix multiplications of the projection phase. Figures \ref{fig:htrunc_2d} and \ref{fig:htrunc_3d} show the asymptotic growth of the compression algorithm. Since this is also a compute bound algorithm, we show the performance of the compression in GFLOP/s as the total number of operations executed by each batched kernel over total execution time in Figures \ref{fig:htrunc_perf_2d} and \ref{fig:htrunc_perf_3d}. Figures \ref{fig:hmem_2d} and \ref{fig:hmem_3d} show the significant memory savings achieved by the algebraic compression procedure. The compression also has a positive effect on the runtime of the hierarchical matrix arithmetic as shown in the improved runtimes of the matrix-vector operation in Figures \ref{fig:htrunc_hmv2d} and \ref{fig:htrunc_hmv3d}. \section{Summary and Conclusions} Hierarchical matrices provide memory-efficient approximations for many of the dense matrices that appear in a variety of contexts in scientific computing. In their $\mathcal{H}^2$ form, which may be viewed as an algebraic generalization of fast multipole methods, they have asymptotically optimal memory requirements and can store approximations of dense matrices in $\mathcal{O}(n)$ units of storage. This optimal memory footprint makes them particularly useful representations on modern hardware architectures, which are characterized by their limited memory relative to the raw arithmetic performance of their cores, such as GPUs and manycore processors. The objective of this work is to develop algorithms for operating on $\mathcal{H}^2$ matrices, that expose the fine grained parallelism to allow for efficient GPU execution. We describe algorithms and high performance implementations of hierarchical matrix vector multiplication as well as hierarchical matrix compression, a key component to efficient $\mathcal{H}^2-$matrix arithmetic, and show that the computations are amenable to highly efficient processing on GPUs. By flattening the representation trees of a hierarchical matrix, we can efficiently marshal the operations for parallel execution using high performance batched kernels, and cleanly separate the linear algebra from the tree operations. Operating directly on the compressed representation, we demonstrate that the matrix vector operation can be completed in under $29$ms at $78\%$ of the theoretical peak bandwidth on the P100 GPU for a problem size of over a million involving a representative covariance matrix arising in 3D spatial statistics. The compression of a matrix from an initial hierarchical representation generated from an analytical kernel to an optimal algebraically-compressed one that preserves the original accuracy, can be done in under $1.7$s for the million sized 3D problem and executes at nearly $850$ GFLOPS/s on the P100 GPU, including a basis orthogonalization phase that executes at more than $2,000$ GFLOPS/s and basis generation and truncation phases at over $600$ GFLOPS. With the core compression algorithm in place, our future work will tackle BLAS3 operations on hierarchical matrices, including matrix-matrix multiplication and matrix inversion on GPUS, and explore applications of hierarchical matrices that can benefit from the high performance of GPUs. \bibliographystyle{ieeetran}
\section{Introduction} Deep learning models \cite{LeCun2015} have demonstrated remarkable success in tasks that require exploitation of subtle correlations, such as computer vision \cite{Krizhevsky2012} and sequence learning \cite{Sutskever2014}. Typically, humans have strong prior knowledge about a task, e.g., based on symmetry, geometry, or physics. Learning such a priori assumptions in a purely data-driven manner is inefficient and, in some situations, may not be feasible at all. While certain prior knowledge was successfully imposed -- for example translational symmetry through convolutional architectures \cite{LeCun1998} -- incorporating more general modeling assumptions in the training of deep networks remains an open challenge. Recently, generative neural networks have advanced significantly \cite{Goodfellow2014, Kingma2014}. With such models, controlling the generative process beyond a data-driven, black-box approach is particularly important. In this paper, we present a method to impose prior knowledge through homogeneous linear inequality constraints of the form $Ax\leq 0$ on the activations of deep learning models. We directly impose these constraints through a suitable parameterization of the feasible set. This has several advantages: \begin{itemize} \item The constraints are hard-constraints in the sense that they are satisfied at any point during training and inference. \item Inference on the constrained network incurs no overhead compared to unconstrained inference. \item There is no manual trade-off between constraint satisfaction and data representation. \item The proposed method can easily be applied to constrain not only the network output, but also any intermediate activations. \end{itemize} In summary, the main contribution of our method is a reparameterization that incorporates homogeneous linear inequality hard-constraints on neural network activations and allows for efficient test time predictions, i.e., our method is faster up to two orders of magnitude. The model can be optimized by standard variants of stochastic gradient descent. As an application in generative modeling, we demonstrate that our method is able to produce authentic samples from a variational autoencoder while satisfying the imposed constraints. \begin{figure}[t!] \centering \begin{tabular}{cc} \includegraphics[width=0.2\columnwidth]{upsampled_digit_0.png}& \includegraphics[width=0.2\columnwidth]{upsampled_cvae_0.png} \end{tabular} \caption{Samples drawn from a variational autoencoder trained on MNIST without constraints (left) and with a checkerboard constraint on the output domain (right). For a pixel intensity domain $[-1,1]$, the checkerboard constraint forces the image tiles to have average positive or negative brightness.} \label{fig:teaser_constrained_vae} \end{figure} \section{Related work} Various works have introduced methods to impose some type of hard constraint on neural network activations. This differs from a classical constrained optimization problem \cite{Nocedal2006} in that the constraints are on the image of a parameterized function rather than on the neural network parameters. \citet{Marquez-Neila2017} formulated generic differentiable equality constraints as soft constraints and employed a Lagrangian approach to train their model. While this is a principled approach to constrained optimization, it does not scale well to practical deep neural network models with their vast number of parameters. To make their method computationally tractable, a subset of the constraints is selected at each training step. In addition, these constraints are locally linearized; thus, there is no guarantee that this subset will be satisfied after a parameter update. \citet{Pathak2015} proposed an optimization scheme that alternates between optimizing the deep learning model and fitting a constrained distribution to these intermediate models. They deal with a classification task in the context of weakly supervised segmentation and the fitting step is in the Kullback-Leibler sense. However, this method involves solving a (convex) optimization problem at each training step. Furthermore, the overall convergence path depends on how the alternating optimization steps are combined, which introduces an additional hyperparameter that must be tuned. \citet{Briq2018} approached the weakly supervised segmentation problem with a layer that implements the orthogonal projection onto a simplex, thereby directly constraining the activations to a probability distribution. This optimization problem can be solved efficiently, but does not generalize to other types of inequality constraints. OptNet, an approach to solve a generic quadratic program as a differentiable network layer, was proposed by \citet{Amos2017}. OptNet backpropagates through the first-order optimality conditions of the quadratic program, and linear inequality constraints can be enforced as a special case. The formulation is flexible; however, it scales cubically with the number of variables and constraints. Thus, it becomes prohibitively expensive to train large-scale deep learning models. Finally, several works have proposed handcrafted solutions for specific applications, such as skeleton prediction \cite{Zhou2016} and prediction of rigid body motion \cite{Byravan2017}. In contrast, to avoid laborious architecture design, we argue for the value of generically modeling constraint classes. In practice, this makes constraint methods more accessible for a broader class of problems. \paragraph{Contribution} In this work, we tackle the problem of imposing homogeneous linear inequality constraints on neural network activations. Rather than solving an optimization problem during training, we split this task into a \textit{feasibility step} at initialization and an \textit{optimality step} during training. At initialization, we compute a suitable parameterization of the constraint set (a polyhedral cone) and use the neural network training algorithm to find a good solution within this feasible set. Conceptually, we are trading-off computational cost during initialization to obtain a model that has no overhead at test time. The proposed method is implemented as a neural network layer that is specified by a set of homogeneous linear inequalities and whose output parameterizes the feasible set. \section{Linear inequality constraints for deep learning models} \label{sec:linear_inequality_constraints} We consider a generic $L$ layer neural network $F_\theta$ with model parameters $\theta$ for inputs $x$ as follows: \begin{align} F_\theta(x) = f^{(L)}_{\theta_L}(\sigma( f^{(L-1)}_{\theta_{L-1}} ( \sigma (\dots f^{(1)}_{\theta_1}(x)\dots )))), \label{eq:generic_nn} \end{align} where $f^{(l)}_{\theta_l}$ are affine functions, e.g., a fully-connected or convolutional layer, and $\sigma$ is an elementwise non-linearity\footnote{Formally, $\sigma$ maps between different spaces for different layers and may also be a different element-wise non-linearity for each layer. We omit such details in favor of notational simplicity.}, e.g., a sigmoid or rectified linear unit (ReLU). In supervised learning, training targets $y$ are known and a loss $\L_y(F_\theta(x))$ is minimized as a function of the network parameters $\theta$. A typical loss for a classification task is the cross entropy between the network output and the empirical target distribution, while the mean-squared error is commonly used for a regression task. The proposed method can be applied to constrain any linear activations $z^{(l)} = f^{(l)}_{\theta_l}(a^{(l-1)})$ or non-linear activations $a^{(l)} = \sigma(z^{(l)})$. In many applications, one would like to constrain the output $F_\theta(x)$. The feasible set for $m$ linear inequality constraints in $d$ dimensions is the convex polyhedron \begin{equation} \mathcal{C} \coloneqq \left\{ z \biggr\vert A z \leq b, A \in \mathbb{R}^{m \times d}, b \in \mathbb{R}^m \right\} \subseteq \mathbb{R}^d \;. \label{eq:constraint_set} \end{equation} A suitable description of the convex polyhedron $\mathcal{C}$ is obtained by the decomposition theorem for polyhedra. \begin{theorem}[Decomposition of polyhedra, Minkowski-Weyl] A set $\mathcal{C}\subset \mathbb{R}^d$ is a convex polyhedron of the form \eqref{eq:constraint_set} if and only if \begin{align} \mathcal{C} &= \conv(v_1,\dots, v_n) + \cone(r_1,\dots,r_s) \nonumber \\ &= \left\{\sum_{i=1}^n \lambda_i v_i + \sum_{j=1}^s \mu_j r_j \biggr\vert \lambda_i, \mu_j \geq 0, \sum_{i=1}^n \lambda_i = 1 \right\} \label{eq:minkowski_weyl} \end{align} for finitely many vertices $\{v_1,\dots, v_n\}$ and rays $\{r_1,\dots, r_s\}$. Furthermore, $\mathcal{C} = \left\{z \vert Az \leq 0, A\in \mathbb{R}^{m\times d}\right\}$ if and only if \begin{align} \label{eq:homogeneous_constraints} \mathcal{C} = \cone(r_1,\dots,r_s) \end{align} for finitely many rays $\{r_1,\dots, r_s\}$. \label{thm:polyhedra_decomposition} \end{theorem} Such a polyhedron is shown in Figure~\ref{fig:dd_method}. If the polyhedron is bounded (as in the figure), then it may be fully described by the convex hull of its vertices. If it is unbounded (not shown), then it has a conic contribution. The theorem states that an intersection of half-spaces (half-space or H-representation) can be written as the Minkowski sum of a convex combination of the polyhedron's vertices and a conical combination of some rays (vertex or V-representation). One can switch algorithmically between these two viewpoints via the double description method \cite{Motzkin1953, Fukuda1996}, which we discuss in the following. Thus, the H-representation, which is natural when modeling inequality constraints, can be transformed into the V-representation, which can be incorporated into gradient-based neural network training. In this paper, we focus on \textit{homogeneous} constraints of the form \eqref{eq:homogeneous_constraints}, for which the feasible set is a polyhedral cone. Due to the special structure of this set, we can avoid to work with the convex combination parameters in \eqref{eq:minkowski_weyl}, which is numerically advantageous (Section~\ref{sec:extension}), and we can efficiently combine modeling constraints and domain constraints, such as a $[-1,1]$-pixel domain for images (Section~\ref{sec:combine_constraints}). \subsection{Double description method} \label{sec:double_description_method} The double description method converts between the half-space and vertex representation of a system of linear inequalities. It was originally proposed by \citet{Motzkin1953} and further refined by \citet{Fukuda1996}.\footnote{In our experiments we use \texttt{pycddlib}, which is a Python wrapper of Fukuda's \texttt{cddlib}.} Here, we are only interested in the conversion from H-representation to V-representation for homogeneous constraints \eqref{eq:homogeneous_constraints}, \begin{align} \label{eq:dd_equivalence} \H \rightarrow \cone(r_1,\dots,r_s) \;. \end{align} The core algorithm proceeds as follows. Let the rows of $A$ define a set of homogeneous inequalities and let $R = [r_1,\dots, r_s]$ be the matrix whose columns are the rays of the corresponding cone. Here, $(A, R)$ form a double description pair. The algorithm iteratively builds a double description pair $(A^{k+1}, R^{k+1})$ from $(A^{k}, R^{k})$ in the following manner. The rows in $A^k$ represent a $k$-subset of the rows of $A$ and thus define a convex polyhedron associated with $R^k$. Adding a single row to $A^k$ introduces an additional half-space constraint, which corresponds to a hyperplane. If the vector $r = r_{i} - r_{j}$ for two columns $r_{i}$, $r_{j}$ of $R^k$ intersects with this hyperplane and $\cone(\{r_{i}, r_{j}\})$ is a face\footnote{$F\subset \mathcal{C}$ is a face of the convex set $C$ if it holds for all $x,y \in \mathcal{C}$ that $\left( \forall \lambda \in (0,1), (1-\lambda)x + \lambda y \in F \Rightarrow x, y \in F \right)$.} of $R^k$, then this intersection point is added to $R^k$. Existing rays that are cut-off by the additional hyperplane are removed from $R^k$. The result is the double description pair $(A^{k+1}, R^{k+1})$. This procedure is shown in Figure~\ref{fig:dd_method}. \begin{figure}[t!] \centering \input{double_description_tikz.tex} \caption{Diagram illustrating an iteration of the double description method. Adding a constraint to the $k$-constraint set $A^k$ at iteration $k+1$ introduces a hyperplane $H$. The intersection points of $H$ with the boundary of the current polyhedron $R^k$ (marked by $\circ$) are added to the polyhedron. The ray $r_2$ is cut-off by the hyperplane $H$ and is removed from $R^k$. The result is the next iterate $R^{k+1}$.} \label{fig:dd_method} \end{figure} Adding a hyperplane might drastically increase the number of rays in intermediate representations, which, in turn, contribute combinatorically in the subsequent iteration. In fact, there exist worst case polyhedra for which the algorithm has exponential run time as a function of the number of inequalities and the input dimension, as well as the number of rays \cite{Dyer1983, Bremner1999}. Under certain assumptions more efficient bounds are known. A convex polyhedron $\mathcal{C} \subseteq \mathbb{R}^d$ is \textit{degenerate} if there exists $x\in \mathcal{C}$ such that $x$ fulfills more than $d$ inequalities with equality; otherwise, $\mathcal{C}$ is \textit{nondegenerate}. For nondegenerate polyhedra, the problem can be solved in $\mathcal{O}(m d n_r)$ time complexity, where $n_r$ is the number of rays in the final V-representation and $m$ the number of constraints \cite{Avis1992}. However, $m$ and $n_r$ may depend unfavorably on the dimension $d$. An extreme example is the unit box $\mathcal{B} = \{x \in \mathbb{R}^d \vert -1 \leq x_i \leq 1\}$ where $m=2d$ and $n_r=2^d$; thus, the algorithm has exponential run time in the dimension $d$. Overall, one can expect the algorithm to be efficient only for problems with a reasonably small number $m$ of inequalities and dimension $d$. \subsection{Integration in neural network architectures} \label{sec:nn_integration} We parameterize the homogeneous form \eqref{eq:homogeneous_constraints} via a neural network layer. This layer takes as input some (latent) representation of the data, which is mapped to activations satisfying the desired hard constraints. The algorithm is provided with the H-representation of linear inequality constraints, i.e., a matrix $A\in \mathbb{R}^{m\times d}$ for $m$ constraints in $d$ dimensions to specify the feasible set \eqref{eq:homogeneous_constraints}. At initialization, we convert this to the V-representation via the double description method (Section~\ref{sec:double_description_method}). This corresponds to computing the set of rays $\left\{ r_1,\dots, r_s \right\}$ to represent the polyhedral cone. During training, the neural network training algorithm is used to optimize within in the feasible set. There are two critical aspects in this procedure. First, as outlined in Section~\ref{sec:double_description_method}, the run-time complexity of the double description method may be prohibitive. Conceptually, the proposed approach allows for significant compute time at initialization to obtain an algorithm that is very efficient at training and test time. Second, we must ensure that the mapping from the latent representation to the parameters integrates well with the training algorithm. We assume that the model is trained with gradient-based backpropagation, as is common for current deep learning applications. The constraint layer comprises a batch normalization layer and an affine mapping (fully-connected layer with biases) followed by the element-wise absolute value function that ensures the non-negativity required by the conical combination parameters. In theory, any function $f: \mathbb{R} \rightarrow \mathbb{R}_{\geq 0}$ would fulfill this requirement; however, care must be taken to not interfere with backpropagated gradients. For example, the ReLU function $\textrm{ReLU}(x) = \max\{0,x\}$, which is commonly used as a non-linearity in neural networks, has zero gradient for $x < 0$. This implies that certain conical combination parameters are zero and cannot be properly adapted during optimization. The absolute value function interferes least with the backpropagated gradient in the sense that it preserves the magnitude of the backpropagated signal and at most changes its sign. \subsection{Combining modeling and domain constraints} \label{sec:combine_constraints} Domain constraints are often formulated as unit box constraints, $\mathcal{B} \coloneqq \{x\in \mathbb{R}^d \vert -1 \leq x_i \leq 1\}$, such as a pixel domain for images. As indicated in Section~\ref{sec:double_description_method}, box constraints are particularly unfit to be converted using the double description method because the number of vertices is exponential in the dimension. Therefore, we distinguish \textit{modeling constraints} and \textit{domain constraints} and only convert the former into V-representation. Based on this representation, we obtain a point in the modeling constraint set, $x\in\mathcal{C}$. However, this point may not be in the unit box $\mathcal{B}$. To arrive at a point in the intersection $\mathcal{C} \cap \mathcal{B}$, we scale $x$ by its infinity norm if $x\notin \mathcal{B}$, $\hat x = x/\max\{\norm{x}_\infty, 1\}$. Indeed, $\hat x \in \mathcal{C} \cap \mathcal{B}$ since scaling by a positive constant remains in the cone, i.e., if $x\in \mathcal{C}$, then $\alpha x \in \mathcal{C} \;\forall \alpha \geq 0$ \subsection{Extension to general linear inequality constraints} \label{sec:extension} The proposed method takes advantage of the special structure of a polyhedral cone to efficiently combine modeling and domain constraints (Section~\ref{sec:combine_constraints}). If there is no need to enforce domain constraints, then modeling constraints of the form $Ax \leq b$ with $b\in \textrm{range}(A)$ can be solved with the outlined algorithm. Such constraints geometrically represent a polyhedral cone after translation, as for $Av = b$, one has $A(x-v) \leq 0$. However, the scaling approach to intersect with the unit box may not be employed here. General linear inequality constraints of the form $Ax \leq b$ without restrictions on $A$ and $b$ possibly require the conic and convex component of \eqref{eq:minkowski_weyl} for their V-representation. While the main approach of this paper may be used in this case, we observed slow convergence, which we ascribe to the simplex parameterization for the convex combination parameters. We used a softmax function $f(x)_i = \exp(x_i)/\sum_{j=1}^m \exp(x_j)$ to enforce the constraints $\lambda_i \geq 0, \sum_{i=1}^m \lambda_i = 1$ of the convex combination parameters in \eqref{eq:minkowski_weyl}. This function has vanishing gradients when one $x_i$ is significantly greater than the other vector entries. In this case, the softmax maps close to a vertex on the probability simplex. Furthermore, this most general setting does not allow for efficient incorporation of domain constraints, as this would require an efficient parameterization of the intersection of a general convex polyhedron and the unit box. \section{Numerical Results} We compare the proposed \textit{constraint parameterization} algorithm with an algorithm that trains without constraints, but requires a projection step at test time. We call this latter algorithm \textit{test time projection}. We analyze these algorithms in two different settings. In an initial experiment, we learn the orthogonal projection onto a constraint set to demonstrate properties of these algorithms. Here, the result can be compared to the optimal solution of the convex optimization problem. In a second experiment, consistent with our motivation to constrain the output of generative models, we apply these algorithms to a variational autoencoder. Finally, we evaluate the running time of inference for these problems and show that the proposed algorithm is significantly more efficient compared to the test time projection method. We used the MNIST dataset \cite{Mnist} for both experiments ($59000$ training samples, $1000$ validation, and $10000$ test samples). We chose PyTorch \cite{Paszke2017} for our implementation\footnote{Our implementation will be publicly available.} and all experiments were performed on a single Nvidia Titan X GPU. All networks were optimized with the Adam optimizer and we evaluated learning rates in the range $[10^{-5}, 10^{-3}]$. The initial learning rate was annealed by a factor of $1/2$ if progress on the validation loss stagnated for more than $5$ epochs. We used OSQP \cite{Stellato2017} as an efficient solver to compute orthogonal projections. Both experiments were performed with a checkerboard constraint with $16$ tiles, where neighboring tiles are constrained to be on average either below or above pixel domain midpoint. For a $[-1,1]$-pixel domain, the tiles' average intensity is positive or negative, respectively. The initial computational cost of converting these constraints into V-representation via the double description method is negligible (less than $1$s). We observed that it is numerically advantageous to activate unit box scaling after the constraint parameterization model was initially optimized only with modeling constraints for a specified number of epochs. \subsection{Orthogonal projection onto a constraint set} \label{sec:projection_experiment} We learn an orthogonal projection to demonstrate general properties of both algorithms. For given linear inequalities specified in H-representation, we solve the following problem: \begin{align} \label{eq:projection_experiment} &\min_{z\in \mathbb{R}^d} \norm{z - y}_2 \quad \mathrm{s.t.} \; Az \leq 0 \qquad , \end{align} where $y$ is an MNIST image. Here, the problem is convex; therefore, the global optimum can be readily computed and compared to the performance of the learning algorithms. In this setting, we can expect that training an unconstrained network with subsequent projection onto the constraint set at test time yields good results, which can be seen as follows. Let $\P_\mathcal{C}(y) \coloneqq \argmin_{z\in\mathcal{C}} \norm{z - y}_2$ be the orthogonal projection onto the constraint set $\mathcal{C}$ and denote the mean-squared error as $\L_y(x)\coloneqq \norm{x - y}_2$. Both mappings are Lipschitz continuous with Lipschitz constant $L=1$. Consequently, for an output $\hat y$ of an unconstrained model, \begin{align} \biggr\vert \L_y(\P_\mathcal{C}(\hat y)) - \L_y(\P_\mathcal{C}(y)) \biggr\vert &\leq \norm{\P_\mathcal{C}(\hat y) - \P_\mathcal{C}(y)}_2 \leq \norm{\hat y - y}_2 \;, \end{align} where, by definition, the term $\L_y(\P_\mathcal{C}(y))$ is the optimal value of problem \eqref{eq:projection_experiment}. The training algorithm fits $\hat y$ to $y$; therefore, projecting the unconstrained output $\hat y$ onto the constraint set will yield an objective value that is close to the optimal value of the constrained optimization problem. To have a comparable number of parameters for both methods, we use a single fully-connected layer in both cases. For the unconstrained model, we employ an $FC(784,784)$ layer, and for the constrained model we employ an $FC(784, n_r)$ layer with $n_r = 1552$ many rays to represent the constraint set in V-representation. Additionally, the constraint layer first applies a batch normalization operation \cite{Ioffe2015}. Both models were optimized with an initial learning rate of $10^{-4}$, which was annealed by a factor of $0.1$ if progress on the validation loss stagnated for more than $5$ epochs. The batch size was chosen to be $256$. The unit box constraints were activated after $25$ epochs. Additionally, the data for training the model with all constraints being active is shown. This mode eventually results in worse generalization. Figure~\ref{fig:convergence_mnist_projection} shows that the mean-squared validation objective for both algorithms converges close to the average optimum. The constraint parameterization method has a larger variance and optimality gap, which hints at the numerical difficulty of training the constrained network. To be precise, the best average validation error during training is within $9\%$ of the optimum for the constraint parameterization method and within $1\%$ of the optimum for the test time projection method. Figure~\ref{fig:samples_mnist_projection} shows a test set sample and the respective output of the learned models. \begin{figure}[H] \centering \resizebox{0.6\columnwidth}{!}{\input{projection_experiments.tikz}} \caption{Mean-squared validation loss averaged over all pixels for $10$ runs; shaded area denotes standard deviation. The objective function \eqref{eq:projection_experiment} is computed on a held-out validation set for the proposed constraint parameterization method and unconstrained optimization with subsequent test time projection. The average optimum over the validation set is obtained as a solution to a convex optimization problem. For the \textit{box delay} curve, the box constraints are activated after $25$ epochs (after $\sim 30$s), which results in better generalization. The best average validation error during training is within $9\%$ of the optimum for the constraint parameterization method with box constraint delay and within $1\%$ of the optimum for the test time projection method.} \label{fig:convergence_mnist_projection} \end{figure} \begin{figure}[H] \centering \begin{tabular}{cccc} \includegraphics[width=0.2\columnwidth]{upsampled_original.png}& \includegraphics[width=0.2\columnwidth]{upsampled_opt_projection.png}& \includegraphics[width=0.2\columnwidth]{upsampled_v_parameterization.png}& \includegraphics[width=0.2\columnwidth]{upsampled_trained_projection.png} \end{tabular} \caption{Learning to solve the orthogonal projection onto a constraint set as defined in \eqref{eq:projection_experiment}. From left to right: MNIST sample from a test set, optimal projection by solving a quadratic program, constraint parameterization model inference, and test time projection model inference.} \label{fig:samples_mnist_projection} \end{figure} \subsection{Constrained generative modeling with variational autoencoders} Variational autoencoders (VAE) are a class of generative models that are jointly trained to encode observations into latent variables via an encoder or inference network and decode observations from latent variables using a decoder or generative network~\cite{Kingma2014}. This model learns the joint distribution $p_\theta(x, z)$, where $x\in \mathcal{D}$ is the observed image data, $z$ is a latent variable, and $\theta$ are the generative network parameters. After optimizing these parameters, the model generates samples from the joint distribution via $p_\theta(x, z) = p_\theta(x \vert z) p_\theta(z)$ by assuming an isotropic Gaussian prior on the latent space, $z \sim \mathcal{N}(0, I)$, and a generative distribution $p_\theta(\cdot \vert z) \sim \mathcal{N}(f_\theta(z), I)$. The parameterized function $f_\theta(z)$ is expressed by a neural network (decoder or generative network). We assume a data conditional distribution $q_\lambda(\cdot \vert x) \sim \mathcal{N}(\mu_\lambda(x), \sigma_\lambda(x) I)$, which is parameterized by a neural network via parameters $\lambda$ (encoder or inference network). The model minimizes the Kullback-Leibler divergence between this approximation and the true posterior, $\KL{q_\lambda(\cdot \vert x)}{p_\theta(\cdot \vert x)}$, which is generally intractable. Thus, a VAE maximizes a variational lower bound (ELBO) \cite{Blei2017} as follows: \begin{align} \L_x(\theta, \lambda) &\coloneqq \mathbb{E}_{z \sim q_\lambda(\cdot \vert x)}[\log(p_\theta(x \vert z)]- \KL{q_\lambda(\cdot \vert x)}{p_\theta(\cdot)} \;. \end{align} We base our implementation on \cite{Baumgaertner2018}. The model has a fully-connected architecture: \begin{align} \textrm{encoder: } &FC(784, 256) - \textrm{ReLU} - FC(256, 2) \nonumber\\ \textrm{decoder: } &FC(2, 256) - \textrm{ReLU} - FC(256, 784) - \text{sigmoid} - \text{constraint} \nonumber \end{align} Here, $\textrm{ReLU}(x) = \max(0, x)$ and the sigmoid non-linearity takes the form $\sigma(x) = 1 / (1 + \exp(-x))$. In contrast to a standard VAE, we constrain the samples generated by the model to obey a checkerboard constraint. The model was optimized with an initial learning rate of $10^{-4}$, which was annealed by a factor of $0.1$ if progress on the validation loss stagnated for more than $5$ epochs. The batch size was chosen to be $64$. The model was trained for $200$ epochs while the unit box constraints were activated after $100$ epochs. To generate images, we sample the latent space prior $z~\sim~\mathcal{N}(0, I)$ and evaluate the decoding neural network (Figure~\ref{fig:constrained_vae_samples}). The model is able to sample authentic digits while obeying the checkerboard constraint. \begin{figure}[t!] \centering \begin{tabular}{ccccc} \rotatebox[origin=c]{90}{Projection\hspace{-2.5cm}} & \includegraphics[width=0.2\columnwidth]{upsampled_vae_0.png}& \includegraphics[width=0.2\columnwidth]{upsampled_vae_2.png}& \includegraphics[width=0.2\columnwidth]{upsampled_vae_1.png}& \includegraphics[width=0.2\columnwidth]{upsampled_vae_9.png} \\ \rotatebox[origin=c]{90}{Ours\hspace{-2.5cm}}& \includegraphics[width=0.2\columnwidth]{upsampled_cvae_0.png}& \includegraphics[width=0.2\columnwidth]{upsampled_cvae_2.png}& \includegraphics[width=0.2\columnwidth]{upsampled_cvae_1.png}& \includegraphics[width=0.2\columnwidth]{upsampled_cvae_9.png} \end{tabular} \caption{Samples from a constrained variational autoencoder trained with the test time projection method and our constraint parameterization method. The images represent authentic digits while satisfying the imposed checkerboard constraint. Inference is significantly faster using our method.} \label{fig:constrained_vae_samples} \end{figure} \subsection{Fast inference with constrained neural networks} The main advantage of the proposed method over a simple projection method is a vast speed-up at test time. Since the constraint is incorporated into the neural network architecture, a forward pass has almost no overhead compared to an unconstrained network. On the other hand, for a network that was trained without constraints, a final projection step is necessary; this requires solving a convex optimization problem, which is relatively costly. Table~\ref{tab:inference_times} shows inference times for both models for the above numerical experiments. The constraint parameterization approach is up to two orders of magnitude faster at test time compared to the test time projection algorithm. \begin{table} \caption{Inference time in milliseconds for test time projection and constraint parameterization methods. Mean and standard deviation of running times are computed over $100$ runs of $59000$ samples with a batch size of $256$.} \label{tab:inference_times} \centering \begin{tabular}{lcc} \toprule Method & \textrm{Orthogonal projection} & \textrm{Variational autoencoder}\\ \midrule Test time projection & $82 \pm 1$ s & $40 \pm 1$ s\\ Constraint parameterization (ours) & \bm{$\;\;0.46 \pm 0.02$} s & \bm{$\;\;0.75 \pm 0.04$} s \\ \bottomrule \end{tabular} \end{table} \section{Conclusion} To combine a data-driven task with modeling constraints, we have developed a method to impose homogeneous linear inequality constraints on neural network activations. At initialization, a suitable parameterization is computed and subsequently a standard variant of stochastic gradient descent is used to train the reparameterized network. In this way, we can efficiently guarantee that network activations -- in the final or any intermediate layer -- satisfy the constraints at any point during training. The main advantage of our method over simply projecting onto the feasible set after unconstrained training is a significant speed-up at test time up to two orders of magnitude. An important application of the proposed method is generative modeling with prior assumptions. Therefore, we demonstrated experimentally that the proposed method can be used successfully to constrain the output of a variational autoencoder. Our method is implemented as a layer, which is simple to combine with existing and novel neural network architectures in modern deep learning frameworks and is therefore readily available in practice. \subsubsection*{Acknowledgements} The authors would like to thank Thomas Möllenhoff and Gideon Dresdner for fruitful discussions and valuable feedback on the manuscript. This work was supported by an Nvidia Professorship Award, the TUM-IAS Carl von Linde and Rudolf M{\"o}{\ss}bauer Fellowships, the ERC Starting Grant \emph{Scan2CAD (804724)}, and the Gottfried Wilhelm Leibniz Prize Award of the DFG.
\section{Introduction} \label{sec:Intro} The direct observation of gravitational waves (GWs)\cite{LIGO detection 1,LIGO detection2,LIGO detection3,LIGO detection4} has opened up a new vista onto the universe. The Laser Interferometer Space Antenna~(LISA)~\cite{LISA 1,LISA 2,LISA 3,LISA 4,LISA 5}, which is likely to be launched in the early-to-mid 2030s, is expected to increase the variety of objects that will be observed in GWs. If the history of science is any indication, then it is not inconceivable that we will eventually observe GW systems that we did not think of before. Characterizing any GW source, however, benefits from the ability to map its space-time. A formalism that allows one to do so can, therefore, be useful. By making a few assumptions, Ryan~\cite{Ryan,Ryan2} showed that the waves emitted by a small compact body orbiting a much more massive compact object carry information about the Geroch-Hansen multipole moments of the latter~\cite{Geroch,Hansen}. These moments characterize the heavier object's vacuum spacetime geometry in what is termed as an extreme mass-ratio inspiral (EMRI) system. As an example, if the massive body is a black hole then the ``No-hair" theorem~\cite{no hair israel,no hair israel2,no hair wald,no hair carter,no hair Robinson} states that its exterior metric found by solving the Einstein-Maxwell equations of gravitation and electromagnetism in general relativity will be dependent only on mass, electric charge and angular momentum. Owing to this theorem, we expect the moments of black hole solutions to depend only on these parameters. For this reason, measuring the multipole moments from observations will help probe the validity of the No-hair theorem or constrain it. To pursue this goal of mapping the spacetime of the heavy object in the approximate center of EMRIs we will follow the formalism constructed by Ryan~\cite{Ryan}. In Sec.~\ref{sec:obs}, we will discuss it briefly since it will be useful in describing the properties of the central object and, therefore, test the theorem. Since Ryan's work in the late 1990s, it was realized that this formalism has an important limitation in the sense that the orbits studied there are not realistic for EMRIs. The orbits studied there were equatorial and circular, while the realistic orbits are expected to be eccentric and nonequatorial. Effects of self-force, tidal deformation and absorption of GW by the central object were also ignored. These drawbacks were partially addressed in Refs. \cite{Barack 2004, Glampedakis, ecentric orbit 1, ecentric orbit 2, ecentric orbit 3, ecentric orbit 4, Hughes 2001, Taracchini 2013, Pound 2008, Meent 2018, absorption, Tagoshi, Li}, which helped in the development of better waveforms. Owing to the system's extreme mass ratio, a way to generate realistic EMRI waveforms is to use black hole perturbation theory, governed by Teukolsky equation. Such calculations are computationally very expensive~\cite{Barack 2009, self-force}. To tackle this issue approximate waveforms, known as {\em kludge} waveforms, have been constructed~\cite{Babak 2007, Chua 2017}. These latter waveforms are not perfect either since they do not account for self-force. Most accurate EMRI waveforms can still be produced, however, with numerical evolution of the orbit. Unfortunately, they are computationally expensive to produce. This is a major reason why many such studies have resorted to using the kludges, with the latest such work being the one in Ref.~\cite{Gair 2017}. In this work, we study the viability of searching for the existence of horizon and tidal deformablity, and testing for the No-hair theorem, with LISA. Since the use of numerical waveforms for this purpose is computationally prohibitive at this stage, such an analysis should ideally be carried out at least with kludge waveforms, after extending them to account for the horizon term, the tidal deformability parameter, etc. However, before we do so, in a future work, we first conduct a viability test here for the measurement of the horizon term, the tidal deformability parameter, and the leading mass and spin multipole moments of the central objects in EMRIs, for it is not clear with any of the aforementioned waveform families how accurately they will be measurable in LISA. This is a first step in that regard, which we aim to improve in subsequent work with better waveforms. One of the effects that Ryan's formalism does not account for is matter tides. If the central object is not a black hole, its effect on the GW phasing can be non-negligible~\cite{Isoyama1,Isoyama2}. Li et al. \cite{Li} have included this effect in an extension of Ryan's formalism. A second effect not considered in that formalism is the absorption of gravitational waves by the central object if it happens to have a horizon. We study both these effects here. It will be shown how these can be used to figure out whether the central object has a horizon and, consequently, to test the No-hair theorem. A third important contribution absent in Ryan's work is the effect of radiation reaction. When the two objects in an EMRI are far apart, the GW luminosity is small, and this effect is not very prominent. Over time, however, it has a cumulative effect on the phase of the gravitational wave emitted by it. In this work, we did not account for this correction either. This is along the lines of the other simplifying assumptions we have made, e.g., by ignoring eccentricity, precession, etc., which we expect to be present in realistic EMRIs. In that sense, the present work should be considered as a first step towards the more complex goal of assessing how precisely parameters of astrophysically realistic EMRIs can be measured in LISA. In spite of this assumption, we feel that the current work serves a useful role since it provides some understanding for the first time of the observability of each of the first few multipoles. And the other important aspect is the formulation of the data analysis framework involving the horizon parameter, which brings us closer to probe the existence or absence of a horizon. \par In Sec.~\ref{sec:ryan} we briefly discuss Ryan's formalism. There we also describe tidal effects and give the expressions for the observables related to the vacuum multipole moments. We calculate the complete luminosity up to tenth power in the velocity of the orbiting companion $v$ under the point particle~(PP) approximation. This is followed in Secs.~\ref{sec:tides}-\ref{sec:Luminosity absorbed inside the horizon} by a presentation of the luminosity absorbed by the horizon in the case where the central object has one. Next, in Sec.~\ref{sec:mass dep. part} we discuss that contribution to the luminosity that depends only on the masses. In Sec.~\ref{sec:central motion} we discuss the terms in the luminosity that arise due to the central object's motion. Then in Sec.~\ref{sec:beyond ryan} after giving the complete expression of the phase evolution, we discuss how it can be used to probe for a horizon and also test the No-hair theorem. In Sec.~\ref{sec:paramestim}, we present estimates of some parameter errors for a exploratory set of EMRIs. We use the Fisher information matrix for this purpose. Such a method has been used in the past for estimating a few of the parameters of EMRIs in LISA (e.g., sky position, total mass, mass ratio, eccentricity, and the spin of the central object~\cite{Gair 2017, Barack 2004,Seoane 2013,Seoane 2017,Babak 2014,Seoane 2015}). We extend that list to include additional parameters, such as a few of the low-order mass and spin moments, the horizon term and the tidal deformability parameter of the central object. We note that the Fisher estimation method has well known limitations: Importantly, our error estimates should be considered only for loud signals and under the simplifying assumptions listed above. We leave more sophisticated parameter estimation studies using Bayesian methods for the future when some of the assumptions about the system can be dropped in order to make the system more realistic. Throughout this work we have used $G=1=c$. \section{EMRI Observables} \label{sec:obs} In Ref.~\cite{Ryan} Ryan showed how the multipole moments of the central object can be extracted from the gravitational waves emitted by an EMRI. He showed that certain functions, discussed below, are ``good" observables for this purpose. One such quantity is the gravitational-wave spectrum ${\Delta}E(f)$, which is defined as \begin{align} \label{spectrum}\Delta E \equiv& - \Omega \frac{dE_{\rm source}}{d\Omega}\,, \end{align} where $E_{\rm source}$ is the energy of the binary system and $\Omega$ is the orbital frequency defined as, \begin{equation} \Omega = \frac{d\phi}{dt} = \frac{d\phi}{d\tau}\frac{d\tau}{dt}, \end{equation} where, $\tau$ is the proper time along the geodesic. Another observable quantity is the phase evolution, which we will define as the rate of change of the primary wave frequency with time. The following dimensionless wave observable quantifies it~\cite{Ryan}: \begin{align} \label{N}\Delta N(f) \equiv& \frac{f^2}{df/dt} = \frac{f \Delta E(f)}{-dE_{\rm Total}/dt}\,, \end{align} where $f$ is the GW frequency, and is related to the orbital frequency as $f = 2\Omega$. Moreover, $-dE_{\rm Total}/dt$ is the total emitted luminosity from the system in the form of GWs; the minus sign represents this {\it loss} of energy from the orbit. In addition to $\Delta N$, we will be interested in studying the waveform phase $(\psi)$, which is related to the former as follows \cite{Flanagan,phase expression}: \begin{equation} \begin{split} \psi(f) = 2\pi f t_c - 2\phi_c-\frac{\pi}{4} + 6\int^v_{v_i} d\bar{v} (v^3-\bar{v}^3) \frac{\pi\Delta N}{\bar{v}^4}\,, \end{split} \end{equation} where $v$ is the orbital velocity of the smaller body, $\bar{v}$ is an integral variable for velocity, $v_i$ is some initial reference point for velocity and $M$ is the total mass of the system. $t_c = t(v_i)$ and $\phi_c = \phi(v_i)$ \cite{Poisson 1995}. For orbits that are slightly elliptical and slightly inclined to the equatorial plane, there are two other observables in the form of precession frequencies. Owing to the near-axisymmetry of an EMRI, we employ the cylindrical co-ordinate system to describe them, with $\rho$ as the radial co-ordinate and $z$ as the axial co-ordinate. Then one of the frequencies is related to the rate at which $\rho$ changes and the other to the rate at which $z$ changes~\cite{Ryan}: \begin{widetext} \begin{equation} \begin{split} \Omega_{\alpha}=&\,\, {\Omega}-\bigg\{-{\frac{g^{\alpha\alpha}}{2}}\big[(g_{tt}+{\Omega}g_{t\phi})^2\bigg(\frac{g_{\phi\phi}}{{\rho}^2}\bigg)_{,{\alpha\alpha}}-2(g_{tt}+{\Omega}g_{t\phi})(g_{t\phi}+{\Omega}g_{\phi\phi})(\frac{g_{t\phi}}{{\rho}^2})_{,\alpha\alpha}+(g_{t\phi}+{\Omega}g_{\phi\phi})^2(\frac{g_{tt}}{{\rho}^2})_{,\alpha\alpha}\big]\bigg\}^{\frac{1}{2}}\,, \end{split} \end{equation} \end{widetext} where $\alpha = \rho$ and $z$, respectively, for the two cases, and there is no sum over $\alpha$ on the right-hand side (RHS). Since we will include the effect of tidal interaction, we will examine, in particular, how any of these observables gets modified by its presence and how one can extract multipole information from them. The precession frequencies depend on the possibly complex orbit and its orientation. Tides are related to the deformation of the inspiraling bodies and, thus, to first order will not affect the precession frequencies ~\cite{Li}. Then remains the phase evolution. As there are tidal corrections to the luminosity, we can anticipate that $\Delta N$ will be affected by tidal deformation, when present, even if at higher orders of $v$. \section{Ryan's Formalism} \label{sec:ryan} Since our aim is to generalize the multipole formalism for EMRIs in Ref.~\cite{Ryan}, we begin by briefly summarizing it. \label{Assumptions}\subsection{Assumptions} The assumptions of the formalism are: \par (i) The central body of the system has a vacuum, external gravitational field that is stationary, axisymmetric, reflection symmetric across the equatorial plane of the central object, and asymptotically flat (SAVAR). In the $(t,{\rho},{\phi},z)$ co-ordinate system the metric takes the form~\cite{Ryan}, \begin{align} \label{metric}ds^2 = -F(dt - {\omega}{d\phi})^2 + {\frac{1}{F}}[e^{2\gamma}({d\rho}^2+{dz}^2)+{\rho}^2{d\phi}^2]\,, \end{align} where $F$ and $\omega$ can, in general, depend on $\rho$ and $z$. \par (ii) The companion compact object of mass $m$ inspirals around the central much heavier compact object of mass $M \gg m$. Consequently, small perturbations of the central object's vacuum metric will not induce any significant change. Owing to this assumption it is possible to treat the inspiraling object as a ``test particle", which has an orbit evolving slowly and adiabatically from one geodesic orbit to another. So, on the time scale of the orbital period it can be approximated as a geodesic.\\ \par (iii) The geodesic orbits through which the inspiral evolves are almost circular. In general, they can be slightly elliptical and will lie mostly in the equatorial plane.\\ \par (iv) The central object does not absorb any energy so all the energy is emitted to infinity. (Ryan did not account for the absorption by a horizon that the central object may have.) Also, tidal effect has been neglected completely. We will try to relax these assumptions as much as possible in later sections. The parameter space of EMRIs, however, contains additional parameters that we will neglect for simplicity \cite{Barack 2004}. Another crucial point to note is that the event rate of high-eccentricity EMRIs is much larger than that of low-eccentricity ones~\cite{ecentric orbit 1, ecentric orbit 2, ecentric orbit 3, ecentric orbit 4}. High eccentricity EMRIs spend enough cycles inside the band of eLISA to be detectable~\cite{ecentric orbit 1, ecentric orbit 4}. Therefore circular orbit EMRIs are not realistic. Since the velocity of the small mass can be highly relativistic, PN expansion is not adequate either. We hope to return to those aspects in a later work, and limit our scope here to discuss for the simple EMRI systems absorption by the horizon and the signature of the multipole moments in GWs. For this reason, the results on parameter estimates obtained in the present work can be considered as ``indicative". \subsection{Procedure and results} \label{subsec:Procedure and results} Owing to the assumptions described in the previous section, the space-time mapping problem becomes easier to address. Assumption (i) limits the metric around the massive body to be a SAVAR metric. Due to the symmetries, the metric is independent of $t$ and $\phi$, thereby, implying the existence of two conserved quantities, namely, energy $E$ and angular momentum $L_{z}$~\cite{Ryan}: \begin{align} \label{E}\frac{E}{m} = - g_{tt}\bigg(\frac{dt}{d\tau}\bigg) - g_{t\phi}\bigg(\frac{d\phi}{d\tau}\bigg)\,, \end{align} \begin{align} \label{L}\frac{L_{z}}{m} = g_{t\phi}\bigg(\frac{dt}{d\tau}\bigg) + g_{\phi\phi}\bigg(\frac{d\phi}{d\tau}\bigg)\,, \end{align} where $m$ is the mass of the lighter orbiting object, and $\tau$ is the proper time along its geodesic. $M$ will denote the mass of the heavy central object, The rotational frequency $\Omega$ of a circular orbit can be expressed as, \begin{align} \label{Circular frequency}\Omega = \frac{d\phi}{dt} = \frac{-g_{t{\phi},\rho} + \sqrt{(g_{t{\phi},\rho})^2 - g_{tt,\rho}g_{\phi\phi{,}\rho}}}{g_{\phi\phi{,}\rho}}. \end{align} From the normalization equation of the four velocity, and using Eqs.~(\ref{L}) and (\ref{E}) one finds, \begin{align} \label{time velocity}\frac{dt}{d\tau} = \frac{1}{\sqrt[]{ -g_{tt}- {\Omega}^2 g_{\phi\phi} - 2{\Omega}g_{t\phi}}}. \end{align} Substituting the last two expressions in the energy and angular momentum equations, Eqs.~(\ref{E}) and (\ref{L}), respectively, one obtains \begin{align} \label{E2}\frac{E}{m} = \frac{- g_{tt} -{\Omega}g_{t\phi}}{\sqrt{- g_{tt} - 2g_{t\phi}{\Omega}- g_{\phi\phi}{\Omega}^2}}\,, \end{align} \begin{align}\ \label{L2}\frac{L_{z}}{m} = \frac{g_{t\phi} +{\Omega}g_{\phi\phi}}{\sqrt{- g_{tt} - 2g_{t\phi}{\Omega}- g_{\phi\phi}{\Omega}^2}}. \end{align} Using the above equations, the Ernst potential formalism and the results from Ref.~\cite{fodor}, Ryan found the expressions of the aforementioned wave observables to be~\cite{Ryan} \begin{widetext} \begin{equation} \begin{split} \label{delta E}\frac{\Delta E }{m}=&\frac{v^2}{3}-\frac{v^4}{2} +\frac{20 S_1 v^5}{9 M^2}+ \left(\frac{M_2}{M^3}-\frac{27}{8}\right) v^6+\frac{28 S_1 v^7}{3 M^2}+v^8 \left(\frac{80 S_1^2}{27 M^4}+\frac{70 M_2}{9 M^3}-\frac{225}{16}\right)+...\,, \end{split} \end{equation} \begin{align} \label{frequency 1}\frac{\Omega_{\rho}}{\Omega} &= 3v^2 - 4\frac{S_1}{M^2} v^3 + \bigg(\frac{9}{2} - \frac{3}{2} \frac{M_2}{M^3}\bigg)v^4 - 10\frac{S_1}{M^2} v^5 + \bigg(\frac{27}{2} - 2\frac{S_1^2}{M^4} - \frac{21}{2}\frac{M_2}{M^3}\bigg)v^6+ ...\,, \end{align} \begin{align} \label{frequency 2}\frac{\Omega_z}{\Omega} &= 2\frac{S_1}{M^2} v^3 + \frac{3}{2}\frac{M_2}{M^3}v^4 + \bigg(7\frac{S_1^2}{M^4} + 3\frac{M_2}{M^3}\bigg)v^6 + \bigg(11\frac{S_1 M_2}{M^5} - 6\frac{S_3}{M^4}\bigg)v^7+ ...\,, \end{align} \end{widetext} where $v$ is the orbital velocity of the lighter companion about the center of mass and $S_l$ and $M_l$ are respectively the current and the mass multipole moments defined by Hansen~\cite{Hansen} and Geroch~\cite{Geroch}. The symbol $M$ denotes a mass parameter. However, confusion with mass multipole moment $M_l$ can be avoided by noting that the latter has a subscript but the former does not. This is how Ryan achieved the goal of expressing the observables in terms of the central object's multipole moments. To calculate the phase evolution it is important to know the luminosity of the system, which we discuss later. \section{Matter tides} \label{sec:tides} \subsection{Result of tidal effect on a compact star} In the last section we discussed how Ryan derived the expressions for certain GW observables, under a set of assumptions. But due to assumption (iv), tidal interaction was neglected in his formalism. In this section we discuss how it can be included and what changes it brings about in the observables. \par Let us take $m_1$ and $m_2$ to be the masses of the inspiraling compact objects. Also, let $\Omega$ be the orbital angular frequency and $\mu_r$ the reduced mass of the system. Then \begin{align} \eta = \frac{m_1 m_2}{M_{T}^2} = \frac{\mu_r}{M_T},\,\,\,\,M_T = m_1 + m_2, \end{align} are the symmetrized mass-ratio and the total mass of the binary, respectively. Flanagan and Hinderer~\cite{Flanagan} calculated the energy in gravitational waves associated with tidal effects and the contribution to the rate of change of energy due to them. To set the stage for our calculations, we begin by discussing their results first. They took the effective action of the inspiraling system and an associated quadrupole moment coupled with orbits through a tidal field. From its solution, they calculated the induced quadrupole moment. To more precisely point out the physical arguments it is useful to start with the action they considered. Suppose the relative separation of the two objects is $x^i = (\rho \cos\Phi , \rho \sin\Phi , 0) = \rho \,n^i$. Let $Q^{(n)}_{1ij}$ be the quadrupolar deformation of the first object caused by the tidal field $\mathscr{E}_{2ij} = -m_2 \partial_i \partial_j(1/\rho)$ of the second object. Here we limit ourselves to the $l = 2$ order, and with $n$ radial nodes. Then, $Q_{1ij} = \sum_n Q^{(n)}_{1ij}$ and the tidal deformability of the first object, $\lambda_1 = \sum_n \lambda_{1,n}$. Under these conditions the action for the system is~\cite{Flanagan} \begin{widetext} \begin{equation} \begin{split} S = \int dt \bigg[\frac{1}{2}\mu_r \dot{\rho}^2 + \frac{1}{2}\mu_r {\rho}^2 \dot{\Phi}^2 + \frac{M_T\mu_r}{\rho}\bigg] - \{\frac{1}{2}\int dt \, Q_{1ij} \,\mathscr{E}_{2ij} - \sum_n \int dt \frac{1}{4\lambda_{1,n} \omega_n^2} \bigg[\dot{Q}^{(n)}_{1ij} \dot{Q}^{(n)}_{1ij} - \omega_n^2Q^{(n)}_{1ij} Q^{(n)}_{1ij}\bigg] + 1\leftrightarrow2 \,\}. \end{split} \end{equation} \end{widetext} If the Burke-Thorne GW dissipation contribution~\cite{Maggiore} is ignored then the ensuing equations of motion for the first object are \begin{align} \label{orbit eqn}\ddot{x}^i + \frac{M_T}{\rho^2}n^i = \frac{m_2}{2\mu_r}Q_{1jk}\partial_i\partial_j\partial_k\frac{1}{\rho},\\ \label{quadrupole eqn}\ddot{Q}^{(n)}_{1ij} + \omega_n^2 Q^{(n)}_{1ij} = m_2\lambda_{1,n}~\omega_n^2\partial_i\partial_j\frac{1}{\rho}\,, \end{align} where $x^i$ are its spatial coordinates. These equations have equilibrium solutions with $\rho$ as constant and $\Phi = \Phi_0 + \omega t$. The second object's equations of motion can be calculated similarly. By accounting for the contributions from both of the bodies, Flanagan et al. obtained the expression for the orbital radius, the energy of the binary and the GW luminosity. The results we will use for the energy and luminosity are~\cite{Hinderer}: \begin{align} E_{\rm Tidal}(v) &= {\frac{9}{2}}\frac{\eta v^{12}}{M^4{_T}} \bigg[{\frac{m_1}{m_2}}{\lambda}_{2}+ 1\leftrightarrow2\bigg]\\ \frac{dE}{dt}\bigg{|}_{\rm Tidal}(v) &=- {\frac{32}{5}}{\eta}^2\frac{v^{20}}{M_{T}^5}6\bigg[\frac{m_1 + 3m_2}{m_1}{\lambda}_{1}+1\leftrightarrow 2\bigg], \end{align} where $v^2 = \{\Omega(m_1+m_2)\}^{2/3}$. For our purpose we will denote the parameters of the more massive, central object with the index $M$ and those of the second object with the index $m$. In other words, replacing the indices 1 and 2 with $M$ and $m$, respectively, the above equations become: \begin{align} \label{tidal energy} E_{\rm Tidal}(v) &= {\frac{9}{2}}\frac{\eta v^{12}}{M^4{_T}} \bigg[{\frac{M}{m}}{\lambda}_{m}+{\frac{m}{M}}{\lambda}_{M}\bigg], \end{align} \begin{equation} \begin{split} \label{tidal energy rate}\frac{dE}{dt}\bigg{|}_{\rm Tidal}(v) &=- {\frac{32}{5}}{\eta}^2\frac{v^{20}}{M_{T}^5}6\bigg[\frac{m + 3M}{m}{\lambda}_{m}\\ &+\frac{M + 3m}{M}{\lambda}_{M}\bigg]\\ &=-\frac{32}{5}\frac{m^2}{M^2} Av^{20}, \end{split} \end{equation} where in the limit of the extreme-mass ratio, $v^2 = (M \Omega)^{\frac{2}{3}}$, $A = \frac{M^2}{m^2}\frac{6{\eta}^2}{M_T^5}\big\{\frac{m + 3M}{m}{\lambda}_{m}+\frac{M + 3m}{M}{\lambda}_{M}\big\}$ and $M_T = M$. It straightforwardly follows from the above that \begin{equation} \begin{split} \label{Tidal Delta E}\Delta E &=-18\frac{\eta v^{12}}{M^4} \bigg[{\frac{M}{m}}{\lambda}_{m}+{\frac{m}{M}}{\lambda}_{M}\bigg]\\ &= Xv^{12}, \end{split} \end{equation} where, $X=-18\frac{\eta }{M^4} \big\{{\frac{M}{m}}{\lambda}_{m}+{\frac{m}{M}}{\lambda}_{M}\big\}$. When applying the above result, one must note that the tidal Love number of a black hole is zero~\cite{TLN of BH 1,TLN of BH 2,tidal perturbation of sc bh,TLN of BH 3,TLN of BH 4,TLN of BH 5}. We replace $\lambda_M$ and $\lambda_m$ with $\lambda_M/M^5 = \Lambda_M$ and $\lambda_m/m^5 = \Lambda_m$, where $\Lambda_m$ and $\Lambda_M$ are the dimensionless tidal deformability. Higher order contributions due to tidal interactions, including those beyond Ref.~\cite{Flanagan}, have been calculated by Damour et al.~\cite{Damour}, but for the mass-dependent tidal field alone. However, the tidal field depends on the multipolar structure of the source. Contributions from higher order multipoles were not considered in their work. Since the tidal corrections obtained in Flanagan et al.~\cite{Flanagan} are at the lowest order, it is consistent to use their results for our multipolar study. \newline \subsection{Black hole as central massive object} In the previous section we discussed how the tidal perturbation of a compact star contributes to the GW emission of a binary. Since a black hole has a vanishing tidal Love number the tidal terms there will not contribute to GWs emitted by an EMRI constituted of black holes. But there could still be induced quadrupole moment in the case of a black hole~\cite{tidal perturbation of sc bh}. We expect that the tidal distortion of the central black hole, due to its companion, will contribute at very high orders in the GWs. To justify our point, here we look into the tidal contribution if the central object is a Schwarzschild black hole. For this only the Newtonian tidal interaction has been considered. The result has been derived by Li et al.~\cite{tidal perturbation of sc bh},~\cite{Li}: \begin{align} &I_{ij}^{\rm induced} = \frac{32}{45} M^6 \dot{\mathscr{E}}_{ij}^{\rm external},\\ &\mathscr{E}_{ij}^{\rm external} = \frac{m}{\rho^3} (\delta_{ij} - n_i n_j),\,\,\,\, {\rm where}\\ &n_1 = \cos(\Omega t), \,\,\,\,\, n_2 = \sin(\Omega t), \,\,\,\,\, n_3 = 0. \end{align} Using this induced quadrupole moment $(I^{\rm induced}_{ij})$ in the multipole formula of radiation luminosity, Eq.~(\ref{time avg}), we find \begin{align} -\frac{dE}{dt} = \frac{131072}{10125} \frac{m^2 M^4}{\rho^6} v^{24}. \end{align} Since $\frac{1}{\rho^6} = \frac{v^{12}}{M^6} $, the luminosity simplifies to \begin{align} -\frac{dE}{dt} = \frac{131072}{10125} \frac{m^2}{M^2} v^{36}. \end{align} So, we can see that the tidal distortion of a black hole due to the Newtonian potential of the companion occurs at higher order. For that reason we do not consider this tidal distortion any further in this paper. \section{Complete Point Particle result through $v^{10}$} \label{sec:PP result} In Sec.~\ref{sec:tides} we discussed the tidal contribution and how it can be included in Ryan's formalism. Here we will discuss how we can find the expression for the phase evolution $\Delta N$. From Eq.~(\ref{N}) we can see that to find $\Delta N$ we first obtain the GW luminosity emitted by the inspiraling system. The gravitational wave luminosity can be determined by calculating symmetric trace free (STF) moments ~\cite{Thorne} of the system. For the central body's Geroch-Hansen moments we use $M_l$ and $S_l$, and for the radiative moments of the complete system we use $I_L$ and $J_L$. Here $L$ is a shorthand for $b_1...b_l$, where $b_k$ is a spatial index, and $k$ and $l$ are positive integers. In terms of these moments the radiated luminosity becomes~\cite{Thorne}, \begin{widetext} \begin{equation} \begin{split} \label{time avg}-\frac{dE}{dt} = &{\sum_{l=2}^{\infty}}\frac{(l+1)(l+2)}{l(l-1)}\frac{1}{l!(2l+1)!!}\langle{I_{L}^{(l+1)}I_{L}^{(l+1)}}\rangle + {\sum_{l=2}^{\infty}}\frac{4l(l+2)}{(l-1)}\frac{1}{(l+1)!(2l+1)!!}\langle{J_{L}^{(l+1)}J_{L}^{(l+1)}}\rangle \,, \end{split} \end{equation} \end{widetext} where the angular brackets indicate average over time and the parenthetic number in the superscript of a quantity denotes the number of times its time-derivative is taken, before the averaging. In this notation the moments of the whole system are~\cite{Thorne}, \begin{align} I_{L}(t) &= \bigg[\int {d^3}y {\tilde{\rho}}(y,t)y_L\bigg]^{\rm{STF}}\\ J_{L}(t) &= \bigg[\int {d^3}y {\tilde{\rho}}(y,t)y_{L-1}{\epsilon}_{{b_l}km}y_{k}u_{m}\bigg]^{\rm{STF}}\,, \end{align} where $\tilde{\rho}$ is the mass density of the system and $y_L = y_{b_1}y_{b_2}...y_{b_l}$, with $y_{b_l}$ being spatial coordinate. The leading order contribution comes from mass quadrupole radiative moment $I_{ij}$. This loss of luminosity can be written as, \begin{align} \label{massquadrupole}-\frac{dE}{dt}\bigg{|}_{I_{ij}} = \frac{32}{5}{m}^2{\rho}^4{\Omega}^6\,. \end{align} We consider the contribution in luminosity due to higher order radiative moments too. The results are: \begin{align} \label{massoctopole}-\frac{dE}{dt}\bigg{|}_{I_{ijk}} = \frac{2734}{315}{m}^2{\rho}^6{\Omega}^8\,, \end{align} \begin{align} \label{currentquadrupole1}-\frac{dE}{dt}\bigg{|}_{J_{ij}} = \frac{8}{45}{m}^2{\rho}^6{\Omega}^8\,, \end{align} \begin{align} \label{currentquadrupole2}-\frac{dE}{dt}\bigg{|}_{I_{ijkl}} = \frac{57376}{3969}{m}^2{\rho}^8{\Omega}^{10}\,, \end{align} \begin{align} \label{currentquadrupole3}-\frac{dE}{dt}\bigg{|}_{I_{ijklm}} = \frac{4010276}{155925}{m}^2{\rho}^{10}{\Omega}^{12}\,, \end{align} \begin{align} \label{currentquadrupole4}-\frac{dE}{dt}\bigg{|}_{J_{ijk}} = \frac{32}{63}{m}^2{\rho}^8{\Omega}^{10}\,, \end{align} \begin{align} \label{currentquadrupole5}-\frac{dE}{dt}\bigg{|}_{J_{ijkl}} = \frac{11482}{11025}{m}^2{\rho}^{10}{\Omega}^{12}\,. \end{align} We know that as time evolves the system spirals in and its rotation frequency changes. Therefore, the change in that frequency should be related to the change in the orbital radius. The expression for the evolving radius, after accounting for each Geroch-Hansen multipole moment, was obtained by Ryan~\cite{Ryan}: \begin{widetext} \begin{align} \label{radius mass multipole}\rho =& Mv^{-2} \bigg(1 + {\sum_{l=2,4...}}\frac{(-1)^{l/2} (l+1)!!\,\, M_{l}\,\, v^{2l}}{3\,\,\,\,l!!\,\, M^{l+1}}- {\sum_{l=1,3,...}}\frac{2(-1)^{(l-1)/2}\,\, l!!\,\, S_{l}\,\, v^{2l+1}}{3\,\,\,\,(l-1)!!\,\, M^{l+1}}\bigg). \end{align} \end{widetext} Using it in Eq.~(\ref{massquadrupole}) Ryan~\cite{Ryan} found, \begin{widetext} \begin{equation} \begin{split} -\frac{dE}{dt}\bigg{|}_{I_{ij}} = \frac{32}{5}\bigg(\frac{m}{M}\bigg)^{2} v^{10}\bigg(1 &+ {\sum_{l=2,4...}}\frac{(-1)^{l/2}\,\, (l+1)!!\,\, M_{l}\,\, v^{2l}}{3\,\,\,\,l!!\,\,M^{l+1}} - {\sum_{l=1,3,...}}\frac{2(-1)^{(l-1)/2}\,\, l!!\,\, S_{l}\,\, v^{2l+1}}{3\,\,\,\,(l-1)!!\,\, M^{l+1}}\bigg)^4. \end{split} \end{equation} \end{widetext} He further mentioned that to test the No-hair theorem it is enough to know the series up to $v^4$, while retaining only the dominant contribution from each multipole moment. But in our case, unlike Ryan, we are considering the effect of tidal distortion as well as absorption by the central object. As we have seen, the tidal contribution comes in at an order as high as $v^{10}$. Thus, to separate out the tidal effect completely and still test the No-hair theorem, one needs knowledge of terms completely up to $v^{10}$. The result we find is: \begin{widetext} \begin{equation} \label{quadrupolar luminosity with H.O.} \begin{split} -\frac{dE}{dt}\bigg{|}_{I_{ij}} = \frac{32}{5}\bigg(\frac{m}{M}\bigg)^{2} v^{10}\bigg(1 &+ {\sum_{l=2,4...}}\frac{4(-1)^{l/2}\,\, (l+1)!!\,\, M_{l}\,\, v^{2l}}{3\,\,\,\,l!!\,\,M^{l+1}} - {\sum_{l=1,3,...}}\frac{8(-1)^{(l-1)/2}\,\, l!!\,\, S_{l}\,\, v^{2l+1}}{3\,\,\,\,(l-1)!!\,\, M^{l+1}} + {\rm H.O.}\bigg)\,, \end{split} \end{equation} \end{widetext} where H.O. represents higher order terms of the binomial expansion of $\rho$ in Eq.~(\ref{quadrupolar luminosity with H.O.}). As we only need terms up to the tenth power in $v$, we will only take those pieces of H.O. that contribute up to that order; to that extent we find: \begin{widetext} \begin{equation} \begin{split} {\rm H.O.} =& +\frac{8 S_1^2 v^6}{3 M^4}+\frac{4 M_2 S_1 v^7}{M^5}+\frac{3 M_2^2 v^8}{2 M^6} -\frac{32 S_1^3 v^9}{27 M^6}-v^{10} \left(\frac{8 M_2 S_1^2}{3 M^7}+\frac{8 S_3 S_1}{M^6}\right). \end{split} \end{equation} \end{widetext} We also calculated the contributions from $I_{ijk}$, $J_{ij}$, $I_{ijkl}$, $J_{ijk}$, $I_{ijklm}$ and $J_{ijkl}$. The ones from $I_{ijk}$ and $J_{ij}$ are \begin{widetext} \begin{equation} \begin{split} -\frac{dE}{dt}\bigg{|}_{I_{ijk} \& J_{ij}} =& \frac{62}{7} \bigg(\frac{m}{M}\bigg)^{2} v^{12}\bigg(1 + {\sum_{l=2,4...}}\frac{(-1)^{l/2} (l+1)!! M_{l} v^{2l}}{3\,\,\,\,l!!M^{l+1}}- {\sum_{l=1,3,...}}\frac{2(-1)^{(l-1)/2} l!! S_{l} v^{2l+1}}{3\,\,\,\,(l-1)!! M^{l+1}}\bigg)^6\\ =& \frac{62}{7} \bigg(\frac{m}{M}\bigg)^{2} v^{12}\bigg[1-\frac{4 S_1 v^3}{M^2}-\frac{3 M_2 v^4}{M^3}+\frac{20 S_1^2 v^6}{3 M^4} +v^7 \left(\frac{10 M_2 S_1}{M^5}+\frac{6 S_3}{M^4}\right)+\left(\frac{15 M_2^2}{4 M^6}+\frac{15 M_4}{4 M^5}\right) v^8\bigg]. \end{split} \end{equation} Those from $I_{ijkl}$ and $J_{ijk}$ are \begin{equation} -\frac{dE}{dt}\bigg{|}_{I_{ijkl} \& J_{ijk}} = \frac{59392}{3969} \bigg(\frac{m}{M}\bigg)^{2} v^{14}\bigg(\frac{112 S_1^2 v^6}{9 M^4}-\frac{4 M_2 v^4}{M^3}-\frac{16 S_1 v^3}{3 M^2}+1\bigg). \end{equation} Finally, the ones from $I_{jklmn}$ and $J_{ijkl}$ are: \begin{equation} \begin{split} -\frac{dE}{dt}\bigg{|}_{I_{ijklm} \& J_{ijkl}} =& \frac{1168346}{43659} \bigg(\frac{m}{M}\bigg)^{2} v^{16}\bigg(1-\frac{20 S_1 v^3}{3 M^2}-\frac{5 M_2 v^4}{M^3}+\frac{20 S_1^2 v^6}{M^4}+\frac{10 v^7 \left(3 M_2 S_1+M S_3\right)}{M^5}\bigg)\,. \end{split} \end{equation} \end{widetext} Since we are considering only the first-order contribution of tidal deformability, we limit the expansion of $\Delta N$ to the fifth power of $v$. This is why we need to know the expression of luminosity only up to the twentieth power of $v$, as can be inferred from its relation with $\Delta N$, as given in Eq.~(\ref{N}). But in some cases, as we have calculated the expressions beyond that order, we are showing those expansions here. In Sec.~\ref{sec:beyond ryan}, these luminosity contributions will be used to find higher order corrections in the expression of phase evolution, beyond what was found by Ryan~\cite{Ryan}. \section{Luminosity absorbed by the horizon} \label{sec:Luminosity absorbed inside the horizon} A complex situation arises when we focus our attention on the GW energy absorbed by the central object when it has a horizon. It is well known that the Teukolsky equation~\cite{Teukolsky,Chandra} can be used to understand the perturbative solutions of the metric. For absorption we study the ingoing solution. The absorbed luminosity can be calculated from there. But the whole problem depends on two things: (a) the central object's vacuum spacetime and (b) the perturbation equation and its solution for that metric. If we knew all possible SAVAR metric solutions, then by solving for the absorption in each one we can identify the effect in those spacetimes. So, in principle, we have to know all such metrics and their contributions. But we can not do that at present because (a) we can not claim that we know all the metric solutions at the present time and (b) for the solutions that are known these results have not been completely worked out. Here we will address the problem in a different manner. The approach we take is heuristic, which needs further and detailed investigation. But as a first step, this is the best we can do. Tagoshi et al.~\cite{absorption} have calculated the luminosity absorbed by the Kerr black hole. We know that all Geroch-Hansen multipole moments that are non-zero for a general axisymmetric solution are non-zero for Kerr~\cite{Hansen}. We also know that the moments of Kerr depend only on mass and the rotation parameter through $M_l +iS_l = M(ia)^l$~\cite{Hansen}. With this result in hand we can express the luminosity absorbed by a Kerr black hole completely in terms of its multipole moments. To implement this idea we introduce a contribution $-(dE/dt)_H$ to the total luminosity lost from the orbit~\cite{absorption,Tagoshi}: \begin{widetext} \begin{equation} \label{Horizon luminosity} \begin{split} -\Bigg(\frac{dE}{dt}\Bigg)_{H} &= \frac{32}{5} \Bigg(\frac{m}{M}\Bigg)^2 v^{15} H \Bigg[-\frac{\chi}{4} - \frac{3\chi^3}{4} -\bigg(\chi + \frac{33}{16}\chi^3\bigg)v^2+ \bigg(2\chi B_2 + \frac{1}{2} + \frac{13}{2}\kappa \chi^2 + \frac{35}{6}\chi^2 - \frac{\chi^4}{4} + \frac{\kappa}{2} + 3\chi^4 \kappa + 6\chi^3 B_2\bigg)v^3\\ &+ \bigg(-\frac{43}{7}\chi -\frac{17}{56}\chi^5 - \frac{4651}{336}\chi^3\bigg)v^4 + \bigg(\frac{433}{24}\chi^2 - \frac{95}{24}\chi^4 + 2 - \frac{3}{4}\chi^3B_1+ 2\kappa + \frac{33}{4}\chi^4 \kappa + 6\chi B_2 + 18\chi^3B_2 + \frac{163}{8} \chi^2\kappa\\ &+ \chi B_1\bigg)v^5 + O(v^6)\Bigg], \end{split} \end{equation} \end{widetext} \begin{align} B_n = \frac{1}{2i} \Bigg[{\psi}^{(0)} \bigg(3 + \frac{ni\chi}{\sqrt{1 - \chi^2}}\bigg) - {\psi}^{(0)} \bigg(3 - \frac{ni\chi}{\sqrt{1 - \chi^2}}\bigg) \Bigg], \end{align} where $H$ is a ``horizon'' parameter, $\chi = \frac{a}{M}$, $\kappa = \sqrt{1-\chi^2}$ and $\psi^{(n)}(z)$ is the polygamma function. The above luminosity term contributes to the total luminosity when the central object has a horizon; in that case $H=1$. When there is no horizon and zero energy absorption by the object, one has $H=0$ and this term does not contribute. In case of partial absorption, which is possible for certain ultracompact objects ~\cite{mimicing horizon 1,mimicing horizon 2,mimicing horizon 3}, one has $0<H<1$. $\chi = \frac{a}{M}$ reveals that $\chi^{2s} = \big(\frac{a}{M}\big)^{2s}$. Note that the $a^{2s}$ term can arise only from a very few places. One is from $M_{2s}$ and another is from the multiplication of lower multipole moments. And the same goes for the $\chi^{2s+1}$, which has the main contribution from $S_{2s+1}$. Considering all such aspects we can write $\chi^m$ in terms of the multipole moments as follows: \begin{align} \label{S1} \chi &= \frac{S_1}{M^2},\\ \chi^2 &= -a_2 \frac{M_2}{M^3} + a_1 \frac{S_1^2}{M^4},\\ \chi^3 &= a_3 \bigg(\frac{S_1}{M^2}\bigg)^3 +a_4\frac{S_1}{M^2}\bigg\{-a_2 \frac{M_2}{M^3} + a_1 \frac{S_1^2}{M^4}\bigg\} - a_5 \frac{S_3}{M^4}, \end{align} \begin{widetext} \begin{equation} \begin{split} \chi^4 &= a_6 \bigg(\frac{S_1}{M^2}\bigg)^4 +a_7\bigg(\frac{S_1}{M^2}\bigg)^2\bigg\{-a_2 \frac{M_2}{M^3} + a_1 \frac{S_1^2}{M^4}\bigg\}+a_8 \frac{S_1}{M^2}\bigg[a_3 \bigg(\frac{S_1}{M^2}\bigg)^3 +a_4\frac{S_1}{M^2}\bigg\{-a_2 \frac{M_2}{M^3} + a_1 \frac{S_1^2}{M^4}\bigg\} - a_5 \frac{S_3}{M^4}\bigg]\\ &+a_9\bigg[-a_2 \frac{M_2}{M^3} + a_1 \frac{S_1^2}{M^4}\bigg]^2+ a_{10} \frac{M_4}{M^5}, \end{split} \end{equation} \begin{equation} \begin{split} \chi^5 &= \frac{S_1}{M^2}\bigg[a_{11}\bigg(\frac{S_1}{M^2}\bigg)^4 +\bigg\{-a_2 \frac{M_2}{M^3} + a_1 \frac{S_1^2}{M^4}\bigg\}\bigg\{a_{12} \bigg(\frac{S_1}{M^2}\bigg)^2+ a_{13}\bigg(-a_2 \frac{M_2}{M^3} + a_1 \frac{S_1^2}{M^4}\bigg)\bigg\} +a_{15}\bigg\{a_6 \bigg(\frac{S_1}{M^2}\bigg)^4\\ &+a_7\bigg(\frac{S_1}{M^2}\bigg)^2\bigg\{-a_2 \frac{M_2}{M^3}+ a_1 \frac{S_1^2}{M^4}\bigg\}+a_8 \frac{S_1}{M^2}\bigg[a_3 \bigg(\frac{S_1}{M^2}\bigg)^3 +a_4\frac{S_1}{M^2}\bigg\{-a_2 \frac{M_2}{M^3}+ a_1 \frac{S_1^2}{M^4}\bigg\} - a_5 \frac{S_3}{M^4}\bigg]+a_9\bigg\{-a_2 \frac{M_2}{M^3} + a_1 \frac{S_1^2}{M^4}\bigg\}^2\\ &+ a_{10} \frac{M_4}{M^5}\bigg\}\bigg]+\bigg[a_3 (\frac{S_1}{M^2})^3 +a_4\frac{S_1}{M^2}\{-a_2 \frac{M_2}{M^3}+ a_1 \frac{S_1^2}{M^4}\} - a_5 \frac{S_3}{M^4}\bigg]\bigg[a_{14}(\frac{S_1}{M^2})^2 +a_{16}\{-a_2 \frac{M_2}{M^3} + a_1 \frac{S_1^2}{M^4}\}\bigg]+a_{17}\frac{S_5}{M^6}, \end{split} \end{equation} \end{widetext} where the $a_i$s are 17 undetermined parameters, and are to be distinguished from $a$, which is the spin parameter and, contrastingly, does not have an index. The aforementioned equations have been formed by finding in how many ways $\chi^l$ can be constructed from the $M_L$ and $S_L$. While doing that we only focused on how they can be constructed by multiplying different moments. After that those contributions have been added with the introduction of the $a_i$s. However, as both the RHS and the LHS of the corresponding equations should be equal to $\chi^l$, these $a_i$s are not all independent. They satisfy four consistency equations, so there are 13 undetermined parameters. The equations satisfied by them are, \begin{align} a_1 + a_2 = &1,\\ a_3 + a_4 + a_5 = &1,\\ a_6 + a_7 + a_8 + a_9 + a_{10} = &1,\\ a_{11} + a_{12} + a_{13} + a_{14} + a_{15} + a_{16}+a_{17} = &1. \end{align} A measurement of the absorbed luminosity for an SAVAR metric that is not Kerr can help constrain these parameters for that space-time especially, if the moments from the precession frequencies can also be found. The expression is very complicated, but if we only consider the dominant contribution from each moment, as Ryan did, then it becomes much simpler. We now, however, opt to be as rigorous as possible. For future purpose reexpress Eq.(\ref{Horizon luminosity}) in terms of five new parameters: \begin{equation} \begin{split} -\Bigg(\frac{dE}{dt}\Bigg)_H &= \frac{32}{5} \Bigg(\frac{m}{M}\Bigg)^2 v^{15} H \Bigg[A^{\prime} + B^{\prime} v^2 + C^{\prime} v^3 + D^{\prime} v^4\\ &+ E^{\prime} v^5\Bigg]. \end{split} \end{equation} where $A^{\prime}$,...,$E^{\prime}$ are newly defined expansion coefficients. Though the above expression depends on terms that are multiples of the different multipole moments, it is understandable that in case of Kerr it becomes much simpler. If the only involved parameters related to the central object are mass and angular momentum, then due to the uniqueness theorem the external metric will be Kerr if it is a black hole. In that case the absorption will depend only on $a$ and $M$. But for the Kerr family, dependencies of the moments on mass and angular momentum are very simple. Owing to that these multipole moments are directly related to each other, and it does not matter if we side-step the ambiguity of the values of different $a_i$s. Therefore, we can choose: \begin{equation} a_2 = a_5 = a_{10} = a_{17} = 1. \end{equation} And all other $a_i = 0$. For the Kerr metric this will not change the result at all. Therefore, when there are no free parameters other than $M$ and $a$, one can take this simple form. So, the luminosity absorbed by the horizon becomes, \begin{widetext} \begin{equation} \begin{split} -\Bigg(\frac{dE}{dt}\Bigg)_H &= \frac{32}{5} \Bigg(\frac{m}{M}\Bigg)^2 v^{15} H \Bigg[-\frac{S_1}{4 M^2} + \frac{3 S_3}{4 M^4} -\bigg(\frac{S_1}{M^2} - \frac{33 S_3}{16 M^4}\bigg)v^2+ \bigg(2\frac{S_1}{M^2}B_2 + \frac{1}{2} - \frac{13 M_2}{2 M^3}\kappa - \frac{35 M_2}{6 M^3} -\frac{M_4}{4M^5} + \frac{\kappa}{2}\\ &+3\frac{M_4}{M^5} \kappa - 6\frac{S_3}{M^4} B_2\bigg)v^3+ \bigg(-\frac{43 S_1}{7 M^2} -\frac{17S_5}{56 M^6} + \frac{4651 S_3}{336M^4}\bigg)v^4 + \bigg(-\frac{433M_2}{24M^3} - \frac{95M_4}{24M^5} + 2 + \frac{3 S_3}{4 M^4}B_1\\ &+ 2\kappa + \frac{33 M_4}{4M^5} \kappa + 6\frac{S_1}{M^2}B_2 - 18\frac{S_3}{M^4}B_2 - \frac{163M_2}{8M^3}\kappa + \frac{S_1}{M^2}B_1 \bigg)v^5 + O(v^6)\Bigg],\\ B_n &= \frac{1}{2i} \Bigg[{\psi}^{(0)} \bigg(3 + \frac{ni S_1}{\sqrt{M^4 + M_2 M}}\bigg)- {\psi}^{(0)} \bigg(3 - \frac{ni S_1}{\sqrt{M^4 + M_2 M}}\bigg) \Bigg], \end{split} \end{equation} \end{widetext} where, $\kappa = \sqrt{1+\frac{M_2}{M^3}}$. This simplification happens because the relation between various multipole moments and the powers of $\chi$ become simple for the Kerr metric. Their expressions are, \begin{align} \chi &= \frac{S_1}{M^2},\\ \chi^2 &= -\frac{M_2}{M^3},\\ \chi^3 &= - \frac{S_3}{M^4},\\ \chi^4 &= \frac{M_4}{M^5},\\ \chi^5 &= \frac{S_5}{M^6} . \end{align} The basic idea employed here is to use horizon absorption as evidence that the central object has a horizon. Recently, Maselli et al.~\cite{H} have used this idea for the same purpose. They too introduced an absorption coefficient~($\gamma$), which is identical to our $H$. The significance of this term was arrived at independently~\cite{IAGRG}. \section{Complete mass-only dependent part through $v^{10}$ } \label{sec:mass dep. part} Ryan had included mass-dependent terms in the luminosity that resulted from the perturbation of the Schwarzschild black hole. As the only intention of that work was to look into the observational aspects of the No-hair theorem, it was good enough to consider them up to fourth power of $v$. But the main purpose of the present work is to include tidal effect and absorption by the central object. Since the tidal contribution occurs at much higher order of $v$ we need to know the luminosity up to that power of $v$ beyond lowest order. For that reason we are including this correction up to tenth power of $v$~\cite{Tagoshi}: \begin{widetext} \begin{equation} \begin{split} -\Bigg(\frac{dE}{dt}\Bigg)_M =& \frac{32}{5}{\bigg(\frac{m}{M}\bigg)}^2 v^{10}\bigg[1-\frac{1247}{336}v^2 + 4\pi v^3 - \frac{44711}{9072}v^4-\frac{1712}{105} \ln v\,\, v^6+ \frac{232597}{4410} \ln v\,\, v^8- \frac{6848}{105}\pi \ln v\,\, v^9\\ &+ \frac{916628467}{7858620} \ln v\,\, v^{10}+ \alpha v^5 + \beta v^6 + \nu v^7 + \delta v^8 + \epsilon v^9 + \phi v^{10}\bigg]\,. \end{split} \end{equation} \end{widetext} For future purpose we have expressed the expansion with some newly introduced parameters. The original expression is given below; comparing it with the above we can easily find those parameters. The full expression for the luminosity is~\cite{Tagoshi}, \begin{widetext} \begin{equation} \begin{split} &-\Bigg(\frac{dE}{dt}\Bigg)_M\\ =& \frac{32}{5}{\bigg(\frac{m}{M}\bigg)}^2 v^{10}\bigg[1-\frac{1247}{336}v^2 + 4\pi v^3 - \frac{44711}{9072}v^4 - \underbrace{\frac{8191}{672} {\pi}}_{= -\alpha} v^5 + \bigg(\underbrace{\frac{6643739519}{69854400} - \frac{1712}{105}\gamma + \frac{16}{3} \pi^2 - \frac{3424}{105}\ln 2}_{= \beta} -\frac{1712}{105} \ln v\bigg)v^6\\ &- \underbrace{\frac{16285}{504}\pi}_{= -\nu} v^7 + \bigg(\underbrace{-\frac{323105549467}{3178375200} + \frac{232597}{4410} \gamma - \frac{1369}{126}\pi^2 + \frac{39931}{294} \ln 2 - \frac{47385}{1568} \ln 3}_{= \delta} + \frac{232597}{4410} \ln v\bigg)v^8\\ &+ \bigg(\underbrace{\frac{265978667519}{745113600}\pi - \frac{6848}{105}\pi \gamma - \frac{13696}{105}\pi \ln 2}_{=\epsilon} - \frac{6848}{105}\pi \ln v\bigg)v^9\\ +& \bigg(\underbrace{-\frac{2500861660823683}{2831932303200} + \frac{916628467}{7858620}\gamma - \frac{424223}{6804}\pi^2 -\frac{83217611}{1122660}\ln 2 + \frac{47385}{196}\ln 3}_{= \phi} + \frac{916628467}{7858620} \ln v \bigg)v^{10}\bigg]\,, \end{split} \end{equation} \end{widetext} where $\gamma$ is the Euler constant. Since this expression is independent of all the other multipole moments, apart from the mass, this contribution will be present in all SAVAR metrics. \section{Motion of the central object } \label{sec:central motion} Another contribution that becomes important in this calculation is the effect due to the motion of the central object. This was mentioned by Ryan~\cite{Ryan}, and the results necessary for his calculation were presented there. We will take those basic results and identify the terms that will be important for our purpose.\\ Let the axis of symmetry of the SAVAR metric be denoted by the vector $\tilde{z}$, which can be defined in terms of the Killing vector corresponding to this symmetry~\cite{Hansen}. If $\Lambda$ represents the spatial infinity then we have~\cite{Hansen}, \begin{align} {\tilde{z}}_b{\tilde{z}}^b|_{\Lambda} = 1\,. \end{align} Since the metric is asymptotically flat, the axial Killing vector generates rotation on tensors at $\Lambda$. The moments should be rotationally invariant. But the only tensors at $\Lambda$ that are invariant under the action of the axial Killing vector are the ones that are outer products of the metric and $\tilde{z}$; so, the $2^s$ moments have to be multiples of the symmetric, trace-free (STF) outer product of $\tilde{z}$ with itself \big($\big[{\tilde{z}}_{b_1}...{\tilde{z}}_{b_s}\big]^{\rm STF}{\big|}_{\Lambda}$\big). The definition of a STF tensor can be generalized following Thorne's expression~\cite{Thorne}, \begin{align} A^{\rm sym}_{b_1 ...b_s} = [A_{b_1 ...b_s}]^S = \frac{1}{l!}\sum_{\pi}A_{b_{\pi (1)} ...b_{\pi (s)}}\,, \end{align} where $A^{\rm sym}_{b_1 ...b_s}$ is the completely symmetrized part of $A_{b_1 ...b_s}$ and $\pi$ represents all possible permutations of its indices. Now the symmetric, trace-free part can easily be found from Thorne's expression~\cite{Thorne}, \begin{equation} \begin{split} [A_{b_1 ...b_s}]^{\rm STF} =& \sum_{n=0}^{{\rm Floor}(\frac{s}{2})}\frac{(-1)^n s! (-2 n+2 s-1)\text{!!}}{(2 n)\text{!!} (2 s-1)\text{!!} (s-2 n)!}\\ &\times \delta_{(b_1 b_2} ...\delta_{b_{2n-1}b_{2n}}A^{\rm sym}_{b_{2n+1} ...b_s)j_1j_1 ...j_n j_n}\,, \end{split} \end{equation} where the repeated indices $j_k$ are contracted over and index symmetrization is defined as, $B_{(i}C_{j)} \equiv \frac{1}{2}( B_i C_j + B_j C_i)$. The definitions of the $2^s$ moments ($M_L$ and $S_L$) can be found in \cite{Hansen}. Since only the axis vector and the metric remain invariant under rotation, the $2^s$ moments are determined by the numbers $M_s$ and $S_s$ defined as~\cite{Hansen}: \begin{align} \label{M2}M_{s} =& \frac{1}{s!}M_{{b_1}...b_s}{\tilde{z}}^{{b_1}}...{\tilde{z}}^{b_s}|_{\Lambda},\\ \label{S2}S_{s} =& \frac{1}{s!}S_{{b_1}...b_s}{\tilde{z}}^{{b_1}}...{\tilde{z}}^{b_s}|_{\Lambda}\,, \end{align} where $s$ belongs to the set of positive integer numbers. But for this work we need to know the $2^s$ moments in terms of $M_s$ and $S_s$. Since the moments will be combinations of the outer products of the axis vector, the $2^s$ moments will be, \begin{align} \label{mass moment}M_{b_1 ...b_s} =& \alpha_{M_s} \big[{\tilde{z}}_{b_1}...{\tilde{z}}_{b_s}\big]^{\rm STF}{\big|}_{\Lambda},\\ \label{current moment}S_{b_1 ...b_s} =& \alpha_{S_s} \big[{\tilde{z}}_{b_1}...{\tilde{z}}_{b_s}\big]^{\rm STF}{\big|}_{\Lambda},\, \end{align} where $\alpha_{M_s}$ and $\alpha_{S_s}$ are some numbers yet to be determined. We can put Eqs.~(\ref{mass moment}) and (\ref{current moment}) into Eqs.~(\ref{M2}) and (\ref{S2}) in order to find these numbers in terms of $M_s$ and $S_s$: \begin{align} M_{s} =& \frac{\alpha_{M_s}}{s!}T_s,\\ S_{s} =& \frac{\alpha_{S_s}}{s!}T_s\,, \end{align} where \begin{equation} \begin{split} T_s &\equiv [\tilde{z}_{b_1}...\tilde{z}_{b_s}]^{\rm STF}\tilde{z}^{b_1}...\tilde{z}^{b_s}\\ &= \sum_{n=0}^{{\rm Floor}(\frac{s}{2})}\frac{(-1)^n s! (-2 n+2 s-1)\text{!!}}{(2 n)\text{!!} (2 s-1)\text{!!} (s-2 n)!}\,. \end{split} \end{equation} Hence, \begin{align} S_1 =& \alpha_{S_1}\\ S_{b_1} =& S_1 {\tilde{z}}_{b_1}\\ M_{2} =& \frac{\alpha_{M_2}}{2!} \frac{2}{3}\,,\\ M_{b_1 b_2} =& 3M_2 \big[{\tilde{z}}_{b_1}{\tilde{z}}_{b_2}\big]^{\rm STF}{\big|}_{\Lambda}\,. \end{align} If the orbiting companion were absent, then the moment of the system would have been determined by the stationary moment of the central body alone. So, there would have been no radiation. In reality, due to the orbiting companion the larger object will move along a path $\sim - \big(m / M \big) x_k$ in the center of mass frame, where $x_k$ is the smaller companion's position. Therefore, the multipolar contribution due to the ``moving" large mass would be the stationary moment displaced by $\big(m/ M \big) x_k$. Ryan already had included the contribution of $S_1$ due to this effect~\cite{Ryan}. It is now simple to see that the only other contribution through the tenth power of $v$ will arise from $M_2$. This is because of the number of time-derivatives on the radiative moment and the number of position vectors present in each term. Since we are assuming a circular orbit, we can write the smaller companion's position as, \begin{align} \label{position}x_1 = \rho \cos(\Omega t),\,\,\,x_2 = \rho \sin(\Omega t),\,\,\,x_3 = 0\,, \end{align} where $\rho$ is the separation between the two bodies. Because of the motion of the central object the radiative moments get corrected by~\cite{Ryan}, \begin{align} \delta I_{L+1} &= [-(l+1) I_L \big(m/ M \big) x_{b_{l+1}}]^{\rm STF},\\ \delta J_{L+1} &= [-\frac{l(l+2)}{l+1}J_L \big(m/ M \big) x_{b_{l+1}}]^{\rm STF}. \end{align} Therefore, we find \begin{align} \label{Iijk}I_{ijk} =\big[ m x_i x_j x_k - 9M_2 \big[{\tilde{z}}_i{\tilde{z}}_j\big]^{\rm STF} \frac{m}{M} x_k\big]^{\rm STF}, \end{align} \begin{align} \label{Jij}J_{ij} = \big[m x_i \epsilon_{jkl} x_k \frac{dx_l}{dt} - \frac{3m}{2M} x_j S_1 {\tilde{z}}_i\delta_{j3}\big]^{\rm STF}. \end{align} Substituting Eq.~(\ref{position}) into Eq.~(\ref{Iijk}) and inserting the resulting expression in Eq.~(\ref{time avg}), followed by a separation of the contribution of the small mass calculated above, we find the extra contribution to be: \begin{equation} \begin{split} -\frac{dE}{dt}\bigg{|}_{I_{ijk},{\rm C.M.}} =& \frac{32}{5}\bigg(\frac{m}{M}\bigg)^{2} v^{10}\bigg[\frac{M_2 v^6}{336 M^3}-\frac{v^9 \left(M_2 S_1\right)}{126 M^5}\\ &+\frac{M_2^2 v^{10}}{84 M^6}+O\left(v^{11}\right)\bigg]\,, \end{split} \end{equation} where C.M. is the short-hand for central body's motion. Similarly, putting Eq.~(\ref{position}) into Eq.~(\ref{Jij}) and using the result in Eq.~(\ref{time avg}) and separating the small mass' contribution calculated earlier we deduce the extra contribution of $J_{ij}$, complete through tenth power beyond the lowest order, as \begin{widetext} \begin{equation} \label{luminosity due to J_ij C.M.} \begin{split} -\frac{dE}{dt}\bigg{|}_{J_{ij}, \rm C.M.} =& \frac{32}{5}\bigg(\frac{m}{M}\bigg)^{2} v^{10}\bigg[-\frac{S_1 v^3}{12 M^2}+\frac{S_1^2 v^4}{16 M^4}+\frac{2 S_1^2 v^6}{9 M^4}-\frac{v^7 \left(S_1^3-2 M M_2 S_1\right)}{12 M^6} -\frac{v^8 \left(M_2 S_1^2\right)}{16 M^7}\\ &-\frac{2 S_1^3 v^9}{9M^6}+\frac{S_1 v^{10} \left(-12 M^2 S_3-12 M M_2 S_1+S_1^3\right)}{36 M^8}\bigg]. \end{split} \end{equation} \end{widetext} The first two terms inside the square brackets of the RHS were calculated in Refs.~\cite{kidder} and \cite{Ryan}. With Eq.(\ref{luminosity due to J_ij C.M.}), we have now finished calculating all the terms arising from the relevant effects, up to the order we need. This sets the stage for calculating how much the phasing will get modified owing to the aforementioned contributions. \section{Corrections beyond Ryan and their measurability} \label{sec:beyond ryan} \subsection{Corrections} In previous sections we gave the expressions of all possible contributions to the luminosity of an EMRI, namely: \begin{widetext} \begin{equation} \begin{split} -\frac{dE}{dt}\bigg{|}_{\rm Total} =& -\frac{dE}{dt}\bigg{|}_{I_{ijk}, J_{ij}} - \frac{dE}{dt}\bigg{|}_{I_{ij}} - \frac{dE}{dt}\bigg{|}_M - \frac{dE}{dt}\bigg{|}_H- \frac{dE}{dt}\bigg{|}_{\rm Tidal}- \frac{dE}{dt}\bigg{|}_{I_{ijkl},J_{ijk}}- \frac{dE}{dt}\bigg{|}_{I_{ijklm},J_{ijkl}}\\ &- \frac{dE}{dt}\bigg{|}_{I_{ijk},{\rm C.M.}}- \frac{dE}{dt}\bigg{|}_{J_{ij},{\rm C.M.}}\,. \end{split} \end{equation} \end{widetext} The expression for $\Delta E$ needed for our calculation was obtained nearly completely by Ryan~\cite{Ryan}. The net result below is the combination of Ryan's result and the contribution due to the tidal interaction, which we calculated in Eq.~(\ref{Tidal Delta E}). Thus, \begin{widetext} \begin{equation} \begin{split} \label{delta E}\frac{\Delta E }{m}=&\frac{v^2}{3}-\frac{v^4}{2} +\frac{20 S_1 v^5}{9 M^2}+ \left(\frac{M_2}{M^3}-\frac{27}{8}\right) v^6+\frac{28 S_1 v^7}{3 M^2}+v^8 \left(\frac{80 S_1^2}{27 M^4}+\frac{70 M_2}{9 M^3}-\frac{225}{16}\right)+v^9 \left(\frac{6M_2 S_1}{M^5}-\frac{6 S_3}{M^4}+\frac{81 S_1}{2 M^2}\right)\\ &+v^{10} \left(\frac{35 M_2^2}{12 M^6}-\frac{35 M_4}{12 M^5}+\frac{115 S_1^2}{18 M^4}+\frac{935 M_2}{24M^3}-\frac{6615}{128}\right)+v^{11} \left(\frac{1408 S_1^3}{243 M^6}+\frac{968 M_2 S_1}{27 M^5}-\frac{352 S_3}{9 M^4}+\frac{165 S_1}{M^2}\right)\\ &+v^{12} \left(\frac{24 M_2S_1^2}{M^7}-\frac{24 S_1 S_3}{M^6}+\frac{93 M_2^2}{4 M^6}-\frac{99 M_4}{4 M^5}-\frac{123 S_1^2}{14 M^4}+\frac{9147 M_2}{56 M^3}-\frac{45927}{256}+\frac{X}{m}\right)+...,\\ \end{split} \end{equation} \end{widetext} which includes all the terms we set out to find. To make the expression of $\Delta N$ simple, it helps to define the following variables: \begin{equation} \begin{split} A_1 =& \alpha + A^{\prime}H,\\ B_1 =& \nu + B^{\prime}H,\\ C_1 =& \delta + C^{\prime}H,\\ D_1 =& \epsilon + D^{\prime}H,\\ E_1 =& \phi + E^{\prime}H, \end{split} \end{equation} as well as, \begin{align} \begin{split} A\,\, =& \frac{M^2}{m^2}\frac{6{\eta}^2}{M_T^5}\big\{\frac{m + 3M}{m}{\lambda}_{m}+\frac{M + 3m}{M}{\lambda}_{M}\big\}, \\ X\,\, =& -18\frac{\eta }{M^4{_T}} \big\{{\frac{M}{m}}{\lambda}_{m}+{\frac{m}{M}}{\lambda}_{M}\big\}, \end{split} \end{align} where $A^{\prime},B^{\prime}, C^{\prime}, D^{\prime}$, and $E^{\prime}$ have been defined in Sec.~\ref{sec:Luminosity absorbed inside the horizon} and $A$ and $X$ have been defined in Sec.~{\ref{sec:tides}}. The Greek parameters~(except $\lambda$ and parameters depending on it) depend only on mass. Terms containing $H$ are present when the central object has a horizon. Now we have the full expression for $\Delta E$ and the total luminosity. Therefore, from these quantities we can find the phase evolution. Putting Eq.~(\ref{delta E}) and the total rate of energy contribution in Eq.~(\ref{N}), the result we obtain is as follows: \begin{equation}\label{N series} \Delta N = \frac{5 }{96 \pi q v^5}\sum_{n =0}^{10}N_n v^n, \end{equation} where $q = m/M$. The expressions for $N_n$ can be found in \ref{expressions}. With the deviation of the expression of the phase evolution we have achieved the goal we had set out for. Usefulness of this result is manyfold, as will be discussed in the later sections. The phase can be calculated as \cite{phase expression}, \begin{equation}\label{phase} \begin{split} \psi(f) = 2\pi f t_c - 2\phi_c-\frac{\pi}{4} + I(v) - I(v_i) \end{split} \end{equation} \begin{equation} I(v) - I(v_i) = \int^v_{v_i} d\bar{v} (v^3-\bar{v}^3) \frac{6\pi\Delta N}{\bar{v}^4} \end{equation} \begin{equation}\label{I series} I(v) = \sum_{n=-5}^{5}I_n (v) v^n, \end{equation} where the form of $I_n(v)$ can be found in \ref{expressions}. \subsection{Finding the Horizon } We now utilize the above results to analyze the challenges involved in deducing from future observations of GWs emitted by EMRIs whether their central object has a horizon or not. Among all the parameters in the expression of $\Delta N$, the ones denoted by Greek letters~(except $\lambda$) arise from the mass-dependent terms alone, as defined earlier. Terms containing $H$ arise due to absorption by the central object if it has a horizon. Other multipole-dependent terms arise from the higher order corrections and the motion of the central object. From the expressions of $A_1,B_1,C_1,D_1$, and $E_1$, it is noticeable that these parameters depend on the horizon parameter $H$. Therefore, the expression of the phase evolution, in general, depends on a set of multipole moments of the central body, the Horizon parameter, mass of the small compact object and the tidal deformabilities of the two bodies. Effect of self-force is of order $\epsilon \equiv (\frac{m}{M})$. Therefore, in case of EMRIs this effect is small. But most of the orbits in EMRI survive long enough without merging; building a cumulative effect of self-force. To have a significant amount of accumulation, the particle should stay in orbit long enough before merging, i.e. of the order of $\frac{1}{\epsilon}$ or longer~\cite{self-force}. But if we consider an event where a compact object comes in from a very large distance, stays on an almost circular orbit for a very short period of time and goes back out to a large distance~\cite{hyperbolic zoom whirl}, the accumulation of self-force correction terms would be small. In these scenarios, one can ignore the contribution of self-force while calculating the expression of $\Delta N$, and use the results derived here. To determine the values of these variables from observations, it will be essential to use the precession frequencies mentioned earlier~(see Eqs.~(\ref{frequency 1}) and (\ref{frequency 2})) \cite{Li}. In principle, by using the precession frequencies it is possible to deduce the values of the multipole moments of the central body and the mass of the small companion. These values can be used to separate out the influence of these moments on the phase evolution from that of the horizon parameter and the tidal deformabilities of the two bodies. But the situation can be somewhat simpler. To wit, for a black hole the tidal Love number is zero but $H=1$; therefore, only two of the three aforementioned influences will be present when the central object is a black hole. (Note that we are ignoring the effect of a possible horizon that the smaller object may have on the waveform.) For a general EMRI, whenever $H$ is nonzero for the central object, its tidal Love number will be zero, and {\it vice versa}. If both components are black holes, then the situation will become even simpler as there will be no degeneracy left. In this case $H$ is non-zero but tidal deformabilities are zero. Few other applications can be thought of. It has been suggested that the behaviour of the tidal deformability in the black hole limit could be used to probe Planckian correction near horizon \cite{H, Andrea 2019}. In certain alternate theories of gravities there are objects that contain a horizon around them but rather than having a zero tidal deformability it takes negative values \cite{Kabir 2019}. In general, confirming the presence or absence of a horizon will not be simple, owing to possibly competing influences of the aforementioned terms on the waveform phase. When the central object is not a black hole the degeneracy is between the two deformabilities. If there is a black hole then there is the degeneracy between $H$ and the tidal deformability of the small body. But in GW observations {\it a priori} we will not know what type of components make up the system. Potentially, the signal from one type of system may mimic that from another. For this reason a detailed analysis is needed, which is beyond the scope of this paper and will be reserved for a future work. \section{Parameter estimation} \label{sec:paramestim} To obtain some quantitative sense of how accurately some of the crucial central object parameters will be measurable, we performed a set of Fisher information matrix~\cite{Helstrom,Gair 2017} studies. As we show below, these estimates provide cautious optimism for the possibility that certain tests of the No-hair theorem can be performed with EMRIs in LISA. A more conclusive statement in this regard will have to wait for more accurate modeling of EMRI waveforms, as we have already clarified above. \begin{widetext} \begin{figure*} \includegraphics[width=7.cm]{BBHmassTotalError2DArray_H1p0_ChiBH0p9_SNR20.png} \includegraphics[width=7.cm]{massMoment2Error2DArray_H1p0_ChiBH0p9_SNR20.png} \includegraphics[width=7.cm]{BBHmassRatioError2DArray_H1p0_ChiBH0p9_SNR20.png} \includegraphics[width=7.cm]{spinMoment3Error2DArray_H1p0_ChiBH0p9_SNR20.png} \includegraphics[width=7.cm]{BBHchiBHError2DArray_H1p0_ChiBH0p9_SNR20.png} \includegraphics[width=7.cm]{chiBHError2DArray_H1p0_ChiBH0p9_SNR20.png} \includegraphics[width=7.cm]{BBHhorizonTermError2DArray_H1p0_ChiBH0p9_SNR20.png} \includegraphics[width=7.cm]{horizonTermError2DArray_H1p0_ChiBH0p9_SNR20.png} \caption{Parameter estimation errors (in percentages, except for the bottom two plots) from a Fisher analysis are presented for EMRIs where both binary components are taken to be black holes. The spin of the supermassive black hole is $\chi_{BH}=0.9$ and that of the smaller companion is zero. In the left set of plots, it is assumed that the central object is a black hole and, hence, its mass and spin moments are all taken to be completely determined by its mass and spin. As shown above, in such a case, the errors in the estimation of the central object's mass, mass-ratio, and spin are quite small for a signal with an SNR of 20. We also consider a case in the bottom-left plot where the horizon parameter $H$ for the aforementioned system is taken to be unknown. In such a case, the horizon term can be determined to within a few percent of unity for central objects with mass $\gtrsim 2.5\times 10^4~M_{\odot}$. In the right set of plots errors in $\alpha_2$, $\alpha_3$, $\chi_{BH}$ and $H$ are shown for the same BBH EMRIs, except that for the measurement problem $\alpha_2$ and $\alpha_3$ are taken to be parameters independent of the mass and spin of the central object. Unsurprisingly, the inclusion of these two parameters among unknowns increases the errors for all parameters. The horizon term (bottom-right plot) is most adversely affected. Still, there are wide ranges of the central object mass value for which the errors are a few to several percent. Even the errors in the total mass and mass-ratio (not shown) are within a few percent.} \label{FisherBBHChi0p9} \end{figure*} \end{widetext} \begin{widetext} \begin{figure*} \includegraphics[width=7.cm]{BSBHmassTotalError6DArray_H0p0_ChiBS0p9_SNR20.png} \includegraphics[width=7.cm]{massMoment2Error9DArray_H0p0_ChiBS0p9_SNR20.png} \includegraphics[width=7.cm]{BSBHmassRatioError6DArray_H0p0_ChiBS0p9_SNR20.png} \includegraphics[width=7.cm]{spinMoment3Error9DArray_H0p0_ChiBS0p9_SNR20.png} \includegraphics[width=7.cm]{BSBHBIGLambdaError6DArray_H0p0_ChiBS0p9_SNR20.png} \includegraphics[width=7.cm]{BIGLambdaError9DArray_H0p0_ChiBS0p9_SNR20.png} \includegraphics[width=7.cm]{BSBHhorizonTermError6DArray_H0p0_ChiBS0p9_SNR20.png} \includegraphics[width=7.cm]{horizonTermError9DArray_H0p0_ChiBS0p9_SNR20.png} \caption{Parameter estimation errors (in percentages, except for the bottom two plots) from a Fisher analysis are presented for EMRIs where the more massive component is a boson star (with $H=0$) whereas the lighter one is a black hole. The spin of the central object is $\chi=0.9$ and that of the smaller companion is zero. In the left set of plots the spin and the dimensionless tidal deformability parameter $\Lambda_M$ of the central object and the component masses are being measured. As shown above, in such a case, the errors in the estimation of the total mass, mass-ratio, and spin are quite small for a signal with an SNR of 20. In the right set of plots errors in $\alpha_2$, $\alpha_3$, $\chi$, $\Lambda_M$ and $H$ are shown for the same EMRIs. Here too the erros are within a few percent for the most part, except for $\Lambda_M$, which suffers large measurement erros. This suggests that the ability to measure $\Lambda_M$ is adversely affected by the absence of any prior knowledge of $\alpha_2$ and $\alpha_3$. Nevertheless, constraining $H$ to be close to zero in these cases is very much possible. } \label{FisherBosonChi0p9} \end{figure*} \end{widetext} We consider two kinds of central objects below, namely, supermassive black holes and supermassive boson stars. The lighter companion is always taken to be a black hole here. When the central object is a black hole, its spin $(\chi)$ is defined in terms of the Kerr rotation parameter $a =M\chi$. In the case of a boson star (BS), its spin is defined in terms of its first spin moment $S_1$, namely, $\chi = S_1/M^2$. It is well known that the multipole moments of a Kerr BH are completely determined by its mass and spin as \begin{equation}\label{Multipole expression for Kerr} M_l + iS_l = M(ia)^l. \end{equation} In the case of a boson star this relation gets modified to~\cite{Ryan 1997, Berti 2006} \begin{equation}\label{Multipole expression for BS} M_l + iS_l = \alpha_lM(ia)^l\,, \end{equation} where $\alpha_l$ depends on $\chi$ and $M\mu_B^2/\sqrt[]{\lambda_{\rm boson}}$, with $\lambda_{\rm boson}$ and $\mu_B$ being the interaction strength of the quartic potential and the mass of the boson field, respectively, in the massive boson star model~\cite{Ryan 1997}.~\footnote{ A slightly different approach can be found in Ref \cite{Krishnendu 2017, Krishnendu 2018}.} From the definition of the mass and spin, it follows that $\alpha_0 = \alpha_1 = 1$. A nice discussion regarding the three-hair relation for boson stars can be found in Ref.~\cite{Berti 2006}. In the Fisher analysis we used Eq.~(\ref{Multipole expression for BS}) for the multipole moments in the expression of signal phase for all EMRIs. When the central object is a black hole, we take $\alpha_l = 1$, for all $l$. Values of the $\alpha_l$ for boson stars are taken from Ref.~\cite{Ryan 1997}. We were unable to do a similar analysis for solitonic BS since multipole moments for such systems are not available in the literature. All the boson stars considered in the current work are massive BS. In Figs.~\ref{FisherBBHChi0p9} and \ref{FisherBosonChi0p9} by second mass moment and third spin moment we mean $\alpha_2$ and $\alpha_3$, respectively. For computing the errors presented in those figures, we set $\alpha_4 = 0 = \alpha_5$. This is because we found that the errors in $\alpha_4$ and $\alpha_5$ are quite high (i.e., mostly more than 100\% for signal-to-noise ratio (SNR) of 20). This implies that the signal is not very sensitive to variations in the values of these parameters. Whether more accurate waveform models will allow their determination at similar SNRs can be explored in the future. In tables~\ref{BH_tab:errors} and \ref{BS_tab:errors}, we highlight parameter errors for some EMRIs not all of which are shown in Figs.~\ref{FisherBBHChi0p9} and \ref{FisherBosonChi0p9}. (Specifically, the $\chi = 0.5$ systems are not shown in the figures.) We notice that the errors generally reduce substantially with increasing spin. Since the spins of supermassive BHs may be quite high~\cite{Reynolds 2013}, we can expect the errors in the parameters of such systems to be smaller based on our analysis. Broadly, we study the measurement precision of parameters for two kinds of system, namely, one binary where the central object is a super-massive black hole and another binary where that object is a boson star. We always take the smaller companion to be a black hole. While our formalism allows for non-black hole companions, we limit our scope here to the aforementioned systems for ease of interpreting and communicating our results. We use the LISA noise curve given in Ref.~\cite{Cornish 2017}. We have not accounted for the source confusion noise that is expected at frequencies a few times below 1~mHz to several times above that frequency, and will affect the parameter estimates of high-mass sources studied here. \subsubsection{Central object as a black hole} For our error analysis, the distance of the source is normalized such that the signal SNR remains fixed at 20. Moreover, we integrated all signals for the duration of 1 year. This means that when the total mass is small, most of the signal lies at higher frequencies where LISA sensitivity starts deteriorating. This is why the error increases as one reduces the mass of the heavier (or central) object, which dominates the contribution to the total mass. For heavier EMRIs too the parameter errors can worsen because most of the signal lies at frequencies below the most sensitive part of the LISA band, which is around 8-9~mHz. This aspect of the error distribution should be revisited for more accurate signal models. In Fig.~\ref{FisherBBHChi0p9} parameter estimation errors (in percentages) from a Fisher analysis are presented for EMRIs where both binary components are taken to be black holes. The spin of the supermassive black hole is $\chi_{\rm BH}=0.9$ and that of the smaller companion is zero. In the left set of plots, the mass and spin moments are all taken to be completely determined by the mass and spin of the central object as if it were a black hole. In such a case, the errors in the estimation of the central object's mass, mass-ratio, and spin are quite small for a signal with an SNR of 20. Our errors for this case are consistent with those presented in Ref.~\cite{Gair 2017}, even if on the higher side. Our larger errors can be attributed partly to our different waveform model but mostly to the fact that we are estimating a larger number of parameters here. We also consider a case in the bottom-left plot of Fig.~\ref{FisherBBHChi0p9} where the horizon parameter $H$ for the aforementioned system is taken to be unknown. In such a case, the horizon term can be determined to within a few percent of unity for central objects with mass $\gtrsim 2.5\times 10^4~M_\odot$. In the right set of plots of Fig.~\ref{FisherBBHChi0p9}, the errors in $\alpha_2$, $\alpha_3$, $\chi_{BH}$ and $H$ are shown for the same BBH EMRIs, except that for the measurement problem $\alpha_2$ and $\alpha_3$ are taken to be parameters independent of the mass and spin of the central object. Unsurprisingly, the inclusion of these two parameters among unknowns increases the errors for all parameters. The horizon term (bottom-right plot) is most adversely affected. Still, there are wide ranges of the central object mass value for which the errors are a few to several percent. Even the errors in the total mass and mass-ratio (not shown) are within a few percent. We also computed the errors for the case where the spin of the central object is smaller -- at $\chi= 0.5$. Table~\ref{BH_tab:errors} (table~\ref{BS_tab:errors}) compares them with the errors for the $\chi = 0.9$ case when the central object is a black hole (boson star) and we are only measuring its spin, the binary's total mass, mass-ratio, and $H$ (as well as $\Lambda_M$ for the BS). As seen there, the errors tend to increase when $\chi$ decreases from 0.9 to 0.5. {\centering \begin{table}[h] \begin{tabular}{| p{1.6cm} | p{0.6cm} | p{0.8cm}| p{0.9cm}| p{1.cm} | p{0.9cm}| } \hline ${M_{\rm Cen}}~(M_\odot)$ & $\chi_{\rm BH}$ & $\frac{\Delta\chi_{\rm BH}}{\chi_{\rm BH}}$ & $|\Delta H|$ & $\frac{\Delta M_{\rm tot}}{M_{\rm tot}}$ & $\frac{\Delta q}{q}$ \\ \hline $10^5$& .9&.005 &.01 &.0025 &.004 \\ \hline 4$\times 10^4$&.9 &.02 &.04 &.005 &.01 \\ \hline $10^5$& .5& 0.01&.025 &.003 &.005 \\ \hline $4\times 10^4$& .5& 0.08&.28 &.025 & .04\\ \hline \end{tabular} \caption {Effect of central object's spin on parameter errors: A selection of parameter errors (in percentage, except for $H$) from the plots in the left column in Fig.~\ref{FisherBBHChi0p9} are listed in the last four columns for a black hole as the central object, with spin of 0.9. Additionally, for comparison, we present errors when the central object spin is 0.5.} \label{BH_tab:errors} \end{table} } {\centering \begin{table}[h] \begin{tabular}{| p{1.6cm} | p{0.6cm} | p{0.8cm}| p{0.9cm}| p{1.4cm} | p{1.4cm}| } \hline ${M_{\rm Cen}}~(M_\odot)$ & $\chi_{\rm BS}$ & $\frac{\Delta\Lambda_{ M}}{\Lambda_{M}}$ & $|\Delta H|$ & $\frac{\Delta M_{\rm tot}}{M_{\rm tot}}$ & $\frac{\Delta q}{q}$ \\ \hline $10^5$& .9&10 &.0001 &$10^{-3}$ & $10^{-3}$\\ \hline 4$\times 10^4$&.9 &15 &.00025 & $1.5\times 10^{-3}$&.002 \\ \hline $10^5$& .5& 10& .001& $5\times 10^{-3}$& $10^{-2}$\\ \hline $4\times 10^4$& .5& 20& .002& $10^{-2}$& $1.5\times 10^{-2}$\\ \hline \end{tabular} \caption {Effect of central object's spin on parameter errors: A selection of parameter errors (in percentage, except for $H$) from the plots in the left column in Fig.~\ref{FisherBosonChi0p9} are listed in the last four columns for a boson star as the central object, with spin of 0.9. Additionally, for comparison, we present errors when the central object spin is 0.5.} \label{BS_tab:errors} \end{table} } \subsubsection{Central object as a boson star} Depending on the bare mass~$(\mu_{B})$ of the boson field and the nature of the interaction, the mass of a BS can take a range of values. These values can even be $> 10^6 M_{\odot}$~\cite{Mass of the Boson star}. For this study, the values of $\lambda_M / M^5~(\equiv\Lambda_M)$ have been taken from the work by Senett et al.~\cite{Tidal deformation of BS}. There $\Lambda_M$ has been expressed in terms of $\frac{M \mu_{B}}{m^2_p}$, where $m_p$ is the Planck mass. Therefore, for a given value of $M$, the value of $\Lambda_M$ depends on how light the boson field is. In Fig.~\ref{FisherBosonChi0p9} parameter estimation errors (in percentages) from a Fisher analysis are presented for EMRIs where the more massive component is a boson star (with $H=0$) whereas the lighter one is a black hole. The spin of the central object is $\chi=0.9$ and that of the smaller companion is zero. In the left set of plots the spin and the dimensionless tidal deformability parameter $\Lambda_M$ of the central object and the component masses are being measured. As shown there, in such a case, the errors in the estimation of the total mass, mass-ratio, and spin are quite small for a signal with an SNR of 20. In the right set of plots errors in $\alpha_2$, $\alpha_3$, $\chi$, $\Lambda_M$ and $H$ are shown for the same EMRIs. Here too the errors are within a few percent for the most part, except for $\Lambda_M$, which suffers large measurement errors. This suggests that the ability to measure $\Lambda_M$ is adversely affected by the absence of any prior knowledge of $\alpha_2$ and $\alpha_3$. Nevertheless, constraining $H$ to be close to zero in these cases remains a possibility. \section{Discussion} \label{sec:testing no hair} It is already understood that the multipole moments of the central body provide information about its vacuum space time. Therefore, we can deduce from those moments the nature of the central object. Owing to that we can test the No-hair theorem, and check whether the black hole uniqueness theorem holds or not~\cite{no hair israel,no hair israel2,no hair wald,no hair carter,no hair Robinson}. To test the No-hair theorem we need two pieces of information. One of them is whether the central object has a horizon (i.e., is a black hole), with the value of $H$ observationally consistent with unity. The other one is the knowledge of the multipole moments, from the observed GW emission; these moments will reveal if the central object has any hairs. From Fig.~\ref{FisherBBHChi0p9} we notice that the error in $H$ is less than $50\%$ if the mass of the central BH is $\leq 5\times 10^{5}~\rm{M_{\odot}}$. This implies that for such a case the value of $H$ can be determined more precisely than $\sim 1\pm.5$ (at the 1$\sigma$ level). (If the SNR is 50~\cite{Gair 2017}, this error reduces to 30\%, which is a possibility.) When the central object is a BS the situation is much better: From Fig.~\ref{FisherBosonChi0p9} we infer that the error in $H$ is less than $4\%$ for the entire range of masses of the BS. Therefore, the value of $H$ can be determined to be more precisely than $0.00\pm.04$. This suggests that these two systems can be distinguished from each other, at the 1$\sigma$ level. For this reason, it is important that one revisits this estimation problem with more accurate waveform models. Owing to the aforementioned results, testing the No-hair theorem in EMRIs remains a viable pursuit. In the figures here we have shown how precisely the first few mass and spin moments are measurable. From Fig.~\ref{FisherBBHChi0p9} we notice that for central BH masses greater than $10^{4}~ \rm{M_{\odot}}$, $\alpha_2$ and $\alpha_3$ can be measured with better precision than $1.0\pm 0.4$ and $1.0\pm0.8$, respectively. These errors reduce when the central object is a BS (for the same SNR). The injected value of $\alpha_2$ and $\alpha_3$ are 34 and 47, respectively. From Fig.~\ref{FisherBosonChi0p9} we notice that for the entire mass range of BS, $\alpha_2$ and $\alpha_3$ can be measured more precisely than $34.00\pm 0.68 $ and $47.00 \pm 2.82$, respectively. With an accurate measurement of $H$ we will be able to distinguish between black holes and boson stars as central objects in EMRIs. This implies that it is likely that the No-hair theorem for BHs will be testable by measuring the multipole moments with required precision. \section*{Acknowledgments} We would like to thank Sanjeev Dhurandhar and Geoffrey Lovelace for helpful discussions. This work is supported in part by the Navajbai Ratan Tata Trust and NSF grant PHY-1506497. SD would like to thank University Grants Commission (UGC), India, for financial support as senior research fellow.
\section{Introduction} All manifolds are smooth in this paper, except that a very mild form of manifold with boundary and corners appears without comment at various places, and the appropriate rounding of corners is assumed without comment. Most of the content of this paper is in the form of definitions and statements of basic results, and some discussion. There are no proofs; either proofs are suggested as exercises, sometimes with hints, or external references are given. We necessarily present a very limited range of material and hope that this a useful launching point for more in-depth reading and, especially, for new and original research. At the risk of overdoing it, we maintain a format throughout which heavily emphasizes the parallels between the $3$-- and $4$--dimensional settings. In particular, we use a $2$--column format for most definitions and theorems, with parallel bulleted items for the $4$--dimensional setting on the left and the $3$--dimensional setting on the right; sometimes there is an extra condition in dimension four which does not have a three dimensional analog, in which case to avoid excessive white space we drop the $2$--column format for this last condition. This format is based on the approach taken on the blackboard in the original mini-course, and we hope the experiment is equally effective in printed form. One goal of these notes is to emphasize the Morse theoretic perspective where it often gets conveniently ignored in other presentations. In principle one can understand everything one needs to know about trisections without thinking Morse theoretically, but this seems to miss an essential piece of the intuition. For this reason, in section~\ref{S:Decomps}, we quickly cover the basic definitions of Heegaard splittings and trisections as decompositions of manifolds somewhat drily and minimally so as to get on to the Morse theory of Section~\ref{S:Morse} quickly. \section{The basic definitions: decompositions} \label{S:Decomps} We use the symbol $\#$ for connected sum and $\natural$ for boundary connected sum, so that $\partial(A \natural B) = (\partial A) \# (\partial B)$. Then $\#^n A$ is the connected sum of $n$ copies of $A$, with $\#^0 A = S^m$, when $A$ is a manifold of dimension $m$. Similarly $\natural^n B$ is the boundary connected sum of $n$ copies of $B$, with $\natural^0 B = B^m$, when $B$ is a manifold with connected boundary of dimension $m$. With this in mind we name the following standard manifolds of dimensions $2$, $3$ and $4$: \begin{itemize} \item The standard genus $g$ surface is $\Sigma_g = \#^g (S^1 \times S^1)$. \item The standard genus $g$ handlebody is $H_g = \natural^g (S^1 \times B^2)$, with $\partial H_g = \Sigma_g$. \item The standard $4$--dimensional $1$--handlebody (of ``genus $k$'') is $Z_k = \natural^k (S^1 \times B^3)$. \end{itemize} \newlength{\halfdeflength} \newlength{\wholedeflength} \begin{definition} \label{D:HSandTri} In which we define Heegaard splittings and trisections and establish orientation conventions. (See Figure~\ref{F:HSandTriSchematic}.) \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \setlength{\wholedeflength}{2\halfdeflength} \addtolength{\wholedeflength}{2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} A $(g;k_1,k_2,k_3)$ {\em trisection} of a closed, connected, oriented $4$--manifold $X$ is a decomposition $X = X_1 \cup X_2 \cup X_3$ such that: & \textbf{Dimension three:} A genus $g$ {\em Heegaard splitting} of a closed, connected, oriented $3$--manifold $M$ is a decomposition $M = M_1 \cup M_2$ such that: \\ \textbullet\; For each $i$, $X_i$ is diffeomorphic to $Z_{k_i}$. & \textbullet\; For each $i$, $M_i$ is diffeomorphic to $H_g$. \\ \textbullet\; Taking indices mod $3$, each $X_i \cap X_{i+1}$ is diffeomorphic to $H_g$. We orient $X_i \cap X_{i+1}$ as a submanifold of $\partial X_{i+1}$. & \textbullet\; $M_1 \cap M_2$ is diffeomorphic to $\Sigma_g$. We orient $M_1 \cap M_2$ as $\partial M_1 = -\partial M_2$. \\ \cmidrule{2-2} \multicolumn{2}{p{\wholedeflength}}{\textbullet\; $X_1 \cap X_2 \cap X_3$ is diffeomorphic to $\Sigma_g$. We orient $X_1 \cap X_2 \cap X_3$ as $\partial (X_1 \cap X_2) = \partial (X_2 \cap X_3) = \partial (X_3 \cap X_1)$.} \end{longtable} A $(g;k_1,k_2,k_3)$ trisection is {\em balanced} if $k_1=k_2=k_3=k$, in which case we call it a $(g,k)$ trisection. \end{definition} \begin{figure} \begin{subfigure}[c]{0.5\textwidth} \labellist \small\hair 2pt \pinlabel $X_1$ at 103 40 \pinlabel $X_2$ at 28 65 \pinlabel $X_3$ at 91 125 \endlabellist \centering \includegraphics{TriSchematic} \caption{Trisection} \label{F:TriSchematic} \end{subfigure} % \begin{subfigure}[c]{0.5\textwidth} \labellist \small\hair 2pt \pinlabel $M_1$ at 50 40 \pinlabel $M_2$ at 50 110 \endlabellist \centering \includegraphics{HSSchematic} \caption{Heegaard Splitting} \label{F:HSSchematic} \end{subfigure} \caption{Schematics of trisections and Heegaard splittings} \label{F:HSandTriSchematic} \end{figure} A Heegaard splitting will often be labelled $\mathcal S$, to refer to the triple $\mathcal S=(M, M_1,M_2)$, and similarly a trisection will often be labelled $\mathcal T$, to refer to the $4$--tuple $\mathcal T=(X,X_1,X_2,X_3)$. Note that the labeling of the pieces matters; $(M,M_1,M_2)$ and $(M,M_2,M_1)$ are different Heegaard splittings of the same underlying oriented $3$--manifold. To digest the orientation conventions, a good exercise is to verify first that, in a trisection $\mathcal T=(X,X_1,X_2,X_3)$, the orientations of $\Sigma = X_1 \cap X_2 \cap X_3$ as $\partial (X_1 \cap X_2)$, $\partial (X_2 \cap X_3)$ and $\partial (X_3 \cap X_1)$ really do agree. Then one should verify that this orientation of $\Sigma$ from the $\mathcal T$ agrees with its orientation as the splitting surface in each of the the Heegaard splittings $\mathcal S_i = (\partial X_i,X_{i-1} \cap X_i,X_i \cap X_{i+1})$. \begin{definition} \label{D:Stab} In which we define a stabilization operation for both kinds of decompositions. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} Given a trisection $\mathcal T=(X,X_1,X_2,X_3)$ of a $4$--manifold $X$ and an index $i \in\mathbb Z /3\mathbb Z$, an {\em $i$--stabilization} of this trisection is a trisection $\mathcal T'=(X,X_1',X_2',X_3')$ obtained as follows: & \textbf{Dimension three:} Given a Heegaard splitting $\mathcal{S}=(M,M_1,M_2)$ of a $3$--manifold $M$, and an index $i \in \mathbb Z /2\mathbb Z$, an {\em $i$--stabilization} of $\mathcal{S}$ is a Heegaard splitting $\mathcal{S}' = (M,M_1',M_2')$ of $M$ obtained as follows: \\ \textbullet\; Choose an arc $a$ properly embedded and boundary parallel in $X_{i-1} \cap X_{i+1}$, with a regular neighborhood $\nu \cong B^3 \times a$ so that $\nu \cap X_i \cong B^3 \times \partial a$ and $\nu \cap X_1 \cap X_2 \cap X_3 \cong B^2 \times \partial a$. & \textbullet\; Choose an arc $a$ properly embedded and boundary parallel in $M_{i+1}$, with a regular neighborhood $\nu \cong B^2 \times a$ so that $\nu \cap M_i \cong B^2 \times \partial a$. \\ \textbullet\; Let $X_i' = X_i \cup \nu$. & \textbullet\; Let $M_i' = M_i \cup \nu$. \\ \textbullet\; Let $X_{i \pm 1}' = X_{i \pm 1} \setminus \mathring{\nu} $. & \textbullet\; Let $M_{i+1}' = M_{i+1} \setminus \mathring{\nu} $. \end{longtable} \end{definition} Several comments are in order. The fact that a stabilization of a Heegaard splitting or trisection is again a Heegaard splitting or trisection is a lemma that needs to be proved, and is a worthwhile exercise. In both dimensions, any $i$--stabilization of a given Heegaard splitting or trisection is isotopic to any other. In dimension three, $1$--stabilization and $2$--stabilization are isotopic, and both turn a genus $g$ splitting into a genus $g+1$ splitting. For this reason in dimension three we dispense with the index and simply say ``stabilization'', an operation defined uniquely up to ambient isotopy. In dimension four, any two $i$--stabilizations of the same trisection are isotopic, but an $i$--stabilizations turns a $(g;k_1,k_2,k_3)$ trisection into a $(g+1;k_1',k_2',k_3')$ trisection where $k'_i = k_i+1$ and, for $j \neq i$, $k'_j=k_j$. Thus $1$--stabilization, $2$--stabilization and $3$--stabilization are necessarily different. By stabilization, any trisection can be made balanced, and ``stabilization'' for a balanced trisection means the result of performing one $1$--, one $2$-- and one $3$--stabilization. This balanced stabilization is the stabilization process originally presented in~\cite{GayKirby}. The basic results (some discussion of their proofs appears in the following section) are: \begin{theorem}[Existence and Uniqueness] \label{T:ExUn} The above decompositions exist and are unique up to stabilization. More precisely: \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} Every closed, connected, oriented $4$--manifold has a trisection, and any two trisections of the same $4$--manifold become isotopic after some number of stabilizations.~\cite{GayKirby} & \textbf{Dimension three:} Every closed, connected, oriented $3$--manifold has a Heegaard splitting, and any two Heegaard splittings of the same $3$--manifold become isotopic after some number of stabilizations.\cite{Reidemeister, Singer} \end{longtable} \end{theorem} \section{The Morse theoretic perspective} \label{S:Morse} We assume familiarity with basic Morse theory and the connection between Morse functions on manifolds and handle decompositions. We will define some of these basic notions below in certain cases, only for the purpose of establishing parallels between $3$-- and $4$--dimensional phenomena. \begin{definition} \label{D:MorseMorse2} In which we define Morse functions and Morse $2$--functions in the limited context of dimensions three and four. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} A {\em Morse $2$--function} on a $4$--manifold $X$ is a smooth function $f: X \to \mathbb R^2$ which, at every point $p \in X$, has one of the following three forms with respect to appropriate local coordinates $(t,x,y,z)$ near $p$ and $(u,v)$ near $f(p)$: & \textbf{Dimension three:} A {\em Morse function} on a $3$--manifold $M$ is a smooth function $f: M \to \mathbb R$ which, at every point $p \in M$, has one of the following two forms with respect to appropriate local coordinates $(x,y,z)$ near $p$ and $u$ near $f(p)$: \\ \textbullet\; $(t,x,y,z) \mapsto (u=t,v=x)$; here $p$ is called a {\em regular point}. & \textbullet\; $(x,y,z) \mapsto u=x$; here $p$ is called a {\em regular point}. \\ \textbullet\; $(t,x,y,z) \mapsto (u=t, v = \pm x^2 \pm y^2 \pm z^2)$; here $p$ is called a {\em fold point} and $p$ is called {\em definite} or {\em indefinite} according to whether the quadratic form $\pm x^2 \pm y^2 \pm z^2$ is definite or indefinite. & \textbullet\; $(x,y,z) \mapsto u = \pm x^2 \pm y^2 \pm z^2$; here $p$ is called a {\em critical point}, and the number of $-$'s in the quadratic form $\pm x^2 \pm y^2 \pm z^2$ is the {\em index of $p$}. \\ \cmidrule{2-2} \multicolumn{2}{l}{\textbullet\; $(t,x,y,z) \mapsto (u=t, v= x^3 - t x \pm y^2 \pm z^2)$; here $p$ is called a {\em cusp point}.} \end{longtable} In both cases, a point $q$ in the codomain of $f$ is called a {\em regular value} if all points $p \in f^{-1}(q)$ are regular points, otherwise $q$ is a {\em critical value}. In dimension four, both fold and cusp points are {\em critical points}. \end{definition} A good way to think about the connection between Morse functions and Morse $2$--functions is that, locally, a Morse $2$--function looks like time crossed with a generic homotopy betweeen Morse functions. Along a fold we can parametrize things so that we see a single Morse critical point not moving in time, while a cusp corresponds to a birth or death of a cancelling pair of critical points. Here we recommend that the reader verify the following facts as an exercise in building the correct intution (assume here that the domain of $f$ is closed): \begin{itemize} \item In both cases the inverse image of a regular value is a closed surface. \item In both cases the singular locus, the set of all critical points, is a closed codimension three submanifold, i.e. a finite collection of points in dimension three and a finite collection of embedded circles in dimension four. \item In dimension four, the cusp points form a finite collection of points on the singular locus. \item Via a small perturbation, in dimension three one may assume that the critical points of a Morse function have distinct critical values \item Returning to dimension four, letting $Z$ be the singular locus of a Morse $2$--function $f$, via a small perturbation one may assume that $f|_Z$ is an immersion with semicubical cusps, with at worst double point self intersections, none of which occur at cusps. (Figure~\ref{F:Morse2FCartoon} is an attempt at a cartoon illustrating many of the features of a Morse $2$--function discussed in this and the following bullet points.) \item If $f:X \to \mathbb R^2$ is a Morse $2$--function and $A$ is an arc in $\mathbb R^2$ avoiding the cusps and transverse to the image of the singular locus, then $M = f^{-1}(A)$ is a $3$--manifold in $X$, with $\partial M = f^{-1}(\partial A)$. \item Furthermore, if we identify $A$ with an interval in $\mathbb R$ via some embedding $A \hookrightarrow \mathbb R$ then $f|_M :M \to A$ is a Morse function with critical points of index $0$ and $3$ where $A$ crosses definite folds and critical points of index $1$ and $2$ where $A$ crosses indefinite folds. Reversing the orientation of $A$ changes the indices of these critical points, with index $0$ becoming index $3$ and vice versa, and index $1$ becoming index $2$ and vice versa. \item Crossing a definite fold in the index $0$ direction adds a new $S^2$ component to the fiber (preimage of regular value) while crossing in the index $3$ direction caps off such a component. Crossing an indefinite fold in the index $1$ direction either increases the genus of a fiber component by one or connects two disconnected components, while crossing in the index $2$ direction surgers the fiber along a compressing circle, either decreasing genus by one or splitting a component in two. \item If the arc $A$ passes immediately adjacent to a cusp, thus crossing two folds, then the corresponding Morse critical points are two cancelling critical points of successive index. \end{itemize} \begin{figure} \labellist \small\hair 2pt \pinlabel $0$ [r] at 64 80 \pinlabel $2$ [r] at 130 125 \pinlabel $1$ [bl] at 169 150 \endlabellist \centering \includegraphics{Morse2FCartoon} \caption{Some characteristic features of a Morse $2$--function. The darker arc is a definite fold and the remaining solid arcs are indefinite folds. The dotted arc is an oriented arc $A$ transverse to the folds, with indices of the critical points of the associated Morse function on $f^{-1}(A)$ labelled at the crossings. The surfaces are representative inverse images of regular values along the arc. \label{F:Morse2FCartoon}} \end{figure} Next we will define the kind of Morse functions and Morse $2$--functions which produce, respectively, Heegaard splittings and trisections. Our $3$--dimensional definition will, as usual, seem a little odd since it is set up to emphasize the parallel with the $4$--dimensional setting. First we introduce some notation. For $\theta \in S^1 = \mathbb R /\!2\pi\mathbb Z$, let $R_\theta \subset \mathbb R^2$ be the ray making angle $-\theta$ with the positive $x$--axis. (Yes, the negative sign in $-\theta$ is intentional, we explicitly want to move {\em clockwise} around the origin, simply because this fits well with other orientation conventions.) Identify $R_\theta$ with $[0,\infty)$ via the parametrization $(t\cos(-\theta), t\sin(-\theta))$. Thinking of $\mathbb R$ as the $x$--axis in $\mathbb R^2$, the intervals $[0,\infty) \subset \mathbb R$ and $(-\infty,0] \subset \mathbb R$ are then identified with the rays $R_0$ and $R_\pi$, respectively, except that when we think of $(-\infty,0]$ as $R_\pi$ and then use the above parametrization to identify $R_\pi$ with $[0,\infty)$, we then see $(-\infty,0]$ oriented away from $0$. We also consider the ``trisection'' of $\mathbb R^2$ as $\mathbb R^2 = A_1 \cup A_2 \cup A_3$ where $A_i$ is the sector bounded by $\mathbb R_{2\pi (i-1)/3}$ and $\mathbb R_{2\pi i/3}$. \begin{definition} \label{D:HSTfunctions} In which we define Heegaard splitting Morse functions and trisecting Morse $2$--functions. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \setlength{\wholedeflength}{2\halfdeflength} \addtolength{\wholedeflength}{2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} A {\em $(g;k_1,k_2,k_3)$ trisecting} Morse $2$--function $f$ on a $4$--manifold $X$ is a Morse $2$--function $f: X \to \mathbb R^2$ such that: & \textbf{Dimension three:} A {\em genus $g$ Heegard splitting} Morse function $f$ on a $3$--manifold $M$ is a Morse function $f:M \to \mathbb R$ such that: \\ \textbullet\; $\mathbf{0}=(0,0)$ is a regular value of $f$, and thus $f^{-1}(\mathbf{0}) = \Sigma$ is a closed surface, which we require to be connected of genus $g$. & \textbullet\; $0$ is a regular value of $f$, and thus $f^{-1}(0) = \Sigma$ is a closed surface, which we require to be connected of genus $g$. \\ \textbullet\; On each of the three rays $R_0$, $R_{2\pi/3}$ and $R_{4\pi/3}$, $f$ has exactly $g$ index $2$ and one index $3$ critical points, all of which have distinct critical values. & \textbullet\; On each of the two rays $R_0$ and $R_\pi$, $f$ has exactly $g$ index $2$ and one index $3$ critical points, all of which have distinct critical values. \\ \cmidrule{2-2} \multicolumn{2}{p{\wholedeflength}}{\textbullet\; Over each of sector $A_i$, the singular locus of $f$ has exactly $g+1$ components, all of which are arcs from one bounding ray of $A_i$ to the next, $k_i$ of which are indefinite folds without cusps, $(g-k_i)$ of which are indefinite folds each with exactly one indefinite cusp, and one of which (the outermost) is a definite fold. Furthermore, in $\mathbb R^2$ each of these components is transverse to each ray $R_\theta$ except at cusps, which are tangent to the rays, and $f$ restricted to the singular locus is an immersion with cusps and double points avoiding the cusps. This is illustrated in Figure~\ref{F:TrisectingM2F}.} \end{longtable} \end{definition} \begin{figure} \labellist \small\hair 2pt \pinlabel $R_0$ [l] at 157 75 \pinlabel $R_{2\pi/3}$ [r] at 32 4 \pinlabel $R_{4\pi/3}$ [r] at 32 146 \pinlabel $A_1$ at 127 13 \pinlabel $A_2$ [r] at 0 73 \pinlabel $A_3$ at 126 138 \endlabellist \centering \includegraphics{TrisectingM2F} \caption{The singular value set of a $(4;3,2,2)$ trisecting Morse $2$--function} \label{F:TrisectingM2F} \end{figure} \begin{lemma} \label{L:Fcn2Decomp} These types of functions induce the indicated manifold decompositions: \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} Given a $(g;k_1,k_2,k_3)$ trisecting Morse $2$--function $f:X \to \mathbb R^2$, let $X_i = f^{-1}(A_i)$. Then $X=X_1 \cup X_2 \cup X_3$ is a $(g;k_1,k_2,k_3)$ trisection of $X$. & \textbf{Dimension three:} Given a genus $g$ Heegaard splitting Morse function $f:M \to \mathbb R$, let $M_1 = f^{-1}(R_\pi)$ and $M_2 = f^{-1}(R_0)$. Then $M=M_1 \cup M_2$ is a genus $g$ Heegaard splitting of $X$. \end{longtable} \end{lemma} As a hint for the proof, the only nonstandard part is to prove, in the four dimensional case, that each $X_i$ is diffeomorphic to a ``genus $k$'' $4$--dimensional $1$--handlebody $Z_k$. The best way to see this is to consider orthogonal projection from the sector $A_i \subset \mathbb R^2$, which is bounded by the rays $R_{2\pi (i-1)/3}$ and $R_{2\pi i/3}$, onto the intermediate ray $R_{\pi (2i-1)/3}$. After a suitable isotopy in $\mathbb R^2$ fixed along the two bounding rays, we may assume that the only places where the image of the singular locus is vertical with respect to this orthogonal projection are the midpoints of the indefinite folds which do not have cusps and the midpoint of the definite fold. Composing $f$ with this projection can then be seen to be a Morse function on $X_i$ with only critical points of index $0$ and $1$, with one index $0$ and $k$ index $1$ critical points. Note that the distinct critical values condition (in dimension three) and double points avoiding cusps condition (in dimension four) are not strictly necessary to make the above lemma true, but we add them as a conceptual convenience. The most basic example of a Heegaard splitting Morse function is the projection $(x_1,x_2,x_3,x_4) \mapsto x_1$ on $S^3 \subset \mathbb R^4$, giving the standard genus $0$ Heegaard splitting of $S^3$. Similary, projection $(x_1,x_2,x_3,x_4,x_5) \mapsto (x_1,x_2)$ is a trisecting Morse $2$--function on $S^4 \subset \mathbb R^5$, giving the $(0,0)$ trisection of $S^4$. The reader should verify these basic facts. It is also not too hard to see a Heegaard splitting Morse function on $S^1 \times S^2$ inducing a genus $1$ Heegaard splitting, and a trisecting Morse $2$--function on $S^1 \times S^3$ inducing a $(1,1)$ trisection. Beyond this, it is in fact not usually very straightforward to write down explicit Morse functions and Morse $2$--functions, let alone ones that induce the decompositions we desire. More frequently, we understand the decomposition first, from some other description of the manifold, and from this we can understand an appropriate Morse function or $2$--function. The existence part of Theorem~\ref{T:ExUn} can, however, be proved by proving the existence of Heegaard splitting Morse functions and trisecting Morse $2$--functions. The former is standard, done by proving first the existence of Morse functions, then showing that one can cancel pairs of critical points until there is only one index $0$ and one index $3$ critical point, and finally showing that critical points can be rearranged so that their corresponding critical values increase with increasing index. A proof of the latter appears in~\cite{GayKirby} starting from a handle decomposition of the $4$--manifold, but can probably also be proved in a purely Morse $2$--function theoretic method, starting with the existence of Morse $2$--functions and then arguing that the critical locus of a Morse $2$--function can be cleaned up by a sequence of standard moves to become a trisecting Morse $2$--function. The work of Baykur and Saeki~\cite{BaykurSaeki} should provide enough tools to do this. The uniqueness part of Theorem~\ref{T:ExUn} is proved in the three dimensional case using standard Cerf theory, where stabilization of the Heegaard splitting corresponds to adding a cancelling pair of index $1$ and $2$ critical points. See~\cite{Laudenbach} for a careful exposition of this proof. The four dimensional uniqueness proof in~\cite{GayKirby} unfortunately does not follow this parallel, i.e. does not use a Morse $2$--function version of Cerf theory, but is rather more ad hoc. For the sake of completeness it would be nice to see a Cerf theoretic proof, although it is not clear if the ultimate payoff would be worth the time. One challenging but reachable example that the reader who likes working with explicit expressions might enjoy is to write down a trisecting Morse $2$--function on $\mathbb C P^2$. This can be done by suitably perturbing the following moment map: \[[z_0:z_1:z_2] \mapsto \left(\frac{|z_1|^2}{|z_0|^2+|z_1|^2+|z_2|^2},\frac{|z_2|^2}{|z_0|^2+|z_1|^2+|z_2|^2}\right)\] The moment map itself is not a Morse $2$--function, but adding a generic perturbation term should make it Morse, and careful choice of this perturbation should make it trisecting. On the other hand, one can extract a trisection directly from this moment map without perturbing it to a Morse $2$--function. Let $x = |z_1|^2/(|z_0|^2+|z_1|^2+|z_2|^2)$ and $y=|z_2|^2/(|z_0|^2+|z_1|^2+|z_2|^2)$. Then the following ``tropical'' decomposition is in fact a $(1,0)$ trisection of $X=\mathbb C P^2$, and verifying this is also a good exercise: \begin{align*} X_1 &= \{x \leq 1/4, y \leq 1/4\}\\ X_2 &= \{y \geq 1/4, y \geq x\}\\ X_3 &= \{x \geq 1/4, x \geq y\} \end{align*} This trisection is used in~\cite{LambertCole} to give a combinatorial proof of the Thom conjecture (that algebraic curves in $\mathbb C P^2$ minimize genus in their homology classes), and is also used in~\cite{LambertColeMeier} to produce minimal genus trisections of a large class of algebraic surfaces. It is well known, from standard Morse theory, that stabilization of a Heegaard splitting can be realized via a homotopy of Morse functions supported in a ball, in which a cancelling pair of index $1$ and $2$ critical points is born near the Heegaard surface. Similarly, stabilization of a trisection can be realized via a homotopy of Morse $2$--functions supported in a ball; this is the ``introduction of an eye'' discussed in Section~5 of~\cite{GayKirby}. \section{The diagrammatic perspective} \label{S:Diagrams} \begin{definition} Given a finite collection $\mathbf{\alpha}=\{\alpha_1,\ldots,\alpha_n\}$ of disjoint simple closed curves on an oriented surface $\Sigma$, given two of these curves $\alpha_i$ and $\alpha_j$ and an arc $a$ joining $\alpha_i$ and $\alpha_j$ and otherwise disjoint from the $\alpha$ curves, one can produce a new collection of curves $\mathbf{\alpha'}=\{\alpha'_1, \ldots, \alpha'_n\}$ by {\em sliding $\alpha_i$ over $\alpha_j$ along $a$} as follows: For $k \neq i$, $\alpha_k$ is unchanged, i.e. $\alpha'_k = \alpha_k$, while $\alpha_i'$ is the unique boundary component of a regular neighborhood of $\alpha_i \cup a \cup \alpha_j$ which is not isotopic to either $\alpha_i$ or $\alpha_j$ (see Figure~\ref{F:Slide}). Two collections of disjoint simple closed curves on the same surface are {\em slide equivalent} if one can be transformed to the other by a sequence of handle slides and isotopies. Two pairs of collections of simple closed curves $(\alpha,\beta)$ and $(\alpha',\beta')$ on the same surface are {\em slide equivalent} if $\alpha$ is slide equivalent to $\alpha'$ and $\beta$ is slide equivalent to $\beta'$. Two triples $(\Sigma,\alpha,\beta)$ and $(\Sigma',\alpha',\beta')$ are {\em slide diffeomorphic} if $(\alpha,\beta)$ is slide equivalent to some $(\alpha'',\beta'')$ such that $(\Sigma,\alpha'',\beta'')$ is orientation preserving diffeomorphic to $(\Sigma',\alpha',\beta')$. \end{definition} \begin{figure} \labellist \small\hair 2pt \pinlabel $\alpha_i$ [b] at 50 11 \pinlabel $\alpha'_i$ [bl] at 83 80 \pinlabel $\alpha_j$ [b] at 181 11 \pinlabel $a$ [b] at 114 50 \endlabellist \centering \includegraphics{Slide} \caption{A handle slide.} \label{F:Slide} \end{figure} \begin{definition} \label{D:StdDiagrams} In which we define Heegaard and trisection diagrams. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} A {\em $(g;k_1,k_2,k_3)$ trisection diagram} is a tuple $(\Sigma,\alpha,\beta,\gamma)$ where $\Sigma$ is a closed oriented surface of genus $g$ and the triples $(\Sigma,\alpha,\beta)$, $(\Sigma,\beta,\gamma)$ and $(\Sigma,\gamma,\delta)$ are each slide diffeomorphic to the standard Heegaard diagram $(\Sigma_g,\alpha^{g,k_i},\beta^{g,k_i})$ shown in Figure~\ref{F:StdDiagramsTri}. (Here $i=1$ for $(\alpha,\beta)$, $i=2$ for $(\beta,\gamma)$ and $i=3$ for $(\gamma,\alpha)$.) & \textbf{Dimension three:} A {\em genus $g$ Heegaard diagram} is a tuple $(\Sigma,\alpha,\beta)$ where $\Sigma$ is a closed oriented surface of genus $g$ and the pairs $(\Sigma,\alpha)$ and $(\Sigma,\beta)$ are both diffeomorphic to the standard pair $(\Sigma_g,\alpha^g)$ shown in Figure~\ref{F:StdDiagramsHS}. \end{longtable} \end{definition} \begin{figure} \begin{subfigure}[c]{\textwidth} \labellist \small\hair 2pt \pinlabel $k_i$ [t] at 74 8 \pinlabel $g-k_i$ [t] at 218 10 \endlabellist \centering \includegraphics{StdDiagramsTri} \caption{Standard Heegaard diagrams $(\Sigma_g,\alpha^{g,k_i},\beta^{g,k_i})$} \label{F:StdDiagramsTri} \end{subfigure} % \begin{subfigure}[c]{\textwidth} \labellist \small\hair 2pt \pinlabel $g$ [t] at 73 6 \endlabellist \centering \includegraphics{StdDiagramsHS} \caption{Standard genus $g$ cut system $(\Sigma_g,\alpha^g)$} \label{F:StdDiagramsHS} \end{subfigure} \caption{Standard diagrams needed for the definition of trisection and Heegaard diagrams. Red is $\alpha$ and blue is $\beta$.} \label{F:StdDiagrams} \end{figure} \pagebreak Note that any system of curves $\alpha$ on a surface $\Sigma$ of genus $g$ such that $(\Sigma,\alpha) \cong (\Sigma_g, \alpha^g)$ is called a {\em cut system}, and cut systems are more standardly characterized by the property that they cut the ambient surface into a punctured sphere. We should think of $(\Sigma_g, \alpha^g)$ as the ``standard genus $g$ cut system''. The reader should now verify that all the diagrams in Figure~\ref{F:TriDiagExamples} are in fact trisection diagrams. The genus $3$ example is the only one in which handle slides are required to exhibit the standardness of pairs of colors. An instructive additional exercise is simply to try to draw new nontrivial diagrams from scratch; here ``nontrivial'' would first mean not diffeomorphic to connected sums of any of these examples, and at a second pass, not slide diffeomorphic to connected sums of these. Of special interest are diagrams which cannot be made ``simultaneously standard'' in the sense that no slides are needed to exhibit pairwise standardness. In thinking carefully about this problem one may discover the following fact: Simultaneously standard trisection diagrams are in fact connected sums of diagrams of genus $1$ and $2$. This is proved by thinking about the euler characteristic and number of boundary components of chains of curves each intersecting the next once. \begin{figure} \centering \includegraphics{TriDiagExamples} \caption{A selection of trisection diagrams. Red is $\alpha$, blue is $\beta$ and green is $\gamma$.} \label{F:TriDiagExamples} \end{figure} \begin{lemma} In which we relate Heegaard and trisection diagrams to Heegaard splittings and trisections. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} Given a trisection diagram $\mathcal D= (\Sigma,\alpha,\beta,\gamma)$ there is a $4$--manifold $X = X(\mathcal D)$ with trisection $\mathcal T(\mathcal D)= (X,X_1,X_2,X_3)$ such that $\Sigma = X_1 \cap X_2 \cap X_3$, oriented according to the conventions in Definition~\ref{D:HSandTri}, and such that the $\alpha$ curves bound embedded disks in $X_3 \cap X_1$, the $\beta$ curves in $X_1 \cap X_2$ and the $\gamma$ curves in $X_2 \cap X_3$. & \textbf{Dimension three:} Given a Heegaard diagram $\mathcal D = (\Sigma,\alpha,\beta)$ there is a $3$--manifold $M=M(\mathcal D)$ with Heegaard splitting $\mathcal S(\mathcal D) = (M,M_1,M_2)$ such that $\Sigma = M_1 \cap M_2$, oriented according to the conventions in Definition~\ref{D:HSandTri}, and such that the $\alpha$ curves bound embedded disks in $M_1$ and the $\beta$ curves bound embedded disks in $M_2$. \\ \textbullet\; Any other trisected $4$--manifold satisfying these same properties with respect to the given diagram $\mathcal D$ is in fact orientation preserving diffeomorphic to $\mathcal T(\mathcal D)$. & \textbullet\; Any other Heegaard split $3$--manifold satisfying these same properties with respect to the given diagram $\mathcal D$ is in fact orientation preserving diffeomorphic to $\mathcal S(\mathcal D)$. \\ \textbullet\; For every trisection $\mathcal T=(X,X_1,X_2,X_3)$ of a $4$--manifold $X$ there is a trisection diagram $\mathcal D$ such that $\mathcal T \cong \mathcal T(\mathcal D)$. & \textbullet\; For every Heegaard splitting $\mathcal S=(M,M_1,M_2)$ of a $3$--manifold $M$ there is a Heegaard diagram $\mathcal D$ such that $\mathcal S \cong \mathcal S(\mathcal D)$. \end{longtable} \end{lemma} \pagebreak The proof is again left as an exercise. In dimension three, the key point is that any collection of curves on $\Sigma$ diffeomorphic to $(\Sigma_g,\alpha^g)$ (a cut system) uniquely determines a handlebody filling of $\Sigma$ in which these curves bound disks. In dimension four we need this fact, the fact that the standard Heegaard diagram $(\Sigma^g,\alpha^{g,k},\beta^{g,k})$ used in the definition of trisection diagram is a diagram for $\#^k (S^1 \times S^2)$, and the fact~\cite{LaudPoen} that any self diffeomorphism of $\#^k (S^1 \times S^2)$ extends to a self diffeomorphism of $\#^k (S^1 \times B^3)$. Now we consider how the uniqueness statement for Heegaard splittings of $3$--manifolds and trisections of $4$--manifolds translates into the world of diagrams. \begin{definition} In which we define certain standard diagrams used in the stabilization process. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} The standard $(1;1,0,0)$ trisection diagram for $S^4$ is the diagram $\mathcal D^*_1 = (T^2,\mu,\mu,\lambda)$ shown in Figure~\ref{F:StableTri}. Cyclically permuting the curve systems gives the standard $(1;0,1,0)$ diagram $\mathcal D^*_2$ and the standard $(1;0,0,1)$ diagram $\mathcal D^*_3$. & \textbf{Dimension three:} The standard genus $1$ Heegaard diagram for $S^3$ is the diagram $\mathcal D^* = (T^2,\mu,\lambda)$ shown on the right in Figure~\ref{F:StableHS}. \end{longtable} \end{definition} \begin{figure} \begin{subfigure}[c]{.5\textwidth} \centering \includegraphics{StableTri} \caption{Stabilizing trisection diagram $\mathcal D^*_1$} \label{F:StableTri} \end{subfigure} % \begin{subfigure}[c]{.5\textwidth} \centering \includegraphics{StableHS} \caption{Stabilizing Heegaard diagram $\mathcal D^*$} \label{F:StableHS} \end{subfigure} \caption{Standard stabilization diagrams} \label{F:StableDiagrams} \end{figure} The implication in the above definitions is of course that $\mathcal S(\mathcal D_1)$ is a Heegaard splitting of $S^3$ and that $\mathcal T(\mathcal D_{(1;1,0,0)})$ is a trisection of $S^4$ (and the same for the other two standard trisection diagrams). The reader should verify these facts, and also verify the following: \begin{proposition} \label{P:StabilizingDiagrams} In which we relate stabilization of splittings and trisections to diagrams. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} Given a trisection diagram $\mathcal D$ with associated trisected $4$--manifold $\mathcal T = \mathcal T(\mathcal D)$, let $\mathcal T'$ be the result of an $i$--stabilization of $\mathcal T$. Then $\mathcal T' \cong \mathcal T(\mathcal D \# \mathcal D^*_i)$. & \textbf{Dimension three:} Given a Heegaard diagram $\mathcal D$ with associated Heegaard split $3$--manifold $\mathcal S = \mathcal S(\mathcal D)$, let $\mathcal S'$ be the result of stabilizing $\mathcal S$. Then $\mathcal S' \cong \mathcal S(\mathcal D \# \mathcal D_1)$. \\ \textbullet\; Given two trisection diagrams $\mathcal D$ and $\mathcal D'$, with \[ \mathcal T(\mathcal D) = (X,X_1,X_2,X_3) \] and \[ \mathcal T(\mathcal D') = (X',X'_1,X'_2,X'_3), \] we have that $X \cong X'$ if and only if, for some $k_1, k_2, k_3$ and $k'_1,k'_2,k'_3$, the following two trisection diagrams are slide diffeomorphic: \[\mathcal D \# (\#^{k_1} \mathcal D^*_1) \# (\#^{k_2} \mathcal D^*_2) \# (\#^{k_3} \mathcal D^*_3)\] and \[\mathcal D' \# (\#^{k'_1} \mathcal D^*_1) \# (\#^{k'_2} \mathcal D^*_2) \# (\#^{k'_3} \mathcal D^*_3)\] & \textbullet\; Given two Heegaard diagrams $\mathcal D$ and $\mathcal D'$, with \[\mathcal S(\mathcal D) = (M,M_1,M_2)\] and \[\mathcal S(\mathcal D') = (M',M'_1,M'_2),\] we have that $M \cong M'$ if and only if, for some $k$ and $k'$, the following two Heegaard diagrams are slide diffeomorphic: \[\mathcal D \# (\#^k \mathcal D^*)\] and \[\mathcal D' \# (\#^{k'} \mathcal D^*)\] \end{longtable} \end{proposition} Now we discuss trisection diagrams in relation to trisecting Morse $2$--functions; the phenomena discussed here are unique to the $4$--dimensional setting and do not have obvious $3$--dimensional analogues. Recall the notation from Section~\ref{S:Morse}, in particular the ``trisection'' of $\mathbb R^2$ as $\mathbb R^2 = A_1 \cup A_2 \cup A_3$, the labelling of rays $R_\theta$ by angle $-\theta$ to the positive $x$--axis, and the identification of each ray with $[0,\infty)$. Fix a closed $4$--manifold $X$ with a trisecting Morse $2$--function $f: X \to \mathbb R^2$, and consider the induced trisection $X = X_1 \cup X_2 \cup X_3$, where $X_i = f^{-1}(A_i)$, as in Lemma~\ref{L:Fcn2Decomp}. We can read off a trisection diagram from the function $f$ and a (generic) choice of gradient-like vector field over each ray $R_{2\pi i/3}$, since this data gives us descending manifolds for each of the index $2$ critical points in each handlebody, i.e. a handle decomposition of each handlebody, with the attaching ``spheres'' in the central surface $\Sigma = X_1 \cap X_2 \cap X_3$ being a collection of simple closed curves $\alpha$, $\beta$ or $\gamma$. What we would like to emphasize here is that there is more information available in a Morse $2$--function than just in the trisection diagram. In fact, if we choose a smoothly varying family of gradient-like vector fields over the rays $R_\theta$, i.e. on each $f^{-1}(R_\theta)$ we choose a gradient-like vector field $V_\theta$ for the Morse functions $f_\theta : R_\theta \to [0,\infty)$, smooth in $\theta$, then we can look at the descending manifolds for the index $2$ critical points of $f_\theta$ in $\Sigma = f_\theta^{-1}(0)$. There we will see a ``moving family'' of cut systems, mostly moving by isotopy but, at isolated times, experiencing discrete moves. More precisely, from a trisecting Morse $2$--function on a closed $4$--manifold $X$, we can first arrange that all the cusps in each sector appear at the same $\theta$ value, and then choosing one representative $\theta$--value during each $\theta$ interval when only isotopies occur, we can produce an {\em augmented trisection diagram} \[ (\Sigma, \alpha^1, \ldots, \alpha^a, \beta^1, \ldots, \beta^b, \gamma^1, \ldots, \gamma^c) \] satisfying the following properties: \begin{itemize} \item For any indices $i$, $j$ and $k$, $(\Sigma, \alpha^i, \beta^j, \gamma^k)$ is a trisection diagram for $X$. \item The cut system $\alpha^{i+1}$ is obtained from $\alpha^i$ by a single handle slide, and similary for the $\beta$'s and $\gamma$'s. \item The Heegaard diagrams $(\Sigma,\alpha^a,\beta^1)$, $(\Sigma,\beta^b,\gamma^1)$ and $(\Sigma,\gamma^c,\alpha^1)$ are each {\em diffeomorphic} (not just slide diffeomorphic) to the standard diagram $(\Sigma_g, \alpha^{g,k_i}, \beta^{g,k_i})$. \end{itemize} (If we think of cut systems as {\em ordered lists} of simple closed curves, ordered by the relative heights of the corresponding critical points, rather than just as {\em sets} of simple closed curves, then we should also include transposition of two adjacent curves in the list as a move, and this would correspond to one critical point rising above another.) In what sense does this augmented trisection diagram contain more information than an ordinary trisection diagram? The main point is that rather than simply asserting that each pair $(\Sigma,\alpha,\beta)$, $(\Sigma,\beta,\gamma)$ and $(\Sigma,\gamma,\alpha)$ is slide diffeomorphic to a standard Heegaard diagram, with the augmented diagram we now know exactly {\em how} to slide handles to get each pair to be standard. This in turn means that, rather than simply appealing to Laudenbach and Po\'enaru to assert that we can fill in each sector with $\natural^k S^1 \times B^3$, i.e. with $3$--handles and a $4$--handle, and that any way of filling in is as good as any other way, we actually explicitly see the attaching maps for the $3$--handles. Also, the minimum length $a+b+c$ of an augmented trisection diagram for a given trisection is a measure of the complexity of the trisection, which should be of interest and is closely related to certain complexity measures coming from simplicial complexes associated to curve systems on surfaces; see~\cite{KirbyThompson} for example. \section{$4$--manifolds with boundary} One advantage to thinking of trisections from a Morse $2$--function perspective is that this gives us the most natural definition of a trisection of a $4$--manifold with boundary. \begin{definition} In Definition~\ref{D:HSTfunctions}, we assumed that the manifolds we were working with were closed. Now suppose they have nonempty boundary instead. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \setlength{\wholedeflength}{2\halfdeflength} \addtolength{\wholedeflength}{2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} A {\em $(g,k)$ trisecting} Morse $2$--function $f$ on a $4$--manifold $X$ with nonempty connected boundary is a Morse $2$--function $f: X \to \mathbb R^2$ such that: & \textbf{Dimension three:} A {\em genus $g$ Heegard splitting} Morse function $f$ on a $3$--manifold $M$ with nonempty connected boundary is a Morse function $f:M \to \mathbb R$ such that: \\ \textbullet\; $f(X) = D^2$. & \textbullet\; $f(M) = [-1,1]$. \\ \textbullet\; For all points $p \in S^1 = \partial D^2$, $f^{-1}(p)$ is a compact surface with boundary, contained in $\partial X$, and in fact the restriction of $f$ to $f^{-1}(S^1)$ is a compact surface bundle over $S^1$. & \textbullet\; $f^{-1}(1)$ and $f^{-1}(-1)$ are diffeomorphic compact surfaces with boundary, contained in $\partial M$. \\ \textbullet\; The closure of the complement of $f^{-1}(S^1)$ in $\partial M$ is diffeomorphic to $B \times D^2$, for $B$ a collection of circles and with $f$ being projection onto the $D^2$ factor. For each $p \in S^1$, $B \times \{p\}$ is the boundary of $f^{-1}(p)$. & \textbullet\; The closure of the complement of $f^{-1}(\{-1,1\})$ in $\partial M$ is diffeomorphic to $B \times [-1,1]$, for $B$ a collection of circles and with $f$ being projection onto the $[-1,1]$ factor. $B \times \{-1\}$ is the boundary of $f^{-1}(-1)$ and $B \times \{1\}$ is the boundary of $f^{-1}(1)$. \\ \textbullet\; $\mathbf{0}=(0,0)$ is a regular value of $f$, and thus $f^{-1}(\mathbf{0}) = \Sigma$ is a compact surface with boundary, where $\partial \Sigma = B \times \{\mathbf{0}\} \subset B \times D^2$. & \textbullet\; $0$ is a regular value of $f$, and thus $f^{-1}(0) = \Sigma$ is a compact surface with boundary, where $\partial \Sigma = B \times \{0\} \subset B \times [-1,1]$. \\ \textbullet\; On each of the three rays $R_0$, $R_{2\pi/3}$ and $R_{4\pi/3}$, $f$ has only index $2$ critical points, all of which have distinct critical values which lie in the interiors of the rays (with the same number of critical points on each ray). & \textbullet\; On each of the two rays $R_0$ and $R_\pi$, $f$ has only index $2$ critical points, all of which have distinct critical values which lie in the interiors of the rays (with the same number of critical points on each ray). \\ \cmidrule{2-2} \multicolumn{2}{p{\wholedeflength}}{\textbullet\; Over each of the three sectors $A_1$, $A_2$ and $A_3$, each component of the singular locus of $f$ is an arc from one bounding ray of $A_i$ to the next, with at most one cusp per component. All folds are indefinite folds. Furthermore, in $\mathbb R^2$ each of these components is transverse to each ray $R_\theta$ except at cusps, which are tangent to the rays, and $f$ restricted to the singular locus is an immersion with cusps and double points avoiding the cusps.} \end{longtable} \end{definition} From this we can give the following definition: \begin{definition} Let $X$, resp. $M$, be a compact $4$--manifold, resp. $3$--manifold, with nonempty connected boundary. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} A {\em relative trisection} of $X$ is a decomposition $X = X_1 \cup X_2 \cup X_3$ for which there exists a trisecting Morse $2$--function $f: M \to \mathbb R^2$ with $X_i = f^{-1}(A_i)$. & \textbf{Dimension three:} A {\em sutured Heegaard splitting} of $M$ is a decomposition $M=M_1 \cup M_2$ for which there exists a Heegaard splitting Morse function $f: M \to \mathbb R$ with $M_1 = f^{-1}(R_\pi)$ and $M_2 = f^{-1}(R_0)$. \end{longtable} \end{definition} These are not the standard definitions, but we feel that the Morse theoretic perspective better conveys the central idea. The standard definitions can be recovered with some observations/exercises: \begin{itemize} \item Starting in \textbf{dimension three}, the induced structure on $\partial M$ is a decomposition $\partial M = -R_- \cup ([-1,1] \times \partial R_-) \cup R_+$, where $R_-$ and $R_+$ are diffeomorphic oriented compact surfaces with boundary. A $3$--manifold with such a structure on its boundary is a balanced sutured $3$--manifold. \item The two pieces $M_1$ and $M_2$ can each be viewed as either {\em sutured compression bodies} from the central surface $\Sigma = f^{-1}(0)$ to $R_\pm$ or as handlebodies, where $\partial M_1 = \Sigma \cup ([-1,0] \times \partial \Sigma) \cup -R_-$ and $\partial M_2 = -\Sigma \cup ([0,1] \times \partial \Sigma) \cup R_+$. \item The $3$--dimensional part of definition~\ref{D:Stab}, stabilization of Heegaard splittings, makes sense in this relative setting, assuming the stabilizing arc lies entirely in the interior of $M$. The assertion that the result is again a sutured Heegaard splitting, using the Morse theoretic definition of splitting given above, requires seeing that stabilization is achieved by perturbing the Morse function to introduce a cancelling $1$--$2$ critical point pair. \item Moving to \textbf{dimension four}, the induced structure on $\partial X$ is an open book decomposition, namely a decomposition into a surface bundle over $S^1$ ($E \subset \partial X$ with $f: E \to S^1$) and a disjoint union of solid tori $B \times D^2$, such that the boundary of each fiber $f^{-1}(\theta)$ of the surface bundle (each ``page'') is the link $B \times \{\theta\}$ in $B \times D^2$. These pages are traditionally extended by adding on the annuli $B \times R_\theta$, to get Seifert surfaces for the link $B \times \mathbf{0}$, the ``binding'' of the open book. \item Each pairwise intersection $X_i \cap X_j$ is a sutured compression body from the central surface $\Sigma = f^{-1}(\mathbf{0})$ to the page $f^{-1}(e^{2\pi i/3})$ (identifying $\mathbb R^2$ with $\mathbb C$). \item Each piece $X_i$ is a $4$--dimensional $1$--handlebody, but it's boundary comes with a decomposition into three pieces: $\partial X_i = (X_i \cap X_{i-1}) \cup (X_i \cap X_{i+1}) \cup (X_i \cap \partial X)$. The first two pieces are the above mentioned sutured compression bodies, and the third part $X_i \cap \partial X$ is one third of the open book decomposition of $\partial X$. \item The {\em internal portion} of $\partial X_i$, i.e. the closure of $\partial X_i \setminus \partial X$, comes equipped with a sutured Heegaard splitting, i.e $(X_i \cap X_{i-1}) \cup (X_i \cap X_{i+1})$. \item In fact each such $X_i$ is diffeomorphic to $C_i \times [-1,1]$ for some sutured compression body $C_i$ from some surface $\Sigma'$ to the page $f^{-1}(e^{2\pi i/3})$, with the internal portion of $\partial X_i$ being diffeomorphic to $(C_i \times \{-1\}) \cup (\Sigma' \times [-1,1]) \cup (C_i \times \{1\})$. \item Note that the preceding item also gives a sutured Heegaard splitting of the internal portion of $\partial X_i$, namely as the union of $(C_i \times \{-1\}) \cup (\Sigma' \times [-1,0])$ and $(C_i\times \{1\}) \cup (\Sigma' \times [0,1])$. The previous Heegaard splitting $(X_i \cap X_{i-1}) \cup (X_i \cap X_{i+1})$ is a stabilization of this Heegaard splitting. \item The $4$--dimensional version of stabilization in Definition~\ref{D:Stab} also now makes sense, again assuming the stabilizing lies entirely in the interior of $X$. Seeing that the result is again a relative trisection according to our definition of relative trisections as coming from trisecting Morse $2$--functions requires seeing that stabilization can be achieved by a perturbation of the Morse $2$--function. The stabilization takes place in a neighborhood of a boundary parallel arc in some $X_{i-1} \cap X_{i+1}$. The perturbation of the Morse $2$--function takes place in a neighborhood of that arc and its boundary parallelizing disk, and literally pulls the arc from lying over $A_{i-1} \cap A_{i+1}$ back to lying over $A_i$. This is discussed in detail in~\cite{GayKirby}. \end{itemize} The fundamental existence and uniqueness result from the closed case still holds in this relative setting, provided we work relative to fixed boundary data: \begin{theorem}[Existence and Uniqueness] \label{T:ExUnRel} The above decompositions exist and are unique up to stabilization relative to fixed boundary data. More precisely: \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} Given any open book decomposition on the boundary $\partial X$ of a compact connected oriented $4$--manifold with nonempty connected boundary, there exists a relative trisection of $X$ inducing this open book on $\partial X$. Any two trisections of the same $4$--manifold inducing the same open book on the boundary become isotopic after some number of stabilizations~\cite{GayKirby}. & \textbf{Dimension three:} Given any balanced sutured decomposition of the boundary of a compact connected oriented $3$--manifold $M$ with nonempty connected boundary, there exists a sutured Heegaard splitting on $M$ inducing the sutured structure on $\partial M$. Any two sutured Heegaard splittings of the same $3$--manifold inducing the same boundary data become isotopic after some number of stabilizations. \end{longtable} \end{theorem} \begin{theorem}[Gluing] These relative decompositions are especially useful because they can be glued together when the boundary data agree. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} Given relatively trisected $4$--manifolds $X = X_1 \cup X_2 \cup X_3$ and $X' = X'_1 \cup X'_2 \cup X'_3$ and an orientation reversing diffeomorphism $\phi : \partial X \to \partial X'$ respecting the induced open book decompositions, then the following decomposition of the closed $4$--manifold $\tilde{X} = X \cup_\phi X'$ is a trisection~\cite{Castro}: \[ \tilde{X} = (X_1 \cup_\phi X'_1) \cup (X_2 \cup_\phi X'_2) \cup (X_3 \cup_\phi X'_3) \] & \textbf{Dimension three:} Given $3$--manifolds with sutured Heegaard splittings $M=M_1 \cup M_2$ and $M'=M'_1 \cup M'_2$ and an orientation reversing diffeomorphism $\phi: \partial M \to \partial M'$ respecting the induced sutured decompositions, then the following decomposition of the closed $3$--manifold $\tilde{M} = M \cup_\phi M'$ is a Heegaard splitting: \[ \tilde{M}= (M_1 \cup_\phi M'_1) \cup (M_2 \cup_\phi M'_2) \] \end{longtable} \end{theorem} The reader should prove the $3$--dimensional statement as an exercise. The $4$--dimensional statement takes more work. An important example of the boundary data one might consider comes, in both cases, when studying a knot complement. In dimension three, a classical knot $K$ in $S^3$ gives rise to its exterior $E(K) = S^3 \setminus \nu(K)$, a $3$--manifold with boundary parametrized as $S^1 \times S^1$, where the first $S^1$ factor is the meridian, i.e. the boundary of $D^2$ in $\nu(K) \cong D^2 \times S^1$. Then (see Figure~\ref{F:SuturedKnotComplement}) identifying the second $S^1$ factor as $\partial ([-1,1] \times [-1,1])$, we can decompose $\partial E(K)$ as $-R_- \cup (\partial R_i \times [-1,1]) \cup R_+$ where $R_- = S^1 \times [-1,1] \times \{-1\}$, $R_+ = S^1 \times [-1,1] \times \{1\}$ and $\partial R_- \times [-1,1] = S^1 \times \{-1,1\} \times [-1,1]$. A sutured Heegaard splitting of $E(K)$ with respect to these sutures is precisely the restriction of an ordinary Heegaard splitting of $S^3$ to $E(K)$ when $E(K)$ is in $1$--bridge position with respect to this splitting (equivalently, when $K$ is represented by a doubly pointed Heegaard diagram). Also, it is not important here that the knot $K$ is in $S^3$, the same construction works in any closed $3$--manifold. But in $S^3$ this is the standard construction used to apply sutured Floer homology to knot complements~\cite{Juhasz}. \begin{figure} \centering \includegraphics{SuturedKnotComplement} \caption{A knot in $1$--bridge position giving a sutured Heegaard splitting.}\label{F:SuturedKnotComplement} \end{figure} In dimension four, a knotted sphere $K: S^2 \ensuremath{\hookrightarrow} S^4$ has exterior $E(K)$ with $\partial E(K)$ parametrized as $S^1 \times S^2$, again with the first $S^1$ factor being the meridian, i.e. the boundary of $D^2$ in $\nu(K) \cong D^2 \times S^2$. Now if we identify $S^2$ with $\partial ([-1,1] \times D^2)$, we get a natural open book decomposition on $\partial E(K)$, where the surface bundle part is the annulus bundle $S^1 \times [-1,1] \times S^1$, projecting onto the second $S^1$ factor, and the neighborhood of the binding is the union of two solid tori $S^1 \times \{-1,1\} \times D^2$. We can use the existence theorem above to conclude that this open book extends to a relative trisection of the exterior, but in fact~\cite{GayMeier} shows that such a relative trisection is actually the restriction to $E(K)$ of an ordinary trisection of $S^4$ when the sphere $K$ is in ``$1$--bridge trisection position'' with respect to this trisection, and~\cite{MeierZupanGenBridge} shows how to put any sphere in such a position. As above, being in $S^4$ is not essential. It remains to discuss relative trisections from the diagrammatic perspective. \begin{definition} \label{D:RelDiagrams} In which we define sutured Heegaard diagrams and relative trisection diagrams. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} A relative trisection diagram is a tuple $(\Sigma,\alpha,\beta,\gamma)$ where $\Sigma$ is a compact oriented surface with nonempty boundary and the triples $(\Sigma,\alpha,\beta)$, $(\Sigma,\beta,\gamma)$ and $(\Sigma,\gamma,\delta)$ are each slide diffeomorphic to a standard sutured Heegaard diagram as shown in Figure~\ref{F:StdDiagramsRelTri}. & \textbf{Dimension three:} A sutured Heegaard diagram is a tuple $(\Sigma,\alpha,\beta)$ where $\Sigma$ is a compact oriented surface with nonempty boundary and the pairs $(\Sigma,\alpha)$ and $(\Sigma,\beta)$ are both diffeomorphic to a standard pair as shown on the right in Figure~\ref{F:StdDiagramsRelHS}. \end{longtable} \end{definition} \begin{figure} \begin{subfigure}[c]{\textwidth} \centering \includegraphics{StdDiagramsRelTri} \caption{Standard sutured Heegaard diagrams for definition of relative trisection diagram.} \label{F:StdDiagramsRelTri} \end{subfigure} % \begin{subfigure}[c]{\textwidth} \centering \includegraphics{StdDiagramsSutHS} \caption{Standard curve system for definition of sutured Heegaard diagram.} \label{F:StdDiagramsRelHS} \end{subfigure} \caption{Standard diagrams needed for the definition of relative trisection and sutured Heegaard diagrams.} \label{F:StdRelDiagrams} \end{figure} Note that we have dropped reference to the genus and other parameters describing the exact standard diagrams used for these definitions since the naming of the parameters at this point seems not to be helpful. Other references take care to name the genus, number of boundary components, number of curves, and so forth. Parts of the following result can be proved as basic exercises in both dimensions, but in dimension four the heart of the result is perhaps nontrivial and is proved in~\cite{CastroGayPinzon}, to which the reader is referred. \begin{proposition} In which we relate sutured Heegaard diagrams and relative trisection diagrams to sutured Heegaard splittings and relative trisections. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension four:} Given a relative trisection diagram $\mathcal D= (\Sigma,\alpha,\beta,\gamma)$ there is a compact $4$--manifold $X = X(\mathcal D)$ with nonempty connected boundary with relative trisection $\mathcal T(\mathcal D)= (X,X_1,X_2,X_3)$ such that $\Sigma = X_1 \cap X_2 \cap X_3$, oriented according to the conventions in Definition~\ref{D:HSandTri}, and such that the $\alpha$ curves bound embedded disks in $X_3 \cap X_1$, the $\beta$ curves in $X_1 \cap X_2$ and the $\gamma$ curves in $X_2 \cap X_3$. & \textbf{Dimension three:} Given a sutured Heegaard diagram $\mathcal D = (\Sigma,\alpha,\beta)$ there is a sutured $3$--manifold $M=M(\mathcal D)$ with sutured Heegaard splitting $\mathcal S(\mathcal D) = (M,M_1,M_2)$ such that $\Sigma = M_1 \cap M_2$, oriented according to the conventions in Definition~\ref{D:HSandTri}, and such that the $\alpha$ curves bound embedded disks in $M_1$ and the $\beta$ curves bound embedded disks in $M_2$. \\ \textbullet\; Any other relatively trisected $4$--manifold satisfying these same properties with respect to the given diagram $\mathcal D$ is in fact orientation preserving diffeomorphic to $\mathcal T(\mathcal D)$. & \textbullet\; Any other $3$--manifold with a sutured Heegaard splitting satisfying these same properties with respect to the given diagram $\mathcal D$ is in fact orientation preserving diffeomorphic to $\mathcal S(\mathcal D)$. \\ \textbullet\; For every relative trisection $\mathcal T=(X,X_1,X_2,X_3)$ of a $4$--manifold $X$ there is a relative trisection diagram $\mathcal D$ such that $\mathcal T \cong \mathcal T(\mathcal D)$. & \textbullet\; For every sutured Heegaard splitting $\mathcal S=(M,M_1,M_2)$ of a $3$--manifold $M$ there is a sutured Heegaard diagram $\mathcal D$ such that $\mathcal S \cong \mathcal S(\mathcal D)$. \end{longtable} \end{proposition} Coming full circle to the Morse theoretic perspective, the last assertion in the result above, that sutured Heegaard splittings and relative trisections come from diagrams, can be shown by seeing that a Morse function or Morse $2$--function inducing the given decomposition yields, via the appropriate gradient-like vector fields, descending manifolds for the index $2$ critical points that intersect the central surface in precisely the curves of the diagram. \section{Surfaces in $4$--manifolds} Meier and Zupan in~\cite{MeierZupanBridge} introduced the notion of bridge trisections of surfaces embedded in $S^4$, as the natural trisected generalization of bridge splittings of knots in $S^3$, and further generalized this to embedded surfaces in arbitrary $4$--manifolds. Following our theme, we introduce these decompositions from a Morse theoretic point of view. To do this we begin with something easier than Definition~\ref{D:MorseMorse2}: \begin{definition} \label{D:MorseMorse2LowD} In which we define Morse functions and Morse $2$--functions in the limited context of dimensions one and two. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \setlength{\wholedeflength}{2\halfdeflength} \addtolength{\wholedeflength}{2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension two:} A {\em Morse $2$--function} on a $2$--manifold $S$ is a smooth function $f: S \to \mathbb R^2$ which, at every point $p \in S$, has one of the following three forms with respect to appropriate local coordinates $(t,x)$ near $p$ and $(u,v)$ near $f(p)$: & \textbf{Dimension one:} A {\em Morse function} on a $1$--manifold $K$ is a smooth function $f: K \to \mathbb R$ which, at every point $p \in M$, has one of the following two forms with respect to appropriate local coordinates $x$ near $p$ and $u$ near $f(p)$: \\ \textbullet\; $(t,x) \mapsto (u=t,v=x)$; here $p$ is called a {\em regular point}. & \textbullet\; $x \mapsto u=x$; here $p$ is called a {\em regular point}. \\ \textbullet\; $(t,x) \mapsto (u=t, v = \pm x^2)$; here $p$ is called a {\em fold point}; in this dimension all folds are definite. & \textbullet\; $x \mapsto u = \pm x^2$; here $p$ is called a {\em critical point}, of index $0$ if $u=x^2$ and index $1$ if $u=-x^2$. \\\cmidrule{2-2} \multicolumn{2}{p{\wholedeflength}}{\textbullet\; $(t,x) \mapsto (u=t, v= x^3 - t x)$; here $p$ is called a {\em cusp point}.} \end{longtable} \end{definition} Here are the parallel basic facts to check (again assume that the domain of $f$ is closed): \begin{itemize} \item In both cases the inverse image of a regular value is an even number of points. \item In both cases the singular locus, the set of all critical points, is a closed codimension one submanifold, i.e. a finite collection of points in dimension one and a finite collection of embedded circles in dimension two. \item In dimension two, the cusp points form a finite collection of points on the singular locus. \item Via a small perturbation one may assume that the critical points of a Morse function have distinct critical values \item Letting $Z$ be the singular locus of a Morse $2$--function $f$, via a small perturbation one may assume that $f|_Z$ is an immersion with semicubical cusps, with at worst double point self intersections, none of which occur at cusps. \item If $f:S \to \mathbb R^2$ is a Morse $2$--function and $A$ is an arc in $\mathbb R^2$ avoiding the cusps and transverse to the image of the singular locus, then $K = f^{-1}(A)$ is a $1$--manifold in $X$, with $\partial K = f^{-1}(\partial A)$. \item Furthermore, if we identify $A$ with an interval in $\mathbb R$ via some embedding $A \hookrightarrow \mathbb R$ then $f|_M :M \to A$ is a Morse function with critical points where $A$ crosses folds. Reversing the orientation of $A$ changes the indices of these critical points, with index $0$ becoming index $1$ and vice versa. \item Crossing a definite fold in the index $0$ direction adds a new pair of points to the fiber while crossing in the index $1$ direction removes such a pair. \end{itemize} \begin{definition} \label{D:HSTfunctionsLowD} In which we define bridge splitting Morse functions and bridge trisecting Morse $2$--functions. (Recall the $R_\theta$ and $A_i$ notation introduced earlier for rays and sectors in $\mathbb R^2$.) \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \setlength{\wholedeflength}{2\halfdeflength} \addtolength{\wholedeflength}{2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimension two:} A {\em bridge trisecting} Morse $2$--function $f$ on a surface $S$ is a Morse $2$--function $f: S \to \mathbb R^2$ such that: & \textbf{Dimension one:} A {\em bridge splitting} Morse function $f$ on a $1$--manifold $K$ is a Morse function $f:K \to \mathbb R$ such that: \\ \textbullet\; $\mathbf{0}=(0,0)$ is a regular value of $f$. & \textbullet\; $0$ is a regular value of $f$. \\ \textbullet\; On each of the three rays $R_0$, $R_{2\pi/3}$ and $R_{4\pi/3}$, $f$ has only index $1$ critical points, all of which have distinct critical values. & \textbullet\; On each of the two rays $R_0$ and $R_\pi$, $f$ has only index $1$ critical points, all of which have distinct critical values. \\\cmidrule{2-2} \multicolumn{2}{p{\wholedeflength}}{\textbullet\; Over each of the three sectors $A_1$, $A_2$ and $A_3$, the singular locus of $f$ consists of arcs from one bounding ray of $A_i$ to the next with at most one cusp on each arc. Furthermore, in $\mathbb R^2$ each of these components is transverse to each ray $R_\theta$ except at cusps, which are tangent to the rays, and $f$ restricted to the singular locus is an immersion with cusps and double points avoiding the cusps.} \end{longtable} \end{definition} A bridge splitting function on a $1$--manifold $K$ decomposes $K$ into $K_1 \cup K_2$, where each $K_i$ is a collection or arcs. A bridge trisecting function on a surface $S$ decomposes $S$ into $S_1 \cup S_2 \cup S_3$, where each $S_i$ is a disjoint union of disks, each $S_i \cap S_j$ is a disjoint union of arcs, and $S_1 \cap S_2 \cap S_3$ is an even number of points. \begin{definition} \label{D:HSTfunctionsPairs} In which we define bridge splitting Morse functions and bridge trisecting Morse $2$--functions on pairs. \setlength{\halfdeflength}{0.5\linewidth} \addtolength{\halfdeflength}{-2\tabcolsep} \begin{longtable}{p{\halfdeflength} | p{\halfdeflength}} \textbf{Dimensions two and four:} A {\em bridge trisecting} Morse $2$--function $f$ on a surface $S$ embedded in a $4$--manifold $X$ is a trisecting Morse $2$--function $f:X \to \mathbb R^2$ such that $f|_S$ is a bridge trisecting Morse $2$--function on $S$. & \textbf{Dimensions one and three:} A {\em bridge splitting} Morse function $f$ on a $1$--manifold $K$ embedded in a $3$--manifold $M$ is a Heegaard splitting Morse function $f:M \to \mathbb R$ such that $f|_K$ is a bridge splitting Morse function on $K$. \\ \textbullet\; A {\em generalized bridge trisection} of a surface $S$ embedded in a $4$--manifold $X$ is a decomposition $(X,S) = (X_1,S_1) \cup (X_2,S_2) \cup (X_3,S_3)$ coming from a bridge trisecting function in the the sense that $X_i = f^{-1}(A_i)$ and $S_i = S \cap X_i$. & \textbullet\; A {\em generalized bridge splitting} of a knot or link $K$ in a $3$--manifold $M$ is a decomposition $(M,K) = (M_1,K_1) \cup (M_2,K_2)$ coming from a bridge splitting function $f$, in the sense that $M_1 = f^{-1}(R_\pi)$, $M_2 = f^{-1}(R_0)$ and $K_i = K \cap M_i$. \\ \textbullet\; A {\em bridge trisection} is a generalized bridge trisection of an embedded surface in $S^4$ for which the underlying trisection of $S^4$ has genus $0$. & \textbullet\; A {\em bridge splitting} is a generalized bridge splitting of a knot or link in $S^3$ for which the underlying Heegaard splitting has genus $0$. \end{longtable} \end{definition} The reader show now check that the following conditions follow; these are usually taken as the standard definitions of bridge splitting and bridge trisection: \begin{enumerate} \item In dimensions one and three, the arcs making up $K_i$ are properly embedded and simultaneously boundary parallel in the handlebody $M_i$. \item In dimensions two and four, the disks making up $S_i$ are properly embedded and simultaneously boundary parallel in the $4$--dimensional $1$--handlebody $X_i$. \item The intersection $S_i \cap S_j$ is a collection of arcs properly embedded and simultaneously boundary parallel in the handlebody $X_i \cap X_j$. \end{enumerate} Meier and Zupan~\cite{MeierZupanBridge} showed that every surface in $S^4$ can be isotoped so as to be bridge trisected by the standard genus $0$ trisecting Morse $2$--function, and later~\cite{MeierZupanGenBridge} showed how to do this in arbitrary $4$--manifolds with respect to arbitrary trisections. The analogous statement for knots and links in $3$--manifolds is standard. There are also uniqueness statements up to stabilization moves, but we will not discuss those here. There are actually several interesting ways to think about (generalized) bridge trisections diagrammatically. Since there is quite a lot to say, we describe these vaguely and give references for details. Honest bridge trisections, and bridge splittings, are described by tangles in $3$--balls, so these can simply be drawn as standard tangle diagrams. These are the diagrams discussed in~\cite{MeierZupanBridge}, and are called {\em triplane diagrams}. Trivial (boundary parallel) tangles can also be described as half-plat closures of braids, and thus bridge trisections can also be described by braids; this perspective is important in Saltz's work~\cite{Saltz} on Khovanov-style invariants of surfaces in $S^4$. In more general $4$--manifolds, one needs to record the trisection of the $4$--manifold as well as the surface, and this can be done either through multi-pointed diagrams or by ``shadow diagrams'', in which each arc in each tangle is described by it's shadow on the trisecting surface. Shadow diagrams are used in~\cite{LambertColeMeier}, while multi-pointed diagrams are discussed in~\cite{GayMeier}. As a final remark, in the discussion in this section we have assumed that the ambient manifolds and submanifolds are closed; the fully relative case, in which either or both may have boundary, is obviously more subtle but can be understood with care. The details have been worked out by Meier~\cite{MeierInPrep}. \bibliographystyle{plain}
\section{Introduction} \label{sec:intro} While the LHC is producing extremely precise measurements of top quark and Higgs boson properties, the planning for the next high energy particle accelerator is already underway. The objective of the planning and designing work is to develop a machine able to investigate in depth beyond the Standard Model (SM) physics scenarios. Despite the fact that there is no decision yet to determine which accelerator will be built, or its location, there is a consensus in the scientific community that the results from the LHC will have to be complemented by an accelerator that can measure observables with greater precision by producing high energy collisions between electrons and positrons. At present, the most likely candidates are the International Linear Collider (ILC)~\cite{Behnke:2013xla}, the Compact Linear Collider (CLIC)~\cite{Linssen:2012hp} and the Future Circular Collider (FCC)~\cite{Benedikt:2653669,Ellis:2015sca}. The ILC is expected to operate at center of mass energy of 500~GeV with a possible upgrade to 1~TeV. CLIC is designed to collide electrons and positrons at a nominal energy of 3~TeV, {while FCC is expected to operate with a center of mass energy in the range of 90--350~GeV}. Future electron-positron accelerators comprise several advantages which allow for high-precision phenomenological studies in Higgs boson processes, studies of top-quark pair production and searches for new particles. One of the advantages provided by an electron-positron machine is the ability to operate within a wide range of center-of-mass energies. An electron-positron collider also makes it possible to collide electron and positron beams with high spin polarization. This feature opens the window to several new observables that could not be measured using hadron colliders~\cite{AguilarSaavedra:2012vh,Fiolhaisconf}. In addition, high energy collisions in electron-positron accelerators are less complex when compared to proton-proton collisions. As a result, particle detectors in electron-positron colliders have higher intrinsic resolution than those at machines colliding protons. The reconstruction of neutrinos is one of the main experimental challenges in high energy physics experiments as they do not interact with the active material of the particle detector. As such, the momenta of the neutrinos are normally associated with the missing momentum in the event resulting from an high-energy collision. This leads to a straightforward reconstruction if only a single neutrino (or anti-neutrino) is produced in the physics process of interest. The reconstruction becomes highly non-trivial if two or more neutrinos are produced. This particular problem has been successfully addressed at the LHC in top-quark pair production and Higgs boson production in association with a top-quark pair. The full kinematic reconstruction of the four-momenta of the undetected neutrinos was performed by imposing energy-momentum conservation, and using mass constraints on the top quarks and $W^\pm$~bosons ~\cite{Aad:2012ky,Santos:2015dja,AmorDosSantos:2017ayi,Azevedo:2017qiz}. In this paper, a similar strategy is implemented in order to develop an algorithm to reconstruct the momentum of the neutrino (and anti-neutrino) resulting from the dilepton decay of a top-quark pair ($t\bar{t}$) produced in an electron-positron collision. By using the momenta of all detected final state particles resulting from the top and anti-top quark decays, a system of six kinematic equations is implemented in order to determine the unknown momenta of the neutrino and anti-neutrino. The system is solved by using two different numerical methods applied to one-million event samples generated with \verb!MadGraph5_aMC@NLO! at leading order~\cite{Alwall:2014hca}. This particular non-linear system of equations leads to multiple possible complex and real solutions for the neutrino's momenta. Consequently, an extensive statistical study is performed to determine which physical variables are the best decision-making indicators to choose the best candidate real solution by means of a likelihood method. Results are presented by comparing several reconstructed kinematic properties such as the transverse momentum and masses of the \mbox{(anti-) top} quarks and $W^\pm$ bosons with the generator level information provided by \verb!MadGraph5_aMC@NLO!. This study is performed at parton level for events which have tree-level kinematics. The effects of background events, beam resolution, radiation, detector simulation and selection cuts are beyond the scope of the manuscript, and are therefore deferred to a future study. The reconstruction code packages are made available in public repositories~\cite{link_to_package1,link_to_package2}. \section{Kinematic Equations} The reconstruction of $t\bar t$ dilepton events assumes the experimental detection of two $b$-tagged jets and two opposite charged leptons together with the measurement of missing energy associated with the neutrino and anti-neutrino. The reconstruction procedure is not expected to be applied to events with additional objects, such as a hard photon or an additional jet. Neutrinos are not detected as they escape without interacting with the active material of the detector. Consequently, the neutrino momenta can be associated with the missing energy. Using the mass of the $W^\pm$ bosons as constraints, and assuming the approximation that all final state particles are massless, the three-momenta of the neutrino and anti-neutrino can be determined from six kinematic equations. To begin with, three linear equations can be written as, \begin{eqnarray} \ensuremath{p_{i}^{\nu} + p_{i}^{\bar{\nu}} &=& p_{i}^{\textrm{miss}}}\, , \label{eq:linear} \end{eqnarray} where $p_{i}^{\textrm{miss}}$ represents the components of the missing momentum, and $p_{i}^{\nu}$ and $p_{i}^{\bar{\nu}}$ correspond to the neutrino and anti-neutrino momentum components, respectively. Conservation of center of mass energy at the collision point, $\sqrt{s}$, is employed to obtain a non-linear equation: \begin{eqnarray} E^{\ell^-} + E^{\ell^+} + E^{\nu} + E^{\bar{\nu}} + E^{b} + E^{\bar{b}} &=& \sqrt{s} \, , \label{eq:energy} \end{eqnarray} where $E^{i}$ represents the energy of the particle $i$. Finally, the $W^\pm$ bosons mass are constrained to a fixed value, $m_{{W}} = 80.4$~GeV, leading to two additional quadratic kinematic equations, \begin{eqnarray} \ensuremath{( p^{\ell^-} + p^{\bar{\nu}} )^{2} &=& m_{{W}}^2}, \nonumber \\ \ensuremath{( p^{\ell^+} + p^{\nu} )^{2} &=& m_{W}^{2}}, \label{eq:quadratic} \end{eqnarray} where $p=(E,\vec{p})$ represents the four-vector of the particles. These six kinematic equations can be used to determine a total of six unknown momentum components for the neutrino and anti-neutrino. However, due to the presence of two quadratic equations (\ref{eq:quadratic}) and one polynomial equation (\ref{eq:energy}) with nested radicals, it is hard to retrieve a set of analytic solutions from this kinematic system of equations. Nonetheless, the analytic elimination of five out of the six unknown variables leads to two implicit non-linear equations for the same unknown quantity, which is taken to be $p_{z}^{{\nu}}$. The physical value of $p_{z}^{{\nu}}$ is a solution of one of these two equations. The six kinematic equations are significantly different from the ones used at the LHC for the top quark pair production in the same decay channel~\cite{Aad:2012ky,Santos:2015dja,AmorDosSantos:2017ayi,Azevedo:2017qiz}. In particular, at the LHC the total linear momentum of the final state particles caught by the detector and the neutrinos is only zero on the transverse plane, and not along the collision line ($z$-axis). Furthermore, since the proton is not an elementary particle, the center of mass energy of the $t\bar{t}$ system is unknown. {As a result, the kinematic equations for the reconstruction at the LHC require \mbox{(anti-) top} quark mass constrains, while the reconstruction at the electron-positron collider can be performed without imposing any condition on the kinematics of the \mbox{(anti-) top} quarks.} \section{Event Reconstruction \label{sec:reconstruction}} While it is difficult to retrieve an analytic solution from the system of equations presented in the previous section, it is possible to obtain numerical solutions on a event-by-event basis. As such, two numerical methods were implemented and compared to make sure they provide consistent results. Both methods were applied to a sample of one million $e^-e^+ \rightarrow t\bar{t} \rightarrow W^+ W^- b \bar{b} \rightarrow {\ell}^+ {\ell}^- \nu \bar{\nu} b \bar{b}$ events generated with \verb!MadGraph5_aMC@NLO! at leading order at a center of mass energy of 1~TeV. {This sample was labelled as Sample A. The events in this sample were generated with massless final state particles, with exception of the bottom quarks. The mass of the bottom quarks was set to its on-shell value of 4.7~GeV.} In the rest of this work, the adjective ``generated'' refers to the list of events and momenta obtained from \verb!MadGraph5_aMC@NLO! as explained above. The two implicit equations for $p_{z}^{{\nu}}$ were treated as distinct problems to be solved individually. For each event, the equations were put in form, \begin{equation} f_i(p_{z}^{{\nu}}) = 0 \, , \,\,\, i=1,2 \, . \label{eq:f} \end{equation} In the first approach, a bisection method was used to find the real solutions of equation~(\ref{eq:f}). The allowed range of $p_{z}^{{\nu}}$ was limited to the real domain of the $f_i(p_{z}^{{\nu}})$. This range was bisected in search of solutions until the remaining range was less than 1\% the size of the original range. Each one of the functions in equation~(\ref{eq:f}) was found to have one real solution at most. For the second approach, the functions $f_i(p_{z}^{{\nu}})$ were approximated by interpolating each function with a degree-four polynomial within the allowed range of values for $p_{z}^{{\nu}}$. While analytic solutions to these polynomials exist, it is more efficient to solve them numerically using the method documented in~\cite{numpy}. Once the functions are interpolated, the roots of the polynomials should coincide with those of the original functions, provided the interpolation error is small. Therefore, to confirm that the polynomials adequately approximate the functions, the adjusted R-squared coefficient is calculated using a set of fifty test points for each interpolation. Solutions were only taken from interpolants with an R-squared of 0.95 or greater. In one million events, all but a single R-squared coefficient fell above this threshold. A degree of four was chosen because it is the smallest polynomial degree that fits $f_i(p_{z}^{\nu})$ with this level of precision. The results of both methods are statistically compatible, with no real solution found for 12\% of all events, one real solution found with a frequency of 23\% and two real solutions per event found for the remaining 65\% of events. As a first step, in the case of an event with two possible real solutions, the solution to be considered in the reconstruction was selected randomly. (In section~\ref{sec:likelihood}, a likelihood method is introduced to select the most likely solution.) Figure~\ref{fig:random} shows the correlation plots between the generated \mbox{(anti-) neutrino} transverse and $z$-axis momentum components and their reconstructed values. The correlation between the generated and reconstructed neutrino kinematic variables is above 85\% percent, which indicates a successful reconstruction. It is also worth noting that the asymmetry seen between the $z$-axis momentum components of the neutrino and anti-neutrino is merely a consequence of the direction of the electron and positron beams upon the collision. In fact, because of the forward-backward asymmetry induced by the weak interaction, top quarks (and consequently neutrinos) are preferably emitted in the direction of the incoming electron, while anti-top quarks are preferably emitted in the direction of the incoming positron. As expected, the correlations between the generated and reconstructed transverse and $z$-axis momentum components of the $W^\pm$ bosons, shown in Figure~\ref{fig:random2}, are similar to the ones of the neutrinos. The ultimate goal of this procedure is to fully reconstruct the momentum of the top and anti-top quarks. Since the charge of the $b$($\bar{b}$) jet is assumed to be unknown in the experimental analysis, one faces the problem of pairing the $b$($\bar{b}$) quark with the charged lepton resulting from the same $t$($\bar{t}$) decay. For each solution there are only two different pairing possibilities and the most likely pair is determined by means of a $\chi^2$ method. The $\chi^2$ variable employed in the code is defined as: \begin{equation} \chi^2 = \frac{(m_t^{\textrm{rec}}-m_t)^2}{\Gamma_t^2} + \frac{(m_{\bar{t}}^{\textrm{rec}}-m_{\bar{t}})^2}{\Gamma_{\bar{t}}^2} \, , \end{equation} where $m_t^{\textrm{rec}}$ and $m_{\bar{t}}^{\textrm{rec}}$ are the reconstructed top and anti-top quark mass, respectively, with $m_t = m_{\bar t} = 173.2$~GeV and $\Gamma_t = \Gamma_{\bar t} = 1.42$~GeV~\cite{Khachatryan:2015hba}. The most likely pair candidate is determined by the lowest $\chi^2$ value. The correlation plots between the generated and reconstructed transverse and $z$-axis momentum components of the top and anti-top quarks are presented in Figure~\ref{fig:random3}. The $z$-axis momentum of the \mbox{(anti-) top} quarks on the right-hand side plot shows a residual anti-correlation. {The source of this anti-correlation was traced back to cases of wrong pairing between the $b$($\bar{b}$) quarks and the charged leptons. This problem can be addressed in the future by implementing more sophisticated statistical methods to establish the $b$-jet pairing.} \section{Likelihood Method} \label{sec:likelihood} Since the system of kinematic equations may lead to two possible real solutions roughly 65\% of the time, one of the main challenges of the reconstruction procedure is to pick the right solution in these cases. In this study, a likelihood discriminant method was implemented in order to determine the most likely solution. For each solution a likelihood variable, $\mathcal{L}$, is calculated as the product of several probability density functions (p.d.f., indicated with $P$ below). Three p.d.f.s were built from the top and anti-top quark kinematic variables, mass ($m_{t}$), transverse momentum ($p_{\textrm{T},t}$) and $z$-axis momentum component ($p_{\textrm{z},t}$), \begin{equation} \mathcal{L} = P(m_{t}) P(p_{\textrm{T},t}) P(p_{\textrm{z},t}) \, . \label{eq:likelihood} \end{equation} The p.d.f.s in equation~(\ref{eq:likelihood}) were obtained by using an additional sample of one-million events generated with \verb!MadGraph5_aMC@NLO! at leading order, labelled as \mbox{Sample B}. Events in Sample B were generated assuming massless final state particles, with the exception of the bottom quarks, exactly as it was done for Sample A. Each solution for a given event in \mbox{Sample B} was assigned a ``good'' or ``bad'' label, based on the proximity between the reconstructed and generated \mbox{(anti-) neutrino}. The proximity criteria between the reconstructed and generated \mbox{(anti-) neutrino} is determined by means of a $\chi^2$ variable, \begin{equation} \chi^2 = \sum_{i=1}^{3}\frac{(p_{i}^{\nu,\textrm{rec}}-p_{i}^{\nu,\textrm{gen}})^2}{s} + \frac{(p_{i}^{\bar{\nu},\textrm{rec}}-p_{i}^{\bar{\nu},\textrm{gen}})^2}{s} \, , \end{equation} where $p_{i}^{\nu,\textrm{rec}}$ and $p_{i}^{\bar{\nu},\textrm{rec}}$ correspond to the reconstructed neutrino and anti-neutrino momentum components, respectively. The generated neutrino and anti-neutrino momentum components are represented by $p_{i}^{\nu,\textrm{gen}}$ and $p_{i}^{\bar{\nu},\textrm{gen}}$, respectively. The \mbox{(anti-) top} quark mass p.d.f. distribution is shown in Figure~\ref{fig:pdf}, where the blue shaded histogram represents the distribution for ``good'' solutions and the red shaded histogram represents the distribution for the ``bad'' solutions. The difference in shape of the p.d.f.s for ``good'' and ``bad'' solutions provides significant discriminating power. The p.d.f.s were then used to calculate the likelihood variables for each solution of every event with two possible real solutions in Sample A. For each event solution in the Sample A, the likelihood of that solution being ``good'', $\mathcal{L}_G$, can be calculated as the product of the ``good'' solution p.d.f.s, using equation~(\ref{eq:likelihood}). In a similar fashion, the likelihood of that solution being ``bad'', $\mathcal{L}_B$, can also be calculated as the product of the ``bad'' solution p.d.f.s. Therefore, each event solution has a likelihood of being ``good'' and ``bad''. For each event, the solution with higher likelihood ratio, ${\mathcal{L}_G}/{\mathcal{L}_B}$, is picked as the most likely candidate to be the ``good'' solution. Results obtained with Sample A are presented in Figures~\ref{fig:neutrinosfinal},~\ref{fig:wfinal}~and~\ref{fig:topfinal}. Figure~\ref{fig:neutrinosfinal} shows the correlation plots between the generated (anti-)~neutrino transverse and $z$-axis momentum components and their reconstructed values after applying the likelihood discriminant method. A correlation of about 95\% is obtained for these kinematic variables, a significant improvement when compared with the results of Figure~\ref{fig:random}. A clear improvement is also seen in the reconstruction of the $W^\pm$ bosons, shown in Figure~\ref{fig:wfinal}. Figure~\ref{fig:topfinal} shows the comparison between the generated (anti-)~top transverse and $z$-axis momentum components and their reconstructed values. A correlation above 95\% clearly indicates a successful reconstruction of the kinematic properties of this particle. The correlation between these reconstructed and generated kinematic variables can be further increased by applying a selection cut on the likelihood ratio variable. Similar results can be achieved with other discriminant methods such as neural networks or multivariate analyses~\cite{Erdmann:2013rxa}. It should be stressed, however, that the effect of beam resolution, detector acceptance and selection cuts are expected to have an impact on the efficiency of the reconstruction procedure. \section{Conclusions} \label{sec:conclusions} The goal of the present paper was to implement a method which allows for the reconstruction of the \mbox{(anti-) neutrino} momentum components in the dileptonic decays of a top-quark pair at future electron-positron colliders. Two independent numerical methods were implemented for this purpose. The reconstruction code packages were thoroughly tested using generated samples of one-million electron-positron collision events at a center-of-mass energy of 1~TeV. The packages are publicly available and they can be downloaded from a repository \cite{link_to_package1,link_to_package2}. In addition, a likelihood method was implemented to determine the most likely solution in each event. If the likelihood method is applied, the correlation for the reconstructed \mbox{(anti-) neutrino}, the \mbox{(anti-) top} quarks and $W^\pm$ bosons is above 95\%. The effectiveness of the reconstruction package with and without the likelihood method can be evinced from the correlation plots found in Sections~\ref{sec:reconstruction} and \ref{sec:likelihood}. The next step of this study will be to implement this reconstruction method in a dedicated analysis, in order to perform measurement estimations of top quark properties at a future electron-positron colliders. These estimations may include the study of top quark spin correlations, $W^\pm$ boson polarization in top quark decays and the top quark forward-backward asymmetry. This will require the simulation of a general purpose detector, the implementation of an event selection, and a detailed study of the different sources of systematic uncertainties. \\ \section*{Acknowledgments} The authors would like to thank the Center for Theoretical Physics of the Physics Department at the New York City College of Technology, for providing computing power from their High-Performance Computing Cluster. This work was funded by PSC-CUNY Awards 61085-00~49 and 61151-00~49, and by FCT, Lisboa 2020, Compete 2020, Portugal 2020, FEDER through project POCI/01-0145-FEDER-029147. The work of A.F. was supported in part by the National Science Foundation under Grant No. PHY-1417354. The work of H.C. was supported in part by the Department of Energy under Grant No. DE-SC0019027. The authors would like to thank N. Castro for useful discussions and for reading the manuscript.
\section*{Abstract} Network designers, planners, and security professionals increasingly rely on large-scale testbeds based on virtualization to emulate networks and make decisions about real-world deployments. However, there has been limited research on how well these virtual testbeds match their physical counterparts. Specifically, does the virtualization that these testbeds depend on actually capture real-world behaviors sufficiently well to support decisions? As a first step, we perform simple experiments on both physical and virtual testbeds to begin to understand where and how the testbeds differ. We set up a web service on one host and run ApacheBench against this service from a different host, instrumenting each system during these tests. We define an initial repeatable methodology (algorithm) to quantitatively compare physical and virtual testbeds. Specifically we compare the testbeds at three levels of abstraction: application, operating system (OS) and network. For the application level, we use the ApacheBench results. For OS behavior, we compare patterns of system call orderings using Markov chains. This provides a unique visual representation of the workload and OS behavior in our testbeds. We also drill down into read-system-call behaviors and show how at one level both systems are deterministic and identical, but as we move up in abstractions that consistency declines. Finally, we use packet captures to compare network behaviors and performance. We reconstruct flows and compare per-flow and per-experiment statistics. From these comparisons, we find that the behavior of the workload in the testbeds is similar but that the underlying processes to support it do vary. The low-level network behavior can vary quite widely in packetization depending on the virtual network driver. While these differences can be important, and knowing about them will help experiment designers, the core application and OS behaviors still represent similar processes. \section{Introduction} \label{sec:intro} Network operators and designers rely heavily on testbeds to verify configuration changes, validate new designs, and troubleshoot existing networks without interrupting production services. In some cases, security engineers use testbeds to better understand security incidents, do post-event forensics, and even explore how various countermeasures would perform. Physical testbeds are expensive to build and maintain so virtual testbeds are used as a cost-effective alternative. By running the same OS and software, virtualization offers a higher fidelity than discrete-event simulations. But how do virtualization artifacts affect these testbeds and the experiments they host? How should experimenters account for subtle differences between virtual and physical testbeds? To date, there has been limited study of the effects of virtualization on virtual testbeds. Instead, we rely on ad hoc assessments of the experiments and results by subject-matter experts to determine whether they make logical sense. We know that virtualization causes higher network latency and lowers throughput~\cite{menon2005diagnosing,rizzo2013speeding,wang2010impact,whiteaker2011explaining} for individual virtual machines (VMs). Wang et al.~\cite{wang2010impact} even showed that for small bursts, buffering can cause VMs to receive data at rates that exceed the underlying network. Our experimental design is informed by our goal: to measure, document, and understand differences between physical and virtual testbeds. We run a representative workload, ApacheBench~\cite{apachebench} querying a simple web server. Our experiments vary testbed parameters such as the network driver and workload parameters such as payload size. During these experiments, we measure the systems at three layers of abstraction: application, operating system, and underlying network. We find notable differences in the system and network-level interactions. For example, when receiving a 1MB payload, all testbeds read a total of 1MB of data. However, they use vastly different numbers of \emph{read} system calls due to differences in segmentation offloading. Additionally, they transmit differing numbers of packets. These differences in underlying system behaviors are important and have the potential to affect experimental results. When one considers that computers are fundamentally state machines that cycle through instructions deterministically, one might expect physical and virtual testbeds to have (nearly) identical behaviors. This is particularly true for our workload, which has no inter-request dependencies. One way to model an application's behavior is through its sequence of system calls. Since our workload consists of many repetitions of the same transaction, we expect the system call traces to contain many repeated sequences. To make the sequences simpler to work with and to normalize the repeated behaviors across sequences of different lengths (caused by different testbeds completing different numbers of transactions), we transform the sequences into Markov Chains as described in Section~\ref{sec:background}. In Section~\ref{sec:markov}, we show how the Markov chain for the physical and virtual testbeds can create almost identical graph topologies representing system behaviors. Even though one might expect a deterministic workload, there is variation even when running the same workload on the same physical testbed. So, we must expect some differences between virtual and physical testbeds. Our goal is not to prove whether virtual testbeds are good or bad. It is to understand where and how they differ from physical testbeds so those who use virtual testbeds will be better able to plan their experiments and interpret the results. \section{Background} \label{sec:background} Network simulation tools like NS-2~\cite{issariyakul2011introduction} and OPNET~\cite{chang1999network} create highly detailed network models to simulate a network's behavior under many conditions. To ensure simulation reliability, the tools contain simulated versions of all aspects of a network, including endpoints, routers, and switches. These network models follow a set of known behaviors exactly. However, this reliable repetition comes at the cost of decreased accuracy. The simulated network elements model actual components that, in the real world, may display behaviors different from the tool's built-in components. Network emulation improves the accuracy of these network models by introducing actual network components. But it is more difficult to scale simulated testbeds to emulate large-scale network environments. Virtualization, utilizing multiple VMs on the same physical machine, permits testbeds to effectively emulate networks containing thousands or even millions of endpoints~\cite{minnich:2010eurosys}. Sandia National Laboratories has been researching, developing, and applying large-scale emulations using virtualization as testbeds for over a decade~\cite{minnich:2010eurosys}. Sandia has developed several supporting toolsets including minimega~\cite{minimega}. Several other papers have presented testbed orchestration platforms~\cite{benzel2011science,Chun2003Planetlab,lantz2010network,ricci2014Cloudlab}. While our experiments could be run on any of these platforms and most modern hardware, for this paper we focus on the different between physical and virtual on one specific cluster using a single orchestration tool. This allows us to experiment with different parameters within the virtual machine itself (e.g. different network drivers). Future work will expand across different testbed platforms. Multiple researchers expose differences in latency and throughput in virtualized networking devices~\cite{menon2005diagnosing,rizzo2013speeding,wang2010impact,whiteaker2011explaining}. Virtualization can also cause different network behaviors, especially around TCP and congestion control~\cite{Cheng:2016TransactionNetworking,Gamage:2013:TransCompSys,He:2016Sigcomm}. These papers typically present new approaches for performance improvement. We focus on understanding the differences and how they affect the accuracy of emulations used to understand larger-scale phenomena. Sequences of system calls can capture the expected behavior of applications in areas such as intrusion detection~\cite{forrest1996sense,hofmeyr1998intrusion} and filesystem optimization~\cite{kroeger1999case}. Previous research~\cite{warrender1999detecting} used system-call Markov chains for intrusion detection. To the best of our knowledge, this is the first paper to apply such Markov chains to compare virtual to physical testbeds. A {\em Markov chain} is a graph where nodes represent states and edges represent transitions between states. For a sequence of system calls, we empirically create a graph where a node is a system call and two nodes, $X$ and $Y$, are connected by a directed edge (arc) from $X$ to $Y$ i.f.f.\@ the system call $Y$ appears immediately after system call $X$ at least once. Each arc has a weight corresponding to the probability that $Y$ follows $X$. The weight of arc $(X,Y)$ is the percentage of times $Y$ is immediately followed by $X$ in the sequence. Figure~\ref{fig:Markov-eg} shows a simple Markov chain representing a single user search for an item in a file. The user first tries to open the file. This is the start state, shown with a heavy node boundary. With probability $.01$, there is an error in opening the file, where the new state is ``error,'' and the process ends. With probability $.99$, the open succeeds and the user code reads the first line. For each line, the user finds what he seeks with probability $.25$. If so, the user closes the file and the search ends. Otherwise, with probability $0.75$ the user continues the search by reading the next line, and the state (current node) does not change. \begin{figure} \centering \includegraphics[width=0.9\columnwidth]{images/Markov-example.png} \caption{An example of a Markov chain for system calls seen in searching a file line by line.} \label{fig:Markov-eg} \end{figure} We can extend this definition to include more of the recent history of system calls by having states represent a set of $N$ consecutive system calls. If a node has an ordered set of calls (label) $c_1,c_2, \ldots, c_N$, then the next state, represented by neighbors in the graph, has the form $c_2, c_3, \ldots, c_N, c_{\mbox{new}}$, where $c_{\mbox{new}}$ is the next system call seen after $c_N$. As $N$ increases, the Markov chain becomes specific to the sequence of system calls that generated it, diminishing the chances of it matching system-call sequences from another process. We now formalize the ``similar/close'' concepts we have used so far. We say that two experimentally measured quantities are ``close'' or ``similar'' if their means differ by no more than $10$\%. This is an arbitrary value for quantitative comparisons in this paper. For a particular application, a subject-matter expert may need to set this comparison point. We compute $95$\% confidence intervals, assuming a standard normal distribution of sample means. Assuming our samples are representative of a random sample of all such experiments, then if we were to repeat the experiment with this size random sample an infinite number of times, the sample mean will be within the confidence interval range $95$\% of the time. Overlapping confidence intervals is a stronger definition. \section{Methodology} \label{sec:methodology} In this section, we detail a methodology to compare workloads across testbeds, whether physical or virtual. Although we consider a single workload in this paper, we ultimately must consider many different network-based workloads using this basic methodology. The simplest way to compare testbeds is with metrics from the workload itself, such as how much work completes in a fixed amount of time. However, the virtualization overhead almost always leads to physical testbeds outperforming the virtual ones. Therefore, we also take measurements at other levels of abstraction -- interactions between the workload and the OS. Specifically, we measure system calls, context switches, and block IO and normalize by work completed to determine the interactions per unit work. This allows direct comparisons between testbeds. Finally, we compare our network-based workload at the network layer. We capture traffic to compare properties of the underlying packets and flows (for TCP-based workloads). These different layers of abstraction allow us to compare behaviors, not just performance. If there were just one physical and one virtual testbed, our comparison would be fairly straightforward -- we would apply the above methodology to both across several workloads and draw our conclusions. Unfortunately, there are many physical and virtual testbeds. These testbeds vary in machine resources (e.g.\@ CPU and memory), network bandwidth (e.g.\@ 100Mbps, 1Gbps), network interface and driver, OSes, etc. To draw broader conclusions about the differences between physical and virtual testbeds, we must perform tests with many parameters to determine if there are any generalizable trends. We do not claim to fully map this space but present an initial mapping that may help us to understand the landscape. Virtualization allows for multiple VMs on the same machine meaning that virtual testbeds can be many times larger than the underlying physical machines, a practice called oversubscription, which induces contention~\cite{minnich:2010eurosys}. As a first step, we assume that our systems are not resource constrained. We believe a strong understanding of normal/non-resource-constrained behavior should come before studying edge cases introduced by oversubscription. \section{Experimental Design} \label{sec:experiment} We detail a concrete application of our methodology to a simple HTTP workload. We describe the testbeds, workload, and instrumentation. We repeated each experiment ten times. \subsection{Virtual Testbed Tool: minimega} We use minimega~\cite{minimega} to manage, deploy, and monitor our virtual testbeds. It is the product of over a decade of research and development at Sandia National Laboratories. minimega orchestrates Kernel-based Virtual Machines (KVM~\cite{kivity2007kvm}) to run unmodified OSes such as Windows, Linux, and Android, that represent real machines in networks of interest. minimega is bundled with other tools to form the open-source minimega toolset, which supports our Emulytics program. When configuring VMs, the user decides the number of network interfaces, network connectivity, and network drivers. minimega uses 802.1q VLAN tagging via Open vSwitch~\cite{openvswitch} to support arbitrary network topologies. KVM supports several network drivers with varying properties such as \emph{e1000} and \emph{virtio}. \emph{e1000} represents a \textit{real} \emph{e1000} network interface card (NIC) while \emph{virtio} is a \textit{paravirtualized} NIC that is implemented specifically for better performance within a VM. minimega has many other capabilities to support experiments. Its command-and-control layer can execute commands on the VMs and push/pull files. It supports packet captures for individual VMs. It can emulate networks with different speeds based on Linux traffic control, ``tc.'' For example, minimega can emulate a 1Gbps switch by rate limiting all VMs on a network to 1Gbps. While minimega focuses on virtual testbeds, it can also deploy and run experiments on physical testbeds, as we did for our physical experiments. We use several other tools in the minimega toolset. \emph{protonuke} is a simple traffic generator that supports several protocols and acts as either a server or client. \emph{vmbetter} creates initial ramdisk images that we use for physical hosts and VMs. \subsection{Workload} We use ApacheBench~\cite{apachebench}, the HTTP server benchmarking tool, to repeatedly load the same page served by \emph{protonuke}, acting as a simple HTTP server. Client and server run on separate (virtual) machines, connected by a switch. This transaction, an HTTP GET and response, is at the core of almost all of the more complex workloads we test. By keeping to this basic workload we can focus on key system interactions. We can vary the number of client threads, the number of requests or duration, and HTTP response size. Our experiments use three response sizes: 500B, 1MB and 16MB. We run ApacheBench for 90 seconds, allowing it to complete as many requests as possible (up to 500,000 requests). We use ten client threads, except where noted. \subsection{Virtual Machines} There are many ways to instantiate VMs. We can vary hypervisors, network drivers, CPU pinning, scheduling algorithms, resource allocations, host OS, etc. We focus on the network driver, the glue between the guest OS and the host OS. Specifically, we look at the differences between \emph{e1000}, which emulates a real e1000 network interface and \emph{virtio}, which was designed to make VMs more performant. We chose these two drivers because e1000 is the default in minimega (and therefore, often unchanged) and because virtio is the go-to driver to improve networking performance (at least within the Emulytics community). We did not vary the other parameters -- we used KVM for the hypervisor, 2GB of memory, and 8 vCPUs. For now, these parameters represent a well-provisioned system able to support the workload. We base our VMs off an initial ramdisk (initrd) from \emph{vmbetter}. This allows us to create a minimal install containing few packages and a minimal init program performing only critical functions. Specifically, the init process initializes the filesystem, loads kernel modules, starts sshd, and runs \emph{miniccc} (the agent with which minimega communicates). This minimizes background-process interference. We do the same for our physical machines. \subsection{Hardware} We ran the physical tests on two identical nodes: \begin{itemize} \itemsep 0em \item Dual Intel(R) Xeon(R) E5-2630L 0 @ 2.00GHz \item 24 Cores (6/socket, HT enabled), 125GB Memory \item Interfaces: 1Gbps (igb), 10Gbps (ixgbe) \end{itemize} We ran the VM tests on two identical nodes: \begin{itemize} \itemsep 0em \item Dual Intel(R) Xeon(R) E5-2683 v4 @ 2.10GHz \item 64 Cores (16/socket, HT enabled), 503GB Memory \item Interfaces: 100Gbps (mlx5) \end{itemize} These nodes represent our older and newer Emulytics nodes which are well provisioned to run many VMs. The older nodes have both 1Gbps and 10Gbps interfaces, so we can perform tests with both link speeds. The newer nodes have 100Gbps interfaces. For each interface, we list the associated driver. All physical and virtual machines use the same Linux Kernel version, 4.9.0-4-amd64, the latest available from Debian stretch when we built the images. \subsection{Instrumentation} \label{sub:instrumentation} In Section~\ref{sec:methodology}, we described the various levels of instrumentation that we use to compare testbeds. Here, we describe the specific instrumentation tools that we use. In Section~\ref{sec:overhead}, we perform experiments to understand the overhead of instrumentation on the workload. \emph{System Call Traces:} We collect system-wide system call traces using \emph{sysdig}~\cite{sysdig}. These traces contain all calls from all programs running on the physical or virtual machine. \emph{Packet Captures (PCAPs):} For the physical machines, we capture traffic on the machine itself using \emph{tcpdump}~\cite{tcpdump}. For the VMs, we capture traffic from the host using minimega (which uses \emph{libpcap}) to avoid the performance overhead of capturing within a VM. Since \emph{tcpdump} also uses \emph{libpcap}, we do not expect the capture method to introduce any significant differences. We use \emph{tcptrace}~\cite{tcptrace} which assembles TCP packets from the PCAPs into flows and computes statistics, such as the number of packets, and retransmits, on a per-flow basis. \emph{Latency:} To measure queueing, we use \emph{owping}~\cite{owamp} to measure the one-way latency between the client and server. We do not synchronize the clocks so we cannot use the absolute latency values. Instead, we use the jitter to infer how much the latency varied over the duration of the experiment. \section{Results} \label{sec:results} In this section, we present our initial results including experimental data and metric comparisons between the physical and virtual testbeds. We analyze the application-level metrics which confirm that the workload behaves as expected, although at different rates. Then, we explore how the underlying interactions with the OS and network vary between the testbeds. \subsection{Application-level Metrics} Here we examine the results from ApacheBench for physical, e1000, and virtio drivers for both 1Gpbs and 10Gbps systems. We find an anomaly in e1000 tests but otherwise the results seem quite comparable. We then explore issues with our e1000 results and correlate the anomaly to a known bug. \begin{table}[ht] \centering \begin{tabular}{|r|r|r|r|} \hline Size & Physical & e1000 & Virtio \\ \hline 500B & 14420 $\pm$ 74.3 & 6476 $\pm$ 707 & 13590 $\pm$ 139\\ 1MB & 112 $\pm$ 0.012 & 113 $\pm$ 0.12 & 113 $\pm$ 0.006 \\ 16MB & 6.97 $\pm$ 0.006 & 7.05 $\pm$ 0.006 & 7.09 $\pm$ 0.032 \\ \hline \end{tabular} \caption{Mean requests per second and confidence intervals for ApacheBench runs for 1Gbps tests.} \label{tab:ab_rps_1g} \end{table} Table~\ref{tab:ab_rps_1g} shows the confidence intervals for mean requests per second for the 1Gbps tests. With the exception of e1000 for small workloads, which we explore later in this section, all systems have similar results. The network driver can have a significant impact on much higher-level application behavior and how well an emulation resembles the physical world. Moreover, the selection of workload size also impacts how representative our results are. \begin{table}[ht] \centering \begin{tabular}{|r|r|r|r|} \hline Size & Physical & e1000 & Virtio \\ \hline 500B & 13080 $\pm$ 101 & 6734 $\pm$ 867 & 13631 $\pm$ 139 \\ 1MB & 638 $\pm$ 2.4 & 144 $\pm$ 20.6 & 590 $\pm$ 35.7 \\ 16MB & 50.0 $\pm$ 0.316 & 13.2 $\pm$ 0.955 & 44.5 $\pm$ 2.78 \\ \hline \end{tabular} \caption{Mean requests per second and confidence intervals for ApacheBench runs for across 10Gbps tests.} \label{tab:ab_rps_10g} \end{table} Table~\ref{tab:ab_rps_10g} shows these same test with an emulated 10Gbps network. Here the differences for e1000 are more pronounced. Once again, we see that the behaviors for physical and virtio are similar. For small payload sizes, virtio actually outperforms the physical system. We speculate and have seen anecdotal evidence that this performance difference may be an artifact of the way our bandwidth-limiting tool emulates a 10Gbps link. At this higher rate, the physical testbed is noticeably more consistent in its behavior than the virtual ones. \subsubsection{Instrumentation Overhead} \label{sec:overhead} To quantify the overhead of our instrumentation, we ran a set of tests with no instrumentation. Table~\ref{tab:no_inst} shows our ApacheBench results from this test. The most significant impact of our instrumentation is on the physical testbed where there is a 13\% drop in performance. We believe this is from the overhead of running tcpdump on the physical testbed. In the virtual testbeds, virtio drops by 5\% while e1000 improves. We suspect the latter is due to high variability in the e1000 performance. \begin{table}[ht] \centering \begin{tabular}{|r|r|r|r|} \hline Size & Physical & e1000 & Virtio \\ \hline \hline \multicolumn{4}{|c|}{1Gbps}\\ \hline 500B & 16459 $\pm$ 57 & 5740 $\pm$ 559 & 14373 $\pm$ 182.8 \\ 16MB & 6.98 $\pm$ 0.0062 & 7.05 $\pm$ 0.0062 & 7.09 $\pm$ 0.012 \\ \hline \hline \multicolumn{4}{|c|}{10Gbps}\\ \hline 500B & 15013 $\pm$ 104 & 5474 $\pm$ 374 & 14431 $\pm$ 227 \\ 16MB & 60.1 $\pm$ 0.39 & 11.7 $\pm$ 1.61 & 42 $\pm$ 1.74 \\ \hline \end{tabular} \caption{Mean request per second and confidence intervals for ApacheBench runs without instrumentation.} \label{tab:no_inst} \end{table} \subsubsection{Exploring the Outlier, e1000} To understand why our e1000 testbed behaves so differently, we turned to the PCAPs that we collect. We observed that numerous experiments had an errant behavior that would delay connections for some multiple of 13 seconds. Upon a more detailed examination, we saw that data had been sent and acknowledged but the server was still behaving as if it had not been acknowledged (for all connections). Then, after a multiple of 13 seconds the server returned to normal behavior. From the kernel logs for the VM, we found that the kernel reset the network adapter multiple times after detecting a transmit queue timeout. Network adapter resets are commonly observed behavior when a bug in the underlying NIC driver is encountered. We plan to discard experiments that trigger this bug in the future. \subsection{OS-Level Metrics} \label{sec:os_level} We now investigate differences in how ApacheBench interacts with the OS as it makes requests. We focus on data read and read system calls as these are a key parts of the workload. System calls present a middle ground in abstraction between the request per second and the bytes per request. We normalize using the number of completed requests, to compare across testbeds completing vastly different numbers of requests. We look at a low-level metric that should be strongly consistent: bytes sent per request completed. Figure~\ref{fig:bytes_p_req} plots the number of bytes sent by the server per request completed, including retransmits. While it may seem trivial to show that these numbers are consistent, this measure is independent of timing and network rates so it provides a basic ability to show that the underlying process is consistent and deterministic. This plot shows a clearly consistent behavior from all testbeds. Our underlying thesis for Emulytics is that since we run the same software, we should get the same behavior. Since a thread is a deterministic machine that works through the same lock steps in the same way for the same input, we expect somewhere in our experiments to see this high level of consistency across all tests. \begin{figure} \centering \begin{subfigure}[b]{0.23\textwidth} \includegraphics[width=\textwidth]{images/1g-1kb-bytes-p-req.png} \caption{Bytes per Request} \label{fig:bytes_p_req} \end{subfigure} ~ \begin{subfigure}[b]{0.23\textwidth} \includegraphics[width=\textwidth]{images/reads-to-workload.png} \caption{Mean read calls} \label{fig:reads_per_ab} \end{subfigure} \caption{(a) Bytes per Request for 500B workloads over 1Gpbs network. (b) Mean number of read system calls needed to complete a request across varying workload sizes.} \label{fig:read_figs} \end{figure} At a higher level of abstraction, but still within the OS layer, we consider number of reads per request. Table~\ref{tab:reads_per_request_1g} shows the mean number of reads per request for the 1Gbps test. As expected, the number of reads increases as the payload grows. In all but the small payload workload, the physical testbed performs more reads than the virtual ones. In all cases, virtio requires fewer reads than e1000. \begin{table}[ht] \centering \begin{tabular}{|r|r|r|r|} \hline Size & Physical & e1000 & Virtio \\ \hline 500B & 1.34 & 2.95 & 1.75 \\ 1MB & 547.44 & 395.02 & 325.27 \\ 16MB & 8345.82 & 5954.81 & 5072.02 \\ \hline \end{tabular} \caption{Mean number of read system calls per request for 1Gbps test.} \label{tab:reads_per_request_1g} \end{table} Table~\ref{tab:reads_per_request_10g} shows the mean number of reads per request for the 10Gbps test. Unlike in Table~\ref{tab:reads_per_request_1g}, the physical testbed has fewer reads per request than the virtual testbeds in all but one case. This could be a result of the physical driver being different for the 1Gbps and 10Gbps test which use \emph{igb} and \emph{ixgbe}, respectively. \begin{table}[ht] \centering \begin{tabular}{|r|r|r|r|} \hline Size & Physical & e1000 & Virtio \\ \hline 500B & 1.72 & 3.02 & 1.69 \\ 1MB & 260.15 & 341.84 & 275.80 \\ 16MB & 4098.74 & 4687.41 & 4102.61 \\ \hline \end{tabular} \caption{Mean number of read system calls per request for 10Gbps test.} \label{tab:reads_per_request_10g} \end{table} Finally, we look more broadly at the number of read system calls across a wider range of workload sizes. Figure~\ref{fig:reads_per_ab} shows the mean number of read calls normalized over the mean requests per second from ApacheBench. Here we begin to see the behavior of each process start to diverge. \subsection{Network-Level Metrics} From the traffic captures, we can gain a better understanding of how packets generated by the various workloads propagate through the testbeds. Table~\ref{tab:packets_per_request_1g} shows the mean packets per request for 1Gbps tests. As before, we see physical and virtio have similar behaviors, though other than for the smallest response size, not quite at our $10$\% similarity threshold. Again, e1000 stands out as different. \begin{table}[ht] \centering \begin{tabular}{|r|r|r|r|} \hline Size & Physical & e1000 & Virtio \\ \hline 500B & 5.00 $\pm$ 0.08 & 5.00 $\pm$ 0.10 & 5.00 $\pm$ 0.12 \\ 1MB & 67.7 $\pm$ 2.19 & 105.7 $\pm$ 9.04 & 77.3 $\pm$ 10.2 \\ 16MB & 834 $\pm$ 46.3 & 1527 $\pm$ 817.40 & 1087 $\pm$ 706 \\ \hline \end{tabular} \caption{Mean number of packets per request for 1Gbps test and standard deviation.} \label{tab:packets_per_request_1g} \end{table} Next, we used owamp data to measure the network jitter. This metric offers insights into the network queuing behavior. If the network stack is filled with many packets the jitter will indicate increased delays as the one-way latency traffic queues while waiting for transmission over network links. Table~\ref{tab:owamp_tab} shows how our jitter varied across our 1Gbps tests. Here we see that e1000, with the exception of the 16MB workload, more closely matches the end-to-end jitter characteristics seen in the physical testbed. The virtio testbed provides consistently lower jitter which, while theoretically beneficial, could mask problems that would occur in the real world if a given workload was heavily influenced by jitter. \begin{table}[ht] \centering \begin{tabular}{|r|r|r|r|} \hline Size & Physical & e1000 & Virtio \\ \hline 500B & 0.26 $\pm$ 0.03 & 0.25 $\pm$ 0.074 & 0.10 $\pm$ 0.00 \\ 1MB & 0.29 $\pm$ 0.019 & 0.24 $\pm$ 0.03 & 0.16 $\pm$ 0.03 \\ 16MB & 0.28 $\pm$ 0.025 & 0.34 $\pm$ 0.043 & 0.16 $\pm$ 0.03 \\ \hline \end{tabular} \caption{Mean jitter measured across the network (in milliseconds) with confidence intervals for 1Gbps.} \label{tab:owamp_tab} \end{table} \subsection{System-Call Markov Chains} \label{sec:markov} We propose to use two analyses from the system-call traces to determine whether the application behavior on the virtual testbeds are ``close enough'' to the physical testbed. We examine a specific set of parameters for simplicity: single thread, 1Gbps network, and 500B response. These analyses will need to be repeated for every set of parameters to make broader comparisons between the testbeds. Figure~\ref{fig:markov} shows pruned examples of these Markov chains for ApacheBench across the testbeds. We combined 10 runs of each, dropped edges with weight less then $.001$ and renormalized the probabilities around each node. Client Markov chains had identical topology and nearly identical weights. Server Markov chains disagreed on edge existence by up to 22\% and had more weight variation on similar edges. \begin{figure*} \centering \includegraphics[width=0.3\textwidth]{images/physical.pdf} \includegraphics[width=0.3\textwidth]{images/e1000.pdf} \includegraphics[width=0.3\textwidth]{images/virtio.pdf} \caption{Client Markov chain for physical, e1000, and virtio. We dropped edges of weight less than $.001$ and renormalized.} \label{fig:markov} \end{figure*} We can \emph{walk} a Markov chain using the sequence of system calls from a run on a virtual or physical testbed to compute the probability the Markov chain would generate that sequence. We show the walk/computation process with the Markov chain from Figure~\ref{fig:Markov-eg} and the sequence (open, read, read, read). We start at the node labeled ``open.'' The next element is the first ``read,'' There is an edge from the ``open'' node to the ``read'' node with weight $.99$, so the first pair of system calls (open, read) occurs with probability $.99$. Similarly, there is an edge from the current node (``read'') to a node with the next element of the sequence (the second read). This has probability $.75$. In Markov chains, each transition is independent, so the probability of seeing the first part of the sequence (open, read, read) is $.99 \times .75$. The next step is the same. So the probability of the sequence (open, read, read, read) is $.99 \times (.75)^2$. The probability for the sequence (open, read, read, close) is $.99 \times .75 \times .25$, since the last transition goes from the ``read'' node to the ``close'' node, which happens with probability $.25$ Because each additional sequence element (system call) multiplies the final probability by a number less than 1, the total can become quite small and sequence length becomes important for comparison. For example, for the Markov chain in Figure~\ref{fig:Markov-eg}, the most probable sequence of length 17 is open followed by 16 reads. This sequence has lower probability than the sequence (open, error). Thus, we will compare sequences of equal lengths, where the relative sizes of the probabilities are a valid means of comparison, even though the absolute probability for long sequences are tiny. More formally, given a sequence of system calls and a Markov chain with system-call node labels, we start at the Markov-chain node that matches the first element of the sequence. Moving to the next element in the sequence (system call $s_i$) is a {\em transition} in the Markov chain to the node with the label $s_i$. We continue the walk to the end of the sequence. The final probability is the product of the weights of every edge we traverse with multiplicities. We built Markov chains using runs in the physical testbed by creating a node for every system call in the sequence and an edge for each pair of consecutive calls. Edge $(c_i, c_j)$ is weighted by the percentage of times the call $c_i$ is followed by $c_j$. We then compared the relative probabilities when walking the chain using a sequence from e1000 to that from virtio. For a baseline, we also include the probability from walking the Markov chain with the physical sequence. Since we ran ten iterations of each physical, e1000, and virtio, we build ten Markov chains for each of the physical tests and compare to each of the ten sequences of each type. Consider a Markov chain created by sequence A. When walking that chain using a sequence B, is it possible that there is no edge for a particular transition $(c_i, c_j)$. That sequence did not appear in sequence A. We call this an {\em invalid transition}, which gives the walk probability zero. We apply this technique to the system-call sequences from ApacheBench with a single thread. Table~\ref{tab:markov_walk_zeroes} shows how many times an invalid transition occurs. We found that the invalid transitions typically occur in the initialization phase of the workload so we also report the number of invalid transitions when we skip the first 1 million (1M) system calls. \begin{table}[ht] \centering \begin{tabular}{|r|r|r|} \hline Sequence & No Skip & Skip 1M \\ \hline physical & 32 & 0 \\ e1000 & 26 & 0 \\ virtio & 26 & 0 \\ \hline \end{tabular} \caption{Invalid transitions from 100 walks of Markov chains using sequences from physical, e1000, and virtio.} \label{tab:markov_walk_zeroes} \end{table} Table~\ref{tab:markov_walk_values} shows the average probability when walking a Markov chain built from the physical testbed with e1000 and virtio sequences relative to the average when walking the same chain with physical sequences (i.e. $P(\mbox{e1000})/P(\mbox{physical})$. We limit the sequences to 2M system calls to ensure that we compare sequences of the same length (the shortest sequence is just over 3M system calls). As before, we also report on the probabilities when we skip the first 1M system calls. \begin{table}[ht] \centering \begin{tabular}{|r|r|r|} \hline Sequence & No Skip & Skip 1M \\ \hline e1000 & E+5531 & E+5402 \\ virtio & E-33288 & E-28214 \\ \hline \end{tabular} \caption{Relative probabilities from walking Markov chains built from physical testbed using sequences from e1000 and virtio to physical. We omit the bases as they are irrelevant given the magnitudes of the exponents.} \label{tab:markov_walk_values} \end{table} This chart shows that the e1000 sequences are many orders of magnitude more probable than the physical sequences while the virtio sequences are many orders less. We suspect that this is because we built the Markov chains with $N=1$ which does not include any system-call history. We performed some initial experiments with $N=2$ and found that the physical sequences become more likely, on average, than the e1000 sequences. We do not report on those results further because the number of invalid transitions increases significantly so that we have very few probabilities to average. \section{Conclusion} \label{sec:conclusion} We have defined a first repeatable method to quantitatively compare physical and virtual testbeds. We have applied these methods to simple network tests to show our method's utility. Our experiments show that, for our simple workload, our virtual testbed behaves reasonably close to its physical counterpart, within our $10$\% threshold in many cases. We make this assessment using multiple levels of abstraction from workload metrics to system interactions to packet captures. We hope this paper will encourage discussion and that other researchers will extend these comparison methods for these simple tests and for more complex tests. \noindent\textbf{Acknowledgements} We thank Rob Johnson (VMWare), Ben Reed (San Jose State University), and Jeff Boote (Netflix) for helpful discussions and detailed comments on an early draft. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy's National Nuclear Security Administration under contract DE-NA-0003525. \nocite{Tange2011a} {\footnotesize \bibliographystyle{acm}
\section{Preamble} When asked my occupation in life, I often answer that I study neutrinos. My attempts at elaboration motivated an artist acquaintance to produce these visual portaits of neutrinos, \vskip .5cm \hskip .5in \includegraphics[scale=.2]{MesNeutrinos.pdf} \vskip .5cm \noindent On my home office wall they remind me of the evocative powers of neutrinos on our imagination. \vskip .5cm \noindent This talk consists of four parts: \begin{itemize} \item{\large Editorial} \item{\large Early History} \item{\large Neutrino Masses} \item{\large Neutrinos \& Yukawa Unification} \end{itemize} \section{Editorial} The idea of a neutrino was revealed to Wolfgang Pauli, not through direct experimental evidence but as a ``desperate" attempt to rescue what he believed to be a fundamental principle: the conservation of energy. He was right, of course, but Pauli's neutron (neutrino) was difficult if not impossible to detect, and for a while he lamented on his fate, having invented a particle impossible to detect\footnote{not unlike the axion?}. In his days, inventing a new particle seemed like an admission of failure, to be contrasted with the present sociology where a mere glitch in the data generates a whole Kaluza-Kein tower of particles! For experimentalists (and most theorists) his hypothesis was not taken seriously at first, even though his proposal added a spin one half particle in the nucleus, thereby explaining in addition the intensity of Raman lines from the Nitrogen nucleus. This disrespect of the neutrino concept was surely misplaced as neutrinos are the misfits of the particle world; they never fit current dogma. Retrospectively, \vskip .5cm\noindent - Neutrinos are left-handed in an ambidextruous world, generating parity violation in $\beta$ decay. \vskip .5cm\noindent - Neutrinos appeared to be massless, motivating theorists to seek a general principle for their lack of mass; witness Volkov and Akulov's non-linear representation of supersymmetry with the neutrino as Nambu-Goldstone fermion, and Fayet's proposal of a supersymmetric Standard Model. \vskip .5cm\noindent - Neutrinos may be Majorana particles, leading to leptogenesis and possibly explaining matter-antimatter asymmetry. \vskip .5cm\noindent - Absurdly light neutrinos require a new scale of physics? \vskip .5cm\noindent - Neutrinos as keys to Yukawa Unification: they display the same gauge structure as quarks, yet their Yukawa patterns are strikingly different. This outstanding problem begs explanation. \vskip .5cm\noindent - Neutrinos are messengers from the Universe, from the center of the Sun, from Supernovae, and recently detected by IceCube from a four billion years old blazar! \vskip .5cm\noindent Except for dark matter, Neutrino masses and mixings provide the only ``Physics Beyond the Standard Model". Today a small proportion of particle physicists work on neutrino, even though over the years a number of neutrino prospectors found their study very rewarding: \vskip .5cm \hskip -0.25in \includegraphics[scale=.2]{Fermi.pdf} \hskip 0.2in \includegraphics[scale=.2]{Pauli.pdf} \hskip 0.2in \includegraphics[scale=.2]{Lederman.pdf} \hskip 0.2in \includegraphics[scale=.2]{Schwartz.pdf} \hskip 0.2in \includegraphics[scale=.2]{Steinberger.pdf} \vskip .5cm \hskip -0.25in \includegraphics[scale=.2]{Reines.pdf} \hskip 0.2in \includegraphics[scale=.2]{Davis.pdf} \hskip 0.2in \includegraphics[scale=.2]{Koshiba.pdf} \hskip 0.2in \includegraphics[scale=.2]{Kajita.pdf} \hskip 0.2in \includegraphics[scale=.2]{McDonald.pdf} \vskip .5cm \noindent Not to mention those notables who belong to the Neutrino Hall of Fame \vskip 1cm \hskip 0.2in \includegraphics[scale=.25]{Majorana.pdf} \vskip .5cm \hskip 0.2in \includegraphics[scale=.25]{Sakata.pdf} \vskip .5cm\noindent Their past achievements suggest that it may not be a bad idea to study everything possible about neutrinos\footnote{In the absence of direct evidence, theorists should put wax in their ears and chain themselves to the mast to resist the lure of light sterile neutrinos, while of course urging experimentalists to look for them}. \vskip .5cm\noindent Enough editorializing, and let us look at the neutrino's early history \newpage \section{Early History} It is customary to begin with Pauli's famous letter to Lise Meitner and friends, \vskip .5cm \includegraphics[scale=.3]{Letter.pdf} \vskip .5cm\noindent which is noteworthy in many different ways. Pauli postulates the existence of a neutral particle in the nucleus. Its existence would then solve two experimental facts. Raman scattering of the Nitrogen nucleus implies it is a boson. In Pauli's world, the Nitrogen nucleus is made up of protons and electrons and to account for its atomic weight and chemistry it must contain $7+7$ protons and $7$ electrons, thus making it a fermion. This is the ``exchange theorem" part as a new spin one-half fermion in the nucleus solves that problem. It is only later in the letter that he mentions the continuous spectrum of the $\beta$ electron, and in order to account for his particle to be in the nucleus, he endows it with a magnetic moment, and therefore a mass! \vskip .5cm\noindent Chadwick's discovery of neutron two years later solves the Nitrogen problem, and does not require Pauli's light neutron to be inside the nucleus. However it is still needed, although in a new world rocked by quantum mechanics, even the great Bohr entertained the idea that nuclear processes might violate energy conservation. \vskip .5cm\noindent The sociological context of the letter is revealing. Pauli is clearly nervous at the idea of introducing a new particle! So much so that he does not publish the idea. Six months later, at the APS June 1931 meeting in Pasadena, Pauli gave a talk where he is said to have discussed his new particle and believed it lived in the nucleus. I have not been able to find a copy of his talk. \vskip .5cm\noindent One might wonder if the Neutron had been discovered earlier (as it could have been) would Pauli have suggested a new light neutral particle? Did the founding fathers think that they should solve every puzzle without introducing new degrees of feedom? Contrast with today's practice where any experimental anomaly is interpreted by new particles, even towers thereof. ``O Tempore O Mores". \vskip .5cm\noindent Another aspect of the letter is that he foregoes a physics meeting to go on a date! Pauli was in the midst of a divorce from actress Kate Depner who left him for a chemist! Within a year Pauli was under analysis with Carl Jung. \vskip .5cm\noindent It was of course E. Fermi who in $1933$ and $1934$ papers identifies Pauli's particle as being created by the decay process. Being Italian he named it neutrino, the little neutron. \vskip 1cm \noindent A revealing testimony of the place the neutrino idea occupied in particle physics is Hans Bethe and Robert Bacher's $1936$ Review of Modern Physics \vskip .5cm \hskip 1cm \includegraphics[scale=.3]{Bethe.pdf} \vskip .5cm\noindent Interesting as it may be, the neutrino idea offers no proof of its existence. Still they identify the process by which the (anti)neutrino was detected twenty years later: inverse $\beta$ decay. Its detection required an improvement of $10^{13}$ in sensitivity, making it all but insurmountable! \vskip .5cm\noindent Bethe and Bacher still denote the neutrino by $n'$ to distinguish it from the neutron $n$. L. H. Rumbaugh, R. B. Roberts and L. R. Hafstad seem to be the first to use the greek letter $\nu$ in $1937$ (E. M. Lyman a year later). I am not aware of any earlier attribution. It is universally used from then on. \vskip .5cm\noindent Ten years later, the $1948$ Reviews of Modern Physics article by H. R. Crane summarizes the community's attitude on the neutrino, as a useful idea but still not universally accepted: \vskip .5cm \hskip 1.5cm \includegraphics[scale=.3]{Crane.pdf} \vskip 1cm\noindent This attitude is about to change when Clyde Cowan and Frederick Reines use inverse $\beta$ decay to finally detect antineutrinos coming from the Savannah River reactor at the Georgia-South Carolina border. The neutrino is the only elementary particle discovered south of the Mason-Dixon line. At first their discovery met with skepticism, as the titles of their papers suggest: $1953$ ``Detection of the Free Neutrino" announce the experiment, the $1954$ talk ``Status of an Experiment to detect the free neutrino" at the January APS Meeting, and finally their $1956$ article ``Detection of a Free Neutrino: a Confirmation", published in Nature. Earlier, Cowan and Reines had sent Pauli news of their discovery who responded thus, \vskip .5cm \hskip 1.5cm \includegraphics[scale=.25]{Pauli2.pdf} \vskip .5cm\noindent A comment very much applicable to the present state of particle physics! \vskip 1cm\noindent In $1937$ E. Majorana (Il Nuovo Cimento 14,171(1937)) noticed that as a neutral particle the neutrino could, without violating Lorentz invariance, be its own antiparticle, in constrast with electrons and positrons easily distinguishable by their electrical charge. \vskip .5cm \hskip 1cm \includegraphics[scale=.25]{Majorana2.pdf} \vskip .5cm\noindent This brilliant theoretical remark will assume more importance in later years. Neutrinos and antineutrinos can be distinguished by their lepton number since Majorana particles necessarily break lepton number. Further progress along these lines was cut short by his tragic disappearance. \vskip .5cm\noindent Starting from Maria Goeppert-Mayer's $1935$ study of double $\beta$ decay, Wendell Furry (Phys. Rev 56, 1184(1939)) applied the Majorana idea to a similar decay neutrinoless double $\beta$ decay ($\beta\beta^{}{{\scriptstyle 0}\nu}$) with the difference that the two electrons are expelled without their their usual antineutrinos. Furry's process gave reality to the Majorana or non Majorana nature of neutrinos. \vskip .5cm\noindent In $1945$ Bruno Pontecorvo proposes a way to look for neutrinos $$\nu_e+{}_{}^{37}Cl~~\longrightarrow~~{}^{37}_{}Ar+e^-_{}$$ Whenever a neutrino hits a vat of cleaning fluid $CCl_4$, an Argon isotope and an electron are produced. The beauty of the reaction is that Argon is chemically inert and is radioactive with a half life of the order of one month with provides a beautiful signature. Pontecorvo approached his teacher Fermi who said that although it was a nice idea, it will never be seen because the rates are so low. So it remained a preprint from Chalk River, the Canadian reactor laboratory where Pontecorvo was working. Being classified, it was not published; even when declassified a few years later Pontecorvo did not submit it for publication\footnote{When I met Pontecorvo (once) at Erice, he gave me a reprint of his paper}. \vskip .5cm\noindent Pontecorvo's elegant reaction had not escaped Ray Davis' attention, whose skills as a radio chemist were taylor-made for this experiment. He proposes a pilot experiment near the same Savannah river nuclear plant, which generates plenty of antineutrinos but no neutrinos. A rumor soon appears according to which Davis had detected one neutrino event. Rumors propagate faster than the speed of light since they contain no information. Sure enough the rumor was just that but it had the unintended effect to motivate Pontecorvo with another beautiful idea (J. Exptl. Theoret. Phys. (U.S.S.R.) 33, 549 (1957)): could it be that a reactor antineutrino oscillates into Davis' neutrino? He reasoned by analogy with the analysis of the neutral Kaon anti-Kaon system the year before. \vskip .2cm \hskip -1cm \includegraphics[scale=.3]{Pontecorvo.pdf} \vskip .5cm \hskip -1cm \includegraphics[scale=.3]{Pontecorvo2.pdf} \vskip .2cm \noindent Thus was born the idea of vacuum neutrino-antineutrino oscillations (``transmutations"). \vskip 1cm\noindent After the Cowan-Reines experiments it was soon realized on harmonious grounds that there must be a different neutrino associated with the muon. Shoichi Sakata, Ziro Maki and Masami Nakagawa (Prog. Theo. Phys. 28, 870(1962)) applied the flavor mixing ideas of Gell-Mann and Levy to neutrinos\footnote{Kobayashi and Maskawa who discovered CP violation in quark mixing were students at Nagoya University where Sakata had extended his egalitarian ideas to particle mixings} \vskip .5cm \hskip .5cm \includegraphics[scale=.3]{Maki.pdf} \vskip .5cm\noindent They refer to the transmutation between the two flavors of neutrinos $\nu_e$ and $\nu_\mu$. Thus was born the idea of vacuum flavor oscillation. \vskip .5cm This concludes my short and selective description of neutrino prehistory. \section{Neutrino Masses} It was Fermi who first attempted to determine the neutrino mass from the continuous spectrum of the $\beta$ electron. He proposed to look at the electron's spectrum at the end of its kinematically allowed range\footnote{An early example of extreme kinematics used today to distinguish different topologies of LHC events}. \vskip .5cm\noindent Fermi had first published his findings in Italian ({\sl La Ricerca Scientifica}, 2, fasc. 12(1933)), and a year later in a German journal (Z.Phys. 88 161(1934)), which explains the two erroneous but suggestive figures: \vskip .5cm \hskip .75cm \includegraphics[scale=.3]{Fermi1.pdf} \hskip 2cm \includegraphics[scale=.3]{Fermi2.pdf} \vskip .5cm\noindent In fact neutrinos are absurdly light, to the point that it was widely believed that they were massless\footnote{This ``what else can it be" attitude on neutrino masses is reminiscent of the cosmological constant migrating from a ``wecib" zero to a non-zero measured value}, in which case the mixing would be irrelevant. \vskip 1.cm \noindent There are many ways to incorporate neutrino masses in the Standard Model. All require new degrees of freedom, either bosons and/or fermions. They are distinguished by their couplings to the three weak doublets and three weak singlets of the Standard Model leptons, $$ L^{}_i=\begin{pmatrix}\nu^{}_i\cr e^{}_i\end{pmatrix},\qquad \bar e^{}_i, $$ where $i=1,2,3=e,\mu,\tau$ is the flavor index. There are three associated global lepton numbers $\ell_i$, with $\ell_i=+1$ for $L_i$ and $\ell_i =-1$ for $\bar e^{}_i$. \vskip .5cm\noindent Neutrino masses can be generated only if new degrees of freedom, bosons and/or fermions, are added to the Standard Model. We split the discussions into two cases \vskip .5cm \noindent - Leptonic Bosons Only \vskip .2cm \noindent With no extra fermions, neutrino masses are of the Majorana type $\nu_i\nu_j\sim L_iL_j$, which break lepton numbers by two units. Lepton-number carrying scalars fields must be introduced. Their renormalizable couplings to the Standard Model leptons are of three types: \vskip .5cm $$\bullet~{\rm Flavor~antisymmetric}~~L^{}_{[i}L^{}_{j]}~~{\rm weak~singlets~~couple~to}~~S^+_{},$$ where $S^+$ is a charged scalar field with hypercharge $2$ and total lepton number $\ell=\ell_e+\ell_\mu+\ell_\tau=-2$ $$\bullet~{\rm Flavor~symmetric}~~L^{}_{(i}L^{}_{j)}~~{\rm weak~triplets~~couple~to}~~T,$$ where $T$ are isotriplet scalar fields with hypercharge $2$ and total lepton number $\ell=-2$. Two of its three components $T^{++},T^+,T^0$ carry electric charge. With two charged components, its signature makes it an experimental favorite. $$\bullet~ {\rm Flavor~symmetric}~~\bar e^{}_i\bar e^{}_j~~{\rm weak~singlet~~couples~to}~~S^{--}_{},$$ where $S^{--}$ is a doubly charged scalar field. In these generic couplings, possible flavor indices are not shown. These models break lepton number explicitly\footnote{Spontaneous breaking generates experimentally ruled-out massless Majorons} in the potential to enable Majorana masses. In all cases explicit breaking occurs through cubic couplings of dimension three: $$m(H\,H)\,T~~{\rm (Type~ II)},\quad mS^{--}_{}S^+_{}S^+_{},\quad mS^{--}(T\,T),\quad m\bar S^+_{}\bar S^+_{}(T\,T), $$ and combinations thereof. All break $\ell$ by two units. The arbitrary mass parameters are determined to generate a mass suppression through mixing light and heavy states (called seesaw by some). There is a model (Zee) where the neutrino masses appear at one loop. It requires a second BEH scalar $H'$ to enable the cubic coupling $(H\,H')\,S^+_{}$, where $S^+$ couples to the flavor antisymmetric combination of two weak doublets. \vskip 1cm \noindent - Leptonic Fermions Only \vskip .2cm \noindent Extra fermions with lepton numbers couple renormalizably to the Standard Model in four ways using $H$ the weak doublet BEH boson (again suppressing all flavor indices): \vskip .5cm $$\bullet~L^{}_i\bar H~~{\rm weak~singlets~~couple~to}~~\bar N,$$ where $\bar N$ are neutral leptons with zero hypercharge and $\ell=-1$. Here the BEH vacuum value generates Dirac mass terms of the form $\nu_i\bar N_j$ which does not violate total lepton number. But then why are they so small? $$\bullet~L^{}_i\bar H~~{\rm weak~triplets~~couple~to}~~\bar \Sigma,$$ where $\bar\Sigma$ are isotriplet fermions with zero hypercharge and $\ell=-1$. $$\bullet~L^{}_i H~~{\rm weak~singlets~~couple~to}~~ \bar N^+_{},$$ where $ \bar N^+$ are charged leptons with two units of hypercharge and $\ell=-1$. The electroweak vacuum generates mass terms which mix $\bar N^+$ and $\bar e$. $$\bullet~L^{}_i H~~{\rm weak~triplets~~couple~to}~~ \vec\Sigma,$$ where $ \vec \Sigma$ are charged leptons with two units of hypercharge and $\ell=-1$ \vskip 1cm \noindent I discuss only the first of these fermion addition models, because the extra neutral leptons can have both Dirac and Majorana masses which unite to produce a winning combination. \noindent The $SO(10)$ Grand-Unified Theory naturally provides one fermion per chiral family, and the GUT scale generates the observed suppression of the neutrino masses: the Seesaw Mechanism. \vskip .5cm\noindent The Dirac mass is generated in the electroweak vacuum, from $\Delta I^{}_{\rm w}=1/2$ physics at the electroweak scale $m\sim 240 GeV$. The Majorana mass with $\Delta I^{}_{\rm w}=0$ unknown physics of unknown scale M. The three observed neutrino species have suitably suppressed masses, and the three right-handed neutrinos have masses of the order of the GUT scale. \vskip .5cm\noindent The Seesaw Mechanism requires new particles with GUT scale masses: there is particle Physics Beyond the Standard Model. \vskip 1cm \section{Neutrino Masses and Mixings} The observable lepton mixing matrix results from an overlap between two types of mixings, $$\m U^{}_{PMNS}=\m U^{\dagger}_{-1}\,\m U^{}_{Seesaw} $$ where $\m U^{}_{-1}$ diagonalizes the charged lepton Yukawa Standard Model couplings, and $\m U_{Seesaw}$ diagonalizes the Seesaw matrix, of unknown $\Delta I^{}_w=0$ origin\footnote{Although any neutrino mass model could generate this matrix, I consider only the Seesaw Mechanism where the scale is motivated by Grand-Unification}. \vskip .5cm \noindent Experimental neutrino mixing angles are a combination of two values, $$\theta^{}_{Expt}\sim \theta^{}_{EW}``+"\theta^{}_{Seesaw}$$ where $\theta_{EW}$ is expected to be like quark mixings, of the order of Cabibbo angle, a sort of ``Cabibbo Haze" correction to the Seesaw mixing $\theta_{Seesaw}$. \vskip 1cm The neutrino masses are constrained by both oscillation experiments and the early universe. Oscillations data (normal hierarchy, PDG values) yield: \begin{eqnarray*} \Delta^2_{12}&\equiv& \large |m^2_{\nu_1}-m^2_{\nu_2}\large |=(8.68~meV)^2,\\ \Delta^2_{23}&\equiv& \large |m^2_{\nu_1}-m^2_{\nu_3}\large |=(50.10~meV)^2. \end{eqnarray*} They suggest either the ``normal hierarchy" with $m_{\nu_1}<m_{\nu_2}\ll m_{\nu_3}$, or the ``inverted hierarchy" $m_{\nu_1}<m_{\nu_2}\gg m_{\nu_3}$ , although the former appears slighly favored. \vskip .5cm \noindent The energy in neutrino masses in the very early universe is limited to $$m_{\nu_1}+m_{\nu_2}+m_{\nu_3}\leq 220~meV.$$ \vskip 1cm \noindent The measured three lepton mixing angles, \begin{eqnarray*} \theta^{}_{23}&=&40.2^\circ \begin{matrix}\scriptstyle +1.4^\circ\cr \scriptstyle -1.6^\circ\end{matrix}~~\rm ``atmospheric~angle"\\ \theta^{}_{12}&=&33.6^\circ \pm .8^\circ~~\rm``solar~angle"\\ \theta^{}_{13}&=&8.37^\circ \pm .16^\circ<\theta_{Cabibbo}~~\rm``reactor~ angle" \end{eqnarray*} display two large angles and a small angle less than Cabibbo's. The two large angles were unexpected while the reactor angle falls in line with naive expectations. \vskip .5cm \noindent The present data tends towards a $CP$-violating phase in the PMNS matrix. \vskip .5cm \noindent The Seesaw mechanism predicts two other phase angles linked with Majorana physics that violate total lepton number. There is no sign of total lepton number violation in the data. \newpage \section{Neutrinos \& Yukawa Unification} In his famous (but forgotten) lecture\footnote{Proceedings of the Royal Society (Edinburgh), Vol 59,1938-39, Part II pp. 122-129} for the James Scott Prize ``The Relation between Mathematics and Physics", Dirac discusses the principles of simplicity and mathematical beauty. Simplicity is Newton's equation while mathematical beauty is the symmetry special relativity. He even goes as far as saying \vskip .5cm \noindent {\it ``It often happens that the requirements of simplicity and of beauty are the same, but where they clash the latter must take precedence"}. \vskip .5cm \noindent We follow Dirac's path in search of an organizing principle for Yukawa couplings. \vskip .5cm \noindent Beauty can be found in the quarks and leptons gauge couplings which suggest a unifying gauge symmetry at much shorter distances. \vskip .5cm \noindent Neither simplicity nor beauty is easily discerned in the masses and mixings of quarks and leptons. \vskip .5cm\noindent Quark masses and charged leptons are strongly hierarchical; neutrino masses are not. Quark mixings are small; neutrino mixings contain two large mixings. \vskip .5cm \noindent Large angles suggest a crystal-like symmetry for a hypothetical Majorana crystal. \vskip .5cm \centerline{ Can Dirac beauty emerge from a discrete symmetry?\footnote{Discrete flavor symmetry, advocated long ago by Sugawara and Pakvasa, and also Ma, is now hugely popular} } \vskip .5cm \noindent Three chiral families suggest finite subgroups of $SU(3)$. These were catalogued by mathematicians more than a century ago, and it is fair to say that each possibility can be found in the literature! \vskip .5cm \noindent There is no compelling argument in favor of one group over another. \vskip .5cm \noindent For the remainder of this talk I will be within this theorist's ``Rabbit Hole" and single out the mathematically ubiquitous simple discrete $SU(3)$ subgroup with $168$ elements, $PSL(2,7)$. \vskip .5cm \noindent It is useful to introduce a graphical rendition that shows how the different Yukawa couplings of the Standard Model are connected by Grand-Unification. \newpage \noindent Let us represent the Standard Model Yukawa couplings by circles labelled by the particles whose masses they generate. The fourth circle is the electroweak Dirac mass Yukawa with one right-handed neutrino per chiral family. \vskip .5cm \centerline{\includegraphics[scale=.25]{Yukawas.pdf}} \vskip .5cm \noindent To enable the Seesaw Mechanism we add the Majorana mass \centerline{\includegraphics[scale=.25]{MajoranaMass.pdf}} \vskip .5cm \noindent The $SU(5)$ and $SO(10)$ Grand-Unified groups connect these couplings through the ``Flavor Ring" where the red links are GUT-inspired and the observable mixing matrices are the black links: \centerline{\includegraphics[scale=.3]{FlavorRing.pdf}} \newpage \centerline{} \noindent We invoke a principle of {Seesaw Simplicity}, which posits that \vskip .5cm \noindent the two large (solar and atmospheric) angles come solely from the Seesaw side, \vskip .2cm \noindent the small reactor angle is entirely due to the charged lepton mixing matrix. \vskip .2cm \noindent An obvious choice for the Seesaw mixing matrix is the ``Tri-Bi-Maximal Matrix"\footnote{``The ugly matrix with a pretty name" (L. Everett) } of Perkins et al: $$\begin{pmatrix}\sqrt{2/3}&\sqrt{1/3}&0\cr -\sqrt{1/6}&\sqrt{1/3}&\sqrt{1/2}\cr \sqrt{1/6}&-\sqrt{1/3}&\sqrt{1/2}\end{pmatrix} $$ \vskip .2cm \noindent Seesaw simplicity is most clearly enunciated when the Yukawa matrix of the charge $2/3$ quarks is diagonal: $Y^{2/3}\sim{\rm Diag}(\epsilon^4,\epsilon^2,1)$\footnote{Natural when the family symmetry distinguishes diagonal from off-diagonal couplings} \vskip .5cm \noindent $\bullet~SO(10)$ link: charge $2/3$ and Dirac neutrino mass matrices are equal at GUT scale \vskip .2cm \noindent $\bullet~SU(5)$ link: $m_b=m_\tau$ determines the GUT scale $M_{\rm GUT}$ using the renormalization group\footnote{Possible only because the $b$ quark physical mass (half the $\Upsilon$) is bigger than the $\tau$ lepton's}. \vskip .5cm \noindent Absence of dramatic hierarchy in neutrino masses $\rightarrow$ ``correlated hierarchy" in the Majorana mass matrix $${\m M}=\begin{pmatrix} \epsilon^4&0&0\cr 0&\epsilon^2&0\cr 0&0& 1\end{pmatrix} {\m M'} \begin{pmatrix} \epsilon^4&0&0\cr 0&\epsilon^2&0\cr 0&0& 1\end{pmatrix}$$ $\m M'$ of order one with inverse eigenvalues proportional to neutrino masses. TBM diagonalization fixes relations among its elements: $${\m M'_{12}}={\m M'_{13}};\quad {\m M'_{22}}={\m M'_{23}};\quad{\m M'_{11}}+{\m M'_{12}}+{\m M'_{23}}={\m M'_{22}} $$ \vskip .5cm \noindent Choice of discrete group is predictive (G. Chen, J. M. P\'erez): $$PSL(2,7)~~\rightarrow~~{\m M'_{22}}={\m M'_{23}}~~\rightarrow~~\Big|\frac{m_{\nu_1}}{m_{\nu_2}}\Big|=\frac{1}{2}$$ Folding this extra relation with the oscillation data yields $$m_{\nu_3}\sim~ 50~ meV,\quad m_{\nu_2}\sim 11~ meV,\quad m_{\nu_1}\sim 5.5~ meV$$ \newpage \noindent The $2014$ Florida flavor group (J. Kyle, J. M. P\'erez, J. Zhang) found that TBM mixing required flavor-asymmetric charged lepton Yukawa matrices. \vskip .5cm\noindent Recently my students (M.H. Rahat and Bin Xu) and I presented a TBM texture that fits the GUT patterns and all mass and mixing angles data but only for a specific CP-violation. \vskip .5cm \noindent $\bullet~SU(5)$ relate charge $-1/3$ and charge $-1$ Yukawa matrices with BEH along the $\bf \bar 5$ and $\bf\overline {45}$ representations. The Yukawa matrices are expressed in terms of the Wolfenstein parameters $A,\rho,\eta,\lambda$ \begin{eqnarray*} {\bf\bar 5}&:&~~~\frac{1}{3}\begin{pmatrix} 2\sqrt{\rho^2+\eta^2}\lambda^4&\lambda^3&3A\sqrt{\rho^2+\eta^2}\lambda^3\cr \lambda^3&0&3A\lambda^2\cr 3A\sqrt{\rho^2+\eta^2}\lambda^3&3A\lambda^2&3 \end{pmatrix}+\frac{2\lambda}{3A}\begin{pmatrix} 0&0&0\cr 0&0&0\cr 1&0&0\end{pmatrix} \\ {\bf\overline {45}}&:&~~~\frac{\lambda^2}{3}\begin{pmatrix} 0&0&0\cr 0&1&0\cr 0&0&0\end{pmatrix} \end{eqnarray*} They reproduce the Wolfenstein CKM matrix, the Gatto relation and the GUT-scale Georgi-Jarlskog relations $$ \lambda\approx \sqrt{\frac{m_d}{m_s}},\quad m_b=m_\tau,\quad m_\mu=3m_s,\quad m_d=3m_e.$$ The PMNS angles are also determined, but they differ from their PDG values, $$\theta_{13}:~ 2.26^\circ {\rm above~pdg},\quad \theta_{23}:~ 2.9^\circ {\rm below},\quad\theta_{12}:~ 6.16^\circ {\rm above}. $$ These angles can be brought back to their PDG values by adding a CP-violating phase $\varphi$ in the TBM matrix. This is possible because the reactor angle is above its experimental value. Lowering the reactor angle to its PDG value demands $\cos\varphi\approx 0.2$, but leaves the sign of $\varphi$ undetermined. The other two angles magically fall within PDG: $$\cos\varphi\approx 0.2~\rightarrow~\theta_{13}~{\rm at ~pdg},\quad \theta_{23}:~ 0.66^\circ {\rm below},\quad\theta_{12}:~ 0.51^\circ {\rm above}. $$ The Jarlskog-Greenberg invariant is $J=|0.027|$. When folded into the PMNS matrix, we find $\delta^{}_{CP}=1.32\pi$ or $\delta^{}_{CP}=0.67\pi$, depending on the sign of the phase. Only the first value is consistent with the little we know from experiments. \newpage \centerline {A Neutrino Prediction} \vskip 1cm \noindent Two important measurements await neutrino physics, neutrinoless double $\beta$-decay which will determine if the total lepton number is broken, and the cosmic neutrino background. In the absence of technology which suggests these measurements in the near future, I turn whimsically to mathematics to offer a prediction for the year when lepton number violation will be detected: \begin{eqnarray*} {\rm Revelation}&:& \hskip 3.67cm 1930\\ {\rm Detection}&:& ~26=2\cdot13~{\rm years~ later}~~ 1956\\ {\rm Oscillations}&:& ~68=2^2\cdot 17~{\rm years~ later}~ 1998\\ \beta\beta_{{\scriptstyle 0}\nu}~ {\rm Decay}&:& 152=2^3\cdot 19~{\rm years~ later}~ 2052 \end{eqnarray*} \vskip 2cm \centerline{\Large The Sun Never Sets } \vskip .5cm \hskip 1.5cm \includegraphics[scale=.3]{Sunset.pdf} \vskip .5cm \centerline{\Large On Neutrino Detectors} \vskip1cm \noindent I thank Professors Daniel Vignaud and Michel Cribier for their kind invitation, the Aspen Center for Physics for its hospitality, and the support of the Department of Energy under Grant No. DE- SC0010296. \end{document}
\section{Introduction} Associated to each number field $K/\mathbb{Q}$ is the ideal class group $\mathrm{Cl}_{K}$, a finite abelian group that encodes information about arithmetic in $K$, and can also be seen as the Galois group of the maximal unramified abelian extension of $K$. Correspondingly, each number field $K$ has a class number, defined to be the cardinality $|\mathrm{Cl}_K|$ of the class group. Given a field $K$, it is natural to ask about the size and structure of the class group; moreover, as $K$ varies over an infinite set, or ``family,'' of fields, it is natural to ask how the corresponding class groups distribute. Interest in such questions has a long history, going back to C.F. Gauss's class number conjecture, early attempts at proving Fermat's Last Theorem, and Dirichlet's development of the class number formula. In particular, although class numbers arise initially from an algebraic construction, the class number formula identifies them with values of $L$-functions and hence to core questions in analytic number theory, including the Generalized Riemann Hypothesis. Our focus in this paper is a well-known conjecture for $\ell$-torsion in class groups, which, in the strongest form in which it has been proposed, remains stubbornly out of reach. For each integer $\ell \geq 1$, the $\ell$-torsion subgroup of $\mathrm{Cl}_K$ is defined by \[ \mathrm{Cl}_{K}[\ell]:= \{ [\mathfrak{a}]\in\mathrm{Cl}_{K} : \ell [\mathfrak{a}]= \mathrm{Id} \}, \] in which we write the class group in additive notation. Thus for example, if the $\ell$-torsion is trivial, the class number is not divisible by $\ell$. How big is $\mathrm{Cl}_K[\ell]$? For any number field $K/\mathbb{Q}$ of degree $n$ and discriminant of absolute value $D_K$, we may trivially bound the $\ell$-torsion subgroup for any integer $\ell \geq 1$ by the size of the full class group, so that\footnote{We will use Vinogradov's notation: $A \ll B$ denotes that there exists a constant $C$ such that $|A| \leq C B,$ and $A\ll_\kappa B$ denotes that $C$ may depend on $\kappa$.} \begin{equation}\label{trivial_bound} 1 \leq |\mathrm{Cl}_K[\ell]| \leq |\mathrm{Cl}_K| \ll_{n,\epsilon} D_K^{1/2+\epsilon}, \end{equation} for all $\epsilon>0$ arbitrarily small, according to Landau's upper bound for the class number via the Minkowski bound (see e.g. \cite[Theorem 4.4]{Nar80}). But conjecturally, a much stronger upper bound should hold. \begin{conjecture}[$\ell$-torsion Conjecture]\label{conj_class} \item For every integer $n \geq 2$, every field extension $K/\mathbb{Q}$ of degree $n$ satisfies the property that for all primes $\ell \geq 2$ and every $\epsilon>0$, \begin{equation}\label{CL_ell_bound} |\mathrm{Cl}_{K}[\ell]| \ll_{n,\ell,\epsilon}D_K^\epsilon. \end{equation} \end{conjecture} This conjecture was first raised as a question of Brumer and Silverman \cite[Question $\mathrm{CL}(\ell,d)$]{BruSil96} in the context of counting elliptic curves with fixed conductor; we will return to this original motivation, and a possible more precise rate of growth, in \S \ref{sec_EC}. It is known to have implications for many other problems: for example, proving this upper bound would imply strong bounds for the ranks of elliptic curves (see \cite[\S 1.2]{EllVen07}) and for counts of certain number fields (see Remarks \ref{remark_Alberts} and \ref{remark_Hasse}). See also Zhang \cite[Conjecture 3.5]{Zha05} in the context of equidistribution of CM points on Shimura varieties, Duke \cite[p. 166]{Duk98} in consideration of counting number fields, and Belolipetsky and Lubotzky \cite[Thm. 7.5]{BelLub17}, who show an equivalence between certain more precise forms of Conjecture \ref{conj_class} and a conjecture on counting non-uniform lattices in semisimple Lie groups. We have stated the conjecture here for $\ell$ prime, as for composite $\ell$ the result follows from the prime cases; see \S \ref{sec_composite}. Conjecture \ref{conj_class} is known to be true in only one case: degree $n=2$ and the prime $\ell=2$; this follows from the genus theory of Gauss \cite{Gau01}, which shows that for a fundamental discriminant of absolute value $D_K$, we have $|\mathrm{Cl}_K[2]| \leq 2^{\omega(D_K)-1}$, where $\omega(D_K)$ denotes the number of distinct prime divisors of $D_K$. Since $\omega(m) \ll \log m/ \log \log m$ (see e.g. \cite[Ch. 22 \S 10]{HarWri08}), it follows that for any quadratic field $K$, for every $\epsilon>0$, \begin{equation}\label{Gauss_2} |\mathrm{Cl}_K[2]| \ll_\epsilon D_K^\epsilon . \end{equation} Recent progress has focused on verifying results toward Conjecture \ref{conj_class} by making small improvements on (\ref{trivial_bound}), either for all number fields of a fixed degree, or for ``almost all'' fields in a family of number fields of fixed degree. Results of the first type include \cite{HelVen06,Pie05,Pie06,EllVen07,BSTTTZ17}. Results of the second type, which can also be thought of as results ``on average'' over a family of fields, include \cite{DavHei71,Bha05,HBP17, EPW17,PTBW17x,FreWid17,FreWid18x}. (For an overview of recent work, see Section \ref{sec_previous}.) The apparent difficulty of verifying Conjecture \ref{conj_class} in any case other than that due to Gauss, leads to a question: is the strong pointwise version of Conjecture \ref{conj_class} stated above too much to expect? In this paper we describe several explicit motivations for why we expect Conjecture \ref{conj_class} to hold. The key philosophy we employ is the ``method of moments,'' surveyed in \S \ref{sec_moments}: this is the principle that in certain settings, if one can control arbitrarily high moments of a function, then one can deduce that there is not even one violation of a pointwise upper bound by the function. In particular we show \emph{quantitatively} how Conjecture \ref{conj_class} follows from three other well-known conjectures in number theory: the Cohen-Lenstra heuristics; the discriminant multiplicity conjecture for counting number fields with fixed discriminant; and a generalization of the Malle conjecture for counting number fields with bounded discriminant. Furthermore, we quantify implications of these conjectures for counting elliptic curves with fixed conductor, and we prove new unconditional counts for elliptic curves. Many recent works on $\ell$-torsion in class groups have focused on average results over families of fields, and this type of work has been significantly constrained by the difficulty of counting number fields. Our investigations in this paper confirm that counting fields is not merely a technical difficulty one encounters when proving average results, but in fact lies at the heart of understanding $\ell$-torsion in class groups. We now give an overview of this paper, organized according to four main themes. \subsection{Cohen-Lenstra and Cohen-Martinet heuristics (\S \ref{sec_CLM_predictions})}\label{sec_CL_intro} First, we make quantitatively precise how Conjecture \ref{conj_class} follows from the Cohen-Lenstra \cite{CohLen84} and Cohen-Martinet \cite{CohMar90} heuristics. In fact, we show that even a collection of weaker upper bounds for moments, implied by the Cohen-Lenstra-Martinet heuristics, would imply Conjecture \ref{conj_class}. We frame our first result as a statement about a ``family'' $\mathscr{F}$ of degree $n$ field extensions of $\mathbb{Q}$; we will at the moment leave the specifications of such a family rather vague, but this could indicate that we have fixed not only the degree and the Galois group of the Galois closure, but also the signature, certain local conditions, and possibly certain ramification restrictions (see \S \ref{sec_conventions} for precise conventions). Let $\mathscr{F}$ denote a family of fields $K/\mathbb{Q}$ of degree $n$ and let $\mathscr{F}(X)$ denote those with $0<D_K \leq X$, where $D_K = |\mathrm{Disc}\, K/\mathbb{Q}|$. Consider for any fixed real number $k \geq 1$, integer $\ell \geq 1$, and real number $\alpha \geq 1$ the statement that there exists a finite positive constant $c_{n,\ell,k,\alpha}$ such that for all $X \geq 1$, \begin{equation}\label{CL_k_upper} \sum_{K \in \mathscr{F}(X)} |\mathrm{Cl}_K[\ell]|^k \leq c_{n,\ell,k,\alpha} |\mathscr{F}(X)|^{\alpha}. \end{equation} \begin{thm}\label{thm_CLM_torsion} Let $n,\ell$ be fixed. Suppose that for a fixed value $\alpha \geq 1$, (\ref{CL_k_upper}) is known for an infinite increasing sequence of values $k$ that grows arbitrarily large. Then for every $\epsilon>0$ there exists a constant $c_{\epsilon} = c(\epsilon,n,\ell,\alpha)$ such that every field $K \in \mathscr{F}$ satisfies $|\mathrm{Cl}_K[\ell]| \leq c_{\epsilon} D_K^{\epsilon}$. \end{thm} Theorem \ref{thm_CLM_torsion} immediately implies that for fixed $n,\ell$, uniform control of arbitrarily high $k$-th moments is sufficient to deduce Conjecture \ref{conj_class} in its full strength: \begin{cor}\label{cor_CL} Let $n\geq 1$ be fixed and let $\mathscr{F}$ be taken to be the family of all degree $n$ extensions of $\mathbb{Q}$. For each fixed integer $\ell \geq 1$, the conclusion of Conjecture \ref{conj_class} for $\ell$-torsion for all $K \in \mathscr{F}$ would follow from knowing (\ref{CL_k_upper}) holds for that fixed $n,\ell$ and a certain fixed $\alpha \geq 1$, for arbitrarily large $k$. \end{cor} See Remark \ref{remark_FK} for an example of how to apply this moment approach to $4$-torsion in quadratic fields; while this case may be deduced by other means (\S \ref{sec_composite}), this is nevertheless an illustration of the principle. \subsection{Discriminant multiplicity conjecture (\S \ref{sec_DMC})} In the second theme, we will show quantitatively how Conjecture \ref{conj_class} follows from a well-known folk conjecture about counting number fields with fixed degree and fixed discriminant. By Hermite's finiteness theorem, for any fixed integer $D \geq 1$ there are finitely many extensions $K/\mathbb{Q}$ of degree $n$ with $D_K=D$ (see e.g. \cite[\S 4.1]{Ser97}). The question remains: how many? Duke \cite[\S 3]{Duk98} and Ellenberg and Venkatesh \cite[Conjecture 1.3]{EllVen05} make the following prediction, which we call the discriminant multiplicity conjecture: \begin{conjecture}[Discriminant Multiplicity Conjecture]\label{conj_DMC} For each $n \geq 2$, for every $\epsilon>0$ there exists a constant $C_{n,\epsilon}$ such that for every integer $D \geq 1$, at most $\leq C_{n,\epsilon} D^{\epsilon}$ fields $K/\mathbb{Q}$ of degree $n$ have $D_K=D$. \end{conjecture} Conjecture \ref{conj_DMC} is known to be true for quadratic fields ($n=2$) but is not known in full for any $n \geq 3$. See \S \ref{sec_DMC} for a summary of known results toward the discriminant multiplicity conjecture. Ellenberg and Venkatesh have noted that Conjecture \ref{conj_DMC} implies Conjecture \ref{conj_class} (see \cite[p. 164]{EllVen05}). In Theorem \ref{thm_fields_cl}, we make this explicit by exhibiting quantitatively how even a partial result toward Conjecture \ref{conj_DMC} implies progress toward Conjecture \ref{conj_class}. To do so, we define two notations: \begin{property}[Property $\mathbf{D}_n(\varpi)$]\label{property_D} Let $n \geq 2$ be fixed. We say that property ${\bf D}_n(\varpi)$ holds if for every $\epsilon>0$ there exists a constant $C_{n,\epsilon}$ such that for every fixed integer $D>1$, at most $\leq C_{n,\epsilon} D^{\varpi+\epsilon}$ fields $K/\mathbb{Q}$ of degree $n$ have $D_K=D$. \end{property} \begin{property}[Property $\mathbf{C}_{n,\ell}(\Delta)$]\label{property_C} Let $n, \ell \geq 1$ be fixed. We say that property ${\bf C}_{n,\ell}(\Delta)$ holds if for every $\epsilon>0$ there exists a constant $C_{n,\ell,\epsilon}$ such that for all fields $K/\mathbb{Q}$ of degree $n$, $|\mathrm{Cl}_{K}[\ell]| \leq C_{n,\ell,\epsilon} D_K^{\Delta+\epsilon }.$ \end{property} Now we make the relationship between $\mathbf{D}_n(\varpi)$ and the $\ell$-torsion conjecture quantitatively precise. \begin{thm}\label{thm_fields_cl} Fix an integer $n \geq 2$ and any prime $\ell$. If Property ${\bf D}_{n\ell} (\Delta)$ holds for a real number $\Delta \geq 0$, then Property ${\bf C}_{n,\ell}(\ell \Delta)$ holds. \end{thm} Note that the exponent we gain for the $\ell$-torsion bound is significantly weaker (that is, larger) than the exponent we assume for counting fields with fixed discriminant; in this formulation, as $\ell$ increases, we need to be increasingly good at counting the relevant fields, to preserve the same quality of bound on $\ell$-torsion. Theorem \ref{thm_fields_cl} has an immediate corollary: \begin{cor} Let $n \geq 1$ be fixed. Then for a fixed prime $\ell$, the statement of Conjecture \ref{conj_class} holds for all fields of degree $n$, if Conjecture \ref{conj_DMC} is known for degree $n\ell$. \end{cor} \begin{remark}\label{remark_deg_n} We highlight here a difficulty of this approach; if one fixes $n$ and wants to use this route to prove the $\ell$-torsion conjecture for all $\ell$ for fields of that degree, then one would need to prove the discriminant multiplicity conjecture for infinitely many degrees. The recent work of the authors in \cite{PTBW17x} to some extent eliminates this inefficiency; in that work, once the degree $n$ is fixed, (weak) results are proved for $\ell$-torsion for all $\ell$ by proving weak results toward the discriminant multiplicity conjecture only for degree $n$; see \S \ref{sec_review_avg} for further remarks. \end{remark} \subsection{Generalized Malle Conjecture (\S \ref{sec_gen_Malle})} In the third theme, we examine how Conjecture \ref{conj_DMC}, and hence Conjecture \ref{conj_class}, follows from a generalized Malle conjecture for counting number fields ordered via other invariants than the discriminant. This observation is due to Ellenberg and Venkatesh \cite[Prop. 4.8]{EllVen05}, and we state it here only loosely (see \S \ref{sec_gen_Malle} for a precise statement): \begin{letterthm}[{\cite[Prop. 4.8]{EllVen05}}]\label{T:EVA} If a generalized Malle conjecture (see (\ref{Malle_EV})) holds for all groups $G$, then Conjecture \ref{conj_DMC} holds, and hence Conjecture \ref{conj_class} holds. \end{letterthm} We highlight this theorem of Ellenberg and Venkatesh because it uses not only the method of moments but also a clever strategy of reinterpreting a $k$-th moment of an object as an average of $k$-fold objects, so that one can (conjecturally) obtain bounds for arbitrarily high moments only by assuming one understands bounds for averages. (This leads to speculation on whether it could be advantageous to reinterpret $k$-th moments of $\ell$-torsion as averages of $\ell'$-torsion over certain $k'$-fold objects, but any such precise formulation is so far elusive.) \begin{remark}\label{remark_Alberts} Note also that Alberts \cite{Alb18} has shown that Conjecture \ref{conj_class} implies the generalized Malle conjecture that we give below in (\ref{Malle_EV}), providing a converse to Theorem~\ref{T:EVA}. \end{remark} \subsection{Counting elliptic curves with fixed conductor (\S \ref{sec_EC})} In our fourth theme, we observe that for every $k \geq 1$, a $k$-th moment estimate for counting elliptic curves with fixed conductor can be deduced from any of the conjectures mentioned above. In addition, unconditionally, we derive improved bounds for counting elliptic curves with fixed conductor. To be precise, given a positive integer $q$, let $E(q)$ denote the number of isogeny classes of elliptic curves over $\mathbb{Q}$ with conductor $q$. Brumer and Silverman have put forward the following conjecture: \begin{conjecture}[{\cite[Conj. 3]{BruSil96}}]\label{conj_EC} For every $q \geq 1$, for all $\epsilon>0$, \[ E(q) \ll_\epsilon q^{\epsilon}. \] \end{conjecture} (For clarity, we note that an equivalently strong conjecture is expected to hold if we instead count the number $E'(q)$ of isomorphism classes of elliptic curves over $\mathbb{Q}$ with conductor $q$; the statement of our results below will hold for both $E(q)$ and $E'(q)$, up to a constant factor.) Brumer and Silverman proved the first result toward Conjecture \ref{conj_EC}, namely $E(q) \ll_\epsilon q^{1/2+\epsilon}$, by dominating this count by $3$-torsion in certain quadratic fields; by combining aspects of \cite[Thm. 4.5]{HelVen06} and \cite{EllVen07} this can now be improved to \begin{equation}\label{Eq_EV} E(q) \ll_\epsilon q^{2 \beta/ 3 \log 3 + \epsilon} \ll_\epsilon q^{0.1688...+\epsilon} \end{equation} for an explicit constant $\beta = 0.2782...$; see \S \ref{sec_EC} for an explication of this. We observe in Theorem \ref{thm_EC_6} that Conjecture \ref{conj_EC} would follow from counting sextic fields of fixed discriminant. But our main focus is on a moment version of Conjecture \ref{conj_EC}. Brumer and Silverman's argument dominates $E(q)$ pointwise by a sup-norm of $|\mathrm{Cl}_{K}[3]|$ over quadratic fields; this comparison has been sharpened further in \cite{HelVen06}, still using a supremum over a certain collection of quadratic fields. Thus proving an upper bound for $3$-torsion for almost all such fields (or for an average, or for a fixed moment) does not immediately provide an analogous result for $E(q)$ (see Remark \ref{remark_EC}). The content of Duke and Kowalski \cite[Prop. 1]{DukKow00} is that a refined argument shows that nevertheless, average counts for $E(q)$ are dominated by average counts for $3$-torsion in quadratic fields. (See \cite{FNT92} for an analogue when the curves are ordered by discriminant rather than conductor.) An upper bound for an average $\sum E(q)$ yields an upper bound for the number of $q$ for which $E(q)$ can violate a certain pointwise upper bound; a comparable upper bound for a higher moment $\sum E(q)^k$ sharpens the bound for the number of exceptions. This motivates us to consider higher moments. We build on \cite{BruSil96,DukKow00,HelVen06} to prove that the $k$-th moment of $3$-torsion in quadratic fields dominates the $(\gamma k)$-th moment of $E(q)$, for a certain numerical constant $\gamma \approx 2$ specified precisely below. \begin{thm}\label{thm_EC} Let $\mathscr{F}_2(X)$ denote the family of quadratic fields with discriminant of absolute value at most $X$. Let $\gamma = \log 3 / (2\beta) = 1.9745...$ be the numerical constant determined by $\beta= \beta(0) = 0.2787...$ as defined in \cite[Thm. 3.8]{HelVen06}. Let $k \geq 1/\gamma =0.5064...$ be a fixed real number, and assume that there exists $\Theta_k$ such that for every $\epsilon>0$ there exists $c_{k,\epsilon}$ such that for every $X \geq 1$, \begin{equation}\label{assume_k_moment_Cl3} \sum_{K \in \mathscr{F}_2(X)} |\mathrm{Cl}_K[3]|^k \leq c_{k,\epsilon} X^{\Theta_k + \epsilon}. \end{equation} Then for that $k$, for every $\epsilon>0$ there is a constant $c'_{k,\epsilon}$ such that for all $Q \geq 1$, \begin{equation}\label{get_2k_moment_Eq} \sum_{q \leq Q} E(q)^{\gamma k} \leq c'_{k,\epsilon}Q^{\Theta_k+\epsilon}. \end{equation} \end{thm} Notice that the conclusion for $E(q)$ is stronger than the assumption for $|\mathrm{Cl}_K[3]|$, since the power of the summand in the moment in question has nearly doubled in size. In particular, if we let $\mathscr{F}_2^0(X)$ restrict to those $K \in \mathscr{F}_2(X)$ with $X/2< D_K \leq X$, then (\ref{assume_k_moment_Cl3}) shows that \[ \# \{ K \in \mathscr{F}_2^0(X) : |\mathrm{Cl}_K[3]| \geq D_K^\varpi\} \ll X^{\Theta_k - k \varpi },\] while we see from (\ref{get_2k_moment_Eq}) that \[ \# \{ Q/2 \leq q \leq Q : E(q) \geq q^\varpi\} \ll Q^{\Theta_k - k \gamma \varpi }.\] By combining Theorem \ref{thm_EC} with moment bounds of the form (\ref{assume_k_moment_Cl3}) for $3$-torsion in quadratic fields due to Heath-Brown and the first author in \cite[Cor. 1.4]{HBP17} we immediately obtain new unconditional bounds for moments of $E(q)$: \begin{cor}\label{cor_EC} For each $q \geq 1$, let $E(q)$ denote the number of isogeny classes of elliptic curves over $\mathbb{Q}$ with conductor $q$. Let $\gamma = 1.9745...$ be the numerical constant as above. Then for every $Q \geq 1$, for all $\epsilon>0$, \[ \sum_{q \leq Q} E(q)^{2 \gamma } \ll_\epsilon Q^{23/18+\epsilon}.\] More generally, for all real $1 \leq k \leq 4$, \[ \sum_{q \leq Q} E(q)^{\gamma k} \ll_\epsilon Q^{(5k+13)/18+\epsilon},\] and for all real $k \geq 4$, \[ \sum_{q \leq Q} E(q)^{\gamma k} \ll_\epsilon Q^{(2k+3)/6+\epsilon}.\] \end{cor} These results improve on all results implicitly derivable in previous literature; see \S \ref{sec_EC} for details. \subsection{Concluding sections \S \ref{sec_previous} and \S \ref{sec_appendices}} In \S \ref{sec_previous} we survey certain recent works toward Conjecture \ref{conj_class}, with a focus on the relation to the Generalized Riemann Hypothesis. In contrast to the impact of the other major conjectures we have mentioned, GRH does not appear to imply Conjecture \ref{conj_class} directly, due to an interesting interaction with another set of conjectures, about number fields with generating elements of small height. Finally, in \S \ref{sec_appendices} we include brief appendices with further remarks about moment bounds and one special case of the discriminant multiplicity conjecture. \subsection{Notational conventions on families of fields}\label{sec_conventions} A ``family'' (set) of fields is formally defined as follows. Given an integer $n \geq 1$ and a fixed transitive subgroup $G \subseteq S_n$, for every integer $X \geq 1$ we can define a family $\mathscr{F}(X)$ to be $\{ K/\mathbb{Q} : \deg{K/\mathbb{Q}} = n, \mathrm{Gal}(\tilde{K}/\mathbb{Q}) \simeq G, D_K= |\mathrm{Disc}\, K/\mathbb{Q}| \leq X \},$ where all $K$ are in a fixed algebraic closure $\overline{\mathbb{Q}}$, $\tilde{K}$ is the Galois closure of $K$ over $\mathbb{Q}$, the Galois group is considered as a permutation group on the $n$ embeddings of $K$ in $\overline{\mathbb{Q}}$, and the isomorphism with $G$ is one of permutation groups. We let $\mathscr{F} =\mathscr{F}(\infty)$. It is furthermore possible to impose additional restrictions on the definition of the family, such as fixing the signature, certain local conditions, or ramification restrictions. In some cases where we wish to be more vague (for example, considering all degree $n$ extensions), we will just refer to a family $\mathscr{F}$ and the subset $\mathscr{F}(X)$ of those fields $K \in \mathscr{F}$ with $D_K \leq X$. Given a family $\mathscr{F}$, we will say that a set $E \subset \mathscr{F}$ is a subset of density zero if \[ \frac{|E \cap \mathscr{F}(X)|} {|\mathscr{F}(X)|}\rightarrow 0 \quad \text{as $X \rightarrow \infty$}.\] If a property holds for all fields in a family except those lying in a possible exceptional set of density zero, we say the property holds for ``almost all'' fields in the family. \section{The method of moments}\label{sec_moments} We start with a general philosophy for why one can expect control of arbitrarily high moments of a function to yield good control on the function's values. On a ($\sigma$-finite) measure space $(\mathcal{M},\mu)$ such as $\mathbb{R}$ with Lebesgue measure or $\mathbb{Z}$ with counting measure, given a complex-valued measurable function $f$, define for every real $\alpha>0$ the distribution function $ \lambda(\alpha) = \mu( \{ x: |f(x)| > \alpha \})$. Then for any $\alpha>0$, \begin{equation}\label{int_id} \alpha^{p} \lambda(\alpha) \leq \int_{\{|f| >\alpha\}} |f(x)|^p d\mu \leq \int_\mathcal{M} |f(x)|^p d\mu = \|f\|_{L^p(\mathcal{M},\mu)}^p . \end{equation} Suppose that it is known that for a sequence of $p$ growing arbitrarily large we have $\|f\|_{L^p}^p \leq C$ for a fixed constant $C$, uniformly in $p$. Assuming this, one intuitively sees that for fixed $\alpha > 1$, as $p \rightarrow \infty$ through such a sequence, $\lambda (\alpha)$ must be vanishingly small in (\ref{int_id}). This is the principle by which uniform control of arbitrarily high moments implies pointwise ($\mu$-a.e.) bounds. (By a ``moment'' we refer to the $p$-th power of the $L^p$ norm, and not the $L^p$ norm itself. Using the notation of the distribution function $\lambda(\alpha)$ defined above, we have \[ \int_\mathcal{M} |f(x)|^p d\mu = - \int_0^\infty \alpha^p d\lambda(\alpha) = p\int_0^\infty \alpha^{p-1} \lambda(\alpha)d\alpha,\] which are all expressions for how ``moments'' are defined in different contexts, motivating the terminology.) Let us see more concretely how this philosophy applies in a model of the discrete setting that is our concern in this paper, by taking counting measure on $\mathbb{Z}$ (denoted by $|E|$ for a set $E \subset \mathbb{Z}$) and considering integer-valued functions of finite support (that is, vanishing aside from at finitely many integers). We will consider a restricted norm $\| f\|_{\ell^p(A_R)}^p = \sum_{n \in A_R} |f(n)|^p$ where $A_R$ is the dyadic interval $A_R=\{n: R \leq n \leq 2R\}$ with $R \geq 1$. Now we will aim to show not that $f$ is uniformly bounded but that it does not grow too quickly. For any $1 \leq p < \infty$ and any $\Delta>0$ the following inequality holds: \begin{equation}\label{moment1} R^{\Delta p} | \{ n \in A_R: |f(n)| > n^\Delta\}|<\sum_{\{n \in A_R : |f(n)| > n^\Delta\}} |f(n)|^p \leq \sum_{n \in A_R} |f(n)|^p =\|f\|_{\ell^p(A_R)}^p. \end{equation} Assume that for a sequence of $p \geq 1$, for all $R \geq 1$ we have \begin{equation}\label{bound_assumed_uniform} \|f\|_{\ell^p(A_R)}^p \leq |A_R|^\beta \end{equation} for some fixed $\beta>0$. Then we may conclude that for each such $p$, for all $R \geq 1$, we have \begin{equation}\label{moment2} | \{ n \in A_R: |f(n)| > n^\Delta\}| \leq |A_R|^\beta R^{-\Delta p} \leq R^{\beta - \Delta p} . \end{equation} In particular, if the sequence of $p$ for which we know this grows arbitrarily large, we can for each $R$ take $p$ sufficiently large that $R^{\beta - \Delta p}<1$ so that the set on the left-hand side of (\ref{moment2}) must be empty, that is, for all $n \in A_R$ we have $|f(n)| \leq n^\Delta$. (Somewhat more nuanced arguments are required if the bound in (\ref{bound_assumed_uniform}) is not uniform in $p$; see the proof of Theorem \ref{thm_CLM_torsion} and the comments in \S \ref{sec_meas_space}.) We will adapt this method of moments first to the setting in which our ``discrete space'' is a set of fields, and the function $f$ measures the size of the $\ell$-torsion subgroup (\S \ref{sec_CLM_predictions}); and later, to the setting in which the discrete space is $\mathbb{N}$ and $f$ counts the number of fields with a specified discriminant (\S \ref{sec_gen_Malle}). These ideas may be adapted to many other settings, such as other functions mapping fields (ordered by some invariant) to non-negative real numbers; for detailed remarks from the perspective of $L^p$ spaces, which may be helpful in such generalizations, see the appendix in \S \ref{sec_meas_space}. Note that in practice, even if one cannot prove uniform control of arbitrarily high moments, it can sometimes be useful to prove an upper bound for one particular moment, such as the second moment. If an upper bound for an average shows that a certain pointwise bound must hold for almost all elements in a family (that is, for all but an exceptional family of density zero), then proving an appropriate upper bound on a higher moment can force a better upper bound on the cardinality of the possible exceptional family. See Proposition \ref{prop_CL_weak} for an instance of this; this also motivates the interest for Theorem \ref{thm_EC} and Corollary \ref{cor_EC} on elliptic curves. The method of moments has a long history and wide applicability in number theory; we mention two additional settings. First, the method of moments shows that the Lindel\"of Hypothesis for the Riemann zeta function would be a consequence of upper bounds for arbitrarily large even moments of $\zeta(1/2+it)$ along the critical line. Precisely, arguments such as \cite[Thm. 13.2]{Tit86} show that the statement that for all $\epsilon>0$, \[ \zeta(1/2 + it) \ll_\epsilon t^\epsilon \qquad \text{for all $t \in \mathbb{R}$}\] is equivalent to the statement that for all $k=1,2,3,\ldots,$ for all $\epsilon>0$, \[ \frac{1}{T} \int_{1}^T |\zeta(1/2 + it)|^{2k} dt \ll_\epsilon T^\epsilon \qquad \text{for all $T \in \mathbb{R}$}.\] (We remark that in this context of Lebesgue measure on $\mathbb{R}$, rather than a discrete counting measure such as we will consider, one must have some way to ensure that a result holds for all $t$ and not just a.e. $t$; for this result on the zeta function, this comes from an integral expression for the analytic continuation, and the resulting notion of the derivative of $\zeta$ in the critical strip, so that any large value of $\zeta(1/2+it)$ would imply a positive measure neighborhood of large values.) Second, the principle of the method of moments can be used to deduce the Weil-Deligne bound for character sums of prime moduli from another Riemann Hypothesis, that of $L$-functions of algebraic varieties over finite fields. This area is very deep (see e.g. \cite{Kow10} for an overview). Even given Deligne's proof \cite{Del74,Del80} of the Weil conjectures (which includes deductions for certain one-variable additive character sums), deducing the desired (square-root cancellation) bounds for complete character sums in higher dimensions is difficult (the subject, for example, of many celebrated works of N. Katz, which fully employ tools of algebraic geometry). In contrast, ``elementary'' presentations proceed by the philosophy we have encapsulated above as the method of moments. The idea at the heart of this approach is, roughly speaking, that the character sum $S$ modulo a prime $p$ may be embedded inside a family of character sums $S_\nu$ over $\mathbb{F}_{p^\nu}$ for all $\nu \geq 1$. On the one hand, for each $\nu$ the sum $S_\nu$ may be interpreted as a sum of roots associated to a rational function (the zeta function), which are themselves $\nu$-powers of the roots associated to the original sum $S$. On the other hand, for each $\nu$ the sum $S_\nu$ may be interpreted in terms of counting points on a variety over $\mathbb{F}_{p^\nu}$ with a prescribed error-term. If for all sufficiently large $\nu$ the error term is $O(B^\nu)$ then one learns (by uniting the two interpretations) that the $\nu$-th moment of the roots corresponding to $S$ is $O(B^\nu)$ for all sufficiently large $\nu$, and hence by the general philosophy of the method of moments, one can deduce that each root associated to $S$ is $O(B)$. One finally deduces that $|S|$ itself is $O(B)$. (In this application, one is of course thinking of $B = p^{n/2}$ for the $n$-dimensional case.) There are two general presentations of this style of argument: first, Stepanov's method, exposed in \cite{Sch76} and \cite[\S 11.7]{IwaKow04}; see in particular Lemma 11.22 of \cite{IwaKow04} for the role of arbitrarily high moments in closing this argument. Second, there is the ``method of moments'' work of Hooley \cite{Hoo82}, whose consequences are summarized in \cite[Lemma 3.5]{Bro15}, and which also has a very clear, explicitly computed application in the work of \cite[Lemma 33]{BomBou09}. \section{Relation to the Cohen-Lenstra-Martinet moment predictions}\label{sec_CLM_predictions} We start from the perspective of the heuristics of Cohen-Lenstra \cite{CohLen84} and Cohen-Martinet \cite{CohMar90}. We will show in this section that a collection of moment asymptotics predicted by these heuristics, and indeed even a collection of much weaker upper bounds, implies Conjecture \ref{conj_class}. We will furthermore note that another well-known conjecture formulated under the heuristics (the density statement) does not suffice alone to imply Conjecture \ref{conj_class}. The Cohen-Lenstra and Cohen-Martinet heuristics predict, for ``good'' primes $\ell$, the distribution of class groups and their $\ell$-torsion subgroups as $K$ varies over a family of number fields of fixed degree. For example, the Cohen-Lenstra heuristics for the family $\mathscr{F}^-(X)$ of imaginary quadratic fields imply a moment asymptotic for each odd prime $\ell$: namely that for every positive integer $k \geq 1$, \begin{equation}\label{CL_k_moment} \sum_{K \in \mathscr{F}^-(X)} |\mathrm{Cl}_K[\ell]|^k \sim c^-_{\ell,k} \sum_{K \in \mathscr{F}^-(X)} 1, \end{equation} where $c^-_{\ell,k}$ is the number of $\mathbb{Z}/\ell\mathbb{Z}$ subspaces of the vector space $(\mathbb{Z}/\ell\mathbb{Z})^k$ (see, e.g. \cite[Lemma 3.2]{Woo15}). For real quadratic fields, the Cohen-Lenstra heuristics imply similar moment asymptotics with different values of $c_{\ell,k}^+$. In forthcoming work of the third author and W. Wang, it will be shown that given a permutation group $G$, for ``good'' primes (including all $\ell \nmid |G|$), the Cohen-Martinet heuristics imply moment asymptotics analogous to (\ref{CL_k_moment}) for the family of fields with Galois group $G$ and fixed signature, again with different values of the constant playing the role of $c_{\ell,k}^-$. It is worth mentioning the few known asymptotic results that verify cases of (\ref{CL_k_moment}) or its analogues for higher degree fields. First, Davenport and Heilbronn \cite{DavHei71} proved (\ref{CL_k_moment}) for $\ell=3$ and $k=1$, with $c^-_{3,1} = 2$, as well as its real analogue with $c_{3,1}^+ = 4/3$. Second, Bhargava \cite{Bha05} proved the conjectured asymptotic for cubic fields and $2$-torsion, for the first moment ($k=1$). Although not originally included in the Cohen-Lenstra heuristics, Fouvry and Kl\"{u}ners \cite{FouKlu06} proved an analogous result related to $4$-torsion when $K$ is quadratic, for all $k \geq 1$ (see Remark \ref{remark_FK}). There is also an increasing body of recent work toward related asymptotics, though not exactly of the kind mentioned above. For example, recent work of Klys \cite{Kly16} gives certain asymptotic results on $3$-torsion in cyclic cubic fields; see also the recent work on 16-rank in quadratic fields, e.g. Milovic \cite{Mil17a}, Koymans and Milovic \cite{KoyMil16,KoyMil17a}, or work of Bhargava and Varma \cite{BhaVar15,BhaVar16} elaborating on \cite{DavHei71,Bha05}. See also results of Klys \cite{Kly16} on moments of $p$-torsion in cyclic degree $p$ fields (conditional on GRH for $p \geq 5$) and of Smith \cite{Smi16,Smi17x} on the distribution of the $2^{k}$-class groups in imaginary quadratic fields (recently extended by Koymans and Pagano \cite{KoyPag18x} to $\ell^k$-class groups of degree $\ell$ cyclic fields). \subsection{Relation to Theorem \ref{thm_CLM_torsion}} We will now show that if a moment asymptotic such as (\ref{CL_k_moment}) holds, as long as we assume information is known for \emph{arbitrarily high} moments, we can deduce pointwise upper bounds on $|\mathrm{Cl}_K[\ell]|$ for each field $K$, with no exceptions. In fact our assumption in Theorem \ref{thm_CLM_torsion} is weaker than (\ref{CL_k_moment}), taking the form of an upper bound: we assume the upper bound (\ref{CL_k_upper}) holds for one fixed $\alpha$ and a sequence of arbitrarily large $k$. For any $\alpha \geq 1$ the case of the inequality (\ref{CL_k_upper}) is implied by (\ref{CL_k_moment}) or its appropriate analogue, and for all choices of $\alpha\geq 1$ the inequality is weaker than the conjectured Cohen-Lenstra-Martinet asymptotic for $\ell \nmid |G|$. For the cases of $\ell$ dividing $|G|$, for higher degree fields, in analogy with the quadratic case, we might also guess that for a given permutation group $G$, (\ref{CL_k_upper}) holds for $\ell $ dividing $|G|$ with $\alpha=1+\epsilon$, and that a proof of this in the case of $\ell$ dividing $ |G|$ is probably much more accessible than for good primes (see e.g. \cite{Kly16}). Returning our focus to the inequality (\ref{CL_k_upper}), we have phrased it for a fixed $\alpha$, and we have not ruled out the possibility that $\alpha$ is large. But in fact, the statement that (\ref{CL_k_upper}) holds for a particular fixed $\alpha$ for all $X \geq 1$ and an infinite sequence of arbitrarily large $k$ is equivalent to the statement that (\ref{CL_k_upper}) holds for $\alpha = 1 + \epsilon_0$ (for any $\epsilon_0>0$) for all $X \geq 1$ and all $k \geq 1$; see Remark \ref{remark_1} in the appendix \S \ref{sec_meas_space}. \subsection{Proof of Theorem \ref{thm_CLM_torsion}} Recall the setting of Theorem \ref{thm_CLM_torsion}, which we introduced in \S \ref{sec_CL_intro}. We will use the fact that there exist constants $C,B$ (not necessarily sharp) such that \begin{equation}\label{FCB} |\mathscr{F}(X)| \leq C X^B \end{equation} for all $X \geq 1$. Indeed, for any subset $\mathscr{F}$ of the set of all degree $n$ extensions of $\mathbb{Q}$, it is known by \cite{EllVen06} that \begin{equation}\label{fields} |\mathscr{F}(X)| \leq a_n X^{\exp(C_0\sqrt{\log n})}, \end{equation} for a certain absolute constant $C_0$ and a constant $\alpha_n$ depending only on $n$. By Malle's conjectures \cite{Mal02,Mal04}, it is expected that $B = 1$ should suffice, and this is known for $n=2,3,4,5$ by \cite{DavHei71}, \cite{CDO02}, \cite{Bha05}, \cite{Bha10a}. Of course for certain more restrictive collections of degree $n$ fields, we would expect the sharp value for $B$ to be even smaller, but we do not require this specificity here. We will note the dependence on $B$ in our subsequent arguments, but note that $B$ only depends on the degree $n$. We now prove Theorem \ref{thm_CLM_torsion}. This proof may clearly be adapted to functions $V : \mathscr{F} \rightarrow \mathbb{R}_{>0}$ other than $V(K) = |\mathrm{Cl}_K[\ell]|$, or in settings where $\mathscr{F}$ is ordered by invariants other than the discriminant. We begin by making a weaker deduction. \begin{prop}\label{prop_CL_weak} Let $n,\ell$ be fixed. Suppose that for a single fixed value $k=k_0 \geq 1$, (\ref{CL_k_upper}) is known for every $\alpha = 1 + \epsilon_0$ with $\epsilon_0>0$ arbitrarily small. Then for every fixed $\Delta >0$, $|\mathrm{Cl}_K[\ell]| \leq D_K^\Delta$ for every field $K \in \mathscr{F}$ except for at most a subset of density zero. \end{prop} \begin{proof} Suppose that $n, \ell$ are fixed and $k_0 \geq 1$ and $\epsilon_0>0$ are such that (\ref{CL_k_upper}) is known with $\alpha = 1+\epsilon_0$. For every real $\Delta >0$, we let $\mathscr{B}_\mathscr{F}(X,\Delta)$ denote the set of fields $K \in \mathscr{F}(X)$ such that $ |\mathrm{Cl}_K[\ell]| > D_K^\Delta.$ Let $\mathscr{F}^0(X)$ and $\mathscr{B}^0_\mathscr{F}(X,\Delta)$ restrict to discriminants in $(X/2,X]$. Then for every $X \geq 1$, (\ref{CL_k_upper}) implies that \[ |\mathscr{B}^0_\mathscr{F}(X,\Delta)|(X/2)^{\Delta k_0} < \sum_{\mathscr{B}^0_\mathscr{F}(X,\Delta)} |\mathrm{Cl}_K[\ell]|^{k_0} \leq \sum_{K \in \mathscr{F}^0(X)} |\mathrm{Cl}_K[\ell]|^{k_0} \leq c_{n,\ell,k_0,\epsilon_0} |\mathscr{F}(X)|^{1+\epsilon_0},\] so that for every $X \geq 1$, \begin{equation}\label{moment_chain} |\mathscr{B}^0_\mathscr{F}(X,\Delta)| \leq 2^{\Delta k_0} c_{n,\ell,k_0,\epsilon_0} |\mathscr{F}(X)|^{1+\epsilon_0} X^{-\Delta k_0}. \end{equation} Summing over at most $\log X + 1 \leq 2 \log X$ dyadic regions (using $\log_2$ for precision, say), we may conclude that for every $X \geq 1$, \[ |\mathscr{B}_\mathscr{F}(X,\Delta)| \leq 2^{\Delta k_0 + 1}c_{n,\ell,k_0,\epsilon_0} |\mathscr{F}(X)|^{1+\epsilon_0}X^{-\Delta k_0} \log X .\] Thus for every arbitrarily small $\epsilon_0>0$, there exists a constant $c'_{\Delta,n,\ell,k_0,\epsilon_0}$ such that for every $X \geq 1$, \[ |\mathscr{B}_\mathscr{F}(X,\Delta)| \leq c'_{\Delta,n,\ell,k_0,\epsilon_0} |\mathscr{F}(X)|^{1+\epsilon_0}X^{-\Delta k_0 + \epsilon_0}.\] As a result, \[ \frac{ |\mathscr{B}_\mathscr{F}(X,\Delta)| }{|\mathscr{F}(X)|} \leq c'_{\Delta,n,\ell,k_0,\epsilon_0}|\mathscr{F}(X)|^{\epsilon_0} X^{-\Delta k_0 + \epsilon_0} \leq C'X^{- \Delta k_0 + (B+1)\epsilon_0},\] with $C' =c'_{\Delta,n,\ell,k_0,\epsilon_0}C^{\epsilon_0}$ and $C,B$ as in (\ref{FCB}). Since this is known for arbitrarily small $\epsilon_0$, we conclude that $\mathscr{B}_\mathscr{F}(\infty,\Delta)$ is of density zero within $\mathscr{F}$, and every field in $\mathscr{F}$ that is not in $\mathscr{B}_\mathscr{F}(\infty,\Delta)$ must satisfy $|\mathrm{Cl}_K[\ell]| \leq D_K^\Delta$. \end{proof} We may prove Theorem \ref{thm_CLM_torsion} by elaborating on the previous argument. Let $n,\ell \geq 1$ again be fixed. We now assume that for a fixed $\alpha \geq 1$ (depending only on $n,\ell$), (\ref{CL_k_upper}) is known for an increasing sequence $\{ k_j\}$ that grows arbitrarily large. Let $\Delta>0$ be given. Arguing similarly to (\ref{moment_chain}), for each fixed $k_j \geq 1$ in our assumed sequence we deduce that for every $X \geq 1$, \[ |\{K \in \mathscr{F}^0(X): |\mathrm{Cl}_k[\ell]| > D_K^{\Delta} \}|\leq 2^{\Delta k_j }c_{n,\ell,k_j,\alpha} |\mathscr{F}(X)|^{\alpha}X^{-\Delta k_j} \leq c'_{\Delta,n,\ell,k_j,\alpha} X^{B\alpha - \Delta k_j}.\] Applying this for a value $k_j$ in our sequence that is sufficiently large (relative to $B,\alpha,\Delta$) that $B\alpha- \Delta k_j < 0$, we conclude that for all $X$ sufficiently large (relative to $B,\alpha, \Delta,k_j, c_{\Delta, n, \ell, k_j,\alpha}'$, which in turn are determined only by $n,\ell,\Delta$), we have that \[ |\{K \in \mathscr{F}^0(X): |\mathrm{Cl}_k[\ell]| > D_K^{\Delta} \}| < 1\] so that the set must be empty. We have shown that given any $\Delta>0$, there exists $X_0=X_0(n,\ell,\Delta)$ such that for all fields $K \in \mathscr{F}$ with $D_K \geq X_0$, we have $|\mathrm{Cl}_K[\ell]| \leq D_K^\Delta$. Of course, for any $\epsilon_0>0$ there exists $C_{\epsilon_0}$ such that for all $D_K < X_0$ we can apply the trivial bound \[|\mathrm{Cl}_K[\ell]| \leq |\mathrm{Cl}_K| \leq C_{\epsilon_0} D_K^{1/2+\epsilon_0} \leq C_{\epsilon_0} X_0^{1/2 + \epsilon_0} \leq C_0,\] say, where $C_0 = C_0(n,\ell,\Delta)$ is the constant $C_{\epsilon_0}X_0^{1/2+\epsilon_0}$ we obtain upon fixing $\epsilon_0$ to be, say, $\epsilon_0 = 1/2$. Combining these two results, we have that for the given $\Delta$, for all $K \in \mathscr{F}$, \[ |\mathrm{Cl}_K[\ell]| \leq C_0(n,\ell,\Delta) D_K^{\Delta} .\] Since $\Delta$ may be taken arbitrarily small in this argument, this concludes the proof of Theorem \ref{thm_CLM_torsion}. \begin{remark}\label{remark_FK} We note a case in which moments bounds sufficient for the hypotheses of Theorem \ref{thm_CLM_torsion} been proved: Fouvry and Kl\"uners have proved that for $\mathscr{F}_2^\pm$ the family of real (respectively imaginary) quadratic fields with fundamental discriminants, for every integer $k \geq 1$, \begin{equation}\label{FK_result} \sum_{K \in \mathscr{F}_2^\pm(X)} 2^{k \; {\rm rk }_2(2 \mathrm{Cl}_K)} \sim C^\pm_k |\mathscr{F}_2^\pm(X)| \end{equation} as $X \rightarrow \infty$, for a specific constant $C_k^\pm$. (We use additive notation, so that we write $2\mathrm{Cl}_K$ where Fouvry and Kl\"uners write $\mathrm{Cl}_K^2$; see \cite[Conj. 2]{FouKlu06} and Theorems 6--11 therein.) By Theorem \ref{thm_CLM_torsion}, (\ref{FK_result}) shows that $|(2\mathrm{Cl}_K)[2]| \ll_\epsilon D_K^\epsilon$ for all $\epsilon>0$. From this it follows that $|\mathrm{Cl}_K[4]| \ll_\epsilon D_K^\epsilon$ for all $K \in \mathscr{F}_2^{\pm}(X)$. (Indeed, $ |\mathrm{Cl}_K[4]|=|2(\mathrm{Cl}_K[4])| \cdot |\mathrm{Cl}_K[4]/2(\mathrm{Cl}_K[4])|$. Within the first factor, $|2(\mathrm{Cl}_K[4])|=|(2\mathrm{Cl}_K)[2]|$, which we have just bounded. Within the second factor, by the structure theorem of finite abelian groups, $|\mathrm{Cl}_K[4]/2(\mathrm{Cl}_K[4])|=|\mathrm{Cl}_K[2]|$, which is bounded by (\ref{Gauss_2}).) Although this is an illustration of how Theorem \ref{thm_CLM_torsion} can be applied, the result for $4$-torsion holds trivially for group-theoretic reasons once (\ref{Gauss_2}) is known; see \S \ref{sec_composite}. \end{remark} \begin{remark}[Density statements]\label{remark_moments_density} It is worth pointing out that aside from moment asymptotics, there is another type of asymptotic, a density statement, which also follows from the Cohen-Lenstra and Cohen-Martinet heuristics. For example, the density statement conjectured by the Cohen-Lenstra heuristics for imaginary quadratic fields is that for every odd prime $p$ and finite abelian $p$-group $G$, \begin{equation}\label{CL_density} \lim_{X\ra\infty} \frac{\sum_{\bstack{K\in \mathscr{F}(X)}{(\mathrm{Cl}_K)_p\cong G}} 1 }{\sum_{K\in \mathscr{F}(X)}1}= \frac{\prod_{i\geq 1} (1-p^{-i})}{|\Aut G|}, \end{equation} where for any abelian group $A$ we denote by $A_p$ the Sylow $p$-subgroup of $A$. (For $p=2$, Smith \cite{Smi17x} has proved that as $K$ varies over all imaginary quadratic fields, the distribution of $(2\mathrm{Cl}_K)_2$ obeys the heuristic expectation (\ref{CL_density}) for every finite abelian 2-group $G$; see also the extension \cite{KoyPag18x}.) In fact the Cohen-Lenstra and Cohen-Martinet conjectures make claims about averages over class groups of any ``reasonable'' real-valued function of groups, where reasonable is not precisely defined, but is meant to include both characteristic functions as in (\ref{CL_density}), and functions like $G\mapsto |G[p]|^k$ that are averaged in our moments, e.g. (\ref{CL_k_moment}). We have shown that moments such as \eqref{CL_k_moment} that are predicted by the Cohen-Lenstra-Martinet heuristics imply Conjecture \ref{conj_class}. In contrast, it is easy to see that density statements such as \eqref{CL_density} do not formally imply Conjecture \ref{conj_class}, unless some additional information is used as input. For suppose we had a function $C$ from number fields to finite abelian groups such that for every odd prime $p$ and finite abelian $p$-group $G$, $$ \lim_{X\ra\infty} \frac{\sum_{\bstack{K\in \mathscr{F}(X)}{C(K)_p\cong G}} 1 }{\sum_{K\in \mathscr{F}(X)}1}= \frac{\prod_{i\geq 1} (1-p^{-i})}{|\Aut G|}. $$ Then such averages would also hold if we replaced $C$ by any function $C'$ that only differs on a set of number fields that is of density zero in $\mathscr{F}(X)$. In particular, while the densities above still held for $C'$, we could impose $|C'(K)[\ell]|>D_K$ for infinitely many $K$. \end{remark} \section{Relation to the discriminant multiplicity conjecture}\label{sec_DMC} Our next goal is to make precise the relationship of the discriminant multiplicity conjecture (Conjecture \ref{conj_DMC}) to the $\ell$-torsion conjecture (Conjecture \ref{conj_class}). \subsection{Context of the discriminant multiplicity conjecture} Recall the definition of Property $\mathbf{D}_n(\varpi)$ (Property \ref{property_D}). The discriminant multiplicity conjecture posits that $\mathbf{D}_n(0)$ should hold for each $n \geq 2$. (In the other direction, Ellenberg and Venkatesh \cite[p. 164]{EllVen05} have noted that genus theory shows that the number of degree extensions $K/\mathbb{Q}$ with a fixed Galois group and fixed discriminant $D$ can be as large as $D^{c/ \log \log D}$.) At present, for $n \geq 6$, nothing better than the bound trivially available from (\ref{fields}) is known for $\mathbf{D}_n(\varpi)$. For $n=3,4,5$ the best-known results are as follows. For cubic fields, $\mathbf{D}_3(1/3)$ is known by \cite{EllVen07}. For quartic fields, $\mathbf{D}_4(1/2)$ holds. To see this, let us momentarily denote by $\mathbf{D}_4(G;\varpi)$ the veracity of Property \ref{property_D} restricted to those fields of degree $4$ and Galois group of the Galois closure isomorphic to $G$. Then $\mathbf{D}_4(S_4;1/2)$ is due to \cite{Klu06b}, $\mathbf{D}_4(A_4; 0.2784....)$ is due to \cite[Prop. 2.6]{PTBW17x}, $\mathbf{D}_4(K_4;0)$ is classical, as is $\mathbf{D}_4(C_4;0)$ (see e.g. \cite[Prop. 2.3]{PTBW17x}), and finally $\mathbf{D}_4(D_4;0)$ holds; we include a brief proof of this last fact in an appendix in \S \ref{sec_app_D4}. For quintic fields, $\mathbf{D}_5(199/200)$ is deduced in \cite{PTBW17x} as an immediate consequence of \cite{Bha10a}. For $n \geq 6$, if one further restricts to counting only those degree $n$ fields $K$ with $D_K=D$ and with Galois group of the Galois closure $ \simeq G$ for a certain fixed transitive subgroup $G \subseteq S_n$, then in some cases better results are known; see \cite{PTBW17x}. Conjecture \ref{conj_DMC} has been known for some time to be closely connected to questions about $\ell$-torsion in class groups, for primes $\ell$. For example, Duke \cite{Duk95} showed that quartic fields of fixed discriminant $-q$ ($q$ prime) can be explicitly classified by odd octahedral Galois representations of conductor $q$, and the number of such fields can be expressed as in \cite{Hei71} as an appropriate average of the number of 2-torsion elements in the class groups of cubic number fields of discriminant $-q$. More generally, in \cite[p. 164]{EllVen05}, Ellenberg and Venkatesh stated that Conjecture \ref{conj_DMC} implies Conjecture \ref{conj_class} in the case of $\ell$ prime; these two ideas are also implicitly linked in the exposition of \cite{Duk98}. \subsection{Proof of Theorem \ref{thm_fields_cl}} Let $K/\mathbb{Q}$ be a degree $n$ extension with Hilbert class field $H_K$, so that $\mathrm{Gal}(H_K/K) \simeq \mathrm{Cl}_K.$ Let $\ell$ be a fixed prime and write $\mathrm{Cl}_K$ additively, so that we have $\mathrm{Cl}_K [\ell] \simeq \mathrm{Cl}_K / \ell \mathrm{Cl}_K $ and a corresponding extension $K \subset L \subset H_K$ given by the fixed field $L=H_K^{\ell \mathrm{Cl}_K}$. \begin{center} \begin{tikzpicture}[-,>=stealth',shorten >=1pt,auto,node distance=2cm, thick,main node/.style] \node[main node] (Kt) {$H_K$}; \node[main node] (L) [node distance=1.35cm, below of=Kt] {$L$}; \node[main node] (K) [node distance=1.75cm, below of=L] {$K$}; \node[main node] (Q) [node distance=1.35cm, below of=K] {$\mathbb{Q}$}; \node[main node] (M) [node distance=1cm, left of=K, above of=K] {$M$}; \draw[-](Kt) to [bend right = 75,min distance=2cm] node [swap]{$\mathrm{Cl}_K$} (K); \draw[-] (Kt) to node {} (L); \draw[-] (K) to node {$n$} (Q); \draw[-, bend left] (L) to node {$\mathrm{Cl}_K[\ell] \simeq \mathrm{Cl}_K/\ell \mathrm{Cl}_K$} (K); \draw[-] (L) to node{} (M); \draw[-] (M) to node{$\ell$} (K); \end{tikzpicture} \end{center} Suppose $|\mathrm{Cl}_K[\ell]| = \ell^r$. Consider for each surjection $\phi : \mathrm{Cl}_K[\ell] \rightarrow \mathbb{Z}/\ell\mathbb{Z}$ the corresponding extension $K \subset M \subset L$ with $M/K$ of degree $\ell$. There are $N(\ell,r):=(\ell^r-1)/(\ell-1)$ such extensions $M/K$, each of which is degree $n\ell$ over $\mathbb{Q}$ and naturally satisfies \[\mathrm{Disc}\, M/\mathbb{Q} = ( \mathrm{Nm}_{K/\mathbb{Q}} \mathrm{Disc}\, M/K) \cdot (\mathrm{Disc}\, K/\mathbb{Q})^\ell.\] But since $M/K$ lives inside the unramified extension $H_K/K$, the first factor on the right-hand side is 1, so that $D_M = D_K^\ell$. Now supposing we have assumed Property $\mathbf{D}_{n\ell}(\Delta)$ holds, we know that for every $\epsilon>0$ there exists a constant $C_{n\ell,\epsilon}$ such that the number of degree $n\ell$ extensions of $\mathbb{Q}$ with discriminant precisely $D_K^\ell$ is $\leq C_{n\ell,\epsilon} (D_K^{\ell})^{\Delta+\epsilon}$. Then we can conclude that \[ |\mathrm{Cl}_K[\ell]| = (\ell-1) N(\ell,r) + 1 \leq (\ell-1) C_{n\ell,\epsilon} (D_K^{\ell})^{\Delta+\epsilon}+1. \] Thus for this fixed pair $n,\ell$, Property $\mathbf{C}_{n,\ell}(\Delta')$ holds with $\Delta' = \ell \Delta$, proving our claim. \begin{remark}\label{remark_Hasse} For $\ell$ an odd prime, there is a partial converse to Theorem \ref{thm_fields_cl}. Let $\mathbf{D}_\ell(D_\ell;\Delta)$ denote the veracity of Property \ref{property_D} for those degree $\ell$ fields with Galois group of the Galois closure isomorphic to $D_{\ell} \subset S_\ell$, the dihedral group of $2\ell$ elements (symmetries of a regular $\ell$-gon). Then for every odd prime $\ell$, for every $\Delta>0$, $ \mathbf{D}_\ell (D_{\ell}; \Delta)$ holds if $\mathbf{C}_{2,\ell}(\Delta)$ holds. For $\ell=3$ this is Hasse \cite{Has30}; in general, for this deduction see Kl\"uners \cite[Lemma 2.3]{Klu06}, which applies to degree $\ell$ $D_\ell$-extensions of any fixed number field. Recently \cite[Thm. 1.1]{CohTho16x} and \cite[Cor. 1.6]{FreWid18x} have used this relation to capitalize on recent improvements \cite{EPW17,PTBW17x} on $\ell$-torsion in quadratic fields in order to bound from above the number of degree $\ell$ $D_\ell$-fields of bounded discriminant. \end{remark} \section{Relation to a generalized Malle conjecture}\label{sec_gen_Malle} In this section we recall the formal statement of a generalized Malle conjecture as in Ellenberg and Venkatesh \cite{EllVen05}, and state how via the method of moments it implies the discriminant multiplicity conjecture (Conjecture \ref{conj_DMC}). Counting number fields of bounded discriminant is an average version of the pointwise bound conjectured in the discriminant multiplicity conjecture. Of course, if $\mathbf{D}_n(\varpi)$ is known then we may immediately deduce an upper bound for the average. At first glance, it is surprising that an implication in the other direction also exists; this would seem to contradict the philosophy of \S \ref{sec_moments}, which relied on bounding arbitrarily high moments, and not just an average, in order to deduce that a pointwise bound holds at \emph{all} points in a discrete space. The strategy of \cite{EllVen05} is that by converting $k$-th moments into averages of $k$-products, one can deduce pointwise bounds only under assumptions on averages. \subsection{Context of the Malle conjecture} Recall that it is conjectured that for every $n \geq 2$, if we define $Z_n(\mathbb{Q};X)$ to be the set of fields $K/\mathbb{Q}$ of degree $n$ (within a fixed closure $\overline{\mathbb{Q}}$), then \[ |Z_n(\mathbb{Q};X)| \sim c_n X \] for a particular constant $c_n$ (this is recorded for example as a ``folk conjecture'' in \cite[Conj. 1.1]{EllVen05}). This is easy to show for $n=2$ (in which case one is effectively counting square-free numbers, see e.g. the appendix in \cite{EPW17}). It has been proved in deep work of Davenport-Heilbronn \cite{DavHei71} for $n=3$; Cohen, Diaz y Diaz, and Olivier \cite{CDO02} and Bhargava \cite{Bha05} for $n=4$ (the $D_4$ and non-$D_4$ cases, respectively); and Bhargava \cite{Bha10a} for $n=5$. For any degree $n \geq 6$, such an asymptotic, or even an upper bound better than (\ref{fields}), is not known. (Lower bounds are also difficult; \cite{BSW16x} holds the current record $\gg X^{1/2 + 1/n}$.) If we further define $Z_n(\mathbb{Q};G,X)$ to restrict to those fields in $Z_n(\mathbb{Q};X)$ with $\mathrm{Gal}(\tilde{K}/K) \simeq G$, then Malle \cite{Mal02}, \cite{Mal04} has presented heuristics for upper and lower bounds \begin{equation}\label{Malle} X^{a_G} \ll |Z_n(\mathbb{Q};G,X)| \ll X^{a_G+\epsilon} \end{equation} as $X \rightarrow \infty$ with $a_G^{-1} =\min \{ \mathrm{ind}(g) : g \in G, g \neq \mathrm{id}\}$. (Here the index of an element $g \in S_n$ is defined as $\mathrm{ind}(g) = n-j$ where $j$ is the number of orbits of $g$ acting on a set of $n$ elements.) These ideas can also be adapted, at least heuristically according to the so-called Malle-Bhargava principle \cite[\S 10]{Woo16}, to take into account finitely or infinitely many local conditions. Proving that this principle holds in appropriate situations is currently of central interest in number theory. \subsection{Ellenberg and Venkatesh's moment argument} We first recall how a standard method of moments argument would approach the discriminant multiplicity conjecture. Let us consider (\ref{moment1}) and (\ref{moment2}), adapted to the setting where for each $m \in \mathbb{N}$, $f(m)$ denotes the number of fields $K \in Z_n(\mathbb{Q};G,X)$ such that $D_K = m$. Then after adapting (\ref{moment1}) to this setting, as long as we can prove that for a sequence of arbitrarily large $k$ we have for all $X \geq 1$ that \begin{equation}\label{moment3} \sum_{m \leq X} |f(m)|^k \leq X^\beta \end{equation} for some fixed $\beta$, we will be able to conclude via (\ref{moment2}) and a dyadic decomposition of $\{1 \leq m \leq X\}$ into at most $O( \log X)$ dyadic regions, that for all $X \geq 1$, \[ | \{ m \leq X : f(m) > m^\alpha \}| \ll X^{\beta - \alpha k} \log X.\] We could then deduce that no matter the fixed value of $\beta$, for any $\alpha>0$ arbitrarily small, by applying the above with sufficiently large $k$, we can deduce that for all discriminants $m \leq X$, there are at most $O_\alpha(m^\alpha)$ fields $K \in \mathbb{Z}_n(\mathbb{Q};G,X)$ with $D_K=m$, as desired. A significant obstacle to this approach is that in general, bounding even the first moment \[ |Z_n(\mathbb{Q};G,X)| = \sum_{m \leq X} f(m) \] remains completely out of reach at present (e.g. for $G\simeq S_n$ with $n \geq 6$), so that proving (\ref{moment3}) may seem an unrealistic starting point. This is where the ideas of Ellenberg and Venkatesh \cite[Remark 4.7, Prop. 4.8]{EllVen05} play a role, by cleverly translating the $k$-th moment estimate (\ref{moment3}) into merely an average estimate, but for a different set of fields than $Z_n(\mathbb{Q};G,X)$. Consequently, they show that a generalized version of the \emph{average} upper bound in (\ref{Malle}) would imply Conjecture \ref{conj_DMC}. The formulation of Ellenberg and Venkatesh is in terms of a field invariant called an $f$-discriminant, with $f$ a rational class function (not to be confused with the function $f$ used above). Precisely, if $G$ is a fixed transitive subgroup of $S_n$, then a map $f$ from the set $\mathcal{C}_G$ of nontrivial conjugacy classes of $G$ to $\mathbb{Z}_{\geq 0}$ is said to be a rational class function if it is invariant under the $\mathrm{Gal} (\overline{\mathbb{Q}}/\mathbb{Q})$-action and has the property that for $g \in G$, $f(g)=0$ if and only if $g = \{\mathrm{id}\}$. One can define a corresponding $f$-discriminant of any Galois extension $L/\mathbb{Q}$ with Galois group $G$. Precisely, for any $p \nmid |G|$ (so that certainly $p$ is at most tamely ramified in $L$ and the inertia group at $p$ is cyclic), let $c_p \in \mathcal{C}_G$ be the image of a generator of tame inertia at $p$. Then the $f$-discriminant $D_f(L)$ may be defined by \[ D_f(L) = \prod_{p \nmid |G|} p^{f(c_p)}.\] In particular, if $f(g) = \mathrm{ind}(g)$, then $D_f(L)$ is the prime-to-$|G|$ part of the standard absolute discriminant of any of the $n$ conjugate degree $n$ extensions $L_0/\mathbb{Q}$ with Galois closure $L$, corresponding via Galois theory to the element stabilizers in $G$. Ellenberg and Venkatesh ask whether for such $f$-discriminants, an appropriate analogue to (\ref{Malle}) holds. Given $G$, Ellenberg and Venkatesh define for a rational class function $f$ the invariant \[ a_G(f) = \max_{c \in \mathcal{C}_G, c \neq \{ \mathrm{id}\}} f(c)^{-1}.\] They then propose \cite[Ques. 4.3, Remark 4.7]{EllVen05} that if $Z^{(f)}(\mathbb{Q},G;X)$ counts Galois extensions of $\mathbb{Q}$ with Galois group $G$ and $f$-discriminant at most $X$, then for every $\epsilon>0$, \begin{equation}\label{Malle_EV} |Z^{(f)}(\mathbb{Q},G;X)| \ll_{G,f,\epsilon} X^{a_G(f) + \epsilon}. \end{equation} (In fact they propose a more refined asymptotic, but this upper bound version suffices for our considerations.) Under these definitions, we can see that (\ref{Malle_EV}) suffices to imply Conjecture \ref{conj_DMC}, and hence Conjecture \ref{conj_class}. \begin{letterthm}[{\cite[Prop. 4.8]{EllVen05}}] Given any group $G$, define on $G^k = G \times G \times \cdots \times G$ the rational class function that is identically 1 away from the identity, that is $f(c_1,c_2,\ldots, c_k) = 1$ for any choice of conjugacy classes $c_1,c_2,\ldots, c_k$ in $\mathcal{C}_G$ that are not all trivial. If a generalized Malle conjecture (\ref{Malle_EV}) holds for all $G$, for this choice of $f$, then Conjecture \ref{conj_DMC} holds. \end{letterthm} We merely sketch the ideas, directly following \cite[Prop. 4.8]{EllVen05}. Since isomorphism classes of degree $n$ $G$-fields are in finite-to-one correspondence (that is, $m_G$-to-one, where $m_G$ depends only on $G$) with isomorphism classes of degree $|G|$ Galois $G$-fields, to verify Conjecture \ref{conj_DMC} it suffices to prove that for any fixed Galois group $G$, the number of Galois extensions $K/\mathbb{Q}$ with discriminant $D_K = D$ is $\ll_\epsilon D^\epsilon$ for every $\epsilon$. The proof hinges on the fact that for $f$ as chosen in the theorem statement, the $f$-discriminant of a field $K$ is of the shape \[ \prod_{p|D_K,\; p \nmid |G|} p, \] in which the power of the prime is always 1. Moreover, for our choice of $f$, we have $a_{G^k}(f)=1$ for all $k$; this fact will play a key role. For each fixed integer $D \geq 1$ let $m(D)$ denote the number of Galois fields $K_1,\ldots,K_{m(D)}$, each with Galois group $\simeq G$ and each with $D_{K_i} = D$; our goal is to show that $m(D) \ll D^\epsilon$. For any fixed $k \leq m(D)$ we can generate on the order of ${m(D) \choose k} \gg_k m(D)^k$ composite fields $L=K_{j_1}\cdots K_{j_k}$ each with Galois group $\simeq G^k$, and each with $f$-discriminant $D_f(L/\mathbb{Q}) \leq D$, with $f$ as defined as above. Now suppose that there exists some $\alpha>0$ such that for a sequence of arbitrarily large $D$, we have $m(D) \geq D^{\alpha}$. Then for a sequence of arbitrarily large $D$ we would obtain at least $ \gg_k D^{\alpha k }$ elements in $Z^{(f)}(\mathbb{Q},G^k;D)$. Comparing this to the conjectured statement (\ref{Malle_EV}) in the case of the group $G^k$, we see that we must have $\alpha k \leq a_{G^k}(f)$, but by construction, we have $a_{G^k}(f)=1$ for all $k$. Since $k$ could be taken arbitrarily large, we would conclude that $\alpha$ must be arbitrarily small, implying Property $\mathbf{D}_n(0)$ must hold. \section{Counting elliptic curves}\label{sec_EC} \subsection{Context of counting elliptic curves} Given a positive integer $q$, let $E(q)$ denote the number of isogeny classes of elliptic curves over $\mathbb{Q}$ with conductor $q$. Let us clarify the relation between $E(q)$ and the number $E'(q)$ of isomorphism classes of elliptic curves over $\mathbb{Q}$ with conductor $q$. As used in \cite[p. 12]{DukKow00}, given any elliptic curve $E/\mathbb{Q}$, at most 8 $\mathbb{Q}$-isomorphism classes are $\mathbb{Q}$-isogenous to $E$; thus $E(q) \leq E'(q) \leq 8 E(q)$ (see \cite[Ch.IX, Example 6.4]{Sil09} for this fact). Thus an analogous conjecture holds for $E'(q)$, and we may proceed by considering either $E(q)$ or $E'(q)$; in particular the statement of our results will hold for both $E(q)$ and $E'(q)$, up to a constant factor. Brumer and Silverman \cite[Conj. 3]{BruSil96} conjectured (Conjecture \ref{conj_EC}) that for every $q$, $E(q) \ll_\epsilon q^{\epsilon} $ for all $\epsilon>0$. Indeed, Brumer and Silverman make a more precise conjecture: that there exist absolute constants $\kappa, \kappa'$ such that for any finite set $S$ of primes, the number of elliptic curves with good reduction outside of $S$ is at most $\kappa M_S^{\kappa'/\log \log M_S}$, where $M_S = \prod_{p \in S}p$. \begin{remark} Correspondingly, Brumer and Silverman's original formulation of Conjecture \ref{conj_class} is the more precise question of whether there is a constant $c_{n,\ell}$ such that for every field $K$ of degree $n$ one has \[ \log_\ell |\mathrm{Cl}_K[\ell]| \leq c_{\ell,n} \log D_K / \log \log D_K.\] See also \cite[Conj. 3.3.A, Conj. 3.3.B, Thm. 7.5]{BelLub17} for other possible specific rates of growth, and their relevance for counting the number of conjugacy classes of non-uniform lattices in semisimple Lie groups. \end{remark} Upper bounds for $E(q)$ follow from bounding $3$-torsion in quadratic fields. Define for every $X \geq 1$ the quantity \[ H_3(X) = \max_{K \in \mathscr{F}_2(X)} |\mathrm{Cl}_K[3]|,\] in which $\mathscr{F}_2(X)$ denotes the family of quadratic fields (real or imaginary) with absolute discriminant at most $X$ (in absolute value). Then Brumer and Silverman showed in \cite[p. 99-100]{BruSil96} that for every $q$, \begin{equation}\label{BruSil_ptwise} E(q) \ll_\epsilon q^\epsilon H_3(1728q), \end{equation} for every $\epsilon>0$. This was then sharpened in the proof of \cite[Thm. 4.5]{HelVen06} to \begin{equation}\label{HelVen_ptwise} E(q) \ll_\epsilon q^\epsilon (H_3(1728q))^{2 \beta/ \log 3}, \end{equation} for every $\epsilon>0$, where $\beta = 0.2782...$ and hence $2 \beta/ \log 3 = 0.5064...$, so that $\mathbf{C}_{2,3}(\Delta)$ implies $E(q) \ll_\epsilon q^{(0.5064...)\Delta+\epsilon}$. Originally the only bound available to Brumer and Silverman was the trivial bound $H_3(X) \ll X^{1/2+\epsilon}$ via (\ref{trivial_bound}); now that $\mathbf{C}_{2,3}(1/3)$ is known by \cite{EllVen07}, it follows that \[ E(q) \ll_\epsilon q^{2 \beta/(3 \log 3)+\epsilon} \ll_{\epsilon} q^{0.1688...+\epsilon} \] for all $q$. This is currently the best result known toward Conjecture \ref{conj_EC}. In addition, Brumer and Silverman have proved that Conjecture \ref{conj_EC} is true under the assumption of the Generalized Riemann Hypothesis and a weak version of the Birch-Swinnerton--Dyer Conjecture (\cite[Thm. 4]{BruSil96}). This is an interesting counterpart to the situation for bounding $\ell$-torsion, for which it appears that GRH implies partial results, but stops far short of proving Conjecture \ref{conj_class} in full (see \S \ref{sec_GRH}). From Theorem \ref{thm_fields_cl} and (\ref{HelVen_ptwise}), we make a simple observation, recalling the notation of Property \ref{property_D}. \begin{thm}\label{thm_EC_6} If Property $\mathbf{D}_6(\Delta)$ holds, then \[ E(q) \ll_{\epsilon} q^{6\beta\Delta/\log 3+\epsilon} \ll_\epsilon q^{(1.5193 \ldots)\Delta + \epsilon} \] holds for all $q \geq 1$. In particular, if it is known that for every $D$ there are at most $\ll_\epsilon D^{\epsilon}$ sextic fields $K/\mathbb{Q}$ of discriminant $D$, then Conjecture \ref{conj_EC} holds. \end{thm} \subsection{Average results} One can also ask about an average, or asymptotic, version of Conjecture \ref{conj_EC}. Here we distinguish briefly between ordering elliptic curves by discriminant or by conductor. We first consider ordering by discriminant. Brumer-McGuinness \cite[\S 5]{BruMcg90} have conjectured that the number of elliptic curves over $\mathbb{Q}$ whose minimal discriminant has absolute value less than $X$ is asymptotically of size $cX^{5/6}$ for an explicitly predicted constant $c$ (see also Watkins \cite[Conj. 2.1]{Wat08}). Each elliptic curve over $\mathbb{Q}$ in its Weierstrass form $y^2 = 27c_4x - 54c_6$ with integers $c_4, c_6$ has discriminant $\Delta$ with \begin{equation}\label{E_disc} 1728\Delta = c_4^3 - c_6^2. \end{equation} (Here the discriminant $\Delta$ and $c_4,c_6$ are the standard invariants as in \cite[p. 42 Ch. III \S 1]{Sil09}.) Very roughly speaking, we may think of the numerology as suggesting that for $\Delta$ fixed, most of the solutions to the equation (\ref{E_disc}) must come from $c_4 \ll \Delta^{1/3}$ and $c_6 \ll \Delta^{1/2}$. Counting elliptic curves ordered by discriminant, Fouvry, Nair and Tenenbaum \cite{FNT92} proved the weaker upper bound $\ll X^{1+\epsilon}$ for every $\epsilon>0$ and a lower bound of the order of magnitude $\gg X^{5/6}$. Any upper bound that is $o(X)$ would imply that the integers that are discriminants of elliptic curves are zero-density among all integers (a difficult open problem; see \cite{You15}). We next consider ordering by conductor $q$. Recall that the same primes divide the discriminant and the conductor, and the conductor is a divisor of the discriminant; the precise relationship between the two is related to Szpiro's conjecture \cite{Szp90} (for example predicting that $\Delta \ll_\epsilon N^{6+\epsilon}$). Watkins \cite[Heuristic 4.1]{Wat08} adapted the argument of Brumer-McGuinness \cite[\S 5]{BruMcg90} by analyzing heuristically how often a large power of a prime divides the discriminant, and proposed the following expectation: \begin{conjecture}\label{conj_EC_avg} Let $E'(q)$ denote the number of isomorphism classes of elliptic curves of conductor $q$. There exists a constant $c'>0$ such that \[\sum_{1 \leq q \leq Q} E'(q) \sim c' Q^{5/6}\] as $Q \rightarrow \infty$. \end{conjecture} Duke and Kowalski \cite[Prop. 1]{DukKow00} have proved the weaker result that for $Q \geq 1$, \begin{equation}\label{DK_average_result} \sum_{1 \leq q \leq Q} E(q) \ll_\epsilon Q^{1+\epsilon}. \end{equation} See also \cite{Won01a,Won01b}, which further proves a lower bound $\gg_\epsilon Q^{5/6-\epsilon}$. All these works \cite{DukKow00,FNT92,Won01a} argue by applying the asymptotic of Davenport and Heilbronn \cite{DavHei71} for the average of $|\mathrm{Cl}_K[3]|$. \begin{remark}\label{remark_EC} It is worth noting that an argument truly is needed to deduce (\ref{DK_average_result}) or our theorem on moments. Armed only with (\ref{BruSil_ptwise}), the statement we can trivially deduce is that \[ \sum_{q \leq Q} E(q)^k \ll_\epsilon Q^\epsilon \sum_{q \leq Q} H_3(1728 q)^k \ll_\epsilon Q^{1+\epsilon} H_3(1728 Q)^k. \] Since $H_3$ is a sup-norm, even one violation of a pointwise upper bound $|\mathrm{Cl}_K[3]| \leq D_K^\Delta$ would prevent us from concluding that the expression above is bounded by $\ll_\epsilon Q^{1+k\Delta +\epsilon}.$ Similar considerations apply if we use (\ref{HelVen_ptwise}). \end{remark} \subsection{Moment results: proof of Theorem \ref{thm_EC}} The proof of Theorem \ref{thm_EC} builds on the arguments in \cite{BruSil96}, \cite{DukKow00} and \cite{HelVen06}; we begin by recalling the set-up of \cite{BruSil96}. An elliptic curve of conductor $q$ has good reduction outside of the primes dividing $q$, and so it suffices to count the number $E_g'(q)$ of elliptic curves with good reduction outside of the set $S_q = \{p|q, \text{$p$ prime}\} \cup \{2,3\}$, and for any fixed $\kappa\geq 1$ we write \[ \sum_{q \leq Q} E'(q)^\kappa \leq \sum_{q \leq Q} E_g'(q)^\kappa. \] Let us fix $q$ and the corresponding set $S_q$. Then any elliptic curve $E/\mathbb{Q}$ counted by $E_g'(q)$ has \begin{equation}\label{disc_ad} 1728\Delta_E = ad^6 \end{equation} for integers $a,d$ with $a$ being $6$-th power free, and such that $(c_6(E)/d^3,c_4(E)/d^2)$ is an $S_q$-integral point on the elliptic curve $\mathscr{E}_a$ defined by \[ \mathscr{E}_a : Y^3 = X^2 + a.\] Let us denote by $A(q)$ the set of values $a$ that arise in this manner as $E$ ranges over $E_g'(q)$. Furthermore, given any $S_q$-integral point $P$ on one such $\mathscr{E}_a$, let us denote by $C(P)$ the set of elliptic curves $E$ counted by $E_g'(q)$ that give rise to the point $P$ by following the procedure above. Brumer and Silverman's argument (see also \cite{DukKow00}) shows that \[ \sum_{q \leq Q} E_g'(q)^\kappa \leq \sum_{q \leq Q} ( \sum_{a \in A(q)} \sum_{P} |C(P)| )^\kappa, \] in which $P$ varies over the $S_q$-integral points on $\mathscr{E}_a$. For each $P$, Brumer and Silverman show that $|C(P)| \leq 2^{\omega(q)+5} \ll_\epsilon q^\epsilon$ for every $\epsilon>0$ (see \cite[p. 100]{BruSil96}, as usual recalling that $\omega(q) \ll \log q/ \log \log q$. Moreover, they show that for each such $a,q$, the number of $S_q$-integral points on $\mathscr{E}_a$ is $ \ll_\epsilon q^\epsilon |\mathrm{Cl}_{K_a}[3]| $ for every $\epsilon>0$, where $K_a$ is the quadratic field $\mathbb{Q}(\sqrt{-a})$. (See the line leading to \cite[Eqn. (4)]{BruSil96}; in their equation we note that $\# S = \#S_q \leq \omega(q) +2$, so that for any constant $c$ we have $c^{\#S} \ll q^\epsilon$ for all $\epsilon>0$.) More recently, due to improved counts for integral points on a fixed Mordell elliptic curve (such as $\mathscr{E}_a$), we can improve this by \cite[Thm. 4.5]{HelVen06} to write that the number of $S_q$-integral points on $\mathscr{E}_a$ is \[ \ll_\epsilon a^\epsilon \exp\{ 2 \log_3 |\mathrm{Cl}_{K_a}[3]|(\beta + \epsilon)\} \ll_\epsilon a^\epsilon |\mathrm{Cl}_{K_a}[3]|^{2\beta / \log 3}, \] for any $\epsilon>0$, where $\beta = 0.2782...$ is a numerical constant defined explicitly as $\beta(0)$ in \cite[Thm. 3.8]{HelVen06}. We note that $2\beta/ \log 3 = 0.5064...$ is strictly smaller than 1, so that this is advantageous. Thus we may conclude that for every $\epsilon>0$, \[ \sum_{q \leq Q} E_g'(q)^\kappa \ll_\epsilon Q^\epsilon \sum_{q \leq Q} ( \sum_{a \in A(q)}a^\epsilon |\mathrm{Cl}_{K_a}[3]|^{2\beta / \log 3} )^\kappa. \] Now for each fixed $q$, as in \cite{DukKow00}, we will pass from a sum over $a \in A(q)$ to a sum over the set of (distinct) corresponding square-free kernels $a'$; we set $A'(q) = \{ a' : a \in A(q)\}$. For any elliptic curve $E \in E_g'(q)$ associated to $a$, so that the discriminant relation (\ref{disc_ad}) holds, we see from (\ref{disc_ad}) and the fact that the corresponding square-free kernel $a'$ is square-free that $|a'| \leq 1728q$ and $a' | \delta q$, where \[\delta = 6/\gcd(6,q).\] In general, denoting by $s(a) = a'$ the square-free kernel of an integer, we have for any $a'$ that \[ \# \{ a \leq X : s(a) = a'\} \ll_\epsilon X^\epsilon \] for all $X \geq 1$ and for all $\epsilon>0$; see e.g. \cite[Lemma 4.4]{HBP17}. Since $a$ is $6$-th power free, we may apply this in our setting with $X\leq 2^5 3^5 q^5$, say. Thus there are at most $\ll_\epsilon q^\epsilon$ such values $a$ corresponding to each $a' \in A'(q)$. Thus we have shown that \[ \sum_{q \leq Q} E_g'(q)^\kappa \ll_\epsilon Q^\epsilon \sum_{q \leq Q} ( \sum_{a'|\delta q}|\mathrm{Cl}_{K_{a'}}[3]|^{2\beta / \log 3} )^\kappa, \] (where we have used the fact that $a^\epsilon \ll q^\epsilon$ for any $\epsilon>0$). On the right-hand side, we initially only consider square-free $a'$, but we can enlarge the right-hand side by considering any such divisors $a'$. Applying H\"older's inequality to the right-hand side, this becomes \[ \sum_{q \leq Q} E_g'(q)^\kappa \ll_\epsilon Q^\epsilon \sum_{q \leq Q} (d(\delta q))^{\kappa-1}\sum_{a'|\delta q}|\mathrm{Cl}_{K_{a'}}[3]|^{2\beta \kappa / \log 3} \ll_\epsilon Q^\epsilon \sum_{q \leq Q} \sum_{a' |\delta q} |\mathrm{Cl}_{K_{a'}}[3]|^{2\beta \kappa / \log 3}, \] since for all integers $m$, the divisor function satisfies $d(m) \ll_\epsilon m^\epsilon$ for all $\epsilon>0$. Note that we may trivially enlarge the right-most quantity to \begin{equation}\label{partial_sum_app} \ll_\epsilon Q^\epsilon \sum_{q \leq \delta Q} \sum_{a' |q} |\mathrm{Cl}_{K_{a'}}[3]|^{2\beta \kappa / \log 3} . \end{equation} We apply the following elementary lemma. \begin{lemma} For any sequence $\alpha_{n}$ of non-negative real numbers, define $A_t = \sum_{n \leq t} \alpha_n$. If it is known that for some $\Theta \geq 1$ that for all $t \geq 1$ we have $ A_t \leq t^\Theta, $ then for all $Q \geq 1$, \[ \sum_{ q \leq Q} \sum_{n|q} \alpha_n \ll_\Theta Q^{\Theta} \mathscr{L}(\Theta) \] in which $\mathscr{L}(\Theta)= \log Q$ if $\Theta=1$ and $\mathscr{L}(\Theta)=1$ if $\Theta>1$. \end{lemma} \begin{proof}First note that \[ \sum_{ q \leq Q} \sum_{n|q} \alpha_n = \sum_{n \leq Q} \alpha_n \sum_{\bstack{q \leq Q}{n|q}} 1 =\sum_{n \leq Q} \alpha_n \lfloor Q/n \rfloor \leq Q \sum_{n \leq Q} \frac{\alpha_n}{n}. \] Then by partial summation and the assumption on $A_t$ we have \[ \sum_{n \leq Q} \frac{\alpha_n}{n} = A_Q Q^{-1} - \int_1^Q A_t t^{-2} dt \leq A_Q Q^{-1} + \int_1^{Q} t^{\Theta-2} dt \ll_\Theta Q^{\Theta-1} \mathscr{L}(\Theta), \] which suffices to prove the lemma. \end{proof} We apply the lemma in (\ref{partial_sum_app}) with $\alpha_n = |\mathrm{Cl}_{K_{n}}[3]|^{2\beta \kappa / \log 3}$ and $\Theta = \Theta_k$ the exponent assumed to hold in (\ref{assume_k_moment_Cl3}) for the value $k = 2\beta \kappa / \log 3$. Note that for any $k>0$, $\Theta_k \geq 1$ since $|\mathscr{F}_2(X)| \gg X$ and $|\mathrm{Cl}_K[3]| \geq 1$ for all fields $K$. We may conclude from (\ref{partial_sum_app}) that \[ \sum_{q \leq Q} E_g'(q)^\kappa \ll_\epsilon Q^\epsilon Q^{\Theta_k} \mathscr{L}(\Theta) \ll_{k,\epsilon} Q^{\Theta_k + \epsilon}\] for all $\epsilon>0$. This suffices to prove the theorem, upon noting that \[ \kappa = \frac{k \log 3}{2\beta} =k \cdot \gamma= k \cdot 1.9745... \] Corollary \ref{cor_EC} follows from Theorem \ref{thm_EC} immediately, upon applying the results of \cite[Cor. 1.4]{HBP17}. To situate the strength of Corollary \ref{cor_EC}, we briefly observe that for any $k$ such that $\gamma k \geq 1$, by combining (\ref{DK_average_result}) with the pointwise bound $E(q) \ll_\epsilon q^{1/(3\gamma) + \epsilon}$ in (\ref{Eq_EV}), \begin{equation}\label{trivial} \sum_{q \leq Q} E(q)^{k\gamma} \leq \max_{q \leq Q} E(q)^{k\gamma - 1} \sum_{q \leq Q} E(q) \ll Q^{1 + (k\gamma-1)/(3\gamma) + \epsilon}. \end{equation} For example, in the case $k=2/\gamma \geq 1$ the exponent (up to $\epsilon$) in (\ref{trivial}) is $1+1/(3\gamma) = 1.1688...$ which is larger than the exponent $1+(2/\gamma-1)/3 =1.0043 ...$ obtained by applying Theorem \ref{thm_EC}, and applying $|\mathrm{Cl}_K[3]|\ll D_K^{1/3+\epsilon}$ to one factor and using Davenport-Heilbronn to bound the remaining average. As another example, in the case $k=2$, (\ref{trivial}) gives the exponent $5/3-1/(3\gamma) = 1.4978...$ while Corollary \ref{cor_EC} gives the exponent $23/18=1.2777...$. \section{Known results toward Conjecture \ref{conj_class}, and relation to GRH}\label{sec_previous} We have focused thus far on heuristics to support Conjecture \ref{conj_class}. To conclude, we provide an overview of recent progress toward the conjecture, focusing in particular on a relationship to the Generalized Riemann Hypothesis. We will use the notation $\mathbf{C}_{n,\ell}(\Delta)$ defined in Property \ref{property_C}. \subsection{Composite $\ell$}\label{sec_composite} First we remark that we while we have stated Conjecture \ref{conj_class} only for primes $\ell$, we expect it to hold for all integers $\ell \geq 1$. Indeed, let $K/\mathbb{Q}$ be a number field. Since $\mathrm{Cl}_K$ is a finite abelian group, it is isomorphic to \[ C_{\ell_1^{a_{1,1}}} \times \cdots \times C_{\ell_1^{a_{1,r_1}}} \times \cdots \times C_{\ell_s^{a_{s,1}}} \times \cdots \times C_{\ell_s^{a_{s,r_s}}}, \] for distinct primes $\ell_1,\ldots, \ell_s$, and cyclic groups $C_{\ell^a} \cong \mathbb{Z}/ \ell^a \mathbb{Z}$. For any prime $\ell | \, |\mathrm{Cl}_K|$, letting $r$ be the number of cyclic groups in this decomposition corresponding to $\ell$, then $|\mathrm{Cl}_K[\ell]| = \ell^r$. (If $\ell \nmid |\mathrm{Cl}_K|$ then this remains true, with $r=0$ and $|\mathrm{Cl}_K[\ell]|=1$.) Furthermore, by the above decomposition, $|\mathrm{Cl}_K[\ell]|$ is multiplicative as a function of $\ell$, that is, for integers $(\ell_1,\ell_2)=1$, $ |\mathrm{Cl}_K[\ell_1\ell_2]| = |\mathrm{Cl}_K[\ell_1]| \cdot |\mathrm{Cl}_K[\ell_2]|. $ Consequently if $(\ell_1,\ell_2) =1$ and $\mathbf{C}_{n,\ell_1}(\varpi_1)$ and $\mathbf{C}_{n,\ell_2}(\varpi_2)$ are known then $\mathbf{C}_{n,\ell_1\ell_2}(\varpi_1 + \varpi_2)$ holds. This is of course only interesting if $\varpi_1+ \varpi_2 < 1/2$. Finally, for any prime $\ell | \, |\mathrm{Cl}_K|$, we have $ |\mathrm{Cl}_K[\ell^k]| \leq |\mathrm{Cl}_K[\ell]|^{k} $ for any integer $k \geq 1$. (If $\ell \nmid |\mathrm{Cl}_K|$ we can say this trivially holds, since both sides are 1.) Indeed, more generally, for any $k' \geq k \geq 1$, $|\mathrm{Cl}_K[\ell^{k'}]| \leq |\mathrm{Cl}_K[\ell^k]|^{k'/k}. $ Thus if $\mathbf{C}_{n,\ell^k}(\varpi)$ is known for some $k \geq 1$, then $\mathbf{C}_{n,\ell^{k'}}(k'\varpi/k)$ holds for all $k' \geq k$. Again, this is only interesting if $k'\varpi/k <1/2$. As a consequence, if for a given degree $n$, Conjecture \ref{conj_class} holds for a prime $\ell$, then for all $k \geq1$, $|\mathrm{Cl}_K[\ell^k]| \ll_{n,\ell,k,\epsilon} D_K^\epsilon$ for all $\epsilon>0$. \subsection{Pointwise results, prime and prime power $\ell$} We remarked that Gauss proved $\mathbf{C}_{2,2}(0)$; from the discussion above, $\mathbf{C}_{2,2^k}(0)$ follows for all $k \geq 1$. For $n=2$ and $\ell=3$, initial progress occurred in \cite{HelVen06, Pie05, Pie06} and the current record of $\mathbf{C}_{2,3}(1/3)$ is held by \cite{EllVen07}, which also proved $\mathbf{C}_{3,3}(1/3)$ and $ \mathbf{C}_{4,3}(1/2-\delta)$ for a small $\delta>0$ (Ellenberg, personal communication, computed one can take $\delta=1/168$ if $K$ is non-$D_4$). Bhargava et al. \cite{BSTTTZ17} have established $\mathbf{C}_{n,2}(0.2784...)$ for $n=3,4$ and $\mathbf{C}_{n,2}(1/2 - 1/2n)$ where $n \geq 5$, the first results to hold for all fields of arbitrarily high degree. \subsection{Pointwise results, composite $\ell$} By multiplicativity, combining Gauss's work with $\mathbf{C}_{2,3}(1/3)$ thus implies $\mathbf{C}_{2,2^k 3}(1/3)$ for all $k \geq 1$. \subsection{Results conditional on GRH}\label{sec_GRH} Much recent progress has relied on finding sufficiently many ``small'' rational primes that split completely within $K$, based on an insight credited to K. Soundararajan and P. Michel, and codified in work of Helfgott and Venkatesh \cite{HelVen06} and Ellenberg and Venkatesh \cite{EllVen07}, from which we quote the following: \begin{letterthm}[{\cite[Lemma 2.3]{EllVen07}}]\label{thm_EV} If a field $K$ of degree $n$ simultaneously has the properties that \begin{enumerate} \item the minimum multiplicative Weil height of a generating element of $K$ is large, say \begin{equation}\label{Weil} \inf \{ H_K(\alpha) : K = \mathbb{Q}(\alpha) \} \gg D_K^\eta, \end{equation} \item and $\gg M$ rational primes $p \leq D_K^{\eta/\ell}$ split completely in $K$, \end{enumerate} then $|\mathrm{Cl}_K[\ell]| \ll_{n,\ell,\eta,\epsilon} D_K^{1/2 + \epsilon}M^{-1}$, for every $\epsilon>0$. \end{letterthm} The idea underlying this theorem can be most easily seen in the case of $K$ an imaginary quadratic field of discriminant $-D$ and $\ell$ an odd prime. Letting $H = \mathrm{Cl}_K[\ell]$, we of course have \begin{equation}\label{cosets} |H| = |\mathrm{Cl}_K| / [ \mathrm{Cl}_K:H], \end{equation} so that to show that $|H|= |\mathrm{Cl}_K[\ell]|$ is small it suffices to show that $H$ has many cosets in $\mathrm{Cl}_K$. Suppose that $p_1,p_2$ are distinct rational primes with $p \nmid 2 D$ that split in $K$ as $p_1 = \mathfrak{p}_1 \mathfrak{p}_1^\sigma$, $p_2 = \mathfrak{p}_2 \mathfrak{p}_2^\sigma$. If $\mathfrak{p}_1 H = \mathfrak{p}_2H$ then it follows that $\mathfrak{p}_1 \mathfrak{p}_2^\sigma \in H$, so that $(\mathfrak{p}_1\mathfrak{p}_2^\sigma)^\ell$ is a principal ideal, say $((u + v \sqrt{-D})/2)$ for some rational integers $u,v$. Upon taking norms, this shows that \begin{equation}\label{key_eqn} 4(p_1p_2)^\ell = u^2 + Dv^2 \end{equation} for some rational integers $u,v$. Now if we had specified to begin with that $p_1,p_2 < (1/4)D^{1/(2\ell)}$, such a relation could not hold (since it would impose $v=0$ and $4(p_1p_2)^\ell$ cannot be a square of an integer), and we must have that $\mathfrak{p}_1$ and $\mathfrak{p}_2$ represent different cosets of $H$. Now suppose we have $M$ distinct rational primes $p_1,\ldots, p_M < (1/4) D^{1/(2\ell)}$ with $p \nmid 2D$, each of which splits in $K$. By the above argument, the cosets $\mathfrak{p}_jH$ must all be distinct for $j=1,\ldots, M$, so that by (\ref{cosets}), for every $\epsilon>0$, \[ |\mathrm{Cl}_K[\ell]| \leq |\mathrm{Cl}_K| M^{-1} \ll_\epsilon D^{1/2+\epsilon} M^{-1}.\] The fully general case of considering all degree $n$ fields requires much more sophisticated machinery; see \cite{EllVen07}. How can we apply Theorem \ref{thm_EV} in practice? Regarding the parameter $\eta$ in (\ref{Weil}), the lower bound $\eta \geq 1/(2(n-1))$ is known for all degree $n$ fields (see \cite[Lemma 2.2]{EllVen07} or \cite[Thm. 1]{Sil84}). Although the Chebotarev density theorem shows that a positive proportion of primes split completely in $K$, it is notoriously difficult to find \emph{small} split primes (i.e. to show $M \gg D_K^{\eta/\ell}/\log D_K^{\eta/\ell}$, which is expected to be true). In general this can only be done effectively within a certain field $K$ by assuming GRH for the Dedekind zeta function associated to the Galois closure $\tilde{K}$, which implies an effective version of the Chebotarev density theorem, with a good explicit error term. Taken together, these considerations lead to Ellenberg and Venkatesh's result in \cite{EllVen07} that $\mathbf{C}_{n,\ell}(1/2 - 1/(2\ell(n-1)))$ holds for all $n,\ell$ if GRH is assumed; we will call this GRH-quality savings. This opens several avenues for possible progress, such as: first, try to remove the dependence on GRH, and second, try to improve the benchmark of GRH-quality savings, possibly by showing that $\eta$ can be taken to be larger in (\ref{Weil}). \subsection{Average and ``almost all'' results}\label{sec_review_avg} Recent work has been able to obtain savings on $|\mathrm{Cl}_K[\ell]|$ as strong as the GRH-quality savings described above (or stronger), but without assuming GRH, at the cost of showing that it holds only for almost all fields within a certain family. This includes remarks of Soundararajan \cite{Sou00} on imaginary quadratic fields, and also recent work of Heath-Brown and the first author \cite{HBP17}. The latter work even does better than GRH-quality savings, by proving for each prime $\ell \geq 5$ the unconditional bound $|\mathrm{Cl}_K[\ell]| \ll_{\ell,\epsilon} D_K^{1/2 - 3/(2\ell+2)+\epsilon} $ for all but a possible density zero family of imaginary quadratic fields. This is achieved by nontrivial use of averaging over the discriminant. For each degree $n \leq 5$, Ellenberg and the first and third authors \cite{EPW17} developed a new combination of field-counting and sieving to show that GRH-quality savings on $|\mathrm{Cl}_K[\ell]|$ holds unconditionally for all but a possible density zero exceptional family of degree $n$ extensions of $\mathbb{Q}$ (non-$D_4$ in the case $n=4$). This work relied in particular on precise counts for fields with certain properties, such as a count for fields in which a fixed prime splits completely, where the count has a power-saving error term with explicit dependence on the prime. The strategy of \cite{EPW17} has also been adapted in work of Frei and Widmer \cite{FreWid17} to prove results on average over the special family of totally ramified cyclic extensions of any fixed number field. In general, for degrees $n \geq 6$, methods do not yet exist to count number fields of degree $n$ precisely enough for the strategies of \cite{EPW17} to be carried out. Another approach is to tackle the effective Chebotarev density theorem directly, without assuming GRH. This has been carried out by the authors in \cite{PTBW17x}, which proves a new effective Chebotarev density theorem valid for almost all members of certain families of fields, and consequently proves GRH-quality savings hold for $\ell$-torsion, for all $\ell \geq 1$, in almost all such fields. (The families of fields are too numerous to describe here, but include for example: totally ramified cyclic extensions of $\mathbb{Q}$, in which case the result is unconditional; degree $n$ $S_n$-fields with squarefree discriminant, conditional for $n \geq 5$ on the strong Artin conjecture and certain counts for number fields; degree $n$ $A_n$-fields, conditional on the strong Artin conjecture.) We note that this approach has recently been adapted by An \cite{An18} to certain families of $D_4$-quartic fields. We note that an interesting contrast of \cite{PTBW17x} to \cite{EPW17} is that while it also depends heavily on counting number fields, it only requires rough counts. That is, given a family of fields, at a key step in \cite{PTBW17x} it suffices that one can show that at most $\ll X^\beta$ fields in the family have any fixed discriminant $X$, and at least $\gg X^\alpha$ fields in the family have bounded discriminant $\leq X$, where $\alpha>\beta$. The fact that such rough counts suffice allows \cite{PTBW17x} to prove results for many new families of fields. See also Remark \ref{remark_deg_n} on the surprising efficiency of this method. As mentioned above, the bound $\eta \geq 1/(2(n-1))$ for the exponent $\eta$ in the expression (\ref{Weil}) in property (1) is uniformly true for all degree $n$ extensions. For fields in which $\eta$ can be taken to be larger, one could also increase the savings in the $\ell$-torsion count by increasing $M$ in property (2). This interesting strategy for improving the very notion of ``GRH-quality savings'' has been proposed by Ellenberg \cite{Ell08} and taken up in recent work of Widmer \cite{Wid18}. One underlying question is which families can admit an improved uniform lower bound for $\eta$, or an improved lower bound on $\eta$ for almost all fields in the family. Very recently Frei and Widmer \cite{FreWid18x} have strengthened this approach, and their ideas combined with the methods of \cite{EPW17, PTBW17x} improve the average upper bounds in certain results of those papers. For example, they can improve the relevant exponent $1/2 -1/(2\ell(n-1))$ in \cite{EPW17} for $n \geq 5$ to $\approx 1/2 - 1/(\ell n)$; see \cite[Thm. 1.2]{FreWid18x}. The above results apply to average or ``almost all'' results. But if we turn to pointwise results, is it even true that all fields of degree $n$ should have $\eta$ strictly larger than $1/(2(n-1))$? In some restricted families of degree $n$ fields, no such improvement is possible; see \cite{FreWid17}. Such considerations of enlarging $\eta$ relate also to conjectured uniform upper bounds such as $\eta \leq 1/2$, suggested by Ruppert \cite{Rup98} (and proved to hold for ``almost all'' fields in many families of fields, by work of the authors \cite{PTBW17x}). If true, this restriction on $\eta$ would imply a limit for how far the ``small split prime approach'' can go in bounding $\ell$-torsion (e.g. the best possible would be $\mathbf{C}_{n,\ell}(1/2 - 1/2\ell)$), without additional information or new ideas. \subsection{Higher moments} Theorem \ref{thm_CLM_torsion} makes a clear case for studying higher moments of $\ell$-torsion over families of fields. The first paper to do so was by Heath-Brown and the first author \cite{HBP17}, which proved nontrivial upper bounds for $k$-th moments of $\ell$-torsion in imaginary quadratic fields for odd primes $\ell$. Very recent work of Frei and Widmer \cite{FreWid18x} now makes progress on upper bounds for $k$-th moments in certain other settings, e.g. for $\ell$-torsion in (imaginary and real) quadratic fields, or cyclic cubic fields, by simultaneously incorporating ideas for improving (on average) the lower bound in (\ref{Weil}) into the settings of certain methods in \cite{EPW17, PTBW17x}. \subsection{Asymptotics} For recent work on asymptotics, see \S \ref{sec_CLM_predictions}. \section{Appendices}\label{sec_appendices} \subsection{Further remarks on moment bounds in a general setting}\label{sec_meas_space} In the context of Theorem \ref{thm_CLM_torsion} we argued explicitly using the function $V: K \mapsto |\mathrm{Cl}_K[\ell]|$ mapping fields (ordered by discriminant) to positive real numbers. This was to make the argument clear in a setting where there could be more than one field with a fixed discriminant, and where the underlying finite set $\mathscr{F}(X)$ changes as $X$ grows. We include further general remarks here, which clarify whether one needs uniformity in the constants appearing in the moments, as we anticipate there will be further applications for this perspective. Let $(\mathcal{M},\mu)$ be a ($\sigma$-finite) measure space as before and consider the spaces $L^p(E)$ for $\mu(E)<\infty$ and $1 \leq p \leq \infty$. If $f \in L^q(E)$ then $f \in L^p(E)$ for all $1 \leq p \leq q$; indeed H\"older's inequality shows that \[ \|f \|_{L^p(E)} \leq \mu(E)^{1/p - 1/q} \|f\|_{L^q(E)}.\] In particular, if $f \in L^\infty(E)$ then $f \in L^p(E)$ for all $1 \leq p \leq \infty$ with \begin{equation}\label{gen_infty} \|f\|_{L^p(E)} \leq \mu(E)^{1/p} \|f\|_{L^\infty(E)}. \end{equation} We are interested in the converse direction. Let us make the strong assumption that there exist constants $B,M$ such that for an infinite sequence of arbitrarily large $p \geq 1$ there exists a constant $c_p \leq M$ such that for all $f \in L^p(E)$, \begin{equation}\label{gen_assp} \|f\|_{L^p(E)} \leq c_p \mu(E)^{B/p}. \end{equation} Then we claim $f \in L^\infty(E)$ and moreover $\|f\|_{L^\infty(E)} \leq M$. Indeed, to show $f \in L^\infty(E)$ we must show there exists $C$ such that $\mu(\{ x : |f(x)| > C\})=0$. By Chebyshev's inequality (\ref{int_id}) and our assumption (\ref{gen_assp}), for every $\alpha>0$, \[ \mu(\{ x \in E : |f(x)| > \alpha\}) \leq \frac{c_p^p}{\alpha^p} \mu(E)^B \] for an infinite sequence of arbitrarily large $p \geq 1$. Let us choose $\alpha_0$ sufficiently large such that $\alpha_0 >M$. Then given any $\epsilon'>0$, we may take $p$ sufficiently large (depending on $M, \alpha_0, \mu(E), B$) that \[\mu(\{ x \in E: |f(x)| > \alpha_0\}) \leq (M/\alpha_0)^{p} \mu(E)^B < \epsilon'. \] Thus we may conclude that $f \in L^\infty(E)$, with $\|f\|_{L^\infty(E)} \leq M$. Consequently, (\ref{gen_infty}) holds for all $1 \leq p \leq \infty$. In particular, this shows that if the apparently weaker estimate (\ref{gen_assp}) holds for arbitrarily large $p$, this implies the apparently stronger estimate (\ref{gen_infty}); that is to say, assuming that (\ref{gen_assp}) holds for some $B$ and an infinite sequence of arbitrarily large $p$ is equivalent to assuming it holds for $B=1$ and all $1 \leq p \leq \infty$. These ideas apply to the case where $E = \{1,2, 3, \ldots, X\}$ and $\mu$ is counting measure, so that $\mu(E)=X$. They can also be adapted to the setting in which we are studying moments of a function $V$ mapping fields (ordered by discriminant, for example) to positive real numbers. Let $X$ be fixed. If it is known that there is some $\alpha$ and some $d_k \leq M^k$ for a uniform constant $M$ such that \[ \| V\|_{\ell^k(\mathscr{F}(X))}^k = \sum_{K \in \mathscr{F}(X)} V(K)^k \leq d_k |\mathscr{F}(X)|^{\alpha} \] holds for a sequence of arbitrarily large $k$, then this holds with $\alpha=1$ for all $1 \leq k \leq \infty$, and indeed these two statements are equivalent to each other, and equivalent to the statement that $\|V\|_{\ell^\infty(\mathscr{F}(X))} \leq M$. Above, we made the assumption in (\ref{gen_assp}) that there exists a uniform upper bound $M$ such that $c_p \leq M$ for all $p$ in the sequence of arbitrarily large $p$. (Without this assumption, the $L^p$ norms can blow up and the claim $f \in L^\infty(E)$ need not hold.) However, the reader may note that in Theorem \ref{thm_CLM_torsion} we made no such assumption of an upper bound on the constant $c_{n,\ell,k,\alpha}$ being uniform in $k$. Indeed, we do not require such an assumption because in Theorem \ref{thm_CLM_torsion} we prove not a uniform upper bound but merely show the growth with respect to $X$ is slow as $X \rightarrow \infty$. In the language of the model setting above, let $\mathcal{M}=\mathbb{Z}$, $E=(X/2, X] \cap \mathbb{Z}$ for $X \geq 1$ and let $\mu$ be counting measure. Let $f \in \ell^k((X/2,X]\cap \mathbb{Z})$ be given. Assume that there is some non-decreasing function $F \geq 1$ such that $|f(x)| \leq F(x)$ for all $x$. Also assume that there exists a constant $B$ and an infinite sequence of arbitrarily large $k \geq 1$ with corresponding constants $c_k$ such that for all $X \geq 1$, \[ \|f\|_{\ell^k((X/2,X]\cap \mathbb{Z})} \leq c_k X^{B/k}. \] Then for any fixed $\delta>0$, for every $X \geq 1$, \[ |\{ x \in (X/2,X]: |f(x)| > x^\delta \} |\leq \frac{c_k^k }{(X/2)^{\delta k}} X^{B/k}.\] Thus for any fixed $\delta$, regardless of how big each constant $c_k$ is, we may take a fixed $k_0$ sufficiently large (determined only by $\delta, B$) that $B/k_0 - \delta k_0 < 0$, and consequently $c_{k_0}^{k_0} 2^{\delta k_0} X^{B/k_0 - \delta k_0} <1$ for $X $ sufficiently large with respect to $\delta, B, c_{k_0}, k_0$. The set of constants $c_k$ was determined by the function $f$, so we will denote this dependence as a dependence on $f$. This means that there exists some constant $X_0(f,\delta,B)$ such that for $X \geq X_0(f,\delta, B)$, the set $\{ x \in (X/2,X]: |f(x)| > x^\delta \} $ is empty. In other words, for any $\delta>0$, the only $x$ such that $|f(x)|> x^\delta$ must have $x \leq X_0(f,\delta,B)$ and hence $|f(x)| \leq F(x) \leq F(X_0(f,\delta,B))$, which is a constant $\geq 1$ depending only on $f, \delta, B$. In total, we have proved that given any $\delta>0$ there exists a constant $C_\delta = C_\delta(f,B)$ such that for all $x$, $|f(x)| \leq C_\delta x^\delta$ (it suffices to take $C_\delta=F(X_0(f,\delta,B))$). This argument, adapted to families of fields, underlies Theorem \ref{thm_CLM_torsion}. \begin{remark}\label{remark_1} The above discussion also verifies our earlier remark that the statement that (\ref{CL_k_upper}) holds for a particular fixed $\alpha$ for all $X \geq 1$ and an infinite sequence of arbitrarily large $k$ is equivalent to the statement that (\ref{CL_k_upper}) holds for $\alpha = 1 + \epsilon_0$ (for any $\epsilon_0>0$) for all $X \geq 1$ and all $k \geq 1$. Certainly the latter statement implies the former. In the other direction, Theorem \ref{thm_CLM_torsion} shows that the former statement implies that for every $\epsilon_0> 0$, $|\mathrm{Cl}_K[\ell]| \leq C_{\epsilon_0} D_K^{\epsilon_0}$ holds uniformly for $K \in \mathscr{F}$, which implies the latter. \end{remark} \subsection{Counting quartic $D_4$-fields with fixed discriminant}\label{sec_app_D4} We briefly prove that property $\mathbf{D}_4(D_4;0)$ holds; that is, for every $D \geq 1$ and for every $\epsilon>0$ there are at most $\ll_\epsilon D^\epsilon$ quartic $D_4$-fields of discriminant $D$. We follow \cite[\S 4]{Bai80}, except we fix a discriminant $D$ instead of considering all discriminants up to $X$. Any quartic $D_4$-field $K_4$ is a quadratic extension of a quadratic field $K_2$. We have that $K_4$ corresponds to a quadratic ray class character for $K_2$ of conductor $\mathfrak{d}$ with finite part $\mathfrak{d}^*=\mathrm{Disc}\,(K_4/K_2)$. The form of such characters has been determined in \cite[Lemma 17]{Bai80}, and each character is a product of a character on $(\O_{K_2}/\mathfrak{d^*})^\times$, a character on the class group of $K_2$, and a character on signature (see \cite{Bai80}[Eqn. (4)]). There are at most 4 characters of signature, and $h_2(K_2)$ characters of the class group, which is $\ll_\epsilon (\mathrm{Disc}\, K_2)^{\epsilon}$ for every $\epsilon>0$ by genus theory (\ref{Gauss_2}). It follows from the proof of \cite[Lemma 18]{Bai80} that given any $C$, there are at most $O(2^{\omega(C)})$ ideals $\mathfrak{d^*}$ and possible characters on $(\O_{K_2}/\mathfrak{d^*})^\times$ with $N_{K_2/\mathbb{Q}} (\mathfrak{d}^*)=C$. Note $\mathrm{Disc}\, K_4=(\mathrm{Disc}\, K_2)^2 \cdot N_{K_2/\mathbb{Q}} (\mathrm{Disc}\,(K_4/K_2))$. Thus, given $D$, in order to count the quartic $D_4$-fields of discriminant $D$, we sum for each $d|D$, the number of quartic $D_4$-fields $K_4$ that contain the quadratic field of discriminant $d$, and we find there are at most $$ O_{\epsilon}\left(\sum_{d|D} d^\epsilon 2^{\omega(D/d^2)} \right)=O_{\epsilon}(D^{\epsilon}) $$ quartic $D_4$-fields of discriminant $D$. \section*{Acknowledgements} The authors thank J. Ellenberg for helpful comments and J. Wang for many insightful remarks on an earlier draft. Pierce has been partially supported by NSF CAREER grant DMS-1652173, a Sloan Research Fellowship, and as a von Neumann Fellow at the Institute for Advanced Study, by the Charles Simonyi Endowment and NSF Grant No. 1128155. Pierce thanks the Hausdorff Center for Mathematics for hospitality during visits as a Bonn Research Fellow. Turnage-Butterbaugh was supported by NSF DMS-1440140 while in residence at the Mathematical Sciences Research Institute during the Spring 2017 semester. Turnage-Butterbaugh thanks the Max Planck Institute for Mathematics for support and hospitality during July 2018. Wood is partially supported by an American Institute of Mathematics Five-Year Fellowship, a Packard Fellowship for Science and Engineering, a Sloan Research Fellowship, National Science Foundation grant DMS-1301690 and CAREER grant DMS-1652116, and a Vilas Early Career Investigator Award. Wood thanks Princeton University for its hospitality during Fall 2018. \bibliographystyle{alpha}
\section{Introduction} Contemporary wireless systems are driven by the evolution of novel bandwidth-hungry mobile applications, such as virtual reality, mobile gaming, and vehicular entertainment services, which require high transmission quality and low latency. One of the biggest challenges in terms of pervasive connectivity comes with the growing popularity and affordability of standalone high-end consumer wearable devices To meet the ever-growing data rate demands in densely populated scenarios such as, e.g., public transportation (suburban trains, metro, and buses), prospective service providers will need to rely on communication systems operating at millemeter-wave (mmWave) frequencies~\cite{venugopal_heath_wearables16}. One of the most promising choices for short-range mmWave communications~\cite{ghasempour2017ieee, Zhou2018} is the unlicensed $60$\,GHz-band controlled by, e.g., recent IEEE 802.11ay protocol~\cite{tg80211ay} that supports data rates of multiple Gbps. As a result, the path loss characterization at $60$\,GHz becomes a crucial component in wireless network planning and optimization. While the radio wave propagation at mmWave frequencies has been extensively studied in outdoor and office environments, the public transportation scenarios have not yet received much attention. Similar studies, however, covered channel propagation and modeling efforts for the lower frequency range. For example, in~\cite{moraitis_valtr_aircraft}, the authors presented a study of the radio wave propagation based on the path loss simulation and measurements in a civil aircraft at microwave frequencies. Characterization of $2.4$\,GHz channel inside buses was performed in~\cite{azpilicueta15_bus}. In this paper, we provide the results of our wideband measurements at $60$\,GHz frequency conducted inside an electric city bus. In~\cite{chandra16_PL_60G_bus}, the authors presented a similar study of the path loss characteristics at $60$\,GHz inside a touristic bus; however, the geometry of a typical city bus differs from that of the long-distance buses as in~\cite{chandra16_PL_60G_bus}. Our main contribution lies in constructing easy-to-implement and analytically tractable path loss models based on the real mmWave propagation data. We believe that our results have significant potential for the system-level evaluation, e.g., link budget estimation and interference footprint studies, as well as for network deployment planning in future public transport scenarios. The paper is organized as follows. Section II briefly describes the employed wideband equipment and the scenario of interest. In Section III, we process the measurement results by designing a statistical model based on the logarithmic dependency between the mean path loss and the distance between the transmitter and the receiver. Finally, Section IV provides a short discussion of the results and concludes the paper. \vspace{7pt} \section{Measurement scenario} Our experimental campaign has been carried out inside a Linkker electric bus\footnote{The first Finnish fast-charging electric bus, http://www.linkkerbus.com} of length $12.80$\,m and width $2.55$\,m. All measurements have been performed at $60$\,GHz frequency with the use of a wideband channel sounder. The employed equipment presented in Fig.~\ref{fig:equip} includes a vector network analyzer, a signal generator, up- and down- converters, and transmitting/receiving omnidirectional antennas of $2$\,dBi gain. A detailed description of the measurement equipment in use can be found in~\cite{vehmas}. \begin{figure}[!t] \centering \includegraphics[scale=0.8]{equip \caption{Block diagram of the measurement equipment. } \label{fig:equip} \end{figure} \begin{figure}[!t] \centering \includegraphics[scale=0.48]{Bus_plan3 \caption{Schematic view of the bus with the seats numbered and divided into four groups. } \label{fig:plan} \end{figure} \begin{figure}[!t]% \centering \subfloat[The upper transmitter position for the seat N\textsuperscript{\underline{o}}14.] {{\includegraphics[scale=0.9]{photo_bus1} } \quad \subfloat[The lower transmitter position for the seat N\textsuperscript{\underline{o}}24.] {{\includegraphics[scale=0.9]{photo_bus2} } \caption{Photographs of the measurement setup.}% \label{fig:photos \vspace{-0.5cm} \end{figure} We replicate a realistic consumer scenario through a specific device deployment inside the vehicle. As shown in Fig.~\ref{fig:plan}, the receiver is located in the front part of the bus at a height of $2$\,m (corresponds to a wireless access point). The transmitters are placed at (i) upper positions at the level of $1.2$\,m, which corresponds to, e.g., devices located near or attached to the owner's head (Fig. \ref{fig:photos}, a) and (ii) lower positions at a relative height of $0.7$\,m, e.g., the location of a mobile hand-held device (Fig. \ref{fig:photos}, b). The measurements have been performed for approximately one minute each to record ten samples of the channel impulse response (CIR). In total, we collected $72$ measurement data sets for the upper and lower positions of the transmitters. We exclude some of the lower transmitter locations (i.e., seats N\textsuperscript{\underline{o}}5-8 and N\textsuperscript{\underline{o}}27-30, see Fig.~\ref{fig:plan}) due to a convex shape of the bus floor around the wheels. \begin{figure}[!t] \centering \includegraphics[scale=0.6]{PDP_TX14_HI \caption{An example of the measured power delay profile for the transmitter position N\textsuperscript{\underline{o}}14 shown in Fig.~\ref{fig:photos}(a).} \label{fig:PDP} \vspace{-0.2cm} \end{figure} \vspace{7pt} \section{Measurement Results and Analysis} In this section, we present the results of our measurement campaign and construct a logarithmic path loss model based on the received power data sets for different groups of seats. Fig.~\ref{fig:PDP} illustrates an example of the power delay profile (PDP) for the upper transmitter location N\textsuperscript{\underline{o}}14. The maximum value of the measured power is $-99.4$\,dB at $13.5$\,ns, which corresponds to the distance of $4.05$\,m between the transmitter and the receiver. Further, we derive the received power from the channel impulse response data as an integral value over all of the components and calculate the radiated power by compensating losses and gains introduced by the system elements. Using the difference between the radiated power and the received power and the antenna gains, we may obtain the sought path loss values. We subdivide our transmitters into four groups as illustrated in Fig.~\ref{fig:plan} and study the properties of these four groups separately. We construct a logarithmic model of the mean path loss as an increasing function of the distance between a transmitter and the receiver with a random fading term represented by a normally distributed random variable. Particularly, path loss values $L(d)$ can be approximated by the following expression: \begin{equation} L(d) = \alpha + 10 \beta \log_{10}(d) + \chi(0,\sigma^2), \label{eq:logmodel} \end{equation} where $\alpha$ and $\beta$ are the propagation constant and the propagation exponent, respectively, and $\chi$ is a random Gaussian variable with zero mean and standard deviation $\sigma$. The parameters for all four groups are summarized in Table \ref{table:coefficients}. The path loss data for the upper and the lower transmitter positions are illustrated in Fig.~\ref{fig:high_rows_PL} and \ref{fig:low_rows_PL}, respectively. For the upper positions in Fig.~\ref{fig:high_rows_PL} and the distances shorter than $2.2$\,m, the path loss values of group ``A" are slightly higher than those for the other regions, which is due to the wall behind the driver seat and less probable line-of-sight (LOS) connection. On the contrary, for the distances greater than $4$-$6$\,m, the path loss curve of group ``A" lies noticeably lower (up to $5$\,dB) than those of the other three groups, which results from the geometry of the bus and handrail locations (as can be seen in Fig.~\ref{fig:photos}a) that affect the probability of a LOS connection. The values of group ``D" are slightly different from those in ``A", which may be caused by the fact that the bus handrails are not symmetrical with respect to the receiver. In Fig.~\ref{fig:low_rows_PL}, we depict the estimated mean path loss values for the lower positions. The measured values and the mean path loss curves for groups ``A", ``B", ``C", and ``D'' demonstrate similar behavior; a slight variation is caused by the seat locations in the bus. More detailed studies of these effects can be carried out with the use of ray-tracing simulations. \begin{figure}[!t] \centering \includegraphics[scale=0.64]{High_pos_pathloss} \caption{The path loss for the upper transmitter positions. \label{fig:high_rows_PL} \end{figure} \begin{figure}[!t] \centering \includegraphics[scale=0.64]{Low_pos_pathloss} \caption{The path loss for the lower transmitter positions. \label{fig:low_rows_PL} \end{figure} \begin{figure}[!t] \centering \includegraphics[scale=0.64]{Comparison} \caption{Comparison of the path loss logarithmic models for the upper and the lower positions (combined for all regions) with the results obtained in~\cite{chandra16_PL_60G_bus}. \label{fig:comparison_PL} \end{figure} \begin{table}[!t] \centering \caption{Parameters of the proposed model.} \begin{tabular}{|c|c|c|c|c|} \hline \textbf{Region} & \textbf{Position} & \textbf{$\alpha$} & \textbf{$\beta$} & \textbf{$\sigma$} \\ \hline \multirow{2}{*}{A} & Lower & 87.29 & 1.44 & 3.13 \\ & Upper & 83.29 & 1.83 & 2.22 \\ \hline \multirow{2}{*}{B} & Lower & 83.83 & 1.91 & 2.88 \\ & Upper & 84.43 & 1.92 & 1.67 \\ \hline \multirow{2}{*}{C} & Lower & 85.77 & 1.70 & 2.00 \\ & Upper & 81.24 & 2.39 & 2.27 \\ \hline \multirow{2}{*}{D} & Lower & 84.34 & 1.82 & 2.38 \\ & Upper & 81.88 & 2.13 & 2.65 \\ \hline \multirow{2}{*}{All} & Lower & 85.23 & 1.74 & 2.54 \\ & Upper & 82.86 & 2.03 & 2.34 \\ \hline \end{tabular} \label{table:coefficients} \end{table} \vspace{7pt} \section{Discussion and conclusions} In this paper, we summarize the results of a wideband measurement campaign carried out in an electric Linkker bus. We analyze two data sets: particularly, for (i) the upper and (ii) the lower antenna positions, which corresponds to a realistic deployment of devices in a dense public transportation environment. For the upper transmitter positions, our study shows that for longer distances all four groups of seats demonstrate different mean path loss values, which likely happens due to the blockage of the signal by the bus handrails. Moreover, the handrail locations are not symmetrical on both sides of the bus, which also causes the absence of symmetry for the corresponding groups. For the lower transmitter positions, the path loss curves behave similarly for the entire distance traveled. Combining the data for all four groups, we obtain the following expression for $L(d)$: \begin{equation} \left \{ \!\! \begin{array}{l} L(d) = 85.2 + 17.4 \log_{10}(d) + \chi(0,6.5), \text{ lower positions},\\ L(d) = 82.9 + 20.3 \log_{10}(d) + \chi(0,5.5), \text{ upper positions}. \end{array} \right. \nonumber \end{equation} Analyzing the derived models, we also compare our results with the model reproduced from~\cite{chandra16_PL_60G_bus} (see Fig.~\ref{fig:comparison_PL}). We may observe that the path loss inside a typical city route bus is approximately $4$\,dB higher than that inside a touristic bus presented in~\cite{chandra16_PL_60G_bus}, which could stem from the different geometry and ceiling height. Despite non-identical antenna locations that also lead to small discrepancies, the results demonstrate a reasonable match. The models developed in the course of this study can become of a considerable benefit for subsequent calculations of the link budget and interference footprint studies. A more realistic scenario with the presence of human body blockage and analysis of the data sets for directional measurements are a part of our future work, together with the thorough ray-tracing simulation studies. \vspace{7pt} \section*{Acknowledgment} The authors are particularly grateful to HSL (Helsinki Region Transport Authority) for providing the Linnker bus for the measurement campaign. Vasilii Semkin would like to thank Finnish Cultural Foundation (Suomen Kulttuurirahasto) for the support. This work is supported in part by the Academy of Finland, project WiFiUS. The work of Olga Galinina is supported by a personal Jorma Ollila grant from Nokia Foundation, by the Finnish Cultural Foundation, and by a Postdoctoral Researcher grant from the Academy of Finland. \vspace{7pt} \bibliographystyle{IEEEtran}
\section{Discussion} \newcommand{\ignore}[1]{} We examined a new regularization for online learning which interpolates between multiplicative and additive updates through of a single parameter $\beta > 0$. As $\beta \to \infty$, the algorithm approaches gradient descent while as $\beta \to \frac{1}{d}$ it behaves similarly to the multiplicative update. The spectral regularization provides a matrix analogue which is naturally applicable to rectangular matrices. An interesting open direction is to devise an self-tuning update for $\beta$ which is data dependent. \ignore{ The first two theorems we describe provide bounds on the regret of the $\HU$ algorithm when costs are bounded in $\ell_2$ and $\ell_{\infty}$ norms respectively. Theorem~\ref{l2regret:theorem} shows that when $\beta \geq 1$ the regret is $O(G_2\sqrt{T})$, which is asymptotically the same as the regret of $\GD$. When $\beta \rightarrow \infty$, the update converges exactly to that of gradient descent, as expected. In the other extreme, when $\beta = \Theta(\frac{1}{d})$, Thm.~\ref{l1regret:theorem} implies that the regret is $O(G_{\infty}\sqrt{T\log{(d)}})$, which is asymptotically equivalent to that of the multiplicative update. To further distill these results, note that $\beta = \frac{1}{d}$ corresponds to the $\EGpm$ algorithm with a different mechanism for reducing the size of weights to satisfy an $1$-norm constraints. In particular, we can view $\EGpm$ as an \emph{adaptive} variant of the $\HU$ algorithm. In this interpretation, instead of using hypentropy projection to reduce he size of weights, $\beta_t$ is decreased such that projections are not necessary. In this sense, $\EGpm$ behaves multiplicativly as gradients accumulate in certain directions, and additively when gradients are noisier. In contrast, $\HU$ keep $\beta$ fixed so the geometry of the hypentropy regularization remains intact. As an interpolation between weight normalization and soft thresholding, the hypentropy projection has the potential of explicitly producing sparse weights. Analysis of the connections between $\EGpm$ and hypentropy projection is given in App.~\ref{egpm_appendix:sec} and App.~\ref{proj:sec}. Note that as $\beta$ shrinks towards $0$, the regret bounds eventually deteriorate. With a sufficiently small $\beta$, a weight crossing $0$ can be prohibitively expensive. In the $\EGpm$ setup, $\beta$ corresponds to the size of an initial positive / negative weight. For $\beta$ arbitrarily small, it may take arbitrarily many multiplicative updates in order to reach reasonable weights. Theorem~\ref{trace_normregret:theorem} provides a regret bound where the decision set is a set of matrices with bounded trace norm. This constraint can be used as a convex relaxation for low rank matrices~\cite{Fazel2002} We do not provide regret bounds for matrix counterpart of the $2$-norm, namely, matrices of bounded Frobenius norm, even though analogous results hold. As the Frobenius norm is equivalent to the Euclidean norm of a flattened $mn$ dimensional vector, the $\HU$ algorithm can be used verbatim in this setting and is computationally less expensive. We note that for rectangular matrices, Theorem~\ref{trace_normregret:theorem} provides a regret bound that depends only on the minimum of $n$ and $m$. When $\beta = \Theta({\tau}/{\min\{m,n\}})$, the regret is $O(\tau G_{\infty}\sqrt{T\log(\min\{m,n\})})$. } \section{\Hypent Divergence} \label{div:sec} We begin by defining the $\beta$-hyperbolic entropy, denoted $\phi_{\beta}$. \begin{definition}[Hyperbolic-Entropy] For all $\beta > 0$, let $\phi_{\beta} : \RR^{d} \rightarrow \RR$ be defined as, \begin{align*} \phi_{\beta}(\bx) = \sum_{i=1}^d \Big(x_i \arcsinh\Big(\frac{x_i}{\beta}\Big) - \sqrt{x^2_i +\beta^2}\Big)~. \end{align*} \end{definition} Alternatively, we can view $\phi_\beta(\bx)$ as the sum of scalar functions, $\phi_{\beta}(\bx) = \sum_{i=1}^d \phi_\beta(x_i)$, each of which satisfies,\vspace{-8pt} \begin{align} \label{second_deriv:eq} \phi''_\beta(x) = \frac{1}{\sqrt{x^2 + \beta^2}} ~. \end{align} For brevity and clarity, we use the shorthand \hypent for $\phi_{\beta}$. Given the \hypent function, we derive its associated Bregman divergence, the relative \hypent as, \begin{align*} D^{\beta}_{\phi}\infdivx{\bx}{\by} = {}& \phi_{\beta}(\bx) - \phi_{\beta}(\by) - \ip{\nabla \phi_{\beta}(\by)}{\bx - \by}\\ ={}& \sum_{i=1}^d \bigg[x_i(\arcsinh\Big(\frac{x_i}{\beta}\Big) - \arcsinh\Big(\frac{y_i}{\beta}\Big)) - \sqrt{x^2_i +\beta^2} + \sqrt{y^2_i + \beta^2}\bigg]~. \end{align*} As we vary $\beta$, the relative \hypent interpolates between the squared Euclidean distance and the relative entropy. The potentials for these divergences are sums of element-wise scalar functions, for simplicity we view them as scalar functions. The interpolation properties of hypentropy can be seen in Figure~\ref{div:fig}. As $\beta$ approaches $0$, we see that $\nabla^2\phi_{\beta}$ approaches $\frac{1}{|x|}$. When working only over the positive orthant, as is the case with entropic regularization, the hypentropy second derivative converges to the second derivative of the negative entropy. On the other hand, as $\beta$ grows much larger than $x$, we see $\sqrt{\beta^2 + x^2} \approx \beta$. Therefore, for larger $\beta$, $\nabla^2\phi_{\beta}$ is essentially a constant. In this regime hypentropy behaves like a scaled squared euclidean distance. \begin{figure} \scalebox{0.6}{\begin{tabular}[c]{||c| c| c| c||} \hline & Square & Entropy & Hypentropy \\ [0.5ex] \hline \hline $\phi(x)$ & $\frac12 {x^2}$ & $x\log(x) -x$ & \makecell{ $x\arcsinh(\frac{x}{\beta})$\\ $- \sqrt{x^2 +\beta^2}$}\\ \hline $\nabla\phi(x)$ & $x$ & $\log (x)$ & $\arcsinh(\frac{x}{\beta})$ \\ \hline $\nabla^2\phi(x)$ & $1$ & $\frac{1}{x}$ & $\frac{1}{\sqrt{x^2 + \beta^2}}$ \\[1ex] \hline \end{tabular}} $\vcenter{\hbox{\includegraphics[width=0.33\textwidth]{images/hyp_entropy_deriv.png}}}$ $\vcenter{\hbox{\includegraphics[width=0.33\textwidth]{images/hu_scaling.png}}}$ \caption{Left:Classical and new divergences. Center: scalar versions of mirror maps used in $\HU(\beta=\frac{1}{5})$, GD, and EG Algorithms depicted in blue, red, and yellow respectively. EG is only defined for positive values of $x$. Right: $\beta$ is varied between $0.1, 1,$ and $10$ and is similarly depicted along with its linear and logarithmic limits. } \label{div:fig} \end{figure} From a mirror descent perspective of mirror descent (see Sec.~\ref{appendex1:sec}), it makes sense to look at the mirror map, the gradient of the $\phi$ which defines the dual space where additive gradient updates take place. Weights are mapped into the dual space via the mirror map $\nabla \phi : \RR^d \rightarrow \RR^d$ and mapped back into the primal space via $\nabla \phi^{*}$. Gradient-Descent (GD) can be framed as mirror descent using the squared euclidean norm potential while Exponentiated-Gradient (EG) amounts to mirror descent using the entropy potential. The \Hypent Update (HU) uses the mirror map $\nabla \phi_{\beta}$. As can be seen from Figure \ref{div:fig}, for sufficiently large weights, the \hypent mirror map behaves like $\log(x)$, namely, the EG mirror map. In contrast, $\arcsinh(x/\beta)$ is linear for small weights, and thus behave like GD. Large values of $\beta$ correspond to a slower transition from the linear regime to the logarithmic regime of the mirror map. The regret analysis of GD and EG depend on geometric properties of the divergence related to the $2$-norm and $1$-norm respectively. Given this connection, it is useful to analyze the properties of \hypent with respect to both the $1$-norm and $2$-norm. Recall that a function $f$ is $\alpha$-strongly convex with respect to a norm $\|\cdot\|$ on $\calK$ if, $$\forall \bx, \by \in \calK, f(\bx) - f(\by) - \nabla f(\by)(\bx-\by) \geq \frac{\alpha}{2} \| \bx-\by\|^2.$$ For convenience, we use the following second order characterization of strong-convexity from Thm.~ 3~in~\cite{STRCVXNOTES}. \begin{lemma} \label{second_strcvx:lemma} Let $\calK$ be a convex subset of some finite vector space $\calX$. A twice differentiable function $f : \calK \rightarrow \RR$ is $\alpha$-strongly convex with respect to a norm $\|\cdot\|$ iff \begin{align*} \inf_{\bx \in \calK,\by \in \calX: \|\by\| =1} \by^{\top}\,\nabla^2\phi(\bx)\,\by \geq \alpha ~. \end{align*} \end{lemma} We next prove elementary properties of $\phi_\beta$. \begin{lemma} \label{strcvx_2:lemma} The function $\phi_\beta$ is $(1+ \beta)^{-1}$-strongly-convex over $B_2$ w.r.t the $2$-norm. \end{lemma} \begin{proof} To prove the first part, note that from~\eqref{second_deriv:eq} we get that the Hessian is the diagonal matrix, \begin{align*} \nabla^2 \phi_{\beta}(\bx) = \diag \Big[\tfrac{1}{\sqrt{x_1^2 + \beta^2}}, \ldots \tfrac{1}{\sqrt{x_d^2 + \beta^2}}\Big] \end{align*} Strong convexity follows from the diagonal structure of the Hessian, whose smallest eigenvalue is \begin{align*} \frac{1}{\sqrt{x^2 + \beta^2}} \geq \frac{1}{\sqrt{1+ \beta^2}} \geq \frac{1}{1+\beta} ~. \end{align*} \end{proof}\vspace{-16pt} \begin{lemma} \label{strcvx_1:lemma} The function $\phi_\beta$ is $(1 + \beta d)^{-1}$-strongly-convex over $B_1$ w.r.t. the $1$-norm. \end{lemma} \begin{proof} We work with the characterization provided in Lemma~\ref{second_strcvx:lemma}, \begingroup \allowdisplaybreaks \begin{align*} \inf_{\bx\in B_1, \|\by\|_1 =1} & \by^{\top}\nabla^2\phi(\bx)\by ~ = \inf_{\bx\in B_1, \|\by\|_1 =1}\sum_{i=1}^d \frac{y_i^2}{\sqrt{ \beta^2 + x_i^2}} & \big[\mbox{Equation}~\eqref{second_deriv:eq}\big]\\ & =\inf_{\bx\in B_1, \|\by\|_1 =1} \frac{1}{\sum_{i=1}^d \sqrt{ \beta^2 + x_i^2}} \, \bigg(\sum_{i=1}^d \frac{y_i^2}{\sqrt{ \beta^2 + x_i^2}}\bigg) \, \bigg(\sum_{i=1}^d \sqrt{ \beta^2 + x_i^2}\bigg) \\ & \geq\inf_{\bx\in B_1, \|\by\|_1 =1} \frac{1}{\sum_{i=1}^d \sqrt{ \beta^2 + x_i^2}} \bigg(\sum_{i=1}^d \sqrt{y_i^2}\bigg)^2 & \big[\mbox{Cauchy- Schwarz}\big]\\ & =\inf_{\bx\in B_1, \|\by\|_1 =1}\frac{1}{\sum_{i=1}^d \sqrt{ \beta^2 + x_i^2}}\|\by\|^2_1 \geq\frac{1}{\sum_{i=1}^d (\beta + |x_i|)}\geq \frac{1}{1 + \beta d} ~. \end{align*} \endgroup \end{proof} We next introduce a generalized notion of diameter and use it to prove properties of $\phi_\beta$. \begin{definition} \label{diam:def} The diameter of a convex set $\calK$ with respect to $\phi$ is, $ \diam_{\phi}(\calK) \eqdef \sup_{\bx \in \calK} D_{\phi}\infdivx{\bx}{\bzero} ~. $ \end{definition} Whenever implied by the context we omit the potential $\phi$ from the diameter. Before we consider two specific diameters below, we bound the diameter in general as follows, \begin{align*} D^{\beta}_{\phi}\infdivx{\bx}{\bzero} &= \phi_{\beta}(\bx) - \phi_{\beta}(\bzero) \\ &= \sum_{i=1}^d \Big(x_i \arcsinh({x_i}/{\beta}) - \sqrt{x^2_i +\beta^2}\Big) + \beta d\\ &\leq \sum_{i=1}^d x_i \arcsinh({x_i}/{\beta})\\ &= \sum_{i=1}^d |x_i| \log\left(\frac{1}{\beta}\left(\sqrt{x^2_i + \beta^2} + |x_i|\right)\right) \end{align*} Thus, without loss of generality, we can assume that $\bx$ lies in the positive orthant. We next bound the diameter of $B_2$ as follows, \begin{align} \diam(B_2) &\leq \sum_{i=1}^d x_i \log{\left(\frac{1}{\beta}\left(\sqrt{x^2_i + \beta^2} + x_i\right)\right)} \nonumber \\ &\leq \sum_{i=1}^d x_i \log{\Big( 1 + \frac{2x_i}{\beta}\Big)} \nonumber\\ &\leq \sum_{i=1}^d \frac{2x^2_i}{\beta} = \frac{2\|\bx\|^2_2}{\beta} \leq \frac{2}{\beta} \label{l2_diameter:eq}~. \end{align} For $\beta\leq 1$ and $\bx\in B_1$ it holds that, ${\sqrt{x^2_i + \beta^2} + x_i} \leq \sqrt{2} + 1$. Hence, for $\beta\leq 1$, we have \begin{align} \label{l1_diameter:eq} \diam(B_1) &\leq \sum_{i=1}^d x_i \log{\Big(\frac{1+\sqrt{2}}{\beta}\Big)} = \|\bx\|_1 \log{\Big(\frac{1+ \sqrt{2}}{\beta}\Big)} \leq \log{\Big(\frac{3}{\beta}\Big)}~. \end{align} \subsection{HU algorithm} We next describe an OCO algorithm over a convex domain $\calK \subseteq \RR^d$. \begin{algorithm2e}[ht] \label{hu:algorithm} \SetAlgoLined \SetKw{KwBy}{by} \KwIn{$\eta >0, \beta > 0$, convex domain $\calK \subseteq \RR^{d}$} Initialize weight vector $\bw^{1} = \bzero$\; \For{$i=1$ \KwTo $T$}{ (a) Predict $\bw^{t}$ ~ ~ (b) Incur loss $\ell_t(\bw_t)$ ~ ~ (c) Calculate $\bg^t = \nabla \ell_t(\bw^t)$ \; \smallskip Update: $ \bw^{t+\frac{1}{2}} = \beta \sinh{\Big(\arcsinh{\Big(\frac{\bw^{t}}{\beta}\Big)} - \eta \bg^{t}}\Big) $\; \smallskip Project onto $\calK$: $\bw^{t+1} = \displaystyle \argmin_{\bv \in \calK} D^{\beta}_{\phi}\infdivx{\bv}{\bw^{t+\frac{1}{2}}} \label{HU_update:eq}$ } \caption{\Hypent Update (HU)} \end{algorithm2e} $\HU$ is an instance of OMD with divergence $D^{\beta}_{\phi}\infdivx{\cdot\!}{\!\cdot}$. We provide a simple regret analysis that follows directly from the geometric properties derived above. The following theorem allows us to bound the regret of an OMD algorithm in terms of the diameter and strong convexity. \begin{theorem} \label{omd:theorem} % Assume that $R: \calK \rightarrow \RR$ is $\mu$-strongly convex in respect to a norm $\|\cdot\|$ whose dual norm is $\|\cdot\|_{*}$. Assume that the diameter of $\calK$ is bounded, $\diam_R(\calK) \leq D$. Last, assume that $\forall{}t,\\|\bg^{t}\|_{*}\leq{}G$, then the regret boound of $\HU$ and learning rate $\eta = \sqrt{{2\mu D}/({TG^2})}$ satisfies \begin{align*} \regret_T \leq 2\sqrt{2 \mu^{-1} DTG^2}~. \end{align*} \end{theorem} This follows from the more general Theorem~\ref{omd:theorem_general}. We next provide regret bounds for $\HU$ over $B_1$ and $B_2$. \medskip \begin{theorem}[Additive Regret] \label{l2regret:theorem} Let $\bw \in B_2$ and assume that for all $t$, $\|\bg_t\|_2 \leq G_{2}$. Setting $\beta \geq 1$, $$\eta = \frac{1}{G_{2}}\sqrt{\frac{1}{\beta(\beta+1)T}} ~,~ \mbox{ yields } ~ ~ \regret_T(\HU) \leq 4G_2\sqrt{T} ~. $$ % \end{theorem} \begin{proof} Applying Lemma~\ref{strcvx_2:lemma} and the diameter bounds from \eqref{l2_diameter:eq} to Theorem~\ref{omd:theorem} yields, \begin{align*} \regret_T \leq 2\sqrt{2(1 + \frac{1}{\beta})TG^2_2} \leq 4G_2\sqrt{T} ~. \end{align*} The final inequality follows from the condition that $\beta \geq 1$. \end{proof} \begin{theorem}[Multiplicative Regret] \label{l1regret:theorem} Let $\bw \in B_1$ and assume that for all $t$, $\|\bg_t\|_{\infty} \leq G_{\infty}$. Setting for $\beta \leq 1$ $$\eta = \frac{1}{G_{\infty}} \sqrt{\frac{\log{\big(\tfrac{3}{\beta}\big)}}{2T(1+\beta d)}} ~,~ \mbox{ yields } ~ ~ \regret_T(\HU) \leq 3G_{\infty} \sqrt{T (1+ \beta d)\log{(\tfrac{3}{\beta})}} ~. $$ \end{theorem} \begin{proof} Applying Lemma~\ref{strcvx_1:lemma} and the diameter bounds from \eqref{l1_diameter:eq} to Theorem~\ref{omd:theorem} yields, \begin{align*} \regret_T \leq 2G_{\infty} \sqrt{2T (1+ \beta d)\log{\big(\tfrac{3}{\beta}\big)}}\leq 3G_{\infty} \sqrt{T (1+ \beta d)\log{(\tfrac{3}{\beta})}}~. \end{align*} \end{proof}\vspace{-32pt} \section{Connections to EG$\pm$} \label{egpm_appendix:sec} The $\EGpm$ algorithm \cite{kivinen1997exponentiated} maintains two vectors $\bu$ and $\bv$ such that, $\bw=\bu-\bv$. The two vectors are updated over $\RR^{2d}_+$ using the $\EG$ algorithm. We consider here a variant where the $2d$ dimensional weights are normalized such that their sum is $\beta d$. Typically, we would have $\beta = \frac{1}{2d}$, so $(\bu, \bv)$ lie on a unit simplex. \begin{algorithm2e}[t] \label{egpm:algorithm} \SetAlgoLined \SetKw{KwBy}{by} \KwIn{$\eta >0, \beta > 0$} Initialize: $\bu^{1}_i= \bv^{1}_i = \frac{\beta}{2}$,~ $\barg^0 = \bzero$\; \For{$t=1$ \KwTo $T$}{ (a) Predict $\bw^{t}=\bu^{t} - \bv^{t}$ ~ ~ (b) Incur loss $\ell_t(\bw_t)$ ~ ~ (c) Calculate $\barg^t = \barg^{t-1} + \nabla \ell_t(\bw^t)$ \; \smallskip Update: $ u^{t+\frac{1}{2}}_i = u^{t}_i \exp(-\eta g^{t}_i)$ ~ ~and~ ~ $ v^{t+\frac{1}{2}}_i = v^{t}_i \exp(\eta g^{t}_i)$\; Normalize weights: $ (\bu^{t+1},\bv^{t+1}) = {\beta d} \, \Bigg({\sum_{i=1}^d u^{t+\frac{1}{2}}_i + v^{t+\frac{1}{2}}_i}\Bigg)^{-1} \!\! (\bu^{t+\frac{1}{2}},\bv^{t+\frac{1}{2}}) $ } \caption{$\EGpm$} \end{algorithm2e} We now show that the $\EGpm$ algorithm can be viewed as an adaptive variant of $\HU$ with the update, \begin{align} \label{ahu:eq} \by^{t+1} = (\nabla \phi_{\beta_t})^{-1}(\nabla \phi_{\beta_{t-1}}(\bw^{t}) - \eta \bg^{t}) ~. \end{align} The weight, $\bw^{t+1}$ is then hypentropy projection of $\by^{t+1}$ onto the contraint set. In this adaptive update, $\nabla \phi_{\beta_{t-1}}$ is used to map into the dual space where a gradient update occurs. Afterwards, $(\nabla \phi)^{-1}_{\beta_{t}}$ maps back to the primal. When used in an OCO setting over the norm-$1$ ball, $\beta_t$ can always be chosen to be sufficiently small such that projection step is voided. $\EGpm$ fits into this algorithmic paradigm with a specific choice of $\beta_t$ that avoids hypentropy projection. In the setting of OCO over the norm-$1$ ball of radius $\beta d$, we have the following result. \begin{theorem} \label{HU-EGPM:theorem} $\EGpm$ with learning rate $\eta$ is equivalent to the adaptive $\HU$ algorithm described in \eqref{ahu:eq} with the same learning rate and $\beta_t = {\beta d}\left({\sum_{i=1}^d\cosh(\eta \barg^t_i)}\right)^{-1}$, where $\barg^t = \sum_{s=1}^t\bg^t$. \end{theorem} \begin{proof} We start with some analysis of $\EGpm$. We have $u^{t+1}_i \propto \exp(-\eta \barg^t_i)$ and similarly $v^{t+1}_i \propto \exp(-\eta \barg^t_i)$. Normalizing the two such that $\|(\bu^{t+1}, \bv^{t+1})\|_1 = \beta d$ yields the normalization factor, \begin{align*} \frac{\beta d}{\sum_{i=1}^d\exp(-\eta \barg^t_i) +\exp(\eta \barg^t_i)} = \frac{2\beta d}{\sum_{i=1}^d\cosh(\eta \barg^t_i)} \end{align*} Putting the above all together, we get \begin{align} w^{t+1}_i = u^{t+1} - v^{t+1} &= \frac{2\beta d}{\sum_{i=1}^d\cosh(\eta \barg^t_i)} \big(\exp(-\eta \barg^t_i) - \exp(\eta \barg^t_i) \big) \nonumber \\ &= \frac{\beta d \sinh(-\eta \barg^t_i)}{\sum_{i=1}^d\cosh(\eta \barg^t_i)} \label{expanded_egpm:eq}\\ &= \beta_t \sinh(-\eta \barg^t_i) ~. \nonumber \end{align} % Therefore, we have $\bw^{t+1} = \nabla \phi^{-1}_{\beta_t}(-\eta \barg^t)$. We can now show that the adaptive $\HU$ algorithm described in \eqref{ahu:eq} results in the same weights. We prove this property by induction on $t$. The base case follows because we initialize $\bw^{0} = 0$ in $\HU$. Now we assume that $\bw^{t} = \phi^{-1}_{\beta_{t-1}}(-\eta \barg^{t-1})$. Applying the hypentropy update, we have \begin{align*} \by^{t+1} = \nabla \phi_{\beta_t}^{-1}(\nabla \phi_{\beta_{t-1}}(\phi^{-1}_{\beta_{t-1}}(-\eta \barg^{t-1})) - \eta \bg^{t}) = \nabla \phi_{\beta_t}^{-1}(-\eta \barg^{t-1} - \eta \bg^{t}) = \nabla \phi^{-1}_{\beta_t}(-\eta \barg^t)~. \end{align*} Now note that since $\forall x \in \RR, |\sinh(x)| \leq \cosh(x)$, projection never takes place, so $\bw^{t+1} = \by^{t+1}$. \end{proof} We also find it useful to consider these updates without normalization or projection. Without any constraint, the regularization parameter $\beta$ does need to change. \begin{theorem} \label{HU-EGPM-unnormalized:theorem} Running $\HU$ with a learning rate $\eta$ and a regularization parameter $\beta$ without projection is equivalent to running $\EGpm$ without normalization. \end{theorem} \begin{proof} Note that in $\EGpm$ without normalization we get, \begin{align*} u^{t+1}_iv^{t+1}_i = u^{t}_i \exp(-\eta g^{t}_i)v^{t}_i \exp(\eta g^{t}_i) = u^{t}_iv^{t}_i ~. \end{align*} Therefore, $u^{t}_iv^{t}_i$ remains fixed and due to the initialization $\forall i , u^{0}_iv^{0}_i = \frac{\beta^2}{4}$. This inverse relationship between $\bu$ and $\bv$ can be used to find a simple closed form solution for $\bw$ by solving a quadratic equation. In particular, we know $u > 0$, so we have \begin{align*} w = u - v = u - \dfrac{\beta^2}{4u} ~\Rightarrow ~ u = \dfrac{w + \sqrt{w^2 + \beta^2}}{2} ~. \end{align*} The resulting final update is \begin{align*} w^{t+1}_i &= \dfrac{\sqrt{(w^{t}_i)^2 +\beta^2} + w^{t}_i}{2} \exp(- \eta g^{t}_i) - \dfrac{\sqrt{(w^{t}_i)^2 +\beta^2} - w^{t}_i}{2} \exp(\eta g^{t}_i)\\ &= \sqrt{(w^{t}_i)^2 +\beta^2} \dfrac{\exp(- \eta g^{t}_i) - \exp(\eta g^{t}_i)}{2} + w^{t}_i\dfrac{\exp(- \eta g^{t}_i) + \exp(\eta g^{t}_i)}{2} \\ &= \sinh(- \eta g^{t}_i)\sqrt{(w^{t}_i)^2 +\beta^2} + \cosh(- \eta g^{t}_i)w^{t}_i ~. \end{align*} Now we consider HU algorithm with the same parameters, \begin{align*} \bw^{t+1} &= \nabla \phi_{\beta}^{-1}(\nabla \phi_{\beta}(\bw^{t}) - \eta \bg^{t}) & \big[\mbox{Algorithm~\ref{hu:algorithm} update}\big]\\ ~ ~ ~\Rightarrow w^{t+1}_i &= \beta\sinh\Big(\arcsinh\Big(\frac{w^{t}_i}{\beta}\Big)- \eta g^{t}_i \Big)\\ &= \beta \Big[\sinh\Big(\arcsinh\Big(\frac{w^{t}_i}{\beta}\Big)\Big) \cosh(- \eta g^{t}_i) + \cosh\Big(\arcsinh\Big(\frac{w^{t}_i}{\beta}\Big)\Big)\sinh(- \eta g^{t}_i)\Big]\\ &= \sinh(- \eta g^{t}_i)\sqrt{(w^{t}_i)^2 +\beta^2} + \cosh(- \eta g^{t}_i)w^{t}_i ~. \end{align*} Thus indeed the two updates with the conditions stated in the theorem are equivalent. \end{proof} \paragraph{Discussion} While, we can represent $\EGpm$ as an adaptive variant of $\HU$, we still would like to understand how $\HU$ with a fixed $\beta$ relates to $\EGpm$. A brief look into $\beta_t$ provides some intuition that the two still should be similar updates. Note that for small $\eta$, $\cosh(\eta\barg^t_i)=1+O(\eta^2)$ and $\beta_t \approx \beta$. In this regime, a fixed $\beta$ should result in a similar update. The relation to $\EGpm$ also motivates the choice of $\beta\approx\tfrac{\|\bw^{\star}\|}{d}$ as this provides the right scale for $\EGpm$. Another takeaway from Theorem\ref{HU-EGPM:theorem} is that the $\EGpm$ algorithm viewed without doubling has an update that looks very much like RFTL. For simplicity, let $\beta = \tfrac{1}{d}$. We see from \eqref{expanded_egpm:eq} that the weights follow $ \bw^t=\nabla\phi^{*}(-\eta \barg^t)$ where $\phi^{*}(\bx) = \log(\sum_{i=1}^d \cosh(x_i))$. \section{Experimental Results} \label{experiments:sec} Next, we experiment with HU in the context of empirical risk minimization (ERM). In the experiments, $\bg_t$ stands for a stochastic estimate of the gradient of the empirical loss. Thus, we can convert the regret analysis to convergence in expectation~\cite{ONLINEtoSTOCHASTIC}. \paragraph{Effective Learning Rate} For small value $w$, $\sinh(w) \approx w \approx \arcsinh(w)$. As a result, near $0$ the update in $\HU$ is morally the additive update, $w_i^{t+1} = w_i^t -\beta\eta g^{t}_i$. The product $\beta\eta$ can be viewed as the de facto learning rate of the gradient descent portion of the interpolation. As such, we define the \textit{effective learning rate} to be $\beta\eta$. In the sequel, fixing the effective learning rate while changing $\beta$ is a fruitful lens for comparing $\HU$ to with $\GD$. \subsection{Logistic Regression} In this experiment we use the $\HU$ algorithm to optimize a logit model. The ambient dimension $d$ is chosen to be $500$. A weight $\bw$ is drawn uniformly at random from $[-1,1]^d$. The features are from $\{0, 1\}^d$ and distributed according to the power law, $\Pr[x_i =1] = {1}/{5\sqrt{i}}$. The label associated with an example $\bx_t$ is set to $y_t = \sign(\ip{\bw}{\bx_t})$ with with probability $0.9$ and otherwise flipped. The algorithms are trained with log-loss using batches of size $10$. Stochastic gradient descent and the $p$-norm algorithm~\cite{Gentile2003} are used for comparison. As can be seen in Fig.~\ref{synth_lin:fig}, the $p$-norm algorithm performs significantly worse than HU for a large set of values of $\beta$, while SGD performs comparably. As expected, for large value of $\beta$, SGD and HU are indistinguishable. \begin{figure}[h] \centerline{\hbox{ \includegraphics[width=.4\linewidth]{images/synth_testing/accuracy.png}\quad \includegraphics[width=.4\linewidth]{images/synth_testing/loss.png}}} \vspace{-12pt} \caption{Comparison of accuracy and loss of GD, $p$-norm, and $\HU$ on binary logistic regression.} \label{synth_lin:fig} \end{figure} In the next experiment we use the same logit model with ambient dimension $d$ chosen to be $10,000$. We generate weights, $\bw \in \RR^d$, with sparsity (fraction of zero weights) $s \in\{0, 0.9\}$. The nonzero weights are chosen uniformly at random from $[-1, 1]$. We run the algorithms for 20,000 iterations. Rather than fixing $\eta$, we fix $\eta' = {\eta}/{\sqrt{1 + \beta^2}}$. This way, as $\beta\to\infty$, $\HU(\eta', \beta)$ behaves like $\GD(\eta)$ while for small $\beta$, the update is roughly $\EGpm(\eta)$. We let $\beta_{\EG} = {\|\bw^{\star}\|_1}/{d}$. As discussed in Appendix~\ref{egpm_appendix:sec}, this choice of $\beta$ is similar to running $\EGpm$ with an $1$-norm bound of $\|\bw^{\star}\|_1$. We then choose $\eta' = 0.1$ and $\beta \in \{0.5, 1, 2, 4, 8\}\times\beta_{\EG}$. In Fig.~\ref{synth_lin_v2:fig}, we show the interpolation between $\GD$ and $\EGpm$. The larger $\beta$ is, the closer the progress of HU resembles that of $\GD$. Intermediate values of $\beta$ have progress in between the $\EGpm$ and $\GD$. \begin{figure}[h] % \centerline{ \includegraphics[width=.4\linewidth]{images/synth_testing_v2/sparsity_0_0/l1_dist_from_opt.png}\quad \includegraphics[width=.4\linewidth]{images/synth_testing_v2/sparsity_0_9/l1_dist_from_opt.png} } \caption{Value of $\|\bw^t - \bw^{\star}\|_1$ in dense and sparse settings with $\eta' = 0.1$ and $\beta \in \{0.5, 1, 2, 4, 8\}\times\beta_{\EG}$.} \label{synth_lin_v2:fig} \end{figure} \subsection{Multiclass Logistic Regression} In this experiment we use $\SHU$ to optimize a multiclass logistic model. We generated 200,000 examples in $\RR^{25}$. We set the number of classes to $k=15$. Labels are generated using a rank $5$ matrix $\bW \in \RR^{k \times d}$. An example $\bx \in \RR^d$ was labeled according to the prediction rule, \begin{align*} y= \argmax_{i \in [k]} \{(\bW \bx)_i\} ~. \end{align*} With probability $5.0\%$ the label was flipped to a different one at random. The matrix $\bW$ and each example $\bx_i$ features are determined in a joint process to make the problem poorly conditioned for optimization. Features of each example are first drawn from a standard normal. Weights of $\bW$ are sampled from a standard normal distribution for the first $r$ features and are set to $0$ for the remaining $d-r$ features. After labels are computed, features are perturbed by Gaussian noise with standard deviation $0.05$. The examples and weights are then scaled and rotated. Coordinate $i$ of the data is scaled by $s_i \propto i^{-1.1}$ where $\sum_{i=1}^d s_i = 1$. Then a random rotation $\bR$ is applied. The inverse of these transformation is applied to the weights. Therefore, from the original sample $\bX_0\in\RR^{n\times d}$ and weights $\bW_0 \in \RR^{k \times d}$ the new sample and weights are set to be $\bX = \bX_0\bR$ and $\bW= \bW_0\bR^{-1}$, where $\bR \in \RR^{d \times d}$ is the scaling and rotation described above. Since our ground truth weights are low rank, our goal is to find weights of approximately low rank with low classification error. To do this, we optimize a multiclass logistic regression loss with a trace-norm constraint. We compare $\SHU$, Schatten $p$-norm algorithm ($p$-norm algorithm applied to singular values) and gradient descent in the fully stochastic (single example) case. We report results for unconstrained optimization in Fig.~\ref{multiclass_unconstrained:fig} and trace-norm constrained optimization in Fig.~\ref{multiclass_constrained:fig}. In these figures only the algorithms with lowest final loss after a grid search are depicted. \begin{figure}[h] \includegraphics[width=.35\linewidth]{images/multiclass/unconstrained/classification_error.png}\quad \includegraphics[width=.35\linewidth]{images/multiclass/unconstrained/loss.png}\quad \includegraphics[width=.25\linewidth]{images/multiclass/unconstrained/log_singular_values.png} \caption{Unconstrained minimization of logistic loss.} \label{multiclass_unconstrained:fig} \end{figure} \begin{figure}[h] \includegraphics[width=.35\linewidth]{images/multiclass/constrained/classification_error.png}\quad \includegraphics[width=.35\linewidth]{images/multiclass/constrained/loss.png}\quad \includegraphics[width=.25\linewidth]{images/multiclass/constrained/log_singular_values.png} \caption{Minimization over the trace-norm ball of radius $500$. The $p$-norm algorithm is not included becaus ethe $p$-norm divergence does not have a closed form projection onto the $1$-ball.} \label{multiclass_constrained:fig} \end{figure} Without projection, $\SHU$ results in the largest trace norm solution of norm $700$ whereas the $p$-norm algorithm and $\GD$ reach solutions with trace norm just above $600$. Nevertheless, $\SHU$ attains the lowest classification error and loss. Performance is noticeably better than gradient descent. Moreover, the spurious singular values are typically smaller than that of gradient descent. This pattern holds up in both settings. With our new divergence, the $\SHU$ update looks exponential for large singular values and linear for small ones. In this sense, once gradients start accumulating in the directions that correspond to the actual signal, these directions can be exploited exponentially. On the other hand, the spurious directions are morally handled with gradient descent with an effective learning rate $\eta\beta$. Note that in our experiments, the $\SHU$ effective learning rate is smaller than the $\GD$ learning rate by an order of magnitude. This may explain the smaller magnitude in erroneous singular values. On the other hand, the $p$-norm algorithm not only increases the magnitude of large singular values, but also shrinks the magnitude of small singular values, resulting in solutions that are closer to being low-rank. To see this, note that the $p$-norm inverse mirror map has the form \begin{align*} f(\bsigma)_i=\sigma_i^{p-1}/\|\bsigma\|^{p-2}_p \end{align*} for $p=2\ln(k)\approx 5.4$. Therefore, there is a natural normalization which shrinks small singular values as good directions are exploited. Without projection, this does not happen with $\SHU$. Informally speaking, the following analogy applies to the three methods: \begin{center} $\GD$: ~ The rich get richer! \\ $\SHU$: ~ The rich get \emph{much} richer!! \\ $p$-norm: ~ The rich get richer and the poor get poorer, oy! \end{center} Adding trace norm projection reduces the magnitude of these singular values, but not to the level which the $p$-norm algorithm can achieve. Overall, it appears that $\SHU$ may be slightly more effective at reducing loss but the $p$-norm algorithm is more effective at producing low rank solutions. \subsection{Image Classification with Neural Networks.} Loss minimization for neural networks is known to be nonconvex, thus the regret bounds from this paper do not apply in this setting. Still, convex optimization algorithms, such as AdaGrad, work well practice for training neural networks. In this section, we use the unconstrained version of the HU to find the weights of a simple neural network for image classification using the popular CIFAR10 dataset~\cite{CIFAR10}. SGD was used for comparison. Outside of use of the HU algorithm, the design of the network and code are from the Tensorflow tutorial on convolutional networks for image classification. The network involves $2$ convolutional layers, max pooling, and $2$ fully connected layers, all using ReLU activations. The loss function is the cross entropy loss plus a $2$-norm regularization. For a complete description of the experimental setup see~\cite{TFTUTORIAL, krizhevsky2009learning}. Empirically, SGD with learning rate $\eta$ tended to perform similarly in terms of training error to HU with equivalent effective learning rate $\beta\eta$ for a range of values of $\beta$. In order to compare to SGD with learning rate $\eta$, $\beta$ was varied and HU's learning rate was set to be $\frac{\eta}{\beta}$ (in order to keep the effective learning rate invariant). As can be seen from Figure~\ref{cifar10:fig}, the loss curves for a variety of values of $\beta$ are very similar for $\beta\eta =0.005$, although the smallest $\beta=0.1$ has slightly lower loss. In general, the final loss reached is similar for a fixed effective learning rate. In addition, there is a clear pattern indicating that shrinking $\beta$ results in sparser weights. This may warrant further investigation. \begin{figure}[h] \centerline{\hbox{ \includegraphics[width=.4\linewidth]{images/cifar_results/loss_elr_0_005.png}\quad \includegraphics[width=.4\linewidth]{images/cifar_results/conv2_sparsity_elr_0_005.png} }} \caption{CIFAR10 loss and sparsity level. The effective learning rate was held constant at $0.005$ while $\beta$ is varied. Sparsity is displayed for the second convolutional layer conv2. The loss corresponds to the total loss, which includes regularization.} \label{cifar10:fig} \end{figure} \section{Introduction} \label{intro:sec} Algorithms for online learning can morally be divided into two camps. On one side is the additive gradient update. Additive gradient-based stochastic methods are the most commonly used approach for learning the parameters of shallow and deep models alike. On the other side stands the multiplicative update method. It is somewhat less glamorous, nonetheless a fundamental primitive in game theory and machine learning, and was rediscovered repeatedly in a variety of algorithmic settings~\cite{MWU}. Both additive and multiplicative updates can be seen as special cases of a more general technique of learning with {\it regularization}. General frameworks for regularization were developed in online learning, dubbed Follow-The-Regularized-Leader and in convex optimization as the {\it Mirrored Decent} algorithms, see more below. Notable attempts were made to unify different regularization techniques, in particular between the multiplicative and additive update methods~\cite{kivinen1997exponentiated}. For example, AdaGrad~\cite{duchi2011adaptive} stemmed from a theoretical study of learning the best regularization in hindsight. As the name implies, the $p$-norm update~\cite{grove2001general,Gentile2003} uses the squared $p$-norm of the parameters as a regularization. By varying the order of the norm between regret bounds that are characteristic of additive and multiplicative updates. We study a new, arguably more natural, family of regularization which ``interpolates'' between additive and multiplicative forms. We analyze its performance both experimentally, and theoretically to obtain tight regret bounds in the online learning paradigm. The motivation for this interpolation stems from the extension of the multiplicative update to negative weights. Instead of using the so called EG$\pm$ trick", a term coined by~\citet{MWpc}, which simulates arbitrary weights through duplication to positive and negative components, we use a direct approach. To do so we introduce the hyperbolic regularization with a single temperature-like hyperparameter. Varying the hyperparameter yields regret bounds that translate between those akin to additive, and multiplicative, update rules. As a natural next step, we investigate the spectral analogue of the hypentropy function. We show that the spectral hypentropy is strongly-convex with respect to the Euclidean or trace norms, again as a function of the single interpolation parameter. The spectral hypentropy yields updates that can be viewed as interpolation between gradient descent rule and matrix multiplicative update~\cite{tsuda2005matrix, arora2007combinatorial}. The standard matrix multiplicative update rule applies only to positive semi-definite matrices. Standard extensions to square and more general matrices increase the dimensionality~\cite{hazan2012near}. Moreover, the the regret bounds scale as $O(\sqrt{T \log (m+n)} $ for $m \times n$ matrices. In contrast, the spectral hypentropy regularization is defined for arbitrary, rectangular, matrices. Moreover, the hypentropy-based update in better regret bounds of $O( \sqrt{T \log \min \{m,n\}}) $, matching the best known bounds in~\citet{kakade2012regularization}. \paragraph{Related work} For background on the multiplicative updates method and its use in machine learning and algorithmic design, see~\citet{MWU}. The matrix version of multiplicative updates method was proposed in~\citet{tsuda2005matrix} and later in~\citet{arora2007combinatorial}. The study of the interplay between additive and multiplicative updates was initiated in the influential paper of \citet{kivinen1997exponentiated}. Generalizations of multiplicative updates to negative weights were studied in the context of the Winnow algorithm and mistake bounds in \citet{warmuth2007winnowing, grove2001general}. The latter paper also introduced the $p$-norm algorithm which was further developed in~\citet{Gentile2003}. The generalization of the p-norm regularization to matrices was studied in \citet{kakade2012regularization}. \paragraph{Organization of paper} $\HU$ and $\SHU$ are mirror descent algorithms using the hypentropy and spectral hypentropy regularization functions defined in Sec.~\ref{div:sec} and Sec.~\ref{matrix_div:sec} respectively. These sections explore the geometric properties of these new regularization functions and provide regret analysis. Experimental results which underscore the applicability of $\HU$ and $\SHU$ are described in Sec.~\ref{experiments:sec}. A thorough description of mirror descent is given for completeness in App.~\ref{appendex1:sec}. The view of $\EGpm$ as an adaptive variant of $\HU$ is explored in App.~\ref{egpm_appendix:sec}. \section{Spectral Hyperbolic Divergence} \label{matrix_div:sec} In this section, the focus is on using \hypent as a spectral regularization function. We show that the matrix version of $\HU$ is strongly convex with respect to the trace norm. Our proof technique of strong convexity is a roundabout for the matrix potential. The proof works by showing that the conjugate potential function is smooth with respect to the spectral norm (the dual of the trace norm). The duality of smoothness and strong convexity is then used to show strong convexity. \subsection{Matrix Functions} We are concerned with potential functions that act on the singular values of a matrix. For an even scalar function, $f:\RR \rightarrow \RR^{+}$, consider the trace function, \begin{align} \label{singular_func:eq} F(\bX) = (f \circ \sigma)(\bX) = \sum_{i=1}^d f(\sigma_i) = \Tr\left(f\left(\sqrt{\bX^{\top}\bX}\right)\right)~, \end{align} where we overload the notation for $f$ and denote $f(\bv) = \sum_{i=1}^d f(v_i)$. For $\bX\in \SS^d$ we use \begin{align} \label{singular_func_b:eq} F(\bX) = (f \circ \lambda)(\bX)= \Tr(f(\bX)) ~. \end{align} Here $f(\bX)$ represents the standard lifting of a scalar function to a square matrix, where $f$ acts on the vector of eigenvalues, namely, \begin{align*} \bX=\bU\diag\left[\lambda(\bX)\right]\bU^{\top} \quad\Rightarrow\quad f(\bX) = \bU \diag\left[f(\lambda(\bX))\right]\bU^{\top} ~. \end{align*} We also use the gradient of a trace-function in our analysis. The following result from Thm.~14~in~\cite{strcvxdual} shows how to compute a gradient using a singular value decomposition. \begin{theorem} Let $\bX\in\RR^{m \times n}$ and $F: \RR^{m \times n} \rightarrow \RR^{+}$ be defined as above, then \begin{align*} \nabla F(\bX) = f'(\bX) ~ . \end{align*} \end{theorem} We also make use of the \emph{Fenchel} conjugate functions. Consider a convex function $f:\calX \rightarrow \RR$ defined on a {\em finite} vector space $\calX$ endowed with an inner product $\ip{\cdot}{\cdot}$. The conjugate of $f$ is defined as follows. \begin{definition} The conjugate $f^{*}: \calX \rightarrow \RR$ of a convex function $f:\calX \rightarrow \RR$ is \begin{align*} f^{*}(\bz) = \sup_{\bx \in \calX} \ip{\bx}{\bz} - f(\bx) ~. \end{align*} \end{definition} In this section, we use the space of matrices (either $\RR^{m\times n}$ or $\SS^d)$ with the inner product $\ip{\bX}{\bY} = \Tr(\bX^{\top}\bY)$. Thus, the dual space of $\calX$ is $\calX$ itself and $f^*$ is defined over $\calX$. \smallskip We need to relate the conjugate of a trace function to that of a scalar function. This is achieved by the following result, restated from Thm.~12~\cite{strcvxdual}. The theorem implies that the conjugate of a singular-values function is the singular-values function lifted from the conjugate of the scalar function. \begin{theorem} \label{matrix_conj:theorem} Let $F = (f \circ \sigma)$ be defined as in \eqref{singular_func:eq}, then $F^{*} = (f^{*} \circ \sigma)$. \end{theorem} \subsection{Duality of Strong Convexity and Smoothness} Recall that a function $f$ is $L$-smooth with respect to a norm $\|\cdot\|$ on $\calK$ if, \begin{align*} \forall \bx, \by \in \calK, ~~ f(\bx) - f(\by) - \nabla f(\by)(\bx-\by) \leq \frac{L}{2} \| \bx-\by\|^2 ~. \end{align*} For convenience, we use the following second order characterization of smoothness which is an analogue of Lemma~\ref{second_strcvx:lemma}. \begin{lemma} \label{second_strsmooth:lemma} A twice differentiable function $f : \calX \rightarrow \RR$ is locally $L$-smooth with respect to $\|\cdot\|$ at $\bx$ iff \begin{align*} \sup_{\by \in \calX :\|\by\| =1} \by^{\top}\nabla^2\phi(\bx)\,\by \leq L~. \end{align*} \end{lemma} Strong convexity and smoothness are dual notions in the sense that $f$ is $\alpha$-strongly convex with respect to a norm $\|\cdot\|$ iff its Fenchel conjugate $f^{*}$ is ${\alpha}^{-1}$-smooth with respect to the dual norm $\|\cdot\|_{*}$. For the matrix variant of \hypent we find it easier to show smoothness of the conjugate rather than strong convexity directly. Unfortunately, as we see in the sequel, the conjugate function is not smooth everywhere. Therefore, we would need a local variant of the duality of strong convexity and smoothness. In the context of mirror descent with mirror map $\nabla \phi$, we show that $\phi$ is strongly convex over $\calK$ if $\phi^{*}$ is locally smooth at all points within the image of the mirror map. Formally, we have the following lemma. In the following we use the standard notation for image of vector functions, $\nabla f(S) = \{ y | \nabla f (x) =y , x \in S \} $, \begin{lemma}[Local duality of smoothness and strong convexity] \label{local_dual_smooth:lemma} Let $\calK \subseteq \RR^d$ be an open convex set and $\|\cdot\|$ be a norm with dual norm $\|\cdot\|_{*}$. Let $\phi: \RR^d \rightarrow \RR$ be twice differentiable, closed and convex function. Suppose the Fenchel conjugate $\phi^{*}: \RR^d \rightarrow \RR$ is locally $L$ smooth with respect to $\|\cdot\|_{*}$ at all points in $\calC = \nabla \phi(\calK)$. Then, $\phi$ is $\frac{1}{L}$ strongly convex with respect to $\|\cdot\|$ over $\calK$. \end{lemma} \begin{proof} It suffices to show that for any $\bx \in \calK$, $\phi$ is locally $\frac{1}{L}$-strongly convex with respect to $\|\cdot\|$ at $\bx$ if $\phi^{*}$ is locally $L$-smooth at $\bx^{*} = \nabla \phi(\bx)$ with respect to $\|\cdot\|_{*}$. \\ From local smoothness at $\bx^{*}$, we have for any $\by\in\calK$, \begin{align*} f(\by) = \frac{1}{2}\by^{\top} \nabla^2\phi^{*}(\bx^{*})\by \leq\frac{L}{2} \|\by\|^2_{*} ~. \end{align*} Taking the dual, which is order reversing, we have for any $\bz\in\calK$, \begin{equation} \label{dual_reverse:eq} f^{*}(\bz) = \frac{1}{2}\bz^{\top} [\nabla^2\phi^{*}(\bx^{*})]^{-1}\bz \geq \frac{1}{2L} \|\bz\|^2 ~. \end{equation} Since $\nabla\phi^* = (\nabla \phi)^{-1}$, then from the inverse function theorem, we have that \begin{align*} \nabla^2\phi^{*}(\bx^{*}) = [\nabla^2\phi(\bx)]^{-1}~. \end{align*} Using the above equality in \eqref{dual_reverse:eq}, we have for any $\bz\in\calK$, \begin{align*} \frac{1}{2}\bz^{\top} \nabla^2\phi(\bx)\bz \geq \frac{1}{2L} \|\bz\|^2~. \end{align*} \end{proof}\vspace{-32pt} \subsection{Strong Convexity of Spectral Hypentropy} We now analyze the strong convexity of the spectral \hypent. The spectral function $\Phi_{\beta}(\bX)$ is defined for $\bX\in\RR^{m \times n}$ by \eqref{singular_func:eq} and for $\bX\in\SS^d$ by \eqref{singular_func_b:eq} replacing $f$ with $\phi_\beta$. The main theorem of this subsection is as follows. \begin{theorem} \label{asymmetric_matrix_strcvx:theorem} The trace function $\Phi_{\beta}: \RR^{m \times n} \rightarrow \RR$ is $(2(\tau+ \beta \min\{m,n\}))^{-1}$-strongly convex with respect to the trace norm over $\btr{\tau}$. \end{theorem} We denote the $d$-dimensional symmetric matrices of trace-ball with maximal radius $\tau$ by $$\btrs{\tau} = \{\bX \in \SS^d: \|\bX\|_1 \leq \tau\} ~.$$ We prove the above theorem by first proving the lemma below for matrices in $\btrs{\tau}$. We then extend it to arbitrary matrices using a symmetrization argument, using a technique similar to \cite{juditsky2008large, warmuth2007winnowing, hazan2012near}. \begin{definition} \label{sym_rank:def} Let $\calK \subseteq \btrs{\tau}$ be a subset of matrices and $\calX \subseteq \SS^d$ be a vector space containing $\calK$ such that $\forall \bX \in \calX, \rank(\bX) \leq r$ and $\nabla\Phi_{\beta}(\bX) \in \calX$. \end{definition} This abstraction will be useful in translating strong convexity of arbitrary matrices to the symmetric case. The bound on the rank is essential to give a modulus of strong convexity result that depends only on $\min\{m, n\}$ rather than $m+n$. The final property is necessary for the low rank structure to be preserved after a primal-dual mapping. \begin{lemma} \label{symmetric_matrix_strcvx:theorem} The trace function $\Phi_{\beta}$ is $(2(\tau + \beta r))^{-1}$-strongly convex w.r.t the trace norm over $\calK$. \end{lemma} To prove the symmetric variant, we show that $\Phi^{*}_{\beta}$ is smooth with respect to the spectral norm, which is the dual norm of the trace norm. The result then follows directly from Lemma~\ref{local_dual_smooth:lemma}. From Theorem~\ref{matrix_conj:theorem}, $\Phi_{\beta}$ has Fenchel conjugate \begin{align*} \Phi^{*}_{\beta}(\bX) = \Tr(\phi^{*}_{\beta}(\bX))~. \end{align*} Since the derivative of the conjugate of a function is the inverse of the derivative of the function, we have $$ \frac{d\phi^{*}_{\beta}}{dx} = \left(\frac{d\phi_{\beta}}{dx}\right)^{-1}= \beta\sinh(x) ~. $$ The indefinite integral of the above yields that up to a constant, $\phi^{*}_{\beta}(x) = \beta \cosh(x)$. Clearly, $\Phi_{\beta}$ is not smooth everywhere. Nonetheless, we do have smoothness over $\nabla\Phi_{\beta}(\btrs{\tau})$. Before proving this property, we introduce a clever technical lemma of~\citet{juditsky2008large} that allows us to reduce the spectral smoothness for matrices to smoothness of functions in the vector-case. \begin{lemma \label{seconddirderiv:lemma} Let $f:\RR \rightarrow \RR$ be a function and $c\in\RR_+$ such that that for $a \geq b$, \begin{align} \frac{f'(a) -f'(b)}{a-b} \leq \frac{c(f''(a) + f''(b))}{2}~. \end{align} Let $F: \SS^d \rightarrow \RR$ be a function defined by $F(\bX)= \Tr(f(\bX))$. Then, the second directional derivative of $F$ is bounded for any $\bH\in\SS^d$ as follows, \begin{align*} \dd{\bH}{F(\bX)} \leq c\Tr(\bH f''(\bX)\bH)~. \end{align*} \end{lemma} We are now prepared to analyze the smoothness of $\Phi^{*}_{\beta}$. \begin{lemma}[Local Smoothness] The trace function $\Phi^{*}_{\beta}$ is locally $2(\tau+ \beta r)$-smooth with respect to the spectral norm for all matrices in $\nabla\Phi_{\beta}(\calK)$. \end{lemma} \begin{proof} % To prove local smoothness, we use the second order conditions from Lemma \ref{second_strsmooth:lemma}. This requires us to upper bound the second directional derivatives for all directions corresponding to matrices of unit spectral norm. We consider the matrix $$\bX = \nabla\Phi(\bY) = \phi_{\beta}'(\bY) = \arcsinh\left(\frac{\bY}{\beta}\right) ~.$$ Note that $(\phi^{*}_{\beta})''(x) = \beta\cosh(x)$ is positive and convex. Therefore, by the mean value theorem, there exists $c \in [a,b]$ for which, % \begin{align*} \frac{(\phi^{*}_{\beta})'(b) - (\phi^{*}_{\beta})'(a)}{b-a} = (\phi^{*}_{\beta})''(c) \leq \max\left\{\phi^{*}_{\beta})''(a) \,,\, (\phi^{*}_{\beta})''(b)\right\} \leq (\phi^{*}_{\beta})''(a) + (\phi^{*}_{\beta})''(b) ~. \end{align*} We note that by Definition~\ref{sym_rank:def}, $\nabla\Phi_{\beta}(\calX) \subseteq \calX$, so we can restrict ourselves to the vector space $\calX$. Therefore, applying Lemma \ref{seconddirderiv:lemma}, we have \begin{align*} \sup_{\bH\in \calX: \|\bH\|_{\infty} \leq 1}\dd{\bH}{\Phi_{\beta}^{*}(\bX)} &\leq \sup_{\bH\in \calX: \|\bH\|_{\infty}\leq 1} 2 \Tr\left(\bH (\phi^{*}_{\beta})''(\bX)\,\bH\right)\\ &= \sup_{\bH\in \calX: \|\bH\|_{\infty}\leq 1} 2\Tr\left(\bH^2 (\phi^{*}_{\beta})''(\bX)\right) & [\mbox{Commutativity of trace}]\\ &\leq \sup_{\bH\in \calX: \|\bH\|_{\infty}\leq 1} 2\ip{\sigma^2(\bH)}{\sigma((\phi^{*}_{\beta})''(\bX))} & [\mbox{von Neumann's trace inequality}] \end{align*} where von Neumann's trace inequality stands for, $\Tr(\bA^{\top}\bB) \leq \ip{\sigma(\bA)}{\sigma(\bB)}$. Now, since $\bH\in \calX$, we know $\rank(\bH)\leq r$, and so $\bH$ can have at most $r$ nonzero singular values, yielding \begin{align*} \sup_{\bH\in \calX: \|\bH\|_{\infty} \leq 1}\dd{\bH}{\Phi_{\beta}^{*}(\bX)} &\leq \sup_{\bH\in \calX:\|\bH\|_{\infty} \leq 1} 2\|\bH^2\|_{\infty}\sum_{i=1}^r\sigma_i((\phi^{*}_{\beta})''(\bX)) \\ &= 2\sum_{i=1}^r(\phi^{*}_{\beta})''(\phi_{\beta}'(\sigma_i(\bY))) ~. \end{align*} Now, note that $$(\phi_{\beta}^{*})''(\phi_{\beta}'(x)) = \beta\cosh\left(\arcsinh\left({x}/{\beta}\right)\right) = \sqrt{\beta^2 + x^2} \leq \beta + |x| ~ .$$ It then follows that \begin{align*} \sum_{i=1}^r(\phi^{*}_{\beta})''(\phi_{\beta}'(\sigma_i(\bY))) \leq \beta r + \|\bY\|_1 \leq \tau+\beta r~. \end{align*} Therefore, the second directional derivative in bounded by $2(\tau+\beta r)$ as desired. \end{proof} \iffalse \ys{Not clear what you mean by the following.\ldots "H\"older's inequality for matrices can be used to combine this step and the subsequent step, we split this for later use."} \ug{I previously used a label in the von Neumann's trace inequality step, as in the asymmetric case, we have at most $\min\{m, n\}$ nonzero singular values. If we didn't need this refinement, using the Von Neumman trace inequality would be unnecessary, as we could replace this inequality and H\"older's inequality with the generalization of H\"older's inequality for matrices in a single step. In the current state there is a dangling reference in the proof of Theorem~\ref{asymmetric_matrix_strcvx:theorem}. I wasn't super happy with this anyway, as this theorem isn't truly being used as a lemma. In the general theorem, I subtly refined the analysis. I have changed the the lemma to apply over a subset of the symmetric trace-ball $\calK \subseteq \btrs{1}$ and provided a bound that depends on a rank bound for $\calK$. I can easily recover the previous version using git, so I'm avoiding the iffalses for this change.} \fi \begin{proof}[Theorem~\ref{asymmetric_matrix_strcvx:theorem}] We introduce the symmetrization operator $S:\RR^{m\times n} \rightarrow \SS^{m+n}$ which is a linear function that takes a matrix to a symmetric matrix, \begin{align*} S(\bX) = \begin{bmatrix} 0 & \bX \\ \bX^{\top}& 0 \end{bmatrix}~. \end{align*} The eigenvalues of $S(\bX)$ are exactly one copy of singular values and one copy of negative singular values of $\bX$. Therefore, we have $$\Phi_{\beta}(\bX) = \sum_{i=1}^{\min\{m,n\}}\hspace{-6pt}\phi_{\beta}(\sigma_i(\bX)) = \frac12{\Phi_{\beta}(S(\bX))} ~. $$ Technically, for the above to hold true, we should shift $\phi_{\beta}$ such that its $0$ is at $0$. Since a constant shift does not affect diameter or convexity properties so this is not an issue. \smallskip Let $\mu$ be the modulus of strong convexity in the symmetrized space. We bound $\Phi_{\beta}(\bX)$ from below as follows, \begin{align*} 2\Phi_{\beta}(\bX) &= \Phi_{\beta}(S(\bX)) \\ &\geq \Phi_{\beta}(S(\bY)) + \ip{\nabla \Phi_{\beta}(S(\bY))}{S(\bX) - S(\bY)} + \frac{\mu}{2} \|S(\bX) -S(\bY)\|^2_1\\ &= \Phi_{\beta}(S(\bY)) + \ip{\nabla \Phi_{\beta}(S(\bY))}{S(\bX -\bY)} + \frac{\mu}{2} \|S(\bX -\bY)\|^2_1\\ &= 2\Phi_{\beta}(\bY) + 2\ip{\nabla \Phi_{\beta}(\bY)}{\bX -\bY} + 2\mu \|\bX -\bY\|^2_1 ~ . \end{align*} Therefore, the modulus of strong convexity over asymmetric matrices is $2\mu$. Note that $\calK = \{S(\bX) : \bX \in \btr{2\tau}\}$ satisfies the properties listed in Definition~\ref{sym_rank:def}, with $r= 2\min\{m,n\}$. In particular, we have a vector space $\calX = \{S(\bX): \bX \in \RR^{m \times n}\}$ containing symmetric matrices of rank at most $2\min\{m,n\}$. Furthermore, for any $\bX \in \calX$, $\bX = S(\bY)$ for some $\bY\in \RR^{m\times n}$ and thus, \begin{align*} \nabla\Phi_{\beta}(\bX) = \nabla\Phi_{\beta}(S(\bY))= S(\nabla\Phi_{\beta}(\bY)) \in \calX ~. \end{align*} It follows from Theorem~\ref{symmetric_matrix_strcvx:theorem} that $\mu \geq (2(2\tau+ 2\beta \min \{m,n\}))^{-1}$, and so the strong convexity is at most $2\mu \geq (2(\tau+ \beta \min \{m,n\}))^{-1}$ as desired. \end{proof}\vspace{-16pt} \subsection{SHU algorithm} We next describe, the Spectral Hypentropy Update ($\SHU$), an OCO algorithm over a convex domain of matrices $\calK \subseteq\RR^{m \times n}$. \begin{algorithm2e}[ht] \label{shu:algorithm} \SetAlgoLined \SetKw{KwBy}{by} \KwIn{$\eta >0, \beta > 0$, convex domain of matrices $\calK \subseteq \RR^{m \times n}$} Initialize weight matrix $\bW^{1} = \bzero$\; \For{$i=1$ \KwTo $T$}{ (a) Predict $\bW^{t}$ ~ ~ (b) Incur loss $\ell_t(\bW_t)$ ~ ~ (c) Calculate $\bG^t = \nabla \ell_t(\bW^t)$ \; \smallskip Update: $ \bW^{t+\frac{1}{2}} = \beta \sinh{\Big(\arcsinh{\Big(\frac{\bW^{t}}{\beta}\Big)} - \eta \bG^{t}}\Big) $\; \smallskip Project onto $\calK$: $\bW^{t+1} = \displaystyle \argmin_{\bV \in \calK} D^{\beta}_{\Phi}\infdivx{\bV}{\bW^{t+\frac{1}{2}}}$ } \caption{Spectral \Hypent Update (SHU)} \end{algorithm2e} The pseudocode of $\SHU$ is provided in Algorithm~\ref{shu:algorithm}. The update step of SHU requires a spectral decomposition. We define $f(\bA) = \bU f(\diag\left[\sigma(\bA)\right])\bV^{\top}$ where $\bA = \bU\diag(\sigma(\bA))\bV^{\top}$ is the singular value decomposition of $\bA$. We use this definition twice, once with $f=\arcsinh$, and after subtracting the gradient with $f=\sinh$. We prove the following regret bound for $\SHU$. \begin{theorem} \label{trace_normregret:theorem} Let $\bW \in \btr{\tau} \subseteq \RR^{m\times n}$ and let $\|\bG^t\|_{\infty} \leq G_{\infty}$ be a spectral norm bound on the gradients. For $\gamma = \frac{\beta}{\tau} \leq 1$, setting, $$\eta = \frac{1}{2G_{\infty}} \sqrt{\frac{ \log{\big(\tfrac{3}{\gamma}\big)}}{T(1+\gamma\min\{m,n\})}} ~,~ \mbox{ yields } ~ ~ \regret_T(\SHU) \leq 4\tau G_{\infty} \sqrt{T (1+\gamma\min\{m,n\})\log{(\tfrac{3}{\gamma})}}~. $$ \end{theorem} \begin{proof} Like for $\HU$, we use the general OMD analysis. It suffices to find an upper bound on $\diam_{\Phi_{\beta}}(\btr{\tau})$ and a strong convexity bound. Applying~\eqref{l1_diameter:eq} on the vector singular values, we have $$\diam_{\Phi_{\beta}}(\btr{\tau}) \leq \tau \log\left(\frac{3\tau}{\beta}\right)~,$$ where $\beta \leq \tau$. Furthermore, from Theorem~\ref{asymmetric_matrix_strcvx:theorem}, we can see that $\Phi_{\beta}$ is $(2(\tau+ \beta \min\{m,n\}))^{-1}$ strongly convex with respect to the trace-norm over $\btr{\tau}$. Letting $\gamma = \frac{\beta}{\tau}$, the result follows from Theorem~\ref{omd:theorem}. \end{proof} \section{Online Mirrored Descent}\label{appendex1:sec} \begin{algorithm2e}[h] \label{omd:algorithm} \SetAlgoLined \SetKw{KwBy}{by} \KwIn{$\eta >0, \beta > 0$, convex domain $\calK \subseteq \RR^{d}$} Let $\by_1$ be such that $\nabla R(\by_1) = 0$ and $\bw^{1} = \argmin_{\bw \in \calK} D_{R}\infdivx{\bw}{\by^1}$\; \For{$i=1$ \KwTo $T$}{ (a) Predict $\bw^{t}$ ~ ~ (b) Incur loss $\ell_t(\bW_t)$ ~ ~ (c) Calculate $\bg^t = \nabla \ell_t(\bw^t)$ \; \smallskip Update: $ \nabla R(\by^{t+1}) = \nabla R(\bw^t) - \eta\bg^t $\; \smallskip Project onto $\calK$: $\bw^{t+1} = \argmin_{\bw \in \calK} D_{R}\infdivx{\bw}{\by^{t+1}}$ } \caption{Online Mirror Descent with potential function $R$} \end{algorithm2e} Online Mirror Descent (OMD) is an meta-algorithm for online convex optimization. The regularization function, $R$, is assumed to be strongly convex, smooth, and twice differentiable. Like GD, Mirror Descent is an iterative algorithm involving a simple gradient update. $R$ defines a mapping into a dual space where the updates occur, followed by an inverse mapping to the original space. This step may result in a vector outside of $\calK$, so a projection is required. An alternative formulation where the regularization casts a trade-off between moving along the gradient direction and staying close to the current iterate is, \begin{align} \bw^{t+1} &= \argmin_{\bw \in \calK}\big\{\eta\ip{\bg^t}{\bw} + D_{R}\infdivx{\bw}{\bw^{t}}\big\} ~. \end{align} For Algorithm~\ref{omd:algorithm} with the above assumptions, we have the following regret bound. \begin{theorem}[OMD Regret] \label{omd:theorem_general} Assume $R$ is $\mu$-strongly convex with respect to a norm $\|\cdot\|$ whose dual is $\|\cdot\|_{*}$, then running \textup{OMD} with a fixed learning rate $\eta$ yields the following regret bound, \begin{align*} \regret_T \leq \frac{1}{\eta}\,{\sup_{\bw \in \calK} D_{R}\infdivx{\bw}{\bw^{1}}} + \frac{\eta}{2\mu} \sum_{t=1}^T \|\bg^t\|^2_{*} ~. \end{align*} \end{theorem} If we have a bound on the dual norm of a gradient, we can choose a learning rate which minimizes the upper bound, yielding Theorem~\ref{omd:theorem}. We next introduce two well known properties of Bregman divergences without proof. The first technical lemma is the Bregman divergence analogue of the law of cosines. \begin{lemma}[Three-point Lemma] \label{3pt:lemma} For every three vectors $\bx, \by, \bz$, \begin{align*} D_{R}\infdivx{\bx}{\bz} = D_{R}\infdivx{\bx}{\by} + D_{R}\infdivx{\by}{\bz} - \ip{\nabla R(\bz) - \nabla R(\by)}{\bx -\by} ~. \end{align*} \end{lemma} The next lemma is an analogue of the Pythagorean theorem for Bregman projections. \begin{lemma}[Generalized Pythagorean Theorem] \label{pythog:lemma} Let $$\bx'= \Pi_{\calK, \phi}(\bx) = \argmin_{\by \in \calK} D_{R}\infdivx{\by}{\bx} ~, $$ then $$ D_{R}\infdivx{\bz}{\bx} \geq D_{R}\infdivx{\bz}{\bx'} + D_{R}\infdivx{\bx'}{\bx}~.$$ \end{lemma} \begin{proof}[Theorem~\ref{omd:theorem_general}] Let $\bw^{*} = \argmin_{\bw\in \calK}\sum_{t=1}^T\ell_t(\bw)$ be the best fixed predictor in hindsight, then \begin{align*} \ell_t(\bw^t) - \ell_t(\bw^{*}) &\leq \ip{\bg^{t}}{\bw^t -\bw^{*}} & [\mbox{Convexity}] \nonumber\\ &=\frac{1}{\eta}\ip{ \nabla R(\bw^t) - \nabla R(\by^{t+1})}{\bw^{t} -\bw^{*}} \nonumber\\ &=\frac{1}{\eta}\ip{ \nabla R(\by^{t+1})- \nabla R(\bw^t)}{\bw^{*}- \bw^{t}} \nonumber\\ &=\frac{1}{\eta}\big ( D_{R}\infdivx{\bw^{*}}{\bw^t} + D_{R}\infdivx{\bw^t}{\by^{t+1}} - D_{R}\infdivx{\bw^{*}}{\by^{t+1}} \big) & [\mbox{Lemma}~ \ref{3pt:lemma}] \nonumber\\ &=\frac{1}{\eta}\big ( D_{R}\infdivx{\bw^{*}}{\bw^t} + D_{R}\infdivx{\bw^t}{\by^{t+1}} - D_{R}\infdivx{\bw^{*}}{\bw^{t+1}} - D_{R}\infdivx{\bw^{t+1}}{\by^{t+1}} \big ) & [\mbox{Lemma}~ \ref{pythog:lemma}] \nonumber\\ &=\frac{1}{\eta}\big ( D_{R}\infdivx{\bw^{*}}{\bw^t} - D_{R}\infdivx{\bw^{*}}{\bw^{t+1}}) +\frac{1}{\eta}\big ( D_{R}\infdivx{\bw^t}{\by^{t+1}} - D_{R}\infdivx{\bw^{t+1}}{\by^{t+1}} \big ) ~. \end{align*} Note that the left hand side term telescopes when summing over $t$, yielding \begin{align} \label{md_regret_sum:eq} \sum_{t=1}^T \ell_t(\bw^t) - \ell_t(\bw^{*}) \leq \frac{D_{R}\infdivx{\bw^{*}}{\bw^1}}{\eta} + \frac{1}{\eta}\sum_{t=1}^T \Big(D_{R}\infdivx{\bw^t}{\by^{t+1}} - D_{R}\infdivx{\bw^{t+1}}{\by^{t+1}}\Big)~. \end{align} If suffices to upper bound $D_{R}\infdivx{\bw^t}{\by^{t+1}} - D_{R}\infdivx{\bw^{t+1}}{\by^{t+1}}$. We start by substituting the definition of the Bregman divergence in $D_R$, \begin{align*} D_{R}\infdivx{\bw^t}{\by^{t+1}} &- D_{R}\infdivx{\bw^{t+1}}{\by^{t+1}}\\ &= R(\bw^t) -R(\bw^{t+1}) - \ip{\nabla R(\by^{t+1})}{\bw^t-\bw^{t+1}}\\ &\leq\ip{\nabla R(\bw^{t})}{\bw^t-\bw^{t+1}} - \frac{\mu}{2}\|\bw^t - \bw^{t+1}\|^2 - \ip{\nabla R(\by^{t+1})}{\bw^t-\bw^{t+1}} &[\mu\mbox{-strong convexity}]\\ &= \ip{\nabla R(\bw^{t}) -\nabla R(\by^{t+1})}{\bw^t-\bw^{t+1}} - \frac{\mu}{2}\|\bw^t - \bw^{t+1}\|^2\\ &= \eta\,\ip{\bg^t}{\bw^t-\bw^{t+1}} - \frac{\mu}{2}\|\bw^t - \bw^{t+1}\|^2 &[\mbox{Update rule}]\\ &\leq \eta\,\|\bg^t\|_{*}\,\|\bw^t-\bw^{t+1}\| - \frac{\mu}{2}\|\bw^t - \bw^{t+1}\|^2 &[\mbox{ Cauchy-Schwarz}]\\ &\leq \frac{\eta^2\|\bg^t\|^2_{*}}{2\mu} ~. \end{align*} The last step follows from maximizing the quadratic function in $\|\bw^t - \bw^{t+1}\|$. Using the above bound \eqref{md_regret_sum:eq} completes the proof. \end{proof} \section{Problem Setting} \label{setting:sec} \paragraph{Notation.} Vectors are denoted by bold-face letters, e.g. $\bw$. The zero vector and the all ones vector are denoted by $\bzero$ and $\bone$ respectively. We denote a ball of radius $1$ with respect to the $p$-norm in $\RR^d$ as $B_{p} = \{\bx \in \RR^d: \|\bx\|_p \leq 1\}$. For simplicity of the presentation in the sequel we assume that weights are confined to the unit ball. Our results generalize straightforwardly to arbitrary radii. Matrices are denoted by capitalized bold-face letters, e.g. $\bX$. We denote the space of real matrices of size $m \times n$ as $\RR^{m\times n}$ and symmetric matrices of size $d \times d$ as $\SS^d$. For a matrix $\bX\in \RR^{m \times n}$, we denote the vector of singular values $\sigma(\bX) = (\sigma_1, \sigma_2, \dots ,\sigma_l)$ where $\sigma_1 \geq \sigma_2 \geq \cdots \geq \sigma_l \geq 0$ and $l = \min\{m,n\}$. Analogously, for $\bX\in \SS^d$, we denote the vector of its eigenvalues as $\lambda(\bX) = (\lambda_1, \lambda_2, \dots ,\lambda_d)$. We use $\|\bX\|_p \eqdef \|\sigma(\bX)\|_p$ to represent the Schatten $p$-norm of a matrix, namely, the $p$-norm of the vector of eigenvalues. We refer to the Schatten norm for $p=1$ as the trace-norm. Note that the notation of the spectral norm of $\bX$ is $\|\bX\|_\infty$. We denote the ball of radius $\tau$ with respect to the trace-norm as $\btr{\tau} = \{\bX \in \RR^{m \times n} : \|\bX\|_1 \leq \tau\}$. We also define the intersection of a ball and the positive orthant as $B^{+}_{p} = B_{p} \cap \RR^d_{+}$. We use $(x)_+$ to denote $\max(x,0)$. We denote by $\|\bx\|_{*}$ the dual norm of $\bx$, $\|\bx\|_{*} \eqdef \sup\{\bz^\top\bx \, | \, \|\bz\|\leq 1\}$. \paragraph{Online Convex Optimization.} In online convex optimization~\cite{cesa2006prediction, hazan2016introduction, shalev2012online}, a learner iteratively chooses a vector from a convex set $\calK \subset \RR^d$. We denote the total number of rounds as $T$. In each round, the learner commits to a choice $\bw_t \in \calK$. After committing to this choice, a convex loss function $\ell_t: \calK \rightarrow \RR$ is revealed and the learner incurs a loss $\ell_t(\bw_t)$. The most common performance objective of an online learning algorithm $\calA$ is regret. Regret is defined to be the total loss incurred by the algorithm with respect to the loss of the best fixed single prediction found in hindsight. Formally, the regret of a learning algorithm $\calA$ is defined as, \begin{align*} \regret_T(\calA) &\eqdef \sup_{\ell_1 \dots \ell_t} \bigg \{\sum_{t=1}^T\ell_t(\bw_t) - \min_{\bw^{*}\in \calK}\sum_{t=1}^T\ell_t(\bw^{*}) \bigg\} ~. \end{align*}
\section{Experiments} \label{sec:exp} We first illustrate on a toy example the advantages, mentioned at the end of the previous section, of the multisampling Thompson-based algorithm over UCB in the case of parallel bandits. We then present the results obtained when applying UCB and Thompson sampling to the online optimization of handover parameters in a wireless cellular network. As explained in the introduction, this problem can be naturally modeled as parallel contextual bandits. In all the experiments, the implemented linear UCB algorithm is the Optimism in the Face of Uncertainty Linear bandit (OFUL) algorithm, described in \cite{abbasi2011improved}. \subsection{Toy example} \label{sec:synth} To illustrate the benefits of the multisampling Thompson-based algorithm described in Figure \ref{alg:thomp-mult} over the UCB algorithm described in Figure \ref{alg:parallel-ucb} we consider the toy example of a linear contextual bandit model. In this case, the expected reward is a linear function of the context $x$ and we assume that the stochastic reward $r$ is given by \begin{equation} \label{eq:reward_toy} r(x, \theta_{\star}) = x^{\top} \theta_{\star} + \varepsilon \end{equation} where $\varepsilon \sim \mathcal{N}(0, R^2)$. We also consider here that the context $x = (s, a)$ where $s \in \mathbb{R}^{d-1}$ corresponds to the state received at each iteration $t$ and $a \in \mathbb{R}$ to the action that has to be chosen. This is the case for the wireless cellular network application described in the introduction and section \ref{sec:base_stations}. We take a parameter $\theta_{\star}$ of the form $\theta_{\star} = (\theta^s_{\star}, 1)$, where $\theta^s_{\star} \in \mathbb{R}^{d-1}$ and the true parameter $\theta^s_{\star}$ is sampled from a multivariate Gaussian distribution $\mathcal{N}(0, \mathbf{I}_{d-1})$ and then normalized to a unit norm vector. At each iteration, a state $s \in \mathbb{R}^{10}$ is sampled from a multivariate Gaussian distribution $\mathcal{N}(0, \sigma_s^2 \cdot \mathbf{I}_{10})$ and the algorithm must choose between one of the 5 actions $a_i=i$, $0 \leq i \leq 4$. The associated reward is generated according to \eqref{eq:reward_toy} where the variance $R^2$ of the noise term $\varepsilon$ is set to $2.5$. For both strategies, multisampling Thompson and UCB, a penalization term $0.01 \cdot \Vert \theta \Vert$ is added to the linear regression. \subsubsection{Influence of the variance of the states} We run $n=20$ bandits in parallel and compare the regrets obtained with the multisampling Thompson-based algorithm and the linear UCB algorithm for different variances. The regrets are computed at a time horizon $T=500$ for 100 random repetitions of the algorithm, the randomness coming from the strategies themselves and the generation of the states at each iteration. The results are shown in Figure \ref{fig:thomp_vs_oful_variance}. \begin{figure}[ht!] \includegraphics[width=8.5cm]{thomp_vs_oful_variance.pdf} \caption{Cumulated regrets obtained at a time horizon $T=500$ when running $n=20$ bandits in parallel for different values of the variance of the states $\sigma^2_s$.} \label{fig:thomp_vs_oful_variance} \end{figure} One may observe that the regret of UCB decreases as the variance increases. This is explained by the fact that when the variance of the contexts is small, UCB will choose the same action for each of the $n$ bandits that are ran in parallel. This either leads to a full exploration or a full exploitation within each batch of size $n$. On the contrary, the multisampling Thompson-based algorithm is more robust to the change in variance and performs better than UCB. As explained in the previous section, the multisampling Thompson-based algorithm allows for a better balance between exploration and exploitation as $n$ parameters $\theta^{(1)}, \dots, \theta^{(n)}$ are sampled from the posterior $p(\theta | \mathbf{x}_{t - 1}, \mathbf{r}_{t - 1})$. \subsubsection{Influence of the number of bandits $n$} We now study the impact of the number $n$ of bandits ran in parallel. Here, the variance of the states is set to a fixed value $\sigma_s^2 = 0.01$. As above, the regrets are computed at a time horizon $T=2000$ for 100 random repetitions of the algorithm, the randomness coming from the strategies themselves and the generation of the contexts at each step. The results are shown in Figure \ref{fig:thomp_vs_oful_update_every}. \begin{figure}[ht!] \centering \includegraphics[width=9cm]{thomp_vs_oful_update_every.png} \caption{Cumulated regrets obtained at time horizon $T=2000$ with a variance of the states $\sigma_s^2 = 0.01$ for different values of the number of bandits ran in parallel $n$.} \label{fig:thomp_vs_oful_update_every} \end{figure} As the number of bandits $n$ increases, the overall regret of UCB degrades whereas the performance of the multisampling Thompson-based algorithm remains stable. This is due to the fact that for large values of the number of bandits $n$, the multisampling Thompson-based algorithm preserves an exploration/exploitation balance compared to UCB. As explained in section \ref{sec:delayed-reward}, the parallel bandits problem can be seen as bandits with delayed rewards. For the non-contextual case, it was also found in \cite{chapelle2011empirical} that Thompson sampling was more robust to the delay than UCB. \subsection{Online optimization of base station parameters} \label{sec:base_stations} The main motivation of the multisampling Thompson strategy developed in this paper is to tune base station parameters of a cellular wireless network so as to provide a good connectivity for all the users. Here we focus on parameters related to \emph{handovers}. A handover occurs when the connection between a user and a cell is transferred to a neighboring cell in order to ensure the continuity of the radio network coverage and prevent interruptions of communication. The reader can refer to Chapter 2 of \cite{karandikar2017LTEmobility} for an account on handovers. We here only present the different steps of a handover procedure. \subsubsection{Handovers} A handover can occur between two cells using the same frequency (\emph{intra-frequency}) or between two cells using different frequencies (\emph{inter-frequency}). For both types of handovers, the user triggers the handover when it receives a better signal from a neighboring cell than from the serving cell. To trigger such an event, the user needs to measure the signal received from neighboring cells. This is automatic for an intra-frequency handover. However inter-frequency measurements are only triggered when the signal received by the serving cell is lower than a pre-specified threshold. Such an event is called \emph{event A2} and is the event of interest in this paper. If the threshold is too low, this results in a late handover and a bad data rate or \emph{throughput} between the cell and the user. On the contrary, if the threshold is too high, unnecessary inter-frequency measurements are triggered and this also results in a bad throughput (Figure \ref{fig:a2_tradeoff}). Indeed, when the user is performing inter-frequency measurements on a neighboring cell, it can no longer exchange information with the serving cell. Tuning the parameter of the base station associated to this threshold can therefore improve the \emph{throughput} between a cell and a user and this should be done for each cell of a wireless network. \begin{figure} \centering \includegraphics[width=8cm]{a2_tradeoff.PNG} \caption{Impact of event A2 threshold.} \label{fig:a2_tradeoff} \end{figure} Optimization of handover parameters has already been studied in the wireless literature (see e.g.~\cite{isa2015handover,capdevielle2013handover,munoz2013handover,mwanje2014qlearninghandover,sinclair2013handover}). However most of the literature mainly focuses on the optimization of handover performance metrics such as early handovers, late handovers or ping-pong handovers whereas the focus here is on the throughput. \subsubsection{Data} \label{sec:data} Data coming from $n=105$ cells have been recorded every hour during 5 days. For each hour and for each cell the value of the threshold of event A2 and five traffic data features are available. The traffic features are: downlink average number of active users, average number of users, channel quality index of cell edge users, and two features related to the traffic of small data packets. The goal is to recommend the values of the threshold of event A2 so as to achieve the best possible throughput the next hour. As we are only concerned about handovers we aim to maximize the throughput of cell edge users, i.e.~users that are located at the edge of a cell and therefore have a low throughput. We thus define the quantity to optimize as the proportion of users which have a throughput lower than 5 MB/s (Megabytes per second). Obviously, the lower this proportion is the better the parameters are. With the terminology used in this paper and in the contextual bandits literature, the threshold corresponds to the \emph{action}, the quantity that we want to optimize to the \emph{reward} and traffic data features to the \emph{state}. We emphasize here on the fact that at each hour $t$ we should recommend a threshold value for each one of the 105 cells. Assuming that the reward of each cell is parametrized by a same parameter $\theta$, this is therefore equivalent to running $n=105$ bandits in parallel as described in section \ref{sec:same-param}. \subsubsection{Parallel logistic contextual bandits} \label{sec:logistic-bandits} The reward corresponding to a proportion of users, it appears natural to use a logistic regression model. We therefore recall here the logistic contextual bandit setting. For any $x, \theta \in \bbR^d$, the expected reward is given by $f(x; \theta) = \sigma(x^{\top}\theta)$ where $\sigma : z \mapsto (1 + \exp(-z))^{-1}$ is the sigmoid function and the reward follows a Bernouilli distribution: \[ p(r | x, \theta) = f(x; \theta)^{r} (1 - f(x; \theta))^{1 - r}, \] with $r \in \{0, 1\}$. Given past observations $(\mathbf{r}_t, \mathbf{x}_t)$, the penalized negative likelihood estimator is defined by \[ \hat{\theta} = \argmin_{\theta} \left\{ \sum_{s = 1}^t \log(1 + \exp(-r_s \theta^{\top} x_s)) + \Omega(\theta) \right\}. \] From a Bayesian standpoint, if $\Omega = (\lambda_2 / 2) \| \cdot \|^2$ (ridge penalty), the corresponding prior is Gaussian. If $\Omega = \lambda_1 | \cdot | + (\lambda_2 / 2) \| \cdot \|^2$ (elastic net penalty), the corresponding prior is a mixture of a Gaussian distribution and a Laplacian distribution. Compared to the linear contextual bandits framework, the posterior $p(\theta | t)$ is here intractable. A common way to draw samples from this posterior is to use the Laplace approximation (see \eg section 4.4 in \cite{Bishop2006}): the posterior is approximated by a Gaussian distribution $\mathcal{N}(\mu_t, \Sigma_t)$, with parameters: \begin{equation} \left\{ \begin{array}{rcl} \mu_t &=& \hat{\theta} \\ \Sigma_t &=& \sum_{s = 1}^t (1 - \sigma(x_s^{\top} \hat{\theta})) \sigma(x_s^{\top}\hat{\theta}) x_s x_s^{\top} \label{eq:cov-mat}. \end{array} \right. \end{equation} In practice, $\Sigma$ can be expensive to compute, so it is common to only use the diagonal coefficients and this is what we do in the experiment. The assumption that the cells are sharing the same parameter $\theta_{\star}$ may be a bit strong. We show in the next section how to deal with different parameters $\theta^{(i)}_*$, $1 \leq i \leq n$. \subsubsection{Different parameters} \label{sec:diff-params} The parameters $(\theta_{\star}^{(1)}, \ldots, \theta_{\star}^{(n)})$ of each cell are not necessarily identical in practice. However they should benefit from each other's observations. We thus consider that for each $i \in [n]$, $\theta_{\star}^{(i)}$ can be decomposed into the sum of a global parameter $\theta_{\star}$, shared by all the cells, and a local parameter $\tilde{\theta}_{\star}^{(i)}$: $\theta^{(i)}_{\star} = \theta_{\star} + \tilde{\theta}_{\star}^{(i)}$. Let us denote $\boldsymbol{\theta} = (\theta, \tilde{\theta}^{(1)}, \ldots, \tilde{\theta}^{(n)}) \in \bbR^{d \times (n + 1)}$. The new penalized negative likelihood minimizer is: \begin{equation*} \begin{aligned} \hat{\boldsymbol{\theta}} = \argmin_{\boldsymbol{\theta}} \Biggl\{ \sum_{s = 1}^t \sum_{i = 1}^n \log(1 + &\exp(-r_s^{(i)} x_s^{(i) \top} (\theta + \tilde{\theta}^{(i)}))) \\ &+ \Omega(\boldsymbol{\theta}) \Biggr\}, \end{aligned} \end{equation*} where again $\Omega$ may be a ridge penalty $\Omega(\boldsymbol{\theta}) = \lambda_2/2 \Vert \theta \Vert^2 + \lambda_2'/2 \sum_{i = 1}^n \Vert \tilde{\theta}^{(i)} \Vert^2$ or an elastic net penalty: \[ \Omega(\boldsymbol{\theta}) = \lambda_1 | \theta | + \frac{\lambda_2}{2} \| \theta \|^2 + \lambda_1' \sum_{i = 1}^n | \tilde{\theta} |_1 + \frac{\lambda_2'}{2} \sum_{i = 1}^n \| \tilde{\theta}^{(i)} \|^2. \] The diagonal covariance matrix of the Laplace approximation is then: \[ \boldsymbol{\Sigma}_t^{diag} = \begin{pmatrix} \Sigma_t & 0 & \hdots & 0 \\ 0 & \tilde{\Sigma}_t^{(1)} & & \vdots \\ \vdots & & \ddots & 0 \\ 0 & \hdots & 0 & \tilde{\Sigma}_t^{(n)} \end{pmatrix}, \] where $\Sigma_t$ and the $\tilde{\Sigma}_t^{(i)}$ are defined by substituting the elements of $\hat{\boldsymbol{\theta}}_t$ in~\eqref{eq:cov-mat}. \subsubsection{Results for wireless handover optimization} The Thompsom-based algorithm is applied with the bayesian logistic regression presented above and the OFUL algorithm is applied on the logit transform $\sigma^{-1}$ of the rewards. As the true reward function $r(\cdot, \theta_{\star})$ is unknown, we first fit a logistic regression model on a training data set to learn parameters $(\hat \theta^{(1)}, \dots, \hat \theta^{(n)})$ which we then use as surrogates for the true parameters $(\theta^{(1)}_{\star}, \dots, \theta^{(n)}_{\star})$ in order to evaluate the different strategies: multisampling Thompson-based algorithm, OFUL and the strategy used to collect the data. The cumulated expected regret for each strategy is shown in Figure \ref{fig:real-exp_regret} where one can see that Thompson sampling performs better than OFUL and the strategy used to collect the data. \begin{figure} \centering \includegraphics[width=9cm]{real-exp_regret.png} \caption{Multisampling Thompson-based algorithm versus OFUL for the online optimization of handover parameters. The current strategy denotes the strategy used to collect the data.} \label{fig:real-exp_regret} \end{figure} \section{Introduction} \label{sec:introduction} The land area covered by a cellular wireless network, such as a mobile phone network, is divided into small areas called \emph{cells}, each cell being covered by the antenna of a fixed \emph{base station} (see Figure \ref{fig:cellular_network_with_cells}). Each base station is configured by a set of parameters that should be tuned so as to provide the best possible network coverage. Although default recommended values can be used, the best values of these parameters are likely to depend on the traffic (\eg~the number of users) and the geographical location of the base stations. Furthermore, these parameters often need to be adjusted on a regular basis in order to adapt to the evolution of the traffic. The manual tuning of base station parameters may thus be highly time consuming, tedious and needs to preserve some level of quality of service. In addition, recent developments in cellular network standards lean towards a densification of base stations, encouraging operators to find automated solutions for optimal parameters configuration (see \eg \cite{Siomina2006,awada2011taguchioptimization,capdevielle2013handover,isa2015handover}). \begin{figure}[ht!] \centering \includegraphics[width=7cm]{cellular_network_organization_with_cells.png} \caption{Cellular network organization \label{fig:cellular_network_with_cells} \end{figure} One possible way of modeling this problem is through contextual bandits \cite{lu2010contextual}: in this framework, one aims at optimizing an objective that is depending on contextual features (\eg traffic and environment) while avoiding too much deterioration of the objective function (\eg quality of service). More specifically, at each time $t$, given side information about the current state of the wireless network (the \emph{context}), the operator wants to choose the values of the parameters (an \emph{action}) so as to obtain the best user experience (the \emph{reward}). However, since the relation between an action and its associated reward is initially unknown, one needs to \emph{explore} the space of available actions in order to gain some knowledge about this relation before being able to \emph{exploit} it. This exploration-exploitation tradeoff is common to every bandit problem, from multi-armed bandits \cite{lai1985asymptotically, auer2002finite, bubeck2009online} to lazy optimization through gaussian processes \cite{srinivas2009gaussian, contal2013parallel, desautels2014parallelizing, pedregosa2016hyperparameter}. Contextual bandit problems have received a lot a attention in the past decade, either for theoretical guarantees \cite{chu2011contextual, agrawal2013thompson}, delayed rewards framework \cite{joulani2013online} or pure exploration scenarios \cite{audibert2010best, xu2017fully}. Surprisingly, the multi-agent setting, such as the one induced by the base station parameter tuning, has hardly been investigated \cite{huang2016linear}. Efficiently extending existing methods to a parallel setting is not straightforward: naive implementation of an Upper Confidence Bound algorithm, for instance, may lead to suboptimal balance between exploration and exploitation when contexts are too similar. The goal of this paper is to formulate methods leveraging the multi-agent structure and to apply them to wireless handover optimization. The paper is structured as follows. Sections~\ref{sec:def-and-not} and \ref{sec:pb-statement} formally define the parallel contextual bandit problem. Section~\ref{sec:related-work} reviews related methods in the bandit literature. Section~\ref{sec:same-param} develops two approaches for parallel contextual bandits. Finally, Section~\ref{sec:exp} shows empirical performances of our methods, first on a toy example and then on a real wireless base station dataset. \section{Definitions and notations} \label{sec:def-and-not} For any integer $n > 0$, we denote by $[n]$ the set $\{1, \ldots, n\}$ and by $|\mathcal{X}|$ the cardinality of any finite set $\mathcal{X}$. For any $t > 0$ and any sequence $(u_1, u_2, \ldots) \in \mathcal{X}^{\mathbb{N}}$, $\mathbf{u}_t$ will denote the sequence up to index $t$, that is $(u_1, \ldots, u_t)$. For any element $x$ of $\mathbb{R}^d$, $\| x \|$ will denote the euclidean norm and $|x|$ the $\ell_1$-norm. For a given positive definite matrix $A \in \mathbb{R}^{d \times d}$, $\| . \|_A$ denotes the norm induced by the scalar product associated to $A$, that is for any $x \in \mathbb{R}^d$, $\Vert x \Vert_A = \sqrt{x^{\top} A x}$. \section{Problem statement} \label{sec:pb-statement} Let $d > 0$ and let $\mathcal{X} \subseteq \bbR^d$. For a given function $f : \bbR^d \rightarrow \bbR$ and a parameter $\theta_{\star} \in \bbR^d$, we define the reward of a contextual bandit as: for any context $x \in \mathcal{X}$, \begin{equation} \label{def:reward} r(x) = f(x; \theta_{\star}) + \varepsilon, \end{equation} where $\varepsilon$ is a $R$-sub-gaussian random variable independent of $x$, for some $R > 0$. The function $f$ is called the expected reward. The contextual bandits problem consists in the following. At each iteration $0 < t < T$, a set of contexts $\mathcal{X}_t$ is presented; one aims at selecting the context $x_t \in \mathcal{X}_t$ in order to minimize the expected regret. This boils down to finding the sequence $(x_1, \ldots, x_T) \in \mathcal{X}_1 \times \ldots \times \mathcal{X}_T$ maximizing \begin{equation} \label{eq:expected-regret} \sum_{t = 1}^T \mathbb{E}[ r(x_t)] = \sum_{t = 1}^T f(x_t; \theta_{\star}). \end{equation} In most settings, the context space $\mathcal{X}$ can be further expanded as a product of a state space $\mathcal{S}$ and an action space $\mathcal{A}$. In other words, at a given iteration, one observes a state $s \in \mathcal{S}$ and wants to find the action maximizing the expected reward: \[ a^{\star}(s) \in \argmax_{a \in \mathcal{A}} f(s, a; \theta_{\star}). \] When the expected reward is parametrized, a natural strategy is to estimate the parameter $\theta_{\star}$ while limiting the regret as much as possible. This type of methods has been extensively studied in the multi-armed bandit---\emph{i.e.,} context-free bandit---setting \cite{lai1985asymptotically, auer2002finite, bubeck2009online}. More recently, the contextual bandits setting has been investigated, whether the function $f$ is linear \cite{chu2011contextual, agrawal2013thompson}, logistic \cite{chapelle2011empirical, chapelle2015simple} or unknown \cite{agarwal2014taming, srinivas2009gaussian, valko2013finite}. One way of addressing the problem efficiently is to use an Upper Confidence Bound (UCB) framework. It is a straightforward adaptation from UCB in the multi-armed bandit (MAB) case: given a state $s$ and for each action $a$, one uses past observations to build associated confidence region on the expected reward and chooses the action associated to the greatest possible outcome. The method is formally stated in Figure~\ref{alg:ucb}. \begin{figure} \centering \begin{algorithmic} \Require{Confidence parameter $\alpha$} \For{$t = 1, \ldots, T$} \State Receive state $s_t$ \For{$a \in \mathcal{A}$} \State Build a confidence region: $C_{\alpha}(s_t, a)$ \EndFor \State Select $a_t \in \argmax_{a \in \mathcal{A}} \{ \sup \;C_{\alpha}(s_t, a) \}$ \State Observe reward $r_t$ \EndFor \end{algorithmic} \caption{UCB for contextual bandit.} \label{alg:ucb} \end{figure} In this paper, we focus on the problem where $n > 0$ contextual bandits run in parallel. We consider in addition that they share a similar function $f$, although their parameters $(\theta_{\star}^{(i)})_{1 \leq i \leq n}$ are not necessarily identical. The regret~\eqref{eq:expected-regret} is then replaced by the aggregated regret: \begin{equation} \label{eq:agg-expected-regret} \sum_{t = 1}^T \sum_{i = 1}^n f(x_t^{(i)}; \theta_{\star}^{(i)}). \end{equation} Without any additional assumption on the parameters $(\theta_{\star}^{(i)})_{1 \leq i \leq n}$, a straightforward strategy is to run one of the aforementioned policies independently on each bandit. However, if the parameters are selected from a restricted set, say $\theta_{\star}^{(i)} \in \Theta$ with $|\Theta| \ll n$, then one may wonder whether it is possible to use this structure to improve the regret minimization policy. This interrogation is investigated in \cite{maillard2014latent} for the multi-armed bandit setting and in \cite{gopalan2016low} for the contextual bandit setting, when the arms (resp. the contexts) are pulled (resp. chosen) sequentially, one at a time. In our setting however, we are interested in finding a strategy for choosing $n$ contexts at each iteration, since the bandits run in parallel. In order to emphasize the interest of our approaches when this assumption is verified, we consider in the remainder of this paper a simpler setting, where every bandit shares the same parameter $\theta_{\star}$ and, consequently, the same expected reward function. \section{Related work} \label{sec:related-work} Surprisingly, the parallel bandit setting has not been widely studied in the contextual bandit case. There is a lot of literature about closely related settings however; we detail each of these settings in the following sections. \subsection{Delayed reward} \label{sec:delayed-reward} One way to model the parallel bandit problem is to consider bandits with delayed rewards \cite{joulani2013online}: we assume that the reward is not observed immediately after every action but rather delayed. If the rewards are received every $n$ iterations, this setting is then equivalent to $n$ contextual bandits with identical expected reward functions running in parallel. In the general online learning setting, the delayed feedback is modeled as follows. At a given iteration $t$, the environment chooses a state $s_t$ and a set of admissible actions $\mathcal{A}_t$, just as in the standard setting. The reward however is only observed after a delay $\tau_t$, possibly random, that is usually unknown in advance to the learner. One interesting result, enlightened in \cite[Table 1]{joulani2013online}, is the fact that the additional regret induced by the delay is additive in the stochastic feedback case and multiplicative in the adversarial setting. In our setting, the delay $\tau$ is in the set $\{0, \ldots, n - 1\}$, where $n$ is the number of bandits. Therefore, the additional regret is proportional to the number of bandits. The general online learning with delayed feedback problem was deeply investigated and can be extended to a wide range of applications (MDPs, distributed optimization, \emph{etc.}), see \eg \cite{joulani2013online} and references therein for further details. The more specific problem of multi-armed bandits with delayed feedback has been extensively studied in the past decade \cite{guha2010multiarmed, vernade2017stochastic, perchet2016batched}. The particular structure of the problem allows for different approaches than general online learning that sometimes lead to improved convergence guarantees or decreased storage costs. \subsection{Piled rewards} \label{sec:piled-rewards} Our setting offers more structure than a general contextual bandit with delayed rewards since the rewards are accumulated and then all disclosed simultaneously at a given iteration; to the best of our knowledge, this concept of ``piled rewards'' is only developed in \cite{huang2016linear} for the linear contextual bandit, that is a contextual bandit with a linear reward function: \[ f(x; \theta) = x^{\top} \theta. \] The proposed algorithm is based on LinUCB, the essential difference being that the covariance matrix is updated as it cycles through the agents. The algorithm is detailed in Figure~\ref{alg:linucb-parallel}. \begin{figure} \centering \begin{algorithmic} \Require{Confidence parameter $\alpha$} \For{$a \in \mathcal{A}$} \State Initialize $\hat{A}_a \gets I$, $\hat{b}_a \gets 0$, $\hat{w}_a \gets 0$\; \EndFor \For{$t = 1, \ldots, T$} \For{$i = 1, \ldots, n$} \State Select $a^{(i)}_{\star} \in \argmax_{a \in \mathcal{A}} \hat{w}_a^{\top} s^{(i)}_t + \alpha \| s^{(i)}_t \|_{\hat{A}_a^{-1}}$\; \State Update $A_{a^{(i)}_{\star}} \gets A_{a^{(i)}_{\star}} + s^{(i)}_t s^{(i)\top}_t$\; \EndFor \State Observe rewards $r^{(1)}_t, \ldots, r^{(n)}_t$\; \For{$a \in \mathcal{A}$} \State Update $\hat{b}_a \gets \hat{b}_a + \sum_{i = 1}^n \mathds{1}_{\{a = a^{(i)}_{\star}\}} r^{(i)}_t s^{(i)}_t$\; \State Update $\hat{w}_a \gets \hat{A}_a^{-1} \hat{b}_a$\; \EndFor \EndFor \end{algorithmic} \caption{LinUCB-PR algorithm.} \label{alg:linucb-parallel} \end{figure} This update trick is shown to shrink the confidence area as the different bandits are looped over, that is $\| s \|_{\hat{A}^{-1}}$ does not increase as $\hat{A}$ is updated, for any state $s$. The LinUCB-PR is shown to have a $O(n^2 T |\mathcal{A}| \log(nT|\mathcal{A}| / \delta))$ regret with probability $1 - \delta$. This is not an improvement over LinUCB applied to the parallel setting but it behaves empirically better for large values of $T$, possibly due to the shrinked confidence region. This lack of improvement may be explained by the overconfidence induced by the intermediate updates. As explained in \cite{desautels2014parallelizing}, one should build an overconfidence measure and moderate exploratory redundancy, before deriving any regret bound. This approach is quite similar to the ones we will detail in the next sections. We will not limit our attention to the linear setting though---the logistic setting will be of particular interest---and we will develop several methods to tackle this problem in a more general fashion. \subsection{Gaussian processes} \label{sec:gp} Lazy optimization with gaussian processes is a particular application of Bayesian optimization where one aims at finding the maximum of a possibly non-convex objective function $f$. The idea is to use a gaussian process as a prior on $f$ and then to sequentially refine the posterior as objective values are observed. A popular method for optimizing in the gaussian process framework is GP-UCB, which is an extension of UCB to gaussian processes. Indeed, at each iteration, one queries the point presenting the highest upper confidence bound based on the posterior of the objective. This is illustrated on Figure~\ref{fig:gp-ucb}. \begin{figure} \centering \includegraphics[width=.40\textwidth]{gp-ucb.png} \caption{Illustration of GP-UCB algorithm. The posterior mean of the gaussian process is the solid blue line and the associated variance is the filled area. The next evaluation candidate is the one maximizing the \emph{optimistic} prediction of $f$.} \label{fig:gp-ucb} \end{figure} A typical application lies in hyperparameter tuning for machine learning algorithms \cite{pedregosa2016hyperparameter}. The objective is the negative empirical risk (or any fitting score), which is typically expensive to evaluate. The need to parallelize gaussian process algorithms therefore arose naturally: while being expensive to evaluate, one may have access to additional computational power in order to perform several evaluations simultaneously. However, since GP-UCB selects the optimal candidate in a deterministic fashion, the extension of GP-UCB to a parallel setting is not straightforward. This issue received a lot of attention recently, and many types of approaches have been developed to tackle it. We detail three methods, as they seem to grasp the main ideas of parallelizing, but the reader may find many derivations in, \eg \cite{pmlr-v70-daxberger17a, wang2017batched, gonzalez2016batch, NIPS2015_5804, Haftka2016, NIPS2016_6307}. First, a method based on pure exploration techniques, namely GP-UCB-PE, has been proposed in \cite{contal2013parallel}. The idea is to select the GP-UCB candidate and define a confidence region around that candidate. Then, the subsequent queries will be selected in order to ``maximize the exploration'', that is each query will select the point in the confidence region with highest posterior variance. Since the posterior variance does not need the objective value to be updated, this ensures distinct candidates among the batch. With a batch size $n$, resulting expected regret is improved by a factor $\sqrt{n}$ in terms of time and is similar for large $T$ in terms of number of queries. This method is somewhat similar to the pure exploration for batched bandits proposed in \cite{perchet2016batched} in the sense that a part of the batch (here $n - 1$ agents) is dedicated to exploring as much as possible in order to guarantee an improved behavior of the remainder of the batch (here the first agent). Another approach for parallelizing gaussian processes was introduced in \cite{desautels2014parallelizing} as GP-BUCB. As is the case for GP-UCB-PE, this method relies on the fact that posterior variance only depends on the points selected, not their associated values. The next elements are then chosen following a twofold criterion: the standard UCB criterion on the updated process and a overconfidence criterion. The purpose of the latter is to avoid the exploratory redundancy already mentioned in Section~\ref{sec:piled-rewards}---see \cite[Section 4.1]{desautels2014parallelizing} for additional details. Regret analysis of this algorithm yields bounds roughly similar to GP-UCB-PE in terms of number of queries. Finally, the last method we focus on relies on Thompson sampling---see \eg \cite{hernandez2017parallel, kandasamy2017asynchronous}. At each iteration, the posterior gaussian process is updated. Then, $n$ functions are sampled from this distribution and the $n$ candidates are the maximizers of these sampled functions. This class of methods will be of particular interest in the next section because it seems well-suited for global regret minimization: as opposed to GP-UCB-PE and GP-BUCB, it does not necessarily involve improving the performance of only one or few agents in the batch. \section{Parallel bandits with identical parameters} \label{sec:same-param} In this section, we develop the two main approaches for contextual bandits and see how they can be adapted in the parallel bandit setting. \subsection{UCB contextual bandits} \label{sec:ucb-cb} Upper Confidence Bound (UCB) approaches for contextual bandits rely on the following framework, first introduced for the linear case in \cite{abbasi2011improved}. At a given iteration $t > 0$, one is able to build a confidence region $B_{t - 1}$ for the parameter $\theta_{\star}$, based on the previously selected contexts and associated rewards $(x_1, r_1), \ldots, (x_{t - 1}, r_{t - 1})$. A set of contexts $\mathcal{X}_t$ is proposed and one then chooses the context leading to the best possible reward on $B_{t - 1}$: \begin{equation} \label{eq:oful-rule} x_t \in \argmax_{x \in \mathcal{X}_t}\left\{ \max_{\theta \in B_{t - 1}} f(x; \theta) \right\}. \end{equation} Methods based on UCB present the advantage of being easy to implement and fast to compute. They obviously require the knowledge of a ``good'' region $B_{t - 1}$ in the sense that $B_{t - 1}$ should be as tight as possible with respect to the selected confidence level. In the specific case of parallel bandits with identical parameters, the confidence region is based on every bandit historical contexts and rewards: $(x_1^{(i)}, r_1^{(i)}), \ldots, (x_{t - 1}^{(i)}, r_{t - 1}^{(i)})$, for $i \in [n]$. Then, $n$ contexts are selected, one from every $\mathcal{X}_t^{(i)}$, using the UCB rule. Although this method will be preferable to independent policies on each bandits, it may lack the expected exploration/exploitation balance if the contexts sets $\mathcal{X}_t^{(1)}, \ldots, \mathcal{X}_t^{(n)}$ are too similar to enforce different choices amongst the bandits. Indeed, in the---extreme---setting where the contexts sets are identical, the selected contexts will be identical at every bandit: the policy will enforce either a full exploration or a full exploitation scheme, being no different from a setting with only one bandit. The potential regret improvement with respect to independent policies relies solely on the variety of the contexts. This method is formally stated in Figure~\ref{alg:parallel-ucb} \begin{figure} \centering \begin{algorithmic} \Require{$B_0$, update rule for $B$} \For{$t = 1, \ldots, T$} \For{$i = 1, \ldots, n$} \State Select $x_t^{(i)}$ according to~\eqref{eq:oful-rule} \EndFor \State Observe the rewards $r_t^{(1)}, \ldots, r_t^{(n)}$ \State Update $B_t$ with observed rewards and selected contexts \EndFor \end{algorithmic} \caption{UCB algorithm for parallel bandits.} \label{alg:parallel-ucb} \end{figure} \subsection{Bayesian contextual bandits} \label{sec:bayesian-cb} In this section, we focus on bayesian approaches for contextual bandits, and more specifically Thompson-based approaches. In such setting, one defines a prior probability $p(\theta)$ on the parameter to estimate. At iteration $t > 0$, the posterior probability is then of the form \[ p(\theta | \mathbf{x}_{t - 1}, \mathbf{r}_{t - 1}) \propto p(\theta) p(\mathbf{r}_{t - 1} | \mathbf{x}_{t - 1}, \theta), \] where $\mathbf{x}_{t - 1} = (x_1, \ldots, x_{t - 1})$, $\mathbf{r}_{t - 1} = (r_1, \ldots, r_{t - 1})$ and $p(\mathbf{r}_{t - 1} | \mathbf{x}_{t - 1}, \theta)$ is the likelihood function. For the sake of simplicity, we use the notation $p(\theta | t - 1)$ for the posterior $p(\theta | \mathbf{x}_{t - 1}, \mathbf{r}_{t - 1})$. Using this relation, one may sample a parameter $\theta_t$ from the posterior probability, either using a closed form or an approximation---\eg MCMC or Laplace approximation. Finally, the context selected from $\mathcal{X}_t$ is the context maximizing the expected reward parametrized by $\theta_t$: \begin{equation} \label{eq:thompson-rule} x_t \in \argmax_{x \in \mathcal{X}_t} \left\{ f(x; \theta_t) \right\}. \end{equation} Bayesian approaches may offer more flexibility when confidence bounds are not tight but are often much slower to compute, even with rough approximations. In the specific case of parallel bandits with identical parameters, the posterior is built on every bandit historical contexts and rewards. Then, there are two ways of adapting the regular Thompson approach. First, one may sample one $\theta_t$ and select the contexts $(x_t^{(i)})_{1 \leq i \leq n}$ according to the rule~\eqref{eq:thompson-rule}. Another method is to sample $n$ parameters $\theta_t^{(1)}, \ldots, \theta_t^{(n)}$ independently from the same posterior and then to select every context according to its respective parameter. The former is similar to the adaption of UCB methods to a parallel setting. The latter however benefits from the parallel setting, since it will enforce a better balance between exploitation and exploration at a limited cost (sampling being usually cheap \eg when using Laplace approximation). In the setting where all contexts sets are identical, the randomness of the sampled parameters will preserve the exploitation/exploration balance, even if no reward is observed until every context is chosen. Both approaches are detailed in Figure~\ref{alg:thomp-naive} and \ref{alg:thomp-mult}. \begin{figure} \centering \begin{algorithmic} \Require{Prior $p(\theta)$} \For{$t = 1, \ldots, T$} \State Sample a parameter $\theta_t \sim p(\theta | t - 1)$ \For{$i = 1, \ldots, n$} \State Select $x_t^{(i)}$ according to~\eqref{eq:thompson-rule} \EndFor \State Observe the rewards $r_t^{(1)}, \ldots, r_t^{(n)}$ \State Update the posterior with observed rewards and selected contexts \EndFor \end{algorithmic} \caption{Naive Thompson-based algorithm for parallel bandits.} \label{alg:thomp-naive} \end{figure} \begin{figure} \centering \begin{algorithmic} \Require{Prior $p(\theta)$} \For{$t = 1, \ldots, T$} \For{$i = 1, \ldots, n$} \State Sample a parameter $\theta_t^{(i)} \sim p(\theta | t - 1)$ \State Select $x_t^{(i)}$ according to~\eqref{eq:thompson-rule} \EndFor \State Observe the rewards $r_t^{(1)}, \ldots, r_t^{(n)}$ \State Update the posterior with observed rewards and selected contexts \EndFor \end{algorithmic} \caption{Multisampling Thompson-based algorithm for parallel bandits.} \label{alg:thomp-mult} \end{figure} Previous integrations of Thompson sampling in a parallel setting \cite{hernandez2017parallel, kandasamy2017asynchronous} as well as its well-studied empirical behavior \cite{chapelle2011empirical} suggests that it will behave better---regret-wise---than UCB in the contextual bandit setting. However, the theoretical analysis of such methods is far from trivial and is out of the scope of this paper: even MAB theoretical bounds were provided only a few years ago \cite{agrawal2012analysis, agrawal2013further, kaufmann2012thompson} and bounds for the contextual case are limited to linear payoffs \cite{agrawal2013thompson}. Consequently, the next section is devoted to exhibiting the aforementioned differences between the two methods and then applies both algorithms to the handover parameter tuning on a real base stations dataset. \input{experiments} \section{Conclusion} \label{sec:conclusion} In this paper, we exhibited two approaches for handling multi-agent scenarios in the contextual bandits framework. The first one, based on UCB, is a naive extension of the single-agent case; the second one relies on Thompson sampling in order to preserve the exploration-exploitation balance in the bandits batch. Our synthetical experiments enlightened the advantages of Thompson sampling in the parallel setting, as was suggested by theoretical and empirical studies \cite{chapelle2011empirical}. Furthermore, application on wireless handover parameters tuning exhibited a clear superiority of Thompson sampling, in comparison of both manual tuning and UCB-like approach. Extending this framework to a setting where contextual bandits are not identical but rather regrouped in clusters (as in \cite{maillard2014latent, gopalan2016low}) may be a promising way of generalizing this approach to larger networks. Also, deriving theoretical bounds for Thompson sampling in the parallel setting could lead to additional insights on how to improve existing methods. \bibliographystyle{ieeetran}
\section{Introduction} \label{intro} The goal of reinforcement learning (RL) algorithms is to learn a policy that optimizes the cumulative reward (return) provided by the environment. A discount factor $0 \leq \gamma < 1$ can be used to optimize an exponentially decreasing function of the future return. Discounting is often used as a biased proxy for optimizing the cumulative reward to reduce variance and make use of convenient theoretical convergence properties, making learning more efficient and stable~\cite{bertsekas1995neuro,prokhorov1997adaptive,even2003learning}. However, in many of the complex tasks used for evaluating current state-of-the-art reinforcement learning systems ~\cite{mnih2013playing,OpenAI_dota}, it is more desirable to optimize for performance over long horizons. The optimal choice of discount factor, which balances asymptotic policy performance with learning ability, is often difficult, and solutions have ranged from scheduled curricula~\cite{OpenAI_dota,prokhorov1997adaptive,franccois2015discount} to meta-gradient learning of the discount factor~\cite{xu2018meta}. \citet{OpenAI_dota}, for example, start with a small discount factor and gradually increase it to bootstrap the learning process. Rather than explicitly tackling the problem of discount selection, we make the observation that for any arbitrary discount factor, the discounted value function already encompasses all smaller time-scales (discounts). This simple observation allows us to derive a novel method of generating separable value functions. That is, we can separate the value function into a number of partial estimators, which we call delta estimators, which approximate the difference $W_z=V_{\gamma_z}-V_{\gamma_{z-1}}$ between value functions. Importantly, each delta estimators is learnable by itself, because it satisfies a Bellman-like equation based on the $W$s of shorter horizons. Thus, these delta estimators can then be summed to yield the same discounted value function, and any subset of estimators from the series of smaller $\gamma_z$ values. The use of difference methods (the delta between two value functions at different s) leads us to call our method TD($\Delta$). The separable nature of the full TD($\Delta$) estimator allows for each component to be learned in a way that is optimal for that part of the overall value function. This means that, for example, the learning rate (and similarly other parameters) can be adjusted for each component, yielding overall faster convergence. Moreover, the components corresponding to smaller effective horizons can converge faster, bootstrapping larger horizon components (at the risk of some bias). Our method provides a simple drop-in way to separate value functions in any TD-like algorithm to increase performance in a variety of settings, particularly in MDPs with dense rewards. We provide an intuitive method for setting intermediary $\gamma$ values which yields performance gains, in most cases, without additional tuning. Yet, we also show that this method affords the option of further fine-tuning for further performance improvement and note that our method is compatible with adaptive $\gamma$ selection methods \cite{xu2018meta}. We demonstrate these benefits theoretically and highlight performance gains in a simple ring MDP -- used by \citet{kearns2000bias} for a similar bias-variance analysis -- by adjusting the $k$-step returns used to update each delta estimator. We also show how this method can be combined with TD($\lambda$)~\cite{sutton1984temporal} and Generalized Advantage Estimation (GAE)~\cite{schulman2015high}, leading to empirical gains in dense reward Atari games. \section{Related work} \label{sec:related} Many recent works approach discount factors in different ways. To our knowledge, the closest work to our own is that of \citet{fedus2019hyper}, \citet{sherstan2018generalizing}, \citet{sutton2011horde}, \citet{sutton1995td}, \citet{feinberg1994markov}, and \citet{reinke2017average}, which learn ensembles of value functions at different s to form a generalized value function. In the case of \citet{reinke2017average}, they do so for imitating the average return estimator. \citet{feinberg1994markov} examine an optimal policy for the mixture of two value functions with different discount factors. Similarly, \citet{sutton1995td} present learning value functions across different levels of temporal abstraction through mixing functions. In the case of \citet{sherstan2018generalizing} and \citet{sutton2011horde}, they train a value function such that it can be queried for a given set of time-scales. Finally, concurrent to this work, \citet{fedus2019hyper} re-weight multiple value functions across different discount factors to form a hyperbolic value function. However, we note that none of the aforementioned works utilize short term estimates to train the longer term value functions. Thus, while our method can similarly be used as a generalized value function, the ability to query smaller time-scales is a side-benefit to the performance increases yielded by separating value functions into different time-scales via TD($\Delta$). Some recent work has investigated how to precisely select the discount factor choice~\cite{franccois2015discount,xu2018meta}. \citet{franccois2015discount} suggest a particular scheduling mechanism, seen similarly in \citet{OpenAI_dota} and \citet{prokhorov1997adaptive}. \citet{xu2018meta} propose a meta-gradient approach which learns the discount factor (and $\lambda$ value) over time. All of these methods can be applied to our own as we do not necessarily prescribe a final overall $\gamma$ value to be used. Finally, another broad category of work relates to our own in a somewhat peripheral way. Indeed, hierarchical reinforcement learning methods often decompose value functions or reward functions into a number of smaller systems which can be optimized somewhat separately~\cite{dietterich2000hierarchical,henderson2018optiongan,hengst2002discovering,reynolds1999decision,menache2002q,russell2003q, vanseijen2017hra}. These works learn hierarchical policies, paired with the decomposed value functions, which reflect the structure of the goals. \section{Background and notation} Consider a fully observable Markov Decision Process (MDP) ~\cite{bellman1957markovian} $(\S, \mathcal{A}, P, r)$ with state space $\S$, action space $\mathcal{A}$, transition probabilities $P : \S \times \mathcal{A} \rightarrow (\S \rightarrow [0,1])$ mapping state-action pairs to distributions over next states, and reward function $r : (\S \times \mathcal{A}) \rightarrow \mathbb{R}$. At every timestep $t$, an agent is in a state $s_t$, can take an action $a_t$, receive a reward $r_t = r(s_t, a_t)$, and transition to its next state in the system $s_{t+1} \sim P(\cdot \mid s_t, a_t)$. In the usual MDP setting, an agent optimizes the discounted return: $V_\gamma^\pi(s) = \left[\sum_{t=0}^\infty \gamma^{t} r_t | s_0 = s, \pi \right]$, where $\gamma$ is the discount factor and $\pi : \S \rightarrow (\mathcal{A} \rightarrow [0, 1])$ is the policy that the agent follows. $V_\gamma^\pi$ can be obtained as the fixed point of the Bellman operator over the action-value function $\mathcal{T}^\pi V^\pi = r^\pi + \gamma P^\pi V^\pi$ where $r^\pi$ and $P^\pi$ are respectively the expected immediate reward and transition probabities operator induced by the policy $\pi$. In the rest of the paper, we drop the superscript $\pi$ to avoid clutter in the formulas. The value estimate, $\hat V_\gamma$ may approximate the true value function $V_\gamma$ via temporal difference (TD) learning~\citep{sutton1984temporal}. Given a transition $(s_t, a_t, r_t, s_{t+1})$ we can update our value function using the one-step TD error: $ \delta_{t}^\gamma=r_{t} + \gamma \hat{V}_\gamma(s_{t+1}) -\hat{V}_\gamma(s_{t})$. Alternatively, given an entire trajectory, we can instead use the discounted sum of one-step TD errors, which is commonly referred to as either the $\lambda$-return \cite{sutton1984temporal} or equivalently the generalized advantage estimator (GAE) \cite{ schulman2015high}: \begin{equation} \label{eq:gae} A(s_t) = \sum_{k=0}^{\infty} (\lambda \gamma)^k \delta_{t+k}^\gamma, \end{equation} where the $\lambda$ controls the bias-variance trade-off. With function approximation we use a parameterized value function $\hat V_\gamma(\cdot;\theta)$ and then update our value function via the following loss: \begin{equation} \label{eq:ppovalue} \mathcal{L} (\theta) = \mathbb{E}\left[ \left( \hat V_\gamma(s; \theta) - \left (\hat V_\gamma(s) + A(s) \right) \right)^2 \right]. \end{equation} In actor-critic methods~\cite{sutton2000policy, konda2000actor, mnih2016asynchronous}, the value function is updated per equation~\ref{eq:ppovalue}, and a stochastic parameterized policy (actor, $\pi_\omega(a | s)$) is learned from this value estimator via the advantage function where the loss is: \begin{equation} \mathcal{L}(\omega) = \mathbb{E} \left[- \log \pi(a ,s; \omega) A (s) \right]. \end{equation} Building on top of actor-critic methods, Proximal Policy Optimization (PPO)~\cite{schulman2017proximal} constrains the policy update to a given optimization region (a trust region) in the form of a clipping objective between the current and old parameters, $\omega$ and $\omega_{old}$: \begin{equation} \mathcal{L} (\omega) = \mathbb{E} \left[ \min \left ( \rho(\omega) A(s), \psi (\omega) A(s)\right)\right], \label{eq:ppo} \end{equation} where $\rho = \frac{\pi_\omega (a | s)}{\pi_{\omega{old}}(a|s)}$ is the likelihood ratio, $\psi(\omega) = \text{clip} \left (\rho , 1- \epsilon, 1+\epsilon \right )$ is the clipped likelihood ratio, and $\epsilon < 1$ is some small factor applied to constrain the update. \section{TD($\Delta$)} In this section, we introduce TD($\Delta$), along with several variations, including: Multi-step TD, TD($\lambda$), and GAE. \subsection{Single-step TD($\Delta$)} \label{sec:singleTD} Consider learning with $Z+1$ different discount factors $\Delta \mathrel{\mathop{:}}= \gamma_0,\gamma_1,\ldots,\gamma_{Z}$. Each of these define a corresponding value function $V_{\gamma_z}$. We define the \emph{delta functions} $W_z$ by \begin{equation} W_z\coloneqq V_{\gamma_z}-V_{\gamma_{z-1}}, \qquad W_0\coloneqq V_{\gamma_0}. \end{equation} This results in $Z+1$ delta functions such that the desired $V_{\gamma_z}$ is simply the sum of the delta functions: \begin{equation} V_{\gamma_z}(s)=\sum_{i=0}^{z} W_i(s). \end{equation} We can derive a Bellman-like equation for the delta functions $W$. Indeed, $W_0=V_0$ satisfies the Bellman equation \begin{equation} W_0 (s_t ) = \mathbb{E} \left [r_t + \gamma_0W_0 (s_{t+1} )\right ], \end{equation} while the delta functions at larger s satisfy: \begin{align} \label{eq:onestep} &W_z(s_t) = V_{\gamma_z}(s_t)-V_{\gamma_{z-1}}(s_t) \nonumber\\ & = \mathbb{E} \biggl[ \left(r_t+\gamma_z V_{\gamma_z}(s_{t+1})\right) - \left ( r_t+\gamma_{z-1}V_{\gamma_{z-1}}(s_{t+1})\right)\biggr] \nonumber\\ & = \mathbb{E} \biggl[\gamma_z \left(W_z(s_{t+1})+V_{\gamma_{z-1}}(s_{t+1})\right) -\gamma_{z-1}V_{\gamma_{z-1}}(s_{t+1}) \biggr] \nonumber\\ & = \mathbb{E} \biggl[(\gamma_z-\gamma_{z-1}) V_{\gamma_{z-1}}(s_{t+1})+\gamma_z W_z(s_{t+1})\biggr]. \end{align} This is a Bellman-type equation for $W_z$, with decay factor $\gamma_z$ and rewards $V_{\gamma_{z-1}}(s_{t+1})$. Thus, we can use it to define the expected TD update for $W_z$. Note that in this expression, $V_{\gamma_{z-1}}(s_{t+1})$ can be expanded as the sum of $W_i(s_{t+1})$ for $i\leq z-1$, so that the Bellman equation for $W_z$ depends on the values of all delta functions $W_i$, $i\leq z-1$. This way, the delta value function at a given time-scale appears as an autonomous reinforcement learning problem with rewards coming from the value function of the immediately lower time-scale. Thus, for a target discounted value function $V_{\gamma_z}(s)$, we can train all the delta components in parallel according to this TD update, bootstrapping off of the old value of all the estimators. Of course, this requires assuming a sequence of $\gamma_z$ values, including a largest and smallest discount $\gamma_0$ and $\gamma_Z$. We will see in Section~\ref{sec:tuning} that these can affect results, further allowing tuning. However, to avoid the addition of a number of hyperparameters, we assume a simple sequence where we double the effective horizon of the $\gamma_z$ values until the final $\gamma_Z$ value is reached. This simple sequence of $\gamma$'s, without tuning, yields performance gains in many settings as seen in Section~\ref{sec:deepexps}. \subsection{Multi-step TD($\Delta$)} \label{sec:multiTD} In many scenarios, it has been shown that multi-step TD is more efficient than single-step TD \cite{sutton1998introduction}. We can easily extend TD($\Delta$) to the multi-step case as follows. To begin, since $W_{0}\coloneqq V_{\gamma_0}$, the multi-step target for $W_0$ is identical to the standard multi-step target with $\gamma=\gamma_0$. For all other $W$s, we can unroll both the bootstrap term and the rewards from the previous value function in Section~\ref{sec:singleTD}: \begin{align} &W_0(s_t) = \mathbb{E} \biggl [ \sum_{i=0}^{k_0-1} \gamma_0^{i} r_{t+i} + \gamma_0^{k_0} W_0 (s_{t+k})\biggr ], \nonumber \\ \label{eq:multistepupdate} &W_z(s_t) =\mathbb{E} \biggl [ (\gamma_z - \gamma_{z-1}) V_{\gamma_{z-1}}(s_{t+1}) + \gamma_z W_{z}(s_{t+1}) \biggr ] \nonumber\\ & = \mathbb{E} \biggl[ (\gamma_z - \gamma_{z-1}) r_{t+1} + \gamma_{z-1} (\gamma_z - \gamma_{z-1}) V_{\gamma_{z-1}}(s_{t+2}) \nonumber\\ & \quad + \gamma_z (\gamma_z - \gamma_{z-1}) V_{\gamma_{z-1}}(s_{t+2}) + \gamma_z^2 W_{z}(s_{t+2}) \biggr] \nonumber\\ & = \mathbb{E} \biggl [ (\gamma_z - \gamma_{z-1}) r_{t+1} + (\gamma_z^2 - \gamma_{z-1}^2) V_{\gamma_{z-1}}(s_{t+2}) \nonumber\\ & \quad + \gamma_z^2 W_{z}(s_{t+2}) \biggr ] \nonumber \\ & = \mathbb{E} \biggl [\sum_{i=1}^{k_z-1} ( \gamma_z^{i} - \gamma_{z-1}^{i}) r_{t+i} + ( \gamma_z^{k_z} - \gamma_{z-1}^{k_z}) V_{\gamma_{z-1}}(s_{t+k}) \nonumber \\ & \quad + \gamma_z^{k_z} W_z (s_{t+k}) \biggr] . \end{align} Thus, each $W_z$ receives a fraction of the rewards from the environment up to time-step $k_z-1$. Additionally, each $W$ bootstraps off of its own value function as well as the value at the previous time-scale. A version of this algorithm based on $k$-step bootstrapping from \citet{sutton1998introduction} can be seen in Algorithm~\ref{alg:tab}. We also note that while Alorithm~\ref{alg:tab} has quadratic complexity w.r.t. $Z$, we can make the algorithm linear in implementation for large $Z$ by storing $\hat{V}$ values at each time-scale $\gamma_z$. \begin{algorithm}[t] \caption{Multi-step TD($\Delta$)} \label{alg:tab} \begin{algorithmic} \STATE Inputs $\left(\gamma_0, \gamma_1, ..., \gamma_Z\right)$, $\left(k_0, k_1, ..., k_Z\right)$, $\left(\alpha_0, \alpha_1, ..., \alpha_Z\right)$ \STATE Initialize $\hat W_z(\cdot) = 0 \quad \forall z $ \FOR{$t=0,1,2...$} \STATE Take step according to policy and store $(s_t, r_t, s_{t+1})$ \IF{$t \geq k_Z$} \STATE $\tau \leftarrow t - k_Z + 1$ \FOR{$z \in 0, 1, ..., Z$} \IF{$z=0$} \STATE $G^0_\tau \leftarrow \sum_{i=\tau}^{\tau + k_0 - 1} \gamma_0^{i-\tau} r_i + \gamma^{k_0}_0 \hat W_0(s_{\tau+k_0})$ \ELSE \STATE $G^z_\tau \leftarrow \sum_{i=\tau+1}^{\tau + k_z - 1} (\gamma_z^{i-\tau} - \gamma_{z-1}^{i-\tau}) r_i +$ \STATE $\quad ( \gamma^{k_z}_z - \gamma_{z-1}^{k_z}) \sum_{g=0}^{z-1} \hat W_{g} (s_{\tau+k_z}) +$ \STATE $\quad \gamma^{k_z}_z \hat W_z(s_{\tau+k_z})$ \ENDIF \ENDFOR \FOR{$z \in 0,1, ..., Z$} \STATE $\hat W_z(s_\tau) \leftarrow \hat W_z(s_\tau) + \alpha_z \left[ G^z_\tau - \hat W_z (s_\tau) \right]$ \ENDFOR \ENDIF \ENDFOR \end{algorithmic} \end{algorithm} \subsection{TD($\lambda,\Delta$)} \label{sec:TD(lambda)} The traditional TD($\lambda$)~\cite{sutton1984temporal} uses the following $\lambda$-return as a target for its update rules: \begin{equation}\label{eq: TD(lambda) return} G^{\gamma, \lambda}_t = \hat{V}_\gamma(s_t) + \sum_{k=0}^\infty (\lambda \gamma)^{k} \delta^{\gamma}_{t+k}. \end{equation} The underlying TD($\lambda$) operator can be written: \begin{equation}\label{eq: TD operator} T_\lambda V = V + (I - \lambda \gamma P)^{-1}(T V -V) \end{equation} Similarly, for each $W_z$ we can define a $\lambda$ return: \begin{equation}\label{eq: TD(Delta) return} G^{z, \lambda_z}_t \mathrel{\mathop{:}}= \hat{W}_z(s_t) + \sum_{k=0}^\infty (\lambda_z \gamma_z)^{k} \delta^{z}_{t+k}, \end{equation} where $\delta^{0}_{t} \mathrel{\mathop{:}}= \delta^{\gamma_0}_t$ and $\delta^{z}_{t} \mathrel{\mathop{:}}= (\gamma_z - \gamma_{z-1}) \hat{V}_{\gamma_{z-1}}(s_{t+1}) + \gamma_z \hat{W}_z(s_{t+1}) - \hat{W}_z(s_t)$ are the TD-errors. \subsection{TD($\lambda, \Delta$) with GAE} \label{sec:GAE} Since GAE is used in powerful policy gradient baselines \cite{schulman2017proximal}, we propose a simple extension of TD($\Delta$) that leverages GAE. Specifically, to train the policy we use the following generalized advantage estimator: \begin{equation} \label{eq:deltagae} A^{\Delta} (s_t) \mathrel{\mathop{:}}= \sum_{k=0}^{T-1} (\lambda_Z \gamma_Z)^k \delta_{t+k}^{\Delta}, \end{equation} where $\delta_{t+k}^{\Delta} \coloneqq r_t + \gamma_Z \sum_{z=0}^Z \hat{W}_z(s_{t+1}) - \sum_{z=0}^Z \hat{W}_z(s_{t})$. Thus, we use $\gamma_Z$ as our discount factor and the sum of all our $W$ estimators as a replacement for $V_{\gamma_Z}$. This objective can easily be applied to PPO by using the policy update from Eq.~\ref{eq:ppo} and replacing $A$ with $A^{\Delta}$. Similarly, to train each $W_z$, we use a truncated version of their respective $\lambda$-return defined in Equation~\ref{eq: TD(Delta) return}. See Algorithm~\ref{alg:ppodelta} for details. \begin{algorithm}[!htbp] \caption{PPO-TD($\lambda, \Delta$)} \label{alg:ppodelta} \begin{algorithmic} \STATE Initialize policy $\omega$ and values $\theta^{z} \quad \forall z$ \FOR{$t$ = 0, 1, 2, \dots} \STATE Take step according to $\pi_\omega$ and store $(s_t, a_t, r_t, s_{t+1})$ \IF{$t \geq T$} \STATE $G^{z,\lambda_z} \leftarrow \hat{W}_z(s_{t-T}) + \sum_{k=0}^{T-1} (\lambda_z \gamma_z)^{k} \delta^{z}_{t-T+k} \quad \forall z$ \STATE $A^{\Delta} = \sum_{k=0}^{T-1} (\lambda_Z \gamma_Z)^k \delta_{t-T+k}^{\Delta}$ \STATE Update $\theta^{z}$ with TD (Eq.~\ref{eq:ppovalue}) using $G^z$ $\quad \forall z$ \STATE Update $\omega$ with PPO (Eq.~\ref{eq:ppo}) using $A^{\Delta}$ \ENDIF \ENDFOR \label{alg} \end{algorithmic} \end{algorithm} \section{Analysis} We now analyze our estimators more formally. The goal is that our estimator will provide favorable bias-variance trade-offs under some circumstances (as we shall see experimentally). To shed light on this, we first start by illustrating when our estimator is identical to the single estimator $\hat V_\gamma$ (Theorem~\ref{prop: equivalence linear}) which gives insight into the important quantities of our estimator that can determine when we may achieve benefits over the standard $\hat V_\gamma$ estimator. Then motivated by these results and prior work by \citet{kearns2000bias}, we bound the error of our estimator in terms of a variance and bias term (Theorem~\ref{prop: bound TD(Delta)}) that also yields insight into how to trade-off this quantities to achieve the best result. \subsection{Equivalence settings and improvement} \label{sec:proofs} In some cases, we can show that our TD($\Delta$) update and its variations are equivalent to the non-delta estimator $V_\gamma$ when recomposed into a value function. In particular, we focus here on linear function approximation of the form: \begin{equation*} \hat V_\gamma(s) \mathrel{\mathop{:}}= \langle \theta^{\gamma}, \phi(s) \rangle \quad \text{and} \quad \hat W_z(s) \mathrel{\mathop{:}}= \langle \theta^{z}, \phi(s) \rangle, \forall z \end{equation*} where $\theta^{\gamma}$ and $\{ \theta^{z} \}_{z}$ are weight vectors in $\mathbb{R}^d$ and $\phi: \S \rightarrow \mathbb{R}^d$ is a feature map from a state to a given $d$-dimensional feature space. Let $\theta^{\gamma}$ be updated using TD($\lambda$) as follows: \begin{equation}\label{eq: liner TD(lambda)} \theta^{\gamma}_{t+1} = \theta^{\gamma}_{t} + \alpha \left(G^{\gamma, \lambda}_t - \hat V_\gamma(s_t)\right) \phi(s_t), \end{equation} where $G^{\gamma, \lambda}_t$ is the TD($\lambda$) return defined in equation \ref{eq: TD(lambda) return}. Similarly, each $\hat W_z$ is updated using TD($\lambda_z$, $\Delta$) as follows: \begin{equation}\label{eq: liner TD(lambda, Delta)} \theta^{z}_{t+1} = \theta^{z}_{t} + \alpha_z \left(G^{z, \lambda_z}_t - \hat W_z(s_t)\right) \phi(s_t), \end{equation} where $G^{z, \lambda_z}_t$ is TD($\Delta$) return defined in equation \ref{eq: TD(Delta) return}. Here, $\alpha$ and $\{ \alpha_z \}_z$ are positive learning rates. The following theorem establishes the equivalence of the two algorithms. \begin{theorem}\label{prop: equivalence linear} If $\alpha_z = \alpha, \lambda_z \gamma_z = \lambda \gamma, \forall z$ and if we pick the initial conditions such that $\sum_{z=0}^{Z} \theta_0^{z} = \theta_0^{\gamma}$, then the iterates produced by TD($\lambda$) (Eq.~\ref{eq: liner TD(lambda)}) and TD($\lambda$, $\Delta$) (Eq.~\ref{eq: liner TD(lambda, Delta)}) with linear function approximation satisfy: \begin{equation} \sum_{z=0}^{Z} \theta_t^{z} = \theta_t^{\gamma}, \forall t, \end{equation} (The proof is provided in the Supplemental). \end{theorem} Note that the equivalence is achieved when $\lambda_z \gamma_z = \lambda \gamma, \forall z$. When $\lambda$ is close to $1$ and $\gamma_z < \gamma$, the latter condition implies that $\lambda_z = \frac{\lambda \gamma}{\gamma_z}$ could potentially be larger than one. One would conclude that the TD($\lambda_z$) could diverge. Fortunately, we show in the next theorem that the TD($\lambda$) operator defined in equation \ref{eq: TD operator} is a contraction mapping for $1 \leq \lambda < \frac{1+\gamma}{2\gamma}$ which implies that $\lambda \gamma < 1$. \begin{theorem}\label{prop: contraction} $\forall \lambda \in [0, \frac{1+\gamma}{2\gamma}[$, the operator $T_\lambda$ defined as $T_\lambda V = V + (I - \lambda \gamma P)^{-1}(T V -V), \forall V \in \mathbb{R}^{|\S|}$ is well defined. Moreover, $T_\lambda V$ is a contraction with respect to the max norm and its contraction coefficient is equal to $\frac{\gamma |1-\lambda|}{1-\lambda \gamma}$ (The proof is provided in the Supplemental). \end{theorem} Similarly, we can consider learning each $W_z$ using $k_z$-step TD($\Delta$) instead of TD($\lambda$, $\Delta$). In this case, the analysis of Theorem~\ref{prop: equivalence linear} could be extended to show that with linear function approximation, standard multi-step TD and multi-step TD($\Delta$) are equivalent if $k_z = k, \forall z$. However, we note that the equivalence with unmodified TD learning is the exception rather than the rule. For one, in order to achieve equivalence we require the same learning rate across every . This is a strong restriction as intuitively the shorter time-scales can be learned faster than the longer ones. Further, adaptive optimizers are typically used in the nonlinear approximation setting~\cite{henderson2018did,schulman2017proximal}. Thus, the effective rate of learning can differ depending on the properties of each delta estimator and its target. In principle, the optimizer can automatically adapt the learning to be different for the shorter and longer s. Besides for the learning rate, such a decomposition allows for some particularly helpful properties not afforded to the non-delta estimator. In particular, every $W_z$ delta component need not use the same $k$-step return (or $\lambda$-return) as the non-delta estimator (or the higher $W_z$ components). Specifically, if $k_z < k_{z+1}, \forall z$ (or $\gamma_z\lambda_z < \gamma_{z+1}\lambda_{z+1} , \forall z$), then there is the possibility for variance reduction (at the risk of some bias introduction). \subsection{Analysis for reducing $k_z$ values} \label{sec:analysis} To see intuitively how our method differs from the single estimator case, let us consider the tabular \textit{phased} version of k-step TD studied by \citet{kearns2000bias}. In this setting, starting from each state $s \in \S$, we generate $n$ trajectories $\{s^{(j)}_0 =s, a_0, r_0, \ldots, s^{(j)}_k, a^{(j)}_k, r^{(j)}_k, s^{(j)}_{k+1}, \ldots \}_{1\leq j \leq n}$ following policy $\pi$. For each iteration $t$, called also phase $t$, the value function estimate for $s$ is defined as follows: \begin{equation} \hat V_{\gamma, t}(s) = \frac{1}{n} \sum_{j=1}^n \left( \sum_{i=0}^{k-1} \gamma^i r^{(j)}_i + \gamma^k \hat V_{\gamma, t-1}(s^{(j)}_{k}) \right) \end{equation} The following theorem from \citet{kearns2000bias} provides an upper bound on the error in the value function estimates defined by $\Delta^{\hat{V}_\gamma}_t \mathrel{\mathop{:}}= \max_s \{|\hat{V}_{\gamma, t}(s) - V_\gamma(s)| \}$. \begin{theorem} \citep{kearns2000bias} \label{prop: bound TD(lambda)} for any $0 < \delta < 1$, let $\epsilon = \sqrt{\frac{2 \log(2k/\delta)}{n}}$. with probability $1-\delta$, \begin{equation}\label{eq: TD error bound} \Delta_{t}^{\hat{V}_{\gamma}} \leq \underbrace{\epsilon \left( \frac{1-\gamma^{k}}{1-\gamma} \right)}_{\text{variance term}} + \underbrace{\gamma^{k} \Delta_{t-1}^{\hat{V}_{\gamma}}}_{\text{bias term}}, \end{equation} (The proof is provided in the Supplemental). \end{theorem} The first term $\epsilon ( \frac{1-\gamma^{k}}{1-\gamma})$, in the bound in Eq.~\ref{eq: TD error bound}, is a variance term arising from sampling transitions. In particular, $\epsilon$ bounds the deviation of the empirical average of rewards from the true expected reward. The second term is a bias term due to bootstrapping off of the current value estimate. Similarly, we consider a phased version of multi-step TD($\Delta$). For each phase $t$, we update each $W$ as follows: \begin{align}\label{eq: phased TD(Delta)} &\hat W_{z, t}(s) = \frac{1}{n} \sum_{j=1}^n \bigg ( \sum_{i=1}^{k-1} ( \gamma_z^{i} - \gamma_{z-1}^{i}) r^{(j)}_{i} + \nonumber \\ &( \gamma_z^{k_z} - \gamma_{z-1}^{k_z}) V_{\gamma_{z-1}}(s^{(j)}_{t+k}) + \gamma_z^{k_z} \hat W_z (s^{(j)}_{t+k}) \bigg ). \end{align} We now establish an upper bound on the error of phased TD($\Delta$) defined as the sum of error incurred by each W components $\sum_{z=0}^Z \Delta^{z}_t$, where $\Delta^{z}_t = \max_s \{|\hat{W}_z(s) - W_z(s)| \}$ \begin{theorem}\label{prop: bound TD(Delta)} Assume that $\gamma_0 \leq \gamma_1 \leq \ldots \gamma_Z = \gamma$ and $k_0 \leq k_1 \ldots \leq k_Z = k$, for any $0 < \delta < 1$, let $\epsilon = \sqrt{\frac{2 \log(2k/\delta)}{n}}$, with probability $1-\delta$, \begin{align} \sum_{z=0}^Z \Delta^{z}_t & \leq \epsilon \frac{1-\gamma^{k}}{1-\gamma} + \underbrace{\epsilon \sum_{z=0}^{Z-1} \frac{\gamma_z^{k_{z+1}}-\gamma_z^{k_z}}{1-\gamma_z}}_{ \text{variance reduction}} \label{eq: bound TD(Delta)} \\ & + \underbrace{\sum_{z=0}^{Z-1} (\gamma_z^{k_z} - \gamma_{z}^{k_{z+1}} ) \sum_{u=0}^{z} \Delta^{u}_{t-1}}_{ \text{bias introduction}} + \gamma^{k}\sum_{z=0}^{Z} \Delta^{z}_{t-1} \nonumber \end{align} (The proof is provided in the Supplemental). \end{theorem} Comparing the bound for phased TD($\lambda$) in Theorem~\ref{prop: bound TD(lambda)} with the one for phased TD($\Delta$) in Theorem~\ref{prop: bound TD(Delta)}, we see that the latter allows for a variance reduction equal to $\epsilon \sum_{z=0}^{Z-1} \frac{\gamma_z^{k_{z+1}}-\gamma_z^{k_z}}{1-\gamma_z} \leq 0$ but it suffers from a potential bias introduction equal to $\sum_{z=0}^{Z-1} (\gamma_z^{k_z} - \gamma_{z}^{k_{z+1}} ) \sum_{u=0}^{z} \Delta^{u}_{t-1} \geq 0$. This is due to the compounding bias from all shorter-horizon estimates. We note that in the case that $k_z$ are all equal we obtain the same upper bound for both algorithms. It is a well known and often used result that the expected discounted return over $T$ steps is close to the infinite-horizon discounted expected return after $T \approx \frac{1}{1-\gamma}$ \citet{kearns2002near}. Thus, we can conveniently reduce $k_z$ for any $\gamma_z$ such that $k_z \approx \frac{1}{1-\gamma_z}$ so that we follow this rule. Thus, if we have $T$ samples, we can have an excellent bias-variance compromise on all time-scales $<<T$ by choosing $k_z=\frac{1}{(1-\gamma_z)} $, so that $\gamma_z^{k_z}$ is bound by a constant (since $\gamma_z^{\frac{1}{1-\gamma_z}} \leq \frac{1}{e}$) for all $z$. This provides intuitive ways to set both $\gamma_z$ and $k_z$ values (as well as all other parameters) without necessarily searching. We can double the effective horizon at each increasing $W_z$ (to keep a logarithmic number of value functions with respect to the horizon) and similarly adjust all other parameters for estimation. \section{Experiments} \label{sec:experiments} All hyperparameter settings, extended details, and the reproducibility checklist for machine learning research~\cite{repro_checklist} can be found in the Supplemental\footnote{Link to Code: \href{https://github.com/facebookresearch/td-delta}{ github.com/facebookresearch/td-delta}}. \subsection{Tabular} \begin{figure}[!htbp] \centering \includegraphics[width=.235\textwidth]{plots_stderr_tabular_ksteps_new_g0937500runs200k32iter5000.png} \includegraphics[width=.235\textwidth]{plots_stderr_tabular_ksteps_new_g0_93750aggregaten5000.png} \caption{(Left) $\gamma_Z = .9375$, 250 random seeds on the 5-state ring MDP. Error denotes the absolute error against the true discounted value function (pre-computed ahead of time using Value Iteration) averaged across the entire learning trajectory (5000 timesteps). Error bars denote standard error across random seeds. (Right) The average absolute error for the optimal learning rate at each $k$-step return up to the effective planning horizon of $\gamma_Z$.} \label{fig:example} \end{figure} \begin{figure*}[!htbp] \centering \includegraphics[width=.49\textwidth]{plots_valuefunction_Amidar.png} \includegraphics[width=.49\textwidth]{plots_valuefunction_MsPacman.png} \caption{The $W_z$ estimators versus the reward over a single episode in two games - the drops in value align with a lost life. This is done on a single rollout trajectory of the trained PPO-TD($\hat{\lambda}, \Delta$) agent using random seed $1153780$.} \label{fig:trajectory} \end{figure*} We use the same 5-state ring MDP as in \citet{kearns2000bias} -- a diagram of which is available in the Supplemental for clarity -- to demonstrate performance gains under decreasing $k$-step regimes as described in Section~\ref{sec:proofs}. For all experiments we provide a variable number of gammas starting with $0$ and increasing according to $\gamma_{z+1} = \frac{\gamma_z + 1}{2}$ until the maximum desired $\gamma_Z$ is reached. Similarly, $k_z := \frac{1}{1-\gamma_z}, \forall z$ as described earlier. The baseline is a single estimator with $\gamma=\gamma_Z, k=k_Z$. We run a grid of various $\gamma_Z$ and $k_Z$ values and use standard TD-style updates~\cite{sutton1988learning} for our experiments. We compare against the true error which can be calculated ahead of time using value iteration (VI)~\cite{bellman1957markovian}. In the case where we do not tailor $k$ (all $k_z$ are equal), as predicted by the theory in Section~\ref{sec:proofs}, the performance is exactly equal to the single estimator case. We compute the average error from the VI pre-computed optimal value function across the entire training trajectory and plot a sample of these results in Figure~\ref{fig:example}. We supply all results in the supplemental across a set of 7 different $\gamma$ values corresponding to effective planning horizons of ($4, 8, 16, 32, 64, 125, 250$). We note that performance gains tend to increase with larger $\gamma$ and $k$ values as discussed further in the supplemental. However, consistent with the theory, in all cases we still perform about equal to (statistically) or significantly better than the single estimator setting. \subsection{Dense reward Atari} \label{sec:deepexps} We further demonstrate performance gains in Atari using the PPO-based version of TD($\Delta$). We directly update PPO with TD($\lambda, \Delta$), using the code of \citet{pytorchrl}. We compare against the standard PPO baseline with hyperparameters as found in \cite{schulman2017proximal, pytorchrl}. Our architecture differs slightly from the PPO baseline as the value function now outputs $Z+1$ outputs ($1$ for each $W$). For complete fairness, we also add another neural network architecture which replicates the parameters of TD($\Delta$). That is, we use a neural network value function that outputs $Z+1$ values which are summed together before computing the value loss (we call this PPO+). We run two versions of TD($\Delta$). The first version, as described in Section~\ref{sec:GAE}, uses a similar set of $\gamma_z$ sequence as in the ring MDP experiments (starting at $\gamma_Z = 0.99$ and halving the horizon) where $\lambda_z$ is set for each lower $\gamma_z$ such that $\gamma_z \lambda_z = \gamma_Z \lambda_Z$ as per Theorem~\ref{prop: equivalence linear}. However, we note that due to the use of adaptive optimizers, performance may improve as parameters are honed for each delta estimator. Just as in the tabular setting where $k_z$ can be reduced for lower delta estimators, in this setting as well, parity with the baseline model is not necessary and $\lambda$ can effectively be reduced. To this end, we introduce a second version of our method, labelled PPO-TD($\hat\lambda, \Delta$), where we limit $\lambda_z \le 1$. We run experiments on the $9$ games defined in \cite{Bellemare2016unifying} as `Hard' with dense rewards. We chose `Hard' games as these games are most likely to need algorithmic improvements to solve. We chose dense reward tasks since we do not tackle the problem of exploration here (needed for tackling sparse reward settings), but rather modeling of complex value functions which dense reward settings are likely to benefit from. As seen in Table~\ref{tab:asymptotic} (with average return across training and on hold-out no-op starts in the Supplemental), PPO-TD($\lambda, \Delta$) performs (statistically) significantly better in a certain class of games roughly related to the frequency of non-zero rewards (the density). In both versions of TD($\Delta$), the algorithms perform worse asymptotically than the baselines in two games, Zaxxon and Wizard of Wor, which belong to a class of games with lower density. Though PPO-TD($\hat \lambda, \Delta$) performs somewhat better in both cases, as we will see in Section~\ref{sec:tuning}, it is still possible to improve performance further in these games by tuning the number and scale of $\gamma_Z$ factors. One may wonder why performance improves in increasingly dense reward settings. There is a basic intuition that TD($\Delta$) would allow for quick learning of short-term phenomena, followed by slower learning of long-term dependencies. Such a decomposition is reflected in a rolled out trajectory using the learned policy in Figure~\ref{fig:trajectory}. There, the long-term $W_Z$ value declines early according to a consistent gradient towards a lost life in the game, while short-term phenomena continue to be captured in the smaller components like $W_0$. \begin{table*}[!htbp] \centering \resizebox{\textwidth}{!}{ \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline Algorithm & Zaxxon & WizardOfWor & \textbf{Qbert} & \textbf{MsPacman} & \textbf{Hero} & \textbf{Frostbite} & \textbf{BankHeist} & \textbf{Amidar} & \textbf{Alien} \\ \hline PPO-TD$\left (\lambda, \Delta \right)$ & 396 $\pm$ 210 & 2118 $\pm$ 138 &13428 $\pm$ 333 $\dagger$ &2273 $\pm$ 67 $\dagger$&29074 $\pm$ 512 $\dagger$&292 $\pm$ 7&1183 $\pm$ 13& 731 $\pm$ 30 $\dagger$&1606 $\pm$ 112$^*$ \\ \hline PPO-TD$\left (\hat \lambda, \Delta \right)$ & 3291 $\pm$ 812&2440 $\pm$ 89&13092 $\pm$ 430 $\dagger$&2241 $\pm$ 78 $\dagger$&29014 $\pm$ 764 $\dagger$&304 $\pm$ 21&1166 $\pm$ 5 &672 $\pm$ 45&1663 $\pm$ 113$^*$\\ \hline PPO+ & 7006 $\pm$ 211 $\dagger$ &2870 $\pm$ 218 $\dagger$&10594 $\pm$ 335&1876 $\pm$ 89&23511 $\pm$ 843&299 $\pm$ 2&1199 $\pm$ 5&611 $\pm$ 34& 1374 $\pm$ 85\\ \hline PPO & 7366 $\pm$ 223 $\dagger$& 3408 $\pm$ 193 $\dagger$ &11735 $\pm$ 387&1888 $\pm$ 111&21038 $\pm$ 972&294 $\pm$ 5&1190 $\pm$ 3&575 $\pm$ 54& 1315 $\pm$ 70\\ \hline Reward Density &1.15&1.07&12.26&13.27&13.46&5.04&6.3&4.63&11.33\\ \hline \end{tabular}} \caption{Asymptotic Atari performance (across last 100 episodes) with the mean across 10 seeds and the standard error. $\dagger$ denotes significantly better results over our algorithm in the case of baselines or over the best baseline in the case of our algorithm using Welch's t-test with a significance level of $.05$ and bootstrap confidence intervals~\cite{colas2018many,henderson2018deep}. $^*$ indicates significant using bootstrap CI, but not t-test. Bold algorithms are where we perform as well as or significantly better than the baselines. Reward Density is frequency of rewards per $100$ time-steps averaged over $10k$ timesteps under learned policy using baseline (PPO). Notice how the task `Zaxxon' has a much lower frequency than the largest frequency task (Hero). More information in Supplemental. } \label{tab:asymptotic} \end{table*} \begin{figure}[!htbp] \centering \includegraphics[width=.23\textwidth]{plots_stderr_atari_fixing_bias_with_baselines_big_ZaxxonNoFrameskip-v4_Episode_Reward.png} \includegraphics[width=.23\textwidth]{plots_stderr_atari_fixing_bias_with_baselines_big_WizardOfWorNoFrameskip-v4_Episode_Reward.png} \caption{Performance of TD($\Delta$) variations vs. the baselines on Zaxxon and WizardOfWor. ppo+ refers to ppo with an augmented architecture. ppoDelta refers to setting $\gamma_z\lambda_z=\gamma\lambda$ $\forall z$. ppoDelta3 and ppoDelta12 only use two value functions with horizons $(3,100)$ and $(12,100)$ respectively. Shaded region is standard error across $10$ random seeds. } \label{fig:zaxxon} \end{figure} \subsection{Tuning and Ablation} \label{sec:tuning} In the previous section we demonstrated how using a fixed set of $\gamma, \lambda$ tailored to an intuitive set of progressively large horizons, we could yield performance gains in a number of environments over the single estimator case. However, a performance drop was seen in the case of Zaxxon and WizardOfWor. Due to our bias-variance trade-off in bootstrapping from smaller delta estimators, a curriculum based on smaller horizons may effectively slow learning in some cases. However, the benefit of separating value functions in a flexible way, as we propose here, is that they can be tuned. In Figure~\ref{fig:zaxxon} (with full results in the Supplemental), we show how different $\gamma$ values can be used to improve asymptotic performance to match the baseline. By increasing the lowest effective horizon ($\gamma_0$) of $W_0$, we bias the algorithm less toward myopic settings and increase the rate of learning comparable to the baselines. Further tuning of the number of components and their parameters ($\gamma_z, \lambda_z$, learning rate, etc.) may further improve performance. \section{Discussion} \label{sec:conclusion} In this work we explore temporal decomposition of the value function. More concretely, we proposed a novel way for decomposing value estimators via a Bellman update based on the difference between two value estimators with different discount factors. This has convenient theoretical and practical properties which help improve performance in certain settings. These properties have additional benefits: they allow for a natural way to distribute and parallelize training, easy inspection of performance at different discount factors, and the possibility of lifelong learning by adding or removing components. Moreover, we have also highlighted the limitations of this method (introduced bias toward myopic returns) when using the simple parameter settings we propose. However, these limitations can be overcome with the additional ability to tune parameters at different time-scales. We briefly discuss the added benefits of TD($\Delta$) below. \textbf{Scalability:} While we have not pursued it experimentally here, another benefit of separating value functions in this way is that this reflects a natural way of distributing updates across systems for large scale problems. In fact, prior work has sought different ways to scale RL algorithms through partitioning methods (though typically through other means like dividing the state space)~\cite{wingate2004solving,wingate2004p3vi}. Our work provides another such method for scaling RL systems in a different way. A TD($\Delta$) update can be spread across many machines, such that each $W_z$ is updated separately (as long as weights are synced across machines after a parallel update). \textbf{Additional tuning ability:} Many of the performance improvements seen here come not necessarily from the decomposition method itself, but from the ability to set certain parameters differently for each component. The fine-grained nature of the decomposition of the value function allows for further improvement by tuning the number of delta estimators and the $\gamma_z$ values which correlate with them. In the future, a meta-gradient method as \citet{xu2018meta} proposed could be used to automatically scale delta estimators to time-scales which require more computational complexity. However, the default method for tailoring $\gamma_z$ and $k_z$ and $\lambda_z$ values as described above (doubling effective horizons until the maximum horizon is reached), still yields improvements in most games tested here, without additional tuning. \textbf{Interpreting performance at different time-scales:} As we mention in Section~\ref{sec:related}, another benefit of TD($\Delta$) is the ability to examine the value function at different s after a single pass of learning. That is, we can compose value functions from $\gamma_0, ..., \gamma_Z$ and understand the differences between different time-scales. This has implications for real-world uses with similar motivations as \citet{sherstan2018generalizing} describe. Take for example an MDP where the bulk of rewards are in some central region, requiring following a policy $\pi$ for some number of timesteps before reaching the dense reward region. By examining each $W_z$ component as we do in Figure~\ref{fig:trajectory}, a practitioner could understand how far into a trajectory $\pi$ must be followed before the dense reward region is reached. This adds some layer of interpretability to the value function which is missing in the single estimator case. Similarly, this may have the benefit in determining an optimal stopping point for the policy. In production systems where there is a cost to running a policy (time, money, or energy resources), yet the policy can be run indefinitely, a practitioner may use $W_z$ components to determine if the discounted return at a larger horizon is worth the cost. \textbf{TD($\Delta$) as an (almost) anytime algorithm:} Throughout this work, we emphasize this algorithm as a complement to selection of a final $\gamma_Z$. The longest horizon discount factor can be chosen according to other methods (hyperparameter optimization or meta-gradient methods). However, an added benefit of our method not explored in this work is its functionality as an almost anytime algorithm. While longer time horizons will take longer to converge, at any point in time the sum of all horizons which have converged are a suitable approximation for the value function at that intermediary point. Therefore, with enough resources, TD($\Delta$) could potentially at anytime add one further time-scale $Z\leftarrow Z+1$ (initialized to $W_{Z+1}=0$ which preserves the current $V$ estimate). This has implications for methods which already extend discount factors through a curriculum~\cite{OpenAI_dota}. \textbf{Other extensions:} Our method should also extend easily to any TD-like methods such as Sarsa($\lambda$) and Q-learning with few adjustments. We leave this to future work. \textbf{Conclusion: } We believe that TD($\Delta$) is a important drop-in addition to any TD-based training methods that can be applied to a number of existing model-free RL algorithms. We especially highlight the value of this method for performance tuning. We show that a simple sequence of $\gamma_z$ values based on doubling horizon values can yield performance gains especially in dense settings, but this performance can be enhanced further with tuning. As the complexity of modeling and training long-horizon problems increases, TD($\Delta$) may be another tool for scaling and honing production systems for optimal performance. \newpage \section*{Acknowledgements} We thank Alexandre Pich\'e, Vincent Fran\c{c}ois-Lavet, and Harsh Satija for many helpful discussions about the work.
\section{Introduction} An important class of nonequilibrium systems are those driven time-periodically, which includes systems in contact with a heat bath described by stochastic dynamics \cite{bran15,raz16,bara16} and closed quantum system with a time-periodic Hamiltonian \cite{moes17}. Periodically driven systems display quite rich phenomena that have been unveiled recently. Examples range from the realization of micro-sized heat engines \cite{schm08,blic12,mart16} for systems in contact with a heat bath to many body localization \cite{pont15,laza15,aban16} for closed quantum systems. A rather basic issue that has not been investigated in detail yet concerns the onset of sub-harmonic oscillations, i.e., oscillations of some observable with a period larger than the period of the driving in a periodically driven system in contact with a heat bath. Does noise necessarily eliminate these oscillations in a finite system? For how long can they survive? What is the relation between the coherence of these noisy oscillations and energy dissipation? These are particularly relevant questions within the following two contexts. First, temporal oscillations are an essential physical phenomena in living systems. Examples include the cell cycle \cite{ferr11}, bacterial circadian rhythms \cite{naka05,dong08,john11} and other biochemical oscillations \cite{gold97,nova08}. Genetic oscillators have also been designed in synthetic biology \cite{elow00,kim11,potv16}. Noise can play an important role in these phenomena, due to the low number of constituents in a biological system such as a cell. In fact, the effect of noise in such oscillations has been extensively investigated \cite{bark00,gonz02,mein02,falc03,mcka07}. Most of the analysis of this fundamental issue has been restricted to autonomous systems that are not under the influence of periodic driving. In this case, the precision of the oscillations can be quantified by the number of coherent oscillations \cite{more07,jorg18,qian00,cao15,bara17a}, which is given by the relaxation time divided by the period of oscillation. The relation between the precision of noisy oscillations in autonomous systems and thermodynamics has received much attention recently \cite{qian00,cao15,bara17a,nguy18,fei18,wier18,mars19}. However, biophysical oscillations often take place under the influence of a periodic signal. In fact, a striking feature about biological oscillations is the range of periods involved \cite{gold08}. For instance, if we consider oscillations within a cell, calcium oscillations \cite{falc04} can have a period of the order of minutes, whereas circadian clocks have a period of a day. Therefore, generalizing this example, a relevant question is whether a fast periodic signal influences the precision of oscillations that happen at a slower time-scale. In other words, can a fast signal with, say, a period of the order of seconds or minutes lead to precise oscillations with a period of a day? Second, a main feature of so called time-crystals \cite{sach15,khem16,else16} is a subharmonic response of an observable. These are many-body closed quantum systems that also display spatial long-range order as a main feature. Experimental realizations of time-crystals have been performed in \cite{zhan17,choi17}. Time-crystals can also be observed in dissipative open systems in contact with a heat bath \cite{laza17,yao18,gong18,wang18,gamb19}. Hence, the fundamental limits of the effect of thermal noise on subharmonic oscillations can become relevant for such time-crystals as well. The general purpose of this paper is to provide a first answer to the questions raised above about subharmonic oscillations in a stochastic systems under the influence of periodic driving. Our main result is that even in a finite system with thermal fluctuations, sub-harmonic oscillations can survive for an arbitrarily long time, with no fundamental limit. We prove this result by introducing a simple model that exhibits an indefinite number of coherent subharmonic oscillations in a particular limit. Such a divergent number of coherent oscillations in {\it periodically driven} systems is in contrast with the oscillatory behavior in {\it autonomous} systems, for which the number of coherent oscillation is fundamentally limited by the number of states of the underlying network \cite{bara17a}. We also show that the trade-off between energy dissipation and the number of coherent oscillations is always more advantageous for our periodically driven model as compared to an autonomous system, if the number of coherent oscillations is large. Finally, we discuss a mathematical condition on the so-called fundamental matrix from Floquet theory that leads to restrictions on the possible number of coherent subharmonic oscillations that can be achieved in a periodically driven system. \section{General setup} We consider a Markov process with $\Omega$ discrete states and continuous time $t$. The transition rate from state $i$ to state $j$ at time $t$ is denoted by $w_{ij}(t)$. These transition rates are time-periodic with a period $\tau_{\textrm{sig}}$, i.e., $w_{ij}(t+\tau_{\textrm{sig}})=w_{ij}(t)$. The time evolution of the probability to be in state $i$ at time $t$, which is denoted $p_i(t)$, follows the master equation \begin{equation} \frac{d}{dt}\mathbf{p}(t)=\mathcal{L}(t)\mathbf{p}(t), \end{equation} where $\mathbf{p}(t)$ is a vector with components $p_i(t)$ and $[\mathcal{L}(t)]_{ji}\equiv (1-\delta_{ij})w_{ij}(t)-\delta_{ij}\sum_k w_{ik}(t)$ are the elements of the stochastic generator $\mathcal{L}(t)$. The solution of this equation is given by \begin{equation} \mathbf{p}(t)= \sum_{a=1}^{\Omega} C_a\textrm{e}^{\mu_a t}\mathbf{p}^a(t), \label{eqcorrgen} \end{equation} where $C_a$ are constants that depend on the initial condition, $\mathbf{p}^a(t)=\mathbf{p}^a(t+\tau_{\textrm{sig}})$, and $\mu_a$ are the so-called Floquet exponents \cite{klau08}. The Floquet exponent with largest real part is $\mu_1=0$. In the long time limit, the probability converges to the eigenvector $\mathbf{p}^1(t)$. Sub-harmonic oscillations with a period $\tau_{\textrm{osc}}$ are quantified by the Floquet exponent with the second largest real part $\mu_2= -X_R\pm X_Ii$, where $\tau_{\textrm{osc}}=2\pi/X_I$ and $X_R$ is the inverse of the relaxation time. We are interested in the ratio \begin{equation} \mathcal{R}\equiv X_I/X_R. \label{defR} \end{equation} The number of coherent oscillations is given by $\mathcal{R}/2\pi$. This ratio then quantifies the precision of subharmonic oscillations. Floquet exponents can be calculated from the fundamental matrix \cite{grim90,klau08} \begin{equation} \mathcal{M}\equiv\overleftarrow{\exp}\left(\int_0^{\tau_{\textrm{sig}}}\mathcal{L}(t)dt\right), \label{eqfundmat} \end{equation} where the arrow indicates a time-ordered exponential. The eigenvalues of this matrix $\rho_a$, also known as Floquet multipliers, are related to the Floquet exponents as \begin{equation} \mu_a=\tau_{\textrm{sig}}^{-1}\ln \rho_a. \label{defmulti} \end{equation} The largest eigenvalue is $\rho_1=1$. The eigenvalue with the second largest real part is written as $\rho_2=r\textrm{e}^{i\theta}$, where $r\le 1$. From Eq. \eqref{defmulti}, we then obtain $X_R= -\ln r/\tau_{\textrm{sig}}$ and $X_I= \theta/\tau_{\textrm{sig}}$. This last equality leads to $\tau_{\textrm{osc}}=2\pi/X_I= 2\pi\tau_{\textrm{sig}}/\theta\ge \tau_{\textrm{sig}}$, which shows that the period of oscillation is always larger than the period of driving. \begin{figure} \includegraphics[width=77mm]{./Fig1.eps} \vspace{-2mm} \caption{Contour lines for constant $\mathcal{R}$ in the complex plane of the eigenvalue $\rho_2$.} \label{fig1} \end{figure} The contour lines for constant $\mathcal{R}$, which is defined in Eq. \eqref{defR}, in the complex plane of the eigenvalue $\rho_2$ are shown in Fig. \ref{fig1}. On the circle corresponding to $r=1$, the relaxation time $X_R^{-1}$ diverges ($\mathcal{R}\to\infty$) and subharmonic oscillations do not decay. We now provide a model with a finite number of states for which the eigenvalue $\rho_2$ lies on this circle in a certain limit. \section{Limit of indefinite coherent subharmonic oscillations} \begin{figure} \includegraphics[width=78mm]{./Fig2.eps} \vspace{-2mm} \caption{Illustration of the protocol for $\Omega=3$ and $\Omega=4$. The transition rates are $k_1\equiv k/c$ and $k_2\equiv k/c^{(\Omega-1)/\Omega}$.} \label{fig2} \end{figure} Our model corresponds to a particle on a ring with $\Omega$ discrete states, as illustrated in Fig. \ref{fig2}. It can be interpreted as a colloidal particle on a ring subject to thermal noise and driven by a periodic protocol. The transition rate from state $i$ to state $i+1$ is denoted $w_i^+(t)$ and the reversed transition from state $i+1$ to state $i$ is denoted $w_i^-(t)$. For $i=\Omega$, one of the next neighbors is $i+1=1$. The period of the external signal is divided into $\Omega$ time intervals. In a generic time-interval $t\in[(n-1)\tau_{\textrm{sig}}/\Omega,n\tau_{\textrm{sig}}/\Omega]$, where $n=1,2,\ldots,\Omega$, there are three different transition rates: the reversed transition rates are given by $w_i^-=k/c^{(\Omega-1)/\Omega}$ for all states, $w_i^+= k$ for state $i=(\Omega+1-n)\mod \Omega+1$, and $w_i^+=k/c$ for all other states with $i\neq(\Omega+1-n)\mod \Omega+1$. These transition rates fulfill detailed balance for fixed time $t$, i.e., \begin{equation} \prod_{i=1}^{\Omega} [w_i^+(t)/w_i^-(t)]=1. \end{equation} In terms of energies and energy barriers the transition rates can be written as $w_i^+(t)=k\textrm{e}^{E_i(t)-B_i(t)}$ and $w_i^-(t)=k\textrm{e}^{E_{i+1}(t)-B_i(t)}$, where $E_i(t)$ is the energy of state $i$, $B_i(t)$ is the energy barrier between states $i$ and $i+1$, and we set temperature $T=1$ and Boltzmann's constant $k_B=1$ throughout. For the protocol explained in the previous paragraph, for $t\in[(n-1)\tau/\Omega,n\tau/\Omega]$, the energy difference between two neighbors is $E_{i}-E_{i+1}=[(\Omega-1)/\Omega]\ln c$ for $i=(\Omega+1-n)\mod \Omega+1$ and, $E_{i}-E_{i+1}=-(1/\Omega)\ln c$ for $i\neq(\Omega+1-n)\mod \Omega+1$. As a main result, we obtain that this finite stochastic system exhibits indefinite subharmonic oscillations in the following particular limit. First, with $k\gg \tau_{\textrm{sig}}^{-1}$, the one internal transition with rate $k$ is much faster than the external signal. Second, $c$ is large, which leads to diverging energy differences between neighboring states, in such a way that the other transition rates are slow in comparison to the external signal, i.e., $k/c\ll \tau_{\textrm{sig}}^{-1}$ and $k/c^{(\Omega-1)/\Omega}\ll \tau_{\textrm{sig}}^{-1}$. In this limit, by numerical evaluation of the Floquet multipliers we observe that $\rho_2= \textrm{e}^{2\pi i/(\Omega-1)}$, which implies indefinite subharmonic oscillation with a period $\tau_{\textrm{osc}}=(\Omega-1)\tau_{\textrm{sig}}$. As discussed in Appendix \ref{appa}, it is also possible to obtain indefinite subharmonic oscillations with a period $\tau_{\textrm{osc}}=m\tau_{\textrm{sig}}$, where $m= 2,3,\ldots,\Omega-1$, by making simple changes to this protocol. Hence, the number of possible periods grows linearly with the number of states $\Omega$. The onset of such indefinite subharmonic oscillations in this particular limit can be understood if we consider the case $\Omega=3$ in Fig. \ref{fig2} (a similar explanation holds for general $\Omega$). Let us assume that before the first period the particle starts at state $1$. During the first part of the period the particle will jump to state $2$. During the second part of the period the particle will remain trapped in state $2$ since the transition rates to leave this state are slow in comparison to the external signal. During the third part of the period the particle jumps from state $2$ to state $3$. Hence, at the end of the first period the particle will be in state $3$. For the next period the particle starts at state $3$ and jumps during the middle interval to state $1$, where it stays trapped until the end of the period. Therefore, subharmonic oscillations with a period $\tau_{\textrm{osc}}=2\tau_{\textrm{sig}}$ take place, with the particle at state $3$ at the end of odd periods and at state $1$ at the end of even periods. In this peculiar limit, there is a perfect coupling between the dynamics of the system and the external signal that is deterministic, i.e., the system gets stuck in a state during each part of the period and transitions between states can only happen with a change of the protocol in the next part of the period. Clearly, this deterministic coupling is a general sufficient condition for the onset of subharmonic oscillations. For more complex models, we can imagine an effectively similar piecewise protocol that traps the system in some region of phase space in each part of the protocol. For such complex models, an observable that takes different values for these different regions of phase space will then display indefinite subharmonic oscillations. Hence, our model serves as a general guiding principle to obtain indefinite coherent subharmonic oscillations. \section{Relation between number of coherent oscillations and energy dissipation} \begin{figure} \includegraphics[width=72mm]{./Fig3.eps} \vspace{-2mm} \caption{Stroboscopic plot of the correlation function $C_{1,1}(t)$, which is the the probability to be in state $1$ at time $t$ given that the system started at state $1$. Parameters are set to $\Omega=145$, $k=600$, $\tau_{\textrm{sig}}=1$, and $c=10^6$. The result from the numerics is $\tau_{\textrm{osc}}\simeq 146\tau_{\textrm{sig}}$ and $R\simeq 2347$. In the discussion given in the main text $\tau_{\textrm{sig}}=1$ is set to $10$ minutes, which implies $k= 1 s^{-1}$, and thus leads to a period of subharmonic oscillations close to one day.} \label{fig3} \end{figure} We now compare this periodically driven system to an autonomous system, modeled as a Markov process with time-independent transition rates, showing coherent oscillations. Two factors that limit the number of coherent oscillations in such autonomous system are the number of states and energy dissipation \cite{bara17a}. In an autonomous system with $\Omega$ states, $\mathcal{R}\le \cot(\pi/\Omega)$, where $\mathcal{R}$ for an autonomous system is defined as the ratio of imaginary and real parts of the second largest eigenvalue associated with the Markov generator. In Fig. \ref{fig3}, we illustrate the fact that a fast periodic signal can increase the precision of oscillations on a slower time-scale beyond the limits that would be achievable in the absence of the signal. The period of the signal is set to $\tau_{\textrm{sig}}= 10$ minutes, from numerical evaluation we obtain that the period of subharmonic oscillations is $\tau_{\textrm{osc}}\simeq 1$ day and $\mathcal{R}\simeq 2347$. This number is much larger than the fundamental limit for an autonomous system with $\Omega=145$ states, which is $\mathcal{R}=\cot(\pi/145)\simeq 46$. \begin{figure} \includegraphics[width=77mm]{./Fig4.eps} \vspace{-2mm} \caption{Entropy change per period of oscillation as a function of $\mathcal{R}$ for an autonomous system $\Delta S_{\textrm{aut}}$ and a periodically driven system $\Delta S_{\textrm{min}}$, where $\Delta S_{\textrm{min}}$ is obtained with a numerical minimization over the parameters $c$ and $k$. The vertical dashed lines represent the bound for autonomous systems $\cot(\pi/\Omega)$.} \label{fig4} \end{figure} Let us now analyze the thermodynamic cost. In the limit where the model achieves indefinite subharmonic oscillations, energy differences have to be large, i.e., $\ln c\gg 1$. This condition implies that the entropy production that characterizes the thermodynamic cost diverges. The expression for the rate of entropy production \cite{seif12} \begin{equation} \sigma= \tau_{\textrm{sig}}^{-1}\int_0^{\tau_{\textrm{sig}}}dt\sum_{i,j}p_i^1(t)w_{ij}(t)\ln(w_{ij}(t)/w_{ji}(t)), \end{equation} where $p^1_i(t)=p^1_i(t+\tau_{\textrm{sig}})$ is the time-periodic distribution, leads to the amount of entropy change in one period of subharmonic oscillation as $\Delta S\equiv\sigma\tau_{\textrm{osc}}$. For the comparison of the trade-off between thermodynamic cost and $\mathcal{R}$ between our model and an autonomous system, we consider the following model for an autonomous system. A particle jumps on a ring with $\Omega$ states. The time-independent transition rates are given by $w_i^+=k\textrm{e}^{F/\Omega}$ and $w_i^-=k$, where $F=\ln\prod_{i=1}^{\Omega} [w_i^+/w_i^-]$ is the force that drives the autonomous system out of equilibrium. This particular choice of uniform rates $w_i^+$ and $w_i^-$ maximizes $\mathcal{R}$ for a fixed force $F$ \cite{bara17a}. For this model $\mathcal{R}=\cot(\pi/\Omega)\tanh(F/(2\Omega))$ and the thermodynamic cost of one period of oscillation is $\Delta S_{\textrm{aut}}\equiv \sigma\tau_{\textrm{osc}}= 2\pi F/[\Omega\sin(2\pi/\Omega)]$ \cite{bara17a}. In Fig. \ref{fig4}, we compare the thermodynamic cost per period that is required to obtain a certain number of coherent oscillations for both the periodically driven system and the autonomous system. For the periodically driven system, we have performed a numerical minimization of $\Delta S$ with the constraint that $\mathcal{R}$ is fixed. The free parameters in this minimization are $k$ and $c$. As expected, the amount of required thermodynamic cost increases with $\mathcal{R}$. In particular, for the periodically driven system the thermodynamic cost increases logarithmic with $\mathcal{R}$. For large enough $\mathcal{R}$ the required cost for the periodically driven system is smaller than the one for the autonomous system. This property is a consequence of the fact that the autonomous system is bounded by $\mathcal{R}\le \cot(\pi/\Omega)$ and this bound is reached at a limit of diverging thermodynamic cost, whereas the periodically driven system is not constrained by this bound. \section{Generic constraints} We finally discuss generic, model independent constraints on sub-harmonic oscillations. The mathematical properties of the fundamental matrix $\mathcal{M}$ in Eq. \eqref{eqfundmat} restrict the accessible region in the complex plane of the eigenvalue $\rho_2$. First this matrix is a stochastic matrix, i.e., all elements are positive and the sum of the elements in a column is $1$. Dmitriev and Dynkin \cite{dmit45,dmit46,swif72} have shown that the eigenvalue $\rho_2$ of such a stochastic matrix is constrained to lie in the regions plotted in Fig. \ref{fig5} for $\Omega=3$ and $\Omega=4$. \begin{figure} \includegraphics[width=77mm]{./Fig5.eps} \vspace{-2mm} \caption{Domain of the the possible eigenvalues $\rho_2$ for $\Omega=3$ and $\Omega=4$. The larger blue region represents the constraint on stochastic matrices obtained in \cite{dmit45,dmit46}. The yellow scatter plots were generated with random matrices that fulfill the constraint in Eq. \eqref{eqrest}. The region inside the smaller red line represents $\mathcal{R}\le \cot(\pi/\Omega)$. } \label{fig5} \end{figure} Second, the fundamental matrix $\mathcal{M}$ is an embeddable matrix \cite{good70,davi10}, which means that it must fulfill the constraint \begin{equation} 0\le\textrm{det}\mathcal{M}\le \prod_{i=1}^\Omega M_{ii}. \label{eqrest} \end{equation} To study the effects of Eq. \eqref{eqrest} on the eigenvalue $\rho_2$ we have generated random matrices that fulfill this constraint and calculated their eigenvalues numerically for $\Omega=3$ and $\Omega=4$. The results indicate that this condition lead to a region smaller than the region for general stochastic matrices, as shown in Fig. \ref{fig5}. In particular, the accessible region on the circle with $r=1$, where $\rho_2=r\textrm{e}^{i\theta}$, are the points $\rho= \textrm{e}^{2\pi i/m}$, where $m=2,3, \ldots, \Omega-1$. We have confirmed this result up to $\Omega=6$. This numerics suggests that for a stochastic system with $\Omega$ states and an indefinite number of sub-harmonic oscillations, the period of oscillation is given by $\tau_{\textrm{osc}}=m\tau_{\textrm{sig}}$, where $m=2,3, \ldots, \Omega-1$. Indeed these are the periods of subharmonic oscillations that we have obtained in our model. For an autonomous system corresponding to a continuous time Markov process with constant transition rates, we have $\mathcal{R}\le \cot(\pi/\Omega)$ \cite{bara17a}. This restriction leads to the smaller regions shown in Fig. \ref{fig5}. \section{Conclusion} In summary, we have shown that, in principle, subharmonic oscillations in a finite, periodically driven system subjected to thermal noise can survive for an arbitrarily long time. In contrast to autonomous systems, the number of states does not impose any fundamental constraint on the maximal number of coherent oscillations. We have analyzed the trade-off relation between the number of coherent oscillations and energy dissipation for our model, showing that an increase in energy dissipation can lead to a larger number of coherent oscillations and that a periodically driven system can achieve the same number of coherent oscillations with a smaller energy budget compared to an autonomous system. Our work raises a few fundamental questions related to the relation between thermodynamics and subharmonic oscillations in periodically driven systems. Is a diverging rate of energy dissipation that we found in our model a necessary condition to achieve the formal limit of indefinite subharmonic oscillations? What are the optimal protocols that minimize energy dissipation for a given number of coherent oscillations? What is the minimal energy budget for a given number of coherent oscillations? Furthermore, analyzing the thermodynamics of stochastic models for time-crystals, such as the one introduced in \cite{yao18}, is an interesting direction for future work. The deterministic coupling leading to indefinite oscillations introduced here can be helpful to build such models. Concerning biochemical oscillations, we have introduced the idea that a fast periodic signal can dramatically improve the coherence of oscillations with a longer period. Understanding under which conditions this feature takes place in more realistic and complex models for biochemical oscillations under the influence of such a signal is an appealing future step. This idea could, in principle, be used to build precise synthetic biochemical oscillators in an experimental setup where the system is under the influence of a periodic signal. Furthermore, an experimental verification of a large number of coherent subharmonic oscillations in a periodically driven finite system with thermal fluctuations could be realized with laser-induced modulated energy landscapes for a driven colloidal particle, see e.g. \cite{curt02,blic07,mart16a,loza16,Gavr17}, by mimicking the simple model we have used as a proof of concept. \begin{figure*}[h] \includegraphics[width=1.\textwidth]{./prot_5.eps} \caption{Three different protocols for $\Omega=5$ states. (a) Protocol in the main text with $\tau_\mathrm{osc}=4\tau_\mathrm{sig}$. (b) Protocol with $\nu=1$ anticlockwise steps, which leads to $\tau_\mathrm{osc}=3\tau_\mathrm{sig}$. (c) Protocol with $\nu=2$ anticlockwise steps, which leads to $\tau_\mathrm{osc}=2\tau_\mathrm{sig}$. On the right, the respective correlation function $C_{1,1}(t)$, which is the probability to be in state $1$ given that initially the particle was in state $1$, obtained from numerical simulations for $k=100$, $k_1=10^{-4}$, $k_2\approx 1.6\cdot 10^{-3}$ and $\tau_\mathrm{sig}=1$.} \label{fig:prot_5} \end{figure*}
\section{Introduction} After the successful quest for preparing and measuring single quantum particles (see for example \cite{HarocheNobel,WinelandNobel}), the next task is to achieve the same kind of control over quantum systems with increasing degrees of complexity. This will further advance our understanding of fundamental quantum mechanics and is also predicted boost the possibilities offered by modern quantum technologies. However, due to the exponential increase of the size of the Hilbert space for many particle systems, this is a formidable task in which theoretical and experimental progress must go hand in hand, assisting each other to facilitate scientific accomplishments. Cold atomic systems have been at the forefront of this quest for the last two decades and by today a large effort into understanding few particle systems exists theoretically and experimentally \cite{1DReviewMAGM}. However, the experimental challenge is still very large and especially measuring small systems reliably remains as an arduous quest. One strategy to mitigate these are to take advantage of experimental simulators, which are setups that are easier to control but follow the same dynamics as the original system. For quantum mechanical systems one can exploit the well-known similarity between the matter wave nature of particles and classical wave optics, which is based on the fact that the paraxial wave equation for monochromatic light propagating along the paraxial direction $z$ of an optical waveguide is of the same form as the Schr\"odinger equation. This similarity has been exploited in many examples in the past~\cite{nienhuis_paraxial_1993,chavez-cerda_quantumlike_2007,2008LonguiLPR}, however mostly for single particle dynamics. \begin{figure}[tbp] \centering \includegraphics[width=0.99\columnwidth]{Fig1} \caption{Schematic of the system. (a) Three interacting atoms in a one-dimensional harmonic trap. (b) Representation of the refractive index in the $x-y$ plane. (c) Schematic of the fiber. \label{fig:fig1} } \end{figure} Here we consider a one-dimensional quantum system of three harmonically trapped atoms interacting through a strong, short-range potential and show that an analogy with a graded-index (GRIN) optical fiber with three thin slabs of a metallic material in an hexagonal geometry exists (see Fig.~\ref{fig:fig1}). The paraxial propagation of a polarized monochromatic laser beam in such a fiber is described by a wave propagation equation which is Schr\"odinger-like and often called the Fock-Leontovich equation~\cite{fedele_beam_2003,manko_analogs_2008}. The longitudinal dimension along the fiber plays the role of time and the inhomogeneous refractive GRIN index profile of the fiber plays the role of an external potential. We will show below that the thin metallic slabs can play the role of the contact interactions between the atoms and that by properly designing the spatial profile of the incident laser beam it is possible to select the statistics of the atoms emulated, that is, if they resemble bosons, fermions, or mixtures. We emphasize here that the characterization of the modes guided by the GRIN fiber with three thin metallic slabs is of interest in itself for the optics community, independently of the analogy with the quantum system of three atoms. Graded-index fibers are multimode fibers, that is, they can propagate several modes~\cite{1973Gloge,Sodha1977,Snyder1983}. There is a recent revival in the interest in these kinds of fibers, as they have been identified as very versatile systems to study spatio-temporal non-linear effects~\cite{Longhi2003,2012Mafi}. A non-comprehensive list of recent works include the observation of optical solitons and soliton self-frequency lifting~\cite{Renninger2013}, the generation of ultrashort pulses and even supercontinuum~\cite{Wright2015}, or beam self-cleaning~\cite{Wright2016,Krupa2017}. However, the description of pulse propagation in these fibers is rather difficult, as it must include both the three spatial dimensions and time to correctly capture the non-linear dynamics of multiple co-propagating modes (for a simplified model see~\cite{Conforti2017}). Yet, GRIN fibers represent an ideal set-up for a variety of phenomena in complexity science, due to the collective dynamics associated with the interplay between disorder, dissipation, and non-linearity~\cite{Wright2016}. Here we do not consider spatio-temporal dynamics or non-linearities, as we detail later. However, multimode GRIN fibers with thin metallic slabs allow for both to be included in future work. As our model is an example of an analogy between a classical and a quantum system, an inferred property for the target optical system from the source quantum system is the existence of classical entanglement~\cite{1998SpreeuwFoP,spreeuw_classical_2001,2014GhoseRTS,2019KorolkovaRPP}. Classical entanglement occurs in a wide variety in optical systems, is not restricted to those described by the Fock-Leontovich equation, and often includes polarization degrees of freedom~\cite{aiello_quantumlike_2015,2009LuisOC}. It has been proposed that a better name for this property is {\it classical non-separability}~\cite{2015KarimiScience}, because the classical target system lacks the potential non-locality of quantum systems with entanglement~\cite{2009LuisOC}. It is also worth stressing that classical entanglement cannot be used as a resource for applications in quantum information theory. In our system non-locality is associated with a measurement of an entangled system, which when taken in one region of space dictates the outcome in another region. In this sense one can distiniguish two types of entanglement~\cite{1998SpreeuwFoP,spreeuw_classical_2001,harshman_tensor_2007,aiello_quantumlike_2015}: (i) intersystem entanglement (or true-multiparticle entanglement) and (ii) intrasystem entanglement (between different degrees of freedom of a single particle). It is commonly accepted that intersystem entanglement can only occur in quantum systems as it can lead to non-locality. The examples of classical non-separability found in literature are mostly associated with two different degrees of freedom of the same particle, and a remarkable realization classically non-separable states with three degrees of freedom were done using path, polarization and transverse modes~\cite{2016BalthazarOL}. Below we show how in the system we introduce here classical non-separability between different particles occurs in a scalar system. In this sense it is an analogous to type (i) entanglement (intersystem), but as the measurement problem remains, it does not lead to non-locality. We note that there is a set of works where the goal is to use classical fields to reproduce non-classical correlations between different measurements~\cite{lee_experimental_2002,fu_classical_2004,2004LeePRA,2018DeZelaOptica}, including simulations of Bell-like inequalities~\cite{2015StoklasaNJP,2015QianOptica}. Our manuscript is structured as followed. In Section~\ref{sec:fiber} we detail the characteristics of the fiber under study. We perform a full modal analysis of it and classify the modes according to the rotational discrete symmetry of the system. The analogy with the atomic system is constructed in Section~\ref{sec:analogy} and we show how the wave function can be interpreted as giving information of the ordering of the particles. In Section~\ref{sec:classnonsep} we discuss the non-separability of the classical states and in Section~\ref{sec:conclusions} we conclude by laying out possible applications and further developments of this system. Two appendixes provide supplementary details about the symmetry methods we employ and about the Bose-Fermi mapping. \section{Optical system: GRIN fiber with three thin metallic slabs} \label{sec:fiber} The paraxial propagation of a monochromatic optical beam of constant polarization along a fiber with an inhomogeneous refractive index profile is given by \begin{equation} \label{intro1} -i2n_{0}k_{0}\frac{\partial}{\partial \tilde z}\tilde{\Phi} =\left[\nabla_{t}^{2}+k_{0}^{2}\left(\tilde n^{2}\left(\tilde x,\tilde y\right)-n_{0}^{2}\right)\right]\tilde{\Phi}, \end{equation} where $\tilde z$ is the axial coordinate of the fiber, $\{\tilde x,\tilde y\}$ are the transverse coordinates, $\nabla_{t}^{2}$ is the Laplacian in the transverse coordinates, $\tilde n(\tilde x,\tilde y)$ is the index of refraction profile with a reference value of $n_{0}$, and $k_{0}$ is the wave number. To facilitate comparison with the Schr\"odinger equation, we remove the length units by dividing by $-2n_{0}k_{0}^{2}$ \begin{equation} \label{intro2} i\frac{\partial}{\partial z} \Phi=\left(-\frac{1}{2}\nabla_{x,y}^{2}+\Delta n\left(x,y\right)\right) \Phi, \end{equation} where, $\{ x, y, z\}$ are the dimensionless coordinates $x =k_{0}\sqrt{n_{0}} \tilde x$, $y =k_{0}\sqrt{n_{0}} \tilde y$, $z =k_{0} \tilde z$, $\Phi(x,y,z) = \tilde\Phi(\tilde{x},\tilde{y},\tilde{z})$, $n(x,y) = \tilde{n}(\tilde{x},\tilde{y})$ and \begin{equation} \label{eq:delta_n2} \Delta n\left(x,y\right)=[n_{0}^{2} - n^{2}\left(x,y\right)]/2n_{0}. \end{equation} When the refractive index profile remains close to the reference index $n_0$, eq.~(\ref{eq:delta_n2}) simplifies to $\Delta n\left(x,y\right) \approx n_{0} - n\left(x,y\right)$. The form of eq.~\eqref{intro2} mimics the two-dimensional time-dependent Schr\"odinger equation with $z$ playing the role of time and $\Delta n\left(x,y\right)$ the role of a potential energy. Making the substitution $\Phi(x,y,z) = \exp(-i \mu z) \phi(x,y)$ to separate the longitudinal and transverse coordinates, one can see that solving for the transverse optical modes $\phi(x,y)$ and paraxial propagation constant $\mu$ is equivalent to solving for the energy spectrum of a quantum Hamiltonian with two degrees of freedom \begin{equation}\label{eq:optschr} \hat{H} \phi(x,y) \equiv \left(-\frac{1}{2}\nabla_{x,y}^{2}+\Delta n\left(x,y\right)\right)\phi(x,y) = \mu \phi(x,y). \end{equation} This analogy between fiber optics in the paraxial approximation and two-dimensional quantum mechanics is well-known (see e.g. \cite{krivoshlykov_optical_1980}) and eq.~\eqref{intro2} is indeed sometimes called the optical Schr\"odinger equation~\cite{joseph_effect_2015}. Here, we assume a longitudinally homogeneous fiber; relaxing this requirement allows the simulation of quantum systems with time-varying mass or potential. \subsection{GRIN fiber optical modes} We build our effective potential for the analogy by combining GRIN fibers with metallic sectioning. A GRIN fiber has a refractive index $n\left(x,y\right)$ that decreases continuously with the radial distance to the optical axis of the fiber. Here we consider the particular case of a parabolic profile that focuses the beam and provides guidance in the fiber (also called selfoc fibers~\cite{manko_analogs_2008}), i.e. \begin{equation} \label{eq:refractiveindexG} \Delta n_{\rm{GRIN}}\left(x,y\right)\!= \left\{\begin{array}{cc} \frac{1}{2}\!\left(x^2+y^2\right) & \rho <R\\ \frac{1}{2}R^2 & \rho \ge R \end{array}\right., \end{equation} where $\rho=\sqrt{x^2+y^2}$. These kinds of GRIN fibers have previously been proposed to simulate two-dimensional quantum oscillators~\cite{nienhuis_paraxial_1993,manko_quantum_2001}. For a fiber with transverse index $\Delta n_{\rm{GRIN}}$, eq.~(\ref{intro2}) is separable into radial $\rho = \sqrt{x^2+y^2}$ and polar $\theta =\arctan(y/x)$ coordinates. The boundary at $\rho = R$ can be ignored for the lowest modes and in this approximation the optical Schr\"odinger equation (\ref{eq:optschr}) describes a two-dimensional isotropic harmonic oscillator. Separating in polar coordinates, the corresponding solutions for the mode functions in polar coordinates $|\ell,\nu\rangle$ are given by \begin{equation} \label{eq:l,nrho} \phi_{\ell,\nu}(\rho,\theta)=N \rho^{|\ell|} L^{|\ell|}_{\nu}(\rho^2) e^{-\rho^2/2}e^{i\ell\theta}, \end{equation} with $L^{|\ell|}_{\nu}(z)$ the generalized Laguerre polynomial and normalization constant $N=\sqrt{\nu!/\pi(\nu+|\ell|)!}$. These modes (\ref{eq:l,nrho}) correspond to Laguerre-Gaussian modes centered at the origin and the mode indices correspond to orbital angular momentum (OAM) $\ell=0,\pm 1,\pm 2,\cdots$ and the number of radial nodes $\nu=0,1,\cdots$. The OAM $\ell$ gives the charge of the central singularity and is the quantum number for the $\mathrm{O}(2)$ symmetry of the isotropic oscillator. The propagation constant (analogous to energy) of the mode $|\ell,\nu\rangle$ is $\mu = 2 \nu +|\ell| +1 $ and except for the lowest mode $|\ell,\nu\rangle = |0,0 \rangle$, all modes are degenerate with degeneracy $d(\mu) = \mu$. \subsection{GRIN fiber and metallic slabs} Next, we section the fiber longitudinally with thin slabs of metal. For later applications to three-particle systems, we consider the case of three slabs that split the fiber into six identical sectors (see Fig.~\ref{fig:fig1}). This is described by adding to $\Delta n_{\rm{GRIN}}$ an additional term formed by three Gaussians of width $\sigma$ \begin{align} \label{eq:refractiveindexC6} \Delta n_{\mathcal{C}_{6v}}\left(x,y\right)\!=\!\frac{g}{\sigma\sqrt{2\pi}}\!\Bigg\{&\exp\!\left[-\frac{x^2}{\sigma^2}\right] +\exp\!\left[-\frac{(x + \sqrt{3}y)^2}{4\sigma^2}\right]\nonumber\\ &\left.+\exp\!\left[-\frac{(x - \sqrt{3}y)^2}{4\sigma^2}\right]\right\}. \end{align} The function $\Delta n_{\mathcal{C}_{6v}}\left(x,y\right)$ has three maxima at the lines $x=0$ and $x=\pm\sqrt{3}y$, or equivalently at $\theta \in \{ \pi/6, \pi/2, 5\pi/6, 7\pi/6, 3\pi/2, 11\pi/6\}$. The exact form of $g$ in (\ref{eq:refractiveindexC6}) in terms of the optical parameters is crucial in the particle analogy in Section~\ref{sec:analogy} and after restoring the spatial dimensions for $\tilde{\sigma}=\sigma\,\lambda$, one obtains \begin{equation} \label{eq:analogyparameters} g=\frac{\Delta n^{\rm{max}}_{C_{6v}}(\lambda) \,\sqrt{2\pi}\tilde{\sigma}}{\lambda}. \end{equation} In this work we are mainly interested in the limit where $g$ is large. Because the right hand side of eq.~\eqref{eq:analogyparameters} includes only dimensional optical parameters, the large-$g$ limit can be reached experimentally with thin slabs of a metallic material of width $\tilde{\sigma}$. For a perfect conductor $n^2_{\rm{metal}}\to-\infty$ and therefore $ \Delta n^{\rm{max}}_{C_{6v}}=(n_0^2 - n^2_{\rm{metal}})/2n_0$ and consequently $g$ tends to infinity. One has to be careful though, as in the experimentally relevant case with a realistic metal, the dielectric constants also have an imaginary part, i.e., $\varepsilon=\varepsilon_1+ i\varepsilon_2$ and, for example, for gold at $\lambda=1500$nm, one has $\varepsilon_1 = -106.94$ and $\varepsilon_2 = 10.231 $. However, for the limit in which $g$ is large and $\tilde{\sigma}$ small the losses due to the imaginary part are small because in the regions with large $g$ the optical modes have suppressed intensity, as we show later. Combining the thin slabs of a metal with the GRIN fiber, the total refractive index is $\Delta n_{\rm{tot}} = \Delta n_{\rm{GRIN}} + \Delta n_{C_{6v}}$. The fiber then has six identical symmetric domains $\Omega_j$ ($j\in\{1,\ldots,6\}$) where $\Delta n_{\rm{GRIN}}$ dominates separated by the thin barriers where $\Delta n_{C_{6v}}$ dominates. This fiber profile has the six-fold symmetry of a snow flake denoted as $C_{6v}$ Sch\"onflies notation~\cite{hamermesh_group_1989}; see Appendix A for a summary of the group $C_{6v}$ and its representations~\footnote{The symmetry $C_{6v}$ is also denoted as the $D_6$ or $I_2(6)$ depending on context or application. More generally, if there are $s$ bisecting metal slabs inserted evenly, then the system has $C_{2sv}$ (aka $D_s \sim I_2(2s)$) symmetry.}. \begin{figure}[t] \centering \includegraphics[width=0.95\columnwidth]{Fig2} \caption{Eigenenergies (propagation constant) for the optical Schr\"odinger equation (\ref{eq:optschr}) with $\Delta n_{\rm{tot}} = \Delta n_{\rm{GRIN}} + \Delta n_{C_{6v}}$ plotted against varying barrier strength $g$ for a fixed, narrow width $\sigma$. The shaded golden area highlights the region of large values of $g$, where the thin metallic slabs can be implemented with e.g. gold, as discussed in main text. The shaded green area highlights the region of low $g$, which has a weak $\Delta n_{\mathcal{C}_{6v}}$ refractive index that could be implemented with dielectric materials. Inset and the right of the graph depicts the eigenmodes corresponding to the lowest seven modes (see Figs.~\ref{fig:fig3} and \ref{fig:fig4}). In all representations of the eigenmodes, the dotted lines indicate the position of the metallic slabs. \label{fig:fig2} } \end{figure} Since the barriers break the $\mathrm{O}(2)$ rotational symmetry, the angular variation of the wave function is no longer uniform and as a result orbital angular momentum $\ell$ is no longer a good modal index. Additionally, for arbitrary strengths and widths, the barriers break polar separability so $\nu$ is also not a good quantum number. However, the discrete $C_{6v}$ symmetry provides the possibility for alternate modal numbers~\cite{mcisaac_symmetry-induced_1975,guobin_mode_2003}. One useful index is called orbital angular pseudo-momentum (OAPM) and was introduced in the context of vortex solitons~\cite{ferrando_discrete-symmetry_2005,garcia-march_angular_2009}. OAPM is a discrete index $m \in \{ 0, \pm 1, \pm 2, 3\}$ that identifies how the state transforms under a discrete rotation by $\pi/3$ and it gives the charge of the central singularity~\cite{garcia-march_symmetry_2009}. In the subspace of solutions with OAPM $m$, a counterclockwise rotation by $\pi/3$ changes the phase of the optical mode $\phi(\rho,\theta)$ by $\exp(i m \pi/3)$. In the case $m=0$ the mode is symmetric with respect to $C_{6v}$ and there is no phase change from sector to sector, and when $m=3$ the mode is antisymmetric with respect to $C_{6v}$ and the phase flips from sector to sector. Previewing the analogy with the one-dimensional, three-body system developed in the next section, the OAPM correlates to the particle content. The modes indexed by $m=0$ and $m=3$ correspond to three indistinguishable bosons or fermions. Another mode index, the reflection parity $r = \pm 1$ under reflection across the thin slab oriented along $x=0$ or $\theta = \pm \pi/2$, indicates whether particles with OAPM $m=0$ or $m=3$ are bosons or fermions. The cases of OAPM $m=\pm 1$ and $m= \pm 2$ contain solutions that describe identical but \emph{partially} distinguishable particles, such as two spin-up fermions and one spin-down fermion. \subsection{Infinite delta-barrier limit} \begin{figure}[t] \centering \includegraphics[width=0.8\columnwidth]{Fig3} \caption{Numerical eigenfunction solutions for $g = 10$, $\sigma=0.05$ and $R\to\infty$; compare to infinite delta-barrier solutions $|m,\tilde{\nu},\tilde{\ell}\rangle$ in (\ref{eq:m,nrho,ntheta}). (a) Ground state, $|m,\tilde{\nu},\tilde{\ell}\rangle=|0,0,0\rangle$. (b) seventh state, $|m,\tilde{\nu},\tilde{\ell}\rangle=|0,1,0\rangle$, which carries the first radial excitation of the ground state; (c) and (d) amplitude and phase of the vortex state $|1,0,0\rangle$; (e) and (f) same for vortex state $|2,0,0\rangle$. (g) sixth excited state, $|m,\tilde{\nu},\tilde{\ell}\rangle=|3,0,0\rangle$; and (h) eighteenth state, $|m,\tilde{\nu},\tilde{\ell}\rangle=|0,0,1\rangle$. \label{fig:fig3} } \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.85\columnwidth]{Fig4} \caption{Eigenfunctions for $g = 10$ and $\sigma=0.05$. (a) and (b), first excited doublet obtained combining the vortices with $m=1$ and $m=-1$, that is, $ |1,0,0\rangle\pm i |-1,0,0\rangle$, respectively. (c) and (d), second excited doublet obtained as $ |2,0,0\rangle\pm i |-2,0,0\rangle$, respectively. \label{fig:fig4} } \end{figure} In the limit of infinitely narrow slabs $\tilde{\sigma} \to 0$, the Gaussian profiles in (\ref{eq:refractiveindexC6}) tend to delta functions and can be approximated as \begin{align} \label{eq:refractiveindexC6-delta} \Delta n_{C_{6v}}\!&\approx\! g\left[\delta(x) + \sqrt{2}\delta(x + \sqrt{3}y) + \sqrt{2}\delta(x - \sqrt{3}y)\right]\nonumber\\ &=\frac{g}{\rho}\sum_{j=1}^6\delta\left(\theta-\frac{2j-1}{6}\right). \end{align} Note that the apparent singularity at $\rho=0$ is not strong enough to disrupt the self-adjointness of the effective Hamiltonian and there is no danger of ``falling to the center''~\cite{landau_chapter_1977}. However, the potential in (\ref{eq:refractiveindexC6-delta}) does not have the correct form for polar separability for arbitrary $g$; only in the limit of impenetrable barriers $g \to \infty$ does polar separability return and we can provide exact solutions. In the narrow, impenetrable barrier limit, each identical sector $\Omega_j$ is dynamically-isolated from the rest and within each sector approximate polar separability returns. This means the number of radial nodes by $\tilde{\nu}$ and the number of azimuthal nodes $\tilde{\ell}$ \emph{within each sector} are good mode labels (or quantum numbers). Choosing $\Omega_1 = [-\pi/6 , \pi/6]$ as the first sector, the optical mode solutions are \begin{equation}\label{eq:idealsector} \phi^{1}_{\tilde{\nu},\tilde{\ell}}(\rho,\theta)=N\rho^{\tilde{\ell}}L^{\tilde{\ell}}_{\tilde{\nu}}(\rho^2) e^{-\rho^2/2}\sin[3(\tilde{\ell}+1)(\theta+\pi/6)]. \end{equation} This equation satisfies the optical Schr\"odinger equation for a GRIN fiber (i.e., it is a special case of (\ref{eq:l,nrho})) and also satisfies the nodal boundary condition at the sectioning metal slabs when $\tilde{\nu}$ and $\tilde{\ell}$ are non-negative integers. By analogy with (\ref{eq:l,nrho}) or by direct calculation, one shows the propagation constant of this mode is $\mu = 2 \tilde{\nu} + 3\tilde{\ell} + 4$. The mode solutions in the entire fiber can be built by using the OAPM $m$ to patch together single sector solutions like (\ref{eq:idealsector}) with the correct phase differences. An explicit expression for the mode $|m, \tilde{\nu},\tilde{\ell}\rangle$ built from sectors with $\tilde{\nu}$ radial nodes and $\tilde{\ell}$ azimuthal modes takes the form \begin{equation} \label{eq:m,nrho,ntheta} \phi_{m,\tilde{\nu},\tilde{\ell}}(\rho,\theta)=\phi^{1}_{\tilde{\nu},\tilde{\ell}}\left(\rho,\theta - \theta_j\right) e^{-im \theta_j}\ \mbox{for}\ \theta\in\Omega_j \end{equation} where $\theta_j = (j-1)\pi/3$ and $\Omega_j = [(2j-3)\pi/6 , (2j-1)\pi/6]$. The six ways to choose the relative phases and paste the section functions together such that the state respects $C_{6v}$ symmetry are precisely the six possible values the OAPM $m$ takes: $m=0,\pm1,\pm2$ and $3$. The six states $|m, \tilde{\nu},\tilde{\ell}\rangle$ with the same $\tilde{\nu}$ and $\tilde{\ell}$ are degenerate and have the same propagation constant $\mu = 2 \tilde{\nu} + 3\tilde{\ell} + 4$ independent of OAPM $m$. In this limit, the effective Hamiltonian is superintegrable, i.e.~there are more integrals of motion than degrees of freedom~\cite{andersen_hybrid_2017}. This degeneracy is only present in the idealized case of delta-barriers and infinite $g$. For both the idealized finite-$g$ delta-barrier potential (\ref{eq:refractiveindexC6-delta}) and the more realistic Gaussian potential (6), the tunneling among sectors lifts the degeneracy so that states with different $|m|$ have different propagation constants. To show how this works, we calculated numerically the eigenfunctions in the presence of the metal slabs of height $g=10$, width $\sigma=0.05$, and $R$ larger than the size of the computational domain (a box of side $L=10$). As shown in Fig.~\ref{fig:fig2}, in this limit the six modes with different $m$ and same $\tilde{\nu}$ and $\tilde{\ell}$ are quasi-degenerate and approximate the infinite delta-barrier solutions (\ref{eq:m,nrho,ntheta}). A selection of modes are depicted in Fig.~\ref{fig:fig3}, including \ref{fig:fig3}(a) the ground state mode $|0,0,0\rangle$; \ref{fig:fig3}(b) the lowest energy state mode with one radial excitation $|0,1,0\rangle$; and \ref{fig:fig3}(h) the highest energy state mode with one polar excitation $|0,0,1\rangle$. Subfigures \ref{fig:fig3}(c)-\ref{fig:fig3}(g) depict three other modes with $\tilde{\nu}=0$ and $\tilde{\ell}=0$. The $C_{6v}$ symmetry ensures that pairs of modes with $|m|=1$ and with $|m|=2$ are degenerate, so we only depict the magnitude and phase of the $m=1$ in \ref{fig:fig3}(c)-\ref{fig:fig3}(d) and the magnitude and phase of $m=2$ in \ref{fig:fig3}(e)-\ref{fig:fig3}(f). Because these modes are degenerate, instead of working with the complex modes $|\pm 1,\tilde{\nu},\tilde{\ell}\rangle$ and $|\pm 2,\tilde{\nu},\tilde{\ell}\rangle$ we can take take linear combinations such as $|1,\tilde{\nu},\tilde{\ell}\rangle \pm i |-1,\tilde{\nu},\tilde{\ell}\rangle$ that result in real modes. Examples are presented in Fig.~\ref{fig:fig4} that show that these real modes are no longer OAPM eigenstates of $\pi/3$ rotations, but they diagonalize into a pair of orthogonal reflections and have $C_{2v}$ symmetry. \section{Optical analogy to the three-particle model} \label{sec:analogy} In this section, we show how the fiber introduced above can be used to simulate a specific quantum system of current interest in ultracold atomic physics: three interacting atoms trapped in a one-dimensional harmonic potential with strong, short-range interactions (see e.g. the striking experiments in~\cite{2011Serwane,2013Wenz}). We also show that the optical modes of the fiber can simulate the wave functions of energy eigenstates for any particle statistics, including single-species and multi-species fermions and bosons. For this the OAPM modal number $m$ and reflection parity $r$ play the role of effective statistical parameter. \subsection{The three particle Hamiltonian} To see that the optical Schr\"odinger equation for the fiber above can simulate a three-body, one-dimensional system, let us start by considering the quantum Hamiltonian for three interacting particles in a one dimensional harmonic trap \begin{equation} \label{model31} H = \frac{\hbar \omega}{2} \sum_{i=1}^3 \left( -\frac{d^2}{dx_i ^2}+ x_i^2 \right) + \sum_{i<j} V_{ij}\left(|x_i - x_j|\right). \end{equation} For convenience, we have scaled all distances by the harmonic oscillator length $a = \sqrt{\hbar/(m \omega)}$ and the coordinates $x_i$ are the unitless positions of the three particles. The two-body interaction depends only on the distance between pairs of particles. Next we perform a transformation from the particle positions coordinates to the normalized Jacobi coordinates \begin{align}\label{jacobi} R&=\frac{x_1+ x_2 + x_3}{3},\\ x&=\frac{x_1-x_2}{\sqrt{2}},\\ y&=\frac{x_1+x_2}{\sqrt{6}}-\sqrt{\frac{2}{3}}x_3, \end{align} where $R$ is proportional to the center-of-mass and $x$ and $y$ are a specific but arbitrary choice for the orientation of three-body relative coordinates. With this, the Hamiltonian in eq.~\eqref{model31} can be split into a center-of-mass and a relative part, $H=H_\mathrm{cm}+H_\mathrm{rel}$, with \begin{subequations} \begin{align} H_\mathrm{cm}=&-\frac{\hbar\omega}{2}\frac{d^2}{dR^2}+\frac{\hbar\omega}{2} R^2\,,\label{model34_COM}\\ H_\mathrm{rel}=&-\frac{\hbar\omega}{2}\left(\frac{d^2}{dx^2}+\frac{d^2}{dy^2}\right)+\frac{\hbar\omega}{2} (x^2+y^2) + V_\mathrm{int}(x,y)\,,\label{model34_rel} \end{align} and \begin{align} V_\mathrm{int}(x,y)= V_{12}\left(\sqrt{2} |x|\right) + &V_{13}\left(\!\frac{|x \!+\! \sqrt{3}y|}{\sqrt{2}}\!\right) \nonumber\\ &+ V_{23}\left(\!\frac{|x \!-\! \sqrt{3}y|}{\sqrt{2}}\!\right). \end{align} \end{subequations} This transformation therefore separates out the trivial center-of-mass degree of freedom whose dynamics are described by the one-dimensional oscillator $H_\mathrm{cm}$. The remaining two relative degrees of freedom are described by $H_\mathrm{rel}$ that has the same six-fold symmetry of the previous section. If we now take $V_{ij}$ to be given by a narrow Gaussian \begin{equation} V_{ij}(z) = \frac{g}{\sigma\sqrt{2\pi}} \exp\!\left[-\frac{z^2}{2\sigma^2}\right], \end{equation} we recover the effective Hamiltonian given by the fiber mode propagation equation of the previous section with $\Delta n_{\rm{tot}} = \Delta n_{\rm{GRIN}} + \Delta n_{C_{6v}}$ and all the analysis of the previous section holds. In the limit of highly localized and strong scattering potentials, the modes $|m,\tilde{\nu},\tilde{\ell}\rangle$ become exact and all six states with the same $\tilde{\nu}$ and $\tilde{\ell}$ become six-fold degenerate again. \subsection{Particle permutation symmetry, OAPM and particle statistics} Like the metallic slabs section the fiber into six sectors, the two-body interactions section the $(x,y)$ relative configuration space of the three particles into six sectors. Each section corresponds to the particles being in a specific order (see Fig.~\ref{fig:Fig5}). In a model with distinguishable particles, the phase relation between different orderings of particles is unconstrained. In contrast, three identical bosons must be symmetric under a particle exchange and three identical fermions must be antisymmetric. As a result, sectors corresponding to different orders must have specific phase relations if they are to represent the solutions of identical particles. Conveniently, the OAPM $m$ and reflection parity $r$ that derive from the $C_{6v}$ symmetry can be used as parameters that account for particle statistics~\cite{garcia-march_distinguishability_2014}. In the original Hamiltonian (\ref{model31}), the particle permutation symmetry is evident: one can permute the coordinates $(x_1,x_2,x_3)$ without changing the form of the Hamiltonian. The group of particle permutations is called $S_3$ and we denote the operators that represent these transformations by $\hat{\sigma}_p$ for $p\in S_3$. For example, the operator $\hat{\sigma}_{213}$ exchanges particles 1 and 2, the operator $\hat{\sigma}_{312}$ cycles $(x_1,x_2,x_3)$ into $(x_3,x_1,x_2)$, and the operator $\hat{\sigma}_{123}=\hat{e}$ is the identity. Additionally, the parity inversion $(x_1,x_2,x_3) \rightarrow (-x_1,-x_2,-x_3)$ leaves the Hamiltonian invariant. We denote the parity inversion operator by $\hat{\pi}$ and the two-element group it generates by $Z_2$. Because parity inversion and particle permutations commute, the total symmetry group is the direct product $S_3 \times Z_2$; see Appendix A for an enumeration of all twelve elements of this symmetry group. When restricted to the relative plane, the particle permutations and parity are realized as the transformations in $C_{6v}$. For example, the pairwise exchange $\hat{\sigma}_{213}$ is the reflection across $x=0$ that maps $(x,y)$ into $(-x,y)$. The other two pairwise exchanges $\hat{\sigma}_{321}$ and $\hat{\sigma}_{132}$ are also realized as reflections in the relative $(x,y)$-plane along the lines $x=-\sqrt{3}y$ and $x=\sqrt{3}y$, respectively. The two three-cycles $\hat{\sigma}_{312}$ and $\hat{\sigma}_{231}$ are rotations by $+2 \pi/3$ and $-2 \pi/3$, respectively, and parity $\hat{\pi}$ is a rotation by $\pi$. Finally, combining parity $\hat{\pi}$ and the three-cycle $\hat{\sigma}_{231}$, the symmetry transformation $\hat{c}_6 = \hat{\pi}\hat{\sigma}_{231}$ is a rotation by $+\pi/3$. Therefore by looking at how optical modes transform under the reflections and rotations in $C_{6v}$, we also analyze how the analogous three-particle wave function transforms under particle permutations and parity $S_3 \times Z_2$. In fact, the mode numbers OAPM $m\in\{0,\pm 1, \pm 2, 3\}$ and reflection parity $r$ introduced in the previous section are the eigenvalues of the operators $\hat{c}_6$ and $\hat{\sigma}_{213}$, respectively. Using them we build a classification of particle statistics as follows: \begin{itemize} \item The energy subspaces with $(m,r)=(0,1)$ or $(3,1)$ are non-degenerate modes with the requisite symmetry to realize states of three indistinguishable bosons, denoted BBB modes. These states also could represent identical but distinguishable particles. \item The energy subspaces with $(m,r)=(0,-1)$ or $(3,-1)$ are also non-degenerate. These wave functions have the requisite symmetry to be states of three indistinguishable fermions, denoted FFF modes. As before, these states also could represent identical but distinguishable particles. \item The energy subspaces labelled by $|m|= 1$ or $|m|= 2$ correspond to doubly-degenerate modes. In these two-dimensional subspaces, the operators $\hat{c}_6$ and $\hat{\sigma}_{213}$ do not commute and the OAPM $m$ and reflection parity $r$ cannot be simultaneously diagonalized. Choosing to diagonalize $\hat{\sigma}_{213}$ within the $|m|= 1$ or $|m|= 2$ subspace, there are superpositions that describe states with $r=1$ that are symmetric under exchanges of particles 1 and 2, but have no fixed phase relation for a pairwise exchange including particle 3. We call this a BBX mode, because it can describe the state of two identical bosons and one distinguishable third particle. Similarly, there are FFX modes where the exchange of two identical fermions is antisymmetric with $r=-1$ and the third particle is distinguishable. \end{itemize} Additionally, from the relation between parity inversion and six-fold rotation $\hat{\pi} = (\hat{c}_6)^3$, states with OAPM $m$ have parity inversion $\exp(i m \pi/3)^3=(-1)^m$. More details on how to derive these results are provided in~\cite{harshman_symmetries_2012, harshman_one-dimensional_2016, andersen_hybrid_2017} and Appendix A. In light of this assignment of OAPM and reflection parity to possible combinations of identical particles, the mode level structure depicted in Fig.~\ref{fig:fig2} reveals further insights. First, note because the phase of FFF modes must change sign at the section boundaries, the density must drop to zero and, as a result, FFF modes do not `feel' the interaction strongly (or at all, in the impenetrable delta-function barrier limit). The energies of these FFF modes are therefore nearly horizontal even as the interaction strength $g$ is increased. In contrast, the symmetric BBB modes experience the greatest variation with $g$, and in the large $g$ converge to the same energy as an FFF mode with the same wave function in the sector (i.e.~same $\tilde{\nu}$ and $\tilde{\ell}$). This is reminiscent of the famous Bose-Fermi mapping for infinite strength contact interactions, first identified by Girardeau~\cite{girardeau_relationship_1960}; see Appendix B for more details. \begin{figure}[t] \centering \includegraphics[width=0.8\columnwidth]{Fig5} \caption{(a) The full $(x_1,x_2,x_3)$ three-particle configuration space. The three planes represent the two-body coincidences $x_1=x_2$ (red), $x_2=x_3$ (green) and $x_3=x_1$ (blue). (b) The relative $(x,y)$ configuration space defined by the orthogonal Jacobi transformation~(\ref{jacobi}). The lines are the projection of the planes in subfigure (a). Each of the six sectors corresponds to specific orderings of three particles. Reflecting across the two-particle coincidence lines is equivalent to a pairwise exchange of identical particles. Complete BBB wave function $\Psi(x_1,x_2,x_3,z)$ for the non-interacting (c) and impenetrable delta-function barrier limits (d). Sub figure (e) and (f) are the corresponding OBDM in each limit, respectively. \label{fig:Fig5} } \end{figure} Proper illumination of the fiber then permits to select the appropriate mode. For instance, to excite a BBB mode one can illuminate with a structured beam. For example, one can illuminate with an intensity modulation that follows the $C_{6v}$ symmetry of the BBB mode with $m=0$, $\tilde{n}=0$ and $\tilde{\ell}=0$. To excite the FFF mode with $m=3$, $\tilde{n}=0$ and $\tilde{\ell}=0$ one has to modulate not only the intensity but also to imprint a phase jump of $\pi$ between sectors, which can be achieved by using spatial phase modulators. For BBX or FFX modes with $|m|=1$ or $2$, the input beam has to mimic the $C_{2v}$ symmetry and the $\pi$ phase jumps as in Fig.~\ref{fig:fig4}. \section{Interpretation of the optical mode amplitude as a many-body wave function: classical non-separability} \label{sec:classnonsep} In this section we discuss how to extract the information on classical non-separability from the optical field $\Phi(x,y,z)$ at a certain distance $z$. To reconstruct the function in the $(x_1,x_2,x_3)$ configuration space, one must account for the center of mass and its evolution along $z$. This is given by the modes of the one-dimensional harmonic oscillator, which we label with the quantum number $n_{\rm{R}}$, and denote as $\varphi_{n_{\rm{R}}}(R)$, so that the total wave function is $\Psi(x,y,R,z)=\Phi(x,y,z)\varphi_{n_{\rm{R}}}(R)\exp[-i n_{\rm{R}}z]$. From $\Psi(x,y,R,z)$, one can then transform back to the variables $(x_1,x_2,x_3)$ to get $\Psi(x_1,x_2,x_3,z)$, which can be performed digitally after phase and amplitude detection of $\Phi(x,y,z)$. With the total wave function $\Psi(x_1,x_2,x_3,z)$, the classical non-separability can be evaluated by first calculating the one body density matrix (OBDM), defined as \begin{equation} \rho(x,x')=\int \Psi^*(x,x_2,x_3) \Psi (x',x_2,x_3)\,d x_2\,d x_3, \end{equation} and normalized to one. The classical non-separability is then defined by the von Neumann entropy \begin{equation} S_{\rho(x,x')}=-\mbox{Tr}[\rho(x,x')\ln\rho(x,x')]=-\sum_j \lambda_j \ln\lambda_j, \end{equation} where we have denoted the eigenvalues of $\rho(x,x')$ as $\lambda_j$. We recall that the von Neumann entropy is zero for a pure state (non-mixed) and maximal and equal to $\rm{ln}(3)$ for a maximally mixed state (maximal non-separability). Let us illustrate the interpretation of the classical non-separability for a system of three bosons. In this case the ground state wave function for the non-interacting system is $ \Psi _{\rm{B,gs}}^{g=0}(x_1,x_2,x_3)=C\left[\prod_{i=1}^3 e^{-x_i^2/2} \right]$, with $C$ being a normalization constant (see Fig.~\ref{fig:Fig5} (c)). In the impenetrable delta-function barrier limit, the wave function is \begin{equation} \label{eq:Jastrow3} \Psi_{\rm{B,gs}}^{g=\infty}(x_1,x_2,x_3)=C\left[\prod_{i=1}^3 e^{-x_i^2/2} \right]\prod_{1\le j < k \le 3}|x_k-x_j|, \end{equation} which is the solution obtained from the Bose-Fermi mapping theorem (see Fig.~\ref{fig:Fig5} (d) and Appendix C). For the non-interacting case the von Neumann entropy is zero, and the system is therefore separable. For the solution in the impenetrable delta-function barrier limit it is equal to $S=1.056$ which is close to the maximum, $\ln(3)=1.099$, i.e., it is close to a maximally mixed state. In Fig.~\ref{fig:Fig5} (e) and (f) we show the OBDM for both cases, which will help interpret what a mixed state means in this system. The diagonal of the OBDM (when $x=x')$ is the probability of finding a particle at position $x$. For the non-interacting case, it is Gaussian, as it corresponds to a single particle in a one-dimensional parabolic trap. When the interactions increase, this diagonal changes (see~\cite{garcia-march_distinguishability_2014}) and the states start to get mixed. This reflects the fact that the particles interact with each other. For the impenetrable delta-function barrier limit, two particles cannot occupy the same position along $x$ and if one is found at the center of the trap, the other two have to be slightly displaced to the edges. This explains the three-peak shape of the diagonal of the OBDM, while the appearance of structure in the off-diagonal terms indicates the presence of correlations. The classical interpretation of this is that, to determine the position of one particle, information about the position of the other particles is necessary, contrary to the non-interacting case. This is the essence of classical non-separability in this system. \section{Concluding remarks} \label{sec:conclusions} We have shown that a quantum system consisting of three interacting atoms in one dimension with arbitrary statistics can be simulated in an optical setup. For this we have introduced a new kind of optical fiber with a GRIN refractive index profile and three thin slabs of a metallic material. Using discrete group theory we have classified the optical modes in such a fiber with appropriate modal numbers, and obtained exact solutions for the case in which the slabs are infinitely narrow and high. In the analogy with the interacting atom system the modal numbers turn into quantum numbers and, in particular, the modal number of the orbital angular pseudo-momentum together with the reflection parity play the role of the parameters quantifying the particle statistics. We have shown that the spatial profile of the input beam permits to select the statistics of the atoms emulated in the fiber (e.g. three fermions, three fermions or mixtures). We remark that lesser symmetries can appear in the system for specific choices of the coupling. For example, if in the BBX case the coupling constants are $g_{\rm{13}}=g_{\rm{23}}\neq g_{\rm{12}}$ the symmetry is no longer $\mathcal{C}_{6v}$ but $\mathcal{C}_{2v}$. A similar situation appears for FFX if $g_{\rm{13}}=g_{\rm{23}}\neq 0$. In this work we have restricted our study to the most general $\mathcal{C}_{6v}$ system, however the two examples of $\mathcal{C}_{2v}$ symmetric systems can also be easily accessed with a similar fiber set-up. We have also discussed the appearance of classical non-separability in the system in the limit where the slabs are infinitely narrow and high, and where the optical states are close to a maximally mixed state. Due to the correspondence to multi-particle entanglement, this represents classical intersystem entanglement ~\cite{1998SpreeuwFoP,spreeuw_classical_2001,harshman_tensor_2007,aiello_quantumlike_2015}. It is interesting to note that one can also explore nonlocality in the setup we present by using the Wigner representation of the states \cite{Banaszek1998,Fogarty_2011,Li2011}. The fundamental analogy between optical and quantum systems opens the door to explore more technical analogies as well. For example, there are proposals for implementations of quantum computing algorithms in optical systems~\cite{manko_quantum_2001,2002BhattacharyaPRL,2015PerezGarciaPLA}, optical implementations of teleportation protocols~\cite{2016Guzman-SilvaLPR}, and applications of the presence of classical non-separability for metrology~\cite{2014ToppelNJP,2015Berg-JohansenOptica}. On top of this other properties defined only for the quantum system have been found in the classical ones, such as analogies to quantum (wave) chaos~\cite{doya_speckle_2002}, quantum walks~\cite{2003KnightPRA}, or classical non-separability in vector vortex beams~\cite{2016DAmbrosioPRA}. We expect that the system introduced here allows for the exploration of this kind of applications, especially when combined with polarization. \section*{Funding} Spanish Ministry MINECO (National Plan15 Grant: FISICATEAMO No. FIS2016-79508-P, FPI); European Social Fund; Fundaci\'o Cellex; Generalitat de Catalunya (AGAUR Grant No.2017, SGR 1341, and CERCA Program); European Commission (ERC AdG OSYRIS, EU FET-PRO QUIC); National Science Centre, Poland-Symfonia (Grant No. 2016/20/W/ST4/00314); TF acknowledges support under JSPS KAKENHI-18K13507, TB and TF acknowledge support from the Okinawa Institute of Science and Technology Graduate University; A.F. acknowledges the Spanish MINECO Project No. TEC2017-86102-C2-1) and Generalitat Valenciana (Prometeo/2018/098); MAGM acknowledges funding from the Spanish Ministry of Education and Vocational Training (MEFP) through the Beatriz Galindo program 2018 (BEAGAL18/00203). \section*{Acknowledgments} We thank P. Grzybowski and E. Pisanty for encouraging and motivating discussions.
\section{Introduction} Contact dynamics between two spherical elastic objects can be explained by Hertz's contact law with an exponential force-deformation relation. Unlike a spring mass system, where $F$ is proportional to deformation or displacement $\delta$, in a system with Hertzian contact the relation between the force $F$ exerted on spheres and the deformation $\delta$ is nonlinear; $F \propto \delta^{1.5}$. An ultrasonic transducer technology is developed to utilize this nonlinear behaviour of one-dimensional chain of spheres~\cite{Hutchins2015,Yang2016,Hutchins2016,Akanji2016}. The aim of this technology is to transform high amplitude narrowband sinusoidal input into a train of wideband impulses. The generation of short duration ultrasonic pulses is desirable both in diagnostic and therapeutic ultrasound~\cite{Bouakaz2003,Harput2014,Lin2014}. It has already been demonstrated by Hutchins \textit{et al.} and Yang \textit{et al.} that it is possible to generate wideband impulses by coupling energy to harmonics from a fundamental ultrasonic frequency of 73 kHz~\cite{Yang2014,Hutchins2014,Hutchins2015a}. Donahue \textit{et al.} and Harput \textit{et al.} presented generation of ultrasound waves in water by using a granular chain with a matching layer~\cite{Harput2015a,Donahue2014}. The aim of this study is to incorporate the effect of a matching layer into an existing analytical model and an experimental setup to identify suitable materials and to obtain the optimum thickness for biomedical applications. Models were developed to simulate wave propagation in infinite chains~\cite{Nesterenko1983,Coste1997}; however the problem becomes more complicated once the chain is of finite length and coupled into a finite material. Analytical models to simulate wave propagation through a finite-length chain already exist~\cite{Lydon2013,Hutchins2015}, but coupling of ultrasonic energy into biological tissue still remains as a big challenge. In this study, a matching layer was modelled as a flexible thin circular disc clamped from the edges. Different coupling materials, such as glass, aluminium, acrylic, silicon rubber, and vitreous carbon, was analysed with this model. Results achieved from the new model was verified against hydrophone measurements. \begin{figure}[!t] \centering \includegraphics[width = 78mm]{Exp_Setup.pdf} \caption{Chain of spheres is excited with an ultrasonic transducer attached to an amplifying horn. A matching layer is placed on the other side of the chain for coupling in water. Acoustic pressure generated by the chain is measured with a membrane hydrophone.} \label{fig:SoundBullets_exp_setup} \end{figure} \section{Materials and Methods} \subsection{Model} An analytical model created by Hutchins \textit{et al.} was used to simulate the wave propagation through the chain. The existing model was modified as below to implement the effect of a vibrating thin plate instead of an infinite wall. The equation from \cite{Hutchins2015} for the last sphere was modified as; \begin{equation} \begin{aligned} m \ddot{x}{_n} & = \frac{\sqrt{2R}}{3} \theta_s (\delta_{s,s} + x_{n-1} - x_{n}) ^{\frac{3}{2}} \\ & - \frac{4\sqrt{R}}{3} \theta_{m,s} (\delta_{m,s} + x_{n} - x_{m})^{\frac{3}{2}} \\ & + \lambda (\dot{x}{_{n-1}} - \dot{x}{_{n}}) H(\delta_{s,s} + x_{n-1} - x_{n}) \\ & - \lambda (\dot{x}{_{n}} - \dot{x}{_{m}}) H(\delta_{m,s} + x_{n} - x_{m}), \end{aligned} \end{equation} where $m$ is the mass of a single sphere, $x_n$ is the displacement of the last sphere for a $n$-sphere chain, $x_m$ is the displacement of the matching layer, and $\lambda$ is the damping coefficient. Material properties are described with $\theta_s$ and $\theta_m$ as; \begin{equation} \theta_s = \frac{E_s}{1 - {\nu_s}^2}, \> \> \> \> \> \theta_m = \frac{E_m}{1 - {\nu_m}^2} \end{equation} \begin{equation} \frac{1}{\theta_{m,s}} = \frac{1}{\theta_m} + \frac{1}{\theta_s} = \frac{E_s(1 - {\nu_m}^2) + E_m(1 - {\nu_s}^2)}{E_m E_s}, \end{equation} where $E_s$ is the Young's modulus, and $\nu_s$ is the Poisson's ratio of the aluminium spheres. The same parameters for the matching layer are represented with $E_m$ and $\nu_m$. Overlap between two spheres, $\delta_{s,s}$, and overlap between the last sphere and the matching layer, $\delta_{m,s}$, are calculated as; \begin{equation} \delta_{s,s} = \left( \frac{3F_0}{ \sqrt{2R} \theta_s} \right)^{\frac{2}{3}}, \> \> \> \> \> \delta_{m,s} = \left( \frac{3F_0}{4 \sqrt{R} \theta_{m,s}} \right)^{\frac{2}{3}} . \end{equation} The matching layer was modelled as a flexible thin plate clamped from the edges and the equation of motion is~\cite{Harput2017}; \begin{equation} \begin{aligned} \frac{m_m}{4} \ddot{x}{_m} & = \frac{4\sqrt{R}}{3} \theta_{m,s} (\delta_{m,s} + x_{n} - x_{m})^{\frac{3}{2}} \\ & + \lambda (\dot{x}{_{n}} - \dot{x}{_{m}}) H(\delta_{m,s} + x_{n} - x_{m}) \\ & - K_m x_m , \end{aligned} \end{equation} where $m_m$ is the mass of the matching layer, and $K_m$ is the spring coefficient. The mechanism of wave coupling into water was modelled as a superposition of wave propagated through the matching layer and vibrations of a thin plate. The energy of the wave transmitted from the aluminium sphere into water was decreased due to the acoustic impedance mismatch as; \begin{equation} T = 1 - \left( \frac{Z_2 - Z_1}{ Z_2 + Z_1} \right)^2 \end{equation} \begin{equation} \dot{x}{_{s}} = \dot{x}{_{n}} \sqrt{T_{m} T_{w}} H(\delta_{m,s} + x_{n} - x_{m}) + \dot{x}{_{m}} \label{eq:vel_superpose} \end{equation} where $\dot{x}{_s}$ is the superposition of sphere and matching layer velocities. The first term in Eq.~\eqref{eq:vel_superpose} is the velocity of the last sphere coupled to the matching layer and then water, while the last sphere is in contact with the matching layer. The transmitted energy is scaled by $T_{m}$ into the matching layer, and scaled by $T_{w}$ into the water. The second term represents the velocity of the matching layer. \begin{table}[!b] \renewcommand{\arraystretch}{1.2} \caption{Parameters of Matching Materials} \label{table:Materials} \centering \begin{tabular}{l c c} \hline & Young's & Poisson's \\ & Modulus & Ratio \\ \hline Aluminium & 69x$10^9$ Pa & 0.33 \\ Pyrex glass & 67x$10^9$ Pa & 0.20 \\ Vitreous carbon & 35x$10^9$ Pa & 0.15 \\ Acrylic & 2.5x$10^9$ Pa & 0.35 \\ Silicone RTV Rubber & 0.1x$10^9$ Pa & 0.49 \\ \hline \end{tabular} \end{table} \subsection{Experimental Setup} The system as shown in Fig.~\ref{fig:SoundBullets_exp_setup} was partially submerged and the output was measured in degassed and deionized water using a PVDF membrane hydrophone (Precision Acoustics Ltd., Dorchester, UK). The chain of spheres and the ultrasonic horn was fixed on an assembly with static compression force of approximately 0.1 N. Ultrasonic horn was made of steel with a density of 7833 kg/m$^3$, Young's modulus 201 GPa, and Poisson's ratio 0.3. The chain consisted of 6 aluminium spheres with a diameter of 1 mm, density of 2700 kg/m$^3$, Young's modulus 69 GPa, and Poisson's ratio 0.33, was placed into a plastic holder. The end of the chain was terminated with different matching layers as listed in Table~\ref{table:Materials}. The chain of spheres was excited with a 25 cycle sinusoidal tone burst generated by an ultrasonic horn with a fundamental frequency of 73 kHz. The excitation signal was tapered and amplified with a Class A linear power amplifier (E\&I Ltd., Rochester, NY) to reduce the level of harmonics introduced into the granular chain. This waveform generated a maximum output displacement of $\pm3$ $\mu$m, which was measured with a Laser Vibrometer (Polytec, Germany) and used as an input into the analytical model described above. \section{Results and Discussion} \begin{figure}[!t] \centering \includegraphics[viewport = 45 35 620 570, width = 82mm, clip]{Simulations_Aluminium_Nocoupling.pdf} \caption{Results achieved with the analytical model for a 6-sphere chain against an immovable steel wall.} \label{fig:Simulations_Aluminium_Nocoupling} \end{figure} Fig. \ref{fig:Simulations_Aluminium_Nocoupling} shows the velocity of the last sphere for a 6-sphere granular chain terminated with an infinite steel wall. Chain of spheres between two immovable boundaries can generate periodic solitary waves with clear distinctions between high energy and low energy zones, which is visible in Fig. \ref{fig:Simulations_Aluminium_Nocoupling} as short duration impulses. When a non-stationary boundary is introduced, the dynamics of the chain of spheres change dramatically. The new proposed model in this study was used to simulate the effect of a thin moving boundary. Different matching materials, such as aluminium, glass, acrylic, silicon rubber, and vitreous carbon, was analysed with this model with given parameters in Table~\ref{table:Materials}. The damping coefficient was $\lambda=0.32$ as explained in~\cite{Yang2016}, the spring constant was between $K_m=2.2\times10^3-620\times10^3$ for the given materials with a pre-compression $F_0=0.1$ N. \begin{figure}[!t] \centering \includegraphics[viewport = 45 35 620 390, width = 86mm, clip]{Simulations_Aluminium_ALLmatching1.pdf} \includegraphics[viewport = 45 35 620 570, width = 86mm, clip]{Simulations_Aluminium_ALLmatching2.pdf} \caption{Results achieved with the analytical model for a 6-sphere chain coupled to aluminium, vitreous carbon, pyrex glass, acrylic, silicone rubber.} \label{fig:Simulations_Aluminium_ALLmatching} \end{figure} Fig.~\ref{fig:Simulations_Aluminium_ALLmatching} shows the estimated velocity profiles for different matching materials modelled as a circular plate with a radius of 5~mm and a thickness of 0.5~mm. Model showed that soft matching layers such as acrylic and rubber inhibit the generation of higher order harmonics. Between the hard matching materials, vitreous carbon achieved the best results due to its acoustic impedance, which is closer to the optimum impedance matching between aluminium and water. Increasing the thickness of the matching material increases the output velocity profile of the last sphere, since the system approaches to an immovable boundary with increasing thickness. However due to the existence of higher harmonics and attenuation in material, thinner matching layer is preferable. Fig.~\ref{fig:Simulations_Aluminium_Sigradur} shows the estimated velocity profile at the outward surface of a 0.5~mm thick vitreous carbon matching layer. Fig.~\ref{fig:Simulations_Aluminium_Sigradur}(bottom) shows the output spectrum with higher order harmonics that extended to frequencies above 400 kHz. \begin{figure}[!t] \centering \includegraphics[viewport = 45 35 620 570, width = 82mm, clip]{Simulations_Aluminium_Sigradur.pdf} \caption{Results achieved with the analytical model for a 6-sphere chain coupled to a 0.5~mm thick vitreous carbon plate. (Top) Velocity profile in time domain. (Bottom) Frequency spectrum of the velocity profile. } \label{fig:Simulations_Aluminium_Sigradur} \end{figure} Fig.~\ref{fig:Measurement_Aluminium_10mm}(top) shows the hydrophone measurements acquired with a 0.5 mm thick vitreous carbon disc at 10 mm depth. Between 0.5, 1.0, 2.0 and 2.5 mm thick vitreous carbon discs, the thinnest option resulted in the highest output pressure that can be regarded as the most efficient coupling. It was not possible to try a thinner matching layer due to unavailability. \begin{figure}[!t] \centering \includegraphics[viewport = 45 35 620 570, width = 82mm, clip]{Measurement_Aluminium_10mm.pdf} \caption{Measurements performed with a membrane hydrophone for a 6-sphere chain coupled to a 0.5~mm thick vitreous carbon plate. (Top) Acoustic pressure measured at 10~mm depth. (Bottom) Frequency spectrum of the acoustic pressure. Noise level is plotted for comparison.} \label{fig:Measurement_Aluminium_10mm} \end{figure} The predictions from the analytical model were consistent with the results achieved by hydrophone measurements for the system under static loading of 0.1 N for the vitreous carbon matching layer. The impulse shape and the harmonic content matches with the new model as shown in Fig.~\ref{fig:Simulations_Aluminium_Sigradur} and Fig.~\ref{fig:Measurement_Aluminium_10mm}. However, the envelope of the waveform is different in both cases. The reason for this is the displacement at the horn tip was effected due to the static loading. \section{Conclusions} This study achieved the aim of generating wideband impulses close to biomedical ultrasound frequency range. Between the chosen matching layer materials, vitreous carbon allowed both the generation and coupling of higher order harmonics with a -20 dB bandwidth over 350 kHz and shows the feasibility of this new technology for biomedical applications. Generation and the use of these sub- and super-harmonics in ultrasound as a diagnostic and therapeutic tool are favourable~\cite{Canney2008,Harput2013,Harput2013a}. The main advantage of this new technology for therapeutic applications, such as HIFU, is the ability to generate wideband impulses that minimizes the focal spot size. The output pressure on the other hand is a big disadvantage; however it can be improved by fabricating an array of granular chains. Thickness of the matching layer is a trade-off between efficient coupling of high frequency components (\textit{i.e.} a thin matching layer), and effective solitary wave generation ( \textit{i.e.} a thick immovable matching layer). The current model can give a basic insight of how to choose a matching material, but the current model is incomplete. Model must be improved by adding the effect of friction and damping to the plate motion and attenuation~\cite{Harput2017}. Also for a more complicated setup with multiple matching layers, finite element analysis will be used as a supplementary tool to understand the contact mechanics in a granular chain~\cite{Gelat2016}. \section*{Acknowledgment} This work was supported by EPSRC grant (UK) EP/K029835/1. \vspace*{1mm}
\section{Introduction} \label{sec:intro} Smartphones are the most successful mobile devices in computing history. Almost 2~billion of these powerful devices are already deployed worldwide. For many---particularly in developing countries---a smartphone is their only computer and only internet connection. Smartphones provide a rich set of opportunities and challenges for mobile systems researchers as we adapt to a mobile-first world. \sloppy{ The global network of distributed smartphones represents the ultimate proving ground for experimental approaches to crowdsourcing, wireless communication, location tracking, energy management, context awareness, security and privacy, user interfaces, and other topics of interest to the mobile systems research community. } Smartphones are the ultimate destination for many of our new ideas. A key challenge when transitioning ideas from local laboratories to the global stage is determining whether they work for large numbers of users. Initial experiments tend to be done by researchers themselves. They are inherently small scale, and use participants that are not representative of typical smartphone users. From an initial small-scale prototype with a handful of sophisticated users, it is a big jump to transition to billions of unsophisticated users. An intermediate step would help determine whether ideas that initially seem successful are truly ready for widespread deployment. If a new idea can be evaluated through a smartphone app, experimenters can use smartphone software marketplaces to perform medium-scale studies. Researchers first integrate their new idea into an app---ideally a useful app. Then they deploy it on an app marketplace like the Google Play Store. Recruiting several hundred users to install and use it can be done through a mixture of advertising and participation incentives. Or they may simply count on a combination of human curiosity and the enormous numbers of users they can reach through app marketplaces. Given a large enough audience, even a tiny amount of interest can compound to enough participants to complete a study. Previous experiments have successfully utilized this approach to recruit several hundred participants for a variety of projects~\cite{carat-sensys13,ubicomp2014-pocketparker}. And, when you mix a useful app that meets a common user need with a bit of timely publicity, the results can be explosive. After receiving some good press, the Carat energy management tool was eventually installed by almost 1~million users~\cite{carat-sensys13}. But not every new idea can be deployed as an app. Smartphones also run a complex million-line codebase referred to as the smartphone platform, which provides the interface used by apps. On Android the smartphone platform consists of three main components. The Android SDK is built along with the platform into \texttt{android.jar} and utilized by all apps. This code runs in the app's process context and implements many core Android features as well as communication with Android services. Core Android services---such as the \texttt{LocationManager}---run as separate processes and communicate with apps to provide information. The Linux kernel performs typical operating system functions such as scheduling and other forms of resource management. Apps rely on---but cannot modify---these platform components. Because the platform provides functionality needed by many apps, it is also a natural location for mobile systems research and experimentation. Among other responsibilities, the platform estimates location~\cite{roy2014smartphone,liu2013guoguo,nandakumar2012centaur,peng2007beepbeep}, manages energy~\cite{mobicase2015-jouler,carat-sensys13,xu2013optimizing,ding2013characterizing}, chooses between networks~\cite{infocom2016-scans,deng2014wifi}, and attempts to secure the device~\cite{mobicase2014-pocketlocker,defdroid,lockscreen,mirzamohammadi2016viola}. All these are areas of ongoing mobile systems research. But that want to evaluate improvements to these core features cannot rely on the app store to perform medium-scale experimentation. They require another way to perform their experiments. \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{./DayDeviceCountFigure_annot.pdf} \caption{\textbf{Daily Active Devices on \textsc{PhoneLab}{}}. Transition periods between operation years are not shown. There were several sudden drops that were caused by backend server maintenance. The participant counts shown above the figure are when the operation year started.} \label{fig:active} \vspace*{0mm} \end{figure*} For the past four years we have operated a public smartphone platform testbed called \textsc{PhoneLab}{}. \textsc{PhoneLab}{} allows researchers to deploy platform modifications to between 100~and~300 participants. Participants use their \textsc{PhoneLab}{} smartphone as their primary smartphone, and so provide representative usage patterns. Participants are incentivized by a free device, a low-cost service plan, and on-campus technical support. They agree to use experimental software and understand that data will be collected from their device. Any researcher can distribute experiments on \textsc{PhoneLab}{} free of charge. We have attempted to make the process as straightforward as possible by providing detailed instructions. But \textsc{PhoneLab}{} experimentation does require modifying the Android Open Source Project (AOSP) sources---a daunting task for the uninitiated. \textsc{PhoneLab}{} experiments typically fall into one of two categories. New instrumentation can be added to the platform to generate data about how the smartphone is used. This is a common first step in understanding a problem and beginning to formulate a solution. Instrumentation usually outlives the experiment that introduced it, and our \textsc{PhoneLab}{} codebase includes an increasing amount of useful logging. When a new feature is ready to be tested, it can also be deployed on \textsc{PhoneLab}{}---usually along with additional instrumentation required to evaluate it. Operating \textsc{PhoneLab}{} has been both fun and challenging. The goal of this paper is to describe the testbed, advertise available data sets, and share what we have learned. Some of our experiences echo those of others that have built and maintained computer systems. But others are specific to the challenge of running a \textit{user-facing} testbed. \textsc{PhoneLab}{} is more than a set of machines locked in a room~\cite{emulab}, tucked into faculty offices~\cite{motelab-ipsn05}, or distributed around the world~\cite{chun2003planetlab}. It is a set of people that rely on their smartphone in the same ways as the rest of us. This creates unique design and operational challenges, particularly given that we allow experimenters to modify low-level platform code. If an experiment crashes a typical testbed, someone may miss a paper deadline. If an experiment crashes \textsc{PhoneLab}{}, someone may not be able to call 911. We have also encountered unique challenges associated with incentivizing and interacting with participants, providing safe access to data collected from human participants, and dealing with cellular service providers. \begin{comment} The rest of our paper is structured as follows. We begin in Section~\ref{sec:history} by describing the history of \textsc{PhoneLab}{} from conception to its current realization. Section~\ref{sec:op} describes how \textsc{PhoneLab}{} experiments are performed. To highlight how \textsc{PhoneLab}{} benefits mobile systems experimentation, we describe several sample experiments in Section~\ref{sec:exp}. Section~\ref{sec:dataset} provides an overview of the dataset we have collected and make available to interested scientists. We describe our experiences and lessons learned from running \textsc{PhoneLab}{} in Section~\ref{sec:lesson}, and continue the discussion in Section~\ref{sec:discussion} by considering the future of smartphone testbeds. We describe related efforts in Section~\ref{sec:related} before concluding in Section~\ref{sec:conclusion}. \end{comment} \section{The PhoneLab Testbed} \label{sec:history} In this section, we provide an overview of \textsc{PhoneLab}{}'s history (\S\ref{subsec:history}), hardware and software components (\S\ref{subsec:hardware}), privacy and safety measures (\S\ref{subsec:privacy}) and the transition from app to platform experimentation (\S\ref{subsec:transition}). \subsection{History} \label{subsec:history} Figure~\ref{fig:active} shows the daily \textit{active} devices during the 4 years of \textsc{PhoneLab}{} operation. The data is obtained from the smartphone heartbeat information received by our backend server. The daily active count is a rough estimate but strictly smaller than the total number of participants. Several sudden drops of active count are caused by maintenance or problems with our backend data collection server. \textbf{Year 1 (9/2012--9/2013):} We recruited the first group of 199 participants in September 2012 by offering a free smartphone and a free year of service. Participants were supposed to transition to a paid plan in their second year, but received one year of free service as a recruitment incentive. The first year served as beta-testing of our platform software and data collection framework. \textbf{Year 2 (9/2013--11/2014):} We recruited a second group of 288 participants in September 2013. Although we had hoped that they would continue with the project, most of the Y2 participants were new and most of the Y1 participants left the project. This was caused by poor incentive design, a topic we return to later in Section~\ref{subsec:incentives}. \textsc{PhoneLab}{} opened to the public for app-based experiments in October 2013. \textbf{Year 3 (11/2014--9/2015):} The third year of \textsc{PhoneLab}{} brought changes to both the incentive model and experimental capabilities. We eliminated the free service plans which were not functioning as an effective incentive for recruiting high quality participants. Instead, we began billing participants at a discounted rate for their cellular service. We began running platform experiments privately early in 2014, and made this capability available to the public in Feb. 2015. \textbf{Year 4+ (9/2015--Present):} Not providing free service lowered the cost of the testbed dramatically and allowed us to continue to run it for another fourth year on three years of initial funding. Given uncertainty about future funding, we stopped recruiting participants in Y4. Attrition began to decrease the size of the testbed. \begin{comment} In Y5, which began September 2016, we received a small amount of additional funding for research staff but no additional funding for participant service plans. Instead, the threat of closing down the project entirely allowed us to renegotiate a slightly better rate with Sprint. We also raised the participant monthly cost from \$45 to \$50. These two changes combined to generate enough extra revenue to purchase new devices and continue paying our undergraduate administrator who was no longer funded out of the grant. \end{comment} \subsection{Hardware and Software} \label{subsec:hardware} We used Google Nexus devices exclusively through the \textsc{PhoneLab}{} project. We began with the Nexus~S in Y1, and then upgraded to the Galaxy Nexus (Y2), Nexus 5 (Y3--Y4), and Nexus 6 (Y5). We chose the Google Nexus series devices because of its developer support and driver availability. \begin{comment} For each device generation, the first task was to build a fully-functional platform image from the latest set of AOSP sources. This is supposed to be possible for the Nexus series of smartphones. But despite official binary driver availability, this was not a trivial task. Each year brought new problems with various devices components, including the camera, cellular radio, and GPS chipset. \end{comment} Once we had a fully-functional Android ROM as a baseline, we made three important modifications to support experimentation. First, we developed a testbed management app called the \textsc{PhoneLab}{} Conductor. The Conductor is built into the platform and is configured to start on boot. It serves to link each smartphone with our backend server. It sends heartbeats, collects and uploads data, and fetches experiment and platform updates. Second, we modified the Android \texttt{logcat} system to facilitate \textsc{PhoneLab}{} data collection. The changes include enlarging the in-memory log buffer, increasing the maximum characters that can be logged per line, and improving the timestamp accuracy from millisecond to microseconds. These are very important as we rely heavily on \texttt{logcat} and the metadata it attaches when processing logs. We discuss the detailed data collection mechanism in Section~\ref{subsec:collect}. Finally, we added instrumentation to Android to collect information useful to many experiments: location updates, Wifi scan results, battery status changes, etc. All such instrumentation is done passively by piggybacking on places where Android already collects this information. We have been careful to avoid adding any timers or other forms of overhead to our instrumented platform. A full and detailed list of instrumentation can be found on our website\footnote{Link omitted for double-blind review.}. The entire \textsc{PhoneLab}{} data set is always available to interested researchers, subject to human subjects review. We describe the dataset and data release process in Section~\ref{sec:dataset}. \subsection{Participants} \label{subsec:incentive} Almost all \textsc{PhoneLab}{} participants are faculty, staff and students at our university. When initially providing a free device and service as an incentive in Y1 and Y2, we required a university affiliation in case we needed to recover the device. Once we began billing participants in Y3, that made it possible to recruit from outside the university. If participants stop paying their bills, we simply cancel their service, and so no longer require any additional enforcement mechanisms. However, we have found it convenient to continue recruiting university participants. It has the effect of making the testbed denser, so most participants spend their working hours on our fairly compact campus. It also allows us to advertise on-campus technical support as an attractive non-monetary incentive. Participants seem to appreciate that they can drop by our lab during office hours for help, rather than having to make a special trip to a cellular store. Despite being all university affiliates, our participants are a diverse group---both in terms of age, gender, and occupation. \subsection{Privacy Concerns} \label{subsec:privacy} Smartphones are personal devices, and can potentially reveal a great deal of sensitive information about their user. When operating our testbed we must take steps to protect the privacy and safely of \textsc{PhoneLab}{} participants. This is particularly true given that we are now distributing platform updates. Android places limits on what apps can do. But the platform has no such restrictions. First, all \textsc{PhoneLab}{} personnel---including faculty, developers, and administrators---are required to complete human subjects training. At our university this includes a Good Research Practices (GRP) course and the Social and Behavioral Research Investigators training provided by the CITI program~\cite{citi}. These programs ensure that the \textsc{PhoneLab}{} team understands the importance of protecting our participants and best practices for handling \textsc{PhoneLab}{} data. Second, we apply standard security techniques to protect data during collection and storage. \textsc{PhoneLab}{} logs are transmitted to the backend server over HTTPS. The server is located in a secured server room in our department. Access to the server is granted to only a handful of \textsc{PhoneLab}{} developers who handle data collection. Finally, all researchers requesting \textsc{PhoneLab}{} data are required to have their request reviewed for human subjects safety. At US universities, this is done by the Institutional Review Board (IRB). Non-academic institutions and universities outside the US typically have an equivalent body. This is standard practice in any projects that involves human subjects. We are pleased to see IRB review increasing expected by the mobile systems community. We discuss our experiences with the IRB in more detail in Section~\ref{subsec:irb}. \subsection{Experiment Model} \label{subsec:transition} During Y1 and Y2 of \textsc{PhoneLab}{} we focused on supporting app-level experiments. Researchers would publish their app on the Google Play Store, and we would notify \textsc{PhoneLab}{} participants and ask them to install and use it. However, it was challenging to determine whether users were actually participating in these experiments. It was possible to monitor whether they installed an experiment and spent at least some time with it in the foreground. But whether they were using it realistically was difficult to determine. It also became apparent to us that \textsc{PhoneLab}{} would never provide as many participants as app-level experiments could reach through app marketplaces. As a result, we began to shift to platform experimentation. This is not only a unique capability that \textsc{PhoneLab}{} was able to provide, but also made it easier to track participation. For many platform experiments, users participate silently without having to install or use any new software. We do notify users of new platform experiments and provide them with ways to limit data collection on a per-experiment basis. Starting from Y3, \textsc{PhoneLab}{} provided only platform experimentation capabilities, and we remain the only public testbed to do so. \section{Testbed Operation} \label{sec:op} In this section, we describe the experiment workflow and operation of \textsc{PhoneLab}{}. In particular, we focus on the trade-offs we made trying to protect \textsc{PhoneLab}{} participants from buggy experiments while making \textsc{PhoneLab}{} operation as transparent to participants as possible. \subsection{Experiment Workflow} \textsc{PhoneLab}{} experimentation proceeds in three phases: creation, development and deployment. \subsubsection{Creation} Researchers who are interested in \textsc{PhoneLab}{} first contact us and describe the scope and purpose of the experiment. We review this information based on two criteria: suitability and intrusiveness. Since Y3 \textsc{PhoneLab}{} has focused on platform-level experimentation. Experiments that can be deployed as apps are encouraged to utilize other approaches such as the Google Play store. We also evaluate how disruptive the experiment will be to the \textsc{PhoneLab}{} participants. Experiments that require specific user behaviors or incur large performance or battery penalties will not be deployed. Over the years, we have been impressed, however, with the kinds of experiments that can run without disturbing users. Several times, logging and instrumentation that we were initially worried would caused too high overhead ended up being unnoticeable. As an example, we have instrumented the system call interface to collect file system activity traces. This generates a great deal of output, but has been run successfully without complaint from participants. Note that IRB approval is not required at this stage. But experimenters are made aware that the IRB letter is necessary for the data collection after deployment. This lowers the barrier for experimenting on \textsc{PhoneLab}{}, allowing the experimenters to work on the development and IRB application in parallel. The experiment creation stage usually takes just a few days. \subsubsection{Development} \sloppy{ After approval, dedicated experiment branch is forked from our AOSP code base where the researchers can stage their modifications. Once experimental changes are ready, a \textsc{PhoneLab}{} team member checks out the branch and bench tests it on a single device. Assuming that is successful and no glaring problems are immediately apparent, the modified platform is pushed to a small number of \textsc{PhoneLab}{} developers. Anomalies such as app crashes, performance degradation, and unexpected battery drain are reported at this stage. If problems arise, experimenters are notified and asked to fix them. This step avoids causing problems for larger numbers of participants that are not developers, and has dramatically reducing the burden of our technical support. The development-testing iteration repeats until all problems detected by \textsc{PhoneLab}{} developers are fixed. } \subsubsection{Deployment} After testing is complete, changes are pushed to testbed participants. Depending on the amount of time requested by the experimenters, this stage can last for weeks, months or years. After the requested period ends, we remove the experimental changes from participant devices. However, if experimenters have added generally-useful instrumentation, we encourage them to merge it into our master development branch. This allows logging for that instrumentation to continue and makes data sets available later to other researchers. Any researcher can request \textsc{PhoneLab}{} data sets with IRB approval, and so this process is decoupled from the experimentation workflow. However, most experiments end by researchers requesting a data set containing tags generated by their experiment and other useful information. To assist experimenters during iteration, we can provide small data sets for the purposes of validating their instrumentation without receiving IRB approval. IRB approval is only required once experimenters plan to publish their results. \begin{comment} \subsection{Branching Philosophy} \textsc{PhoneLab}{} developers and experimenters collaborate on the same platform code but with different goals. Developers aim to provide a usable smartphone platform and maintain common instrumentation. Experimenters often want to augment the Android platform in various ways. Due to the unstable nature of experimental changes and performance and energy overhead they can produce, we need the ability to remove experiments after they are deployed. As a result, the canonical topic-branch and patch model of AOSP development does not meet our needs. It renders difficult if not impossible to remove a changeset after it is merged into the main deployment branch. We work around this AOSP limitation with a new development model. All experiment branches are forked from a common ancestor, which we refer as the ``big-bang''. Every time a platform release is scheduled, a new release branch is forked from ``big-bang''. Active experiment branches are then merged into this release branch in the order they were created. Later experiments that generate conflicts with earlier experiments are skipped. The resulting release branch is then built and pushed to participants. This allows experiments to remain isolated in their respective branch. It also allows us to remove a deployed experiment from the participant devices by skipping the branch during the next release. \end{comment} \subsection{OTA Updates} As a smartphone platform testbed, the most important capability is to push platform changes to participant devices. We leverage Android's existing over-the-air (OTA) update mechanism for this purpose. It provides a way to initiate an update to a new platform by applying an update file stored locally. Our job is to generate the update file and reliably transmit the update file to the device. Every time a new platform image is built, incremental OTA update packages are generated against previous platform versions. The \textsc{PhoneLab}{} Conductor app periodically checks for OTA updates from the backend server, downloads them, and prompts participants to install the update once the download completes. To ensure that updates are eventually applied, the Conductor will automatically apply a pending OTA after midnight once the phone is charging and is not interactively used. \subsection{Data Collection} \label{subsec:collect} Android has a built-in \texttt{logcat} system that allows apps and various parts of the framework to log debug messages or events. Many useful contextual information are already being logged by the framework, such as screen status, Wifi{} connection status, battery level, etc. All messages are stored in an in-memory ring buffer. To harvest this information, we harness \texttt{logcat} as a sink for our device-end data collection. Experimenters are instructed to log their data using the common \texttt{logcat} interface. \begin{comment} For security reasons, \texttt{logcat} instances are normally limited to collecting logs from the app that spawned them. Otherwise \texttt{logcat} would leak potentially sensitive information between apps. But because the Conductor is signed to match the platform image, the \texttt{logcat} instances it starts can collect logs from all apps. \end{comment} We also developed utilities to pipe the Linux kernel logs and the kernel event tracing logs~\cite{tracing} to the \texttt{logcat} buffer. This allows us to hook into the existing Linux logging framework. Listing~\ref{lst:log} shows examples on how to instrument various parts of the platform. \begin{lstlisting}[ language=Java,float,floatplacement=t!, caption={\textbf{Various Utilities for Instrumetation.} All log messages are piped to the \texttt{logcat} buffer.}, label={lst:log}, belowskip=-3mm ] // Java: use the Log class. Log.d("MyTag", "Some useful information."); // C/C++ (user space): use Android ALOG macros. ALOG(LOG_INFO, "MyTag", "Another useful log."); // Kernel: use printk and tracing framework printk(KERN_INFO "Useful kernel logs."); trace_my_tracepoint(...); \end{lstlisting} The \textsc{PhoneLab}{} Conductor app constantly consume logs from the buffer and dumps them into log files. These files are then uploaded to our backend server. Similar to OTA updates, the data upload also happens in a opportunistic way when the device is charging. Once the backend server receives the log files, it performs a series of processing steps to clean them up and add additional information. The resulting log files include a hashed device identifier and the upload time in addition to the original data generated on the device by \texttt{logcat}. Logs are sorted into a set of flat files stored on a large RAID array. We currently store one file per day per device containing all generated log messages. To process a data request, we filter the full set of log files by time and by tag to produce the data that is returned to the experimenter. \section{Example Experiments} \label{sec:exp} \sloppy{ Over the last two years as a smartphone platform testbed, \textsc{PhoneLab}{} has accommodated 17 experiments: 8 from \textsc{PhoneLab}{} developers and 9 from external researchers. } In this section, we showcase four experiments\footnote{Information that may reveal author identities, including project names and citations, are concealed for double-blind review.} that were deployed and evaluated on \textsc{PhoneLab}{}. We demonstrate how \textsc{PhoneLab}{} enables researchers to examine real smartphone behavior at scale, and deploy platform changes that cannot be distributed any other way. \subsection{Defensive Mobile OS} \textsc{DefBot}{}~\cite{defdroid} researchers studied disruptive app behaviors: waking up devices too often, overuse of GPS, and frequent notifications. Disruptive behaviors were detected by tracking the apps's API calls to certain Android platform services, such as \texttt{AlarmManager} and \texttt{LocationManager}. Defensive actions were enforced by modifying Android to hijack and alter API calls corresponding to disruptive behavior. It is clear that neither the detection nor the defensive actions can be achieved without modifying the Android platform. \begin{comment} \textsc{DefBot}{} experimenters worked with the \textsc{PhoneLab}{} to ensure that defensive actions did not break apps. This is also a key evaluation criteria for the \textsc{DefBot}{} approach. First, we closely monitored complains about app misbehaviors during the experiment, and forwarded them to \textsc{DefBot}{} experimenters for examination. Second, we ask \textsc{DefBot}{} experimenters to provide a per-app toggle in the Android settings to set \textsc{DefBot}{} to permissive mode, in which disruptive behaviors will be logged but defensive actions will be taken. This allowed participants to disable \textsc{DefBot}{} for certain apps if they thought it was negatively affecting the app's behavior. We communicated instructions on how to do this to \textsc{PhoneLab}{} participants when the \textsc{DefBot}{} experiment was deployed. \end{comment} \textsc{DefBot}{} was deployed on \textsc{PhoneLab}{} for over a month from 09/21/2015 to 11/03/2015. The \textsc{DefBot}{} experimenters acknowledged that real deployment on \textsc{PhoneLab}{} was helpful to verify that the defending actions did not break the functionality of large numbers of apps used by real users. They also identified the deployment as an opportunity to collaboratively tune defensive policies using feedback from \textsc{PhoneLab}{} participants and developers. \subsection{Lock Screen Analysis} This experiment studied the protection mechanism that users enabled on their smartphone lock screen. The Android framework was instrumented to transparently log the type of each unlock events. Detailed unlocking behaviors, such as time spent on unlocking the screen, number of attempts before a successful unlock, and correlation between PIN length and unlock time, were also logged to study the user interaction with the unlocking mechanism. This information can not be accessed by apps for security reasons, but can be easily logged by modifying the Android platform. This experiment was deployed on \textsc{PhoneLab}{} for 8 months from 10/22/2015 to 06/03/2016. Based on the data collected, the experimenters validated the correlation between the user's \textit{securement} sub-scale of Security Behavior Intention Scale (SeBIS)~\cite{egelman2015scaling} score and the smartphone lock screen usage~\cite{lockscreen}. Experimenters also identified areas where the lock screen mechanism can be improved to increase usability while still maintaining security~\cite{harbach2016anatomy}. \subsection{Smartphone Energy Manager} The \textsc{Watt}{}~\cite{maiti2015jouler} experiment aimed to separate the energy management mechanism from policy on smartphones. A new Android framework service was developed to add APIs that provide the measurements of per-app energy consumption. It also added new mechanisms to tune app energy consumption via methods such as CPU frequency throttling. These knobs enable user level energy managers to enforce different management policies, rather than relying on policies baked in to the platform itself. The experimenters also provided several example policies to demonstrate how the \textsc{Watt}{} framework can be used to write flexible user space energy management policies. Participants were notified the availability of such policies and were encouraged to choose the one they prefer. The \textsc{Watt}{} experiment was deployed on \textsc{PhoneLab}{} for over a week from 03/07/2016 to 03/16/2016. An exit survey was also distributed at the end of the study to collect subjective feedback from participants. \subsection{Runtime Permission Model} The \textsc{RTPerm}{}~\cite{baokar2016contextually} experiment instrumented the Android framework to record resource requests made by application that are protected by installation time permission manifests, such as location, storage, camera, sending SMS, etc. Upon detection of such events, a dialog appears asking the user whether the request would have been declined had they been given a choice. The experiment itself did not block resource access but only recorded the participant's choice. As a result, it does not affect app functionality. Based on data collected on \textsc{PhoneLab}{} participants, the experimenter proposed a runtime permission model where such resource permission shall be granted at runtime when they are requested instead of statically declared in the application's manifest at installation time. In fact, this is similar to the permission model that was adopted in later Android versions beginning with 6.0. The \textsc{RTPerm}{} experiment was deployed on \textsc{PhoneLab}{} for about 4 months from 11/24/2015 to 03/16/2016. \section{\textsc{PhoneLab}{} Dataset} \label{sec:dataset} Next, we first briefly describe the available dataset generated by \textsc{PhoneLab}{}, and the process of data release. Collected data falls into three categories: existing Android logs, instrumentation added by \textsc{PhoneLab}{} developers, and temporary instrumentation added by experimenters. \subsection{Android \& Linux Logs} Android's \texttt{logcat} is intended to be used for debugging. During development, app developers can use the \texttt{Log}~\cite{log} utility to print certain debug information. Upon app crashes, the relevant logs together with stack traces will be upload as part of the crash report. According to the Android development guide, developers are instructed to remove debugging logs in production code. Yet we still found plenty of app-specific log messages in our dataset. Additionally, logs are naturally generated by many core Android services as well: including the Dalvik and Art Java runtimes, the \texttt{SurfaceFlinger} display rendering engine, the core Android UI framework, and other core components. Finally, we also pipe the Linux kernel logs generated by \texttt{printk} to the \texttt{logcat} buffer. Taken together, this subset of our data represents a unique opportunity to study Android behavior in the wild. \subsection{\textsc{PhoneLab}{} Instrumentations} As part of \textsc{PhoneLab}{} platform development, we instrumented the Android framework to log various useful information: battery status/level changes, location updates, Wifi{} scan results, etc. Most of the information can be also obtained from the apps using the Android API. However, we can usually obtain more information inside the framework. For instance, the Android \texttt{TelephonyProvider} service internally records the detailed cellular tower and signal strength information, such as LTE RSRP/RSRQ/CQI. Yet most of this information is not provided to apps. Platform instrumentation allows us to add logging at the place where all available information is still preserved. \subsection{Experiment Modifications} Besides augmenting the Android framework with new features, most experiments also added instrumentation to either motivate or validate their experiment. We believe the data can also be potentially useful for other researchers with similar interests. Examples of such information include SQLite queries, file system access patterns, lock screen behaviors and app energy consumption details. \subsection{The Dataset} Over the 4 years of \textsc{PhoneLab}{} operation, we collected 148 billion log lines totaling 4.6~TB of compressed log files. Each log line contains 6 fields: device ID, timestamp, Linux task ID, log level, tag, and message body. The device ID is a hashed string of the device's MEID~\cite{meid}, and is guaranteed to be unique to each device and consistent across the dataset. The timestamp field contains the Unix timestamp (with microsecond accuracy) when the log line was generated. The rest of the fields are the same with the \texttt{threadtime} format for Android's \texttt{logcat} system. The tag is a string assigned by the developer to identify the purpose or of the log line. Android does not pose any constraints on the format of the message body. To simplify post-processing, we require all logs added by \textsc{PhoneLab}{} developers or experimenters to use the JSON format for log messages. \begin{table}[t] \centering \begin{tabularx}{\columnwidth}{Xrr} Category & Tag Count & Line Count \\\midrule \textsc{PhoneLab}{} & 55 & \num{8674766791} \\ Experiments & 58 & \num{2471169521} \\ Other & \num{12691} & \num{137714283583} \\\midrule Total & \num{12804} & \num{148860219895}\\ \end{tabularx} \caption{\textbf{Overview of \textsc{PhoneLab}{} Dataset.}} \label{tab:dataset} \vspace*{0mm} \end{table} Table~\ref{tab:dataset} shows a breakdown of the dataset in each of the three categories. Tags added by \textsc{PhoneLab}{} developers or experimenters are recognized by an enforced naming convention, which contains the experiment code name and author institution identifier. All tags not recognized by the convention are categorized as ``Other''. \textsc{PhoneLab}{} instrumentation is included in every platform update, while experiment logs are only deployed temporarily. So while certain experiments can generate large volume of logs---file system accesses, SQLite queries---the total number of experiment logs is less than the \textsc{PhoneLab}{} instrumentation. \begin{table}[t!] \centering \begin{tabularx}{\columnwidth}{Xrl} Tag & Line \# & Description\\\midrule \texttt{Kernel-Trace} & 52.7B & Linux event tracing logs.\\ \texttt{SurfaceFlinger} & 6.1B & Android rendering. \\ \texttt{dalvikvm} & 5.4B & DalvikVM.\\ \texttt{MP-Decision} & 1.8B & CPU hotplug. \\ \texttt{art} & 0.3B & ART VM (after Lollipop). \\ \end{tabularx} \caption{\textbf{Example Tags Generated by Android Framework and Linux Kernel in \textsc{PhoneLab}{} dataset.}} \label{tab:top} \vspace*{0mm} \end{table} Table~\ref{tab:top} shows several example tags from the ``Other'' category. The \texttt{Kernel-Tracing} tag includes the log messages from the Linux kernel event tracing~\cite{tracing} framework. Useful informations such as CPU/GPU frequency changes, context switch and scheduling, CPU temperature changes, are logged under this tag. The \texttt{SurfaceFlinger} tag is generated by the Android \texttt{SurfaceFlinger} framework, which handles the actual UI and graphics drawing. Information such as frame rate and inter-frame intervals can be obtained to infer UI smoothness and user experience. The \texttt{dalvikvm} and the \texttt{art} tags are generated from the Dalvik Java VM (prior to Android 5.0 Lollipop) and the new ART VM. Existing \texttt{dalvikm} logging exposed information about garbage collector activity. Finally, the \texttt{MP-Decision} tag is generated by the proprietary CPU hotplug feature found on Qualcomm chips. It records the status of cores as they are brought online and offline as needed. \subsection{Data Release} \label{subsec:release} We are working on an online catalog of the \textsc{PhoneLab}{} dataset. Once complete, it will allow researchers to browse the available data and decide the list of tags and time range of interest. An IRB approval is required to submit a data request. Since most of the data does not contain any personal identification information, we expect IRB exemption in most cases. After reviewing the IRB letter, we will collect and provide the requested subset of the data. \section{Lessons Learned} \label{sec:lesson} We have learned a great deal from building and operating \textsc{PhoneLab}{}. Below we attempt to distill some of the lessons we have learned along the way. Some of the lessons will not surprise those that have built and maintained large computer systems, particularly user-facing ones. We hope that these lessons are valuable to anyone in the mobile systems community contemplating experimenting with human subjects. \subsection{Managing Participants} \textsc{PhoneLab}{} is nothing without the human participants that choose to participate in the project. And so our first set of lessons concerns how to recruit and manage human participants. This is a challenge not faced by equipment-only testbeds such as EmuLab, PlanetLab and MoteLab. A computer does not decide that it wants to quit the testbed and join some other project. And a computer does not get angry because it came by for help five minutes after office hours ended and the \textsc{PhoneLab}{} administrator had already left. Given a fixed amount of resources---money or staff time---the goal is to jointly maximize the size and quality of the participant pool. With this goal in mind, we offer the following recommendations. \subsubsection{Get the Incentives Right} \label{subsec:incentives} \lesson{When you give someone something for free, they are free to treat it like it has no value.} During the first year of \textsc{PhoneLab}{} participants were offered a free smartphone and free cellular service---including unlimited text, talk, and data. The original plan was that we would incentivize participants with a free year and then move them to a revenue-neutral paid plan for subsequent years. As a result, a large amount of the \$1M grant from the NSF was dedicated to paying cellular service fees to Sprint to cover project participants. As you would expect, it was \textit{very} easy to give out 200~free phones with free service. Everyone loves free stuff. And it was easy on our \textsc{PhoneLab}{} administrators and staff. There was no billing to do, and because participants were not paying anything their customer service expectations were low. We had been careful to instruct participants to use the \textsc{PhoneLab}{} smartphone as their primary device. But as we began examining the data, we realized that many of them were not. When the year ended and we began to retrieve devices, some were still in their original shrink wrap. Other participants were clearly just using the device for data tethering, or to experiment with Nexus smartphone and test out Sprint's service. Overall the free service incentive made it easy to recruit a large number of participants, but hard to recruit high-quality participants. Despite the warning signs in Y1, we continued the same free service model in Y2---and experienced the same set of problems. Luckily by Y3 we were already moving to a different payment model. We would like to claim that this was done consciously to improve the quality of our participant pool. But in reality it happened because of a miscommunication with Sprint. We had understood that they could provide individual liable plans to participants at the discounted group rate that we had negotiated. This turned out not to be the case. Instead, we had to keep participants on the corporate liable plan and begin handling billing ourselves. Once we began charging participants a few things changed immediately. First, we had to work harder to recruit participants. That was expected. But second, we began to see a large increase in participants porting their existing number into the project. This turned out to be a very good sign, and something that we should have looked for earlier. It indicated that participants were moving their existing cellular identity on to their \textsc{PhoneLab}{} smartphone, a clear signal that it was now their primary device. \begin{figure}[t] \centering \includegraphics[width=0.48\textwidth]{./ActiveCDFFigure.pdf} \caption{\textbf{CDF of Daily Active Ratio for Y1 and Y3.} Days when the backend server was down are not counted. Switching from free (Y1) to paid service (Y3) improves the ratio of active devices.} \label{fig:ratio} \vspace*{0mm} \end{figure} To examine the effectiveness of the incentive adjustment, we compare the ratio of daily active devices before and after the change. The ratio indicates the percentage of participants that are using their device daily, and probably as their primary device. Figure~\ref{fig:ratio} shows the CDF of daily active ratios for Y1 and Y3. We can see that participants who paid for service (Y3) are more likely to use the device than people who received service for free (Y1). The daily active ratio for Y3 consistently falls in the 80\%--90\% range. Getting the incentives right was probably our biggest challenge and getting them wrong our biggest mistake. While it all seems obvious in hindsight, we burned through two years and a large amount of funding before assembling a high-quality participant pool. In retrospect, there were several compounding factors that contributed to this error. First, like most computer scientists, we were overly focused on system building and neglected the human aspects of the project. This myopia may have also effected proposal reviewers and others that commented on the project at early stages. Despite clear problems with our incentive design, we cannot recall anyone raising concerns about that part of the project. Second, our proposal was set up to pay for service fees. We went to a lot of trouble to get those allocations approved, and it would have been difficult to reuse them for something else. In today's funding climate, nobody ever wants to turn away funding. But we probably would have needed to in order to reconfigure the award to remove the service fees. Finally, we had set an aggressive growth target of reaching 1000~\textsc{PhoneLab}{} participants in three years. Today that number seems both ludicrous and unnecessary. There is great value in being able to move an experiment out of a small-scale lab setting and on to 100 participants. But at that point, the marginal improvement in moving to 1000 participants is limited. We have never had an idea that we could not evaluate because \textsc{PhoneLab}{} did not have 1000~participants. Nor has any experimenter ever expressed a need for that scale. But in the early years, faced with a need to grow the project and the funds available to do it, it was easy to stick with the option that made it easy to recruit participants---even if they were low-quality participants. \subsubsection{Emphasize Non-Monetary Incentives} \lesson{Monetary incentives are expensive.} The monthly price that we currently charge participants is not much lower than what they could get on the open market. In fact, most family plans are usually cheaper, and so most of our participants are not in a position to join a family plan. As a result, to incentivize participants to join we have had to construct and emphasize non-monetary incentives. One that has been simple and effective is highlighting the fact that \textsc{PhoneLab}{} offers friendly and convenient on-campus technical support. We advertise drop-in office hours where participants can come by and receive help with their \textsc{PhoneLab}{} smartphone. Common reasons for visits include broken or lost devices, configuration problems, or performance concerns. This turns an irritation---we have to provide first-level customer service---into a selling point. Given the compact layout of our university's campus, our lab is easier for participants to visit than nearby Sprint stores. And the service they receive is both different and better than what they would receive in a store. Our current \textsc{PhoneLab}{} administrator is more technically savvy and resourceful than your average cellular store employee. Unconstrained by corporate policies, he is free to focus on providing the best service possible to participants. \begin{comment} Our administrator has a background in the community dedicated to modding smartphones to accomplish what they want the device to do. This has given him a very unique knowledge and skillset when working with these devices. Oftentimes a participant has come in with a device that is either completely dead or in an unusable state and he has been able to revive the device to the degree that a participant is able to continue using their device, or be able to retrieve the data from the device and move that data over to a new device. This was invaluable when we were unable to purchase more nexus 5 devices for replacements. Our administrator began to take apart devices that had smashed screens, but completely usable parts, in order to increase the longevity of the devices that participants were using. He also had a variety of techniques available to him that would allow him to pull data off of a device provided he could get the device to turn on. In some cases this involved taking the motherboard out of one device and placing it in another device. These unorthodox techniques allowed him to provide support to the participants in ways that are not possible for an ordinary cellular store employee. Having this flexibility for the administrator was what made this level of service possible. \end{comment} \subsubsection{Don't Be Afraid to Drop Participants} \lesson{When 5\% of participants cause 95\% of your problems, you can easily eliminate 95\% of your problems.} Paying participants have greatly improved the quality of the \textsc{PhoneLab}{} testbed. But when you start charging participants, expectations change. Not only do we now have to handle billing and manage cash flow, but we also act as a first point of service for \textsc{PhoneLab}{} participants. Not all participants are created equal. Some pay their bills on time, read your emails, come in for help at designated times only when they have a serious problem, and interact well with your staff. Others miss every billing cycle, ignore your emails, drop by your lab at any time with any kind of minor smartphone irritation, and verbally abuse your staff. One participant in particular made it a point to call our administrator at late hours to tell him his phone is having issues and that the administrator was putting his patients at risk as a result of the device not working properly. After removing the free service incentive, we have had to work hard to recruit participants willing to pay to be a part of a research project. But over time, we have realized that it can be helpful to encourage some to leave the project. Given that we are trying to optimize limited staff resources, retaining participants with above average service expectations is not worth it. Over the past two years, our \textsc{PhoneLab}{} administrator has been given permission to quietly suggest to some participants that they might be happier with another service provider. And removing the heavy hitters makes it easier to provide acceptable service to remaining participants. \begin{comment} \subsubsection{Most Users Are Great} \lesson{The other 95\% of participants are patient and understanding.} Once you remove the participants that generate large numbers of issues and complaints, the rest are fine and even sometimes fun. We have had many positive interactions with participants throughout the course of the project. One lady has limped across campus on her newly surgically-repaired knee but arrived just after our administrator had left for lunch. Although she considered beating him with her cane, she instead decided to come back later. Another gentleman was kind enough to purchase pizza for the entire lab after a week in which he needed and received service several times. \end{comment} \subsection{Experimentation} Our second set of lessons concerns how to build a testbed that best supports useful experimentation. Just as \textsc{PhoneLab}{} is nothing without participants, it is useless without experimenters. The goal here is similar to the goal when building a participant base: maximize the use of the testbed given a fixed set of resources. With this goal in mind, we offer the following recommendations. \subsubsection{Eat All of Your Own Dog Food} \lesson{Testbed developers should be testbed experimenters and, if possible, testbed participants.} From the beginning, \textsc{PhoneLab}{} developers have been both experimenters and participants. As experimenters, they have a direct interest in ensuring that the testbed is usable and effective. \textsc{PhoneLab}{} developers have contributed much of the current platform instrumentation in support of their own research projects. They have also contributed new experimental features, such as integration with the Linux kernel logging subsystem, again in support of their own work. \textsc{PhoneLab}{} developers that are also experimenters have stronger incentives to contribute to the project than a developer paid to implement functionality needed by others. Simultaneously, \textsc{PhoneLab}{} developers are also participants. The developers form a subset of participants that receive experimental changes first. This is an ideal arrangement. \textsc{PhoneLab}{} developers are the first group to feel the impact of the changes resulting from a new experiment. And because they are more tech savvy than other participants, they are more sensitive to problems that new experiments may be causing. Developer testing has stopped several experiments from continuing to the full testbed, including extremely obvious regressions (every app starts crashing) and unacceptable performance degradations. \subsubsection{Fly Under the Radar When Needed} \lesson{Asking for forgiveness is better than asking for permission. But don't ask, don't tell is best.} \textsc{PhoneLab}{} would not be possible without the excellent working relationship we have with Sprint. Cellular providers have a reputation of being difficult to work with. Consider how many research papers describe the performance of ``Carrier A'' or ``a major US cellular carrier'', apparently to avoid jeopardizing a working relationship with an oversensitive company. So many researchers have inquired about how we are able to work so effectively with Sprint. Luck certainly played a role. We were fortunate to have initial contacts at Sprint that may have been unusually open-minded for the telecom industry. But, more importantly, our initial contacts with Sprint were in sales, not technology or network infrastructure. Our experience has been that the sales side of Sprint is concerned with how many lines we are purchasing and unconcerned with what we are doing with them. We have never concealed what we are doing from Sprint. We have made it clear to them that we are deploying experimental Android platform images to unlocked devices that connect to their network. But we have had the good fortune to be telling the right people. Had we told someone with a deeper understanding of exactly what that meant, it is possible that \textsc{PhoneLab}{} never would have existed. \subsubsection{Go Where You're Needed} \label{subsec:purpose} \lesson{A good testbed does something that you can't do any other way.} When \textsc{PhoneLab}{} was designed and initially funded it was intended to support both smartphone app and platform experimentation. Because it was easier and safer, work began on app experimentation first, and \textsc{PhoneLab}{} initially opened with only this capability available. But it quickly became apparent to us that \textsc{PhoneLab}{} was neither the only nor the best way to perform app experiments. Deploying an app on existing software marketplaces and encouraging people to install it is a much better approach. Part of this is due to the different distribution model available for apps. But it is also due to the realities of app experiments. \textsc{PhoneLab}{} could be used to force apps to be installed on participants' smartphones---but we cannot force anyone to \textit{use} the app, or to use it appropriately. That requires a separate set of incentives, or an app that provides obvious benefit to users. Once you solve that problem, the benefit provided by \textsc{PhoneLab}{} is minimal. At that point we realized that the platform instrumentation and experimentation capabilities were going to become much more important. We quickly shut down app experimentation entirely and focused all of our efforts on be able to do something that researchers could not do in any other way. Keeping a testbed relevant requires continuously surveying the experimental landscape and identifying a useful niche. To this day, \textsc{PhoneLab}{} remains the only way to deploy platform changes and collect data from several hundred representative smartphone users. \subsubsection{Don't Be Too Afraid} \lesson{Fear is the enemy of user-facing experiments.} We have always been aware that an errant \textsc{PhoneLab}{} experiment could cause serious problems for our participants. The ultimate nightmare scenario is a platform update that is so broken that participants have to actually return to the lab for a fix. This would not only represent a nuisance, but a real safety problem for participants that rely on their smartphones in an emergency. Happily, that has never happened. But we have pushed updates with severe problems. An initial attempt by external researchers to instrument the SQLite database used by Android apps generate an unhandled exception. That caused all Android apps that use SQLite---the vast majority---to crash fairly quickly after launch. Of course, this problem was noticed immediately by our developer testers and a fix followed the initial regression within 24~hours. Luckily, the \textsc{PhoneLab}{} Conductor that is required to update the platform does not use SQLite and so was not affected by this bug. Had that not been the case, the problem would have been much more severe. It is important to recognize the potential consequences of poorly-designed experiments when running a human-facing testbed. But it is equally important that that concern not hold back interesting experiments. As we gained experience with platform updates, we overcame initial concerns about systemic failures. We also gained confidence in our ability to catch severe regressions through pre-deployment testing. \subsubsection{Offload Human Subjects Review} \label{subsec:irb} \lesson{The IRB is an easy human solution to potentially hard or time-consuming technical problems.} Privacy concerns have always been a part of operating \textsc{PhoneLab}{}. This is particularly true once we began distributing platform experiments. Android has a permission mechanism that limits app's access to sensitive information. This is useful when distributing app experiments. But platform code is entirely trusted and runs unconstrained by Android's permission mechanisms. Distributing platform changes opens the door to all kinds of malicious experiments, which have full access to any and all user data, including things that apps cannot even request access to. For example, it is entirely possible for a platform change to collect and offload a full-resolution video feed harvested from the \texttt{SurfaceFlinger} screen buffer. Or implement a key logger to collect user passwords and other sensitive inputs. We considered multiple ways to try to ensure that \textsc{PhoneLab}{} experiments were safe for participants. We could have tried to analyze experiments using static or dynamic analysis to determine whether they matched the description provided by the researchers. It is not clear whether this is technically feasible, and would have been unfamiliar terrain for our group which does not study computer security. We also could have inspected them ourselves be examining the source code changes required by the experiment. This would have been time consuming and error prone. Instead, we fell back on a simpler approach---require that researchers clear their experiment with their Institutional Review Board (IRB) or equivalent. Not all experimenters appreciated this mandate, and we had several cases where interest evaporated once we explained the IRB requirement. And we are definitely aware of frustration and even disdain for human subjects review within the mobile systems community. We have heard the IRB described as a nuisance, and even as something that researchers do as busy work to avoid doing actual research. But from our perspective the IRB is an ideal solution. Note that we do not believe that most IRBs will adequately review the experiment itself---we could probably do a better job by examining the diffs. The point is not to improve how the experiment is reviewed, the point is to establish a chain of responsibility that avoid us but leads back to the experimenter's creators. If we review an unsafe experiment incorrectly, then we are partly at fault. If the review process is done by others, we can avoid worrying about culpability. Overall we believe that the mobile systems research community needs to embrace the IRB process to help protect the work we do with human subjects. It is true that the IRB at many institutions is disturbingly slow and poor at reviewing computer science experiments. But that is not a reason to avoid it---it is an argument for fixing it. And in many cases, \textsc{PhoneLab}{} experiments have qualified for expedited IRB review due to their limited impact on human subjects. It is also important to understand when IRB approval is required and when it is not. Preliminary analysis of data sets that does not reveal information in the form of a publication does not require IRB approval. This allows us to provide experimenters with previews of data sets generated by their experiments or other \textsc{PhoneLab}{} instrumentation. If the data is useful and they want to proceed to publication, they can initiate the IRB approval process at that point. \subsection{Testbed Development and Operation} \textsc{PhoneLab}{} and other similar testbed are usually run by researchers but are not research projects. As a result, they produce a unique set of development and operational challenges that researchers are not always prepared for. Unlike a research prototype, which only has to work until the paper deadline, testbed software has to work reliably for long periods of time. This is particularly true for testbeds like \textsc{PhoneLab}{} that have human participants who are generally intolerant of problems and failures. Testbed development is also a great deal of work when measured against certain research incentives---such as publications about the testbed, rather than those that are facilitated by it. And operating human-facing testbeds requires continuous effort and attention. It is not acceptable for the entire testbed to fail for even one day, given that human participants may be affected. Given these requirements, we offer the following recommendations. \subsubsection{Do the Minimum} \lesson{Don't build anything you don't desperately need.} \textsc{PhoneLab}{} was initially extremely overdesigned. There were multiple reasons for this. It is natural to design large and complex ``proposal-ware'' to try to attract funding. It is also tempting to create new software components to ease the management of a large pool of participants. But regardless of the reasons, we began the project with plans to build many different pieces of software that we ended up not needing. Some of them we wasted time building anyway---others were fortunate enough to slip off of the end of the queue. We estimate that the parts of the \textsc{PhoneLab}{} software base that are heavily used---over-the-air updates and log data collection---probably represent around 25\% of the overall development effort. Not surprisingly, these are the components that are the most immediately obvious and that we would have desperately needed on day 1. As an example of an unnecessary feature, we initially implemented a heartbeat mechanism. Periodically \textsc{PhoneLab}{} devices push small pieces of structured data back to our central server. This data is consumed and used to update a variety of different database tables storing metadata about each connected device. However, this information was never frequently used nor completely ignored. It had some limited utility when we were operating our free service plans, since we tried to use it to determine users' activity levels. But since we have moved to paying participants we have not needed and no longer used this information. Another example is the configuration system for the \textsc{PhoneLab}{} Conductor. We built a fairly complicated system for retrieving configuration parameters from our servers and using them to reconfigure various Conductor components. Most of these parameters, however, have never been changed, and overall the system could have been designed in a much simpler way. Almost all systems are overdesigned to some degree. But given that \textsc{PhoneLab}{} was implemented by faculty and students who were also trying to do actual research, the wasted effort is more problematic. Given the chance to start again, we would let our own needs as \textsc{PhoneLab}{} experimenters drive what needed to be built. \begin{comment} \subsubsection{Be Wary of Found Software} \lesson{Be cautious when you turn someone's toy into your tool.} When attempting to do as little work as possible, it can be helpful to reuse existing software tools. We have benefited from a great deal of existing instrumentation built in to Android and Linux. In particular, the Linux logging framework already has hooks for many interesting events that only need to be enable to generate useful data. But harnessing found software can be problematic when your expectations begin to diverge from the developer's. We discovered this the hard way when we upgrade to Android~5.1. In earlier versions of Android app-level logging had always been done using \texttt{logcat}. The \textsc{PhoneLab}{} Conductor starts a \texttt{logcat} instance that collects logs from all running apps and writes them into a series of files. We chose to utilize \texttt{logcat} because it was a familiar logging interface for developers and quite simple to use. And it should have remained simple to use. But in Android~5.1 we discovered that \texttt{logcat} had been rewritten with new and poorly-implemented ``features''. For example, it would attempt to identify and throttle log tags that were generating too much output. But it did this by performing a slow and CPU-intensive linear search over its internal buffer. Which, because it is stored as a linked list, generates a huge amount of heap activity when log lines are removed. We assume that these changes were made to better support the primary use of \texttt{logcat}---local app debugging. But for our purposes this represented a serious regression. Not only did \texttt{logcat} begin to drop tags mysteriously---those that it had deemed too verbose---but its CPU load also began to be a problem. Luckily there was a way to disable the new behavior and fall back to the existing simpler logging system. \end{comment} \subsubsection{Small, Developer-Heavy Teams Are Best} \lesson{Testbed development requires many lines of code and few if any new ideas.} A typical systems research project that faculty are used to leading involves the exploration of many new ideas through software prototypes. Testbed development is different. It involves the reliable implementation of a few simple ideas---less brainstorming and more testing---less creativity and more coding. As a result, it requires a different kind of team than would be assembled to conduct a research project. Our experience has been that too many faculty trying to lead a testbed development project tend to slow things down. They tend to come up with ideas faster than available developers can implement them, and have a hard time focusing on the core tasks that need to be done well. In a research project having a bunch of students chasing after a bunch of ideas is fine and even productive. In a testbed project, without new ideas to explore, it's more important to focus on doing a few things well. As funding for \textsc{PhoneLab}{} dried up, our team shrunk naturally---from five active faculty and three full-time graduate students; to a single faculty member, one part-time graduate developer, and one part-time undergraduate administrator. Far from suffering as staffing was reduced, the testbed actually benefited from a lower decision maker to developer ratio. A lean project team also helps avoid building unnecessary things, as described previously. \section{Whither Smartphone Testbeds?} \label{sec:discussion} Public testbeds have a rich history in the systems and networking community. EmuLab, PlanetLab, and MoteLab helped accelerate research in networking, planetary-scale systems, and wireless sensor networks. \textsc{PhoneLab}{} has successfully supported multiple research experiments and generated a great deal of useful data. We hope that it has had a beneficial effect on the mobile systems community. But our experience with \textsc{PhoneLab}{} has made us concerned about the future of this kind of shared infrastructure. Public testbeds require three types of support to succeed. First, they need initial and continued funding. Second, other incentives have to exist encouraging people to build and operate them. Third, they need community buy-in through active experimentation and norms that encourage and require experimentation at scale to validate new ideas. Today, all three of these sources of support seem increasing uncertain. We discuss each in turn below. \subsection{Testbed Funding} At least in the United States, the days where it was easy to get and keep testbeds funded seem behind us. For example, the EmuLab networking testbed received regular infusions of funding from the NSF. Neither PlanetLab nor MoteLab were as successful as EmuLab at obtaining funding, and neither were we. A move toward smaller and more focused awards may make it more difficult to make the significant investments required to build community infrastructure. User-facing testbeds face their own unique funding challenges. Equipment-based testbeds have large up-front costs and low continuing costs. The testbed funding programs that we are familiar with are set up to reflect this, and often place limits on the amount of operational support that can be included. In contrast, user-facing testbeds can have both large up-front costs and high continuing costs. Continuing to operate \textsc{PhoneLab}{} requires not only interacting with experimenters, but continuing to handle billing and service requests for \textsc{PhoneLab}{} participants. Grants for testbeds have also grown shorter, which also challenges user-facing projects. It took us several years to build up a suitable participant base, by which point our funding had almost expired. We have considered other funding models. We are not in the position to establish a consortium of the kind that successfully funded PlanetLab. Nor do we think that it would be a successful model for smartphone platform experimentation. The small number of companies with the ability to deploy Android platform modifications have the ability to experiment on millions of users. So this is quite a different marketplace than the somewhat larger number of companies with an interest in building planetary-scale systems. We have also considered charging groups to use \textsc{PhoneLab}{}. But this runs counter to an established tradition in the research community of offering shared infrastructure free of charge. We also did not want to create additional barriers for groups willing to perform the difficult task of modifying Android. We hope that funding agencies will consider the challenges of user-facing systems as they plan the next generation of mobile system testbeds. There are exciting efforts underway in the US to build city-scale testbeds that combine wide-area wireless networks with mobile and embedded devices. These testbeds must integrate with smartphones and other user-facing devices. Yes---that does make them much harder and more expensive to operate. But cities of the future will still have people living in them---at least we hope. \subsection{Operator Incentives} More significant public funding for earlier testbeds also helped create an incentive for groups to build and operate them. EmuLab grants, for example, were large enough not only to support testbed operations, but also help support a successful networking research group. But the move to smaller, shorter, and more focused grants removes this incentive for groups to operate testbeds. Financial incentives for operators are important, but so is community recognition. It is also much cheaper. We hope that the mobile systems community will continue to publish papers describing important tools and infrastructure, even if they do not contain research discoveries. From an efficiency standpoint, building a testbed is probably the worst way to generate a research paper. But if there is no way to publish papers about tools and testbeds, it further drains motivation from their creators and maintainers. \subsection{Community Buy-In} Finally, research communities need to support testbeds by using them. This is not as easy as ``If you build it, they will come.'' We have built \textsc{PhoneLab}{}, made considerable efforts to publicize the project, and make experimentation as simple as possible. But we have never been satisfied the amount that \textsc{PhoneLab}{} was used by the mobile system research community. Why didn't people use \textsc{PhoneLab}{}? It is true that modifying Android is hard, and no amount of instructions on our part can mitigate the difficult of experiment-specific changes. But experimenters have to make these changes anyway, regardless of whether they deploy them on \textsc{PhoneLab}{} or not. We also do require that experimenters receive IRB approval, for reasons explained earlier, and know for a fact that that has turned some away. But at many institutions this is more of a nuisance than a good reason to not do a large-scale experiment. Given that AOSP is more of a code dump than an open source project, there is also not an easy route for successful changes to make their way into actual Android releases. But this does not distinguish research done on \textsc{PhoneLab}{} from many other kinds of system building where it is the ideas, rather than the artifacts, that may someday have an impact on a product. We believe that the most important reason is that community has not demanded that researchers perform larger-scale experiments. To a certain degree, as long as researchers can get away with publishing papers based on small-scale studies, they will continue to do so. Running experiments on testbeds like \textsc{PhoneLab}{} not only takes time and energy, but also may challenge conclusions drawn from small-scale studies. We regularly read papers that present results from small-scale studies that could have been run on \textsc{PhoneLab}{}. Stronger community norms are needed to encourage researchers to make use of available testbed facilities when appropriate. \section{Related Work} \label{sec:related} The \textsc{NetSense}{}~\cite{striegel2013lessons} project has been using smartphones to study the social interaction between college students. Free Nexus~S smartphones were distrusted to 200 university freshmen for two years. The smartphones ran modified CyanogenMod and instrumentation was added to log the communication events---such as phone calls, SMS, Facebook posts and Bluetooth proximity. Unlike \textsc{PhoneLab}{}, NetSense focuses on behavioral rather than systems experiments. The testbed is not open, nor is there a way to distribute platform modifications. At this point NetSense has moved to running as an app and utilizing a ``bring your own device'' model, rendering it complicated or impossible to perform platform experiments. LiveLabs~\cite{misra2013livelabs,balan2014livelabs,jayarajah2016livelabs} is a human behavioral experiment testbed utilizing smartphones. They do not hand out smartphones nor control the platform, but instead deploy experiment software on participants' own devices. Because of this, LiveLabs is able to scale up to several thousands of participants spanning three venues, including university campus, a resort island and a large convention center. LiveLabs has different aims than \textsc{PhoneLab}{}. Its goal is to enable more pervasive computing experiments, rather than work on smartphone systems. Finally, SmartLab~\cite{larkou2013smartlab} is a smartphone testbed consisting of 40 Android smartphones. The smartphones are connected to a hub via USB and user interactions are simulated through a web-based remote screen terminal. The devices are neither mobile nor used by real users. \textsc{PhoneLab}{} provides a level of realism that SmartLab lacks. There are also various attempts to deploy experiments as apps on software marketplaces. MobiPerf~\cite{huang2011mobiperf} is an Android app that utilizes the Mobilyzer~\cite{nikravesh2015mobilyzer} library to perform network measurements, such as bandwidth and latency testing. The app was deployed on the Google Play store and has over 10K installations so far. Device Analyzer~\cite{wagner2013device} is a Android data collection tool that collects various information at background, such as phone charging status, phone calls, Bluetooth proximity, and so on. Different with MobiPerf, Device Analyzer does not provide value as the app and relies on voluntary participation. Compared to app-based measurement tools, \textsc{PhoneLab}{} has access to unfiltered more detailed information by instrumenting the smartphone platform. \section{Conclusion} \label{sec:conclusion} To conclude, we have described the \textsc{PhoneLab}{} smartphone platform testbed. We have provided a description of the testbed and an overview of how the testbed works. We have described example \textsc{PhoneLab}{} experiments and provided an overview of available \textsc{PhoneLab}{} datasets. We have attempted to distill some of the lessons that we have learned while building and operating \textsc{PhoneLab}{}, and discussed some of the implications of our experiences for the next generation of mobile systems testbeds. Unfortunately, funding for \textsc{PhoneLab}{} will run out at the end of next year, and so experimentation will cease in mid-February 2017. We will continue to provide access to our data sets after that point, and offer up our software for anyone with similar data collection needs. Although \textsc{PhoneLab}{} is ending in its current form, we are committed to maintaining experimental access to this important codebase. We plan to approach the CyanogenMod community to see if they are willing to participate in a future incarnation of \textsc{PhoneLab}{}. Experiments that only include modders will lack the realism that our current participant base provides. But this approach may allow us to continue platform experiments at an even lower overhead. \clearpage { \footnotesize \bibliographystyle{acm}
\section{Introduction} Polar codes are class of error correction codes that have been proven to achieve channel capacity at infinite lengths \cite{Arikan2009}. As such, they have been selected for control channel use in the 5\textsuperscript{th} generation (5G) 3GPP standard for enhanced mobile broadband \cite{3GPP}. Since polar codes have now entered the scope of commercial use, researching methods to maximize their practicality is crucial. However, polar codes have limitations that preclude their immediate practicality. The primary decoding technique is known as successive cancellation and is a serial algorithm by nature. This shortcoming implies that polar decoders are latency limited and have undesirable throughput. Further, polar codes of short to medium codeword length have inferior error correction performance when compared with other state-of-the-art error correction codes. List decoding allows for a considerable improvement in error correction potential, especially when the polar code is concatenated with a CRC \cite{Tal2015}. Additionally, fast decoding techniques, such as fast simplified successive cancellation, have been proposed, which allow for substantial latency reduction \cite{Sarkis2014}. This algorithm identifies simple linear codes that are embedded in the intermediate stages of a successive cancellation decoder. Rather than decoding these stages in the typical manner, the simplified decoders are applied, significantly reducing the number of decoding operations. Another drawback associated with polar codes is that their codeword length is limited to powers of two. This property is a result of the recursive Kronecker product expansion of the $2 \times 2$ polarizing matrix proposed by Ar{\i}kan. In practice, it is desirable to utilize error correction codes that can attain any length. Length-matching techniques, such as puncturing \cite{Niu2013} and shortening \cite{Wang2014}, have been proposed, but these methods are not ideal due to additional optimization requirements and decoding complexity that is not directly related to their codeword length. Nonetheless, puncturing and shortening methods have been incorporated into the polar code scheme of the 5G standard. Multi-kernel (MK) polar codes were proposed in order to overcome the lack of length flexibility in conventional polar coding \cite{Benammar2017}. This method allows incorporating additional polarizing matrices of size larger than two in conjunction with Ar{\i}kan's matrix to build a polar code with more flexibility in codeword length. Specifically, a ternary $3 \times 3$ matrix was proposed, and so MK polar codes can have lengths that are powers of two, powers of three, or a product of both. Although additional polarizing matrices of larger sizes have been proposed \cite{Lin2015}, among them the $3 \times 3$ matrix offers a desirable combination of a sufficiently high polarization exponent and only a small increase in decoding complexity. Fast simplified successive cancellation (Fast-SSC) decoders only exist for conventional polar codes, and so we propose an extension to existing fast decoding techniques that makes them compatible with MK codes. We offer proofs for fast decoding methods that are not trivially applied to MK codes, and we generalize the techniques to be usable with any construction of MK polar codes that use both the Ar{\i}kan and ternary polarization matrices. Though generalized implementations are possible, we demonstrate that efficient applications of these techniques are permitted under certain code construction constraints. We find that MK compatible Fast-SSC reduces computation complexity by a minimum of 72 \% in all cases considered in this study. The remainder of this paper is organized as follows: Section \ref{section:pc} reviews polar code preliminaries, including encoding and decoding, and outlines code optimization methods used for MK polar codes. Section \ref{section:fssc} reviews the existing fast decoding scheme and proposes extensions for ternary compatibility along with the necessary proofs. Section \ref{section:analysis} outlines the latency reduction of the fast MK decoder and draws comparisons with equivalent length matching techniques. \section{Polar Codes} \label{section:pc} Polar codes, denoted $\mathcal{PC}(N, K)$, are linear block codes that have a codeword length of $N$, message length $K$, and rate $R = \frac{K}{N}$. Channel polarization is a phenomenon in which $N$ copies of channel $W$ are transformed into $N$ synthetic channels with either increased or decreased reliability relative to $W$ \cite{Arikan2009}. The $K$ most reliable channels are designated as the information set $\mathcal{I}$, and selected to transmit information. The $N-K$ remaining channels comprise frozen set $\mathcal{F}$. A message $\bm{a}$ of length $K$ is expanded into the sourceword $\bm{u} = (u_0, u_1, \hdots, u_{N-1})$ by placing the elements of $\bm{a}$ into indices from $\mathcal{I}$, while all indices in $\mathcal{F}$ are set to 0 and considered frozen. The codeword $\bm{x} = (x_0, x_1, \hdots, x_{N-1})$ can be encoded by computing $\bm{x} = \bm{u \cdot G}$, where the generator matrix $\bm{G} = \bm{T_2}^{\otimes n}$. In other words, $\bm{G}$ is equal to the Kronecker product of the matrix $\bm{T_2} = \bigl[\begin{smallmatrix} 1 & 0 \\ 1 & 1 \end{smallmatrix}\bigr]$ that has been carried out $n \in \mathbb{N}^{+}$ times. $\bm{T_2}$ is the polarizing matrix proposed by Ar{\i}kan in \cite{Arikan2009} and will be referred to in this paper as the Ar{\i}kan kernel. \subsection{Multi-Kernel Polar Codes} Utilization of alternate polarizing matrices, known as kernels, in the formulation for $\bm{G}$ was proposed in \cite{Gabry2016} and outlined the possibility of obtaining polar codes that are not constrained to lengths that are powers of $2$. The ternary kernel $\bm{T_3} = \Bigl[\begin{smallmatrix} 1 & 1 & 1 \\ 1 & 0 & 1 \\ 0 & 1 & 1 \end{smallmatrix}\Bigr]$ was proposed as the $3 \times 3$ polarizing matrix. $\bm{T_3}$ was shown to be optimal for polarization in \cite{Benammar2017}, though it has a polarization exponent that is less than that of $\bm{T_2}$. $\bm{T_3}$ can be used as a Kronecker product constituent in conjunction with the Ar{\i}kan kernel to produce any polar code of length $N = 2^n3^m$ where $n,m\in \mathbb{N}$. The native length flexibility of polar codes is thus improved. However it should be noted that the order of the kernels in the Kronecker product affects $\bm{G}$. For example, a polar code of length $N = 6$ could be encoded with either $T_2 \otimes T_3$ or $T_3 \otimes T_2$, which are two unique generator matrices. For clarity, we can refer to a kernel vector $k$ that stores the sizes of the kernels in order as they pertain to the generator matrix. The generator matrix can then be defined as \begin{equation} \bm{G} = \bigotimes_{i=0}^{m+n} \bm{T_{k_i}}. \end{equation} Observe that the kernel order in a MK Tanner graph is reversed from that of the the Kronecker product, as can be seen in Fig. \ref{fig:mk_6}. Further, additional kernels of size higher than 3 have been proposed, although the Ar{\i}kan and ternary kernel are the most common and least complex to use. As such, we will only investigate MK polar codes derived from these two kernels. Polar codes that use only the Ar{\i}kan kernel will be further referred to as Ar{\i}kan polar codes. \subsection{Successive Cancellation Decoding} Decoding of MK polar codes can be accomplished using successive cancellation (SC) \cite{Arikan2009}. The encoding Tanner graph is restructured into a tree with $M=n+m$ stages, which visualizes the SC algorithm. SC involves a tree search with left-to-right branch priority, where the leaf nodes in the tree represent the estimated sourceword $\bm{\hat{u}}$. The top of the tree serves as the decoder input, which is the received soft data vector $\bm{y}$ in the form of real log likelihood ratios (LLR). Beginning from the top of the tree, the branches are traversed by applying LLR transformations and storing the results in the proceeding stage. Each stage $S \in \left[0, M\right]$ pertains to either the Ar{\i}kan or ternary kernel and contains $P = \frac{N}{p}$ nodes, where $p = \prod_{i=1}^{S-1} k_i$. At the bottom stage of the tree, \emph{ie} $S=0$, $p = 1$. Each node in stage $S$ stores both $p$ LLRs and bit partial sums and invokes $\frac{p}{2}$ or $\frac{p}{3}$ transformations upon entering, depending on the kernel of stage $S-1$. If the stage $S$ pertains to the Ar{\i}kan kernel, the functions $f$ or $g$, found in eq. \ref{eq:arik_dec}, are applied to the left and right branches, respectively. \begin{equation} \label{eq:arik_dec} \begin{aligned} f(l_0,l_1,) &= l_0 \boxplus l_1, \\ g(l_0,l_1, u_0) &= (-1)^{u_0} \cdot l_0 + l_1 \\ \end{aligned} \end{equation} In the case that stage $S$ corresponds to the ternary kernel, the functions $\lambda_0$, $\lambda_1$, and $\lambda_2$ are applied to the left, center, and right branches, respectively. \begin{equation} \label{eq:mk_dec} \begin{aligned} \lambda_0(l_0 ,l_1,l_2) &= l_0 \boxplus l_1 \boxplus l_2, \\ \lambda_1(l_0 ,l_1,l_2,u_0) &= (-1)^{u_0} \cdot l_0 + l_1 \boxplus l_2, \\ \lambda_2(l_1,l_2,u_0,u_1) &= (-1)^{u_0} \cdot l_1 + (-1)^{u_0 \oplus u_1} \cdot l_2, \end{aligned} \end{equation} where $a \boxplus b \approx \sign{(a)}\sign{(b)}\min{(|a|,|b|)}$, $l_0, l_1, l_2$ symbolize LLR values, and $u_0, u_1$ denote a partial sum located in a left or center node, respectively. When a leaf node is entered, a hard bit decision is made using the LLR stored as \begin{equation} \label{eq:hd} h_l(l_i) = \begin{cases} 0 & \text{if } l_i > 0 \text{ or } i \in \mathcal{F} \\ 1 & \text{otherwise} \end{cases}. \end{equation} A modified version of this hard decision function that neglects whether $i \in \mathcal{F}$ will be referenced throughout this paper as $h()$. After computing a bit decision or returning from a right branch, $p$ partial sum updates are executed at the previous node before moving down another branch. The partial sum updates are also referred to as \textit{combine} operations. For Ar{\i}kan stages, the combine operation is $c_2(s_0, s_1) = (s_0 \oplus s_1, s_1)$, while for a ternary stage it is $c_3(s_0, s_1, s_2) = (s_0 \oplus s_1, s_0 \oplus s_2, s_0 \oplus s_1 \oplus s_2)$. Ostensibly, an SC decoder can be expressed as schedule of $f$, $g$, $\lambda_0$, $\lambda_1$, and $\lambda_2$ operations, where the total number of operations described by $(n+m)N$. Fig. \ref{fig:mk_6:dec} depicts a schedule representation of an SC decoder that contrasts from the tree representation in Fig. \ref{fig:n18_fast_tree}. \begin{figure}[t] \centering \hspace{-13mm} \begin{subfigure}[t]{.30\textwidth} \includegraphics[scale = 0.3]{figs/enc_mk_6.pdf} \caption{Encoder} \end{subfigure} \begin{subfigure}[t]{.1\textwidth} \includegraphics[scale = 0.3]{figs/dec_mk_n6.pdf} \caption{Decoder} \label{fig:mk_6:dec} \end{subfigure} \caption{Multi-kernel polar code with $N=6$ and $G = T_2 \otimes T_3$.} \vspace*{-\baselineskip} \label{fig:mk_6} \end{figure} \subsection{Frozen Set Design} In order to select $K$ indices to constitute $\mathcal{I}$, all $N$ indices must be sorted by reliability. Several accurate reliability ordering algorithms exist for conventional polar codes. Among them is Ar{\i}kan's Bhattacharyya parameter expansion \cite{Arikan2009}, which has only been proven to be exact for binary erasure channels, although it can be used as an approximation when transmitting over a Gaussian channel. A more accurate reliability representation can be generated using Trifonov's Gaussian Approximation (GA) \cite{Trifonov2012}. The process assumes all LLRs at each stage of the decoder are Gaussian distributed, and so the absolute value of the mean of each index is tracked through each LLR transformation from one stage to the next. To begin, all $N$ indices have the same distribution as the channel $W$. Assuming an AWGN channel with mean $0$ and variance $\sigma^2$, each index is initialized as \begin{equation*} z_i^N = \frac{2}{\sigma^2}=\frac{2}{(2R\frac{E_b}{N_0})^{-1}}=4R\frac{E_b}{N_0} \text{ for } i \in [0,N). \end{equation*} To compute the means of the next stage, apply the following equations if the stage corresponds to an Ar{\i}kan kernel: \begin{align*} z_{2i - 1}^{\frac{N}{2}} &= \phi^{-1}(1-(1-\phi(z_i^N ))^2), \\ z_{2i \textcolor{white}{- 0}}^{\frac{N}{2}} &= 2z_i^N. \nonumber \end{align*} If the stage corresponds to a ternary kernel, instead apply the following: \begin{align*} z_{3i - 2}^{\frac{N}{3}} &= \phi^{-1}\Big(1\!\!-\!\Big(1\!\!-\!\phi\big(\phi^{-1}(1\!\!-\!(1\!\!-\!\phi(z_i^N ))^2)\big)\Big)(1\!\!-\!\phi(z_i^N))\Big), \nonumber \\ z_{3i - 1}^{\frac{N}{3}} &= \phi^{-1}(1-(1-\phi(z_i^N ))^2) + z_i^N, \\ z_{3i\textcolor{white}{- 0}}^{\frac{N}{3}} &= 2z_i^N, \nonumber \end{align*} where $\phi(x)$ and $\phi(x)^{-1}$ are approximated as \begin{align} \phi(x) &= \begin{cases} e^{0.0564 x^2 - 0.485x} & x < 0.8678 \\ e^{\alpha x^\gamma + \beta} & \text{otherwise} \end{cases} \text{ and} \nonumber \\ \phi^{-1}(x) &= \begin{cases} 4.3049(1 - \sqrt{1 + 0.9567 \log{x}}) & x > 0.6846 \\ ({a \log{x} + b})^{c} & \text{otherwise} \end{cases}, \nonumber \end{align} where $\alpha = -0.4527, \beta = 0.0218, \gamma = 0.86, a = \frac{1}{\alpha}, b = \frac{-\beta}{\alpha}$, and $c = \frac{1}{\gamma}$. These approximations are available from the open source error correction code simulation tool \textit{aff3ct} \cite{Cassagne2017a}. The exact formulas devised by Trifinov can be found in \cite{Trifonov2012}. Proceeding to transform the LLR means for all stages will result in $N$ unique values, which can serve as a basis for which to rank the indices in ascending order. From here, $\mathcal{I}$ can be populated with the $K$ highest values and $\mathcal{F}$ will be composed of the remaining $N-K$ indices. \subsection{Kernel Order Optimization} \label{section:kernel_order} In \cite{Benammar2017}, it was suggested that the order of kernels for a MK polar code can be optimized by searching all permutations for the order that produces the highest sum of bit reliabilities among the $K$ best indices. While this method is effective, it is not desirable to have this additional optimization step when comparing the practicality of MK polar codes with Ar{\i}kan polar codes. \begin{figure}[t] \hspace{5mm} \centering \input{figs/kernel_order_plot.tikz} \caption{FER curves for MK polar code with $N=768,2304$ sweeping rates $R=(\frac{1}{4},\frac{1}{2},\frac{3}{4})$ (left to right) comparing kernel ordering strategies.} \vspace*{-.5\baselineskip} \label{fig:fer:768} \end{figure} Fig. \ref{fig:fer:768} demonstrates that for long MK polar codes, the kernel optimization step is largely inconsequential. The figure depicts MK polar codes with $N=768$ and $N=2304$ sweeping rates $R=(\frac{1}{4},\frac{1}{2},\frac{3}{4})$ under SC decoding. The codes are constructed using GA for each point in the plot to ensure that the frozen sets are optimal throughout the simulation. Three different kernel ordering strategies are investigated. The \textit{First} and \textit{Last} labels indicate that kernels are ordered such that the ternary kernels serve as either the first or last components of the Kronecker product, respectively. \textit{Highest Reliability} ensures that the kernel order is optimized for the highest overall reliability using the method outlined in the previous paragraph. It can be concluded that placing the ternary kernel in the Kronecker product at either the first or last positions produces comparable error correction results against an optimized kernel order for long polar codes. Further, observe that low rate codes have better performance using \textit{Last}, while the opposite configuration performs best for medium to high rate codes. \section{Fast-SSC Decoding} \label{section:fssc} The essence of fast SC decoding is to prune the decoding tree to reduce the schedule and thus decrease latency \cite{Sarkis2014}. This decoding technique is known as fast simplified SC (Fast-SSC) and works by identifying specific frozen set patterns that mirror embedded subcodes that can be decoded efficiently. These fast nodes are decoded with maximum likelihood, which indicates that FSSC retains the same error correction performance of SC. This section will outline the four basic fast nodes that are currently known and extend them to be compatible with the $\bm{T_3}$ kernel. \begin{figure*}[t] \makebox[\linewidth][c]{ \centering \hspace{0mm} \begin{subfigure}[t]{.5\textwidth} \centering \input{figs/n18_fssc_tree_first.tikz} \caption{$\mathcal{PC}(18,9)$ with $\bm{G}=\bm{T_2} \otimes \bm{T_3} \otimes \bm{T_3}$} \label{fig:n18_fast_tree:a} \end{subfigure} \begin{subfigure}[t]{.5\textwidth} \centering \input{figs/n18_fssc_tree_last.tikz} \caption{$\mathcal{PC}(18,11)$ with $\bm{G}=\bm{T_3} \otimes \bm{T_3} \otimes \bm{T_2}$} \label{fig:n18_fast_tree:b} \end{subfigure} } \caption{SC decoding trees (light grey) which are pruned to their Fast-SSC counterparts (black). White and grey leaf nodes represent frozen and information bits, respectively. Blue nodes are REP3A, pink nodes are REP3B, and green nodes are SPC.} \label{fig:n18_fast_tree} \end{figure*} \subsection{Reduced Latency Nodes} In this section, we will investigate the compatibility of the four basic reduced latency nodes with the ternary kernel. We will present generalizations of each node type for any kernel ordering, though we also propose practical implementations that are valid under certain constraints. \subsubsection{Rate-0 Node} A Rate-0 nodes one that leads to a set of leaf nodes with indices $i \in \mathcal{F}$ does not need to be traversed further since it is known that all $p$ leaf nodes and partial sums are 0 \cite{Alamdar-Yazdi2011}. Further, any node that leads to a set of intermediate nodes that are all Rate-0 is also Rate-0. This relationship does not change when considering the ternary kernel since encoding $(0,0,0)$ with $\bm{T_3}$ results in $(0,0,0)$. \subsubsection{Rate-1 Node} Any node that is parent to leaf nodes whose indices $i \in \mathcal{I}$ is considered a Rate-1 node, as are any nodes that are parent to only Rate-1 nodes. Rate-1 nodes can be decoded by setting the $p$ partial sums at that stage with a hard decision on each soft LLR in that node and then updating the values of the leaf nodes by hard decoding the partial sums \cite{Alamdar-Yazdi2011}. Specifically, the partial sums vector $\bm{\beta_v}$ in node $v$ are obtained from the LLR vector $\bm{\alpha_v}$ by $\bm{\beta_v} = h(\bm{\alpha_v})$. The estimated sourceword values in $\bm{\hat{u}_v} \subset \bm{\hat{u}}$ with indices in $\mathcal{I}_v \subset \mathcal{I}$ are hard decoded using $\bm{\hat{u}_v} = \bm{\beta_v}\bm{G}_{p}^{-1}$ where $\bm{G}_{p}$ is the generator matrix obtained by performing the Kronecker product of kernels pertaining to all stages below that of node $v$. Alternatively, $\bm{\hat{u}_v}$ may be estimated by propagating the partial sums $\bm{\beta_v}$ to the leaf nodes with inverse partial sum equations for each stage where $c_2^{-1} = c_2$ and $c_3^{-1}(s_0, s_1, s_2) = (s_0 \oplus s_1 \oplus s_2, s_1 \oplus s_2, s_0 \oplus s_2)$. The following is a proof that outlines the validity of this decoding method for stages corresponding to $\bm{T_3}$. Each Rate-1 node $v$ has the property that \begin{equation} \label{eq:rate_1} \bm{\beta_{v_l}} = h(\bm{\alpha_{v_l}}), \bm{\beta_{v_c}} = h(\bm{\alpha_{v_c}}), \bm{\beta_{v_r}} = h(\bm{\alpha_{v_r}}). \end{equation} where $\bm{\alpha_{v_l}}$, $\bm{\alpha_{v_c}}$, and $\bm{\alpha_{v_r}}$ are the LLRs in the three branches below node $v$, as depicted in Fig. \ref{fig:n18_fast_tree:a}. For shorthand, let $e = 3i$, $o = 3i + 1$, and $u = 3i + 2$ for all fixed $i$. Recall that the $\boxplus$ operator has the property \begin{equation} h(a \boxplus b) = h(a) \oplus h(b) \text{ if } ab \ne 0. \end{equation} And so assuming that $\alpha_v[e] \ne 0$, $\alpha_v[o] \ne 0$, and $\alpha_v[u] \ne 0$ indicates that \small \vspace*{-\baselineskip} \begin{align} h(\alpha_{v_l}[i]) &= h(\alpha_v[e]) \oplus h(\alpha_v[o]) \oplus h(\alpha_v[u]) ; \text{ thus} \nonumber \\ h(\alpha_{v_c}[i]) & \stackrel{(a)}{=} h(\alpha_v[o] \boxplus \alpha_v[u] + (1-2h(\alpha_{v_l}[i]))\alpha_v[e]) \nonumber \\ &= h(\alpha_v[o] \boxplus \alpha_v[u] \nonumber \\ & \qquad + (1-2(h(\alpha_v[e]) \oplus h(\alpha_v[o]) \oplus h(\alpha_v[u])))\alpha_v[e]) \nonumber \\ &= h(\alpha_v[o] \boxplus \alpha_v[u]) = h(\alpha_v[o]) \oplus h(\alpha_v[u]) \nonumber \\ h(\alpha_{v_r}[i]) & \stackrel{(a)}{=} h((1\!-\!2h(\alpha_{v_l}[i]))\alpha_v[o] \nonumber \\ & \qquad + (1\!-\!2h(\alpha_{v_l}[i] \!\oplus\! \alpha_{v_c}[i]))\alpha_v[u]) \nonumber \\ &= h((1-2(h(\alpha_v[e]) \oplus h(\alpha_v[o]) \oplus h(\alpha_v[u])))\alpha_v[o] \nonumber \\ & \qquad + (1-2(h(\alpha_v[e]) \oplus h(\alpha_v[o]) \oplus h(\alpha_v[u]) \nonumber \\ & \qquad \qquad \oplus h(\alpha_v[o]) \oplus h(\alpha_v[u]) ))\alpha_v[u]) \nonumber \\ &= h(\alpha_v[e]) \oplus h(\alpha_v[u]) \nonumber \end{align} \vspace*{-.2\baselineskip} \normalsize where (a) uses eq. \ref{eq:rate_1}. Further, \vspace*{-.1\baselineskip} \small \begin{align*} \beta_v[u] &= \beta_{v_l}[i] \oplus \beta_{v_c}[i] \oplus \beta_{v_r}[i] \\ & \stackrel{(b)}{=} h(\alpha_{v_l}[i]) \oplus h(\alpha_{v_c}[i]) \oplus h(\alpha_{v_r}[i]) \\ &= h(\alpha_v[e]) \oplus h(\alpha_v[o]) \oplus h(\alpha_v[u]) \\ & \qquad \oplus h(\alpha_v[o]) \oplus h(\alpha_v[u]) \\ & \qquad \oplus h(\alpha_v[e]) \oplus h(\alpha_v[u]) = h(\alpha_v[u]); \text{ thus} \\ \beta_v[o] &= \beta_{v_l}[i] \oplus \beta_{v_r}[i] \stackrel{(b)}{=} h(\alpha_{v_l}[i]) \oplus h(\alpha_{v_r}[i]) \\ &= h(\alpha_v[o]) \\ \beta_v[e] &= \beta_{v_l}[i] \oplus \beta_{v_c}[i] \stackrel{(b)}{=} h(\alpha_{v_l}[i]) \oplus h(\alpha_{v_c}[i]) \\ &= h(\alpha_v[e]) \end{align*} \normalsize where (b) also makes use of eq. \ref{eq:rate_1}. Hence, the proof is completed and asserts confirmation that decoding of a Rate-1 node can be computed using the same method for $\bm{T_3}$ as for $\bm{T_2}$. The original proof in \cite{Alamdar-Yazdi2011} describes through induction that this method of decoding holds for a Rate-1 node of any depth. \subsubsection{Single-Parity Check Node} For an Ar{\i}kan polar code of rate $R = \frac{N-1}{N}$, the lowest order bit $u_0$ will be frozen. Such a polar code can be interpreted as a single-parity check (SPC) code. For instance, if $N=4$, then $\bm{u}=(0,a_0,a_1,a_2)$ and $\bm{x}=(a_0 \oplus a_1 \oplus a_2, a_0\oplus a_2, a_1 \oplus a_2, a_2)$. An SC node $v$ with $\mathcal{F}_v$ that reflects this pattern can be optimally decoded with low complexity. First, the partial sums $\bm{\beta_v}$ are estimated with a hard decision in the usual fashion, \emph{ie} $\bm{\beta_v} = h(\bm{\alpha_v})$. The parity of $\bm{\beta_v}$ is then computed using \begin{equation} \text{parity } = \bigoplus_{i=0}^{N_v - 1} h(\beta_v[i]). \end{equation} If the parity constraint is not fulfilled, then the least reliable bit at index $j$ is flipped as in \begin{equation} \beta_v[j] := \beta_v[j] \oplus \text{parity}, \end{equation} where $j = \argmin_i|\alpha_v[i]|$. Finally, $\bm{\hat{u}_v}$ is computed using the same hard decoding procedure as a Rate-1 node. In MK polar codes with rate $R = \frac{N-1}{N}$, $u_0$ will always be frozen regardless of the order of kernels, and so MK polar codes also have an embedded SPC property. Observe that if $N=3$, then $\bm{u}=(0,u_0,u_1)$ and $\bm{x}=(u_0, u_1, u_0 \oplus u_1)$. As such, SPC nodes can be identified and decoded in exactly the same way as with polar codes using only the Ar{\i}kan kernel. \subsubsection{Repetition Node} \label{section:fssc:rep} In an Ar{\i}kan polar code with rate $R = \frac{1}{N}$, only the highest order bit $u_{N-1}$ will contain information. This frozen set pattern renders the polar code into a repetition (REP) code. Any node $v$ identified as a REP node is decoded simply by summing all soft LLRs and taking a hard decision on the result. The resulting bit is stored in all indices of $\bm{\beta_v}$: \begin{equation} \label{eq:rep_sum} \beta_v[i] = h\bigg(\sum_j \alpha_v[j]\bigg) \text{ for } i,j \in v \end{equation} The partial sum $\bm{\beta_v}$ can then be hard decoded to compute $\bm{\hat{u}_v}$. Alternatively, $\bm{\hat{u}_v}$ can be evaluated more efficiently with \begin{equation} \label{eq:rep_u} \bm{\hat{u}_v}[i] = \begin{cases} 0 & i < N-1 \\ h(\sum_j \alpha_v[j]) & i = N-1 \end{cases} \text{ for } i,j \in v. \end{equation} The ternary kernel also mirrors repetition codes when presented with the same frozen set pattern, although the decoding procedures are more involved. Unlike the Ar{\i}kan kernel, when the highest order bit of a ternary kernel is the only information bit, the data is not repeated in all codeword bits. Specifically, if $N=3$ and $\bm{u}=(0,0,a_0)$, then $\bm{x}=(0, a_0, a_0)$. In this example, repetition decoding can still be carried out, supposing the first index is excluded in the sum in eq. \ref{eq:rep_sum}. Generally, a REP node $v$ at stage $S$ has REP pattern $P_v$, which is determined for any combination of Ar{\i}kan or ternary kernels by {} performing a recursive Kronecker product of repetition patterns $P_2 = (1,1)$ or $P_3=(0,1,1)$: \vspace*{-\baselineskip} \begin{equation} P_v = \bigotimes_{i=0}^{S-1} P_{k_i}. \end{equation} Eq. \ref{eq:rep_sum} can then be modified to accommodate this new constraint: \vspace*{-.5\baselineskip} \begin{equation} \label{eq:rep_sum_mk} \beta_v[i] = h\bigg(\sum_j \alpha_v[j] \cdot P_v[j]\bigg) \text{ for } i,j \in v \end{equation} Table \ref{table:rep_patterns} outlines several examples of REP patterns with varying kernel orders. Repetition nodes can be appropriately labeled for decoder scheduling purposes depending on the order of kernels. A repetition node that is made up of only Ar{\i}kan kernels, previously the only type of REP node, can now be labeled as a \textit{REP2} node. REP nodes comprised of only ternary kernels can be labeled as \textit{REP3A} nodes. Mixed kernel repetition nodes can be labeled \textit{REP3B} or \textit{REP3C} depending on the order of $\bm{T_2}$ or $\bm{T_3}$. Although a MK polar code can be built using any arbitrary order of kernels, it often is the case that the non-Ar{\i}kan kernels are either the first or last constituents in the Kronecker expression used to compute $\bm{G}$. Further, Section \ref{section:kernel_order} demonstrates that assuming the order of kernels without optimization presents comparable error correction results. Moreover, using LDPC WiMAX code lengths as a guideline \cite{Shin2012} suggests that MK polar codes are able to achieve most desired code lengths with only a few stages of non-Ar{\i}kan kernels. Considering this behaviour of kernel orders in MK codes, it is unnecessary to implement generalized ternary repetition nodes as the majority of cases can be efficiently decoded under a few constraints. As such, the scheduling and implementation of MK REP nodes can be simplified by eliminating $P_v$ computation. We limit REP3A nodes to have a maximum size of 27 so that there are only 3 possible $P_v$ that can simply be stored instead of computed. Additionally, we limit REP3B and REP3C nodes to contain only a single ternary stage so that computation of $\bm{\beta_v}$ can be carried out efficiently: \vspace*{-\baselineskip} \begin{align} \beta_{v[i]_{\text{REP3B}}} &= h\bigg(\sum_j \alpha_v[j]\bigg) \text{ for } i, j \in [\frac{N_v}{3}, N_v), \nonumber \\ \beta_{v[i]_{\text{REP3C}}} &= h\bigg(\sum_j \alpha_v[j]\bigg) \text{ for } i \text{ and } j \not\equiv \text{ mod }3. \nonumber \end{align} The summation in eq. \ref{eq:rep_sum} can be modified for REP3B nodes by skipping the first third of indices, while for REP3C node it is modified by skipping every third index. Of course, eq. \ref{eq:rep_u} still applies to ternary repetition nodes. Under the requirement of only a single ternary stage, these nodes do not need to be limited in size. We will utilize these simplifications in our numerical analysis. \begin{table} \centering \begin{tabular}{@{}llcr@{}} \toprule $N_v$ & $\bm{k_v}$ & $P_v$ & Type \\ \cmidrule(r){1-1} \cmidrule(l){2-2} \cmidrule(l){3-3} \cmidrule(l){4-4} 3 & (3) & (0,1,1) & REP3A \\ 6 & (2,3) & (0,1,1,0,1,1) & REP3C \\ 6 & (3,2) & (0,0,1,1,1,1) & REP3B \\ 8 & (2,2,2) & (1,1,1,1,1,1,1,1) & REP2 \\ 9 & (3,3) & (0,0,0,0,1,1,0,1,1) & REP3A \\ 12 & (2,2,3) & (0,1,1,0,1,1,0,1,1,0,1,1) & REP3C \\ 12 & (3,2,2) & (0,0,0,0,1,1,1,1,1,1,1,1) & REP3B \\ 18 & (2,3,3) & (0,0,0,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1) & REP3C \\ \bottomrule \end{tabular} \caption{Examples of $P_v$ patterns.} \vspace*{-\baselineskip} \label{table:rep_patterns} \end{table} \section{Complexity Reduction Evaluation} \label{section:analysis} \begin{table*}[t] \footnotesize \centering \begin{tabular}{@{}lrrrrrrrrr@{}} \toprule $N$ & $R$ & \# SC Nodes & \# Fast-SSC Nodes & \# R0 & \# R1 & \# SPC & \# REP2 & \# REP3A/B/C & \% Reduction \\ \cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule(r){4-4}\cmidrule(r){5-5}\cmidrule(r){6-6}\cmidrule(r){7-7}\cmidrule(r){8-8}\cmidrule(r){9-9}\cmidrule(l){10-10} \multirow{3}{*}{96} & 0.25 & 158/189 & 37/27 & 7/2 & 1/0 & 4/4 & 0/4 & 1/0 & 76.6/85.7 \\ & 0.5 & 158/189 & 43/45 & 8/5 & 1/5 & 6/3 & 0/3 & 0/0 & 72.8/76.2 \\ & 0.75 & 158/189 & 37/42 & 3/3 & 5/6 & 4/4 & 0/3 & 0/1 & 76.6/77.8 \\ \cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule(r){4-4}\cmidrule(r){5-5}\cmidrule(r){6-6}\cmidrule(r){7-7}\cmidrule(r){8-8}\cmidrule(r){9-9}\cmidrule(l){10-10} \multirow{3}{*}{432} & 0.25 & 654/849 & 101/118 & 15/11 & 4/6 & 16/13 & 0/11 & 4/2 & 84.5/86.1 \\ & 0.5 & 654/849 & 110/136 & 14/9 & 4/7 & 21/19 & 0/15 & 7/0 & 83.2/83.4 \\ & 0.75 & 654/849 & 106/109 & 13/9 & 9/9 & 17/14 & 0/8 & 2/0 & 83.8/87.2 \\ \cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule(r){4-4}\cmidrule(r){5-5}\cmidrule(r){6-6}\cmidrule(r){7-7}\cmidrule(r){8-8}\cmidrule(r){9-9}\cmidrule(l){10-10} \multirow{3}{*}{768} & 0.25 & 1278/1533 & 196/186 & 34/17 & 5/8 & 24/19 & 0/19 & 3/0 & 84.6/87.9 \\ & 0.5 & 1278/1533 & 223/222 & 31/15 & 9/14 & 31/24 & 0/22 & 4/0 & 82.5/85.5 \\ & 0.75 & 1278/1533 & 172/192 & 19/12 & 10/19 & 25/19 & 0/15 & 4/0 & 86.5/87.5 \\ \cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule(r){4-4}\cmidrule(r){5-5}\cmidrule(r){6-6}\cmidrule(r){7-7}\cmidrule(r){8-8}\cmidrule(r){9-9}\cmidrule(l){10-10} \multirow{3}{*}{2304} & 0.25 & 3582/4602 & 409/453 & 62/31 & 8/16 & 71/54 & 0/52 & 5/0 & 88.6/90.1 \\ & 0.5 & 3582/4602 & 487/516 & 63/23 & 17/17 & 86/78 & 0/56 & 8/0 & 86.4/88.8 \\ & 0.75 & 3582/4602 & 395/441 & 45/24 & 27/39 & 60/50 & 0/36 & 9/0 & 88.9/90.4 \\ \bottomrule \end{tabular} \caption{\small Latency reduction of MK polar codes with ternary kernels as last/first Kronecker constituents.} \label{table:latency_reduction} \end{table*} This section outlines the effectiveness of MK compatible Fast-SSC with numerical examples. With a sufficiently large processor, it can be assumed that each node in a decoding tree constitutes a single operation. As such, all measurements of decoding complexity refer to the number of decoding nodes. All polar codes analyzed were constructed using GA with a target $Eb/N0$ of 3dB adopting a BPSK modulation scheme, \emph{ie} $\mathcal{M}=1$. Fig. \ref{fig:fssc_plot} compares the number of computations in Fast-SSC decoders for various length-compatible polar codes over a range of codeword lengths and rates. \textit{Punct QUP} \cite{Niu2013} and \textit{Short WL} \cite{Wang2014} indicate puncturing and shortening patterns that allow for large numbers of frozen sets to be grouped together. Generally, \textit{Punct QUP} and \textit{Short WL} methods have comparable complexity to both kernel orderings of MK polar codes. However, MK codes with a high proportion of ternary stages, such as lengths $N=(216, 324, 648)$, have the fewest decoding operations overall when built with the \textit{Last} kernel ordering. This is a result of the fast decoders for ternary nodes, which decode a larger number of bits simultaneously than would Ar{\i}kan nodes. This is depicted in Fig. \ref{fig:n18_fast_tree:a} where a node in stage $S=2$ decodes 9 bits at once, where as node in the same stage of Fig. \ref{fig:n18_fast_tree:b} decodes only 6 bits at once. Therefore, it may be desirable to construct MK polar codes using the \textit{Last} kernel ordering from a decoding complexity standpoint for particular code lengths. Regarding latency reduction of MK decoding, Table \ref{table:latency_reduction} outlines various comparisons between SC and Fast-SSC along with the node makeup of Fast-SSC decoding schedules. Just as with Ar{\i}kan polar codes, there is a greater latency reduction for extreme rates. This gain is due to the higher proportion of Rate-1 and SPC nodes for high rates and Rate-0 and REP nodes for low rates. Observe that longer MK polar codes have greater latency reduction than short polar codes. It should also be noted that MK polar codes with a higher number of ternary stages have increased latency with the \textit{First} kernel permutation compared with \textit{Last}. Further, the number of ternary repetition nodes is proportionately low, so it is sufficient to consider only the most common cases for a simplified implementation rather than a generalized algorithm as outlined in Section \ref{section:fssc:rep}. \begin{figure}[t] \captionsetup[subfigure]{position=t} \makebox[\linewidth][c]{ \hspace{-5mm} \centering \subcaptionbox*{}{ \input{figs/K_164_skinny.tikz} } \hspace{-7.5mm} \subcaptionbox*{}{ \input{figs/N_768_skinny.tikz} } } \caption{Fast-SSC complexity for (a) $K=164$ and (b) $N=768$ sweeping rates $R\approx\frac{1}{8},\dots,\frac{7}{8}$.} \label{fig:fssc_plot} \end{figure} \section{Conclusion} \label{section:conclusion} In this work, we extended the Fast-SSC polar code decoder to be compatible with MK polar codes. The four basic fast nodes were generalized to be able to decode MK codes with arbitrary kernel orders. We propose simplified implementations of ternary repetition nodes that are valid under imposed constraints that reflect typical MK behavior. We have observed that in all tested cases, a minimum 72\% latency reduction of SC is achievable for MK polar codes. This study can act as a guideline for future work on a hardware implementation of a fast MK decoder. \bibliographystyle{IEEEtran}
\section{Introduction} \label{sec:introduction} There is strong evidence that type Ia supernovae (SNe~Ia) originate from explosions of white dwarfs (WDs) in binary systems. However, both the explosion mechanism and the stellar evolutionary path remain unknown (for a review see \citealt{Livio2018_review}). At least in part, the confusion surrounding the explosion mechanism arises from the fact that in a detonation the burning products are determined primarily by the local density of the fuel being consumed. For instance, carbon will remain mostly unburned at densities $\lesssim 10^{5}\ \rm{g\ cm^{-3}}$ \citep{Shigeyama1992_subChandra, Fink2010_helium}. In principle, models with different progenitor masses can still produce similarly plausible spectra provided that in the evolution up to the actual detonation the density profile of the star becomes similar. For instance, in the delayed detonation transition model (DDT, e.g. \citealt{Khokhlov1991_DDT, Blondin2013_DDT}), a near-Chandrasekhar WD expands during the deflagration phase; the detonation that follows then propagates across lower densities, producing a distribution of elements similar to that of a pure detonation of a sub-Chandrasekhar WD \citep{Sim2010_subChandra}. In this series of papers we use the fast Monte Carlo radiative transfer code {\sc tardis} \citep{Kerzendorf2014_TARDIS} to try to determine whether the spectral features of goups of SNe~Ia can be explained as variations of a single physical parameter. In paper I \citep{Heringer2017_sequence}, we showed that both normal and subluminous events can be reproduced using the same ejecta structure as long as the temperature was properly adjusted, suggesting that these events share a common explosion mechanism. Here, we turn our attention to the distribution of carbon in the ejecta of SN~2011fe, a proto-typical normal event that was discovered possibly within a day of explosion, exhibited carbon and oxygen features in its pre-maximum spectra, and was extensively observed and analyzed (e.g., \citealt{Nugent2011_WD,Parrent2012_carbon,Vinko2012_11fe}). SN~2011fe reached its rest-frame $B$-band peak brightness on 2011 September 10 (MJD 55814.30 $\pm$ 0.06), corresponding to a time after explosion of $\sim$19 days \citep[][M14 hereafter]{Mazzali2014_tomography}. The exact rise time, however, will depend on how the $^{56}$Ni produced by the explosion is distributed in the ejecta--if there is little radioactive material near the surface, a ``dark phase" may follow before any light can escape (e.g. \citealt{Piro_darkphase}). M14 estimated this phase to last $\sim$1 day for SN~2011fe. In principle, the abundance distribution of any given element could serve as a diagnostic tool for explosion mechanisms. However, carbon should be less susceptible to uncertainties pertaining to the precise nucleosynthesis, because the presence of unburned material is determined by a single burning process, compared to the multiple reactions required to form heavier elements. For instance, different groups have computed how much $^{56}$Ni is produced by the detonation of a WD of a given mass, finding discrepancies as large as a factor of 2, possibly due to differences in the nuclear reaction network adopted (see \citealt{Shen2018_ddet} and references therein). Similarly, oxygen is less suitable because it is also a burning product of carbon (though in the nebular phase, which probes the deep interior, is very valuable: for instance, for SN~2010lp, an atypical SN~Ia, it was used to infer an asymmetric explosion; \citealt{Taubenberger2013_nebular}). The usefulness of carbon as a diagnostic tool arises because theoretical models predict the presence of unburned material at widely different regions of the ejecta. For instance, the violent merger model of \citet{Pakmor2012_DD} leaves a large mass fraction ($\sim\!0.1$) of carbon mixed throughout the whole ejecta, while 3D simulations of the DDT scenario predict much more moderate amounts ($\sim\!0.01$) of carbon at velocities of $\sim 10000\ \rm{km\ s^{-1}}$ \citep{Seitenzahl2013_DDT}. In contrast, carbon might be concentrated in an intermediate layer in the double detonation scenario, as a result of the combustion of a helium shell \citep{Fink2010_helium, Sim2012_doubledet}. In models in which the supernova is approximated as the spontaneous detonation of a sub-Chandrasekhar WD with negligible helium mass, unburned material is expected only in the very outermost regions of the ejecta, at high velocities \citep{Shen2018_ddet}. \citet{Wheeler1998_nir} were among the first to investigate carbon in SNe~Ia. They used a full radiative transport code \citep{Hoflich1995_radiative} to study SN~1986G and SN~1994D, finding the presence of Mg and O at similar layers in these events. Because Mg is a product of explosive burning of C, they were able to infer, based on delayed detonation models, that the transition between C and O burning takes place at $\sim 15000-16000\ \rm{km\ s^{-1}}$. \citet{Hoflich2002_nir} used the same code to study the subluminous SN~1999by, leading to the identification of a neutral carbon feature in the near-infrared (NIR) spectrum near maximum. Subsequent research has used the parametrized spectral synthesis code \textsc{SYNOW} \citep{Branch2002_SYNOW} to identify carbon signatures in the optical spectra of individual SNe~Ia (SN~1998aq, \citealt{Branch2003_carbon}; SN~1999ac, \citealt{Garavini2005_carbon} and SN~2006D, \citealt{Thomas2007_carbon}). More recently, the SYNAPPS package (an automated version of \textsc{SYNOW}, \citealt{Thomas2011_synapps}) has been used to suggest the presence of unburned material in SN~2011fe at $\sim 10000-16000\ \rm{km\ s^{-1}}$ \citep{Parrent2012_carbon}. Results from these semi-empirical studies include that the fraction of normal SNe~Ia that exhibit a carbon feature if observed early enough is $\sim\!30\%$, and possibly higher if in some cases the carbon feature is blended with other features due to high Doppler shifts \citep{Thomas2011_carbon, Parrent2011_carbon, Folatelli2012_carbon, Silverman2012_BSNIP_IV}. Compared to normal SNe~Ia, there appears to be a paucity of subluminous and overluminous events that show carbon (\citealt{Parrent2011_carbon}; see \citealt{Chomiuk2016_subtypes} for a short summary of distinct subtypes of SNe~Ia). On the other hand, events that belong to the so called super-Chandrasekhar mass Ia subclass show a conspicuous carbon feature, significantly stronger than in normal events (e.g. \citealt{Hachinger2012_tomography}). While parametrized packages, such as \textsc{SYNOW}, suffice to provide identifications and velocity estimates, they require temperature scales and reference opacities passed by hand and thus cannot be used to infer abundance ratios between elements, let alone quantitative abundance profiles across the ejecta. Detailed radiative transport codes (i.e. full NLTE or multi-dimensional) can be used to check abundance profiles, but their computational cost is too high to explore a large parameter space. In order to run the large number of simulations required to obtain abundance distributions of elements, one has to resort simplifications, and, e.g., use 1D codes with simplified excitation/ionization approximations. Such simplified codes have been used for tomographic analyses, where the distribution of elements above the photosphere\footnote{Defined here as an inner boundary of the simulation domain where the radiation field is assumed to be that of a blackbody.} is estimated by fitting the spectra at different epochs. As the ejecta expand and the photosphere recedes, deeper layers of the ejecta become optically thin, allowing the inference of the distribution of various elements. Here, we follow this approach to estimate the mass fraction of carbon relatively deep in the ejecta of SN~2011fe ($7850 \lesssim v \lesssim 16000{\rm\,km\,s^{-1}}$) and compare it against model predictions. The study of the outermost layers could also potentially discriminate between models; However, for reasons we discuss in appendix \ref{sec:appendix}, we find that such analysis would require a more realistic tomographic analysis of the earliest spectrum, at $t_{\rm exp}$=3.7\,d. Redoing the tomography of SN~2011fe is beyond the scope of this work and therefore we reserve the analysis of the high velocity layers to an appendix and limit ourselves to place only conservative constraints on the carbon mass fraction in that zone. Following paper I \citep{Heringer2017_sequence}, as a starting point we use the tomographic analysis of SN~2011fe by M14, which led to density and abundance profiles with which the observed spectra during the photospheric phase (up to one week after maximum) can be reproduced, at least qualitatively (so far, no code can reproduce observed spectra well enough for meaningful quantitative assessments). From their tomographic analysis of SN~2011fe, M14 suggest that carbon is present (mass fraction $\sim\!0.01$) down to $\sim\!8000\ \mathrm{km\ s^{-1}}$. This velocity is lower than predicted by many explosions models (see Section \ref{sec:results}) and also lower than typically inferred for other SN Ia. For instance, \citet{Folatelli2012_carbon} and \citet{Silverman2012_BSNIP_IV} derived typical Doppler velocities (measured from the absorption minimum)\footnote{Note that the Doppler velocity of the red wing of the carbon feature in the optical may extend to $\sim 8000\ \mathrm{km\ s^{-1}}$, but this does not imply that unburned material is present at such velocities, as further discussed in \S \ref{subsec:scan}.} of $\sim\!12000\ \mathrm{km\ s^{-1}}$, while \citet{Parrent2011_carbon} used \textsc{SYNOW} to estimate velocities, obtaining similar values for the core-normal \citep{Branch2006_subclasses} SNe\ Ia in their sample. Inspired by this hint of carbon at depth and the scarcity of reliable measurements of the carbon profile in SNe~Ia, we decided to re-assess the distribution of unburned material in SN~2011fe. Focusing on a single element allows us to not just derive a best mass fraction, but a range of mass fractions that can describe the data, thus giving better hope of placing realistic constraints on the location and distribution of carbon that are useful for comparison against explosion models. It also helps to study more in depth the physical conditions that are relevant for the formation of the carbon feature (at least under the approximations we adopt), both in the optical and in the NIR, which may help to shed light on why the feature is more often seen in some subtypes than others. This paper is divided as follows: in \S \ref{sec:methods} we describe our methodology and in \S \ref{sec:results} we constrain the carbon mass fraction in the ejecta of SN~2011fe, which is then compared against model predictions in \S \ref{sec:model_comparison}. In \S \ref{sec:trough} we discuss the physical conditions that are relevant for the formation of the singly-ionized carbon feature in the optical, while in \S \ref{sec:neutral} we focus on neutral carbon and its possible impact on the NIR part of the spectrum. In \S \ref{sec:uncertainties} we discuss possible sources of uncertainties and the limitations of our analysis. Our conclusions are presented in \S \ref{sec:ramifications}. \section{Methods} \label{sec:methods} To constrain the distribution of carbon in SN~2011fe, we use the spectral synthesis code TARDIS v1.5dev3181 \citep{Kerzendorf2014_TARDIS}. This code uses Monte Carlo radiative transfer through spherically symmetric ejecta. It treats the densest parts of the ejecta as an optically thick region that produces a blackbody distribution of photons. The photons are represented by packets which can interact with the layers above either via line interaction (in the Sobolev approximation) or electron scattering. TARDIS follows the approach and is implemented similarly to the \cite{Lucy1999_code} code used by M14, except for possible differences in the atomic physics (see \S 3 of \citealt{Kerzendorf2014_TARDIS} for a detailed description), and generally produces consistent predicted spectra. We chose TARDIS as a compromise between physical accuracy and computational cost in order to explore the parameter space of carbon mass fractions: opacities and temperatures across the ejecta are computed self-consistently, which is a clear improvement over line identification codes, but, as in the code used by M14, several approximations are made in order to reduce to computation time. The approximations that might affect our conclusions most are: \textit{(i)} The ejecta are assumed to have no energy deposition and thermalization processes above the photosphere. \textit{(ii)} The ejecta are treated as spherically symmetric, i.e., we simulate just the radial dimension\footnote{We usually take velocity as the radial coordinate, but this can readily be mapped to a radius at each given epoch since the ejecta are in homologous expansion at the timescales relevant for this work.} and cannot capture any possible line of sight effects if the explosion was asymmetric. \textit{(iii)} The distribution of ions and the population of atomic levels are computed using only a simple NTLE approximation, where these quantities are corrected by a ``dilution'' factor\footnote{We adopt the \texttt{nebular} and \texttt{dilute-lte} ionization and excitation modes in TARDIS, respectively.}. We do not solve the full set of statistical equilibrium equations and thus ignore non-thermal processes (see \citealt{Mazzali1993_code} and \citealt{Kerzendorf2014_TARDIS} for detailed descriptions.) \textit{(iv)} Parameters other than the carbon abundance are fixed at the values found by M14, i.e., we do not attempt to see whether a change in the carbon feature due to a change in carbon abundance can be compensated by changes in the other parameters. Therefore, our results and conclusions are valid only within the scope of these approximations and comparison to models inherit these limitations. \subsection{Input parameters} \label{subsec:input_pars} Like in Paper I \citep{Heringer2017_sequence}, we start from the tomography of SN~2011fe by M14.\footnote{Since Paper I, we have further improved our model inputs by interpolating the abundances provided in Fig.~10 of M14, leading to slightly different synthetic spectra. This, however, does not affect the conclusions presented in paper I.} We use the model parameters reported in their Table 6 and Fig.~10 and we generally find good agreement with the data (see Fig.~\ref{Fig:scan} below). Small discrepancies between the synthetic spectra are likely due to minor differences in the codes (and secondary input parameters). The only significant difference we find is for the 3.7 days spectrum, near $\lambda = 4000\, \text{\AA}$; this discrepancy is likely due to small abundance mismatches of Cr, Ti and/or Fe above the photosphere, located at $v_{\rm inner}=13300\ \mathrm{km\ s^{-1}}$, which can strongly influence the opacity at the blue end, even if the other parameters are similar (e.g., we infer a temperature of $10740$~K at the photosphere, which agrees with the value of $10800$~K reported by M14). Given their location, however, these abundance differences are unlikely to affect any of the conclusions we draw regarding carbon. For the density profile, we use M14's ``$\rho$-11'' profile. At the velocities relevant for our work ($v\lesssim 19000{\rm\,km\,s^{-1}}$), this is similar to other profiles that were tested, viz., W7 of \cite{Nomoto1984_W7} and WDD1 of \cite{Iwamoto1999_WDD}, but differs at higher velocities, where it is intermediate between W7 and WDD1, leading to a better match to the UV part of early spectra. We later show in \S \ref{sec:model_comparison} that, in the velocities of interest, this density profile is similar to those of the explosion models we compare against. The times after explosion ($t_{\rm{exp}}$) for the spectra used in this work are listed in Table \ref{tb:quantities} below, together with the corresponding velocities of the inner boundary in our simulations ($v_{\rm{inner}}$, also referred to as ``photospheric" velocity; these follow directly from M14). For comparison with our simulations, both the observed and simulated spectra were normalized by the mean flux computed in the region defined by $4000\, \text{\AA} \leq \lambda \leq 9000\, \text{\AA}$. \section{The Distribution of Carbon in SN 2011fe} \label{sec:results} In order to constrain the distribution of carbon in SN~2011fe, we first determine a velocity scale $v_{\rm{lim}}$ -- and, thus, equivalently an enclosed mass -- below which carbon is not required to explain the data. Next, we abandon the M14 carbon distribution and instead approximate it assuming constant \ensuremath{X_{\rm C}}\ in two regions of interest: immediately below and above $v_{\rm{lim}}$, aiming to determine how much carbon could be ``hidden'' below the velocity threshold and what is the minimum amount of carbon required above it. To this purpose, we inspect the most prominent carbon feature in the optical spectra, due to the \ion{C}{2} $\lambda$6580 line (e.g. \citealt{Folatelli2012_carbon}). We note that in all cases, variations in the carbon mass fraction are made at the expense of the most abundant element in each layer so that the relative change of that element and the impact on the overall spectra are minimized. \subsection{The depth down to which carbon has to be present in SN~2011fe} \label{subsec:scan} We start our analysis by revisiting the distribution of carbon in the ejecta of SN~2011fe inferred by M14 (see the bottom panel of their Fig.~10). Their adopted distribution includes carbon at velocities as low as $\sim\!8000\ \mathrm{km\ s^{-1}}$, comparable to the velocity of the inner boundary at maximum light, $v_{\rm inner}=7850\ \mathrm{km\ s^{-1}}$, suggesting the presence of unburned material relatively deep in the ejecta. Since the carbon feature appears stronger in the synthetic spectra of M14 than seen in the data (see their Fig. 8 and 9, near $\lambda \approx 6300$\, \text{\AA}), we first aim to determine quantitatively the velocity $v_{\rm{lim}}$ below which carbon is not required to explain the data. For this purpose, we perform a ``depth scan,'' where we adopt the carbon profile of M14 but remove all carbon (i.e., set $\ensuremath{X_{\rm C}}=0$) below a given velocity cut, $v_{\rm{cut}}$, which we vary in steps of $500\ \mathrm{km\ s^{-1}}$. $v_{\rm{lim}}$ is then determined as the largest $v_{\rm{cut}}$ for which the simulated spectra are consistent with the data. Our simulations are shown in Fig. \ref{Fig:scan}, where the top panels (\textbf{a}--\textbf{f}) correspond to different epochs and the bottom panel (\textbf{g}) shows the corresponding pseudo equivalent widths (pEW\footnote{The routine we employ here to compute pEW is made publicly available alongside TARDIS.}, e.g. \citealt{Garavini2007_pEW}) of the carbon feature for each choice of $v_{\rm{cut}}$. The models generally provide a good fit and one can see that a choice of $\ensuremath{X_{\rm C}}=0$ at $v\leq 13500\ \rm{km\,s^{-1}}$ suffices to explain the data. In fact, with the original carbon distribution below $13500{\rm\,km\,s^{-1}}$, for which $0.007 \lesssim \ensuremath{X_{\rm C}} \lesssim 0.02$, the carbon features in the simulated spectra are stronger than those observed (while not providing a better fit anywhere else in the spectra). Based on the pEWs shown in panel \textbf{g}, we adopt $v_{\rm lim}=13500{\rm\,km\,s^{-1}}$. We note that it is not clear why M14 included carbon at much lower velocities. They refer to \citet{Parrent2012_carbon} and possibly they were motivated by the fact that the spectra presented in Fig.~4 of \citeauthor{Parrent2012_carbon} show the red wing of the \ion{C}{2} $\lambda$6580 feature extending down to $\sim\!8000\ \mathrm{km\ s^{-1}}$ in Doppler velocity. The insets in Fig.~\ref{Fig:scan} help to illustrate why the red-most extent cannot be used directly to determine where carbon-rich layers are located in physical space. For instance, the models for which $v_{\rm{cut}}=10500{\rm\,km\,s^{-1}}$ show absorption down to Doppler shifts as low as $-5000{\rm\,km\,s^{-1}}$, even though no carbon is actually present at those depths. This is because the line-of-sight component of the velocity of parts of the ejecta that scatter a line can be smaller than the true velocity, i.e., the absorption seen at low velocity can be due to parts of the ejecta that are at higher velocity but are not directly moving towards us. \begin{figure} \epsscale{1.1} \plotone{Fig_scan.pdf} \caption{The depth down to which carbon has to be present. {\em Panels \textbf{a}--\textbf{f}:\/} Observed SN~2011fe spectra (black lines) and simulated spectral sequences at $t_{\rm exp}$=3.7, 5.9, 9, 12.1, 16.1 and 19.1 days, respectively, with insets showing enlargements around the \ion{C}{2}$\lambda$6580 feature. The top $x$-axis of these insets also include a Doppler velocity scale, in units of $1000{\rm\,km\,s^{-1}}$. {\em Panel \textbf{g}:\/} Observed and simulated pseudo-equivalent widths as a function of epoch, with observed values in black and simulated values color-coded by the velocity $v_{\rm{cut}}$ below which the mass fraction of carbon is set to zero (uncertainties are indicated, but are smaller than the symbols for the observed points). The pseudo-equivalent widths of the carbon feature at $t_{\rm exp}$=3.7, 5.9 days are not included as it is difficult to define the feature boundaries at these epochs. One sees that including carbon below $v\sim 13500{\rm\,km\,s^{-1}}$ at the levels adopted by M14 leads to predicted carbon features that are stronger than observed.} \label{Fig:scan} \end{figure} \subsection{Constraining the carbon profile} \label{subsec:plateaus} In order to constrain the range of carbon mass fractions that can reproduce the data, we next aim to determine for what \ensuremath{X_{\rm C}}\ in a given velocity range the trough has a depth roughly consistent with the observations. Here, since the simulations are not yet at a level where they can reproduce spectra in detail, we refrain from employing any particular quantitative metric of consistency. Instead, we aim to determine upper and lower limits to the carbon mass fractions beyond which the simulated features are in obvious disagreement with the observed ones. Since we compare with a feature that has only few parameters, it is clear that only limited information on the carbon profile can be gleaned. Indeed, we find that a simple two-zone model suffices, where we divide the velocity range into inner and middle regions, which are separated at $v_{\rm lim}=13500{\rm\,km\,s^{-1}}$, and which each have a constant mass fraction: \ensuremath{X_{\rm C}^{\rm i}}\ at $7850 \lesssim v \lesssim 13500{\rm\,km\,s^{-1}}$ and \ensuremath{X_{\rm C}^{\rm m}}\ at $13500 \lesssim v \lesssim 16000{\rm\,km\,s^{-1}}$. Here, the lower velocity limit of the inner region is set by the photospheric velocity of our latest spectrum, while the upper limit of the middle region is somewhat arbitrary. We explore the effects of moving the boundary between the inner and middle regions in \S \ref{sec:uncertainties}, and discuss a trial in which we include an outer zone in appendix \ref{sec:appendix}. In Fig.~\ref{Fig:plateaus} we compare simulated spectra for which the carbon mass fraction is varied in the inner and middle regions with observed carbon profiles. For each epoch, we run simulations for combinations of \ensuremath{X_{\rm C}^{\rm i}}, \ensuremath{X_{\rm C}^{\rm m}}\ in the range $0 \leq \ensuremath{X_{\rm C}^{\rm i}} \leq 0.05$ and $0 \leq \ensuremath{X_{\rm C}^{\rm m}} \leq 0.05$. This choice of range covers both extremes, resulting in spectra that either contain too little carbon for the feature to manifest or too much carbon, producing a flux depression much stronger than seen in the data. Note that for all but the last epoch, the photosphere is outside the lower velocity limit of our inner region. Hence, with increasing time, one constrains the mass fraction at increasing depth, thus justifying the choice of our inner region being coarser ($\Delta v \sim 5500{\rm\,km\,s^{-1}}$) than the middle region ($\Delta v \sim 2500{\rm\,km\,s^{-1}}$). \begin{figure*} \epsscale{1.1} \plotone{Fig_C-trough-spectra_optical.pdf} \caption{Comparison of observed (black) and simulated (color) carbon profiles for a range of carbon abundances. Rows correspond to different epochs, while columns map the carbon mass fraction \ensuremath{X_{\rm C}^{\rm i}}\ adopted for the inner region (velocity range $7850 \lesssim v \lesssim 13500{\rm\,km\,s^{-1}}$), and colors map the mass fraction \ensuremath{X_{\rm C}^{\rm m}}\ in the middle region ($13500 \lesssim v \lesssim 16000{\rm\,km\,s^{-1}}$). One sees, for instance, that models with $\ensuremath{X_{\rm C}^{\rm i}} \geq 0.005$ cannot explain the data at $t_{\rm exp}$=16.1 and 19.1\,d for any valid choice of \ensuremath{X_{\rm C}^{\rm m}}.} \label{Fig:plateaus} \end{figure*} Inspecting Fig.~\ref{Fig:plateaus}, we infer for the middle region an upper limit of $\ensuremath{X_{\rm C}^{\rm m}}<0.05$: for larger values the carbon feature is stronger than observed for any choice of \ensuremath{X_{\rm C}^{\rm i}}\ at $t_{\rm exp}=9\,$d. For the inner region, the carbon fraction is constrained more effectively by the later epochs, since more of the region is exposed. Hence, for $t_{\rm exp} = 9$ days, we find $\ensuremath{X_{\rm C}^{\rm i}}<0.01$, while for later epochs the carbon feature is overpredicted unless $\ensuremath{X_{\rm C}^{\rm i}} < 0.005$. Setting a lower limit to \ensuremath{X_{\rm C}^{\rm m}}\ is more complicated because a deficit of carbon in the middle region may be compensated by larger fractions of carbon in an outer region. From Fig.~\ref{Fig:plateaus} alone, one would be tempted to set a lower limit of $\ensuremath{X_{\rm C}^{\rm m}}>0.005$ based on the strength of the carbon feature at $t_{\rm exp}=5.9\ \rm{d}$. However, we show in Fig.~\ref{Fig:early_constraints} in appendix \ref{sec:appendix} that if we allow the carbon fraction outside this region to be larger, somewhat lower values may work. Based on the spectra at $t_{\rm exp}=5.9\,$d, we infer a more conservative lower limit of $\ensuremath{X_{\rm C}^{\rm m}} \geq 0.001$. Here, we note that inferences are hindered by the red wing of the Si feature not being predicted correctly, i.e. being offset by $\sim 50$\, \text{\AA} (the same can be seen in M14). As a consequence, the emission portion of this Si feature (i.e. a ``limb brightening'' effect [\citealt{Hoeflich1990_brightening}]) will also be somewhat shifted, thus affecting the precise ``pseudo-continuum'' across the wavelength region relevant for the \ion{C}{2}$\lambda$6580 line. Looking at the choice of $\ensuremath{X_{\rm C}^{\rm i}}\ = \ensuremath{X_{\rm C}^{\rm m}}\ = 0$ in Fig \ref{Fig:plateaus}, we expect a shift in the pseudo continuum to have a minor effect for a qualitatively analysis like ours, especially at $t_{\rm exp}\geq 9.0\,$d. Thus, the poor fit of the Si feature should not affect our analysis of the carbon fraction at greater depth, but will be important for any future assessment of carbon at high velocities. In Fig. \ref{Fig:constraints}, we indicate schematically the parts of the carbon mass fraction parameter space that we believe are ruled out, labeling each region with the epoch based on which we excluded it. These are meant to be conservative limits. In particular, not all combinations of $(\ensuremath{X_{\rm C}^{\rm i}}, \ensuremath{X_{\rm C}^{\rm m}})$ between their respective limits will produce spectra that match the data. Rather, the limits for one region indicate that there exists a choice of carbon fraction for the other region for which the data can be understood. \begin{figure} \epsscale{1.15} \plotone{Fig_model_constraints.pdf} \caption{Schematic plot showing the region of the carbon mass fraction parameter space that can be ruled out (hatched red) by comparing the spectra from a suite of simulations and the observed data (as shown in Fig. \ref{Fig:plateaus}.) Each hatched region is labeled according to the epoch relevant for its exclusion.} \label{Fig:constraints} \end{figure} The above abundances are strictly for the adopted density profile. Since the optical depth scales, to first order, with density, the corresponding mass of carbon $M_{\rm C}$ is a less model-dependent quantity. For the middle region ($13500 \lesssim v \lesssim 16000{\rm\,km\,s^{-1}}$), we find that $10^{-4}< M_{\rm C} < 5\times 10^{-3}\,M_\odot$ is required to form the carbon feature. In the inner region ($7850 \lesssim v \lesssim 13500{\rm\,km\,s^{-1}}$), we find an upper limit of $M_{\rm C} < 2.5\times 10^{-3}\,M_\odot$. Finally, we note that carbon is predominantly singly ionized in the middle region, so uncertainties in the degree of ionization should be small and our inferred range of \ensuremath{X_{\rm C}^{\rm m}}\ reasonably reliable. For the inner region, a significant fraction of carbon can be doubly ionized, although the singly-ionized fraction never becomes small. In Table \ref{tb:quantities}, we list inferred masses, ionization fractions and optical depths for reference values of $\ensuremath{X_{\rm C}^{\rm i}}=0.002$ and $\ensuremath{X_{\rm C}^{\rm m}}=0.01$. \begin{deluxetable}{lll} \tablecaption{Summary of models. \label{tb:models}} \tablehead{ Model & Scenario & References\TBstrut } \startdata W7\dotfill & Fast deflagration & \citet{Nomoto1984_W7}\\[.8ex] N100\dotfill & Delayed det. & \citet{Seitenzahl2013_DDT}\\ & transition & \citet{Ropke2012_N100} \\ & & \citet{Sim2013_radtransfer}\\[.8ex] GCD200\dotfill & Gravitationally& \citet{Seitenzahl2016_gcd}\\ & confined det. & \\[.8ex] (1.1, 0.9)$\,M_\odot\ldots$ & Violent Merger & \citet{Pakmor2012_DD}\\[.8ex] $1.0\,M_{\odot}$\dotfill & Double det. & \citet{Fink2010_helium}\\[.8ex] $1.0\,M_{\odot}$\dotfill & Spontaneous det. & \citet{Shen2018_ddet} \enddata \end{deluxetable} \begin{figure*} \epsscale{1.0} \plotone{Fig_model.pdf} \caption{Comparison of the allowed range of carbon mass fractions derived for SN~2011fe against explosion models. Background colors indicate that the region is ruled-out (hatched red), allowed (green) or unconstrained (gray), based on the models shown in Fig. \ref{Fig:plateaus} and \ref{Fig:early_constraints}, which are summarized in Fig. \ref{Fig:constraints}. For reference, the black line shows the carbon profile interpreted from the tomography analysis of M14, while the other lines represent the prediction from a suite of explosion models available in the literature. The respective references for each model can be found in Table \ref{tb:models}.} \label{Fig:comparison} \end{figure*} \begin{figure} \epsscale{1.2} \plotone{Fig_density.pdf} \caption{Density profile at $100\ \rm{s}$ after the explosion for a suite of explosion models. The appropriate references for each model are given in Table \ref{tb:models}.} \label{Fig:density} \end{figure} \section{Comparison to Explosion Models} \label{sec:model_comparison} We compare our constraints on the carbon mass fraction distribution with the predictions from different explosion models\footnote{Density and carbon abundance distributions for the explosion models were retrieved from HESMA (\citealt{Kromer2017_hesma}; \url{https://hesma.h-its.org}).}, as summarized in Table \ref{tb:models}. We show the comparison graphically in Fig.~\ref{Fig:comparison} and discuss the individual models below, but note here that, naturally, they predict not only distinct abundance profiles but also different density profiles, which are equally important in determining whether a feature manifests or not. Fortunately, as can be seen in Fig.~\ref{Fig:density}, the density profiles predicted by different models are remarkably homogeneous: they agree within a factor of 5 for $v\lesssim 19000{\rm\,km\,s^{-1}}$ and are even closer in our regions of interest (i.e. $7850 \lesssim v \lesssim 16000{\rm\,km\,s^{-1}}$). Indeed, we find that our conclusions below are unchanged if we compare predictions in terms of carbon mass (which is arguably more logical for line strengths, but we opted to show mass fraction instead as it more closely reflects the properties of the exploding white dwarf). \subsection{Fast Deflagration (W7)} \label{subsec:W7} The W7 model \citep{Nomoto1984_W7} was part of a suite of spherically symmetric pure deflagration models. For W7, the predictions are a good match to observations, but it required a flame propagation speed much higher than expected theoretically or found in more recent pure deflagration models (which also produce significantly different outcomes; e.g., \citealt{Fink2014_def}). Nonetheless, observables derived from the W7 model remain a standard comparison baseline, and thus we include it for reference. From Figure \ref{Fig:comparison}, one sees that W7 predicts a sharp transition between regions where carbon is fully burned and not burned at all. This is consistent with no carbon in our inner region, but seems to overpredict the carbon in the middle region. Indeed, we find a carbon feature that is too broad and blue if we run a simulation with a W7-like carbon distribution. \subsection{Delayed Detonation (N100)} \label{subsec:N100} In delayed detonation models, run-away carbon fusion in a near-Chandrasekhar mass WD at first leads to a deflagration, which heats up and expands the white dwarf before transitioning to a detonation. These models are among the best studied and provide fairly good matches for observations. For our comparison, we used data from the ``N100'' model \citep{Seitenzahl2013_DDT}, which was computed as part of a sequence of 3D simulations of delayed detonations, where the explosion strength is parametrized by the number of ignition kernels. The deflagration to detonation transition occurs when a pre-defined condition based on the local turbulent velocity is met (for a thorough description, see \citealt{Ciaraldi2013A&ADTD}). In this model, the input parameters are such that the predicted peak brightness and spectra resemble those of normal SNe~Ia. The synthetic light curve for this model was computed by \citet{Sim2013_radtransfer} and compared to the normal SN~2005cf \citep{Pastorello2005_05cf}, exhibiting a reasonable agreement and only a modest dependency with the viewing angle, which is particularly small at the wavelengths relevant for the carbon feature. Some challenges to this model include the peak $B-V$ color being too red and the post maximum decline rate of the light curve being too fast when compared to typical values of normal SNe~Ia. In general, the DDT models of \citet{Seitenzahl2013_DDT} predicted optical colors that were systematically redder than expected at peak and did not reproduce the width-luminosity relation \citep{Phillips1993_relation} in its entirety. One significant difference of this model compared to 1D DDT models (where the flame transition to detonation is typically assumed to occur at a density threshold; e.g., \citealt{Blondin2013_DDT}) is that, because of the buoyancy of the hot ignition kernels, the deflagration burning products are not necessary centrally located at low velocities and might be mixed through zones rich in intermediate mass elements, such as Si. We find that the carbon mass fraction predicted, on average, by this model is formally within the allowed region we derive here. We note, however, that this model has relatively little carbon in both the middle and outer regions. In Fig. \ref{Fig:early_constraints} we see that $\ensuremath{X_{\rm C}^{\rm m}}\ \sim 0.001$ requires $\ensuremath{X_{\rm C}^{\rm o}}\ \gtrsim 0.2$ for a clear carbon trough to be formed at $t_{\rm exp}=$ 5.9 and 9\,d, but N100 exhibits $\ensuremath{X_{\rm C}^{\rm o}}\ \lesssim 0.1$. We thus consider N100 to be a borderline case. \subsection{Gravitationally Confined Detonation (GCD200)} \label{subsec:gcd200} A gravitationally confined detonation (GCD) might occur if, once a hot deflagration bubble breaks out of the surface, some or most of the material were to remain bound. This could then wrap around the star, and trigger an off-center detonation upon convergence at the opposite side \citep{Plewa2004_GCD}. A general problem with these models is that they overpredict the abundances of iron-group elements at high velocities \citep{Seitenzahl2016_gcd}. Nevertheless comparing our results to the simulations of \citet{Seitenzahl2016_gcd}, we find that the carbon abundance distribution is roughly consistent, if perhaps a little too high, especially around $v\simeq11000{\rm\,km\,s^{-1}}$. Given the approximations in our modeling, we also consider this to be a borderline case which we cannot rule out with confidence. We caution, though, that \citeauthor{Seitenzahl2016_gcd} note that their model is too bright to be representative of normal SNe~Ia. \subsection{Violent Merger (1.1M$_\odot$+0.9M$_\odot$)} \label{subsec:merger} Some SNe~Ia might arise from the ``violent'' merger of two WDs, where the explosion is triggered at hot spots during the merging process. Existing studies for this scenario are not currently considered likely to be responsible for normal SNe~Ia, as it predicts, e.g., far stronger polarization that is observed \citep{Maund2013_VMpol, Bulla2016_VMpol}. We find that it also is inconsistent with our constraints on the carbon abundance profiles, producing, on average, too much unburned material mixed throughout the ejecta. \subsection{Double Detonation} \label{subsec:doubledet} In the double detonation scenario, a SN~Ia arises when a detonation in a surface helium shell triggers a secondary detonation in the WD core \citep{Livne1990_doubledet}. One of the outstanding questions for this class of models is whether the elements produced in the helium detonation would produce signatures, e.g., of iron-group elements, that are not observed \citep{Kromer2010_doubledet}. \citet{Fink2010_helium} calculated element distributions for a range of progenitor masses, under the assumption that each had a helium layer with the minimum mass required to trigger a detonation. An interesting feature in these simulations is that unburned material is mostly confined to an intermediate layer -- the carbon in the outer layers is partially burned by the initial shell detonation. The velocity of this intermediate layer increases systematically with the strength of the explosion, because for the more massive white dwarfs that lead to brighter explosions, a smaller minimum helium mass is required, which leads to unburned carbon further out in the ejecta. For our comparison, we used model~3 of \citet{Fink2010_helium} -- which corresponds to the double detonation of a 1.0~M$_\odot$ WD surrounded by a 0.055~M$_\odot$ He shell -- as it has the predicted $^{56}$Ni masses closest to the mass of $\sim\!0.45\,M_\odot$ estimated for SN~2011fe \citep{Nugent2011_WD}. We find that the predicted distribution of carbon agrees reasonably well with the allowed region we infer in this work, especially considering that the predicted position of this layer may vary at the $1000{\rm\,km\,s^{-1}}$ level due to viewing angle effects. \subsection{Detonation of a Cold White Dwarf} \label{subsec:WDdet} Simulations of the detonation of cold WDs, i.e., with a detonation started in the centre without assigning a specific cause, have been shown to provide remarkably good matches to observations of SN~Ia \citep{Shigeyama1992_subChandra, Sim2010_subChandra}. These models could be seen as examples of the double detonation model in the limit where the helium shell can be disregarded, perhaps representative of, e.g., models in which the helium is accreted very rapidly, at the onset of a merger, leading to helium masses of $\lesssim\!10^{-2}\,M_\odot$ \citep{Shen2014_ddet}. For this class of models, the density gradient on the outside is steep and one thus expects carbon only at very high velocity. Indeed, in the recent simulations of detonations of cold WDs by \citet{Shen2018_ddet}, carbon is virtually absent at the velocities we cover: \ensuremath{X_{\rm C}}\ $<10^{-4}$ for $v<21000\ \rm{km\ s^{-1}}$. \citeauthor{Shen2018_ddet} note, however, that a proper simulation of a double detonation would have to take into account the inward shock launched by the helium shell detonation, which might tamp the explosion and reduce the velocities of the outer layers. \subsection{Summary of the Model Comparisons} \label{subsec:overall} The carbon distributions predicted by the violent merger model of \citet{Pakmor2012_DD} and by the detonation of cold WDs model of \citet{Shen2018_ddet} both seem inconsistent with the constraints on the carbon mass fractions (and masses) we derived for SN~2011fe, with the former predicting, on average, too much and the latter too little unburned material at intermediate velocities (see Fig.~\ref{Fig:comparison}). We suggest that these differences are large enough for these models to be ruled out, despite the approximations involved in computing our synthetic spectra. The carbon distributions predicted by the gravitationally confined detonation model of \citet{Seitenzahl2016_gcd} and by the N100 delayed detonation model of \citet{Seitenzahl2013_DDT} are roughly consistent with our results. This might provide a clue to what physical processes are needed to explain carbon distribution in the ejecta: in both mechanisms, the initial deflagration leads to relatively low density material at the locations that end up at the intermediate velocities where we infer carbon is present. If the carbon distribution is indeed a consequence of the deflagration phase, then one might expect it to be somewhat stochastic and dependent on viewing geometry, thus providing a possible explanation for the variation in strengths of the carbon features in SN~Ia spectra \citep{Parrent2011_carbon}. This hypothesis, however, needs to be further investigated. For instance, \citet{Sim2013_radtransfer} showed that the light curves and spectra derived for the N100 model had only a mild dependency on viewing angle, despite significant anisotropies in the flame propagation. A similar conclusion was reached by \citet{Fink2018_diffrot}, who computed their observables in the context of DDTs in differentially rotating WDs. Finally, the predicted carbon distribution for the double detonation model is also consistent with our results and thus cannot be ruled out. \section{The Physical Conditions Relevant for the Carbon Feature} \label{sec:trough} In this section, we attempt to answer the following questions: \textit{Where in the ejecta is the C feature formed?}; \textit{Why does the C feature usually disappear near maximum light? \textit{and How much carbon can be hidden in normal SNe~Ia that do not exhibit a C feature?}} We will do this in the context of our models; uncertainties in those, including the NLTE approximations made in TARDIS, are addressed in Section~\ref{sec:uncertainties}. Unless otherwise stated, we will compare with a fiducial model that reproduces the observed features of SN~2011fe well, with $\ensuremath{X_{\rm C}^{\rm i}}=0.002$, $\ensuremath{X_{\rm C}^{\rm m}}=0.01$ (and the carbon profile of M14 outside). The carbon $\lambda6580$ feature arises from the $\rm{2s^23s}~^2{\rm S} \rightarrow \rm{2s^23p}~^2{\rm P}$ transition in \ion{C}{2} \citep{NIST_ASD}. Because the ejecta are expanding, one expects a P-cygni profile. This will be superposed on the red wing of the main Si~$\lambda6355$ feature, which means that, depending on the latter's strength, one may note the presence of carbon either through an actual trough or just through flattening of the silicon feature (as can be seen in Fig.~\ref{Fig:plateaus} for the different choices of \ensuremath{X_{\rm C}^{\rm m}}\ at, e.g., $t_{\rm exp}=5.9\,$d and $\ensuremath{X_{\rm C}^{\rm i}}=0$). \begin{figure} \epsscale{1.15} \plotone{Fig_opacity_C_II_6580.pdf} \caption{\textit{Top:\/} Sobolev optical depth of the \ion{C}{2} $\lambda$6580 line in the fiducial models of SN~2011fe, with $\ensuremath{X_{\rm C}^{\rm i}}=0.002$ and $\ensuremath{X_{\rm C}^{\rm m}}=0.01$, with different colors representing different epochs, as indicated. The shaded regions show the change in opacity if the velocity boundary is set to $12000\ {\rm\,km\,s^{-1}}$ (dotted line) or $15000\ {\rm\,km\,s^{-1}}$ (dashed line). The general decline reflects dilution of the column density with time due to the expansion of the ejecta, the jump in opacity corresponds to the change in carbon abundance between our inner and middle regions, and the decrease towards low velocities the increasing presence of \ion{C}{3}; \textit{Bottom:\/} Fraction of \ion{C}{2} in the $\rm{2s^23s}$ level as a function of temperature and density, as expected under the NLTE approximations adopted here. Overdrawn are temperature-density profiles for our fiducial SN~2011fe models, color-coded as in the top panel, and with circles marking, from right to left, the zones at $19000$, $16000$, $13500$, $11000$ and $9000\ {\rm\,km\,s^{-1}}$; note that the lowest velocities are below the inner boundary at the earliest epochs. One sees that while the fractional abundance of \ion{C}{2} at the $\rm{2s^23s}$ level is higher in the inner regions, the opacity is larger a few $1000\ {\rm\,km\,s^{-1}}$ above the ``pseudo-photosphere'', where the mass fraction of \ion{C}{2} is larger.} \label{Fig:physics} \end{figure} \begin{deluxetable*}{lllllll} \tablecaption{Relevant quantities. \label{tb:quantities}} \tablecolumns{7} \tablehead{\colhead{}& \multicolumn{6}{c}{\dotfill Epoch\tablenotemark{b} (d)\dotfill}\\ \colhead{Quantity\tablenotemark{a}} & \colhead{3.7} & \colhead{5.9} & \colhead{9} & \colhead{12.1} & \colhead{16.1} & \colhead{19.1}} \startdata \sidehead{Global properties} $\log_{10} L/L_\odot$\dotfill & 7.903& 8.505& 9.041& 9.362& 9.505& 9.544\\ $v_{\rm inner}~({\rm km\,s^{-1}})$\dotfill& 13300& 12400& 11300& 10700& 9000& 7850\\ \sidehead{Inner part ($v_{\rm inner} < v \leq 13500{\rm\,km\,s^{-1}}$)} $M_{\rm tot}~(M_\odot)$\dotfill & $0.0205$ & $0.0855$ & $0.2127$ & $0.2984$ & $0.5132$ & $0.6508$ \\ $M_{\rm C}~(M_\odot)$\dotfill & $0.0001$ & $0.0003$ & $0.0005$ & $0.0007$ & $0.0011$ & $0.0014$ \\ $M_{\rm C\, I}/M_{\rm C}$\dotfill & $0.000006$ & $0.000002$ & $0.000000$ & $0.000000$ & $0.000000$ & $0.000000$ \\ $M_{\rm C\, II}/M_{\rm C}$\dotfill & $0.9780$ & $0.8432$ & $0.3692$ & $0.2652$ & $0.2153$ & $0.2359$ \\ max $\tau(\mbox{\ion{C}{1}}~\lambda10693)$\ldots & $0.29421$ & $0.03836$ & $0.00426$ & $0.00111$ & $0.00041$ & $0.00022$ \\ max $\tau(\mbox{\ion{C}{2}}~\lambda6580)$\dotfill & $16.25423$ & $7.64200$ & $1.15749$ & $0.41434$ & $0.18804$ & $0.17041$ \\ \sidehead{Middle part ($13500 < v \leq 16000{\rm\,km\,s^{-1}}$)} $M_{\rm tot}~(M_\odot)$\dotfill & $0.0683$ & $0.0683$ & $0.0683$ & $0.0682$ & $0.0682$ & $0.0682$ \\ $M_{\rm C}~(M_\odot)$\dotfill & $0.0007$ & $0.0007$ & $0.0007$ & $0.0007$ & $0.0007$ & $0.0007$ \\ $M_{\rm C\, I}/M_{\rm C}$\dotfill & $0.000015$ & $0.000005$ & $0.000002$ & $0.000001$ & $0.000001$ & $0.000001$ \\ $M_{\rm C\, II}/M_{\rm C}$\dotfill & $0.9953$ & $0.9929$ & $0.9778$ & $0.9751$ & $0.9932$ & $0.9966$ \\ max $\tau(\mbox{\ion{C}{1}}~\lambda10693)$\ldots & $0.23596$ & $0.02896$ & $0.00318$ & $0.00082$ & $0.00032$ & $0.00017$ \\ max $\tau(\mbox{\ion{C}{2}}~\lambda6580)$\dotfill & $10.07514$ & $1.99005$ & $0.83938$ & $0.30879$ & $0.05106$ & $0.01895$ \\ \sidehead{Outer part ($16000 < v \leq 19000{\rm\,km\,s^{-1}}$)} $M_{\rm tot}~(M_\odot)$\dotfill & $0.0316$ & $0.0316$ & $0.0316$ & $0.0316$ & $0.0316$ & $0.0316$ \\ $M_{\rm C}~(M_\odot)$\dotfill & $0.0033$ & $0.0033$ & $0.0033$ & $0.0033$ & $0.0033$ & $0.0033$ \\ $M_{\rm C\, I}/M_{\rm C}$\dotfill & $0.001179$ & $0.000062$ & $0.000009$ & $0.000004$ & $0.000003$ & $0.000004$ \\ $M_{\rm C\, II}/M_{\rm C}$\dotfill & $0.9988$ & $0.9999$ & $0.9997$ & $0.9996$ & $0.9999$ & $0.9999$ \\ max $\tau(\mbox{\ion{C}{1}}~\lambda10693)$\ldots & $0.22876$ & $0.01900$ & $0.00216$ & $0.00056$ & $0.00018$ & $0.00009$ \\ max $\tau(\mbox{\ion{C}{2}}~\lambda6580)$\dotfill & $0.31105$ & $0.10694$ & $0.04343$ & $0.01573$ & $0.00264$ & $0.00101$ \\ \sidehead{Outskirts ($v > 19000{\rm\,km\,s^{-1}}$)} $M_{\rm tot}~(M_\odot)$\dotfill & $0.0095$ & $0.0095$ & $0.0095$ & $0.0095$ & $0.0095$ & $0.0095$ \\ $M_{\rm C}~(M_\odot)$\dotfill & $0.0093$ & $0.0093$ & $0.0093$ & $0.0093$ & $0.0093$ & $0.0093$ \\ $M_{\rm C\, I}/M_{\rm C}$\dotfill & $0.004206$ & $0.000176$ & $0.000012$ & $0.000004$ & $0.000003$ & $0.000004$ \\ $M_{\rm C\, II}/M_{\rm C}$\dotfill & $0.9958$ & $0.9998$ & $1.0000$ & $1.0000$ & $1.0000$ & $1.0000$ \\ max $\tau(\mbox{\ion{C}{1}}~\lambda10693)$\ldots & $2.56294$ & $0.12246$ & $0.01079$ & $0.00248$ & $0.00073$ & $0.00037$ \\ max $\tau(\mbox{\ion{C}{2}}~\lambda6580)$\dotfill & $0.00463$ & $0.01429$ & $0.01587$ & $0.00880$ & $0.00243$ & $0.00088$ \\ \enddata \tablenotetext{a}{All quantities for carbon are for a fiducial model where $(\ensuremath{X_{\rm C}^{\rm i}} , \ensuremath{X_{\rm C}^{\rm m}})=(0.002,0.01)$.} \tablenotetext{b}{Relative to time of explosion, with maximum light at 19.1\,d.} \end{deluxetable*} \subsection{Where in the Ejecta is the Carbon Feature Formed?} \label{subsec:physics_where} To trace where a given feature is formed, we inspect the ejecta's relevant line opacities. In TARDIS, these are calculated in the Sobolev approximation, in which interaction is considered only when a photon packet is Doppler shifted into the line (as appropriate for SN~Ia ejecta with their large velocity gradients [\citealt{Sim2017_physics}]), and the code allows one to retrieve the Sobolev optical depth (i.e., the opacity integrated over the velocity width). In the top panel of Fig. \ref{Fig:physics} we show the Sobolev opacities of the \ion{C}{2} $\lambda$6580 line for our fiducial model. One sees that the opacity peaks in a relatively small velocity range, between just above the pseudo-photosphere and $\sim\!14000{\rm\,km\,s^{-1}}$ (consistent with the findings of \citealt{Parrent2012_carbon}). \subsection{Why does the C feature usually disappear near maximum light?} \label{subsec:physics_disappear} The line opacity depends on the column density of the relevant ions and will thus decrease with time as $t^{-2}$ due to the expansion of the ejecta if the level distributions do not change. Of course, these do also change and furthermore the amount of material involved in generating the line increases as the pseudo-photosphere recedes. In the bottom panel of Fig.~\ref{Fig:physics}, we show how the fraction of ions at the relevant level for forming the carbon feature depends on the local density and temperature (under the NLTE approximations adopted here), with the temperature-density profiles of SN~2011fe at different epochs overdrawn. One sees that for typical conditions, the hotter and denser regions are favored for forming the carbon feature; while in the hottest layers a significant fraction of carbon might be more than singly ionized (see Table~\ref{tb:quantities}), this is compensated by increased population of the relatively high excitation state from which the carbon feature arises. One sees that near maximum, the inner regions of the ejecta are still sufficiently hot and dense that a significant fraction of carbon is in the relevant excitation state for the formation of the feature, but nevertheless the opacities have become quite small (see top panel of Fig. \ref{Fig:physics} and Table \ref{tb:quantities}). This indicates that the primary factor why the carbon feature weakens is the dilution of the column density due to the expansion of the ejecta. Nevertheless, at $t_{\rm{exp}}=16.1$ and 19.1\,d, the peak opacity is still of the order of 0.2, indicating that even though no carbon trough is formed, carbon still contributes to the flattening of the main silicon feature. An important clue is provided by the fact that a carbon feature is almost never observed near maximum in normal SNe~Ia, even though the density and temperature near the photosphere are typically ideal for forming the carbon signature. This implies that the inner regions of the ejecta must generally be carbon poor, with $\ensuremath{X_{\rm C}} < 5\times 10^{-3}$ inferred from Fig.~\ref{Fig:plateaus} (where $\ensuremath{X_{\rm C}^{\rm i}}=5\times 10^{-3}$ does lead to the formation of a feature at $t_{\rm{exp}}=16.1$ and $19.1\,$d). In this respect, an apparent exception to the rule may be informative: SN~2002fk did exhibit a carbon feature even one week past maximum \citep{Cartier2014_carbon}. This SN~Ia was relatively normal in its lightcurve, but stood out in that it exhibited a small expansion velocity ($v \lesssim 10000{\rm\,km\,s^{-1}}$, as measured near and post maximum from the \ion{Si}{2} $\lambda$6355 line). Using near-maximum velocities for a crude estimate, SN~2002fk's ejecta was slower by a factor of $\sim 0.94$ and thus, if conditions were otherwise similar to those of SN~2011fe, the column density in the former would be increased, and the time at which the carbon feature would disappear lengthened, by the inverse of that factor squared. This correction alone cannot account for carbon being observed at such late epochs in SN~2002fk, which suggests either even lower pre-maximum velocities or different conditions relatively to SN~2011fe. \subsection{How much carbon can be hidden in normal SNe~Ia that do not exhibit a C feature?} \label{subsec:physics_howmuch} For objects similar to SN~2011fe, Fig. \ref{Fig:plateaus} indicates that towards maximum light, for inner carbon mass fractions $\ensuremath{X_{\rm C}^{\rm i}}\lesssim 10^{-3}$ there is little impact on the spectra, while for $10^{-3} \lesssim \ensuremath{X_{\rm C}^{\rm i}}\lesssim 2\ \times 10^{-3}$ the red wing of the main silicon feature is flattened, and for $\ensuremath{X_{\rm C}^{\rm i}}\gtrsim 5\ \times 10^{-3}$ there should be a detectable carbon feature. As expected, these ranges correspond to a transition from negligible to substantial optical depth ($\tau\lesssim 0.09$, $0.09 \lesssim\tau\lesssim 0.18$, and $\tau\gtrsim0.46$, resp.). \subsection{Overluminous versus ``super-Chandrasekhar mass'' events} \label{subsec:hot} For the typical conditions in SN Ia ejecta, one generally expects that hotter and denser layers are more favorable for the formation of the carbon feature (see Fig. \ref{Fig:physics}, bottom panel). Given this, what can one learn for other sub-types of SN Ia? The carbon feature is rarely observed in overluminous (91T-like) events \citep{Parrent2011_carbon}. These are thought to have somewhat higher temperatures than normal SN Ia like SN 2011fe, but otherwise similar density and velocity structures, which suggests the carbon feature should be, if anything, easier to detect: even if carbon were to become doubly ionized in the innermost layers, the conditions would still be favorable for forming the carbon feature in the layers above, which are generally more carbon rich. The lack of observed carbon signatures would then suggest that in these events the amount of unburned material is truly lower than in their normal counterparts. On the other hand, for super-Chandrasekhar mass candidates, which are also associated with relatively hot ejecta, the carbon feature is one of the defining features. This would be unexpected if these objects were part of the same family: since they arise from even more energetic explosion than the 91T-like SN Ia, one would naively expect them to contain even less unburned material. It is less clear whether the presence of carbon indicates a much larger abundance of unburned material, because the velocities inferred from the carbon feature in super-Chandrasekhar mass candidates are relatively low ($7500 \lesssim v \lesssim 10000{\rm\,km\,s^{-1}}$; \citealt{Taubenberger2017_subtypes}), and thus the carbon column density will be diluted relatively slowly (as discussed for SN~2002fk in Sect.~\ref{subsec:physics_disappear}). Independent of the precise reasons, the above suggests a distinct explosion mechanism. It might be particularly fruitful to study overluminous and super-Chandrasekhar events together with possible ``transitional'' events like SN~iPTF13asv (SN~2013cv, \citealt{Cao2016_subtype}). \section{Neutral Carbon} \label{sec:neutral} So far, we have only considered singly-ionized carbon, and in particular its $\lambda6580$ transition. However, \citet{Hsiao2013_nir-carbon} presented evidence also for the presence of neutral carbon in SN~2011fe, from a flux deficit in the NIR attributed to \ion{C}{1} $\lambda10693$ (which has the strongest oscillator strength in the near-infrared region of the spectra; \citealt{Marion2006_carbon}), a flux deficit that seems to become more relevant at epochs near maximum (see their Fig. 4), and appears to move to lower velocity. This detection is puzzling, since in our models carbon is mostly singly ionized throughout the ejecta (consistent with early work; e.g., \citealt{Tanaka2008_carbon}). Indeed, we find that neutral carbon does not contribute significantly to our synthetic spectra, except possibly at very early times, $t_{\rm{exp}}=3.7$ and 5.9~d, where the optical depth in the \ion{C}{1} $\lambda10693$ feature reaches $2.6$ and $0.12$, respectively (see Table \ref{tb:quantities}). But this happens only in the outermost layers, above $19000\ \rm{km\ s^{-1}}$, which, with $\ensuremath{X_{\rm C}}=0.97$, consist of almost pure carbon\footnote{M14 note that a C/O abundance ratio closer to 50/50 would worsen the fit to the oxygen features.}. The line opacity decreases drastically at later epochs; e.g., $\tau < 0.02$ for $t_{\rm{exp}}\geq 9\,$d and, consistently, we do not see clear signatures of \ion{C}{1} $\lambda10693$ in these simulated spectra. We note that the fits are not particularly good in the NIR region, e.g., not reproducing the neighbouring Mg feature near $1.05\,\mu$m (see Fig.~\ref{Fig:scan}). This is possibly because the approximation of a sharp photosphere is less accurate to simulate the NIR region, implying that long-wavelength radiation from below the assumed photosphere could also interact with the ejecta above. Importantly, in our models, we find neutral carbon to have higher opacities in the cooler layers, which are located above the photosphere; Therefore, the approximation of a sharp photosphere is unlikely to affect the opacities we derive for neutral carbon. Also, we note that changing the abundance of Mg is unlikely to change the fact that carbon is predominantly ionized, rather than neutral, in our simulations. To verify this, we ran an additional model at $t_{\rm{exp}}=9.0$\, d where the Mg abundance is increased by a factor of 10 in the carbon rich region; in this model, the opacity of the \ion{C}{1} $\lambda10693$ line remained small. The above raises the question of whether neutral carbon is relevant or not in SN~2011fe and, more generally, in normal SNe~Ia. Could the identification by \citet{Hsiao2013_nir-carbon} be wrong? Or is the fraction of neutral carbon underestimated in TARDIS, perhaps because it does not fully take into account all NLTE effects? In support of their identification, \citet{Hsiao2013_nir-carbon} use a physical argument first advanced by \citet{Marion2006_carbon}, that the fractions of both neutral carbon and neutral oxygen can be quite high because high opacities by Fe line transitions in the ultraviolet deplete the photons that can ionize these elements. Here, \citet{Marion2006_carbon} noted that carbon and oxygen have similar ionization and excitation levels, and that the oscillator strength of the \ion{C}{1} $\lambda10693$ transition is about 50 times larger than that of the \ion{O}{1} $\lambda7773$ one. They thus suggest that the detection of the \ion{O}{1} feature in SNe~Ia implies that, if any carbon is present in the same layers as oxygen, it would be partially neutral and produce a strong feature. Since \citet{Marion2006_carbon} found no clear evidence of carbon in the objects they studied, they concluded that those events had low carbon-to-oxygen fractions. But using the same argument that neutral carbon might be expected, \citet{Hsiao2013_nir-carbon}, \citet{Marion2015_nir-carbon} and \citet{Hsiao2015_iPTF13ehb} used line identification codes to infer that neutral carbon was present in the ejecta of SN~2011fe, SN~2014J and iPTF~13ebh, respectively, because it improved spectral fits in the NIR region. As noted, our simulations do not show significant neutral carbon, but they do show an appreciable fraction of neutral oxygen. For instance, at $t_{\rm{exp}}=5.9$\,d, in the outer layers with $v\gtrsim 19000{\rm\,km\,s^{-1}}$ which have the most favorable conditions, about 10\% of oxygen but only 0.02\% of carbon is predicted to be neutral. Such differences are expected in thermal equilibrium despite carbon and oxygen having similar ionization potentials ($11.2$ and $13.6{\rm\,eV}$ respectively). For instance, for a typical temperature in the outermost layers of $T=7000{\rm\,K}$, the Saha equation estimates a neutral oxygen fraction about 100 times larger than the neutral carbon fraction. To determine whether the identifications are correct, it may help to compare with sub-luminous SNe Ia, for which, given their cooler ejecta, the fraction of neutral carbon should be higher than in normal SNe~Ia. Indeed, the subluminous SN~1999by was one of the first SNe~Ia for which neutral carbon was identified, by \citet{Hoflich2002_nir}, using a self-consistent radiation code that included a detailed NLTE treatment. Interestingly, \citet{Hsiao2015_iPTF13ehb} detected neutral carbon in iPTF~13ebh, which is considered a transition object: it is on the fainter/cooler end of the \citet{Phillips1993_relation} relation, but its NIR maxima peaked before the $B$-band maximum and it did not exhibit a strong Ti trough. The \ion{C}{1} $\lambda10693$ feature is strong in the earliest spectra (i.e. prior to $-10$\, d with respect to the $B$-band maximum), but quickly fades away, showing little velocity evolution. This behaviour is closer to what we would expect from cooler SN~2011fe models, where the temperature across the ejecta is artificially lowered so that the spectra resemble that of fainter SNe~Ia (as described in Paper I). Given the above, it is worth considering whether something else than \ion{C}{1} could cause the observed flux deficit near 1.03$\rm{\mu m}$ found in SN~2011fe and SN~2014J. One alternative might be high velocity Mg. This was discussed by \citet{Marion2015_nir-carbon} but discarded because of the lack of other high-velocity features at the same epoch (although the authors note that high-velocity Si might be present, but they cannot be sure because of possible blending with \ion{Na}{1}). Alternatively, the flux deficit in the NIR might be due to helium. Studies of the normal SN~1994D by \citet{Meikle1996_He} and \citet{Mazzali1998_He} already hinted that \ion{He}{1} (and/or \ion{Mg}{2}) could impact the NIR spectra under NLTE conditions, although it was noted that the absence of this feature in post-maximum spectra set quite stringent constraints. More recently, \citet{Boyle2017_He} investigated the possible signatures of \ion{He}{1} in NIR spectra in the context of double detonation models. Their synthetic spectra exhibited a stronger (deeper) He feature than what is seen in SN~2011fe (compare Fig.~4 of \citealt{Marion2015_nir-carbon} and Fig.~11 of \citealt{Boyle2017_He}), but perhaps this would be different for other progenitor models. Unfortunately, we cannot test this directly in our models, since for helium, with its unusual excitation levels, a more sophisticated NLTE treatment is necessary \citep{Boyle2017_He}. From the discussion above, we conclude that in cooler SNe~Ia the \ion{C}{1} $\lambda10693$ signature has likely been detected; This is also corroborated by the identification of the other \ion{C}{1} features in SN~1999by and iPTF~13ebh. However, for normal SNe~Ia a more detailed investigation is needed, in which the relevant parameter space is explored with a code that can produce self-consistent spectra and adequately take into account NLTE effects. \section{Model uncertainties} \label{sec:uncertainties} Our simulated spectra have systematic uncertainties related to the approximations used in TARDIS. One is related to the line treatment. For the simulations shown here, we adopted the \texttt{downbranch} treatment, because this is the default approximation used in other Monte Carlo codes in the literature, thus allowing better comparisons. In principle, however, the ``\texttt{macroatom}'' treatment is more physical, as it allows for de-excitation cascades and multiple-photon excitation. As already shown in \S 4 and Fig.~4 of paper I, the choice of line treatment does not have a large impact on spectra formed at the temperatures found in the ejecta of SN~2011fe. We find that also for this study the results do not depend on the treatment adopted. To illustrate this, we show in Fig.~\ref{Fig:best} the spectra of our fiducial model for SN~2011fe with both line treatments. One sees that the main difference is in the flux level at the redder wavelengths\footnote{The different continuum shape means that with {\tt macroatom} the fits to the spectra are no longer correct, i.e., for a proper analysis the tomography would have to be redone.}; the shape of most spectral features are very similar. \begin{figure} \epsscale{1.215} \plotone{Fig_best_12000_15000.pdf} \caption{Comparison of spectra calculated using different line treatments (green), with \texttt{downbranch} shown as full and \texttt{macroatom} as dotted lines. Epochs are as in other figures, $t_{\rm{exp}}=$ 3.7, 5.9, 9, 12.1, 16.1 and 19.1\,d (top to bottom). For all, we adopted abundances as in our fiducial model, $\ensuremath{X_{\rm C}^{\rm i}}=0.002$ and $\ensuremath{X_{\rm C}^{\rm m}}=0.01$. The blue and red lines shows how the spectra would change if the boundary between the inner and middle regions at $v = 13500{\rm\,km\,s^{-1}}$ were moved by plus or minus $1500{\rm\,km\,s^{-1}}$, respectively. One sees that while the choice of line interaction treatment influences the flux levels, it has little impact on the strength and shape of the carbon feature and that our results are sensitive to position of the boundary between the two regions to a level of $1500{\rm\,km\,s^{-1}}$. Moving this boundary by $1000{\rm\,km\,s^{-1}}$ does not lead to appreciable changes in synthetic spectra (not shown).} \label{Fig:best} \end{figure} Fig.~\ref{Fig:best} also illustrates the effect of changing the placement of the boundary between the inner and middle regions from the $v = 13500{\rm\,km\,s^{-1}}$ used in our analysis. This placement was somewhat arbitrarily taken from our ``depth scan'' (see Sect.~\ref{subsec:scan}). When we move this boundary to $v = 15000{\rm\,km\,s^{-1}}$ in our default model, where $\ensuremath{X_{\rm C}^{\rm i}}=0.002$ and $\ensuremath{X_{\rm C}^{\rm m}}=0.01$, the carbon feature weakens earlier and is shallower than observed at $t_{\rm{exp}}=$ 9 and 12.1\,d. Conversely, when we place it at $v = 12000{\rm\,km\,s^{-1}}$, the carbon feature becomes stronger than observed for $t_{\rm{exp}}\geq$ 9\,d. Both changes are as expected, and show that in interpreting our results, one has to keep in mind that our abundances are averages over fairly large regions. Another possible source of uncertainty in our synthetic spectra arises from the incomplete treatment of NLTE effects. It is known that deviations from LTE can be important: for instance, \citet{Thomas2007_carbon} studied the CO-rich zone of their W7 model and found significant departures when computing the population of atomic levels of \ion{C}{2} that are relevant for producing lines in the optical. While \citeauthor{Thomas2007_carbon} do not mention the explicit velocities and epoch used to compute their departure coefficients, the CO-rich zone of W7 is at velocities $v\gtrsim 14000{\rm\,km\,s^{-1}}$ in the W7 model (and $v\gtrsim 19000{\rm\,km\,s^{-1}}$ in our simulations), where the densities and temperatures are the lowest and thus more likely to deviate from LTE. Despite the CO-rich zone being composed of nearly $100\%$ carbon in our calculations, it still does not contribute significantly to the carbon feature. This is consistent with the observations: for instance, using Fig.~4 of \citet{Parrent2012_carbon}, one can see that Doppler velocities of the carbon trough do not exceed $15000{\rm\,km\,s^{-1}}$. Thus, NLTE effects are unlikely to greatly strengthen the carbon feature. We cannot exclude, however, the possibility that they greatly weaken it, in which case all our carbon mass fractions would be underestimates. Fortunately, for the deeper layers in which the feature is more likely to form, NLTE effects are likely to be less important. Finally, as discussed in \S \ref{sec:neutral}, one specific NLTE effect is that line blanketing by Fe depletes the pool of UV photons that could otherwise ionize C and O, possibly causing our calculations to underestimate the amount of neutral carbon everywhere in the ejecta. TARDIS only uses a simple approximation to treat this problem, which is implemented (following \citealt{Mazzali1993_code}) as a correction factor $\delta$ when estimating the balance of ions under the \texttt{nebular} ionization mode. We tested the influence of this approximation by comparing our fiducial spectra to models that enforce $\delta=1$ (i.e. no correction). The spectra did not differ in any significant way and thus this does help to determine neither whether depletion of UV photons is accounted for properly, nor whether the fraction of neutral carbon is estimated correctly in TARDIS. Despite these uncertainties, we stress that compared to work that relies on line identification routines (e.g. \citealt{Parrent2011_carbon,Parrent2012_carbon,Hsiao2013_nir-carbon,Marion2015_nir-carbon}), our approach has the advantage of computing temperatures and ionization balances in a more consistent way. Compared to full tomographic analysis (e.g. \citealt{Stehle2005_tomography,Mazzali2008_tomography,Tanaka2011_tomography,Sasdelli2014_tomography,Ashall2016_tomography}), our focus on one particular element helps to derive not just approximate values but also get a sense of the range of acceptable values. Nevertheless, in all these approaches, for a more complete assessment of their results, it will be important to compare with detailed NTLE treatments. \section{Conclusions and Ramifications} \label{sec:ramifications} In this work we have used a previously published tomographic analysis \citep{Mazzali2014_tomography} to investigate in detail the distribution of carbon at depth in the ejecta of SN~2011fe. Based on the local temperatures and densities in the ejecta of SN~2011fe, we find that the carbon feature should be strong if significant amounts of carbon are present near the photosphere for epochs up to maximum. We thus interpret the lack of observed events with a clear feature near maximum as evidence for the lack of carbon deep in the ejecta. We also find that for the relevant conditions, carbon is predominantly singly ionized and unlikely to produce the near-infared \ion{C}{1} $\lambda10693$ line; This agrees with the findings of \citet{Tanaka2008_carbon} and leaves as a bit of a mystery the flux deficit near $1.03{\rm\,\mu m}$ observed in some normal SN~Ia. It remains an open question whether it is due to neutral carbon (if full NLTE effects are relevant), neutral He \citep{Boyle2017_He} or high velocity Mg \citep{Marion2015_nir-carbon}. We compare our results with predictions for various SN Ia explosion scenarios and find that the violent merger model of \citet{Pakmor2012_DD} predicts, on average, too much carbon mixed across the whole ejecta. In contrast, the spontaneous detonation of cold white dwarfs with no He shell, which might be seen as a first-order approximation to, e.g., the dynamically-driven double-detonation model of \citet{Shen2018_ddet}, produce too little carbon at the velocities where we detect it. The discrepancies for these models are so large (factor of $\sim\!10$) that we believe these are excluded even taking into account the approximations used in our approach. \textbf{The delayed detonation model of \citet{Seitenzahl2013_DDT} and the gravitationally confined detonation model of \citet{Seitenzahl2016_gcd}} are roughly consistent with our results, but might well be excluded by determining the distribution of unburned material in sub- and over-luminous events, or by investigating in detail the outermost layers of the ejecta. For instance, the double detonation models predict that the carbon abundance should peak at intermediate velocities, with the velocity of maximum abundance likely depending on mass of the exploding white dwarf (and thus peak luminosity; \citealt{Fink2010_helium})\textbf{, whereas in DDT models, carbon abundance is predicted to be higher for fainter SNe Ia (e.g. \citealt{Wheeler1998_nir, Hoflich2002_nir}).} \acknowledgments We thank Stephen Ro for insightful discussion regarding the physics of exploding WDs. This work made use of the Heidelberg Supernova Model Archive (HESMA), https://hesma.h-its.org. W. E. Kerzendorf was supported by an ESO Fellowship and the Excellence Cluster Universe, Technische Universit{\"a}t M{\"u}nchen, Boltzmannstrasse 2, D-85748 Garching, Germany. SAS acknowledges support from STFC via grant ST/P000312/1. \software{Astropy \citep{Astropy2013}, TARDIS \citep{Kerzendorf2014_TARDIS, Kerzendorf2018_TARDIS}}. \bibliographystyle{./apj}
\section{Background} The field of artificial intelligence (AI) has long been involved in trying to create artificial systems that can rival humans in their intelligence, and as such, has looked to games as a way of challenging AI systems. Games are created by humans, for humans, and therefore have external validity to their use as AI benchmarks \cite{yannakakis2018artificial}. After the defeat of the reigning chess world champion by Deep Blue in 1997, the next major milestone in AI versus human games was in 2016, when a Go grandmaster was defeated by AlphaGo \cite{silver2016mastering}. Both chess and Go were seen as some of the biggest challenges for AI, and arguably one of the few comparable tests remaining is to beat a grandmaster at StarCraft (SC), a real-time strategy game. Both the original game, and its sequel SC II, have several properties that make it considerably more challenging than even Go: real-time play, partial observability, no single dominant strategy, complex rules that make it hard to build a fast forward model, and a particularly large and varied action space. DeepMind recently took a considerable step towards this grand challenge with AlphaStar, a neural-network-based AI system that was able to beat a professional SC II player in December 2018 \cite{alphastarblog}. This system, like its predecessor AlphaGo, was initially trained using imitation learning to mimic human play, and then improved through a combination of reinforcement learning (RL) and self-play. At this point the algorithms diverge, as AlphaStar utilises population-based training (PBT) \cite{jaderberg2017population} to explicitly keep a population of agents that train against each other \cite{jaderberg2018human}. This part of the training process was built upon multi-agent RL and game-theoretic perspectives \cite{lanctot2017unified,balduzzi2018re}, but the very notion of a population is central to evolutionary computation (EC), and hence we can examine AlphaStar through this lens as well\footnote{Note that we present a high-level overview of general interest, and have left aside the many deep links to the crossovers between EC and game theory \cite{smith1982evolution}.}. \vspace{-1mm} \section{Components} \subsection{Lamarckian evolution} Currently, the most popular approach to training the parameters of neural networks is backpropagation (BP). However, there are many methods to tune their hyperparameters, including evolutionary algorithms (EAs). A particularly synergistic approach is to use a memetic algorithm (MA), in which evolution is run as an outer optimisation algorithm, and individual solutions can be optimised by other means, such as BP, in an inner loop \cite{moscato1989evolution}. In this specific case, an MA can combine the exploration and global search properties of EAs with the efficient local search properties of BP. PBT \cite{jaderberg2017population}, used in AlphaStar to train agents, is an MA that uses Lamarckian evolution (LE)\footnote{A more extensive literature review on LE can be found in the original paper.}: in the inner loop, neural networks are continuously trained using BP, while in the outer loop, networks are picked using one of several selection methods (such as binary tournament selection), with the winner's parameters overwriting the loser's; the loser also receives a mutated copy of the winner's hyperparameters \cite{goldberg1991comparative}. PBT was originally demonstrated on a range of supervised learning and RL tasks, tuning networks with higher performance than had previously been achieved. It is perhaps most beneficial in problems with highly non-stationary loss surfaces, such as deep RL, as it can change hyperparameters on the fly. As a single network may take several gigabytes of memory, or need to train for several hours, scalability is key for PBT. As a consequence, PBT is both asynchronous and distributed \cite{nowostawski1999parallel}. Rather than running many experiments with static hyperparameters, the same amount of hardware can utilise PBT with little overhead---the outer loop reuses solution evaluation from the inner loop, and requires relatively little communication. When considering the effect of non-stationary hyperparameters and pre-emption on weaker solutions, the savings are even greater. Another consequence of these requirements is that PBT is steady state \cite{syswerda1991study}, as opposed to generational EAs such as classic genetic algorithms. A natural fit for asynchronous EAs and LE, steady state EAs can allow the optimisation and evaluation of individual solutions to proceed uninterrupted and hence maximise resource efficiency. The fittest solutions survive longer, naturally providing a form of elitism/hall of fame, but even ancestors that aren't elites may be preserved, maintaining diversity\footnote{When given an appropriate selection pressure \cite{miller1995genetic}.}. \vspace{-1mm} \subsection{Co-evolution} When optimising an agent to play a game, like in AlphaStar, it is possible to use self-play for the agent to improve itself. Competitive co-evolutionary algorithms (CCEAs) can be seen as a superset of self-play, as rather than keeping only a solution and its predecessors, it is instead possible to keep and evaluate against an entire population of solutions. Like self-play, CEAs form a natural curriculum \cite{hillis1990co}, but also confer an additional robustness as solutions are evaluated against a varied set of other solutions \cite{rosin1997new,stanley2004competitive}. Through the use of PBT in a CCEA setting, Jaderberg et~al. \cite{jaderberg2018human} were able to train agents to play a first-person game from pixels, utilising BP-based deep RL in combination with evolved reward functions \cite{ackley1991interactions}. The design of CEAs have many aspects \cite{popovici2012coevolutionary}, and characterising this approach could lead to many potential variants. Here, for example, the interaction method was atypically based on sampling agents with similar fitness evaluations (Elo ratings), but many other heuristics exist. \vspace{-1mm} \subsection{Quality diversity} A major advantage of keeping a population of solutions---as opposed to a single one---is that the population can represent a diverse set of solutions. This is not restricted strictly to multi-objective optimisation problems, but can also be applied to single objectives, where behaviour descriptors (BDs; i.e., solution phenotypes) can be used to pick solutions in the end. Quality diversity (QD) algorithms explicitly optimise for a single objective (quality), but also search for a large variety of solution types, via BDs, to encourage greater diversity in the population \cite{cully2018quality}. Recently, Ecoffet et~al. \cite{ecoffet2019go} used a QD algorithm to reach another milestone in playing games with AI---their system was the first to solve Montezuma's Revenge, a platform game notorious for its difficulty in exploring the environment. In SC, there is no best strategy. Hence, the final AlphaStar agent consists of the set of solutions from the Nash distribution of the population---the set of complementary, least exploitable strategies \cite{balduzzi2018re}. In order to improve training, as well as increase the variety in the final set of solutions, it therefore makes sense to explicitly encourage diversity. As it does so, AlphaStar can also be classified as a QD algorithm. In particular, agents may have game-specific BDs, such as building extra units of a certain type, but also criteria to beat a certain other agent\footnote{A concept highly related to competitive fitness sharing in CCEAs \cite{rosin1997new}.}, criteria to beat a set of other agents, or even a mix of these. Furthermore, these specific criteria are also adapted online, which is relatively novel among QD algorithms \cite{wang2019paired}. There is more that could be done here though: it may be possible to extract BDs from human data \cite{yannakakis2018artificial}, or even learn them in an unsupervised manner \cite{cully2018hierarchical}. And, given a set of diverse strategies, a natural next step is to infer which might work best against a given opponent, enabling online adaptation. \vspace{-1mm} \section{Discussion} While AlphaStar is a complex system that draws upon many areas of AI research, we believe a hitherto undersold perspective is that of it as an EA. In particular, it combines LE, CCEAs, and QD to spectacular effect. We hope that this perspective will give both the EC and deep RL communities the ability to better appreciate and build upon this significant AI system. \bibliographystyle{ACM-Reference-Format}
\section{Introduction} Isogeometric Analysis (IgA), see~\cite{Hughes:2005}, is a spline based approach for approximating the solution of a boundary value problem (BVP). One of the big strengths of IgA is that it has the approximation power of a high-order method while the number of degrees of freedom behaves basically like for a low-order method. To obtain this behavior, we have to be able to increase the spline degree while we simultaneously increase the smoothness. In IgA, this is typically called $k$-refinement and leads to spline based discretizations. In IgA, the computational domain (usually called physical domain) is parameterized using spline or NURBS functions. Since it might be too restrictive to parameterize the whole computational domain using just one global (smooth) geometry function, one typically represents the physical domain as the union of subdomains, in IgA called patches. Then, each of the patches is parameterized by its own geometry function (multi-patch IgA). On each patch, a space of trial and test functions is introduced. The simplest approach to set up such a function space is to use tensor-product B-splines on the unit square or unit cube (parameter domain) and to use the geometry function to map them onto the physical domain or, in the multi-patch case, onto one of the patches. If we set up the function spaces such that the basis functions on the interfaces between the patches agree, we can use conforming discretizations. Approximation errors (cf.~\cite{Hughes:2005,Bazilevs:BeiraoDaVeiga:Cottrell:Hughes:Sangalli:2006, BeiraoDaVeiga:Buffa:Rivas:Sangalli:2011,BeiraoDaVeiga:Buffa:Sangalli:Vazquez:2014, Takacs:Takacs:2015,Floater:Sande:2017,Sande:Manni:Speleers:2018,deLaRiva:Rodrigo:Gaspar:2018,Tielen:Moller:Goddeke:Vuik:2019} and many others) and multigrid solvers (cf.~\cite{Gahalaut:Kraus:Tomar:2013,Speleers:2015,Hofreither:Takacs:Zulehner:2017,Hofreither:Takacs:2017} and others) for such discretizations have been previously discussed. Since we are interested in $k$-refinement, we need results that are explicit in the spline degree. For the single-patch case, such error estimates have originally been given in~\cite{Takacs:Takacs:2015} and later improved in~\cite{Sande:Manni:Speleers:2018}. In~\cite{Hofreither:Takacs:2017}, a robust single-patch multigrid solver has been proposed and analyzed based on the error estimates from~\cite{Takacs:Takacs:2015}. In~\cite{Takacs:2018}, both the approximation error estimates and the multigrid solver have been extended to the conforming multi-patch case. These results are the foundation of the present paper. If conforming discretizations are not feasible, discontinuous Galerkin (dG) approaches are possible. One standard dG approach is the Symmetric Interior Penalty discontinuous Galerkin (SIPG) method, see~\cite{Arnold:1982,Arnold:Brezzi:Cockburn:Marini:2002}. Already in~\cite{LMMT:2015,LT:2015}, it has been proposed to utilize these approaches to couple patches in IgA. Recently, also the dependence of the approximation error on the spline degree has been analyzed, see~\cite{Takacs:2019}. It was not possible to show that the approximation error is robust in the spline degree but it could be proven that it only grows logarithmically. (Robust) multigrid solvers for such non-conforming discretizations are not known so far. In the present paper, it is shown how the multigrid solver from~\cite{Takacs:2018} can be extended to SIPG discretizations; we observe -- as in~\cite{Takacs:2018} -- that the numerical experiments show both robustness in the grid size and the spline degree. For completeness, we also show how to extend the convergence analysis from~\cite{Takacs:2018} to SIPG discretizations. It is worth noting that there are alternative solvers for multi-patch IgA, like FETI-type approaches, cf.~\cite{KleissEtAl:2012,Hofer:2017} and others, overlapping Schwarz type methods, cf.~\cite{BeiraoDaVeiga:Cho:Pavarino:Scacchi:2012}, or BDDC methods, cf.~\cite{BeiraoDaVeiga:Cho:Pavarino:Scacchi:2013}; most of them, however, have not been worked out for the non-conforming case. Note that the idea behind the proposed subspace corrected mass smoother is that the boundary value problem on the physical domain (on one patch) can be well approximated by a boundary value problem on the parameter domain. Thus, the tensor-product structure on the parameter domain can be used. This is true if the geometry function is not too distorted. Otherwise, the convergence behavior suffers significantly. The same behavior can be observed by other fast solvers that are based on the same idea, cf. the fast diagonalization method~\cite{Sangalli:2016}. Here, the authors have improved their method by incorporating the geometry information into the preconditioner, cf.~\cite{Montardini:Sangalli:Tani:2018}. For the multigrid setting, it has turned out that one can overcome these problems quite well if the subspace corrected mass smother is combined with a Gauss-Seidel smoother (hybrid smoother) since both approaches have strengths that seem to be somewhat orthogonal to each other (robustness in spline degree vs. robustness in the geometry), cf. also~\cite{Sogn:Takacs:2018}. In the present paper, we illustrate our findings with numerical experiments. All presented numerical experiments are available in the G+Smo library~\cite{gismoweb}. This paper is organized as follows. We give the model problem and a conforming discretization in Section~\ref{sec:mp}. Then, in Section~\ref{sec:sipg}, we discuss why a non-conforming discretization might be of interest. Moreover, we propose a discontinuous Galerkin approach that fits our needs. We proceed to multigrid solvers: In Section~\ref{sec:mg:gs}, we discuss Gauss-Seidel smoothers and their performance. Motivated by that section, we introduce a subspace corrected mass smoother in Section~\ref{sec:mg:scms} and finally a hybrid smoother in Section~\ref{sec:mg:hyb}. In Section~\ref{sec:fin}, we conclude and give some outlook. The Appending finally contains the proofs of the theorems stated in the paper. \section{Model problem and standard Galerkin discretization}\label{sec:mp} Let $\Omega\subset\mathbb{R}^d$ with $d\in\{2,3\}$ be an open and simply connected Lipschitz domain. Most of the numerical experiments are done for the two-dimensional domains shown in Figure~\ref{fig:1}. \begin{figure}[h] \begin{center} \includegraphics[height=.25\textwidth]{Lmesh} \qquad\qquad \includegraphics[height=.25\textwidth]{YETI} \end{center} \caption{The computational domains: L-shaped domain and Yeti footprint} \label{fig:1} \end{figure} The first domain is an L-shaped domain consisting of three quadrilaterals. Here, the geometry function is just the identity or a translation. On the coarsest grid level $\ell=0$, each patch consists only of one element, i.e., the local basis functions are polynomials only. The second domain is the Yeti footprint which consists of the 21 patches depicted in Figure~\ref{fig:1}. Here, the grid on the coarsest grid level is as follows. The five patches at the bottom consist of two elements each, which are constructed by subdividing the patches on their longer sides. The remaining patches consist only of one element each. The grid levels $\ell=1,2,\ldots,$ are obtained by uniform refinement. Consider the following \emph{Poisson model problem with Dirichlet boundary conditions}. Find $\mathrm u\in H^1(\Omega)$ such that \begin{equation} \label{eq:model0} -\Delta \mathrm u = \mathrm f \quad \mbox{in}\quad \Omega, \qquad \mathrm u= \mathrm g \quad \mbox{on}\quad \partial \Omega, \end{equation} where $\mathrm f\in L_2(\Omega)$ and $\mathrm g\in H^2(\Omega)$ are given functions. Here and in what follows, $L_2(\Omega)$, $H^r(\Omega)$ and $H^r_0(\Omega)$ are the standard Lebesgue and Sobolev spaces. The experiments are performed for the choice $\mathrm g(x,y) := \sin(\pi x) \, \sin(\pi y)$ and $\mathrm f:=-\Delta \mathrm g$; note that $\mathrm g$ is the exact solution of the problem. After homogenization ($u:=\mathrm u-\mathrm g$, $f:=\mathrm f+\Delta\mathrm g$), the problem reads in variational form as follows. Find $u\in V:=H^1_0(\Omega)$ such that \begin{equation} \label{eq:model} ( \nabla u,\nabla v)_{L_2(\Omega)} = (f,v)_{L_2(\Omega)} \qquad \mbox{for all $v \in H^1_0(\Omega)$}. \end{equation} The computational domain $\Omega$ is a standard multi-patch domain. Thus, we assume that $\Omega$ is composed of $K$ non-overlapping patches $\Omega_k$: \begin{equation}\label{eq:omega:1} \overline\Omega = \bigcup_{k=1}^K \overline{\Omega_k} \quad \mbox{ with } \quad \Omega_k\cap \Omega_l =\emptyset \quad \mbox{ for } k\not=l, \end{equation} where each patch is represented by a sufficiently smooth bijective geometry function \begin{equation}\label{eq:omega:2} G_k :\widehat{\Omega}:=(0,1)^d \rightarrow \Omega_k := G_k (\widehat{\Omega})\subset \mathbb{R}^d \end{equation} which can be continuously extended to $\overline{\widehat{\Omega}}$, the closure of~$\widehat{\Omega}$. Moreover, we assume that the mesh introduced by the patches satisfies the following condition. \begin{assumption}\label{ass:1} For any $k\not=l$, the intersection $\overline{\Omega_k} \cap \overline{\Omega_l}$ is either (a) empty, (b) one common vertex, (c) the closure of one common edge, or -- for $d=3$ -- (d) the closure of one common face. \end{assumption} For each of the patches, we assume to have a hierarchy of grids with levels $\ell=0,1,\ldots,L$ obtained by uniform refinement, which we denote by \begin{equation}\label{eq:local} V_{k,\ell} := \{ v \in L_2(\Omega_k) \; : \; v \circ G_k \in \bigotimes_{\delta=1}^d S_{p,h_\ell} \} = \mbox{span } \{\varphi_{k,\ell}^{(i)}\}_{i=1}^{N_{k,\ell}}, \end{equation} where $\bigotimes_{\delta=1}^d S_{p,h_\ell} $ is the space of tensor-product splines of degree $p$, smoothness $H^p(\widehat{\Omega})$ (or, equivalently, $C^{p-1}(\widehat{\Omega})$) and grid size $h_\ell=2^{\ell} h_0$ on the parameter domain $\widehat{\Omega}$. Note that the grid can be non-uniform and both the spline degree and the grid size can depend on the spatial direction and of the patch number; for simplicity, we do not write down this dependence explicitly. Note that the grid needs to be quasi-uniform, i.e., there needs to be a constant $c>0$ such that all knot spans on grid level $\ell$ are bounded from below by $c\,h_\ell$. The functions $\varphi_{k,\ell}^{(i)}$ are assumed to form a (standard) B-spline or NURBS basis of $V_{k,\ell}$. To be able to set up a conforming discretization, we need to assume that the function spaces are fully matching on the interfaces, cf.~\cite[Assumption~2.4]{Takacs:2018}. For tensor-product B-spline bases, the following assumption characterizes fully matching discretizations. \begin{assumption}\label{ass:fully} On each interface between two patches, the geometry functions, the knot vector in tangential direction, and the spline degree in tangential direction agree. \end{assumption} Assuming a fully matching discretization, we define the conforming discretization space by \begin{equation}\label{eq:igaspace0} V_\ell^{c} := \{ v \in V \; : \; v|_{\Omega_k} \in V_{k,\ell} \;\mbox{ for }\; k=1,\ldots,K \}. \end{equation} A basis for this space is visualized in Figure~\ref{fig:dof} (left), where all basis functions are represented by their Greville point. The support of the basis functions with Greville point in the interior of a patch is completely contained in that patch. The basis functions with Greville points on the interfaces are combinations of the matching patch-local basis functions. Their support extends to the vertices if and only if the Greville point is located on the vertex. \begin{figure}[h] \begin{center} \includegraphics[height=.22\textwidth]{schematic-cg} \end{center} \caption{Degrees of freedom (represented by Greville points) in conforming case} \label{fig:dof} \end{figure} The conforming discretization of the model problem is obtained using the standard Galerkin principle: Find $u_\ell\in V_\ell^{c}$ such that \begin{equation} \label{eq:model:discr} (u_\ell,v_\ell)_{H^1(\Omega)} = (f,v_\ell)_{L_2(\Omega)} \qquad \mbox{for all $v_\ell \in V_\ell^{c}$}. \end{equation} Using the abovementioned basis for the space $V_\ell^c$, we obtain a standard matrix-vector problem: Find $\underline{u}_\ell \in \mathbb{R}^{N_\ell}$ such that \begin{equation} \label{eq:linear:system:0} A_\ell \, \underline{u}_\ell = \underline{f}_\ell, \end{equation} where $A_\ell$ is the stiffness matrix, the vector $\underline{u}_\ell$ is the representation of $u_\ell$ with respect to the chosen basis and the load vector $\underline{f}_\ell$ is obtained by testing the function $f$ with the basis functions. \section{Symmetric interior penalty discontinuous Galerkin (SIPG) discretization}\label{sec:sipg} Following \cite{LMMT:2015,LT:2015,Takacs:2019}, we use a conforming isogeometric discretization for each patch and couple the patches using discontinuous Galerkin. We assume that the domain $\Omega$ is again subdivided into patches such that~\eqref{eq:omega:1}, \eqref{eq:omega:2} and Assumption~\ref{ass:1} are satisfied. We assume again to have patch-local spaces $V_{k,\ell}$ as in~\eqref{eq:local}, which are combined in a non-conforming (i.e., discontinuous) way, i.e., we just define \begin{equation}\label{eq:igaspace} V_\ell^{n} := \{ v \in L_2(\Omega) \; : \; v|_{\Omega_k} \in V_{k,\ell} \; \mbox{ for } \; k=1,\ldots,K \; \mbox{ and } \; v|_{\partial\Omega}=0 \}. \end{equation} This allows us to drop Assumption~\ref{ass:fully}. Note that we strongly enforce the Dirichlet boundary conditions in our example; alternatively, one could use the SIPG method also to enforce the Dirichlet boundary conditions. \begin{figure}[h] \begin{center} \includegraphics[height=.22\textwidth]{schematic-dg} \end{center} \caption{Degrees of freedom (represented by Greville points) in non-conforming case} \label{fig:dof:n} \end{figure} Since we have a discontinuous function space, we can visualize the degrees of freedom by tearing apart the individual patches, cf. Figure~\ref{fig:dof:n}. Here, neither the Greville points nor the basis functions need to agree on the interfaces; the support of each basis function is contained in one single patch. Since~$V_\ell^{n}\not\subset V$, it is not feasible to use the standard Galerkin principle for discretization. Thus, we couple the patches using the Symmetric Interior Penalty discontinuous Galerkin (SIPG) method. First, we define \[\mathcal{N} := \{ (k,j) \; :\; k<j \mbox{ with } \Omega_k \mbox{ and } \Omega_l \mbox{ have a common edge.}\}\] to be the set of interface-indices. For each interface $I_{k,j}$ with $(k,l)\in \mathcal{N}$, we define the following symbols. \begin{itemize} \item $\textnormal{\textbf{n}}$ is the outer normal vector of $\Omega_k$. (Thus, $-\textnormal{\textbf{n}}$ is the outer normal vector of $\Omega_l$.) \item $\llbracket \cdot \rrbracket$ is the jump operator: $\llbracket u \rrbracket := u|_{\Omega_k} - u|_{\Omega_l}$. \item $\{ \cdot \}$ is the averaging operator: $\{ u \} := \tfrac12 ( u|_{\Omega_k} + u|_{\Omega_l})$. \end{itemize} Now, we can formulate the SIPG discretization as follows: Find $u_\ell\in V_\ell^n$ such that \begin{equation} \label{eq:model:discr} (u_\ell,v_\ell)_{A_\ell} = (f,v_\ell)_{L_2(\Omega)} \qquad \mbox{for all $v_\ell \in V_\ell^n$}, \end{equation} where we define \begin{equation} \label{eq:model:discr2} \begin{aligned} (u,v)_{A_\ell} & := (u,v)_{Q_\ell} - (u,v)_{B_\ell} - (v,u)_{B_\ell}, \; &(u,v)_{Q_\ell} := (u,v)_{K_\ell} + \frac{\sigma p^2}{h_L} (u,v)_{J_\ell},\\ (u,v)_{K_\ell} & := \sum_{k=1}^K (\nabla u,\nabla v)_{L_2(\Omega_k)}, &(u,v)_{J_\ell} := \sum_{(k,l)\in \mc{N}} (\llbracket u\rrbracket,\llbracket v\rrbracket)_{L_2(I_{k,l})} , \\ (u,v)_{B_\ell} & := \sum_{(k,l)\in \mc{N}} (\llbracket u \rrbracket,\{\nabla v\}\cdot \textnormal{\textbf{n}})_{L_2(I_{k,l})}. \end{aligned} \end{equation} There is some $\sigma_0>0$ independent of the grid size, the spline degree and the number of patches such that for all $\sigma \ge \sigma_0$, the bilinear form $(\cdot,\cdot)_{A_\ell}$ is coercive, cf.~\cite[Theorems~8 and~9]{Takacs:2019}. Thus, for $\sigma \ge \sigma_0$, the Theorem of Lax Milgram states that the problem~\eqref{eq:model:discr} has exactly one solution. The combination of Ce\'a's Lemma and a naive approximation error estimate yields a discretization error estimate of the form \[ |u-u_L|_{Q_L}^2 \le c\, p^2 h_L^2 |u|_{H^2(\Omega)}^2, \] cf.~\cite{Takacs:2019}. By doing a more careful analysis, we obtain estimates of the form \[ |u-u_L|_{Q_L}^2 \le c\, (\log p)^4 h_L^2 |u|_{H^2(\Omega)}^2, \] see~\cite[eq.~(15)]{Takacs:2019}. This significantly decreases the influence of the spline degree. Note that the penalization term has the form \[ \frac{\sigma p^2}{h_L}, \] i.e., it depends on the grid size on the finest grid $h_L$. This follows the ideas from~\cite{Gopalakrishnan:Kanschat:2003}. The idea behind that is that \begin{equation}\label{eq:a:galerkin} (u_\ell,v_\ell)_{A_\ell} = (u_\ell,v_\ell)_{A_{\ell+1}} \quad \mbox{and}\quad (u_\ell,v_\ell)_{Q_\ell} = (u_\ell,v_\ell)_{Q_{\ell+1}} \end{equation} hold, i.e., we obtain a multigrid solver with conforming coarse-grid correction. This means that -- on the coarse grid levels -- the discretization is over penalized by a factor of $2^{L-\ell}$, i.e., \[ \underbrace{\frac{\sigma p^2}{h_L}}_{\displaystyle \widetilde\Sigma_\ell:=} = 2^{L-\ell} \underbrace{\frac{\sigma p^2}{h_\ell}}_{\displaystyle \Sigma_\ell:=}, \] where $\Sigma_\ell$ is the canonical parameter and $\widetilde\Sigma_\ell$ is the chosen one. We will see that this does not cause any problems for the examples we consider; following~\cite{Gopalakrishnan:Kanschat:2003}, convergence theory only holds if the number of smoothing steps is sufficiently increased for the coarser grid levels, cf. Remark~\ref{rem:opcosts}. Using a basis for the space $V_\ell^n$, we obtain a standard matrix-vector problem: Find $\underline{u}_\ell \in \mathbb{R}^{N_\ell}$ such that \begin{equation} \label{eq:linear:system} A_\ell \underline{u}_\ell = \underline{f}_\ell. \end{equation} \section{Multigrid solvers with Gauss-Seidel smoothers}\label{sec:mg:gs} In this and the following sections, we discuss several possible choices of multigrid smoothers, illustrate their convergence behavior with numerical experiments, and comment on the convergence theory. We consider conforming discretizations and non-conforming discretizations which are set up as discussed in the last two sections. As we have nested spaces in all cases, the matrix $I_{\ell-1}^{\ell}$ is always the canonical embedding from $V_{\ell-1}$ into $V_{\ell}$ and the restriction matrix $I_{\ell}^{\ell-1}$ is its transpose. The chosen method is presented as pseudo-code as Algorithm~\ref{alg:1}, where we choose $\mu=1$ for the V-cycle method or $\mu=2$ for the W-cycle method. \begin{algorithm}[h] \textsc{Multigrid}$\left(\ell, \underline{f}_\ell, \underline{u}_\ell\right)$\\ \mbox{}\qquad// Pre-Smoothing\\ \mbox{}\qquad\textbf{for} $n=1,\ldots,\nu_\ell$\\ \mbox{}\qquad\mbox{}\qquad $\underline{u}_\ell\gets \underline{u}_\ell + L_\ell^{-1} \left(\underline{f}_\ell-A_\ell\;\underline{u}_\ell\right)$ \\ \mbox{}\qquad// Coarse-grid correction\\ \mbox{}\qquad\textbf{if} $\ell=1$\\ \mbox{}\qquad\mbox{}\qquad $\underline{u}_\ell\gets \underline{u}_\ell+ I_{\ell-1}^{\ell} A_{\ell-1}^{-1} I_{\ell}^{\ell-1}\left(\underline{f}_\ell - A_\ell \;\underline{u}_\ell\right)$\quad// Direct solver\\ \mbox{}\qquad\textbf{else}\\ \mbox{}\qquad\mbox{}\qquad\textbf{for} $n=1,\ldots,\mu$\\ \mbox{}\qquad\mbox{}\qquad\mbox{}\qquad $\underline{u}_\ell\gets \underline{u}_\ell + I_{\ell-1}^{\ell} \textsc{Multigrid}\left(\ell-1, I_{\ell}^{\ell-1}\left(\underline{f}_\ell - A_\ell \;\underline{u}_\ell\right), 0\right)$ \\ \mbox{}\qquad// Post-Smoothing\\ \mbox{}\qquad\textbf{for} $n=1,\ldots,\nu_\ell$\\ \mbox{}\qquad\mbox{}\qquad $\underline{u}_\ell\gets \underline{u}_\ell + L_\ell^{-\top} \left(\underline{f}_\ell-A_\ell\;\underline{u}_\ell\right)$ \\ \mbox{}\qquad\textbf{return} $\underline{u}_\ell$ \caption{\label{alg:1}Multigrid algorithm} \end{algorithm} In the finite element world, Gauss-Seidel smoothers are known to be very efficient smoothers; thus, as a first attempt, we consider such a smoother. One forward Gauss-Seidel sweep can be represented by \[ \underline{u}_\ell \gets \underline{u}_\ell + L_\ell^{-1} \left(\underline{f}_\ell-A_\ell\;\underline{u}_\ell\right), \] where $L_\ell$ is a lower-triangular matrix containing the coefficients of the stiffness matrix $A_\ell$, i.e., it is given by \[ (L_\ell)_{i,j} = \left\{\begin{array}{ll} (A_\ell)_{i,j} & \mbox{ if } i \ge j \\ 0 & \mbox{ if } i < j \\ \end{array}\right.. \] To be able to use our multigrid solver as preconditioner for a conjugate gradient solver, the post-smoothing procedure uses the transposed matrix $L_\ell^\top$, which represents a backward-Gauss-Seidel sweep. All tables show the number of iterations required until the stopping criterion \[ \frac{\|A_L \underline{u}_L - \underline{f}_L\|_{\ell^2}}{\|\underline{f}_L\|_{\ell^2}} \le \epsilon := 10^{-8} \] is satisfied. As usual, the convergence behavior of the overall solver can be improved if the multigrid method is not just used directly as a solver, but as a preconditioner within a preconditioned conjugate gradient (PCG) solver. Thus, we present results for both possibilities; in the following sections we will restrict ourselves to the more efficient PCG solver. Since the V-cycle and the W-cycle methods yield comparable iteration counts, we present the results for the more efficient V-cycle only. The number of smoothing steps is chosen as $\nu_\ell:=1$ in all cases. The multigrid solver was implemented in C++ based on the G+Smo library~\cite{gismoweb}. The tables shown in the remainder of this section are obtained with the following command line instructions, where the values $L$ and $p$ are substituted accordingly. \begin{center} \begin{minipage}{.95\textwidth} \begin{lstlisting}[mathescape,columns=flexible,basicstyle=\ttfamily] > git clone https://github.com/gismo/gismo.git > cd gismo > make > cd build/bin > ./multiGrid_example -g domain2d/ldomain.xml -r $L$ -p $p$ -s gs -i d $\tabnr{tab:GS1}{a}$ > ./multiGrid_example -g domain2d/yeti_mp2.xml -r $L$ -p $p$ -s gs -i d $\tabnr{tab:GS2}{a}$ \end{lstlisting} \end{minipage} \end{center} The results for the PCG experiments, presented in Tables~\ref{tab:GS1}~(b) and~\ref{tab:GS2}~(b), are obtained by replacing the option {\tt -i d} by the option {\tt -i cg}. \begin{table}[ht] \begin{center} \begin{tabular}{l|rrrrrrr|rrrrrrr} \toprule & \multicolumn{7}{c|}{(a) Direct -- Conforming} & \multicolumn{7}{c}{(b) PCG -- Conforming} \\ \midrule $L\,\backslash\, p$ & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \midrule 4 & 9 & 24 & 74 &{--} &{--} &{--} &{--} & 8 & 15 & 28 & 53 &{--} &{--} &{--}\\ 5 & 9 & 24 & 73 &{--} &{--} &{--} &{--} & 8 & 15 & 28 & 52 &{--} &{--} &{--}\\ 6 & 9 & 24 & 72 &{--} &{--} &{--} &{--} & 8 & 15 & 28 & 53 &{--} &{--} &{--}\\ 7 & 10 & 24 & 72 &{--} &{--} &{--} &{--} & 8 & 15 & 28 & 54 &{--} &{--} &{--}\\ 8 & 10 & 24 & 72 &{--} &{--} &{--} &{--} & 8 & 15 & 28 & 54 &{--} &{--} &{--}\\ \bottomrule \end{tabular} \end{center} \caption{V-cycle with Gauss-Seidel smoother for the L-shaped domain} \label{tab:GS1} \end{table} \begin{table}[ht] \begin{center} \begin{tabular}{l|rrrrrrr|rrrrrrr} \toprule & \multicolumn{7}{c|}{(a) Direct -- Conforming} & \multicolumn{7}{c}{(b) PCG -- Conforming} \\ \midrule $L\,\backslash\, p$ & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \midrule 3 & 13 & 25 & 75 &{--} &{--} &{--} &{--} & 10 & 15 & 28 & 54 &{--} &{--} &{--}\\ 4 & 14 & 25 & 74 &{--} &{--} &{--} &{--} & 10 & 15 & 28 & 53 &{--} &{--} &{--}\\ 5 & 15 & 25 & 74 &{--} &{--} &{--} &{--} & 11 & 16 & 28 & 54 &{--} &{--} &{--}\\ 6 & 15 & 25 & 72 &{--} &{--} &{--} &{--} & 11 & 16 & 29 & 54 &{--} &{--} &{--}\\ 7 & 17 & 25 & 73 &{--} &{--} &{--} &{--} & 12 & 16 & 29 & 55 &{--} &{--} &{--}\\ \bottomrule \end{tabular} \end{center} \caption{V-cycle with Gauss-Seidel smoother for the Yeti footprint} \label{tab:GS2} \end{table} In Table~\ref{tab:GS1}, we observe that the multigrid solver is certainly robust in the grid size. While this approach is very efficient for small numbers of spline degrees, we observe that the convergence rates deteriorate significantly if the spline degree is increased. On the right side of the table, one can see the iteration counts for a preconditioned conjugate gradient method where one V-cycle of the mentioned multigrid method is used as a preconditioner. We observe that the iteration counts are significantly smaller than the iteration counts obtained by directly applying the multigrid solver. However, we simultaneously observe that we do not observe any qualitative improvement. In Table~\ref{tab:GS2}, we give the iteration counts for the Yeti footprint. We observe that -- despite the fact that the geometry function is now non-trivial -- the iteration counts are very similar to those of the L-shaped domain. When one turns to the non-conforming discretizations, it immediately turns out that the multigrid solver utilizing the Gauss-Seidel smoother does not converge well at all. One can show using standard arguments that the multigrid method converges with rates that are independent of the grid size and of the number of patches. The convergence analysis (for the conforming case) employs estimates that increase exponentially in the spline degree, cf.~\cite{Gahalaut:Kraus:Tomar:2013}. The numerical experiments show that this is not only a matter of the proof. Since we did not obtain convincing results, we are interested in more advanced smoothers that work well also for SIPG discretizations and which do not deteriorate if the spline degree is increased. \section{Multigrid with subspace corrected mass smoother}\label{sec:mg:scms} In this section, we employ the subspace corrected mass smoother as introduced in~\cite{Hofreither:Takacs:2017}. That smoother requires that the spline space has a tensor-product structure; in our examples, we have such a structure on each patch but not on the overall domain. The extension of that smoother to conforming discretizations has been discussed in~\cite{Takacs:2018} based on a domain-decomposition approach. The key idea was to decompose all degrees of freedom on a per-piece bases. Pieces are the patch-interiors and the interface pieces. In two dimensions, the interface pieces are the edges and the vertices of each of the patches. In three dimensions, the interface pieces are the faces, the edges and the vertices of each of the patches. The decomposition of the degrees of freedom is depicted in Figure~\ref{fig:decomp} (left). \begin{figure}[h] \begin{center} \includegraphics[height=.22\textwidth]{subspaces-cg} \includegraphics[height=.22\textwidth]{subspaces-dg} \end{center} \caption{Decomposition of the degrees of freedom (represented by the Greville point)} \label{fig:decomp} \end{figure} The piece-local smoothers, which we denote by $L_{\ell,T}^{-1}$, are defined as follows. For $T$ being a patch-interior, we choose $L_{\ell,T}^{-1}$ to be the subspace corrected mass smoother as proposed in~\cite{Hofreither:Takacs:2017}. We choose the scaling parameter (which was called~$\sigma$ in~\cite{Hofreither:Takacs:2017}) to be $\delta^{-1} h_\ell^{-2}$ for some suitable chosen parameter $\delta>0$. If $T$ is an interface piece, we choose \[ L_{\ell,T}:= P_T^{\top} A_\ell P_T, \] where the matrix $P_{\ell,T}$ represents the embedding of the piece $T$ in the whole space. The symbol $L_{\ell,T}^{-1}$ refers to be the application of a direct solver. Applying a direct solver on the interfaces is feasible since the interfaces have much smaller numbers of degrees of freedom than the interiors of the patches. The overall smoother is just an additive composition of the piece-local smoothers, i.e., we choose \begin{equation}\label{eq:Ldef} L_\ell^{-1} := \tau \sum_T P_{\ell,T} L_{\ell,T}^{-1} P_{\ell,T}^\top, \end{equation} where the sum is taken over all pieces $T$. Here, $\tau>0$ is some damping parameter to be chosen. The convergence theory from~\cite{Takacs:2018} can be summarized by the following theorem. \begin{theorem}\label{thrm:converg:conf} Assume that $\Omega \subset \mathbb{R}^2$ is such that full elliptic regularity is satisfied (cf.~\cite[Assumption~3.1]{Takacs:2018}). Consider the conforming discretization and a multigrid solver with the smoother~\eqref{eq:Ldef}. There are constants $\tau^*$, $\delta^*$ and $\theta$ which are independent of $K$, $h$, $L$ and $p$ (but may depend particularly on the geometry functions and the maximum number of neighbors of a patch) such that for \begin{equation}\label{eq:nu:1} \tau \in (0,\tau^*),\qquad \delta \in (0,\delta^*) \qquad\mbox{and}\qquad \nu_\ell > \nu_\ell^* := p\; \frac{\tau^*}{\tau} \; \frac{\delta^*}{\delta}\; \theta, \end{equation} the W-cycle multigrid method converges with a convergence rate $q\le \max_\ell \nu_\ell^*/\nu_\ell$. \end{theorem} Note that the terms $\frac{\tau^*}{\tau}$ and $\frac{\delta^*}{\delta}$ imply that the convergence degrades if too small values of those parameters are chosen. Thus, it is of interest to choose these parameters in a rather optimal way. Note that the convergence theorem requires full elliptic regularity (cf.~\cite[Assumption~3.1]{Takacs:2018}). Thus, it is applicable to the Yeti footprint but it is not directly applicable to the L-shaped domain. Convergence results for the case with full elliptic regularity often carry over \emph{in practice} to cases where that regularity assumption does not hold. The same behavior can be observed for the numerical experiments we have considered. Observe that the convergence theorem suggests that the number of smoothing steps should increase with $p$. As already outlined in~\cite{Takacs:2018}, this seems to be too pessimistic since the numerical experiments have shown that $\nu_\ell:=1$ in all cases yields good convergence rates. The numerical experiments are again applied within the same setup as in the last section. We set up a V-cycle multigrid method with 1+1 smoothing steps of the proposed smoother $L_\ell$ (on all grid levels). The damping parameter~$\tau$ is chosen as indicated with the option {\tt --MG.Damping} and the scaling parameter~$\delta$ is chosen as indicated with the option {\tt --MG.Scaling} below. The tables for the conforming case shown in this section are obtained with the following code, where the values $L$ and $p$ are substituted accordingly: \begin{center} \begin{minipage}{.95\textwidth} \begin{lstlisting}[mathescape,columns=flexible,basicstyle=\ttfamily] > ./multiGrid_example -g domain2d/ldomain.xml -r $L$ -p $p$ -s scms --MG.Damping 1 --MG.Scaling .12 -i d $\tabnr{tab:SCMS1}{a}$ > ./multiGrid_example -g domain2d/yeti_mp2.xml -r $L$ -p $p$ -s scms --MG.Damping .25 --MG.Scaling .2 -i cg $\tabnr{tab:SCMS3}{a}$ \end{lstlisting} \end{minipage} \end{center} The results for the PCG experiments presented Table~\ref{tab:SCMS1}~(b) are obtained by replacing the option {\tt -i d} by the option {\tt -i cg}. \begin{table}[ht] \begin{center} \begin{tabular}{l|rrrrrrr|rrrrrrr} \toprule & \multicolumn{7}{c|}{(a) Direct -- Conforming} & \multicolumn{7}{c}{(b) PCG -- Conforming} \\ \midrule $L\,\backslash\, p$ & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \midrule 4 & 27 & 23 & 22 & 20 & 17 & 16 & 15 & 16 & 14 & 13 & 12 & 11 & 11 & 10\\ 5 & 29 & 27 & 27 & 26 & 24 & 24 & 22 & 17 & 16 & 15 & 15 & 14 & 14 & 14\\ 6 & 30 & 30 & 28 & 27 & 27 & 27 & 26 & 17 & 17 & 16 & 16 & 15 & 16 & 15\\ 7 & 31 & 30 & 29 & 28 & 28 & 27 & 27 & 17 & 17 & 17 & 16 & 16 & 16 & 16\\ 8 & 32 & 31 & 30 & 29 & 28 & 28 & 28 & 18 & 17 & 17 & 17 & 16 & 16 & 16\\ \bottomrule \end{tabular} \end{center} \caption{V-cycle with subspace corrected mass smoother for the L-shaped domain} \label{tab:SCMS1} \end{table} All numerical experiments show that the proposed method is robust both in the grid size and the spline degree. However, when comparing the results for the Yeti footprint from Table~\ref{tab:SCMS3}~(a) with the corresponding results for the L-shaped domain from Table~\ref{tab:SCMS1}~(b), we see that the multigrid solver suffers from distorted geometry functions. The numbers for the Yeti footprint seem not to be completely robust in the grid size. Since we have given a convergence theory, we know that the convergence numbers are bounded uniformly. Thus, the observed behavior is pre-asymptotic. The reason for this is that on coarser grid levels, the geometry is not resolved exactly. Let $A_\ell$ be the original stiffness matrix and $\widehat{A}_\ell$ be the simplified stiffness matrix obtained by neglecting the geometry function. Then, we have \[ \kappa( \widehat{A}_\ell^{-1} A_\ell ) = \sup_{v_\ell \in V_\ell} \frac{|v_\ell|_{H^1(\Omega)}^2 }{\sum_{k=1}^K|v_\ell \circ G_k|_{H^1(\widehat{\Omega})}^2 } \sup_{v_\ell \in V_\ell}\frac{\sum_{k=1}^K|v_\ell \circ G_k|_{H^1(\widehat{\Omega})}^2 }{ |v_\ell|_{H^1(\Omega)}^2 }, \] which yields \begin{equation}\label{eq:sgn} \begin{aligned} \kappa( \widehat{A}_0^{-1} A_0 ) & \le \cdots \le \kappa( \widehat{A}_{L-1}^{-1} A_{L-1}) \le \kappa( \widehat{A}_{L}^{-1} A_{L}) \\&\le \sup_{v \in V} \frac{ |v|_{H^1(\Omega)}^2 }{\sum_{k=1}^K|v \circ G_k|_{H^1(\widehat{\Omega})}^2 } \sup_{v \in V}\frac{\sum_{k=1}^K|v \circ G_k|_{H^1(\widehat{\Omega})}^2 }{ |v|_{H^1(\Omega)}^2 }, \end{aligned} \end{equation} which can be finally bounded by a constant times some power of the quantity $\|\nabla G\|_{L_\infty(\widehat{\Omega})}\|(\nabla G)^{-1}\|_{L_\infty(\widehat{\Omega})}$. Of none of these relations is satisfied by equality. In such a case, the iteration counts are likely to increase if the grid gets refined. For more on this topic, see~\cite[Section~7.4]{Sogn:2018}. As a next step, we turn towards the non-conforming discretizations. Here, each degree of freedom is assigned to exactly one patch. So, it would be tempting to set up a patch-wise splitting of the degrees of freedom. Unfortunately, numerical experiments have shown that this approach does not work well. So, we follow the approach from~\cite{Takacs:2018} also in the non-conforming case and split the degrees of freedom again into pieces $T$. This means that we avoid breaking the coupling which was enforced by the penalty term. So, the degrees of freedom belonging to one edge (face, vertex) are considered to be one piece, even if the degrees of freedom belong to different patches, see Figure~\ref{fig:decomp} (right). For this choice, we can give the following convergence theorem. \begin{theorem}\label{thrm:converg} Assume that $\Omega\subset \mathbb{R}^2$ is such that full elliptic regularity holds (cf.~\cite[Assumption~4]{Takacs:2019}) and assume that the geometry functions (but not necessarily the discretizations) agree on the interfaces (cf.~\cite[Assumption~2]{Takacs:2019}). Consider the SIPG discretization and a multigrid solver with the smoother~\eqref{eq:Ldef}. There are constants $\tau^*$, $\delta^*$ and $\theta$ which are independent of $K$, $h$, $L$ and $p$ (but may depend particularly on the geometry functions and the maximum number of neighbors of a patch) such that for \begin{equation}\label{eq:nu:2} \tau \in (0,\tau^*), \quad \delta \in (0,\delta^*) \quad\mbox{and}\quad \nu_\ell > \nu_\ell^* := 2^{L-\ell}\;(1+L-\ell)^2\;p\;(\log p)^4\; \frac{\tau^*}{\tau} \; \frac{\delta^*}{\delta}\; \theta, \end{equation} the W-cycle multigrid method converges with a convergence rate $q\le \max_\ell \nu_\ell^*/\nu_\ell$. \end{theorem} We give the proof of this theorem in the Appendix; the proof is based on the error estimates from~\cite{Takacs:2019}. One might observe that the number of smoothing steps required by this convergence theorem increases like $(1+L-\ell)2^{L-\ell}$. This follows the approach suggested in~\cite{Gopalakrishnan:Kanschat:2003} and is related to the chosen over-penalization discussed in Section~\ref{sec:sipg}. \begin{remark}\label{rem:opcosts} Note that the number of degrees of freedom on the coarser grid levels is smaller by a factor of $2^{d(L-\ell)}$. So, also using these additional smoothing steps, the overall complexity of the multigrid solver is still linear in the number of unknowns on the finest grid level if (a) $d\ge3$ or (b) the V-cycle is considered. If we consider $d=2$ and the W-cycle, the choice~\eqref{eq:nu:2} yields that the computational complexity grows like $N_L L^3$, where $N_L$ is the number of unknowns on the finest grid level. In the numerical experiments, we did not observe that increasing the number of smoothing steps has been required. Analogously to the conforming case, also the stated dependence on $p$ is too pessimistic; thus, we again choose $\nu_\ell:=1$ on all grid levels. \end{remark} Now, we provide numerical experiments for the SIPG discretization. Theoretically, we could just use exactly the discretization that has been chosen for the conforming case. This, however, yields a (particularly uninteresting) special case since Assumption~\ref{ass:fully} holds. In this special case, we have $V_\ell^c \subset V_\ell^n$ and the SIPG formulation converges to the conforming discretization for $\sigma \rightarrow \infty$. Instead, we are interested in a discretization such that Assumption~\ref{ass:fully} does not hold: We modify the setup of the spaces. For one third of the patches, we use the original spline space $S_{p,h_\ell}(\widehat{\Omega})$. For one third of the patches, we use the spline space $S_{p+1,2h_\ell}(\widehat{\Omega})$. For the last third of the patches, we use the spline space $S_{p,2h_\ell}(\widehat{\Omega})$. This particular setting is obtained with the command line option {\tt --NonMatching}. In this way, we obtain a setup where a conforming discretization is not possible. The tables for the non-conforming case shown in this section are obtained with the following code, where the values $L$ and $p$ are substituted accordingly: \begin{center} \begin{minipage}{.95\textwidth} \begin{lstlisting}[mathescape,columns=flexible,basicstyle=\ttfamily] > ./multiGrid_example -g domain2d/ldomain.xml -r $L$ -p $p$ --DG --NonMatching -s scms --MG.Damping .9 --MG.Scaling .12 -i d $\tabnr{tab:SCMS2}{a}$ > ./multiGrid_example -g domain2d/yeti_mp2.xml -r $L$ -p $p$ --DG --NonMatching -s scms --MG.Damping .25 --MG.Scaling .2 -i cg $\tabnr{tab:SCMS3}{b}$ \end{lstlisting} \end{minipage} \end{center} The results for the PCG experiments presented in Table~\ref{tab:SCMS2}~(b) are obtained by replacing the option {\tt -i d} by the option {\tt -i cg}. \begin{table}[ht] \begin{center} \begin{tabular}{l|rrrrrrr|rrrrrrr} \toprule & \multicolumn{7}{c|}{(a) Direct -- Non-conforming} & \multicolumn{7}{c}{(b) PCG -- Non-conforming} \\ \midrule $L\,\backslash\, p$ & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \midrule 4 & 22 & 28 & 34 & 33 & 23 & 35 & 23 & 17 & 16 & 15 & 14 & 13 & 12 & 12\\ 5 & 71 & 48 & 45 & 69 & 35 & 32 & 57 & 19 & 19 & 18 & 17 & 17 & 17 & 16\\ 6 & 73 & 71 & 70 & 46 & 69 & 57 &\hspace{-.5em}145 & 21 & 20 & 20 & 19 & 19 & 20 & 19\\ 7 &\hspace{-.2em}100 &\hspace{-.5em}106 & 86 & 71 & 92 & 67 & 61 & 22 & 22 & 21 & 21 & 21 & 22 & 22\\ 8 & 90 & 94 &\hspace{-.5em}127 & 98 &\hspace{-.5em}291 &\hspace{-.5em}106 & 73 & 23 & 23 & 22 & 22 & 22 & 22 & 23\\ \bottomrule \end{tabular} \end{center} \caption{V-cycle with subspace corrected mass smoother for the L-shaped domain} \label{tab:SCMS2} \end{table} \begin{table}[h] \begin{center} \begin{tabular}{l|rrrrrrr|rrrrrrr} \toprule & \multicolumn{7}{c|}{(a) PCG -- Conforming} & \multicolumn{7}{c}{(b) PCG -- Non-conforming} \\ \midrule $L\,\backslash\, p$ & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \midrule 3 & 44 & 42 & 41 & 39 & 37 & 36 & 34 & 40 & 38 & 36 & 35 & 34 & 33 & 31\\ 4 & 48 & 47 & 45 & 43 & 43 & 40 & 41 & 44 & 44 & 42 & 42 & 40 & 40 & 39\\ 5 & 51 & 49 & 48 & 47 & 45 & 45 & 44 & 49 & 47 & 47 & 46 & 46 & 45 & 44\\ 6 & 52 & 51 & 49 & 48 & 47 & 46 & 45 & 58 & 57 & 57 & 56 & 55 & 54 & 53\\ 7 & 54 & 53 & 51 & 50 & 49 & 48 & 47 & 74 & 73 & 72 & 71 & 71 & 72 & 70\\ \bottomrule \end{tabular} \end{center} \caption{V-cycle with subspace corrected mass smoother for the Yeti footprint} \label{tab:SCMS3} \end{table} The PCG discretizations are presented in Tables~\ref{tab:SCMS2}~(b) and~\ref{tab:SCMS3}~(b); we again obtain robustness in the grid size and the spline degree. Here, for the Yeti footprint, we have again iteration counts that are slightly increasing with the grid size; again, this observation can be explained by the fact that finer grids allow to resolve the geometry function better, cf.~\eqref{eq:sgn}. In principle, the method works also if the multigrid solver is applied directly, cf. Table~\ref{tab:SCMS2}~(a). Here, we suffer from numerical instabilities which are amplified with an increasing number of levels. One can avoid these instabilities, e.g., by increasing the number of pre- and post smoothing steps. However, using the multigrid method as a preconditioner within a PCG solver is obviously the more efficient approach. \section{Multigrid with hybrid smoother}\label{sec:mg:hyb} We have observed that a multigrid method with the subspace corrected mass smoother is robust in the grid size and the spline degree and works well for both conforming and discontinuous Galerkin discretizations. We have also observed that this approach suffers from non-simple geometry functions since it is based on the close connection between the stiffness matrix $A_\ell$ and the simplified stiffness matrix $\widehat{A}_\ell$. The results for the Gauss-Seidel smoother are different: the multigrid solver works badly both for large spline degrees and for discontinuous Galerkin discretizations. However, by comparing Table~\ref{tab:GS1} with Table~\ref{tab:GS2}, we observe that the method behaves quite robust in the geometry function. Since the behavior of the two smothers is somewhat orthogonal, we can hope for a good method if we combine them. Our idea is to use one forward Gauss-Seidel sweep followed by the subspace corrected mass smoother for pre-smoothing and the subspace corrected mass smoother followed by one backward Gauss-Seidel sweep for post-smoothing. The overall method is presented as Algorithm~\ref{alg:2}. \begin{algorithm}[H] \textsc{Multigrid}$\left(\ell, \underline{f}_\ell, \underline{u}_\ell\right)$\\ \mbox{}\qquad// Pre-Smoothing (forward Gauss-Seidel)\\ \mbox{}\qquad$\underline{u}_\ell\gets \underline{u}_\ell + (L_\ell^{GS})^{-1} \left(\underline{f}_\ell-A_\ell\;\underline{u}_\ell\right)$ \\ \mbox{}\qquad// Pre-Smoothing (subspace corrected mass smoother)\\ \mbox{}\qquad\textbf{for} $n=1,\ldots,\nu_\ell$\\ \mbox{}\qquad\mbox{}\qquad $\underline{u}_\ell\gets \underline{u}_\ell + (L_\ell^{SCMS})^{-1} \left(\underline{f}_\ell-A_\ell\;\underline{u}_\ell\right)$ \\ \mbox{}\qquad// Coarse-grid correction\\ \mbox{}\qquad\textbf{if} $\ell=1$\\ \mbox{}\qquad\mbox{}\qquad $\underline{u}_\ell\gets \underline{u}_\ell+ I_{\ell-1}^{\ell} A_{\ell-1}^{-1} I_{\ell}^{\ell-1}\left(\underline{f}_\ell - A_\ell \;\underline{u}_\ell\right)$\quad// Direct solver\\ \mbox{}\qquad\textbf{else}\\ \mbox{}\qquad\mbox{}\qquad\textbf{for} $n=1,\ldots,\mu$\\ \mbox{}\qquad\mbox{}\qquad\mbox{}\qquad $\underline{u}_\ell\gets \underline{u}_\ell + I_{\ell-1}^{\ell} \textsc{Multigrid}\left(\ell-1, I_{\ell}^{\ell-1}\left(\underline{f}_\ell - A_\ell \;\underline{u}_\ell\right), 0\right)$ \\ \mbox{}\qquad// Post-Smoothing (subspace corrected mass smoother)\\ \mbox{}\qquad\textbf{for} $n=1,\ldots,\nu_\ell$\\ \mbox{}\qquad\mbox{}\qquad $\underline{u}_\ell\gets \underline{u}_\ell + (L_\ell^{SCMS})^{-1} \left(\underline{f}_\ell-A_\ell\;\underline{u}_\ell\right)$ \\ \mbox{}\qquad// Post-Smoothing (backward Gauss-Seidel)\\ \mbox{}\qquad$\underline{u}_\ell\gets \underline{u}_\ell + (L_\ell^{GS})^{-\top} \left(\underline{f}_\ell-A_\ell\;\underline{u}_\ell\right)$ \\ \mbox{}\qquad\textbf{return} $\underline{u}_\ell$ \caption{\label{alg:2}Multigrid algorithm with hybrid smoother} \end{algorithm} The convergence analysis from Section~\ref{sec:mg:scms} can be easily carried over to the hybrid smoother. The iteration matrix for the (V or W cycle) multigrid method with the hybrid smoother is given by \[ \widetilde{W}_\ell := (I-(L^{GS}_\ell)^{-\top}A_\ell) W_\ell (I-(L^{GS}_\ell)^{-1}A_\ell), \] where $W_\ell$ is the iteration matrix of the (V or W cycle, respectively) multigrid method with the subspace corrected mass smoother. Since the Gauss-Seidel iteration is stable in the energy norm, we obtain \[\|\widetilde{W}_\ell\|_{A_\ell}\le \|I-(L^{GS}_\ell)^{-\top}A_\ell\|_{A_\ell} \|W_\ell\|_{A_\ell} \|I-(L^{GS}_\ell)^{-1}A_\ell\|_{A_\ell} \le \|W_\ell\|_{A_\ell}.\] So, we have using the results from the last section the convergence of the W-cycle multigrid method with hybrid smoother. Thus, we obtain as follows. \begin{corollary} Consider the multigrid solver with the hybrid smoother. Under the assumptions of Theorem~\ref{thrm:converg:conf} or \ref{thrm:converg}, respectively, the W-cycle multigrid method converges with a convergence rate $q\le \max_\ell \nu_\ell^*/\nu_\ell$. \end{corollary} \begin{table}[h] \begin{center} \begin{tabular}{l|rrrrrrr|rrrrrrr} \toprule & \multicolumn{7}{c|}{(a) Direct -- Conforming} & \multicolumn{7}{c}{(b) PCG -- Conforming} \\ \midrule $L\,\backslash\, p$ & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \midrule 3 & 12 & 15 & 22 & 29 & 35 & 40 & 47 & 9 & 11 & 14 & 17 & 20 & 21 & 22\\ 4 & 13 & 16 & 23 & 32 & 38 & 45 & 50 & 10 & 11 & 15 & 19 & 21 & 23 & 25\\ 5 & 14 & 16 & 24 & 35 & 41 & 47 & 53 & 11 & 11 & 16 & 19 & 22 & 24 & 26\\ 6 & 15 & 16 & 26 & 37 & 45 & 52 & 55 & 11 & 12 & 16 & 20 & 23 & 26 & 27\\ 7 & 16 & 17 & 26 & 38 & 47 & 54 & 57 & 12 & 12 & 17 & 21 & 24 & 26 & 28\\ \bottomrule \end{tabular} \end{center} \caption{V-cycle with hybrid smoothing strategy for the Yeti footprint} \label{tab:HYB1} \end{table} \begin{table}[h] \begin{center} \begin{tabular}{l|rrrrrrr|rrrrrrr} \toprule & \multicolumn{7}{c|}{(a) Direct -- Non-conforming} & \multicolumn{7}{c}{(b) PCG -- Non-conforming} \\ \midrule $L\,\backslash\, p$ & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \midrule 3 & 23 & 18 & 35 & 34 & 37 & 24 & 28 & 15 & 17 & 18 & 19 & 20 & 20 & 21\\ 4 & 19 & 23 & 31 & 42 & 32 & 59 & 32 & 16 & 19 & 21 & 22 & 24 & 26 & 26\\ 5 & 20 & 25 & 34 & 50 & 46 & 67 & 62 & 17 & 20 & 22 & 25 & 27 & 29 & 31\\ 6 & 22 & 27 & 30 & 47 & 48 & 52 & 69 & 17 & 20 & 23 & 25 & 27 & 30 & 32\\ 7 & 22 & 29 & 33 & 40 & 58 & 52 & 65 & 17 & 21 & 23 & 26 & 29 & 31 & 33\\ \bottomrule \end{tabular} \end{center} \caption{V-cycle with hybrid smoothing strategy for the Yeti footprint} \label{tab:HYB2} \end{table} The tables for the experiments with the hybrid smoother are obtained with the following code, where the values $L$ and $p$ are substituted accordingly: \begin{center} \begin{minipage}{.95\textwidth} \begin{lstlisting}[mathescape,columns=flexible,basicstyle=\ttfamily] > ./multiGrid_example -g domain2d/yeti_mp2.xml -r $L$ -p $p$ -s hyb --MG.Damping .25 --MG.Scaling .1 -i d $\tabnr{tab:HYB1}{a}$ > ./multiGrid_example -g domain2d/yeti_mp2.xml -r $L$ -p $p$ --DG --NonMatching -s hyb --MG.Damping .25 --MG.Scaling .1 -i d $\tabnr{tab:HYB2}{a}$ \end{lstlisting} \end{minipage} \end{center} The results for the PCG experiments, presented in Tables~\ref{tab:HYB1}~(b) and~\ref{tab:HYB2}~(b), are obtained by replacing the option {\tt -i d} by the option {\tt -i cg}. For both cases, we obtain that the iteration counts are quite robust in the grid size (even if the maximum number of iterations is not reached for the coarser grid levels). We observe that the number of iterations increases with the spline degree. This is indeed due to the fact that for small values of $p$, the Gauss-Seidel smoother yields very fast convergence and that convergence behavior is carried over to the hybrid smoother. For larger spline degrees, the hybrid smoother's convergence behavior degrades mildly; this is due to the fact that the Gauss-Seidel smoother is not completely capable to capture all effects perfectly. Still, keeping in mind that the condition number of the stiffness matrix grows exponentially with the spline degree, the observed behavior is still very satisfactory. Compared to applying the subspace corrected mass smoother only, the hybrid smoother pays of in most cases. Certainly, applying the hybrid smoother with $\nu_\ell:=1$ means basically that $2$ pre- and $2$ post-smoothing steps are applied. Since the Gauss-Seidel smoother is slightly cheaper than the subspace corrected mass smoother, the costs for one such cycle are smaller than the costs of two multigrid cycles with the subspace corrected mass smoother only. \begin{figure}[h] \begin{center} \includegraphics[height=.28\textwidth]{fichera} \qquad\qquad \includegraphics[height=.28\textwidth]{3d-geometry} \end{center} \caption{The 3D computational domains: Fichera corner and twisted Fichera corner} \label{fig:2} \end{figure} Besides the two-dimensional examples considered so far, the proposed methods can be directly extended to three dimensional problems (even if the details of the convergence theory have not been worked out for these cases). We consider the two domains depicted in Figure~\ref{fig:2}: the Fichera corner and a variant of that domain with non-trivial geometry function, which we call twisted Fichera corner. The tables for the three dimensional domains are obtained with the following code, where the values $L$ and $p$ are substituted accordingly: \begin{center} \begin{minipage}{.95\textwidth} \begin{lstlisting}[mathescape,columns=flexible,basicstyle=\ttfamily] > ./multiGrid_example -g domain2d/fichera.xml -r $L$ -p $p$ -s hyb --MG.Scaling .12 --MG.Damping 1 -i cg $\tabnr{tab:HYB3}{a}$ > ./multiGrid_example -g domain2d/twisted_fichera.xml -r $L$ -p $p$ -s hyb --MG.Scaling .12 --MG.Damping .25 -i cg $\tabnr{tab:HYB4}{a}$ \end{lstlisting} \end{minipage} \end{center} The results for the DG experiments, presented in the Tables~\ref{tab:HYB3}~(b) and \ref{tab:HYB4}~(b), are obtained by adding the command line options {\tt --DG --NonMatching}. \begin{table}[h] \begin{center} \begin{tabular}{l|rrrrr|rrrrr} \toprule & \multicolumn{5}{c|}{(a) PCG -- Conforming} & \multicolumn{5}{c}{(b) PCG -- Non-conforming} \\ \midrule $L\,\backslash\, p$ & \quad2 & \quad3 & \quad4 & \quad5 & \quad6 & \quad2 & \quad3 & \quad4 & \quad5 & \quad6 \\ \midrule 2 & 6 & 6 & 7 & 8 & 8 & 12 & 13 & 15 & 16 & 19 \\ 3 & 6 & 7 & 7 & 8 & 8 & 13 & 15 & 16 & 18 & 20 \\ 4 & 6 & 8 & 9 & 9 & 10 & 14 & 16 & 18 & 19 & 20 \\ 5 & 6 & 8 & 9 & 10 & 11 & 14 & 16 & 17 & 19 & 20 \\ \bottomrule \end{tabular} \end{center} \caption{V-cycle with hybrid smoothing strategy for the Fichera corner} \label{tab:HYB3} \end{table} \begin{table}[h] \begin{center} \begin{tabular}{l|rrrrr|rrrrr} \toprule & \multicolumn{5}{c|}{(a) PCG -- Conforming} & \multicolumn{5}{c}{(b) PCG -- Non-conforming} \\ \midrule $L\,\backslash\, p$ & \quad2 & \quad3 & \quad4 & \quad5 & \quad6 & \quad2 & \quad3 & \quad4 & \quad5 & \quad6 \\ \midrule 2 & 10 & 13 & 14 & 15 & 17 & 22 & 25 & 28 & 30 & 31 \\ 3 & 13 & 15 & 18 & 20 & 22 & 29 & 31 & 33 & 36 & 38 \\ 4 & 14 & 17 & 19 & 22 & 25 & 31 & 34 & 37 & 40 & 42 \\ 5 & 16 & 17 & 20 & 23 & 26 & 31 & 36 & 40 & 44 & 47 \\ \bottomrule \end{tabular} \end{center} \caption{V-cycle with hybrid smoothing strategy for the twisted Fichera corner} \label{tab:HYB4} \end{table} Similar to the results for the Yeti footprint, Tables~\ref{tab:HYB3} and~\ref{tab:HYB4} again show small iteration counts. For the twisted Fichera corner, we observe that the number of iterations increases mildly when the grid gets refined; this is again to be explained by the better resolution of the geometry function. Moreover, we observe a very mild dependence on the spline degree. \section{Conclusions and outlook}\label{sec:fin} We have presented robust multigrid solvers for multi-patch IgA with conforming and non-conforming discretizations. We have given convergence results that exactly state the robustness of the solvers in the grid size. Concerning the dependence on the spline degree, the statements seem to be too pessimistic since the solvers have been completely or (at least) rather robust in practice. We have addressed another issue, which causes problems for all solvers that use the tensor-product structure on the parameter domain: the dependence on the geometry function. We have proposed a hybrid smoother between our subspace corrected mass smoother and the Gauss-Seidel smoother which seems to reduce the effect on the geometry function. Finding approaches to better incorporate the geometry function into the smoother itself seems to be an interesting topic for further research. \section*{Appendix} In the appendix, we give a proof of Theorem~\ref{thrm:converg} and of some auxiliary results. Every constant $c$ used within the appendix is assumed to be independent of the grid size, the grid level, the spline degree and the number of patches, but it may depend on the geometry function (cf.~\cite[Assumption~3]{Takacs:2019}), the number of neighbors of a patch (cf.~\cite[Assumption~2.3]{Takacs:2018}), the constant in the elliptic regularity assumption (cf.~\cite[Assumption~3.1]{Takacs:2018}) and the quasi-uniformity of the grid, i.e., the ratio between the largest and the smallest knot span of the knot vectors on one level. We write $A \lesssim B$ if and only if there is a constant $c$ such that $A \le c \; B$ and we write $A \eqsim B$ if and only if $A\lesssim B$ and $B\lesssim A$. First, we show the following lemma, which is basically a trace inequality. \begin{lemma}\label{lem:vertex} Let $S:=S^{(1)}\otimes S^{(2)}$ be the space of tensor-product splines of degree $p$ on a quasi-uniform grid with size $h$ on the parameter domain $\widehat{\Omega}:=(0,1)^2$. Then, the estimate \[ |u(0)|^2 \lesssim \left(\log \left( 1 + \frac{p^4}{h^{2}\theta^{2}}\right)\right)^2 \; \left( |u|_{H^1(\widehat{\Omega})}^2 + \theta^{2} \|u\|_{L_2(\widehat{\Omega})}^2 \right) \] holds for all $u\in S$ and all $\theta \ge 1$. \end{lemma} \begin{proof} For $\nu=1,2$, let $(\psi_{\nu,i})_{i=1}^{N_\nu}$ be the eigenfunctions of $S^{(\nu)}$, i.e., such that \begin{align*} & (\psi_{\nu,i},\psi_{\nu,j})_{L_2(0,1)} = \delta_{i,j} \quad\mbox{and}\quad \\ & (\psi_{\nu,i}',\psi_{\nu,j}')_{L_2(0,1)} + \theta^2 (\psi_{\nu,i},\psi_{\nu,j})_{L_2(0,1)} = \lambda_{\nu,i} \delta_{i,j}, \end{align*} where $\delta_{i,j}$ is the Kronecker delta and $\lambda_{\nu,1} \le \lambda_{\nu,2} \le \cdots \le \lambda_{\nu,N_\nu}$ are the corresponding eigenvalues. Using coercivity of $(\cdot',\cdot')_{L_2(0,1)}$ and a standard inverse estimate, cf. \cite[Corollary~3.94]{Schwab:1998}, we obtain \[ \theta^2 \le \lambda_{\nu,1} \quad \mbox{and}\quad \lambda_{\nu,N_\nu} \lesssim p^4h^{-2}+\theta^2. \] % We define level sets \[ I_{\nu,m} := \{ i \; :\; \mu_{m-1}:=2^{m-1} \theta^2 \le \lambda_{\nu,i} < \mu_{m}:=2^m \theta^2 \} \] for $m\in\{1,2,3,\ldots,M\}$, where \[ M:=1+\max_{\nu\in\{1,2\}} \lfloor \log_2(\theta^{-2} \lambda_{\nu,N_\nu})\rfloor \lesssim \log ( 1 + p^4h^{-2}\theta^{-2}) \] is the number of level sets. Note that by construction every eigenvalue belongs to exactly one level set. Every function $u\in S$ can be represented as \begin{align*} u(x,y) &= \sum_{i=1}^{N_1} \sum_{j=1}^{N_2} u_{i,j} \psi_{1,i}(x)\psi_{2,j}(y) = \sum_{m=1}^{M} \sum_{n=1}^{M} \underbrace{ \sum_{i\in I_{1,m}} \sum_{j\in I_{2,n}} u_{i,j} \psi_{1,i}(x)\psi_{2,j}(y) } _ { \displaystyle w_{m,n}(x,y):= }. \end{align*} A standard trace estimate, cf.~\cite[Lemma~4.4]{Takacs:2018}, yields \begin{equation}\label{eq:trace} \begin{aligned} |w_{m,n}(0)|^2 & \lesssim \|w_{m,n}\|_{L_2(\{0\}\times(0,1))}\|w_{m,n}\|_{H^1(\{0\}\times(0,1))}\\ & \lesssim \|w_{m,n}\|_{0,0,1}^{1/2} \|w_{m,n}\|_{1,0,1} ^{1/2} \|w_{m,n}\|_{0,1,1} ^{1/2}\|w_{m,n}\|_{1,1,1} ^{1/2} \end{aligned} \end{equation} where \[ \|w\|_{a,b,\eta}^2 := \left\|\frac{\partial^{a+b}}{\partial x^a\partial x^b} w\right\|_{L_2(\widehat{\Omega})}^2 + \eta^{2(a+b)} \|w\|_{L_2(\widehat{\Omega})}^2 \] for $a,b\in\mathbb{N}_0$. Since $\theta \ge 1$ and since all eigenvalues are in $I_{1,m}$ or $I_{2,n}$, respectively, we obtain \[ \|w\|_{a,b,1}^2 \le \|w\|_{a,b,\theta}^2 \eqsim \mu_m^{a}\mu_n^{b} \|w_{m,n}\|_{L_2(\widehat{\Omega})}^2. \] Using~\eqref{eq:trace}, we obtain further \begin{align*} |w_{m,n}(0)|^2 & \lesssim \mu_m\mu_n\|w_{m,n}\|_{L_2(\widehat{\Omega})}^2 \eqsim \|w_{m,n}\|_{1,0,\theta} \|w_{m,n}\|_{0,1,\theta} \\ & \le \left( |w_{m,n}|_{H^1(\widehat{\Omega})}^2 + \theta^2 \|w_{m,n}\|_{L_2(\widehat{\Omega})}^2\right). \end{align*} Finally, the Cauchy-Schwarz inequality and orthogonality of the basis functions (both in $L_2$ and $H^1$) yield \begin{align*} |u(0)|^2 & \lesssim M^2 \sum_{m=1}^M \sum_{n=1}^M |w_{m,n}(0)|^2 \\ & \lesssim M^2 \sum_{m=1}^M \sum_{n=1}^M \left(|w_{m,n}|_{H^1(\widehat{\Omega})}+ \theta^2 \|w_{m,n}\|_{L_2(\widehat{\Omega})} \right) ^2 \\ & = M^2 \left( |u|_{H^1(\widehat{\Omega})}^2 + \theta^2 \|u\|_{L_2(\widehat{\Omega})}^2 \right), \end{align*} which finishes the proof. \qed\end{proof} Now, we give bounds on the smoother which allow to show the smoothing property. \begin{lemma}\label{lem:smp1} Provided the assumptions of Theorem~\ref{thrm:converg}, the estimate \[ A_\ell \le L_\ell \lesssim p (\log p)^2 (1+L-\ell)^2 2^{L-\ell} \frac{\tau^*}{\tau} \frac{\delta^*}{\delta} \widetilde{L}_\ell \] holds, where $\widetilde{L}_\ell:= Q_\ell + (1+2^{\ell-L}h_\ell^{-2}) M_\ell$ and $M_\ell$ is the standard mass matrix. \end{lemma} \begin{proof} The proof of this Lemma requires the notation from~\cite{Takacs:2018}, i.e., we denote the set of all patch-interiors by $\mathbb{K}$, the set of all edges by $\mathbb{E}$ and the set of all vertices by $\mathbb{V}$. Observe that we have \begin{equation}\label{eq:equiv} A_\ell \eqsim Q_\ell \end{equation} for all $\ell=0,2,\ldots,L$, where $Q_\ell$ is defined by~\eqref{eq:model:discr2} and~\eqref{eq:a:galerkin}. For $\ell = L$, this statement directly follows from~\cite[Theorem~8]{Takacs:2019}. Since \cite[Theorem~8]{Takacs:2019} also holds in cases of over-penalization, we can apply that theorem also to the case $\ell<L$ and obtain~\eqref{eq:equiv} also in that case. As first step, we bound $L_\ell$ from below. (The following arguments are analogous to~\cite[Lemma~4.3]{Takacs:2018}.) The triangle inequality yields \begin{equation}\label{eq:19a} A_\ell \lesssim \sum_{T\in \mathbb{K}\cup\mathbb{E}\cup\mathbb{V}} P_{\ell,T} (P_{\ell,T}^\top A_{\ell}P_{\ell,T}^\top) P_{\ell,T}^\top. \end{equation} For $T\in \mathbb{K}$, \cite[Lemma~8]{Hofreither:Takacs:2017} and~\eqref{eq:equiv} yield $L_{\ell,T}\gtrsim P_{\ell,T}^\top Q_{\ell}P_{\ell,T}^\top \gtrsim P_{\ell,T}^\top A_{\ell}P_{\ell,T}^\top$. For $T\in \mathbb{E}\cup\mathbb{V}$, we have by definition $L_{\ell,T} = P_{\ell,T}^\top A_{\ell}P_{\ell,T}^\top$. Thus, we obtain from~\eqref{eq:19a} \begin{equation}\nonumber A_\ell \lesssim \sum_{T\in \mathbb{K}\cup\mathbb{E}\cup\mathbb{V}} P_{\ell,T} L_{\ell,T} P_{\ell,T}^\top \end{equation} and for all $\tau\in (0,\tau^*)$ with $\tau^*$ small enough further \begin{equation}\nonumber A_\ell \le \tau^{-1} \sum_{T\in \mathbb{K}\cup\mathbb{E}\cup\mathbb{V}} P_{\ell,T} L_{\ell,T} P_{\ell,T}^\top = L_\ell, \end{equation} which shows the first part of the desired inequality. Now, we bound $L_\ell$ from above. We use the decomposition \[ Q_\ell = K_\ell + \frac{\sigma p^2}{h_L} J_\ell, \] cf.~\eqref{eq:model:discr2}. Using~\eqref{eq:equiv}, we obtain \[ L_{\ell,T} = P_{\ell,T}^\top A_\ell P_{\ell,T} \eqsim P_{\ell,T}^\top Q_\ell P_{\ell,T} = \underbrace{ P_{\ell,T}^\top K_\ell P_{\ell,T} }_{\displaystyle \widetilde K_{\ell,T} := } + \frac{\sigma p^2}{h_L} \underbrace{ P_{\ell,T}^\top J_\ell P_{\ell,T} }_{\displaystyle \widetilde J_{\ell,T} := } \] for all $T\in \mathbb{E}\cup \mathbb{V}$ and, therefore, \begin{equation}\label{eq:upper:decomp} L_\ell \eqsim \widetilde K_{\ell} + \frac{\sigma p^2}{h_L} \widetilde J_{\ell}, \end{equation} where \[ \widetilde K_{\ell} := \tau^{-1} \sum_{T \in \mathbb{K}} P_{\ell,T} L_{\ell,T} P_{\ell,T}^\top + \tau^{-1}\sum_{T \in \mathbb{E}\cup \mathbb{V}} P_{\ell,T} K_{\ell,T} P_{\ell,T}^\top \] and \[ \widetilde J_{\ell} :=\tau^{-1} \sum_{T \in \mathbb{E}\cup \mathbb{V}} P_{\ell,T} J_{\ell,T} P_{\ell,T}^\top. \] Completely analogous to \cite[Lemma~4.7]{Takacs:2018}, we obtain \begin{equation}\label{eq:upper1} \widetilde K_{\ell} \lesssim p \frac{\tau^*}{\tau}\frac{\delta^*}{\delta} (K_\ell + h_\ell^{-2} M_\ell) \le p \frac{\tau^*}{\tau}\frac{\delta^*}{\delta} (Q_\ell + h_\ell^{-2} M_\ell) \le p 2^{L-\ell} \frac{\tau^*}{\tau}\frac{\delta^*}{\delta} \widetilde{L}_\ell. \end{equation} So, it remains to bound $\widetilde J_{\ell}$ from above. Since the restriction of $J_\ell$ to any patch-interior vanishes, the same arguments as in the proof of~\cite[Lemma~4.7]{Takacs:2018} and the triangle inequality yield \begin{equation}\nonumber \begin{aligned} \sum_{T\in \mathbb E} \| P_TP_T^\top \underline{u}_\ell \|_{J_\ell}^2 &= \left\| \sum_{T\in \mathbb E}P_TP_T^\top \underline{u}_\ell \right\|_{J_\ell}^2 = \left\| \underline{u}_\ell - \sum_{T\in \mathbb V}P_TP_T^\top \underline{u}_\ell \right\|_{J_\ell}^2 \\ & \le \| \underline{u}_\ell \|_{J_\ell}^2 + \sum_{T\in \mathbb V} \| P_TP_T^\top \underline{u}_\ell \|_{J_\ell}^2. \end{aligned} \end{equation} and therefore \begin{equation}\label{eq:Tsum} \sum_{T \in \mathbb{E}\cup \mathbb{V}} P_{\ell,T} \widetilde J_{\ell,T} P_{\ell,T}^\top \lesssim J_\ell + \sum_{T \in \mathbb{V}} P_{\ell,T} \widetilde J_{\ell,T} P_{\ell,T}^\top. \end{equation} Note that $J_\ell$ models jumps and note that these jumps can be bounded from above using the triangle inequality with the function values on both sides. Thus, we obtain \[ \sum_{T\in \mathbb V} \| P_TP_T^\top \underline{u}_\ell \|_{J_\ell}^2 \lesssim \sum_{k=1}^K \sum_{T\in \mathbb V} ( u_{\ell}|_{\Omega_k}|_T )^2 \| \psi \|_{L_2(0,1)}^2 , \] where $u_{\ell}|_{\Omega_k}$ is the restriction of $u_\ell$ to the patch $\Omega_k$ and $ u_{\ell}|_{\Omega_k}|_T$ is the evaluation of the continuous extension of that function to the vertex $T$ at that vertex and $\psi(x)=\max\{1-x/h_\ell,0\}^p$ is the corresponding basis function. Using $ \| \psi \|_{L_2(0,1)}^2 \eqsim p^{-1} h_\ell $, cf.~\cite[Eq.~(4.16)]{Takacs:2018}, Lemma~\ref{lem:vertex} (with $\theta:=(1+h_\ell^{-2}2^{\ell-L})^{1/2}$), and $h_\ell \le 1$, we further obtain \begin{align*} &\sum_{T\in \mathbb V} \| P_TP_T^\top \underline{u}_\ell \|_{J_\ell}^2 \lesssim \frac{h_\ell}{p} \left(\log\left(1+\frac{p^4}{h_\ell^{2}(1+h_\ell^{-2}2^{\ell-L})^{2}} \right)\right)^2 \\ &\qquad\qquad \sum_{k=1}^K \left( |u_\ell \circ G_k |_{H^1(\widehat{\Omega})}^2 + (1+ 2^{\ell-L} h_\ell^{-2}) \|u_\ell \circ G_k \|_{L_2(\widehat{\Omega})}^2\right) \\ & \lesssim \frac{h_\ell}{p} (\log p) (1+L-\ell)^2 \sum_{k=1}^K \left( |u_\ell \circ G_k |_{H^1(\widehat{\Omega})}^2 + (1+ 2^{\ell-L} h_\ell^{-2}) \|u_\ell \circ G_k \|_{L_2(\widehat{\Omega})}^2 \right). \end{align*} Using~\cite[Lemma~6]{Takacs:2019}, we obtain \[ \sum_{T\in \mathbb V} \| P_TP_T^\top \underline{u}_\ell \|_{J_\ell}^2 \lesssim \frac{h_\ell}{p} (\log p)^2 (1+L-\ell)^2 \left(|u_\ell|_{H^1(\Omega)}^2+ (1+ 2^{\ell-L} h_\ell^{-2}) \|u_\ell\|_{L_2(\Omega)}^2\right) \] and thus \[ \sum_{T \in \mathbb{V}} P_{\ell,T} \widetilde J_{\ell,T} P_{\ell,T}^\top \lesssim \frac{h_\ell}{p} (\log p)^2 (1+L-\ell)^2 ( K_\ell + (1+ 2^{\ell-L} h_\ell^{-2}) M_\ell ). \] This shows together with~\eqref{eq:Tsum} and $h_L \eqsim 2^{\ell-L} h_\ell$ \begin{align*} \frac{\sigma p^2}{h_L} \widetilde J_{\ell} &= \tau^{-1} \frac{\sigma p^2}{h_L} \sum_{T \in \mathbb{E} \cup \mathbb{V}} P_{\ell,T} \widetilde J_{\ell,T} P_{\ell,T}^\top\\ &\lesssim \tau^{-1} \left( \frac{\sigma p^2}{h_L} J_\ell + p (\log p)^2 (1+L-\ell)^2 2^{L-\ell} ( K_\ell + (1+ 2^{\ell-L} h_\ell^{-2}) M_\ell ) \right)\\ &\lesssim \tau^{-1} p (\log p)^2 (1+L-\ell)^2 2^{L-\ell} \widetilde{L}_\ell. \end{align*} Since $\delta \in (0,\delta^*)$ and since $\tau^* \eqsim 1$, we obtain \begin{align*} \frac{\sigma p^2}{h_L} \widetilde J_{\ell} &\lesssim p (\log p)^2 (1+L-\ell)^2 2^{L-\ell} \frac{\tau^*}{\tau}\frac{\delta^*}{\delta} \widetilde{L}_\ell, \end{align*} which finishes together with~\eqref{eq:upper:decomp} and~\eqref{eq:upper1} the proof. \qed\end{proof} \begin{lemma}\label{lem:stab} Let $ \|v\|_{Q_\ell^+}^2 := |v|_{H^1(\Omega)}^2 + \sigma^{-2} p^{-4} 4^{\ell-L} h_\ell^2 |v|_{H^2(\Omega)}^2$. The estimate \[ \inf_{v_\ell \in V_\ell^n} \|u-v_\ell\|_{Q_\ell^+}^2 \lesssim |u|_{H^2(\Omega)}^2 \] holds for all $u \in H^2(\Omega)$. \end{lemma} \begin{proof} Let \[ W:=\{ u \in H^1(\Omega) \;:\; u\circ G_k \in S_{1,1}(\widehat{\Omega}) \mbox{ for all } k = 1,\ldots,K \}, \] be the set of all globally continuous functions which are linear locally. Observe that $W\subseteq V_\ell^n$. Using $u$ and $w$ being continuous, we obtain \begin{align*} \|u-w\|_{Q_\ell^+}^2 = |u-w|_{H^1(\Omega)}^2 + \frac{h_\ell^2}{\sigma^2 p^4 4^{L-\ell}} |u-w|_{H^2(\Omega)}^2. \end{align*} For the choice $w\in H^1(\Omega)$ with $w|_{\Omega_k} := w_k = \widehat{w}_k\circ G_k^{-1}$, where \[ \widehat{w}_k(x,y) := \sum_{i=0}^1 \sum_{j=0}^1 \widehat{\phi}_i(x)\phi_j(y) \widehat{u}_k(i,j) \quad \mbox{and}\quad \widehat{\phi}_0(t):=1-t \quad \mbox{and}\quad \widehat{\phi}_1(t):=t, \] we further obtain using standard approximation error estimates and \cite[Lemma~6]{Takacs:2019} \[ \inf_{v_\ell \in V_\ell^n} \|u-v_\ell\|_{Q_\ell^+}^2 \le \|u-w\|_{Q_\ell^+}^2 \lesssim \left(1+\frac{h_\ell^2}{\sigma^2 p^4 4^{L-\ell}} \right)|u|_{H^2(\Omega)}^2. \] Using $h_\ell \le 1$, $\sigma \ge 1$, $p\ge 2$, and $L\ge \ell$, we obtain the desired result. \end{proof} \begin{lemma}\label{lem:approx} Provided the assumptions of Theorem~\ref{thrm:converg}, the estimate \[ \| (I-I_{\ell-1}^\ell A_{\ell-1}^{-1}I_\ell^{\ell-1} A_\ell ) A_\ell^{-1} \widetilde{L}_\ell \|_{\widetilde{L}_\ell} \lesssim (\log p)^2 \] holds, where $\widetilde{L}_\ell$ is as in Lemma~\ref{lem:smp1}. \end{lemma} \begin{proof} Let $u_\ell \in V_\ell^n$ be arbitrary but fixed. Let $f_\ell \in V_\ell^n$ be such that \[ (u_\ell,v_\ell)_{A_L} = (f_\ell,v_\ell)_{L_2(\Omega)} \quad \mbox{for all} \quad v_\ell \in V_\ell^n. \] Let $u_{\ell-1} \in V_{\ell-1}$ and $u\in V$ be such that \begin{align*} (u_{\ell-1},v_{\ell-1})_{A_L}& = (f_\ell,v_{\ell-1})_{L_2(\Omega)} \quad \mbox{for all} \quad v_{\ell-1} \in V_{\ell-1} , \\ (\nabla u, \nabla v)_{L_2(\Omega)} &= (f_\ell,v)_{L_2(\Omega)} \quad \mbox{for all} \quad v \in V. \end{align*} Using $f_\ell\in L_2(\Omega)$ and full elliptic regularity, cf.~\cite[Assumption~3.1]{Takacs:2018}, we obtain $u\in H^2(\Omega)$ and \begin{equation}\label{eq:above} |u|_{H^2(\Omega)} \lesssim \|f_\ell\|_{L_2(\Omega)} = \sup_{v_\ell \in V_\ell^n} \frac{(f_\ell,v_\ell)_{L_2(\Omega)}}{\|v_\ell\|_{L_2(\Omega)}} = \sup_{v_\ell \in V_\ell^n} \frac{(u_\ell,v_\ell)_{A_L}}{\|v_\ell\|_{L_2(\Omega)}} = \| \underline{u}_\ell \|_{A_\ell M_\ell^{-1} A_\ell}. \end{equation} \cite[Theorems~12 and 13]{Takacs:2019} and Lemma~\ref{lem:stab} yield \begin{align*} \| u-u_\ell \|_{Q_\ell}^2 & \lesssim \min\{1,(\log \sigma_\ell)^2 \sigma_\ell^{1/(2p-1)} h_\ell^2\} |u|_{H^2(\Omega)}^2, \\ \| u-u_{\ell-1} \|_{Q_\ell}^2 & \lesssim \min\{1, (\log \sigma_{\ell-1})^2 \sigma_{\ell-1}^{1/(2p-1)} h_{\ell-1}^2\} |u|_{H^2(\Omega)}^2, \end{align*} where $ \sigma_\ell = 2^{L-\ell} p^2 \sigma. $ Using the triangle inequality, $\sigma \eqsim 1$, $\log (ab) \lesssim \log a \log b$, $h_\ell \eqsim h_{\ell-1}$, $p\ge2$, and we obtain further \begin{align*} &\| u_\ell-u_{\ell-1} \|_{Q_\ell}^2 \lesssim \min\{1,(\log \sigma_\ell)^2 \sigma_\ell^{1/(2p-1)} h_\ell^2\} |u|_{H^2(\Omega)}^2\\ &\qquad \lesssim \min\{1,(\log p)^2 p^{2/(2p-1)}(1+L-\ell)^2 2^{(L-\ell)(1/(2p-1))} h_\ell^2 \} |u|_{H^2(\Omega)}^2 \\ &\qquad\lesssim \min \{1, (\log p)^2 2^{L-\ell} h_\ell^2 \} |u|_{H^2(\Omega)}^2 \lesssim (\log p)^2 (1+2^{\ell-L}h_\ell^{-2})^{-1} |u|_{H^2(\Omega)}^2 \end{align*} Using~\eqref{eq:equiv}, \eqref{eq:above} and the definition of $u_{\ell-1}$, we obtain further \[ \| ( I - I_{\ell-1}^\ell A_{\ell-1}^{-1} I_\ell^{\ell-1} A_\ell ) \underline{u}_\ell \|_{A_\ell}^2 \lesssim (\log p)^2 (1+2^{\ell-L}h_\ell^{-2})^{-1} \| \underline{u}_\ell \|_{A_\ell M_\ell^{-1} A_\ell}^2. \] This yields \[ \| A_\ell^{1/2} ( I - I_{\ell-1}^\ell A_{\ell-1}^{-1} I_\ell^{\ell-1} A_\ell ) A_\ell^{-1} M_\ell^{1/2} \|^2 \lesssim (\log p)^2 (1+2^{\ell-L}h_\ell^{-2})^{-1} \] and thus \[ \| ( I - I_{\ell-1}^\ell A_{\ell-1}^{-1} I_\ell^{\ell-1} A_\ell ) \underline{u}_\ell \|_{(1+2^{\ell-L}h_\ell^{-2}) M_\ell}^2 \lesssim (\log p)^2 \|\underline{u}_\ell\|_{A_\ell}\quad\mbox{for all}\quad \underline{u}_\ell \in \mathbb{R}^{N_\ell}. \] Using this estimate and the stability of the $A_\ell$-orthogonal projection, we obtain \begin{align*} \| ( I - I_{\ell-1}^\ell A_{\ell-1}^{-1} I_\ell^{\ell-1} A_\ell ) \underline{u}_\ell \|_{\widetilde{L}_\ell}^2 \lesssim (\log p)^{2} \|\underline{u}_\ell\|_{A_\ell}\qquad\mbox{for all}\quad \underline{u}_\ell\in \mathbb{R}^{N_\ell} \end{align*} and further \[ \| \widetilde{L}_\ell^{1/2} ( I - P A_{\ell-1}^{-1} P^\top A_\ell ) A_\ell^{-1} \widetilde{L}_\ell^{-1/2} \| \lesssim \log p. \] Using the identity $\|A^\top A\|\le \|A\|^2$, we finally obtain the desired result. \qed\end{proof} Finally, we can show Theorem~\ref{thrm:converg}. Here, we follow the classical approach as introduced by Hackbusch, cf.~\cite{Hackbusch:1985}. \begin{proof}[of Theorem~\ref{thrm:converg}] Lemma~\ref{lem:smp1} yields $A_\ell\le L_\ell$. Using standard arguments, cf.~\cite[Lemma~2]{Hofreither:Takacs:Zulehner:2017} or \cite{Hackbusch:1985}, the smoothing property \[ \|L_\ell^{-1} A_\ell (I- L_\ell^{-1} A_\ell)^\nu \|_{L_\ell} \le \frac{1}{\nu+1}\le \frac{1}{\nu } \] follows. Using Lemma~\ref{lem:smp1}, we obtain further \[ \|\widetilde{L}_\ell^{-1} A_\ell (I- L_\ell^{-1} A_\ell)^\nu \|_{\widetilde{L}_\ell} \lesssim \frac{p (\log p)^2 (1+L-\ell)^2 2^{L-\ell} }{\nu} \frac{\tau^*}{\tau} \frac{\delta^*}{\delta} , \] which shows together Lemma~\ref{lem:approx} \begin{align*} &\|(I-L_\ell^{-1} A_\ell)^\nu ( I - P A_{\ell-1}^{-1} P^\top A_\ell ) (I-L_\ell^{-1} A_\ell)^\nu \|_{A_\ell} \\ &\qquad \le \|( I - P A_{\ell-1}^{-1} P^\top A_\ell ) (I-L_\ell^{-1} A_\ell)^\nu \|_{A_\ell} \\ &\qquad \le \|( I - P A_{\ell-1}^{-1} P^\top A_\ell ) (I-L_\ell^{-1} A_\ell)^\nu \|_{\widetilde{L}_\ell}\\ &\qquad \le \|( I - P A_{\ell-1}^{-1} P^\top A_\ell )A_\ell^{-1}\widetilde{L}_\ell\|_{\widetilde{L}_\ell} \| \widetilde{L}_\ell^{-1}A_\ell (I-L_\ell^{-1} A_\ell)^\nu \|_{\widetilde{L}_\ell}\\ &\qquad \lesssim \frac{p (\log p)^4 (1+L-\ell)^2 2^{L-\ell}}{\nu } \frac{\tau^*}{\tau} \frac{\delta^*}{\delta} . \end{align*} This statement shows convergence of the two-grid method if $\nu$ is large enough. Standard arguments, cf.~\cite{Hackbusch:1985}, allow to extend the analysis to the W-cycle multigrid method. \end{proof} \section*{Acknowledgments} The author was supported by the Austrian Science Fund (FWF): grant P31048, and by the bilateral project DNTS-Austria 01/3/2017 (WTZ BG 03/2017), funded by Bulgarian National Science Fund and OeAD (Austria). \bibliographystyle{amsplain}
\subsubsection*{\bibname}} \usepackage[top=3cm, bottom=3cm, left=3cm, right=3cm]{geometry} \usepackage{booktabs} \usepackage{color} \usepackage{latexsym} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{amsthm} \usepackage{multirow} \usepackage{tikz} \usetikzlibrary{arrows,positioning,shapes} \usepackage{tcolorbox} \usepackage[mathcal]{eucal} \usepackage{cleveref} \crefname{assumption}{Assumption}{Assumptions} \crefname{equation}{Eq.}{Eqs.} \crefname{figure}{Fig.}{Figs.} \crefname{table}{Table}{Tables} \crefname{section}{Sec.}{Secs.} \crefname{theorem}{Thm.}{Thms.} \crefname{lemma}{Lemma}{Lemmas} \crefname{corollary}{Cor.}{Cors.} \crefname{example}{Example}{Examples} \crefname{appendix}{Appendix}{Appendixes} \crefname{remark}{Remark}{Remark} \renewenvironment{proof}[1][\proofname]{{\bfseries #1.}}{\qed \\ } \makeatother \newcommand{\note}[1]{{\textbf{\color{red}#1}}} \input{macros.tex} \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \newtheorem{definition}[theorem]{Definition} \newtheorem{attempt}[theorem]{Attempt} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{property}[theorem]{Property} \newtheorem{properties}[theorem]{Properties} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{remark}[theorem]{Remark} \newtheorem{warning}[theorem]{\textcolor{red}{Warning}} \newtheorem{example}[theorem]{Example} \newtheorem{examples}[theorem]{Examples} \newcommand{|\calY|}{|\mathcal{Y}|} \newcommand{|\calZ|}{|\mathcal{Z}|} \bibliographystyle{unsrt} \begin{document} \title{A General Theory for Structured Prediction with Smooth Convex Surrogates} \author{\textbf{Alex Nowak-Vila, Francis Bach, Alessandro Rudi} \\ [2ex] INRIA - D\'epartement d'Informatique de l'\'Ecole Normale Sup\'erieure \\ PSL Research University \\ Paris, France \\\\ } \maketitle \begin{abstract} In this work we provide a theoretical framework for structured prediction that generalizes the existing theory of surrogate methods for binary and multiclass classification based on estimating conditional probabilities with smooth convex surrogates (e.g. logistic regression). The theory relies on a natural characterization of structural properties of the task loss and allows to derive statistical guarantees for many widely used methods in the context of multilabeling, ranking, ordinal regression and graph matching. In particular, we characterize the smooth convex surrogates compatible with a given task loss in terms of a suitable Bregman divergence composed with a link function. This allows to derive tight bounds for the calibration function and to obtain novel results on existing surrogate frameworks for structured prediction such as conditional random fields and quadratic surrogates. \end{abstract} \section{Introduction} In statistical machine learning, we are usually interested in predicting an unobserved output element~$y$ from a discrete output space $\mathcal{Y}$ given an observed value $x$ from an input space $\mathcal{X}$. This is done by estimating a function $f$ such that $f(x)\approx y$ from a finite set of example pairs $(x,y)$. In many practical domains such as natural language processing \cite{smith2011linguistic}, computer vision \cite{nowozin2011structured} and computational biology \cite{durbin1998biological}, the outputs are structured objects, such as sequences, images, graphs, etc. This structure is implicitly characterized by the loss function $L:\mathcal{Y}\times\mathcal{Y}\rightarrow\Rspace{}$ used to measure the error between the prediction and the observed output as $L(f(x),y)$. Unfortunately, as the outputs are discrete, the direct minimization of the loss function is known to be intractable even for the simplest losses such as the binary 0-1 loss \cite{arora1997hardness}. A common approach to the problem is to design a surrogate loss $S:\mathcal{V}\times\mathcal{Y}\rightarrow\Rspace{}$ defined in a continuous surrogate space $\mathcal{V}$ that can be minimized in practice and construct the functional $f$ by ``decoding'' the values from the continuous space to the discrete space of outputs. In this paper, we construct a general theory for structured output prediction using smooth convex surrogates based on estimating the Bayes risk of the task loss. The methods we consider can be seen as a generalization of binary and multiclass methods based on estimating the conditional probabilities \cite{bartlett2006convexity, zhang2004statistical, zhang2004statisticalbehavior} to general discrete losses, and correspond to proper composite losses \cite{reid2010composite,vernet2011composite} for multiclass classification. Our construction is based on two main ingredients; first, the characterization of the structural properties of a loss function $L$ by means of an affine decomposition of the loss \cite{ramaswamy2013convex, nowak2018sharp}, which we present in \cref{sec:setting}, and second, the Bregman divergence characterization of proper scoring rules for eliciting linear properties of a distribution \cite{abernethy2012characterization, pmlr-v40-Frongillo15}, which has already been noted to have strong links with the design of consistent surrogate losses \cite{agarwal2015consistent}. We put these two ideas together in \cref{sec:surrogateframework} to construct calibrated surrogates, which are \emph{consistent} smooth convex surrogates with two basic elements, namely, a differentiable and strictly convex \emph{potential} $h$ and a continuous invertible \emph{link function} $t$, which can be easily obtained from the surrogate loss. We showcase the generality of our construction by showing how general methods for structured prediction such as the quadratic surrogate \cite{ciliberto2016consistent, osokin2017structured, ciliberto2018localized} and conditional random fields (CRFs) \cite{Lafferty:2001:CRF:645530.655813, settles2004biomedical}, and widely used methods in multiclass classification \cite{zhang2004statistical}, multilabel classification \cite{read2011classifier}, ordinal regression \cite{pedregosa2017consistency}, amongst others, fall into our framework. Hinge-type surrogates such as the structured SVM \cite{crammer2001algorithmic}, which is known to be inconsistent \cite{tewari2007consistency}, are not included. This theoretical framework allows to derive guarantees by relating the surrogate risk associated to $S$ (object that we can minimize) to the actual risk associated to $L$ (object that we want to minimize) by means of convex lower bounds on the \emph{calibration function} $\zeta_h$ \cite{bartlett2006convexity, steinwart2007compare, osokin2017structured}, which is a mathematical object that only depends on the surrogate loss through the potential $h$. In \cref{sec:theoreticalanalysis}, we provide an exact formula for the calibration function (\cref{th:exactcalibration}) and a user-friendly quadratic lower bound for strongly convex potentials (\cref{th:lowerboundcalibration}). There, we also analyze the role of the link function on the complexity of the surrogate method by studying the learning guarantees when the convex surrogate is minimized with a stochastic learning algorithm (\cref{th:ASGD}). In particular, we show that, while the relation between excess risks is related to the potential $h$, the approximation error is crucially related to the link function. More specifically, we discuss the benefits of logistic-type surrogates with respect to the quadratic-type ones. Finally, those results are then used in \cref{sec:examples} to derive learning guarantees for specific methods on multiple tasks for the first time, while also recovering existing results. The most significant novel results on this direction being an exact expression for the calibration function for the quadratic surrogate (\cref{th:exactcalibrationquadraticsimple}) and a quadratic lower bound for CRFs (\cref{prop:calibrationCRFs}). \section{Setting} \label{sec:setting} \subsection{Supervised Learning} \label{sec:supervisedlearning} The problem of {\em supervised learning} consists in learning from examples a function relating inputs with observations/labels. More specifically, let $\mathcal{Y}$ be the space of observations, denoted {\em observation space} or {\em label space} and $\mathcal{X}$ be the {\em input space}. The quality of the predicted output is measured by a given {\em loss function} $L$. In many scenarios the output of the function lies in a different space than the observations, for instance in subset ranking losses \cite{chen2009ranking} or losses with an abstain option \cite{ramaswamy2015consistent}. We denote then by $\mathcal{Z}$ the {\em output space}, so \begin{equation}\label{eq:loss_function} L:\mathcal{Z}\times \mathcal{Y}\longrightarrow \mathbb{R}, \end{equation} where $L(z, y)$ measures the cost of predicting $z$ when the observed value is $y$. We assume that $\mathcal{Y}$ and $\mathcal{Z}$ are discrete. Finally the data are assumed to be distributed according to a probability measure $\rho$ on $\mathcal{X} \times \mathcal{Y}$. The goal of supervised learning is then to recover the function $f^\star$ \footnote{In general $f^\star$ is not unique, as there might be $x\in\mathcal{X}$ with more than one optimal outputs. For simplicity, we assume that we have a method to choose a unique output between the optimal ones. Note that this is always possible as $\mathcal{Z}$ is discrete, so one can always construct this method using an ordering of the elements of $\mathcal{Z}$.} minimizing the {\em expected risk} $\calE(f)$ of the loss, \eqal{\label{eq:optimal_f} f^\star = \operatorname*{arg\; min}_{f: \mathcal{X} \to \mathcal{Z}}\calE(f), \quad \calE(f) =\operatorname{\mathbb{E}}_{(X,Y)\sim\rho}L(f(X), Y), \vspace*{-4pt} } given only a number of examples $(x_i, y_i)_{i=1}^n$, with $n \in \mathbb{N}$, sampled independently from $\rho$. The quality of an estimator $\widehat{f}$ for $f^\star$ is measured in terms of the {\em excess risk} $\calE(\widehat{f}) - \calE(f^\star)$. It is known that $f^\star$ is characterized as \cite{steinwart2008support,ciliberto2016consistent}, \begin{equation}\label{eq:bayes_optimum} f^\star(x)=\textstyle \operatorname*{arg\; min}_{z\in\mathcal{Z}}~\ell(z,\rho(\cdot|x)), \end{equation} where for any $q\in\operatorname{Prob}(\mathcal{Y})$, the quantity $\ell(z, q) = \operatorname{\mathbb{E}}_{Y\sim q}L(z,Y)$ is the {\em Bayes risk}, defined as the expectation of the loss with respect to the distribution $q$ on the labels. We also define the \emph{excess Bayes risk} as $\delta\ell(z,q)=\ell(z, q) - \min_{z'\in\mathcal{Z}}\ell(z',q)\geq 0$. \subsection{Affine Decomposition of Discrete Losses and Marginal Polytope}\label{sec:affinedecomposition} Consider the following \emph{affine decomposition} of a loss $L$ \cite{ramaswamy2013convex, nowak2018sharp}, \begin{equation}\label{eq:affinedecomposition} L(z,y) = \langle\psi(z), \phi(y)\rangle + c, \end{equation} where $\psi:\mathcal{Z} \to \mathcal{H}$ and $\phi: \mathcal{Y} \to \mathcal{H}$ are embeddings to a vector space $\mathcal{H}$ with Euclidean scalar product $\langle\cdot,\cdot\rangle$ and $c\in\Rspace{}$ is a scalar constant. Note that by linearity of the inner product, \begin{equation*} \ell(z,q) = \operatorname{\mathbb{E}}_{Y\sim q}\langle\psi(z),\phi(Y)\rangle + c = \langle\psi(z),\mu(q) \rangle + c, \end{equation*} with $\mu(q) = \operatorname{\mathbb{E}}_{Y\sim q}\phi(Y)$ the vector of moments of the statistic $\phi$. If we denote $\mu^\star(x)=\mu(\rho(\cdot|x))$, then the excess Bayes risk takes the form $\delta\ell(z,\rho(\cdot|x))=\langle\psi(z)-\psi(f^\star(x)), \mu^\star(x)\rangle\geq 0$. Note that the affine decomposition always exists, is not unique and it corresponds to a low-rank decomposition of the ``centered'' loss matrix $L-c\in\Rspace{\mathcal{Z}\times\mathcal{Y}}$. The image of $\mu^\star$ lies inside the convex hull of the $\phi(y)'s$, that is, \begin{equation} \text{Im}(\mu^\star) \subseteq \mathcal{M} \defeq \operatorname{hull}(\phi(\mathcal{Y})) \subset \mathcal{H}. \end{equation} The set $\mathcal{M}$ is the polytope corresponding to the convex hull of the finite set $\phi(\mathcal{Y})\subset\mathcal{H}$. We will refer to $\mathcal{M}$ as the \emph{marginal polytope} associated to the statistic $\phi$, making an analogy to the literature on graphical models \cite{wainwright2008graphical}. We denote by $k=\operatorname{dim}(\mathcal{H})$ the dimension of the embedding space and by $r=\operatorname{dim}(\mathcal{M})$ the dimension of the marginal polytope, defined as the dimension of its affine hull. Note that it can be the case that $r<k$, which means that $\mathcal{M}$ is not full-dimensional in $\mathcal{H}$. \begin{example}[Multiclass and multilabel classification]\label[example]{ex:multiclassmultilabel} The 0-1 loss used for $k$-multiclass classification ($\mathcal{Z}=\mathcal{Y}=\{1,\ldots,k\}$) can be decomposed as $L(z,y)=1(z\neq y) = 1 - \langle e_z,e_y\rangle$, where $\mathcal{H}=\Rspace{k}$ and $e_z$ is the $z$-th vector of the canonical basis in $\Rspace{k}$. In this case, the loss matrix is full-rank and the marginal polytope is the simplex in $k$ dimensions, $\mathcal{M}=\operatorname{hull}(\{e_y\}_{y=1}^k)=\Delta_k$, which is not full-dimensional and has dimension $r=k-1$. Another example is the Hamming loss used for multilabel classification ($\mathcal{Z}=\mathcal{Y}=\{-1,1\}^k$). In this case, the loss matrix is extremely low-rank and can be decomposed as $L(z,y) = \frac{1}{k}\sum_{j=1}^k1(z_j\neq y_j)=\frac{1}{2}-\langle z/(2k), y\rangle$, where $k=\log|\mathcal{Y}|$. The marginal polytope is the cube $\mathcal{M}=\operatorname{hull}(\{-1,1\}^k)=[-1,1]^k$ which is full dimensional in $\mathcal{H}=\Rspace{k}$. \end{example} \section{Surrogate Framework} \label{sec:surrogateframework} \subsection{Estimation of the Bayes Risk with Surrogate Losses}\label{sec:bayesrisk} The construction in \cref{sec:affinedecomposition} leads to a natural method in order to estimate $f^\star$ based on estimating the conditional expectation $\mu^\star$. Indeed, given an estimator $\widehat{\mu}$ of $\mu^\star$, one can first construct an estimator of the Bayes risk as $\widehat{\ell}(z, \rho(\cdot|x)) \defeq \langle\psi(z), \widehat{\mu}(x)\rangle + c$, and then define the resulting estimator as \begin{equation} \widehat{f}(x) \defeq \operatorname*{arg\; min}_{z\in\mathcal{Z}}~\widehat{\ell}(z,\rho(\cdot|x)) = \operatorname*{arg\; min}_{z\in\mathcal{Z}}~ \langle\psi(z), \widehat{\mu}(x)\rangle. \end{equation} In the following, we study a framework to construct estimators of $\mu^\star$ using surrogate losses. We consider estimators which are based on the minimization of the \emph{expected surrogate risk} $\calR(g)$ of a \emph{surrogate loss} $S:\mathcal{V}\times\mathcal{Y}\rightarrow\Rspace{}$ defined in a (unconstrained) vector space $\mathcal{V}$, \begin{equation}\label{eq:surrogaterisk} g^\star = \underset{g:\mathcal{X}\rightarrow\mathcal{V}}{\operatorname*{arg\; min}}~ \calR(g), \quad \calR(g) = \operatorname{\mathbb{E}}_{(X,Y)\sim\rho}S(g(X),Y). \end{equation} An estimator $\widehat{f}$ of $f^\star$ is built from an estimator $\widehat{g}$ of $g^\star$ using a \emph{decoding mapping} $d:\mathcal{V}\rightarrow\mathcal{Z}$ as~$\widehat{f}=d\circ\widehat{g}$. The pair $(S,d)$ constitutes a \emph{surrogate method} and we say that it is \emph{Fisher consistent}~\cite{lin2004note} to the loss $L$ if the minimizer of the expected surrogate risk \eqref{eq:surrogaterisk} leads to the minimizer of the true risk \eqref{eq:optimal_f} as $f^\star=d\circg^\star$. Analogously to the quantities defined in \cref{sec:supervisedlearning} for the discrete loss $L$, we define the \emph{excess surrogate risk} as $\calR(\widehat{g})-\calR(g^\star)$, the \emph{Bayes surrogate risk} $s(v,q)=\operatorname{\mathbb{E}}_{Y\sim q}S(v,Y)$ and the \emph{excess Bayes surrogate risk} as $\delta s(v,q)=s(v,q)-\min_{v'\in\mathcal{V}}s(v',q)\geq 0$. Similarly to \cref{eq:bayes_optimum}, $g^\star$ is characterized by $g^\star(x) = \operatorname*{arg\; min}_{v\in\mathcal{V}}s(v,\rho(\cdot|x))$, which we assume unique. We will now focus on surrogate losses for which $\mu^\star$ can be computed from the minimizer $g^\star$ through a continuous \emph{injective} mapping $t:\mathcal{M}\rightarrow\mathcal{V}$ called the \emph{link function}. More precisely, we ask \begin{equation}\label{eq:optimal_g} t(\mu(q))=\operatorname*{arg\; min}_{v\in\mathcal{V}}~s(v,q), \quad \forall q\in\operatorname{Prob}(\mathcal{Y}). \end{equation} Although \cref{eq:optimal_g} is the only property that we need from $S$ in order to build the theoretical framework, we assume in the following that $S$ is \emph{smooth} and \emph{convex}. This is justified in \cref{rk:smoothnessconvexity}. \begin{remark}[On smoothness and convexity requirement on $S$]\label[remark]{rk:smoothnessconvexity} Although we do not formalize any statement of that kind, the smoothness of $S$ is closely related to the injectivity of $t$. For instance, in the multiclass case where $\mu(q)=q$, if $v_0=\operatorname*{arg\; min}_{v\in\mathcal{V}}s(v,q_0)$ and $s(\cdot,q_0)$ is not differentiable at $v_0$, then one can find $q'\neq q_0$ such that $s(v_0,q')=s(v_0,q_0)$, and so the link is not injective. This is the case for hinge-type surrogates, which do not estimate conditional probabilities. A proper analysis in this direction can be formalized in terms of supporting hyperplanes on the so-called superdiction set associated to $S$ (see Sec. 5.3 in \cite{vernet2011composite}). The convexity requirement is made in order to be able to minimize in a tractable way the expected surrogate risk. \end{remark} If a surrogate loss satisfies \cref{eq:optimal_g}, then one can relate $f^\star$ and $g^\star$ using the decoding mapping $d_{\psi,t}:t(\mathcal{M})\rightarrow\mathcal{Z}$ defined as \begin{equation}\label{eq:decoding} d_{\psi,t}(v) =\textstyle \operatorname*{arg\; min}_{z\in\mathcal{Z}}~\langle\psi(z), t^{-1}(v)\rangle. \end{equation} The role of the link function here is to deal with the fact that the image of $\mu^\star$ lives in $\mathcal{M}$, which is a constrained, bounded, and possibly non full-dimensional set of $\mathcal{H}$. As in general it is not easy to impose a structural constraint on the hypothesis space, the goal of the link function is to encode this geometry by mapping points from a ``simpler" $t(\mathcal{M})\subseteq\mathcal{V}$ to $\mathcal{M}$. Note that $d_{\psi,t}$ is defined in $t(\mathcal{M})$, so if $t(\mathcal{M})\neq\mathcal{V}$, we do not know how to map points from $\mathcal{V}\backslash t(\mathcal{M})$ to $\mathcal{H}$. In the next \cref{sec:BDrepresentation} we show that in the cases where $t(\mathcal{M})\neq\mathcal{V}$, the link can be sometimes naturally extended to cover the whole vector space $\mathcal{V}$. In order to do this, we first show that surrogates satisfying \cref{eq:optimal_g} have a very rigid structure in $t(\mathcal{M})$ in the form of a Bregman divergence representation. Then, we define $\phi$-calibrated surrogates as the ones such that the corresponding Bregman divergence representation can be extended to $\mathcal{V}$. Assume for now that $t(\mathcal{M})=\mathcal{V}$. The surrogate method $(S,d_{\psi,t})$ works as follows; in the learning phase, an estimator $\widehat{g}$ is found by (regularized) empirical risk minimization on the smooth convex surrogate loss $S$, and then, given a new input element $x$, the decoding mapping $d_{\psi,t}$ computes the prediction $\widehat{f}(x)$ from $\widehat{g}$. Note that the computational complexity of inference can vary depending on the loss $L$ (see \cite{nowak2018sharp,ciliberto2016consistent}). See boxes below. \vspace{5pt} \begin{tcolorbox}[colframe=black!25, colback=black!2] \vspace{-5pt} \begin{center} \textbf{Learning} \end{center} \vspace{-9pt} \hrule \noindent \begin{itemize} \item[-] \textit{Given}: a functional hypothesis space $\mathcal{G}\subset\{g:\mathcal{X}\rightarrow\mathcal{V}\}$, dataset $(x_i,y_i)_{1\leq i\leq n}$ and surrogate loss $S:\mathcal{V}\times\mathcal{Y}\rightarrow\Rspace{}$. \vspace{-5pt} \item[-] \textit{Goal}: Minimize the expected surrogate risk $\calR(g)$ as: \end{itemize} \vspace{-5pt} \begin{equation}\label{eq:learning} \widehat{g} = \operatorname*{arg\; min}_{g \in \mathcal{G}} \frac{1}{n}\sum_{i=1}^n S(g(x_i), y_i) + \lambda \|g\|^2_\mathcal{G}. \end{equation} \vspace{-10pt} \end{tcolorbox} \begin{tcolorbox}[colframe=black!25, colback=black!2] \vspace{-5pt} \begin{center} \textbf{Inference} \end{center} \vspace{-7pt} \hrule \noindent \begin{itemize} \item[-] \textit{Given}: an input element $x\in\mathcal{X}$, an estimator $\widehat{g}\in\mathcal{G}$, the inverse of the link function $t^{-1}:\mathcal{V}\rightarrow\mathcal{H}$ and an embedding $\psi:\mathcal{Z}\rightarrow\mathcal{H}$. \vspace{-5pt} \item[-] \textit{Goal}: Construct prediction $\widehat{f}(x)\in\mathcal{Z}$ as: \end{itemize} \vspace{-5pt} \begin{equation}\label{eq:inference} \widehat{f}(x) = d_{\psi,t}\circ\widehat{g}(x) = \operatorname*{arg\; min}_{z \in\mathcal{Z}}~\left\langle \psi(z),t^{-1}(\widehat{g}(x)) \right\rangle. \end{equation} \vspace{-10pt} \end{tcolorbox} \subsection{Bregman Divergence Representation}\label{sec:BDrepresentation} Let $\mathcal{D}\subseteq\mathcal{H}$ be a convex set. Recall that the Bregman divergence (BD) associated to a convex and differentiable function $h:\mathcal{D}\subseteq\mathcal{H}\xrightarrow{}\Rspace{}$ is defined as \begin{equation}\label{eq:bregmandivergence} D_{h}(u', u) = h(u') - h(u) - \langle u' - u, \nabla h(u)\rangle. \end{equation} We will say that a surrogate loss $S$ has a BD representation if the excess Bayes surrogate risk $\delta s(v,q)$ can be written as a BD by composition with the link function. \begin{definition}[BD Representation] \label[definition]{def:BDrepresentation} The surrogate loss $S$ has a $(h,t,\phi)$-BD representation in $\mathcal{V}'\subset\mathcal{V}$, if there exists a set $\mathcal{D}\supseteq\mathcal{M}$ containing the marginal polytope, a strictly convex and differentiable potential $h:\mathcal{D}\subseteq\mathcal{H}\rightarrow\Rspace{}$ and continuous invertible link $t:\mathcal{D}\rightarrow\mathcal{V}'$, such that the excess Bayes surrogate risk can be written as \begin{equation} \delta s(v,q) = D_h(\mu(q), t^{-1}(v)), \quad \forall v\in \mathcal{V}'\subset\mathcal{V}, \forall q\in\operatorname{Prob}(\mathcal{Y}). \end{equation} \end{definition} The following \cref{th:compositerepresentation} states that any surrogate loss satisfying \cref{eq:optimal_g} has a BD representation in $t(\mathcal{M})$, which justifies why we focus on these representations of losses. \begin{theorem}[BD Representation in $t(\mathcal{M})$]\label[theorem]{th:compositerepresentation} If the surrogate loss $S:\mathcal{V}\times\mathcal{Y}\rightarrow\Rspace{}$ is continuous and satisfies \cref{eq:optimal_g} for a continuous injective mapping $t:\mathcal{M}\rightarrow\mathcal{V}$, then it has a $(h,t,\phi)$-BD representation in $t(\mathcal{M})\subseteq\mathcal{V}$. \end{theorem} The proof of \cref{th:compositerepresentation} can be found in \cref{app:BDrepresentation} and it is based on a characterization of scoring rules for linear properties of a distribution as Bregman divergences associated to strictly convex functions \cite{abernethy2012characterization, frongillo2015vector}. The differentiability of $h$ is derived from the continuity of the link $t$ and $S$. It is important to highlight the fact that the function $h$ is defined up to an additive affine term, as the BD is invariant under this transformation. Hence, we will say that $h$ and $h'$ are equivalent if and only if $h-h'$ is an affine function. Note that the function $h$ given by \cref{th:compositerepresentation} can be computed as \begin{equation}\label{eq:computingh} h(\mu(q)) = \delta s(v_0, q), \end{equation} for any $v_0\in t(\mathcal{M})$. Indeed, by \cref{th:compositerepresentation}, the dependence on $q$ of $\delta s(v_0, q)$ is only through the vector of moments $\mu(q)$ and $\delta s(v, q)-\delta s(v', q)$ is an affine function of $\mu(q)$, $\forall v,v'\in t(\mathcal{M})$. Observe that different surrogate losses can yield the same BD representation in $t(\mathcal{M})$. For instance, in binary classification, the square, squared hinge and modified Huber margin losses have the same BD representation in $[-1,1]$ \cite{zhang2004statisticalbehavior} (see \cref{app:binaryclassification}). \subsection{$\phi$-Calibrated Surrogates} Now, we define the concept of a $\phi$-calibrated loss by asking the surrogate loss satisfying \cref{eq:optimal_g} to extend (in the case that $t(\mathcal{M})\neq\mathcal{V}$) its $(h,t,\phi)$-BD representation in $t(\mathcal{M})$ given by \cref{th:compositerepresentation} to $\mathcal{V}$, which will allow us to define the decoding mapping $d_{\psi,t}$ to the whole vector space $\mathcal{V}$. \begin{definition}[$\phi$-Calibrated Surrogates]\label[definition]{def:phicalibrated} Let $\phi:\mathcal{Y}\rightarrow\mathcal{H}$. A smooth convex surrogate loss~$S:\mathcal{V}\times\mathcal{Y}\rightarrow\Rspace{}$ is $\phi$-calibrated if it has a $(h,t,\phi)$-BD representation in the vector space $\mathcal{V}$. \end{definition} There are many ways of building a continuous extension of $t$ to an invertible mapping in $\mathcal{V}$ (and thus to extend $d_{\psi,t}$), however, the BD representation extension allows to prove guarantees for estimators $\widehat{g}$ with $\operatorname{Im}(\widehat{g})\not\subset t(\mathcal{M})$ (see \cref{sec:theoreticalanalysis}). In general, it is not true that any surrogate loss satisfying \cref{eq:optimal_g} with $t(\mathcal{M})\subsetneq\mathcal{V}$ has an extended BD representation in $\mathcal{V}$, this is the case for squared hinge and modified Huber margin losses in binary classification (see \cref{app:binaryclassification}). \begin{example}[Quadratic, logistic and hinge surrogates]\label{ex:QSandlog} Let us provide some examples in binary classification where $\mathcal{M}=\Delta_2\subset\mathcal{H}=\Rspace{2}$. The quadratic surrogate is defined as $S(v,y) = 1/2\cdot\|v-e_y\|_2^2$ with $\mathcal{V}=\Rspace{2}$ and satisfies $q = \operatorname*{arg\; min}_{v\in\Rspace{2}}s(v,q)$. It has $h(u)=1/2\cdot\|u\|_2^2$ and the link is $t=Id$. Note that although $t(\Delta_2)=\Delta_2\subsetneq\Rspace{2}$, the BD representation can be extended to $\Rspace{2}$, and in this case $\mathcal{D}=\Rspace{2}$ and so it is $\phi$-calibrated. The logistic corresponds to $S(v,y) = \log(1 + e^{-yv})$ with $\mathcal{V}=\Rspace{}$ and satisfies $\log(q_1/(1-q_1)) = \operatorname*{arg\; min}_{v\in\Rspace{}}s(v,q)$. In this case the potential is minus the entropy $h(q)=-\operatorname{Ent}(q)$ and the link is $t(q)=\log(q_1/(1-q_1))$ with inverse $t^{-1}(v)=(1+e^{-v})^{-1}$. Note that we have $t(\Delta_2)=\Rspace{}$, so it is $\phi$-calibrated. Finally, consider the hinge margin loss $S(v,y)=\max(1-yv,0)$ with $\mathcal{V}=\Rspace{}$, which satisfies $\operatorname{sign}(2q_1-1) = \operatorname*{arg\; min}_{v\in\Rspace{}}s(v,q)$, hence, $t$ is not injective, so $S$ is not $\phi$-calibrated. \end{example} Note that if a loss $S$ is $\phi$-calibrated for a statistic $\phi$, then the surrogate method $(S,d_{\psi,t})$ is Fisher consistent w.r.t $L(z,y)=\langle\psi(z),\phi(y)\rangle + c$. This implies that a $\phi$-calibrated loss can be used to consistently minimize different losses by simply changing the embedding $\psi$ at inference time. For instance, if $S$ is $\phi$-calibrated for the statistic $\phi(y)=e_y\in\Rspace{\mathcal{Y}}$, then it can be made consistent for any cost-sensitive matrix loss $L\in\Rspace{\mathcal{Z}\times \mathcal{Y}}$ by setting $\psi(z)=L_z$, where $L_z$ is the $z$-th row of $L$. Indeed, in this case $\mathcal{M}=\Delta_{\mathcal{Y}}$, and so one can estimate the Bayes risk of any loss with labels $\mathcal{Y}$. \vspace{5pt} \begin{tcolorbox}[colframe=black!25, colback=black!2] \textbf{Summary. } The surrogate loss has two components; the potential $h:\mathcal{D}\rightarrow\Rspace{}$ and the invertible link function $t:\mathcal{D}\rightarrow\mathcal{V}$, which compose the surrogate loss $S$. In the learning phase (see \cref{eq:learning}), only the surrogate loss is needed to minimize $\calR(g)$, while in the inference phase (see \cref{eq:inference}), one needs the inverse of the link to construct an estimate of $\mu^\star$, and the rest of the inference only depends on $\psi$. The potential function $h$ is not needed to define the surrogate method but it is the mathematical object providing the guarantees in order to relate both excess risks in \cref{sec:theoreticalanalysis}. The link function also has implications in terms of learning complexity (see discussion in \cref{sec:ASGD}). See \cref{fig:diagram} in \cref{app:BDrepresentation} for an illustrative diagram. \end{tcolorbox} We now provide a recipe on how to check whether a surrogate loss is $\phi$-calibrated and to compute its corresponding $(h,t,\phi)$-BD representation if applicable. \paragraph{Computing the BD representation and checking $\phi$-calibration.} Given a statistic $\phi:\mathcal{Y}\rightarrow\mathcal{H}$ and a surrogate $S:\mathcal{V}\times\mathcal{Y}\rightarrow\Rspace{}$, the first thing to do is to check whether the minimizer of $s(v,q)$ satisfies \cref{eq:optimal_g} for a continuous injective $t$. If this is the case, the potential $h$ can be found up to an additive affine term by \cref{eq:computingh}. If $t(\mathcal{M})=\mathcal{V}$, then $S$ is $\phi$-calibrated. Otherwise, one has to check if there exists an extension of $t$ and $h$ such that $\delta s(v, q) = D_h(\mu(q), t^{-1}(v))$ for all $v\in\mathcal{V},q\in\operatorname{Prob}(\mathcal{Y})$. We provide numerous examples in \cref{sec:examples} and in the Appendix. We present now a special group of $\phi$-calibrated surrogates, whose potential $h$ is a function of Legendre-type and the link is the gradient of the potential $\nabla h$. \paragraph{$\phi$-Calibrated surrogates of Legendre-type.} A function $h$ is of Legendre-type in $\mathcal{D}\subseteq\mathcal{H}$ if it is strictly convex in $\operatorname{int}(\mathcal{D})$ and essentially smooth, which in particular requires $\lim_{u\to\partial\mathcal{D}}\|\nabla h(u)\|_2=+\infty$, where $\partial\mathcal{D}$ is the boundary of $\mathcal{D}$. Given a Legendre-type function $h$ with domain $\mathcal{D}\supseteq\mathcal{M}$ including the marginal polytope, one can set the link function to $t=\nabla h$. We call it the \emph{canonical link}. It has the nice property that if $h$ is of Legendre-type in $\mathcal{D}$, then its Fenchel conjugate $h^*$ is also of Legendre-type and its gradient is the inverse of the link function $\nabla h^* = (\nabla h)^{-1}$. We denote the resulting loss $S:\operatorname{dom}(h^*)\times\mathcal{Y}\rightarrow\Rspace{}$ a \emph{surrogate loss of Legendre-type}, which is \emph{convex} and has the form: \begin{equation}\label{eq:legendretypeloss} S(v,y) = D_h(\phi(y), \nabla h^*(v)) = h^*(v) + h(\phi(y)) - \langle\phi(y), v\rangle, \end{equation} The excess Bayes surrogate risk can be written as a BD also in $\operatorname{dom}(h^*)$ as: \begin{equation} \delta s(v,q) = D_h(\mu(q), \nabla h^*(v)) = D_{h^*}(v, \nabla h(\mu(q))). \end{equation} Moreover, $\mathcal{D}$ is bounded if and only $\operatorname{dom}(h^*)$ is a vector space and $h^*$ is Lipschitz. Those losses were studied by \cite{blondel2019learning} as a subset of Fenchel-Young losses, but without providing learning guarantees. The most important examples are the quadratic surrogate, where $\mathcal{D}=\mathcal{H}$, and CRFs, where $\mathcal{D}=\mathcal{M}$, both studied in detail in \cref{sec:QSandCRFs}. Further details on this construction can be found in \cref{app:canonicallink}. \section{Theoretical Analysis}\label{sec:theoreticalanalysis} We know by construction that $\phi$-calibrated surrogate losses lead to Fisher consistent surrogate methods $(S,d_{\psi,t})$, which means that the minimizer of the surrogate risk $\calR$ provides the minimizer of the true risk $\calE$ as $f^\star=d\circ g^\star$. However, in practice we will never be able to minimize the surrogate risk to optimality. The goal of this section is to \emph{calibrate} the excess surrogate risk to the true excess risk, i.e., quantify how much the excess surrogate risk has to be minimized so that the excess true risk is smaller than $\varepsilon$. This quantification is made by means of the \emph{calibration function} \cite{steinwart2007compare, osokin2017structured, bartlett2006convexity, duchi2010consistency}, which is the mathematical object that will allow us to relate the quantity we can directly minimize to the one that we are ultimately interested in. All the proofs from this section can be found in \cref{app:calibrationrisks}. \subsection{Calibrating Risks with the Calibration Function} The calibration function is defined as the largest function $\zeta:\Rspace{}_{+}\longrightarrow\Rspace{}_{+}$ that relates both excess Bayes risks as $\zeta(\delta\ell(d(v), q)) \leq \delta s(v, q)$, $\forall v\in\mathcal{V}, \forall q\in\operatorname{Prob}(\mathcal{Y})$. The calibration function for general losses is thus defined as follows. \begin{definition}[Calibration function \cite{osokin2017structured}]\label[definition]{def:calibrationfunction} The calibration function $\zeta:\Rspace{}_{+}\longrightarrow\Rspace{}_{+}$ is defined for~$\varepsilon\geq 0$ as the infimum of the excess Bayes surrogate risk when the excess Bayes risk is at least $\varepsilon$: \begin{equation}\label{eq:optimalcalibration} \zeta(\varepsilon) = \inf\delta s(v, q)\quad \text{such that} \quad \delta\ell(d(v), q) \geq\varepsilon,~q\in\operatorname{Prob}(\mathcal{Y}),~v\in\mathcal{V}. \end{equation} We set $\zeta(\varepsilon)=\infty$ when the feasible set is empty. \end{definition} Note that $\zeta$ is non-decreasing on $[0, +\infty)$, not necessarily convex (see Example 5 by \cite{bartlett2006convexity}) and also $\zeta(0)=0$. Note that a larger $\zeta$ is better because we want a large $\delta s(v,q)$ to incur small $\delta\ell(d(v),q)$. The calibration function $\zeta$ relates conditional risks. In order to calibrate risks $\calR$ and $\calE$ one needs to impose convexity so that the expectation with respect to the marginal distribution $\rho_{\mathcal{X}}\in\operatorname{Prob}(\mathcal{X})$ can be moved outside of the calibration function. In \cref{th:calibrationrisks}, which can be found in \cite{osokin2017structured}, we calibrate the risks by taking a convex lower bound of $\zeta$. \begin{theorem}[Calibration between risks \cite{osokin2017structured}]\label[theorem]{th:calibrationrisks} Let $\bar{\zeta}$ be a convex lower bound of $\zeta$. We have \begin{equation}\label{eq:riskcalibration} \bar{\zeta}(\calE(d\circ\widehat{g}) - \calE(f^\star))\leq \calR(\widehat{g}) - \calR(g^\star) \end{equation} for all $\widehat{g}:\mathcal{X}\rightarrow\mathcal{V}$. The tightest convex lower bound $\bar{\zeta}$ of $\zeta$ is its lower convex envelope which is defined by the Fenchel bi-conjugate $\zeta^{**}$ \footnote{The Fenchel bi-conjugate is characterized by $\operatorname{epi}(\zeta^{**})=\overline{\operatorname{hull}(\operatorname{epi}(\zeta}))$, where $\operatorname{epi}(\zeta)$ denotes the epigraph of the function $\zeta$ and $\overline{\operatorname{hull}(A)}$ is the closure of the convex hull of the set $A$.}. \end{theorem} Note that a surrogate method is Fisher consistent if and only if $\zeta^{**}(\varepsilon)>0$ for all $\varepsilon>0$, as this implies $f^\star=d\circg^\star$. In the case that $\zeta^{**}\neq\zeta$, this property also translates to $\zeta$. See \cref{fig:calibrationfunctionandhamming}. \subsection{Calibration Function for $\phi$-Calibrated Losses} The computation of $\zeta$ (or a convex lower bound thereof) is known not to be easy and has been a central topic of study for many past works \cite{bartlett2006convexity, pires2013cost, osokin2017structured}. One of the main contributions of this work is to provide an exact formula for $\zeta$ for $\phi$-calibrated losses based on Bregman divergences between pairs of sets in $\mathcal{H}$. This geometric interpretation of the calibration function will be used to compute the calibration function for existing surrogates which are widely used in practice. First, let us define the \emph{calibration sets} $\mathcal{H}_\varepsilon(z)$ for every $\varepsilon\geq 0$ and $z\in\mathcal{Z}$ as \begin{equation} \mathcal{H}_\varepsilon(z) = \{u\in\mathcal{H}~|~\langle\psi(z)-\psi(z'), u\rangle\leq \varepsilon, \forall z'\in\mathcal{Z}\} \subset\mathcal{H}. \end{equation} The points in $\mathcal{H}_\varepsilon(z)$ are the ones whose Bayes risk is at least $\varepsilon$-close to have $z$ as optimal prediction. In particular, $\mathcal{H}_0(z)$ is the set of points with optimal prediction $z$, which can be equivalently written as $\mu^\star(x)\in\mathcal{H}_0(f^\star(x))$, $\forall x\in\mathcal{X}$. Note that $\mathcal{H}_\varepsilon(z)$ is convex $\forall \varepsilon\geq 0, \forall z\in\mathcal{Z}$. See \cref{fig:calibrationfunctionandhamming} for a visualization of the calibration sets for the Hamming loss in the context of multilabel classification (and \cref{fig:multiclass_calibration} in \cref{app:multiclassclassification} for the 0-1 loss for multiclass classification). \begin{theorem}[Calibration function for $\phi$-calibrated losses]\label[theorem]{th:exactcalibration} Let $S$ be a $\phi$-calibrated surrogate with potential function $h:\mathcal{D}\rightarrow\Rspace{}$ and let $L(z,y)=\langle\psi(z),\phi(y)\rangle+c$. The calibration function only depends on $S$ through $h$ and we denote it by $\zeta_h$. Moreover, it can be written as \begin{equation}\label{eq:exactcalibration} \zeta_h(\varepsilon) = \min_{z\in\mathcal{Z}}D_h(\mathcal{H}_{\varepsilon}(z)^c\cap\mathcal{M}, \mathcal{H}_{0}(z)\cap\mathcal{D}), \end{equation} where the Bregman divergence between sets $A,B$ is defined as $D_h(A,B) = \inf_{u\in A,v\in B}D_h(u, v)$. \end{theorem} Note that the Bregman divergence inside the minimum in \cref{eq:exactcalibration} does not lead to a convex minimization problem since $\mathcal{H}_{\varepsilon}(z)^c\cap\mathcal{M}$ is not convex and $D_h(u,v)$ is in general not jointly convex in $(u,v)$, with notable exceptions such as the KL-divergence and squared distance \cite{bauschke2001joint}. In general, the exact computation of $\zeta_h$ using \cref{th:exactcalibration} can still be hard to perform, for instance, when the embeddings $\psi$ are not simple to work with or the problem lacks symmetries. In the following \cref{th:lowerboundcalibration} we provide a user-friendly lower bound when the potential $h$ is strongly convex. Recall that a function $h$ is $({1}/{\beta_{\|\cdot\|}})$-strongly convex w.r.t a norm $\|\cdot\|$ in $\mathcal{D}$ if it satisfies $h(u) \geq h(v) + \langle u-v, \nabla h(v)\rangle + \frac{1}{2\beta_{\|\cdot\|}}\|u-v\|^2$, $\forall u,v\in\mathcal{D}$. \begin{theorem}[User-friendly lower bound on $\zeta_h$]\label[theorem]{th:lowerboundcalibration} Let $\zeta_{h}(\varepsilon)$ be the calibration function given by \cref{eq:exactcalibration}. If $h$ is $({1}/{\beta_{\|\cdot\|}})$-strongly convex w.r.t a norm $\|\cdot\|$ in $\mathcal{D}$, then: \begin{equation} \zeta_h(\varepsilon) \geq \ \frac{\varepsilon^2} {8c_{\psi,\|\cdot\|_{*}}^2\beta_{\|\cdot\|}}, \end{equation} where $c_{\psi,\|\cdot\|_{*}} = \sup_{z\in\mathcal{Z}}\|\psi(z)\|_{*}$ and $\|\cdot\|_{*}$ is the dual norm of $\|\cdot\|$. \end{theorem} The proof is provided in \cref{app:lowerboundcalibration}, together with \cref{th:improvedlowerbound}, that gives a tighter bound in the case of strong convexity w.r.t the Euclidean norm. Finally, the following \cref{th:upperboundcalibration}, states that $\zeta_h$ can never be larger than a quadratic for $\phi$-calibrated surrogates. \begin{theorem}[Existence of quadratic upper bound]\label[theorem]{th:upperboundcalibration} Assume $h$ is twice differentiable. Then, the calibration function $\zeta_h$ is upper bounded by a quadratic close to the origin, i.e., $\zeta_h(\varepsilon) = O(\varepsilon^2)$. \end{theorem} \begin{figure}[ht!] \centering \input{calibrationfunction.tex} \input{hamming_calibration.tex} \caption{\textbf{Left:} Both red and blue curves correspond to calibration functions of Fisher consistent surrogate methods as $\zeta(\varepsilon)>0$ for all $\varepsilon>0$, which is not the case for the orange curve. However, the blue curve has better guarantees because the same surrogate excess risk leads to smaller excess true risk. \textbf{Right:} Illustration of the sets $\mathcal{H}_0(z)\cap\mathcal{M}$ and $\mathcal{H}_{\varepsilon}(z)^c\cap\mathcal{M}$ for the Hamming loss with $k=2$ labels and $z=(1,1)$. In this case, by symmetry, the calibration function is computed as the Bregman divergence between these two sets.} \label{fig:calibrationfunctionandhamming} \end{figure} \subsection{Improved Calibration under Low Noise Assumption} The result of \cref{th:calibrationrisks} can be further improved under low noise assumptions on the marginal distribution $\rho_{\mathcal{X}}$. Following the definition from classification \cite{bartlett2006convexity, mroueh2012multiclass, zhang2004statistical}, we define the \emph{margin function} $\gamma:\mathcal{X}\rightarrow\Rspace{}$ as $\gamma(x) = \min_{z'\neq f^\star(x)} \delta\ell(z', \rho(\cdot|x))$. We say that the \emph{$p$-noise condition} is satisfied if \begin{equation}\label{eq:tsybakov} \rho_{\mathcal{X}}(\gamma(X)\leq\varepsilon)=o(\varepsilon^p). \end{equation} A simple computation shows that \cref{eq:tsybakov} holds if and only if $\|1/\gamma\|_{L_p(\rho_{\mathcal{X}})}=\gamma_p<\infty$ \cite{steinwart2011estimating}. \begin{theorem}[Calibration of Risks under low noise and hard margin assumption] \label[theorem]{th:calibrationriskslownoise} Let $\bar{\zeta}$ be a convex lower bound of $\zeta$. \begin{itemize} \item[(1)] If the $p$-noise condition \eqref{eq:tsybakov} is satisfied, we have that $\bar{\zeta}^{(p)}$ defined as \vspace{-4pt} \begin{equation}\label{eq:improved_calibration} \bar{\zeta}^{(p)}(\varepsilon) = (\gamma_p\varepsilon^p)^{\frac{1}{p+1}} \bar{\zeta} ((\gamma_p^{-1}\varepsilon)^{\frac{1}{p+1}}/2), \vspace{-4pt}\end{equation} satisfies \cref{eq:riskcalibration} where $\|1/\gamma\|_{L_p(\rho_{\mathcal{X}})}=\gamma_p$. Moreover, we have that $\bar{\zeta}^{(p)}\gtrsim\bar{\zeta}$. Hence, $\bar{\zeta}^{(p)}$ never provides a worse rate than $\bar{\zeta}$. \item[(2)] If $\gamma(x)\geq\delta>0$ $\rho_\mathcal{X}$-a.s. Then, $\delta v(\widehat{g}(x),\rho(\cdot|x))<\zeta(\delta), ~\rho_\mathcal{X}\text{-a.s.}\implies \calE(d\circ\widehat{g}) = \calE(f^\star)$. \end{itemize} \end{theorem} The first part of \cref{th:calibrationriskslownoise} is a generalization of Thm. 10 by \cite{bartlett2006convexity} to general discrete losses. Note that combining \cref{eq:improved_calibration} with the lower bound given by \cref{th:lowerboundcalibration} gives $\bar{\zeta}^{(p)}\gtrsim\varepsilon^{(\frac{p+2}{p+1})}$. Indeed, $p=0$ corresponds to no assumption at all and so $\zeta^{(0)}$ stays quadratic, while $p\to\infty$ corresponds to having less and less noise at the boundary decision and $\zeta^{(p)}$ tends to be linear. Note that $p=\infty$ corresponds to having $\delta>0$ such that $\gamma(x)\geq\delta>0$ $\rho_{\mathcal{X}}$-a.s, and so from the second part of \cref{th:calibrationriskslownoise}, one obtains zero excess risk if the excess surrogate Bayes risk is smaller than $\zeta(\delta)$ almost surely. This fact has been used in binary classification together with high probability bounds on the estimator to obtain exponential rates of convergence for the risk $\calE$ \cite{audibert2007fast, koltchinskii2005exponential, pillaud2017exponential}, and our result could be used in the same way for the structured case. Finally, note that \cref{th:calibrationrisks} and \cref{th:calibrationriskslownoise} are not specific to $\phi$-calibrated surrogates and apply to any surrogate method. \subsection{Minimizing the Surrogate Loss with Averaged Stochastic Gradient Descent (ASGD)}\label{sec:ASGD} In this section, for simplicity, we assume $S:\mathcal{V}\times\mathcal{Y}\rightarrow\Rspace{}$ is a loss of Legendre-type (see \cref{eq:legendretypeloss}) with associated Legendre-type potential $h:\mathcal{D}\subseteq\mathcal{H}\rightarrow\Rspace{}$ and $\mathcal{V}=\operatorname{dom}(h^*)=\Rspace{k'}$. Following \cite{osokin2017structured}, we provide a statistical analysis of the minimization of the expected risk of $S$ using online projected averaged stochastic gradient descent (ASGD) \cite{nemirovski2009robust} on a reproducing kernel Hilbert space (RKHS) \footnote{Recall that a scalar RKHS $\bar{\mathcal{G}}$ is a Hilbert space of functions from $\mathcal{X}$ to $\Rspace{}$ with an associated kernel $k:\mathcal{X}\times\mathcal{X}\rightarrow\Rspace{}$ such that $k(x,\cdot)\in\bar{\mathcal{G}}$ for all $x\in\mathcal{X}$ and $g(x)=\langle g,k(x,\cdot)\rangle_{\bar{\mathcal{G}}}$ for all $g\in\bar{\mathcal{G}}$.} \cite{aronszajn1950theory} $\mathcal{G}=(\bar{\mathcal{G}})^{\otimes k'}=\mathcal{V}\otimes\bar{\mathcal{G}}$, where $\bar{\mathcal{G}}$ is a scalar RKHS. This will give us insight on the important quantities for the design of the surrogate method when minimizing a discrete loss $L$. Let $k:\mathcal{X}\times\mathcal{X}\rightarrow\Rspace{}$ be the kernel associated to the RKHS~$\bar{\mathcal{G}}$ and $\sup_{x\in\mathcal{X}}k(x,x)\leq\kappa^2$. The $n$-th update of ASGD reads \vspace{-1pt} \begin{equation} \widehat{g}_n =\textstyle \frac{1}{n}\sum_{i=1}^ng_i, \quad g_i = \Pi_D\left(g_{i-1} - \eta_i\nabla S(g_{i-1}(x_i), y_i)\otimes k(x_i,\cdot)\right), \end{equation} where $\nabla S$ denotes the gradient of $S$ w.r.t the first coordinate, $\eta_i$ is the step size and $\Pi_D$ is the projection onto the ball of radius $D$ w.r.t the norm induced by $\mathcal{G}$. We have the following theorem. \begin{theorem} \label[theorem]{th:ASGD} Let $S:\mathcal{V}\times\mathcal{Y}\rightarrow\Rspace{}$ be a loss of Legendre-type with associated $({1}/{\beta_{\|\cdot\|_2}})$-strongly convex $h$. Let $(x_i,y_i)_{i=1}^n$, with $n \in \mathbb{N}$ be independently and identically distributed according to $\rho$ and assume $g^\star \in \mathcal{G}$ and $\|g^\star\|_{\mathcal{G}}^2=\sum_{j=1}^{k'}\|g^\star_j\|_{\bar{\mathcal{G}}}^2\leq D^2$. Let $C^2= 1 + \sup_{y\in\mathcal{Y}}\|\phi(y)-\nabla h^*(0)\|_2/(\kappa\beta_{\|\cdot\|_2}D)$, then, by using the constant step size~$\eta=2/(\beta_{\|\cdot\|_2}\kappa^2C^2\sqrt{n})$, we have \vspace{-1pt} \begin{equation}\label{eq:ASGDbound} \mathbb{E}\left[\calE(d\circ\widehat{g}_n) - \calE(f^\star)\right] \leq \frac{4\cdot\kappa\cdot c_{\psi,\|\cdot\|_2}\cdot\beta_{\|\cdot\|_2}\cdot D\cdot C}{n^{1/4}}. \vspace{-1pt} \end{equation} \end{theorem} \begin{proof}[Proof] Let's first compute a uniform bound on the gradients as \begin{align} \|\nabla S(g(x),y)\otimes k(x,\cdot)\|_{\mathcal{G}} &\leq \kappa\|\nabla S(g(x),y)\|_2 \\ &= \kappa\|\nabla h^*(g(x))-\phi(y)\|_2 \\ & \leq \kappa (\|\nabla h^*(g(x))-\nabla h^*(0)\|_2 + \|\phi(y)-\nabla h^*(0)\|_2) \\ & \leq \kappa(\kappa\beta_{\|\cdot\|_2}D + \sup_{y\in\mathcal{Y}}\|\phi(y)-\nabla h^*(0)\|_2)=M, \end{align} where at the first step we have used that $\|k(x,\cdot)\|_{\bar{\mathcal{G}}}\leq \kappa$ and at the last step that $h^*$ is $\beta_{\|\cdot\|_2}$-smooth because $h$ is $(1/\beta_{\|\cdot\|_2})$-strongly convex, $\|g(x)\|_2^2=\sum_{j=1}^{k'}\langle g_j, k(x,\cdot)\rangle_{\bar{\mathcal{G}}}^2\leq\sum_{j=1}^{k'}\kappa^2 \|g_j\|_{\bar{\mathcal{G}}}^2=\kappa^2 \|g\|_{\mathcal{G}}^2\leq\kappa^2 D^2$ and that $\nabla h^*(v)-\nabla h^*(0)$ vanishes at the origin. Using classical results on ASGD \cite{nemirovski2009robust}, we know that using the constant step size $\eta=2D/(M\sqrt{n})$, we have that $\mathbb{E}[\calR(\widehat{g}) - \calR(g^\star)] \leq {2DM}/{n^{1/2}}$ after $n$ iterations of ASGD. Finally, applying the lower bound on $\zeta$ in \cref{th:lowerboundcalibration}, re-arranging terms, and using the fact that $\mathbb{E}[w] \leq \sqrt{\mathbb{E}[w^2]}$, for $w=\calE(d\circ\widehat{g}_n) - \calE(f^\star) \geq 0$, we obtain the bound~(\ref{eq:ASGDbound}). \end{proof} Note that \eqref{eq:ASGDbound} is upper bounded by $8\kappa^{1/2}c_{\psi,\|\cdot\|_{2}}\max(\kappa^{1/2}\beta_{\|\cdot\|_2}D, (c_{\phi,h}\beta_{\|\cdot\|_2}D)^{1/2})/n^{1/4}$, where $c_{\phi,h}=\sup_{y\in\mathcal{Y}}\|\phi(y)-\nabla h^*(0)\|_2$. There are essentially 4 quantities appearing in the bound (\ref{eq:ASGDbound}): $c_{\psi,\|\cdot\|_{*}}$ that depends on $L$, $c_{\phi,h}$ that bounds the marginal polytope centered at $\nabla h^*(0)$, $\beta_{\|\cdot\|}$ that depends on $h$ and $D$, which is an upper bound on the norm of the optimum $\|g^\star\|_{\mathcal{G}}=\|\nabla h(\mu^\star)\|_{\mathcal{G}}$ which depends on the link, in this case $\nabla h$, the RKHS $\mathcal{G}$, and $\mu^\star$. Note that the image of $\mu^\star$ lies in the marginal polytope, which is bounded and potentially non full-dimensional in $\mathcal{H}$, so if one directly estimates $\mu^\star$, the hypothesis space $\mathcal{G}$ has to model this constraint. The role of the link function is to remove this additional complexity from $\mathcal{G}$ by mapping the marginal polytope (or a superset $\mathcal{D}$ of it) to the vector space $\mathcal{V}$, and consequently smoothing out $\mu^\star$ close to the boundary of $\mathcal{M}$, leading to a smaller $\|g^\star\|_{\mathcal{G}}$. The types of surrogates that directly estimate $\mu^\star$ are of quadratic-type (see \cref{sec:QSandCRFs}), which have $\mathcal{D}=\mathcal{H}$ and the link is the identity. In this case, $\mathcal{G}$ has to be able to model the fact that $\operatorname{Im}(\mu^\star)\subseteq\mathcal{M}$. The second types are of logistic-type (see CRFs in \cref{sec:QSandCRFs}), which have $\mathcal{D}=\mathcal{M}$, and as $\lim_{\mu\to\partial\mathcal{M}}\|\nabla h(\mu)\|=+\infty$, the link smooths out $\mu^\star$ close to the boundary. In this case, $\|g^\star\|_{\mathcal{G}}$ can potentially be much smaller as~$\mathcal{G}$ does not have to model the polytope constraint. This generalizes the idea that the logistic link is preferable for estimating class-conditional probabilities, for instance, when using linear hypothesis spaces. In between the two, there are methods with bounded $\mathcal{D}$ but different than $\mathcal{M}$, such as one-vs-all methods in multiclass classification, where $\mathcal{M}=\Delta_k\subsetneq\mathcal{D}\subsetneq\mathcal{H}$ (see \cref{app:multiclassclassification}). \section{Analysis of Existing Surrogate Methods}\label{sec:examples} In this section we apply the theory developed so far to derive new results on multiple surrogate methods used in practice. In \cref{sec:QSandCRFs}, we study two generic methods for structured prediction, namely, the quadratic surrogate \cite{ciliberto2016consistent, nowak2018sharp,ciliberto2018localized} and conditional random fields (CRFs) \cite{Lafferty:2001:CRF:645530.655813, settles2004biomedical}. Then, in \cref{sec:specificproblems}, we present new theoretical results on multiple tasks in supervised learning which can be derived using results from \cref{sec:theoreticalanalysis}. The proofs of the results and further details can be found in \cref{app:genericmethods} for \cref{sec:QSandCRFs}, and from \cref{app:binaryclassification} to \cref{app:graphmatching} for \cref{sec:specificproblems}. \subsection{Optimizing generic losses: Quadratic surrogate vs. CRFs} \label{sec:QSandCRFs} \paragraph{Quadratic Surrogate for Structured Prediction.} The quadratic surrogate for structured prediction \cite{ciliberto2016consistent, ciliberto2018localized} has the form \begin{equation} \mathcal{V}=\mathcal{H}, \quad S(v,y) = \frac{1}{2}\|v - \phi(y)\|_2^2. \end{equation} This is a loss of Legendre-type with $\mathcal{D}=\mathcal{H}$, $h(u) = \frac{1}{2}\|u\|_2^2$ and $t^{-1}(u)=\nabla h^*(u)=u$. We can exactly compute the calibration function when $\mathcal{M}$ is full-dimensional. \cref{th:exactcalibrationquadraticsimple} is a simpler version of the result which holds for $\varepsilon$ small enough, the complete result can be found in \cref{app:quadraticsurrogate}. \begin{theorem}\label[theorem]{th:exactcalibrationquadraticsimple} If $\mathcal{M}$ is full-dimensional, there exists $\varepsilon_0>0$ such that \vspace{-5pt} \begin{equation} \zeta_h(\varepsilon) = \frac{\varepsilon^2}{2\max_{(z,z')\in A}\|\psi(z)-\psi(z')\|_2^2}, \quad \forall\varepsilon\leq\varepsilon_0, \vspace{-5pt} \end{equation} where $A=\{(z,z')\in\mathcal{Z}^2~|~z'\neq z, \mathcal{H}_0(z)\cap\mathcal{H}_0(z')\neq\varnothing\}$. \end{theorem} Note that in this case as $h$ is $1$-strongly convex with respect to the Euclidean norm, \cref{th:lowerboundcalibration} gives $\zeta_h(\varepsilon) \geq \varepsilon^2\cdot(8c_{\psi, \|\cdot\|_2}^2)^{-1}$, and we recover the comparison inequality from \cite{ciliberto2016consistent}. In \cref{app:quadraticsurrogate} we compare this result with the lower bounds on the calibration function for the quadratic-type surrogates studied by \cite{osokin2017structured}. An interesting property of the quadratic surrogate is that one can build the estimator~$\widehat{f}$ independently of the affine decomposition of $L$ by minimizing the expected surrogate risk with kernel ridge regression. In particular, this allows to extend the framework to continuous losses defined in compact sets $\mathcal{Z},\mathcal{Y}$ where $\mathcal{H}$ can be infinite-dimensional \cite{ciliberto2016consistent}. \paragraph{Conditional Random Fields.} Recall that $r=\operatorname{dim}(\mathcal{M})$. CRFs correspond to \vspace{-2pt} \begin{equation}\label{eq:CRFloss} \mathcal{V}=\Rspace{r}, \quad S(v, y) = \textstyle \log(\sum_{y'\in\mathcal{Y}}\exp(\langle v, \phi(y')\rangle) - \langle v, \phi(y)\rangle. \end{equation} This is a loss of Legendre-type with $\mathcal{D}=\mathcal{M}$ and $h(u) = -\max_{q\in\operatorname{Prob}(\mathcal{Y})}\operatorname{Ent}(q) \quad\text{s.t}\quad \mu(q)=u$, where $\operatorname{Ent}(q)=-\sum_{y\in\mathcal{Y}}q(y)\log q(y)$ is the Shannon entropy of the distribution $q\in\operatorname{Prob}(\mathcal{Y})$ \footnote{Note that here, for simplicity, we do not consider the constant term $h(\phi(y))$ from \cref{eq:legendretypeloss}.}. In this case, the inverse of the link function $t^{-1}=\nabla h^*$ corresponds to performing marginal inference on the exponential family with sufficient statistics $\phi$. A well-known important drawback of CRFs is the fact that they are in general not calibrated to any specific loss. The reason being that inference in CRFs is done using MAP assignment, which corresponds to $\widehat{f}_{\operatorname{MAP}}(x) = \operatorname*{arg\; max}_{y\in\mathcal{Y}}~\langle\phi(y), \widehat{g}(x)\rangle$. It can be written in terms of $\nabla h^*$ as $\widehat{f}_{\operatorname{MAP}}(x) = \phi^{-1}\left(\lim_{\gamma\to\infty}\nabla h^*(\gamma \widehat{g}(x))\right)$ (see \cref{app:CRFs} for the computation), which is different from the decoding $d_{\psi,\nabla h}$ we propose: $\widehat{f}(x) = \operatorname*{arg\; min}_{z\in\mathcal{Z}}\langle\psi(z), \nabla h^*(\widehat{g}(x))\rangle$. Note that $\nabla h^*(\gamma \widehat{g}(x))$ converges to a vertex of $\mathcal{M}$ as $\gamma\to\infty$, while decoding $d_{\psi,\nabla h}$ partitions $\mathcal{M}$ into $|\mathcal{Z}|$ regions using $\psi$ and assigns a different output to each of those. With our proposed decoding, we can calibrate CRFs to any loss that decomposes with the cliques of the probabilistic model. For instance, for linear chains, the method consistently minimizes any loss that depends on the neighbors. Moreover, we can compute a lower bound on $\zeta_h$. \begin{proposition}[Calibration of CRFs]\label[proposition]{prop:calibrationCRFs} The calibration function of CRFs can be lower bounded as $$\zeta_h(\varepsilon) \geq \frac{\varepsilon^2}{8c_{\psi,\|\cdot\|_2}^2c_{\phi,\|\cdot\|_2}^2},$$ where $c_{\phi,\|\cdot\|_2}=\sup_{y\in\mathcal{Y}}\|\phi(y)\|_2$. \end{proposition} \subsection{Specific Problems}\label{sec:specificproblems} \paragraph{Binary Classification.} In this case $\mathcal{Z}=\mathcal{Y}=\{-1,1\}$. See \cref{ex:multiclassmultilabel} setting $k=2$ for the structure of the loss. We consider \emph{margin losses}, which are losses of the form $S(v, y) = \Phi(yv)$ with $\mathcal{V}=\Rspace{}$, where $\Phi:\Rspace{}\rightarrow\Rspace{}$ is a non-increasing function with $\Phi(0)=1$. The decoding simplifies to $d(v)=\operatorname{sign}(v)$. The logistic, exponential ($\mathcal{D}=[0,1]=\Delta_2$) and square ($\mathcal{D}=\Rspace{}\supsetneq\Delta_2$) margin losses are $\phi$-calibrated. The calibration function is $\zeta_h(\varepsilon) = h\left(\frac{1+\varepsilon}{2}\right)-h\left(\frac{1}{2}\right)$ \cite{bartlett2006convexity, scott2012calibrated}, where $h:\mathcal{D}\subset\Rspace{}\rightarrow\Rspace{}$ is the associated potential. \paragraph{Multiclass Classification.} In this case $\mathcal{Z}=\mathcal{Y}=\{1,\ldots,k\}$. See \cref{ex:multiclassmultilabel} for the structure of the loss. The \emph{one-vs-all method} corresponds to $S(v,y) = \Phi(v_y) + \sum_{j\neq y}^k\Phi(-v_j)$ with $\mathcal{V}=\Rspace{k}$. If the margin loss $\Phi(y_jv_j)$ is $\phi$-calibrated for binary classification with potential $\bar{h}:\bar{\mathcal{D}}\subset\Rspace{}\rightarrow\Rspace{}$, then $S$ is $\phi$-calibrated with $h:\mathcal{D}=\bar{\mathcal{D}}^k\subset\Rspace{k}\rightarrow\Rspace{}$ defined as $h(u)=\sum_{j=1}^k\bar{h}(u_j)$. Note that the marginal polytope is strictly included in $\mathcal{D}$: $\Delta_k\subsetneq[0,1]^k\subseteq\mathcal{D}$. The decoding can be simplified to $d(v) = \operatorname*{arg\; max}_{j\in[k]}~v_j$ and the calibration function has the form given by \cref{th:onevsallcalibration}. \begin{proposition}[One-vs-all calibration function]\label[proposition]{th:onevsallcalibration} Assume $\bar{h}''$ is non-decreasing in~$\bar{\mathcal{D}}\cap[1/2,+\infty)$. Then, the calibration function for the one-vs-all method is $\zeta_h(\varepsilon) = 2\cdot\zeta_{\bar{h}}(\varepsilon)$. \end{proposition} Note that the assumption on $\bar{h}''$ is met by the logistic, exponential and square binary margin losses. Another important example is the \emph{multinomial logistic} loss, which corresponds to \eqref{eq:CRFloss} for multiclass. In this case the decoding is also simplified to $d(v) = \operatorname*{arg\; max}_{j\in[k]}~v_j$, and $\zeta_h(\varepsilon)\geq \varepsilon^2/8$ by using strong convexity of the entropy w.r.t $\|\cdot\|_1$ norm on \cref{th:lowerboundcalibration}. \paragraph{Multilabel Classification.} In this case $\mathcal{Z}=\mathcal{Y}=\{-1,1\}^k$. See \cref{ex:multiclassmultilabel} for the structure of the loss. We consider \emph{independent classifiers}, which have the form: $S(v,y) = \sum_{j=1}^k\Phi(y_jv_j)$, with $\mathcal{V}=\Rspace{k}$. In this case the potential has the form $h(u)=\sum_{j=1}^k\bar{h}((u_j+1)/2)$, where $\bar{h}$ is the potential for the individual classifier. In this case $\mathcal{M}$ equals $\mathcal{D}$ for logistic and exponential classifiers, as they have $\bar{\mathcal{D}}=[0,1]$. The decoding is simplified to $d(v) = (\text{sign}(v_j))_{j=1}^k$ and the calibration function $\zeta_h$ can be computed exactly and it is linear in the number of labels $\zeta_h(\varepsilon)=k\cdot\zeta_{\bar{h}}(\varepsilon)$ (see \cref{prop:hammingcalibration} in \cref{app:multilabelclassification}). \paragraph{Ordinal Regression.} In this case $\mathcal{Z}=\mathcal{Y}=\{1,\ldots, k\}$ with an ordering: $1\prec\cdots\prec k$. We consider the absolute error loss function defined as $L(z,y) = |z-y|$. We analyze two types of surrogates, the \emph{all thresholds (AT)} \cite{lin2006large} and the \emph{cumulative link (CL)} \cite{mccullagh1980regression}, both studied by \cite{pedregosa2017consistency}. AT methods correspond to independent classifiers $S(v,y) = \sum_{j=1}^{k-1}\Phi(\phi_j(y)v_j)$ with $\mathcal{V}=\Rspace{k-1}$, where $\phi(y)=(2\cdot 1(y_j\geq j)-1)_{j=1}^{k-1}$. In this case, using results from the Hamming loss we show that $\zeta_h(\varepsilon)\geq (k-1)\cdot\zeta_{\bar{h}}(\varepsilon/(k-1))\sim\varepsilon^2/(k-1)$, where $\bar{h}$ is the potential for the individual classifier. CL methods, instead, are based on applying a link to the cumulative probabilities, and it can be shown that the associated potential is the negative entropy on the simplex in $k$ dimensions. Using the strong convexity of the entropy w.r.t the $\|\cdot\|_1$ norm, we can show that $\zeta_h(\varepsilon)\geq 1/8\cdot \varepsilon^2/(k-1)^2\sim\varepsilon^2/(k-1)^2$. In particular, this explains the experiment of Fig. 1 from \cite{pedregosa2017consistency}, where they provide empirical evidence that the calibration function for AT is larger than the one for CL, which they are not able to compute. \paragraph{Ranking with NDCG loss.} We provide guarantees for learning permutations with the NDCG loss. In this case, we recover the results from \cite{ravikumar2011ndcg}. \paragraph{Graph matching.} In graph matching, the goal is to map the nodes from one graph to another. In this case, the outputs are ``matchings'' (permutations) and the goal is to minimize the Hamming loss between permutations $L(\sigma, \sigma') = \frac{1}{m}\sum_{j=1}^m1(\sigma(j)\neq\sigma'(j)) = 1 - {\langle X_{\sigma},X_{\sigma'}\rangle_{F}}/{m}$, where $X_{\sigma}\in\Rspace{m\times m}$ is the permutation matrix associated to the permutation $\sigma$. In this case, $k=m^2$, the marginal polytope is the polytope of doubly stochastic matrices which has dimension $r=\operatorname{dim}(\mathcal{M})=k^2-2k+1$, and the decoding mapping corresponds to perform linear assignment. As CRFs are intractable in this case \cite{petterson2009exponential}, a common approach is to learn the probabilities of each row independently by casting this problem as $k$ multiclass problems (one for each row of the matrix). Doing multinomial logistic regression independently at each row corresponds to set $\mathcal{D}$ as the polytope of row-stochastic matrices, which strictly includes $\mathcal{M}$ and has dimension $k^2-k$. A direct application of \cref{th:lowerboundcalibration} gives $\zeta_h(\varepsilon) \geq {m^2\varepsilon^2}/{8}$. \subsection*{Acknowledgements} The first author was supported by La Caixa Fellowship. This work has been possible thanks to the funding from the European Research Council (project Sequoia 724063). We also thank David L\'opez-Paz for his valuable feedback.
\section{Introduction} Consider the following linear degenerate parabolic equation with delay \begin{equation}\label{equ:1} \begin{cases} y_t=\left(a(x) y_x\right)_x+b(t)y+c(t)y(t-h)+\mathbbm{1}_{\omega} u(t)\,\, \text{ on } Q\\ \mathbf{C}y=0 \hfill \text{ on }\quad \Sigma\\ y(0)=y_0 \hfill \text{ in }\quad (0,1)\\ y=\Theta \hfill \text{ in }\quad (0,1)_{-h} \end{cases} \end{equation} where $T>0$, $Q=(0,T)\times(0,1), \Sigma=(0,T)\times\{0,1\}$, the delay term $h>0, (0,1)_{-h}=(-h,0)\times(0,1)$, $\mathbbm{1}_{\omega}$ is the characteristic function of an open set $\omega\subset(0,1)$, $b,c \in L^{\infty}(Q)$, $y_0\in L^{2}(0,1)$, $\Theta\in L^2((0,1)_{-h})$ and $u\in L^2(Q)$. The function $a$ is a diffusion coefficient which degenerates at $0$ (i.e., $a(0)=0$) and we shall admit two types of degeneracy for $a$, namely weak and strong degeneracy. Indeed, $a$ can be either weak degenerate (WD), i.e., \begin{equation} \text{(WD)}\,\, \begin{cases} (i)\,\,a \in \mathcal{C}([0,1])\cup\mathcal{C}^1((0,1]),\, a>0 \text{ in }(0,1],\,a(0)=0,\\ (ii)\,\,\exists K\in[0,1)\text{ such that }xa'(x)\leqslant Ka(x), \;\,\forall x\in[0,1], \end{cases} \end{equation} or strong degenerate (SD), i.e., \begin{equation} \text{(SD)}\,\, \begin{cases} (i)\,\,a \in \mathcal{C}^1([0,1]),\, a>0 \text{ in }(0,1],\,a(0)=0,\\ (ii)\,\,\exists K\in[1,2)\text{ such that }xa'(x)\leqslant Ka(x)\,\forall x\in[0,1], \\ (iii)\begin{cases} \displaystyle\exists\theta\in(1,K], \,\, x\mapsto\frac{a(x)}{x^{\theta}}\text{ is nondecreasing near }0, \text{ if }K>1,\\ \displaystyle\exists\theta\in(0,1) ,\;\; x\mapsto\frac{a(x)}{x^{\theta}}\text{ is nondecreasing near }0, \text{ if }K=1. \end{cases} \end{cases} \end{equation} The boundary condition $\mathbf{C}y=0$ is either $y(t,0)=y(t,1)=0$ in the weak degenerate case (WD) or $y(t,1)=(ay_x)(t,0)=0$ in the strong degenerate case (SD). Approximate controllability of infinite-dimensional retarded linear systems has been studied in \cite{Nakagiri,Nakagiri&Yamamoto,Curt&Zwart}. Recently, Ammar-Khodja et al. gave in \cite{A5} the first null controllability result for retarded non degenerate parabolic equations with a localized in space control function. In the present paper we use the same technique as \cite{A5} to establish null controllability result for retarded degenerate parabolic equations with a localized in space control function. We give also a particular interest to degenerate parabolic problems with delay under a boundary control. Indeed, when the boundary control is exerted at the bound $x=1$, we show that our problem can be transformed into a parabolic degenerate problem with one delay parameter on a larger domain $(0,2)$, with a control interval located in $(1,2)$. In the sequel, if $\mathcal{O}$ is an open subset of $(0,1)$ and $r\in{\mathbb R}\setminus\{0\}$, we set \begin{equation*} \mathcal{O}_r=\begin{cases} (0,r)\times\mathcal{O} \quad\text{ if } r>0 \\ (r,0)\times\mathcal{O} \quad\text{ if } r<0. \end{cases} \end{equation*} This paper is concerned with the $L^2$ null controllability for system \eqref{equ:1} which we now recall. \begin{definition} System \eqref{equ:1} is said to be null controllable at time $T$. If for any $(y_0,\theta)\in L^2(0,1)\times L^2(-h,0, L^2(0,1))$ there exists a control $u\in L^2(Q)$ such that the associated solution $y$ to \eqref{equ:1} satisfies $y(T)=0$ in $(0,1)$. \end{definition} Like in the non degenerate case \cite{A5}, for a solution $y$ to \eqref{equ:1}, the property $y(t_0)=0$ in $(0,1)$ for some $t_0>0$ and $u\in L^2((0,t_0)\times(0,1)$ does not imply that $y(t)=0$ for $t>t_0$ even if we choose $u\equiv 0$ for $t>t_0$. Of course, this is due to the presence of the delay term in the equation. Indeed, let us introduce the function \begin{equation*} z(t,s,x)=y(t+s,x),\quad\,(t,s,x)\in (0,T)\times(0,1)_{-h}. \end{equation*} The equation \eqref{equ:1} can then be written as follow \begin{equation}\label{equ:2} \begin{cases} y_t=\left(a(x) y_x\right)_x+b(t)y+c(t)z_{|_{s=-h}}+\mathbbm{1}_{\omega} u(t)\,\, \text{ on } Q\\ z_t=\frac{\partial z}{\partial s} \hfill \,\, \text{ on } (0,T)\times(0,1)_{-h}\\ \mathbf{C}y=0 \hfill \text{ on }\quad \Sigma\\ y(0,\cdot)=y_0 \hfill \text{ in }\quad (0,1)\\ z_{|_{t=0}}=\theta \hfill \text{ in }\quad (0,1)_{-h}. \end{cases} \end{equation} Our first main result in this paper is the following. \begin{theorem}\label{mainresult} Let $T>0$. Assume that $b,c \in L^{\infty}(Q) $ and\\ \begin{equation}\label{equ:thm1} \displaystyle \lim\limits_{t\rightarrow T^{-}}(T-t)^{4}\ln\|c(t)\|_{(0,1)\setminus \overline{\omega}}=-\infty. \end{equation} Then, for any $(y_0,\theta)\in M_2=L^2(0,1)\times L^2((0,1)_{-h})$, there exists $u\in L^2((0,T)\times\omega )$ such that the associated solution of \eqref{equ:1} satisfies $y(T)=0$ in $(0,1)$. Moreover, the control $u$ can be chosen such that \begin{equation}\label{thm1equ:2} \|u\|_{L^2((0,T)\times\omega)} \leqslant C_T \|(y_0,\theta)\|_{M_2} \end{equation} for a positive constant $C_T$ depending only on $T$ and $\omega$. \end{theorem} In the nondegenerate case, the exponent of $(T-t)$ in the condition \eqref{equ:thm1} is 1, whereas in the degenerate case the right exponent is 4. This fact is due to the corresponding weighted functions used in Carleman estimates of degenerate parabolic equations. To establish Theorem \ref{mainresult}, we need to prove an observability inequality of the following adjoint problem associated to \eqref{equ:1}. \begin{equation}\label{equ:1adjoint} \begin{cases} -W_t=\left(a(x) W_x\right)_x+b(t)W+(\mathbbm{1}_{[0,T]}cW)(t+h) \hfill\text{ on } Q\\ \mathbf{C}W=0 \hfill \text{ on }\quad \Sigma\\ W(T,\cdot)=W_0 \hfill \text{ in }\quad (0,1). \end{cases} \end{equation} To this end, we use Carleman estimate established in \cite{BOU}. This paper is organized as follows. In section 2, we briefly recall the result concerning the well-posedness of problem \eqref{equ:1}. The proof of Theorem \ref{mainresult} is given in section 4. It relies on a so-called observability inequality, which we state in section 3, for the solutions of the adjoint problem \eqref{equ:1adjoint} associated to linear system \eqref{equ:1}. This result uses the global Carleman estimates \cite{FadiliManiar,benfama} that we recall in section 4. And finally Section 5 of this paper is devoted to the case of boundary control. All along the article, we use generic constants for the estimates, whose values may change from line to line. \section{Well-posedness} Likewise in \cite{A5} from results in Artola \cite{Artola}, we have the following wellposedness result. \begin{proposition}\label{pro1well} If $(y_0, \Theta,u)\in L^{2}(0,1)\times L^2((0,1)_{-h})\times L^2(Q)$ then there exists a unique solution $y\in L^2((-h,T)\times(0,1))$ of \eqref{equ:1} such that $$y\in L^2(0,T;H_a^1)\cap \mathcal{C}([0,T];L^2(0,1)),\quad\quad y_t\in L^2(0,T;H^{-1}) $$ and there exists $C_T>0$ which does not depend on $(y_0,\Theta,u)$ such that {\small \begin{equation*} \sup_{t\in[0,T]}\|y(t)\|^2_{L^2(0,1)}+\int_0^T\left( \| \sqrt{a} y_{x}\|^2_{L^2}+ \|y_t\|^2_{H^{-1}}\right)dt \leq C_T\left(\|y_0\|^2_{L^{2}(0,1)}+\|\Theta\|^2_{L^2((0,1)_{-h})}+ \|u\|^2_{L^2(Q)} \right) \end{equation*}} for a constant $C_T>0$.\\ Furthermore, if $(y_0, \Theta,u)\in H_a^1(0,1)\times L^2((0,1)_{-h})\times L^2(Q)$, this solution satisfies $$y\in L^2(0,T; H_a^2)\cap \mathcal{C}([0,T];H_a^1(0,1)),\quad\quad y_t\in L^2(0,T;L^{2}(0,1)) $$ and there exists $C_T>0$ which does not depend on $(y_0,\Theta,u)$ such that \begin{equation*} \sup_{t\in[0,T]}\|y(t)\|^2_{H^1_{a}} + \int_0^T\left( \| y_{t}\|^2_{L^2}+\|(a y_{ x})_x\|^2_{L^2} \right)dt \leq C_T \left(\| y_0\|^2_{H^1_a(0,1)}+\|\Theta\|^2_{L^2((0,1)_{-h})}+ \|u\|^2_{L^2(Q)} \right). \end{equation*} \end{proposition} \section{ Observability inequality} This section is devoted to characterize the null controllability of the linear system \eqref{equ:1}. \begin{proposition}\label{propo3.1} Let $T>0$, system \eqref{equ:1} is $L^2$ null controllable at time $T$ if and only if there exists a constant $C_T>0$ such that for any $W_0\in L^2(0,1)$, the solution of the backward linear system \eqref{equ:1adjoint} satisfies the estimate \begin{equation}\label{Obser:inequality} \int_{0}^{1}W^2(0)dx+ \int_{-h}^{0}\int_{0}^{1}|(cW\mathbbm{1}_{[0,\min\{h,T\}]})(s+h)|^2dx ds \leqslant C_T\int_{\omega_T}W^2dxdt. \end{equation} \end{proposition} As proved by Ammar-Khodja et al. \cite{A5} in the nondegenerate case, this result is a consequence of the two lemmas in the sequel. Indeed, we denote by $y^u$ the solution of \eqref{equ:1} which obtained for $y_0=0,\,\Theta =0$ and arbitrary $u\in L^2(Q)$, and let $y^{H}$ be the solution of \eqref{equ:1} associated with $u=0$ and arbitrary initial data $(y_0,\Theta)\in M_2=L^2(0,1)\times L^2((0,1)_{-h})$. For $T>0$, let us also introduce the following solution operators \begin{equation*} \begin{array}{llll}\\ S_T: & M_2 & \to & L^2(0,1)\\ & (y_0,\Theta)&\mapsto & S_T(y_0,\Theta)=y^{H}(T), \end{array} \end{equation*} and \begin{equation*} \begin{array}{llll}\\ L_T: & L^2(Q) & \to & L^2(0,1)\\ & u &\mapsto & L_Tu=y^{u}(T). \end{array} \end{equation*} From Proposition \ref{pro1well}, we infer that $S_T\in\mathcal{L}(M_2,L^2(0,1))$ and $L_T\in\mathcal{L}(L^2(Q),L^2(0,1))$. If $y$ is the solution of \eqref{equ:1} associated with $(y_0,\Theta,u)$, we have \begin{equation*} y(T)=S_T(y_0,\Theta)+L_Tu. \end{equation*} Therefore, with these notations, the $L^2$ null controllability property at time $T>0$ is equivalent to the following problem : \begin{equation} \text{ for all } (y_0,\Theta)\in M_2, \text{ find } u\in L^2(Q) \text{ such that } L_Tu=-S_T(y_0,\Theta). \end{equation} The last problem has a solution if and only if \begin{equation}\label{equ:3.3sec3} R(S_T)\subset R(L_T), \end{equation} where $ R(L)$ denote the range of the operator $L$.\\ Again, we recall the following well-known result due to Zabczyk (See \cite[Theorem 2.2, p. 208]{Zab}), \begin{lemma} Let $X,Y,Z$ be three Hilbert spaces, $X^{*},Y^{*},Z^{*}$ their dual spaces and $F\in\mathcal{L}(X,Z)$, $G\in\mathcal{L}(Y,Z)$. Assume that $Y$ is separable. Then $ R(F)\subset R(G)$ if and only if there exists a constant $C>0$ such that \begin{equation*} \|F^{*}z\|_{X^{*}}\leqslant C \|G^{*}z\|_{Y^{*}},\quad z \in Z^{*}, \end{equation*} where $F^{*}$ and $G^{*}$ are the adjoint operators. \end{lemma} Now assume that $X=M_2$, $Y=L^2(Q)$, $Z=L^2(0,1)$, $F=S_T$ and $G=L_T$. Then, the inclusion \eqref{equ:3.3sec3} is equivalent to \begin{equation*} \|S_T^{*}y_0\|_{M_2}^2\leqslant C_T \|L_T^{*}y_0\|_{L^2(Q)}^2,\quad y_0 \in L^2(0,1), \end{equation*} where $C_T>0$ does not depend on $y_0$. \begin{lemma}\label{lem3.3} Let $W_0\in L^2(0,1)$ and $W$ be the associated solution of \eqref{equ:1adjoint}. Then \begin{equation}\label{lemequa:3.4} S_T^{*}W_0=\Big(W(0),(cW\mathbbm{1}_{[0,\min\{h,T\}]})(\cdot+h)\Big),\,\, L_T^{*}W_0=\mathbbm{1}_{\omega}W. \end{equation} \end{lemma} \begin{proof} Let $y$ be the solution of \eqref{equ:1} associated with $(y_0,\Theta,u)\in M_2\times L^2(Q)$ and $W$ be the solution of \eqref{equ:1adjoint} associated with $W_0$. Multiplying the equation of \eqref{equ:1} by $W$ and integrating over $Q$ yields the equality {\small \begin{equation}\label{equ:3.5} \int_{0}^{T}\int_{0}^{1}y_tW=\int_{0}^{T}\int_{0}^{1}(a(x) y_x)_xW+\int_{0}^{T}\int_{0}^{1}b(t)yW+\int_{0}^{T}\int_{0}^{1}c(t)Wy(t-h)+\int_{0}^{T}\int_{0}^{1}W\mathbbm{1}_{\omega} u(t). \end{equation} } Otherwise, by integrating by parts we have \begin{equation} \int_{0}^{T}\int_{0}^{1}y_tWdx dt=\int_{0}^{1}(y(T)W_0-y_0W(0))dx-\int_{0}^{T}\int_{0}^{1}yW_tdx dt. \end{equation} Since $\displaystyle -W_t=\left(a(x) W_x\right)_x+b(t)W+(cW\mathbbm{1}_{[0,T]})(t+h)$. Thus \eqref{equ:3.5} becomes \begin{equation*} \int_{0}^{1}(y(T)W_0-y_0W(0))dx+\int_{0}^{T}\int_{0}^{1}y(cW\mathbbm{1}_{[0,T]})(t+h) = \int_{0}^{T}\int_{0}^{1}c(t)Wy(t-h)+\int_{0}^{T}\int_{0}^{1}W\mathbbm{1}_{\omega} u(t). \end{equation*} If $T>h$ : \begin{align*} \int_{0}^{T}c(t)Wy(t-h)&=\int_{0}^{h}c(t)Wy(t-h)+\int_{h}^{T}c(t)Wy(t-h)\\ &= \int_{-h}^{0}\Theta(t)(cW\mathbbm{1}_{[0,h]})(t+h)+\int_{0}^{T}y(cW\mathbbm{1}_{[0,T]})(t+h). \end{align*} If $T<h$ : \begin{align*} \int_{0}^{T}c(t)Wy(t-h)&=\int_{-h}^{0}\Theta(t)(cW\mathbbm{1}_{[0,T]})(t+h). \end{align*} We can summarize these two cases writing \begin{align}\label{equa:3.7} \int_{0}^{T}c(t)Wy(t-h)&=\int_{-h}^{0}\Theta(t)(cW\mathbbm{1}_{[0,\min\{h,T\}]})+\int_{0}^{T} y(cW\mathbbm{1}_{[0,T]})(t+h). \end{align} Thus, we deduce from \eqref{equa:3.7} that \small{ \begin{equation} \langle S_T(y_0,\Theta)+ L_Tu,W_0\rangle_{L^2(0,1)} = \Big\langle (y_0,\Theta),\big(W(0),(cW\mathbbm{1}_{[0,\min\{h,T\}]})(\cdot+h)\big) \Big\rangle_{M_2}+ \int_{0}^{T}\int_{0}^{1}W\mathbbm{1}_{\omega} u(t). \end{equation} } Taking successively $(y_0,\Theta)=(0,0)$ and $u=0$ in this last identity leads to \eqref{lemequa:3.4}. \end{proof} \section{ Null controllability} In this section we give the proof of the main result. Meanwhile let us recall and establish the following results. Indeed taking into account Carleman estimates established in \cite{hjjaj, FadiliManiar, benfama}, and consider the following equation \begin{equation}\label{equ:4.1} \begin{cases} z'+\mathcal{M}z + b z=f \qquad\hfill \text{ in } (\varsigma,\varsigma+l)\times(0,1)\\ \mathbf{C} z=0 \qquad \hfill \text{ in } (\varsigma,\varsigma+l)\times\{0,1\}\\ z(\varsigma+l)=z_0 \qquad\hfill \text{ in }(0,1), \end{cases} \end{equation} with $f\in L^2((\varsigma,\varsigma+l)\times(0,1))$, $b\in L^{\infty}((\varsigma,\varsigma+l)\times(0,1))$, $z_0\in L^2(0,1)$ and $l$, $\varsigma$ are real numbers such that $l>0$. By using the interval $(\varsigma,\varsigma+l)$ instead of the interval $(0,T)$ in the Propositions 3.4 and 3.5 \cite{FadiliManiar}, the weighed functions become as follow \begin{equation}\label{poids4.4} \begin{array}{lll} \displaystyle \theta(t)=\frac{1}{(t-\varsigma)^4(\varsigma+l-t)^4} &\displaystyle \psi(x)=\lambda\left(\int_0^x\frac{y}{a(y)}dy-d\right)&\displaystyle \varphi(t,x)=\theta(t)\psi(x),\\ \displaystyle \Phi(t,x)=\theta(t)\Psi(x) & \displaystyle \Psi(x)=\left(e^{\rho\sigma(x)} -e^{2\rho{\parallel\sigma\parallel}_{\infty}} \right) & \end{array} \end{equation} with $\sigma$ is a function in $\mathcal{C}^2([0,1])$ satisfying $\sigma(x)>0$ in $(0,1)$ , $\sigma(0)=\sigma(1)=0$ and $\sigma_{x}\neq 0$ in $[0,1]\setminus \tilde{\omega}$ for some open $\tilde{\omega}\Subset\omega$, $\displaystyle c_0=\int_0^1\frac{x}{a(x)}dx$ and $d>4c_0$. Thus, applying the previous propositions (with $\tau=0$) to \eqref{equ:4.1}, wet get the following result. \begin{theorem}\label{Theorem4.1} Let $\omega\subset (0,1)$ be a non empty subset. Then there exist two positive constants $C$ and $s_0$ such that for every $(z_0,f)\in L^2(0,1)\times L^2((\varsigma,\varsigma+l)\times(0,1))$ the solution $z$ of \eqref{equ:4.1} satisfies \begin{multline}\label{equ:theo4.1} \int_{\varsigma}^{\varsigma+l}\!\!\!\!\int_{0}^{1}\big(s\theta a(x)z_x^2+(s\theta)^{3}\frac{x^2}{a(x)}z^2\big)e^{2s\varphi}dx dt\\\leqslant C\Big(\int_{\varsigma}^{\varsigma+l}\!\!\!\!\int_{0}^{1}f^2e^{2s\Phi}dx dt + \int_{\varsigma}^{\varsigma+l}\!\!\!\!\int_{\omega}(s\theta)^{3}z^2 e^{2s\Phi} dx dt\Big) \end{multline} for all $s>s_0$. \end{theorem} Therefore, we get the following lemma as a consequence. \begin{lemma}\label{lem4.2} Let $T>0$ and $T_h=\max(0,T-h)$ and assume $b,c\in L^{\infty}((0,T)\times(0,1))$. Then, there exist positive constants $C$, $s_0$ such that for any $W_0\in L^2(0,1)$, the associated solution $\varphi$ to \eqref{equ:1adjoint} satisfies \begin{equation}\label{equ:lem4.2} \int_{T_h}^{T}e^{-2sM\theta}\int_{0}^{1} W^2\,dx\,dt \leqslant Cs^{3} \int_{T_h}^{T}\!\!\!\!\int_{\omega}W^2 dx dt \end{equation} for all $s>s_0$, where $\displaystyle \theta(t)=\frac{1}{(t-T_h)^4(T-t)^4}$ and $M =\underset{x\in (0,1)}{\max}|\psi(x)|$ (the function $\psi$ is defined in \eqref{poids4.4}) . \end{lemma} \begin{proof} On $(T_h,T)\times(0,1)$, the solution $W$ of \eqref{equ:1adjoint} satisfies \begin{equation*} \begin{cases} W^\prime + \mathcal{M}W=-bW \hfill \quad\text{ in } (T_h,T)\times(0,1)\\ \mathbf{C}W=0 \hfill\quad \text{ in } (T_h,T)\times\{0,1\}. \end{cases} \end{equation*} Applying \eqref{equ:theo4.1} with $\varsigma=T_h$, $l=T-T_h$, we get \begin{equation*} \int_{T_h}^{T}\!\!\!\!\int_{0}^{1}\big(s\theta a(x)W_x^2+s^{3}\theta^{3}\frac{x^2}{a(x)}W^2\big)e^{2s\varphi}dx dt\leqslant C\Big( \int_{T_h}^{T_h}\!\!\!\!\int_{\omega}s^{3}\theta^{3}W^2 e^{2s\Phi} dx dt\Big) \end{equation*} for all $s>s_0$, where $\varphi$ and $\Phi$ as in \eqref{poids4.4}. On the other hand, we have \begin{align*} \int_0^1 W^2\,dx\,dt & = \int_0^1 \Big( \frac{a^{1/3}}{x^{2/3}}W^2 \Big)^{3/4}\Big( \frac{x^2}{a}W^2\Big)^{1/4}\,dx\,dt \\~~ & \leqslant \frac32 \int_0^1 \frac{a^{1/3}}{x^{2/3}}W^2\,dx\,dt + \frac{1}{2} \int_0^1 \frac{x^2}{a}W^2 \,dx\,dt. \end{align*} The function $p(x):= x^{\frac{4}{3}} a^{\frac{1}{3}}$ satisfies $\displaystyle p(x)\leqslant C a(x)$, since the function $\displaystyle x\longmapsto \frac{x^2}{a}$ is nondecreasing on $(0,1)$. Hence, by Hardy-Poincar\'e inequality \cite[Proposition 2.1]{BOU}, one has \begin{equation}\label{equ:C_{HP}} \int_0^1\frac{a^{\frac{1}{3}}}{x^{\frac{2}{3}}} W^2 dx =\int_0^1 \frac{p(x)}{x^2}W^2 dx \leqslant C \int_0^1 \frac{a(x)}{x^2}W^2 dx \leqslant C \int_0^1 a(x)W_x^2 dx, \end{equation} and so \begin{align}\label{equ:3.32} \int_{T_h}^{T}\!\!\!\!\int_{0}^{1} W^2\,dx\,dt &\leqslant C\int_{T_h}^{T}\!\!\!\!\int_{0}^{1} \Big( aW_x^2 +(s\theta)^{3}\frac{x^2}{a}W^2 \Big)dx\,dt. \end{align} Since $M =\underset{x\in (0,1)}{\max}|\psi(x)|$ and $\theta\geq\theta(\frac{T+T_h}{2})$, we get from the previous inequality \begin{align*} \int_{T_h}^{T}e^{-2sM\theta}\int_{0}^{1} W^2\,dx\,dt&\leqslant C\int_{T_h}^{T}e^{-2sM\theta}\int_{0}^{1} \Big( aW_x^2 +(s\theta)^{3}\frac{x^2}{a}W^2 \Big)dx\,dt\\ &\leqslant C\int_{T_h}^{T}\int_{0}^{1} \Big( aW_x^2 +(s\theta)^{3}\frac{x^2}{a}W^2 \Big)e^{2s\varphi}dx\,dt\\ &\leqslant C\Big( \int_{T_h}^{T}\!\!\!\!\int_{\omega}s^{3}\theta^{3}W^2 e^{2s\Phi} dx dt\Big). \end{align*} Seeing that $\displaystyle\lim\limits_{t\to\{T_h^{+},T^{-}\}}\theta^{3}(t) e^{2s\Phi}=0$, there exists a positive constant $C>0$ such that $$\displaystyle \int_{T_h}^{T}\!\!\!\!\int_{\omega}s^3\theta^3 W^2 e^{2s\Phi} dx dt\leqslant Cs^3\int_{T_h}^{T}\!\!\!\!\int_{\omega}W^2 dx dt. $$ Thus, we infer the estimate \eqref{equ:lem4.2}. \end{proof} The following monotonicity argument is of great utility to establish observability estimate, the proof is similar to that one given in \cite{A5}. \begin{lemma}\label{lem4.3} Let \begin{equation}\label{equ:lem4.3hyp} K=5+2\|b\|_{\infty}+\|c\|_{\infty}. \end{equation} Then, for any $W$ satisfying equation \eqref{equ:1adjoint}, the function \begin{equation}\label{equ:lem4.3} E(t)=e^{K t}\Big(\int_{0}^{1} W^2(t)dx+\int_{0}^{1}\int_{t}^{t+\min\{h,T\}}(cW\mathbbm{1}_{[0,T]})^2(s)dsdx \Big)\,,\,\,\, t\in [0,T] \end{equation} is non decreasing. \end{lemma} \begin{proof} At first, let us consider a smooth data $W_0\in H^1_a(0,1)$ and set $$m=\min\{h,T\},\,\,\psi=cW\mathbbm{1}_{[0,T]}$$ and $$E_1=\int_{0}^{1}W^2(t)dx+\int_{0}^{1}\int_{t}^{t+m}\psi^2(t)dx. $$ Differentiating $E_1$ with respect to $t$ gives \begin{equation}\label{equ:4.7} E_1^\prime (t)=\Big(2 \int_{0}^{1} WW^\prime (t) dx+\int_{0}^{1}\psi^2(t+m)-\psi^2(t) dx\Big). \end{equation} Thus, using \eqref{equ:1adjoint} we get \begin{align*} 2 \int_{0}^{1} WW^\prime (t) dx&= 2 \int_{0}^{1} -W\Big((a(x) W_x)_x+b(t)W+(cW\mathbbm{1}_{[0,T]})(t+h) \Big) dx\\ &= 2 \int_{0}^{1}a(x) W_x^2-b(t)W^2-W(cW\mathbbm{1}_{[0,T]})(t+h) dx\\ &= 2 \int_{0}^{1}a(x) W_x^2-b(t)W^2-W\psi(t+m) dx.\numberthis\label{equ:4.8} \end{align*} The last equality comes from the fact that, either $h\geq T $ and then $\psi(t+h)=(cW\mathbbm{1}_{[0,T]})(t+h)=0$ on $(0,T)$, or $h<T$ and then $m=h$. From \eqref{equ:4.7}-\eqref{equ:4.8} and Young’s inequality \begin{align*} K E_1(t)+E_1^\prime(t)&= K\Big(\int_{0}^{1}W^2(t)dx+\int_{0}^{1}\int_{t}^{t+m}\psi^2(t)dx\Big)+2 \int_{0}^{1}a(x) W_x^2-b(t)W^2-W\psi(t+m)\\ &\qquad + \int_{0}^{1}\psi^2(t+m)-\psi^2(t)\\ &\geqslant (K-2\|b\|_{\infty}-\|c\|_{\infty}-4)\int_{0}^{1}W^2(t)dx \frac{3}{4}\int_{0}^{1}\psi^2(t+m). \end{align*} Since $E^\prime(t) = e^{Kt}\big(KE_1(t) + E_1^\prime(t))$ and $K-2\|b\|_{\infty}-\|c\|_{\infty}-4=1$, we see that $E^\prime>0$ on $(0,T)$ and using then a density argument, we get the result for any $W_0\in L^2(0,1)$. \end{proof} The following intermediate estimate is also of great interest. \begin{lemma}\label{lem4.4} Under the hypotheses of Lemma \ref{lem4.2} and Lemma \ref{lem4.3}, assume moreover that $c$ satisfies \eqref{equ:thm1}. Then for any $T>0$, there exists a constant $C_T=C_T (\omega,\|b\|_{\infty},\|c\|_{\infty},T,h) > 0$ such that any solution of \eqref{equ:1adjoint} satisfies \begin{equation} \int_{0}^{1} W^2(0)dx+ \int_{-h}^{0}\int_{(0,1)}|(cW\mathbbm{1}_{[0,\min\{h,T\}]})(s+h)|^2dx ds \leqslant C\int_{\omega_T}W^2dxdt. \end{equation} \end{lemma} \begin{proof} From Lemma \ref{lem4.2}, for $\nu=\frac{T-T_h}{4}$, we have $$ \int_{T_h+\nu}^{T}e^{-2sM\theta}\int_{0}^{1} W^2\,dx\,dt \leqslant Cs^{3} \int_{T_h+\nu}^{T}\!\!\int_{\omega}W^2 dx dt. $$ Using the energy $E$ defined in \eqref{equ:lem4.3}, we can write \begin{align*} \int_{T_h+\nu}^{T}&e^{-2sM\theta-Kt} E(t)dt=\int_{T_h+\nu}^{T}e^{-2sM\theta-Kt} e^{K t}\Big(\int_{0}^{1} W^2(t)dx +\int_{0}^{1}\int_{t}^{t+\min\{h,T\}}(cW\mathbbm{1}_{[0,T]})^2(s)dsdxdt\Big) \\ &=\int_{T_h+\nu}^{T}e^{-2sM\theta}\int_{0}^{1} W^2(t)dx +\int_{T_h+\nu}^{T}e^{-2sM\theta}\int_{0}^{1}\int_{t}^{t+\min\{h,T\}}(cW\mathbbm{1}_{[0,T]})^2(s)dsdxdt \\ &\leqslant Cs^{3} \int_{T_h+\nu}^{T}\!\!\!\!\int_{\omega}W^2 dx dt +\underset{I}{\underbrace{\int_{T_h+\nu}^{T}e^{-2sM\theta}\int_{0}^{1}\int_{t}^{t+\min\{h,T\}}(cW\mathbbm{1}_{[0,T]})^2(s)dsdxdt}}.\numberthis\label{pr:4.13} \end{align*} The hypothesis \eqref{equ:thm1} is equivalent to the following : for any $r>0$, there is $\delta> 0$ such that \begin{equation*} \|c(t)\|_{L^{\infty}((0,1)\setminus \overline{\omega})}\leqslant e^{-\frac{r}{(T-t)^4}},\,\, t\in (T-\delta,T). \end{equation*} Thus, we have \begin{equation*} \|c(t)\|_{L^{\infty}((0,1)\setminus \overline{\omega})}\leqslant (1+e^{\frac{r}{\delta^4}}\|c\|_{\infty})e^{-\frac{r}{(T-t)^4}},\,\, t\in (T_h,T). \end{equation*} Whence, choosing $s$ sufficiently large such that $e^{-2sM\theta}<1$ on $(0,T)\times(0,1)$, we have \begin{align*} I &\leqslant \int_{T_h+\nu}^{T}e^{-2sM\theta}dt\int_{T_h+\nu}^{T}\Big(\int_{(0,1)\setminus\overline{\omega}}(cW)^2(s)dx+\int_{\omega}(cW)^2(s)dx\Big)ds \\ &\leqslant 3C_0\nu \Big(\int_{T_h+\nu}^{T}e^{\frac{-2r}{(T-t)^4}} \int_{0}^{1} W^2 dxdt +\|c\|_{\infty}^2\int_{\omega_T}W^2dxdt \Big), \numberthis\label{equ:4.15} \end{align*} with $C_0=(1+e^{\frac{r}{{\delta}^4}}\|c\|_{\infty})^2$, since $\nu=(T-T_h)/4$. Now, for $t\in [T_h+\nu,T]$ and $r>0$ such that \begin{equation}\label{pr:4.17} r\geqslant \frac{sM}{(\nu)^4}, \end{equation} we have $$ \displaystyle e^{-2sM\theta}=e^{\frac{-2sM}{(t-T_h)^4(T-t)^4}}\geqslant e^{\frac{-2sM}{\nu^4(T-t)^4}} \geqslant e^{\frac{-2r}{(T-t)^4}}. $$ Thus, going back to \eqref{equ:4.15}, taking into account \eqref{equ:lem4.2} in Lemma \ref{lem4.2}, we infer \begin{align*} I &\leqslant 3C_0\nu \Big(\int_{T_h+\nu}^{T}e^{\frac{-2r}{(T-t)^4}} \int_{0}^{1} W^2 dxdt +\|c\|_{\infty}^2\int_{\omega_T}W^2dxdt \Big) \\ &\leqslant 3C_0\nu \Big(\int_{T_h+\nu}^{T}e^{-2sM\theta} \int_{0}^{1} W^2 dxdt +\|c\|_{\infty}^2\int_{\omega_T}W^2dxdt \Big) \\ &\leqslant 3C_0\nu \Big( Cs^{3} \int_{T_h}^{T}\!\!\!\!\int_{\omega}W^2 dx dt +\|c\|_{\infty}^2\int_{\omega_T}W^2dxdt \Big) \\ &\leqslant 3C_0\nu \Big( Cs^{3} +\|c\|_{\infty}^2\Big)\int_{\omega_T}W^2dxdt. \numberthis\label{equ:4.20} \end{align*} With this last inequality, \eqref{pr:4.13} becomes \begin{equation}\label{} \int_{T_h+\nu}^{T}e^{-2sM\theta-Kt} E(t)dt \leqslant C\Big(1+3C_0\nu ( Cs^{3} +\|c\|_{\infty}^2)\Big)\int_{\omega_T}W^2dxdt. \end{equation} Now, from Lemma \ref{lem4.3}, we get from this last estimate \begin{align*} \Big( \int_{T_h+\nu}^{T-\nu}e^{-2sM\theta-Kt} dt \Big)E(0)&\leqslant \Big( \int_{T_h+\nu}^{T}e^{-2sM\theta-Kt} dt \Big)E(0)\\ &\leqslant \int_{T_h+\nu}^{T}e^{-2sM\theta-Kt}E(t) dt \\ &\leqslant C\Big(1+3C_0\nu ( Cs^{3} +\|c\|_{\infty}^2)\Big)\int_{\omega_T}W^2dxdt. \end{align*} Since $\displaystyle\theta(T_h-\nu)=\theta(T+\nu)=\frac{4^8}{3^4(T-T_h)^8}$ and $\displaystyle \theta(t)\leqslant \theta(T-\nu), \;t\in [T_h+\nu,T-\nu]$, we deduce \begin{align*} \int_{T_h+\nu}^{T-\nu}e^{-2sM\theta-Kt} dt&\geqslant\frac12(T-T_h)e^{-2sM\theta(T-\nu)-K(T-\nu)} \\ \displaystyle &\geqslant \frac12(T-T_h)e^{-\frac{2^{17}sM}{3^4(T-T_h)^8}-KT}. \end{align*} Thus, choosing $s$ large enough in \eqref{equ:lem4.2}, one has \begin{equation} E(0)\leqslant \frac{ 2C\Big(1+3C_0\nu ( Cs^{3} +\|c\|_{\infty}^2)\Big)}{(T-T_h)}e^{\frac{2^{17}sM}{3^4(T-T_h)^8}+KT}\int_{\omega_T}W^2dxdt. \end{equation} Therefore, to conclude the proof, observe that \begin{align*} \int_{-h}^{0}\int_0^1|(cW\mathbbm{1}_{[0,\min\{h,T\}]})(s+h)|^2dx ds &\leqslant \int_0^1 \int_{-h}^{\min\{h,T\}-h}|(cW)(s+h)|^2dx ds\\ &\leqslant \int_0^1 \int_{0}^{\min\{h,T\}}|(cW)(s)|^2dx ds. \end{align*} Since \begin{equation*} E(0)=\int_{0}^{1} W^2(0)dx+\int_{0}^{1}\int_{0}^{\min\{h,T\}}(cW\mathbbm{1}_{[0,T]})^2(s)dsdx \end{equation*} it follows that \begin{align*} \int_{0}^{1} W^2(0)dx+ \int_{-h}^{0}&\int_0^1|(cW\mathbbm{1}_{[0,\min\{h,T\}]})(s+h)|^2dx ds\\ &\qquad\leqslant \frac{ 2C\Big(1+3C_0\nu ( Cs^{3} +\|c\|_{\infty}^2)\Big)}{(T-T_h)}e^{\frac{2^{17}sM}{3^4(T-T_h)^8}+KT}\int_{\omega_T}W^2dxdt. \end{align*} The conclusion follows by taking equalities in \eqref{pr:4.17} and \eqref{equ:lem4.2}, replacing then $K$ (see \eqref{equ:lem4.3hyp}) and $s$ by their values, which completes the proof. \end{proof} \begin{proof}[Proof of Theorem \ref{mainresult}] From Proposition \ref{propo3.1}, the system \eqref{equ:1} is null controllable if and only if every solution $W$ of its adjoint system \eqref{equ:1adjoint} satisfies the estimate \eqref{Obser:inequality}. Assume that $c$ satisfies \eqref{equ:thm1} and thanks to Lemma \ref{lem4.4} we get the estimate \eqref{Obser:inequality}. This completes the proof. \end{proof} \section{Boundary control} Now, let us consider the following boundary controlled degenerate delay equation \begin{equation}\label{bord:1} \begin{cases} y_t=\left(a(x) y_x\right)_x+b(t)y+c(t)y(t-h) \,\, \text{ on } Q\\ \begin{cases} y(t,0)=0, \text{ for (WD)}\\ (ay_x)(t,0)=0, \text{ for (SD)}\\ \end{cases}\quad\text{ on }\hfill (0,T)\\ y(t,1)=h(t)\hfill t\in (0,T)\\ y(0,\cdot)=y_0 \hfill \text{ in }\quad (0,1)\\ y=\Theta \hfill \text{ in }\quad (0,1)_{-h}, \end{cases} \end{equation} where the control is acting at the point $x=1$, in which the diffusion coefficient $a$ do not vanish. We have the following result. \begin{theorem} Assume that Hypothesis \eqref{equ:thm1} is satisfied. Then for any $(y_0,\theta)\in M_2=L^2(0,1)\times L^2((-h,0)\times(0,1))$, there exists a control $h\in L^2((0,T))$ such that the associated solution of \eqref{bord:1} satisfies $y(T)=0$ in $(0,1)$. \end{theorem} \begin{proof} Since the control is acting on $x=1$, we use the same technique as in \cite{BOU} consisting to transform the boundary control problem \eqref{bord:1} into the following distributed control problem \begin{equation}\label{bord:2} \begin{cases} \tilde{y}_t=\left(\tilde{a}(x) \tilde{y}_x\right)_x+\tilde{b}(t)\tilde{y}+\tilde{c}(t)\tilde{y}(t-h)+\mathbbm{1}_{\omega} u(t)\,\, \text{ on } (0,T)\times(0,2)\\ \begin{cases} \tilde{y}(t,0)=0, \text{ for (WD)}\\ (\tilde{a}\tilde{y}_x)(t,0)=0, \text{ for (SD)}\\ \end{cases}\quad\text{ on }\hfill (0,T)\\ \tilde{y}(t,2)=0 \quad \hfill\text{ on }\hfill (0,T)\\ \tilde{y}(0,\cdot)=\tilde{y}_0 \hfill \text{ in }\quad (0,2)\\ \tilde{y}=\tilde{\Theta} \hfill \text{ in }\quad (0,2)_{-h} \end{cases} \end{equation} \begin{center} \begin{tikzpicture} \draw[-] (0,0) --(10,0); \node[] at (0,0) {$\bullet$}; \node[] at (10,0) {$\mid$}; \node[] at (5,0) {$\mid$}; \node[below=8pt] at (0,0) {$0$}; \node[below=8pt] at (10,0) {$2$}; \node[below=8pt] at (5,0) {$1$}; \node[] at (7,0) {$($}; \node[] at (9,0) {$)$}; \node[below=8pt] at (8,0) {$\omega$}; \foreach \xp in {7.1,7.2,...,8.9}{\node[] at (\xp,0) {/};} \end{tikzpicture} \end{center} where $\omega\subset\subset (1,2)$, and $$\tilde{a}(x)=\begin{cases} a(x),\hfill x\in [0,1]\\ a(1),\hfill x\in (1,2] \end{cases},\hfill\tilde{b}(t,x)=\begin{cases} b(t,x),\hfill x\in [0,1]\\ 0,\hfill x\in (1,2] \end{cases},\hfill\tilde{c}(t,x)=\begin{cases} c(t,x),\hfill x\in [0,1]\\ 0,\hfill x\in (1,2], \end{cases}$$ $$\tilde{y}_0(x)=\begin{cases} y_0(x),\hfill x\in [0,1]\\ 0,\hfill x\in (1,2] \end{cases},\hfill\tilde{\Theta}(t,x)=\begin{cases} \Theta(t,x),\hfill x\in [0,1]_{-h}\\ 0,\hfill x\in (1,2]_{-h}. \end{cases}$$ It is not difficult to see that the assumption \eqref{equ:thm1} implies $\displaystyle \displaystyle \lim\limits_{t\rightarrow T^{-}}(T-t)^{4}\ln\|\tilde{c}(t)\|_{(0,2)\setminus \overline{\omega}}=-\infty$. Therefore, we apply Theorem \ref{mainresult} to the system \eqref{bord:2}. The right boundary control for \eqref{bord:1} is then defined by $h(t)=\tilde{y}(t,1)$. \end{proof} \bibliographystyle{plain}
\section{Introduction} The discovery of massive neutrinos by Super-Kamiokande experiment \cite{skam} in the year 1998 has paved the way for new physics beyond the Standard Model (BSM) of particle physics. Various neutrino oscillation experiments in the last two decades have measured the three neutrino mixing angles and two (atmospheric $|\Delta m_{23}^2|$ and solar $\Delta m_{21}^2$) mass splittings rather precisely. However, several anomalies at Short Base Line (SBL) neutrino experiments indicate $eV$ scale mass splitting. These anomalies were first reported by LSND experiment \cite{lsnd} in their anti-neutrino flux measurements and, subsequently, confirmed by MiniBooNE experiment \cite{miniboone} in both the neutrino and antineutrino modes. The recent MiniBooNE data \cite{miniboone2} also support these anomalies. In addition, reactor experiments \cite{reactor} and gallium solar neutrino experiments \cite{gallium} strongly support these anomalies. A possible explanation of these anomalies would require, at least, one $eV$ scale mass eigenstate in the neutrino sector and the decay width of Z boson would require the fourth neutrino state to be sterile. The recent global analysis \cite{mona} of neutrino oscillations in the presence of eV-scale sterile neutrinos, supports the explanation of reactor anomaly in terms of sterile neutrino oscillations in 3+1 scenario but disfavour sterile neutrino explanation of LSND anomaly. Reactor neutrino data favour sterile neutrino oscillation with $\Delta m_{41}^{2} \approx$ 1.3eV$^2$ and $|U_{e4}|\approx 0.1$ at the $3\sigma$ confidence level (CL)\cite{gariazzo, mona}.\\ The recent Planck data \cite{planck} limit the effective number of relativistic degrees of freedom to $N_{eff}=3.15\pm0.23$ (Planck TT+lowP+BAO) at $95\%$ CL and the sum of neutrino masses to be $\sum m_{\nu}\leq0.23$ eV at the same confidence level. This is consistent with the bound given by the standard model of cosmology: $N_{eff}=3.046$. Although the cosmological bounds and latest Planck data disfavour the existence of $eV$ scale sterile neutrinos, this apparent conflict can be resolved by considering the presence of new BSM physics . In this context it has been proposed \cite{tang} that suppressed effective mixing can lead to a decrease of $N_{eff}$ if sterile neutrinos have self-interactions and the presence of additional gauge interactions can suppress the production of sterile neutrinos via flavor oscillations \cite{tram,das}. Therefore, there is still possibility for the existence of eV scale sterile neutrinos. Also, from the theoretical standpoint, the sterile neutrinos could be the obvious candidates for right-handed neutrinos in the Standard Model of particle physics.\\ Super-Kamiokande has provided upper bounds on sterile neutrino parameters $|U_{\mu4}|^{2}<0.041$ and $|U_{\tau 4}|^{2}<0.18$ at $90\%$ CL \cite{skc}. The recent data from reactor and other short and long baseline neutrino experiments such as MINOS\cite{minos}, Daya Bay\cite{daya} etc. provide new bounds on active-sterile mixing and $\Delta m_{41}^2$. Several ongoing and future long baseline experiments such as DUNE\cite{dune}, T2HK\cite{t2hk}, T2HKK\cite{t2hkk} etc. may shed more light on neutrino oscillation physics and explore active-sterile mixing. The phenomenology and experimental constraints on (3+1) neutrinos have been reviewed in \cite{kang,kyu,daijiro,ivan,leonard,diaz,kopp,li,parke,giunti,liu,gupta,tarak,rode,maria,zang,common,hong,diana,deba,model}.\\ The obvious next step is to build models that can give predictions on some neutrino parameters including the active-sterile non-trivial mixing and mass splitting of the order of $eV$ scale as indicated by recent neutrino oscillation experiments. A four neutrino (3+1) scheme for explaining neutrino masses and mixing has large number of free parameters. Models with flavor symmetries can lead to specific structures of neutrino mass and mixing matrix with reduced number of free parameters. Neutrino models based on flavor symmetries have been extensively employed to explain the mixing matrix within the three neutrino framework. In lepton mass models, the residual flavor symmetries may remain intact even if the original flavor symmetry of the Lagrangian is broken. These different residual symmetries lead to different mixing matrices for the charged lepton and neutrino sectors. Neutrino mixing matrices based on residual flavor symmetries viz. tribimaximal mixing (TBM) \cite{tbm}, bimaximal mixing (BM) \cite{bm}, hexagonal mixing (HM) \cite{hm}, democratic mixing (DM) \cite{dm}, golden ratio mixing I (GRM1) \cite{grm1} and golden ratio mixing II (GRM2) \cite{grm2} predict a vanishing reactor mixing angle ($\theta_{13}$) and a maximal atmospheric mixing angle ($\theta_{23}$) and, hence, need modifications to satisfy the data from current neutrino oscillation experiments. Two mixing schemes TFH1 (Toorop-Feruglio-Hagedorn 1) and TFH2, proposed in Ref. \cite{tfh}, predict nonzero $\theta_{13}$ and nonmaximal $\theta_{23}$ and need corrections to explain the three mixing angles, simultaneously. The TBM mixing matrix is given by \begin{equation} U_{\text{TBM}}= \left( \begin{array}{ccc} \sqrt{\frac{2}{3}} & \frac{1}{\sqrt{3}} & 0 \\ -\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} \\ \end{array} \right). \end{equation} Recent neutrino oscillation experiments have measured a non-zero $\theta_{13}$ which implies that (1,3) element of the neutrino mixing matrix ($U_{e3}$) cannot be zero. Thus we need to modify the TBM mixing matrix to accommodate a non-zero $\theta_{13}$. One simple possibility is to keep one of the columns of the TBM mixing matrix intact while modifying its remaining two columns within the unitarity constraints. This gives rise to three mixing patterns viz. $(U_{C1})_{TBM}$, $(U_{C2})_{TBM}$ and $(U_{C3})_{TBM}$ which have their first, second and third columns identical to the TBM mixing matrix, respectively. $(U_{C1})_{TBM}$ mixing is given by \begin{equation}\label{eq:tm1} (U_{C1})_{TBM}=\left( \begin{array}{ccc} \frac{2}{\sqrt{3}} & \frac{1}{\sqrt{3}} \cos \theta & \frac{1}{\sqrt{3}} \sin \theta \\ -\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}}\cos\theta+\frac{e^{i \phi} \sin \theta}{\sqrt{2}} & \frac{1}{\sqrt{3}}\sin\theta- \frac{e^{i \phi} \cos\theta}{\sqrt{2}} \\ -\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}}\cos\theta-\frac{e^{i \phi} \sin \theta}{\sqrt{2}} & \frac{1}{\sqrt{3}}\sin \theta +\frac{e^{i \phi} \cos \theta}{\sqrt{2}}\end{array} \right). \end{equation} $(U_{C1})_{TBM}$ reduces to the TBM mixing matrix in the special case $\theta=0$ and $\phi=0$. $(U_{C2})_{TBM}$ mixing is given by \begin{equation}\label{eq:tm2} (U_{C2})_{TBM}=\left( \begin{array}{ccc} \sqrt{\frac{2}{3}} \cos \theta & \frac{1}{\sqrt{3}} & \sqrt{\frac{2}{3}} \sin \theta \\ -\frac{\cos\theta}{\sqrt{6}}+\frac{e^{i \phi} \sin \theta}{\sqrt{2}} & \frac{1}{\sqrt{3}} & -\frac{\sin\theta}{\sqrt{6}}-\frac{e^{i \phi} \cos\theta}{\sqrt{2}} \\ -\frac{\cos\theta}{\sqrt{6}}-\frac{e^{i \phi} \sin \theta}{\sqrt{2}} & \frac{1}{\sqrt{3}} & -\frac{\sin \theta}{\sqrt{6}} +\frac{e^{i \phi} \cos \theta}{\sqrt{2}}\end{array} \right). \end{equation} $(U_{C2})_{TBM}$ mixing reduces to the TBM scheme in the special case $\theta=0$ and $\phi=0$. This mixing scheme is generally known as the trimaximal mixing. $(U_{C3})_{TBM}$ mixing is given by \begin{equation}\label{eq:tm3} (U_{C3})_{TBM}= \left( \begin{array}{cccc} \cos\theta & \sin\theta & 0 \\ -\frac{e^{-i\phi} \sin\theta}{\sqrt{2}} & \frac{e^{-i \phi} \cos\theta}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\ -\frac{e^{-i\phi} \sin\theta}{\sqrt{2}} & \frac{e^{-i \phi} \cos\theta}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \end{array} \right). \end{equation} $(U_{C3})_{TBM}$ reduces to the TBM mixing matrix in the special case $\theta=\arctan (1/\sqrt{2})$ and $\phi=0$. The above partial mixing schemes have been successfully employed to explain the pattern of lepton mixing and have been extensively studied in the literature \cite{column, sanjeev}. Especially, the $(U_{C1})_{TBM}$ mixing gives a very good fit to the present neutrino oscillation data.\\ In the present work, we present new mixing schemes for (3+1) neutrinos which are essentially partial mixing schemes having either one row or one column of the $4\times4$ mixing matrix to be the same as that of the popular mixing schemes like TBM, BM, DM, HM, GRM1, GRM2, TFH1 and TFH2. These mixing schemes accommodate active-active and active-sterile neutrino mixings. We, also, discuss general $4\times4$ mixing schemes with one column or one row fixed with none of the mixing matrix elements equal to zero. A $4\times4$ real mixing scheme with first or second column of the mixing matrix remaining the same as that of TBM has, already, been studied in Ref. \cite{dev} and it has been found that the mixing matrix with second column identical to TBM mixing matrix is the only viable case.\\ The plan of this paper is as follows. Sec. II describes the general (3+1) neutrino framework. In Sec. III, we present partial neutrino mixing schemes and study their phenomenology. Sec. IV describes the $(4\times4)$ general mixing schemes with one column/row fixed. Sec. V summarizes the main results of this work. \section{The (3+1) neutrino framework} The presence of sterile neutrino(s) affects the active neutrino mixing angles via the unitarity conditions of the mixing matrix i.e., $\Sigma_{j}\vert U_{ij}\vert^{2}=1$, where $i=e,\mu,\tau,s$ and $j=1,2,3,4$. Table 1 presents the bounds on active-sterile mixing matrix elements. The experimental mass splitting are $\Delta m^2_{21}=(7.05-8.14)\times 10^{-5}$ eV$^2$, $\Delta m^2_{31}=(2.43-2.67)\times 10^{-3}$ eV$^2$ for normal mass ordering and $(2.37-2.61)\times 10^{-3}$ eV$^2$ for inverted mass ordering at $3\sigma$ CL \cite{salas}. The fourth mass splitting is $\Delta m^2_{41}\approx1.7$ eV$^2$ (best fit)\cite{li}. The 3$\sigma$ ranges of the elements of the $3\times3$ sub matrix of $U$ with the bounds presented in \cite{parke} without imposing the unitarity of $U^{3\times3}$ are given by \begin{eqnarray} |U|^{3\times3}\equiv \left( \begin{array}{ccc} 0.76- 0.85 & 0.50- 0.60 & 0.13- 0.16 \\ 0.21- 0.54 & 0.42- 0.70 & 0.61- 0.79 \\ 0.18- 0.58 & 0.38- 0.72 & 0.40- 0.78 \end{array} \right). \end{eqnarray} \begin{table}[h] \begin{center} \begin{tabular}{ccc} \hline \hline Parameter & bound at $3 \sigma$ CL \\ \hline $|U_{e4}|^2$ & 0.0098 $-$ 0.031\\ $|U_{\mu4}|^2$ & 0.0060 $-$ 0.026\\ $|U_{\tau4}|^2$ & $\leq 0.039$ \\ \hline \end{tabular} \end{center} \caption{The current experimental bounds on sterile neutrino mixing parameters Ref.\cite{li}} \end{table} In the four (3+1) neutrino framework, there are three active and one sterile neutrinos. The corresponding neutrino mixing matrix is a $4\times4$ unitary matrix. We use the following parametrization \cite{rode} for the $4\times4$ neutrino mixing matrix: \begin{small} \begin{equation} U_{4\times 4}= R(\theta_{34}) R(\theta_{24},\delta_{24}) R(\theta_{14},\delta_{14}) R(\theta_{23}) R(\theta_{13},\delta_{13}) R(\theta_{12}) P \end{equation} \end{small} where $R(\theta_{ij})$ matrix describes rotation in $ij^{\textrm{th}}$ plane and diagonal phase matrix $P$ contains three Majorana type CP-violating phases. The advantage of such parametrization is that for vanishing active-sterile mixing the above parametrization reduces to the standard PMNS parametrization for three active neutrinos. The six neutrino mixing angles in terms of mixing matrix elements can be written as \begin{small} \begin{eqnarray} \sin^2\theta_{14}&=& |U_{e4}|^2\nonumber,\\ \sin^2\theta_{24}&=& \frac{|U_{\mu4}|^2}{1-|U_{e4}^2|}\nonumber,\\ \sin^2\theta_{34}&=& \frac{|U_{\tau4}|^2}{1-|U_{e4}|^2-|U_{\mu4}|^2},\\ \sin^2\theta_{13}&=&\frac{|U_{e3}|^2}{1-|U_{e4}|^2}\nonumber,\\ \sin^2\theta_{12}&=& \frac{|U_{e3}|^2}{1-|U_{e4}|^2-|U_{e3}|^2}\nonumber,\\ \sin^2\theta_{23}&=& \frac{|U_{\mu 3}|^2 (1-|U_{e4}|^2)-|U_{e4}|^2 |U_{\mu 4}|^2}{(1-|U_{e4}|^{2}-|U_{\mu 4}|^{2})}+\frac{|U_{e1} U_{\mu1}+U_{e2} U_{\mu2}|^2 (1-|U_{e4}|^2)}{(1-|U_{e4}|^{2}-|U_{e 3}|^{2})(1-|U_{e4}|^{2}-|U_{\mu4}|^{2})}.\nonumber \end{eqnarray} \end{small} \section{Partial Mixing Schemes} A partial mixing matrix $U_{Ci}$ ($U_{Ri}$) is defined as a $4\times 4$ unitary matrix with the $i$th column (row) fixed to be $N( a~~b~~1~~0)^T (N( 1~~b~~a~~0))$, while keeping other three columns (rows) free within the unitarity constraints. The parameters $a$ and $b$ for different mixing schemes have been summarized in Table II . $N=1/\sqrt{1+a^2+b^2}$ is the normalization constant. One can obtain a particular partial mixing matrix $U_{Ci}$ or $U_{Ri}$ by selecting the respective values of $a$ and $b$ listed in Table II. For example, choosing $a=2$ and $b=1$ for $U_{C1}$ leads to a $4\times 4$ unitary matrix with its first column identical to TBM mixing matrix. Fig 1 shows the parameter space for $a$ and $b$ under the current neutrino oscillation data for $U_{C1}, U_{C2}$ and $U_{R3}$ mixing schemes. \begin{table}[h] \begin{center} \begin{tabular}{|c|c|c|c|} \hline \hline Mixing& $U_{C1} $ & $U_{C2}$ \\ pattern & $a~~~~~~~~~~~~~~~~~~~~~b$ & $a~~~~~~~~~~~~~~~~~~~~b$ \\ \hline \hline TBM & 2~~~~~~~~~~~~~~~~~~~~~~~~1 & 1~~~~~~~~~~~~~~~~~~~~~~1 \\ BM & $\sqrt{2}$~~~~~~~~~~~~~~~~~~~~~~1 & $\sqrt{2}$~~~~~~~~~~~~~~~~~~~~1 \\ DM & $\sqrt{\frac{3}{2}}$~~~~~~~~~~~~~~~~~~~~~$\frac{1}{\sqrt{2}}$ & $\sqrt{\frac{3}{2}}$~~~~~~~~~~~~~~~~~~~$\frac{1}{\sqrt{2}}$\\ HM & $\sqrt{6}$~~~~~~~~~~~~~~~~~~~~~~1 & $\sqrt{\frac{2}{3}}$~~~~~~~~~~~~~~~~~~~~1 \\ GRM1 & $\sqrt{3+\sqrt{5}}$~~~~~~~~~~~~~~1 & $\sqrt{3-\sqrt{5}}$~~~~~~~~~~~~~1 \\ GRM2 & $\sqrt{2+\frac{4}{\sqrt{5}}}$~~~~~~~~~~~~~~1 & $\sqrt{10-4\sqrt{5}}$~~~~~~~~~~1 \\ TFH1 & ~~~~$\frac{1}{2}(\sqrt{3}+1)$~~~~~~~$\frac{1}{2}(\sqrt{3}-1)$ & 1 ~~~~~~~~~~~~~~~~~~~~~ 1 \\ TFH2 & ~~~$2+\sqrt{3}$~~~~~~~~~~~~$1+\sqrt{3}$ & 1~~~~~~~~~~~~~~~~~~~~~~~1\\ \hline \hline Mixing & $U_{R2}$ & $U_{R3}$ \\ pattern & $a~~~~~~~~~~~~~~~~~~~~b$ & $a~~~~~~~~~~~~~~~~~~~~b$ \\ \hline \hline TBM & $\sqrt{3}$~~~~~~~~~~~~~~~~~~$\sqrt{2}$ & $\sqrt{3}$~~~~~~~~~~~~~~~~~~$\sqrt{2}$ \\ BM & $\sqrt{2}$~~~~~~~~~~~~~~~~~~~~1 & $\sqrt{2}$~~~~~~~~~~~~~~~~~~~~1 \\ DM & 2~~~~~~~~~~~~~~~~~~~~~~1 & 1~~~~~~~~~~~~~~~~~~~~~~1 \\ HM & 1~~~~~~~~~~~~~~~~~~~~$\sqrt{3}$ & 1~~~~~~~~~~~~~~~~~~~~$\sqrt{3}$\\ GRM1 & $\sqrt{\frac{1}{2}(5+\sqrt{5})}$~~~~~~$\sqrt{\frac{1}{2}(3+\sqrt{5})}$ & $\sqrt{\frac{1}{2}(5+\sqrt{5})}$~~~~~~$\sqrt{\frac{1}{2}(3+\sqrt{5})}$ \\ GRM2 & $\sqrt{2+\frac{4}{\sqrt{5}}}$~~~~~~~~~~~~~$\frac{1+\sqrt{5}}{\sqrt{10-2\sqrt{5}}}$ & $\sqrt{2+\frac{4}{\sqrt{5}}}$~~~~~~~~~~~~~$\frac{1+\sqrt{5}}{\sqrt{10-2\sqrt{5}}}$\\ TFH1 & $2+\sqrt{3}$~~~~~~~~~~~~~~$1+\sqrt{3}$ & 1 ~~~~~~~~~~~~~~~~~~~ 1 \\ TFH2 & 1~~~~~~~~~~~~~~~~~~~~1 & $2+\sqrt{3}$~~~~~~~~~~~~~~$1+\sqrt{3}$\\ \hline \hline \end{tabular} \end{center} \caption{The values of the parameters $a$ and $b$ for the partial mixing schemes of type $U_{C1}, U_{C2}, U_{R2}$ and $U_{R3}$.} \end{table} \begin{figure}[h] \begin{center} \epsfig{file=fig1.eps, width=16.5cm, height=5.0cm} \end{center} \caption{The allowed parameter space for parameters $a$ and $b$ corresponding to parametrizations $U_{C1}$ (a), $U_{C2}$ (b), $U_{R3}$ (c) along with the values of $a$ and $b$ for TBM ($\blacktriangledown$), BM ($\bigtriangledown$), DM ($\bigcirc$), HM ($\bullet$), GRM1($\blacktriangle$), GRM2 ($\blacksquare$), TFH1 ($\bigtriangleup$) and TFH2 ($\square$). In case of $U_{C2}$ ($U_{R3}$), the values of $a$ and $b$ coincide for TBM, TFH1 and TFH2 (TFH1 and DM).} \end{figure} \subsection{Mixing Scheme with first column fixed to $N(a~~b~~ 1~~ 0)^T$} Here, we study the mixing scheme with first column fixed according to the well known mixing schemes: \begin{eqnarray} U_{C1}:\left( \begin{array}{c} U_{e1}\\ U_{\mu1}\\ U_{\tau1}\\ U_{s1}\\ \end{array} \right)=\left( \begin{array}{c} a N\\ b N\\ N\\ 0\\ \end{array} \right). \end{eqnarray} The most general $4\times4$ mixing matrix with the first column fixed to be $N( a~~b~~ 1~~ 0)^T$, can be written as \begin{small} \begin{eqnarray} U_{C1}=\left( \begin{array}{cccc} a N & \sqrt{b^2+1} c_2 c_3 N & \sqrt{b^2+1} c_2 N s_3 & \sqrt{b^2+1} N s_2 \\ -b N & \frac{\left(a b c_2 c_3 N+u\right)}{\sqrt{b^2+1}} & \frac{ \left(a b c_2 N s_3+v\right)}{\sqrt{b^2+1}} & \frac{\left(a b N s_2-c_2 e^{i (\phi_2-\phi_1)} s_1\right)}{\sqrt{b^2+1}} \\ -N & \frac{\left(a c_2 c_3 N-b u\right)}{\sqrt{b^2+1}} & \frac{a c_2 N s_3-b v}{\sqrt{b^2+1}} & \frac{\left(b c_2 e^{i (\phi_2-\phi_1)} s_1+a N s_2\right)}{\sqrt{b^2+1}} \\ 0 & e^{i (\phi_1+\phi_3)} s_1 s_3-c_1 c_3 e^{i \phi_2} s_2 & -c_3 e^{i (\phi_1+\phi_3)} s_1-c_1 e^{i \phi_2} s_2 s_3 & c_1 c_2 e^{i \phi_2} \\ \end{array} \right)P \end{eqnarray} \end{small} where $u=c_3 e^{i (\phi_2- \phi_1)} s_1 s_2+c_1 e^{i \phi_3} s_3,v=e^{i (\phi_2-\phi_1)} s_1 s_2 s_3-c_1 e^{i \phi_3} c_3$, $s_{i}=\sin\theta_{i}$ and $c_{i}=\cos\theta_{i}$. The phase matrix $P = $diag$(1,e^{i\alpha},e^{i\beta},e^{i\gamma})$ contains three Majorana phases. The values of $a$ and $b$ for different popular mixing schemes are summarized in Table II. The above matrix has been derived in the Appendix. Fixing one row or column of the mixing matrix provides three independent constraints on the mixing angles and CP-violating phases. Comparing the magnitudes of the elements of $U_{C1}$ mixing matrix with the unitary matrix in Eq. (6) imposes the following conditions: \begin{equation} |U_{e1}|=a N, ~~|U_{\mu1}|=b N~~ \textrm{and}~~ |U_{s1}|=0.\nonumber \end{equation} The first condition $|U_{e1}|=a N$ gives \begin{equation} \cos^2\theta_{12}=\frac{a^2 N^2}{\cos^2\theta_{13} \cos^2\theta_{14}}=\frac{a^2 N^2}{1-|U_{e4}^2|-|U_{e3}^2|}\geq a^2 N^2. \end{equation} For $U_{C1}$ mixing, it is clear from Eq. (10) that $\theta_{12}$ decreases with increase in $\theta_{13}$ and $\theta_{14}$. Fig 1(a) shows that $U_{C1}$ mixing is viable only for TBM and GRM2 partial mixings. Also, $U_{C1}$ mixing predicts $\sin^2\theta_{12}\leq\frac{1}{3}$ for TBM and $\sin^2\theta_{12}\leq\frac{5-\sqrt{5}}{8}$ for GRM2.\\ From the second condition $|U_{\mu1}|=b N$, we have \begin{eqnarray} b^2 N^2&=&|\cos\theta_{12} (\cos\theta_{13} \sin\theta_{14} \sin\theta_{24} \cos(\delta_{14}-\delta_{24})+\cos\delta_{13} \sin\theta_{13} \sin\theta_{23} \cos\theta_{24})\nonumber\\ &&+\sin\theta_{12} \cos\theta_{23} \cos\theta_{24}|^2\\ &&+|\cos\theta_{12} (\cos\theta_{13} \sin\theta_{14} \sin\theta_{24} \sin(\delta_{14}-\delta_{24})+\sin\delta_{13} \sin\theta_{13} \sin\theta_{23} \cos\theta_{24})|^2 \nonumber \end{eqnarray} and from third condition $|U_{s1}|=0$, we have \begin{equation} \tan\theta_{12}=|\frac{e^{i(\delta_{13}+\delta_{24})} \cos\theta_{13} \sin\theta_{14}-e^{i\delta_{14}}\sin\theta_{13} \left(\sin\theta_{23} \tan\theta_{24}+e^{i\delta_{24}} \cos\theta_{23} \sec\theta_{24} \tan\theta_{34}\right)}{e^{i(\delta_{13}+\delta_{14})} (\cos\theta_{23} \tan\theta_{24}-e^{i\delta_{24}} \sin\theta_{23} \sec\theta_{24} \tan\theta_{34})}|. \end{equation} It is clear that the six mixing angles are not independent and are related as above. Using Eqs. (7) and (9), we obtain the following relations; \begin{small} \begin{eqnarray} \sin^2\theta_{13}&=&\left(1-\frac{a^2 N^2}{\cos^2\theta_{14}}\right)\sin^2\theta_{3}\leq 1-a^2 N^2 (1+\sin^2\theta_{14})\nonumber,\\ \sin^2\theta_{12}&=&\frac{\left(b^2+1\right) \cos^2\theta_2 \cos^2\theta_3}{a^2+\left(b^2+1\right) \cos^2\theta_2 \cos^2\theta_3}\equiv 1-a^2 N^2 \sec^2\theta_{13} \sec^2\theta_{14}\nonumber,\\ \sin^2\theta_{23}&=&\frac{|U_{\mu3}|^2+|\cos_{12} U_{\mu 1}+\sin\theta_{12}U_{\mu 2}|^2-\sin^2\theta_{14}\sin^2\theta_{24}}{\cos^2\theta_{24}},\\ \sin^2\theta_{14}&=& \left(b^2+1\right) N^2 \sin^2\theta_2\nonumber,\\ \sin^2\theta_{24}&=&\frac{a^2 b^2 N^2 \sin^2\theta_{2}-2 a b N\sin\theta_{1}\sin\theta_{2} \cos\theta_{2} \cos(\phi_{1}-\phi_{2})+\sin^2\theta_{1} \cos^2\theta_{2}}{-\left(b^2+1\right)^2 N^2 \sin^2\theta_{2}+b^2+1}\nonumber,\\ \sin^2\theta_{34}&=&\frac{a N \left(a N \sin^2\theta_{2}+b\sin\theta_{1} \sin(2\theta_{2}) \cos(\phi_{1}-\phi_{2})\right)+b^2\sin^2\theta_{1}\cos^2\theta_{2}}{a b N \sin\theta_{1} \sin(2\theta_{2}) \cos(\phi_{1}-\phi_{2})-(b^2+(1+b^2)N^2)\sin^2\theta_{2}+b^2-\sin^2\theta_{1} \cos^2\theta_{2}+1}~.\nonumber \end{eqnarray} \end{small} The mixing matrix in Eq. (9) can be factorized as \begin{equation} U_{C1}=V(a,b) R_{34}(\theta_{1},\phi_{1}) R_{24}(\theta_{2},\phi_{2}) R_{23}(\theta_{3},\phi_{3})P \end{equation} where \begin{equation} V(a,b)=\left( \begin{array}{cccc} a N & \sqrt{b^2+1} N & 0 & 0 \\ -b N & \frac{a b N}{\sqrt{b^2+1}} & -\frac{1}{\sqrt{b^2+1}} & 0 \\ -N & \frac{a N}{\sqrt{b^2+1}} & \frac{b}{\sqrt{b^2+1}} & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} \right). \end{equation} The matrix $V(a,b)$ represents one of the following mixing schemes: TBM, BM, DM, HM, GRM1, GRM2, TFH1, TFH2. $V(a,b)$ reproduces different mixing schemes for different values of $a,b$ listed in Table II (except for TFH1 and TFH2). $R_{ij}$ denote small rotations in the $(ij)$ plane and represent perturbations to different mixing schemes. As an example, the partial mixing scheme with its first column fixed to the TBM values is obtained using Eqs. (9) and (14): \begin{equation} [U_{C1}]_{TBM}=V(2,1) R_{34}(\theta_{1},\phi_{1}) R_{24}(\theta_{2},\phi_{2}) R_{23}(\theta_{3},\phi_{3})P \end{equation} where \begin{small} \begin{eqnarray} V(2,1)=\left( \begin{array}{cccc} \sqrt{\frac{2}{3}} & \frac{1}{\sqrt{3}} & 0 & 0\\ -\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & 0\\ -\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} &0 \\ 0 & 0 & 0 & 1\\ \end{array} \right), R_{34}(\theta_{1},\phi_{1})=\left( \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & \cos\theta_1 & e^{-i \phi_1} \sin\theta_1 \\ 0 & 0 & -e^{i \phi_1} \sin\theta_1 & \cos\theta_1 \\ \end{array} \right),\nonumber \\ R_{24}(\theta_{2},\phi_{2}) = \left( \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & \cos\theta_2 & 0 & e^{-i \phi_2} \sin\theta_2 \\ 0 & 0 & 1 & 0 \\ 0 & -e^{i \phi_2} \sin\theta_2 & 0 & \cos\theta_2 \\ \end{array} \right), R_{23}(\theta_{3},\phi_{3})=\left( \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & \cos\theta_3 & e^{-i\phi_3} \sin\theta_3 & 0 \\ 0 & -e^{i \phi_3} \sin\theta_3 & \cos\theta_3 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} \right). \end{eqnarray} \end{small} \begin{tiny} \begin{equation} \Rightarrow [U_{C1}]_{TBM}=\left( \begin{array}{cccc} \sqrt{\frac{2}{3}} & \frac{c_2 c_3}{\sqrt{3}} & \frac{c_2 s_3}{\sqrt{3}} & \frac{s_2}{\sqrt{3}} \\ -\frac{1}{\sqrt{6}} & \frac{c_2 c_3}{\sqrt{3}}+\frac{e^{-i \phi_1} \left(c_3 e^{i \phi_2} s_1 s_2+c_1 e^{i (\phi_1+\phi_3)} s_3\right)}{\sqrt{2}} & -\frac{c_1 e^{i \phi_3} c_3}{\sqrt{2}}+\frac{c_2 s_3}{\sqrt{3}}+\frac{e^{-i (\phi_1-\phi_2)} s_1 s_2 s_3}{\sqrt{2}} & \frac{s_2}{\sqrt{3}}-\frac{c_2 e^{-i (\phi_1-\phi_2)} s_1}{\sqrt{2}} \\ -\frac{1}{\sqrt{6}} & \frac{c_2 c_3}{\sqrt{3}}+\frac{e^{-i \phi_1} \left(-c_3 e^{i \phi_2} s_1 s_2-c_1 e^{i (\phi_1+\phi_3)} s_3\right)}{\sqrt{2}} & \frac{c_1 e^{i \phi_3} c_3}{\sqrt{2}}+\frac{c_2 s_3}{\sqrt{3}}-\frac{e^{-i (\phi_1-\phi_2)} s_1 s_2 s_3}{\sqrt{2}} & \frac{c_2 e^{-i (\phi_1-\phi_2)} s_1}{\sqrt{2}}+\frac{s_2}{\sqrt{3}} \\ 0 & e^{i (\phi_1+\phi_3)} s_1 s_3-c_1 c_3 e^{i\phi_2} s_2 & -c_3 e^{i (\phi_1+\phi_3)} s_1-c_1 e^{i \phi_2} s_2 s_3 & c_1 c_2 e^{i \phi_2} \\ \end{array} \right)P. \end{equation} \end{tiny} For numerical analysis, we generate about $10^{7}\sim10^{8}$ points randomly. We vary the parameters $\theta_{1},\theta_{2},\theta_{3}$ and $\phi_{1},\phi_{2},\phi_{3}$ within the ranges $(0-\frac{\pi}{2})$ and $(0-2\pi)$, respectively. Parameters $a$ and $b$ are chosen from Table II corresponding to the different partial mixing schemes. The experimental constraints on neutrino parameters from neutrino oscillation experiments are summarized in Eq. (5) and Table I which have been used to check the viability of above partial mixing schemes. Only TBM and GRM2 partial mixing schemes are allowed at 3$\sigma$ CL For $U_{C1}$. Fig. 2 shows the correlations among different neutrino mixing angles for $U_{C1}$ mixing scheme with first column fixed to be the same as that of TBM. The correlation plot shown in Fig. 2(a) between $\theta_{12}$ and $\theta_{13}$ is in the form of band (in contrast to a line in the three neutrino case) due to the presence of extra parameters from sterile sector. $\theta_{12}$ varies inversely with $\theta_{14}$ (Fig. 2(b)) which is also clear from Eq. (10).\\ In the context of symmetry, the origin of the first eigenvector fixed as $N(a~~b~~1~~0)^T$, can be seen as the invariance of the neutrino mass matrix $M_{\nu}^{4\times4}$ under a $Z_{2}$ symmetry: $G_{1}^{T}M_{\nu}^{4\times4}G_{1} = M_{\nu}^{4\times4}$ where the $Z_2$ symmetry generator $G_{1}$ is defined as \begin{eqnarray} G_{1}&&=u_{1} u_{1}^{\dagger}-u_{2} u_{2}^{\dagger}-u_{3} u_{3}^{\dagger}-u_{4} u_{4}^{\dagger}\nonumber\\ &&=\left( \begin{array}{cccc} \left(a^2-b^2-1\right) N^2 & -2 a b N^2 & -2 a N^2 & 0 \\ -2 a b N^2 & \frac{b^2 \left(-a^2+b^2+1\right) N^2-1}{b^2+1} & \frac{b \left(\left(-a^2+b^2+1\right) N^2+1\right)}{b^2+1} & 0 \\ -2 a N^2 & \frac{b \left(\left(-a^2+b^2+1\right) N^2+1\right)}{b^2+1} & \frac{\left(-a^2+b^2+1\right) N^2-b^2}{b^2+1} & 0 \\ 0 & 0 & 0 & -1 \\ \end{array} \right). \end{eqnarray} For the $U_{C1}$ partial mixing corresponding to TBM, the generator $G_{1}$ and the corresponding mass matrix are given by \begin{small} \begin{equation} G_{1}=\frac{1}{3}\left( \begin{array}{cccc} 1 & -2 & -2 & 0 \\ -2 & -2 & 1 & 0 \\ -2 & 1 & -2 & 0 \\ 0 & 0 & 0 & -3 \\ \end{array} \right)~ \textrm{and}~M_{\nu}^{4\times4}=\left( \begin{array}{cccc} x & y & z & \frac{f+g}{2} \\ y & p+2 y-2 z & t & f \\ z & t & p & g \\ \frac{f+g}{2} & f & g & s \\ \end{array} \right) \end{equation} \end{small} where $t=-p+x-\frac{y}{2}+\frac{3 z}{2}$. Similarly, for the $U_{C1}$ partial mixing corresponding to GRM2, we have \begin{small} \begin{eqnarray} G_{1}&&=\left( \begin{array}{cccc} \frac{1}{4} \left(-1+\sqrt{5}\right) & -\frac{1}{4} \sqrt{5+\sqrt{5}} & -\frac{1}{4} \sqrt{5+\sqrt{5}} & 0 \\ -\frac{1}{4} \sqrt{5+\sqrt{5}} & \frac{1}{8} \left(-3-\sqrt{5}\right) & \frac{1}{8} \left(5-\sqrt{5}\right) & 0 \\ -\frac{1}{4} \sqrt{5+\sqrt{5}} & \frac{1}{8} \left(5-\sqrt{5}\right) & \frac{1}{8} \left(-3-\sqrt{5}\right) & 0 \\ 0 & 0 & 0 & -1 \\ \end{array} \right),\nonumber\\ \textrm{and}~M_{\nu}^{4\times4}&&=\left( \begin{array}{cccc} t & y & z & \sqrt{\frac{5}{2}-\sqrt{5}} (f+g) \\ y & x+\sqrt{2+\frac{4}{\sqrt{5}}} (y-z) & p & f \\ z & p & x & g \\ \sqrt{\frac{5}{2}-\sqrt{5}} (f+g) & f & g & s \\ \end{array} \right), \end{eqnarray} \end{small} where $t=p+x+\frac{1}{20} \sqrt{5+\sqrt{5}} \left(\left(5-7 \sqrt{5}\right) z-5 \left(-3+\sqrt{5}\right) y\right)$. \begin{figure}[h] \begin{center} \epsfig{file=fig2.eps, width=16.5cm, height=5.0cm} \end{center} \caption{Correlation plots among various neutrino oscillation parameters for parametrization $U_{C1}$ with TBM as partial flavour symmetry.} \end{figure} \subsection{Mixing Scheme with second column fixed to $N(a~~b~~ 1~~ 0)^T$} The general mixing scheme with the second column fixed to $N( a~~b~~ 1~~ 0)^T$ is given by \begin{small} \begin{eqnarray} U_{C2}=\left( \begin{array}{cccc} \sqrt{b^2+1} c_2 c_3 N & a N & \sqrt{b^2+1} c_2 N s_3 & \sqrt{b^2+1} N s_2 \\ \frac{\left(-a b c_2 c_3 N+u \right)}{\sqrt{b^2+1}} & b N & \frac{\left(-a b c_2 N s_3+v \right)}{\sqrt{b^2+1}} & -\frac{ \left(c_2 e^{i(\phi_2-\phi_1)} s_1+a b N s_2\right)}{\sqrt{b^2+1}} \\ \frac{\left(-a c_2 c_3 N-b u\right)}{\sqrt{b^2+1}} & N & \frac{\left(-a c_2 N s_3-b v \right)}{\sqrt{b^2+1}} & \frac{\left(b c_2 e^{i (\phi_2-\phi_1)} s_1-a N s_2\right)}{\sqrt{b^2+1}} \\ e^{i (\phi_1+\phi_3)} s_1 s_3-c_1 c_3 e^{i \phi_2} s_2 & 0 & -c_3 e^{i (\phi_1+\phi_3)} s_1-c_1 e^{i \phi_2} s_2 s_3 & c_1 c_2 e^{i \phi_2} \\ \end{array} \right)P \end{eqnarray} \end{small} where $u=c_3 e^{i (\phi_2-\phi_1)} s_1 s_2+c_1 e^{i \phi_3} s_3, v=e^{i (\phi_2-\phi_1)} s_1 s_2 s_3-c_1 e^{i \phi_3} c_3$. From the condition $|U_{e2}|=a N$, one finds \begin{equation} \sin^2\theta_{12}=\frac{a^2 N^2}{\cos^2\theta_{13} \cos^2\theta_{14}}=\frac{a^2 N^2}{1-|U_{e4}^2|-|U_{e3}^2|}\geq a^2 N^2. \end{equation} $U_{C2}$ mixing for TBM, TFH1 and TFH2 partial mixings predicts $\sin^2\theta_{12}\geq\frac{1}{3}$. For HM, GRM1 and GRM2 partial mixings $\sin^2\theta_{12}\geq\frac{1}{4}$, $\frac{5-\sqrt{5}}{10}$ and $\frac{5-\sqrt{5}}{8}$, respectively. Eq. (23) implies, $\theta_{12}$ increases with increase in $\theta_{13}$ and $\theta_{14}$ which is opposite to $U_{C1}$ mixing. The second condition $|U_{\mu2}|=b N$ implies \begin{eqnarray} b^2 N^2&=&|\cos\theta_{12} \cos\theta_{23} \cos\theta_{24}-\sin\theta_{12} (\cos\theta_{13} \sin\theta_{14} \sin\theta_{24} \cos(\delta_{14}-\delta_{24})\nonumber\\ &&+\cos\delta_{13} \sin\theta_{13} \sin\theta_{23} \cos\theta_{24})|^2\nonumber\\ &&+|\sin\theta_{12} (\cos\theta_{13} \sin\theta_{14} \sin\theta_{24} \sin(\delta_{14}-\delta_{24})+\sin\delta_{13} \sin\theta_{13} \sin\theta_{23} \cos\theta_{24})|^2 \end{eqnarray} and from third condition $|U_{s2}|=0$, we have \begin{eqnarray} \tan\theta_{12}=|\frac{e^{i(\delta_{13}+\delta_{14})} \left(\cos\theta_{23} \tan\theta_{24}-e^{i\delta_{24}} \sin\theta_{23} \sec\theta_{24} \tan\theta_{34}\right)}{e^{i\delta_{14}} \sin\theta_{13} \left(\sin\theta_{23} \tan\theta_{24}+e^{i\delta_{24}} \cos\theta_{23} \sec\theta_{24} \tan\theta_{34}\right)-e^{i(\delta_{13}+\delta_{24})} \cos\theta_{13}\sin\theta_{14}}|. \end{eqnarray} Further from Eqs. (7) and (22), we have the following relations for mixing angles: \begin{eqnarray} \sin^2\theta_{13}&=&(1-\frac{a^2}{(1+a^2+b^2)\cos^2\theta_{14}})\sin^2\theta_{3}\leq 1-\frac{a^2 (1+\sin^2\theta_{14})}{1+a^2+b^2}\nonumber,\\ \sin^2\theta_{12}&=&\frac{a^2}{a^2+\left(b^2+1\right) \cos^2\theta_2 \cos^2\theta_3}\equiv \frac{a^2 \sec^2\theta_{13}\sec^2\theta_{14}}{1+a^2+b^2},\nonumber\\ \sin^2\theta_{14}&=& \left(b^2+1\right) N^2 \sin^2\theta_2\nonumber,\\ \sin^2\theta_{24}&=& \frac{a b N \left(a b N \sin^2\theta_2+\sin\theta_1 \sin(2\theta_2) \cos(\phi_1-\phi_2)\right)+\sin^2\theta_1 \cos^2\theta_2}{-\left(b^2+1\right)^2 N^2 \sin^2\theta_2+b^2+1}\nonumber,\\ \sin^2\theta_{34}&=&\frac{a N \left(b \sin\theta_1 \sin(2\theta_2)\cos(\phi_1-\phi_2)-a N \sin^2\theta_2\right)-b^2 \sin^2\theta_1) \cos^2\theta_2}{a b N \sin\theta_1 \sin(2\theta_2) \cos(\phi_1-\phi_2)+\left(b^2 \left(N^2+1\right)+N^2\right) \sin^2\theta_2-b^2+\sin^2\theta_1 \cos^2\theta_2-1}.\nonumber \end{eqnarray} It is clear that the neutrino mixing angle $\theta_{12}$ corresponding to mixing schemes $U_{C1}$ and $U_{C2}$ are related as \begin{equation} \tan\theta_{12}|_{U_{C2}}=\frac{1}{\tan\theta_{12}|_{U_{C1}}}. \end{equation} The $U_{C2}$ parametrization can be factorized as \begin{equation} U_{C2}=V(a,b) R_{34}(\theta_{1},\phi_{1}) R_{14}(\theta_{2},\phi_{2}) R_{13}(\theta_{3},\phi_{3}) P \nonumber \end{equation} where $R_{ij}$ denote complex rotations in the $(ij)$ plane, $P=$ diag$\lbrace1,e^{i\alpha},e^{i\beta},e^{i\gamma}\rbrace$ is the phase matrix and $V(a,b)$ given by \begin{equation} V(a,b)=\left( \begin{array}{cccc} \sqrt{b^2+1} N & a N & 0 & 0 \\ -\frac{a b N}{\sqrt{b^2+1}} & b N & -\frac{1}{\sqrt{b^2+1}} & 0 \\ -\frac{a N}{\sqrt{b^2+1}} & N & \frac{b}{\sqrt{b^2+1}} & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} \right) \end{equation} represents one of the mixing schemes such as TBM etc.\\ For numerical analysis, the parameters $\theta_{1},\theta_{2},\theta_{3}$ and $\phi_{1},\phi_{2},\phi_{3}$ are varied randomly within the ranges $(0 -\frac{\pi}{2})$ and $(0 - 2\pi)$, respectively. $a$ and $b$ are chosen from Table II corresponding to a particular partial mixing scheme and experimental constraints on neutrino oscillation parameters are used to check the viability of these partial mixing schemes. For $U_{C2}$ mixing schemes TBM, TFH1, TFH2, HM, GRM1 and GRM2 partial mixings are allowed at 3$\sigma$ CL. For $U_{C2}$ scheme there are almost similar correlations among neutrino oscillation parameters for all viable partial mixings and in Fig. 3, we have plotted correlations among neutrino mixing angles for TBM partial mixing.\\ The generator $G_{2}$ corresponding to mass matrix $M_{\nu}^{4\times4}$ which leads to a mixing scheme with the second column fixed to $N( a~~b~~ 1~~ 0)^T$ is given by \begin{small} \begin{equation} G_{2}=\left( \begin{array}{cccc} \left(a^2-b^2-1\right) N^2 & 2 a b N^2 & 2 a N^2 & 0 \\ 2 a b N^2 & \frac{b^2 \left(-a^2+b^2+1\right) N^2-1}{b^2+1} & \frac{b \left(\left(-a^2+b^2+1\right) N^2+1\right)}{b^2+1} & 0 \\ 2 a N^2 & \frac{b \left(\left(-a^2+b^2+1\right) N^2+1\right)}{b^2+1} & \frac{\left(-a^2+b^2+1\right) N^2-b^2}{b^2+1} & 0 \\ 0 & 0 & 0 & -1 \\ \end{array} \right). \end{equation} \end{small} For TBM, TFH1 and TFH2 partial mixing schemes, we have \begin{small} \begin{eqnarray} G_{2}=\frac{1}{3}\left( \begin{array}{cccc} -1 & 2 & 2 & 0 \\ 2 & -1 & 2 & 0 \\ 2 & 2 & -1 & 0 \\ 0 & 0 & 0 & -3 \\ \end{array} \right)~\textrm{and}~M_{\nu}^{4\times4}=\left( \begin{array}{cccc} x & y & z & -f-g \\ y & p-y+z & -p+x+y & f \\ z & -p+x+y & p & g \\ -f-g & f & g & s \\ \end{array} \right). \end{eqnarray} \end{small} For HM partial mixing, we have \begin{small} \begin{eqnarray} G_{2}&=&\frac{1}{4}\left( \begin{array}{cccc} -2 & \sqrt{6} & \sqrt{6} & 0 \\ \sqrt{6} & -1 & 3 & 0 \\ \sqrt{6} & 3 & -1 & 0 \\ 0 & 0 & 0 & -4 \\ \end{array} \right)\nonumber\\ \textrm{and}~ M_{\nu}^{4\times4}&=&\left( \begin{array}{cccc} x & y & z & -\sqrt{\frac{3}{2}} (f+g) \\ y & p+\sqrt{\frac{2}{3}} (z-y) & -p+x+\frac{3 y+z}{\sqrt{6}} & f \\ z & -p+x+\frac{3 y+z}{\sqrt{6}} & p & g \\ -\sqrt{\frac{3}{2}} (f+g) & f & g & s \\ \end{array} \right). \end{eqnarray} \end{small} For GRM1 partial mixing \begin{small} \begin{eqnarray} G_{2}=\frac{1}{-5 +\sqrt{5}}\left( \begin{array}{cccc} -1+\sqrt{5} & \sqrt{2}-\sqrt{10} & \sqrt{2}-\sqrt{10} & 0 \\ \sqrt{2}-\sqrt{10} & 3-\sqrt{5} & -2 & 0 \\ \sqrt{2}-\sqrt{10} & -2 & 3-\sqrt{5} & 0 \\ 0 & 0 & 0 & 5-\sqrt{5} \\ \end{array} \right) \nonumber\\ \textrm{and}~ M_{\nu}^{4\times4}=\left( \begin{array}{cccc} x & y & z & -\frac{f+g}{\sqrt{3-\sqrt{5}}} \\ y & p+\sqrt{3-\sqrt{5}} (z-y) & \frac{t}{-130+58 \sqrt{5}} & f \\ z & \frac{t}{-130+58 \sqrt{5}} & p & g \\ -\frac{f+g}{\sqrt{3-\sqrt{5}}} & f & g & s \\ \end{array} \right) \end{eqnarray} \end{small} where $t=\left(130-58 \sqrt{5}\right) p+2 \left(29 \sqrt{5}-65\right) x+\sqrt{3-\sqrt{5}} \left(11 \sqrt{5} y-25 y-47 \sqrt{5} z+105 z\right)$.\\ For GRM2 partial mixing, the generator and the mass matrix are given by \begin{small} \begin{eqnarray} G_{2}=\frac{1}{-3 + \sqrt{5}} \left( \begin{array}{cccc} -2+\sqrt{5} & -\sqrt{\frac{5}{2}-\sqrt{5}} & -\sqrt{\frac{5}{2}-\sqrt{5}} & 0 \\ -\sqrt{\frac{5}{2}-\sqrt{5}} & \frac{5}{2}-\sqrt{5} & -\frac{1}{2} & 0 \\ -\sqrt{\frac{5}{2}-\sqrt{5}} & -\frac{1}{2} & \frac{5}{2}-\sqrt{5} & 0 \\ 0 & 0 & 0 & 3-\sqrt{5} \\ \end{array} \right) \nonumber\\ \textrm{and}~ M_{\nu}^{4\times4}=\left( \begin{array}{cccc} x & y & z & -\frac{f+g}{\sqrt{10-4 \sqrt{5}}} \\ y & p+\sqrt{10-4 \sqrt{5}} (z-y) & \frac{t}{-170+76 \sqrt{5}} & f \\ z & \frac{t}{-170+76 \sqrt{5}} & p & g \\ -\frac{f+g}{\sqrt{10-4 \sqrt{5}}} & f & g & s \\ \end{array} \right) \end{eqnarray} \end{small} where $t=\left(170-76 \sqrt{5}\right) p+2 \left(38 \sqrt{5}-85\right) x+\sqrt{10-4 \sqrt{5}} \left(4 \sqrt{5} y-9 y-72 \sqrt{5} z+161 z\right)$. \begin{figure}[h] \begin{center} \epsfig{file=fig3.eps, width=16.5cm, height=5.0cm} \end{center} \caption{Correlation plots among various neutrino oscillation parameters for $U_{C2}$ with TBM as partial flavour symmetry.} \end{figure} \subsection{Mixing Scheme with third row fixed to $N( 1~~b~~a~~ 0)$} Here, we discuss the mixing scheme where the third row of the mixing matrix is fixed to $N( 1~~b~~a~~ 0)$. The first condition with $|U_{\tau 4}|=0$, implies \begin{equation} |\sin\theta_{34}|=0. \end{equation} The second condition $|U_{\tau 3}|=a N$ gives \begin{equation} \sin^2\theta_{23}=1-\frac{a^2 N^2}{\cos^2\theta_{13}}=1-\frac{a^2 N^2(1-|U_{e4}|^2)}{1-|U_{e4}|^2-|U_{e3}|^2} \end{equation} which limits $\sin^2\theta_{23}\leq 0.56$ for TBM and GRM1, $\sin^2\theta_{23}\leq \frac{1}{2}$ for BM and $\sin^2\theta_{23}\leq0.65$ for GRM2 partial mixings. From third condition $|U_{\tau 2}|=b N$, we have \begin{equation} \cos\delta_{13}=2 b^2 N^2 \csc(2\theta_{12}) \csc\theta_{13} \csc(2\theta_{23})-\frac{1}{2} \tan\theta_{12} \sin\theta_{13} \cot\theta_{t23}-\frac{1}{2} \cot\theta_{12} \csc\theta_{13} \tan\theta_{23}. \end{equation} The general mixing scheme with third row fixed to $N( 1~~b~~a~~ 0)$ can be parametrized as \begin{small} \begin{eqnarray} U_{R3}=\left( \begin{array}{cccc} \frac{c_2 e^{i \phi_2} \left(b c_1 e^{i \phi_1}-a N s_1\right)}{\sqrt{b^2+1}} & \frac{c_2 e^{i \phi_2} \left(e^{i \phi_1} c_1+a b N s_1\right)}{\sqrt{b^2+1}} & -\sqrt{b^2+1} c_2 e^{i \phi_2} N s_1 & s_2 \\ \frac{b u-a N x}{\sqrt{b^2+1}} & \frac{u+a b N x}{\sqrt{b^2+1}} & -\sqrt{b^2+1} N x & c_2 s_3 \\ -N & b N & a N & 0 \\ \frac{b v+a N y}{\sqrt{b^2+1}} & \frac{v-a b N y}{\sqrt{b^2+1}} & \sqrt{b^2+1} N y & c_2 c_3 \\ \end{array} \right), \end{eqnarray} \end{small} where $u=-c_3 e^{i (\phi_1+\phi_3)} s_1- c_1 e^{i (\phi_1+\phi_2)} s_2 s_3, v=-c_1 c_3 e^{i (\phi_1+\phi_2)} s_2+e^{i (\phi_1+\phi_3)} s_1 s_3, x=c_1 c_3 e^{i \phi_3}-s_1 s_2 s_3 e^{i \phi_2}$ and $y=c_1 s_3 e^{i \phi_3}+ c_3 s_1 s_2 e^{i \phi_2}$. The $U_{R3}$ mixing scheme can be factorized as \begin{equation} U_{R3}=P^{\prime} R_{24}(\theta_{3},\phi_{3}) R_{14}(\theta_{2},\phi_{2}) R_{12}(\theta_{1},\phi_{1})V(a,b) P \nonumber \end{equation} where $R_{ij}$ are complex rotations in the $(ij)$ plane while $P$ and $P^{\prime}$ are phase matrices and $V(a,b)$ given by \begin{equation} V(a,b)=\left( \begin{array}{cccc} \frac{b}{\sqrt{b^2+1}} & \frac{1}{\sqrt{b^2+1}} & 0 & 0 \\ -\frac{a N}{\sqrt{b^2+1}} & \frac{a b N}{\sqrt{b^2+1}} & -\sqrt{b^2+1} N & 0 \\ -N & b N & a N & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} \right) \end{equation} reproduces different mixing schemes such as TBM for different values of $a$ and $b$. For $U_{R3}$ mixing scheme we find following relations: \begin{eqnarray} \sin^2\theta_{14}&=& \sin^2\theta_2\nonumber,\\ \sin^2\theta_{24}&=& \sin^2\theta_{3}\nonumber,\\ \sin^2\theta_{34}&=& 0 \nonumber,\\ \sin^2\theta_{13}&=& N^2 (b^2+1)\sin^2\theta_{1}\nonumber,\\ \sin^2\theta_{12}&=&\frac{\cos^2\theta_{14}\left(a b N \left(a b N \sin^2\theta_{1}+\sin(2\theta_{1}) \cos\phi_1\right)+\cos^2\theta_{1}\right)}{b^2+1}. \end{eqnarray} For the numerical analysis, we generate the parameters $\theta_{1},\theta_{2},\theta_{3}$ and $\phi_{1},\phi_{2},\phi_{3}$ randomly within the ranges $(0 - \frac{\pi}{2}$) and $(0 - 2\pi$), respectively. The parameters $a$ and $b$ are chosen from Table II and available experimental constraints on neutrino oscillation parameters are imposed to check the phenomenological viability of these mixing schemes. Only TBM, BM, GRM1 and GRM2 partial mixings are allowed for $U_{R3}$ mixing scheme at 3$\sigma$ CL and the mixing angle $\theta_{34}$ is predicted to be zero for all these cases. There are similar correlations among neutrino oscillation parameters for all viable partial mixings under $U_{R3}$. Fig. 4, shows scatter plots amongst different neutrino mixing angles for TBM partial mixing under $U_{R3}$. \begin{figure}[h] \begin{center} \epsfig{file=fig4.eps, width=16.5cm, height=5.0cm} \end{center} \caption{Correlation plots among various neutrino oscillation parameters for $U_{R3}$ mixing scheme with TBM as partial flavour symmetry.} \end{figure} \subsection{Mixing Scheme with second row fixed to $N( 1~~b~~a~~0)$} The general mixing scheme with second row fixed to $N( 1~~b~~a~~0)$ is given by \begin{small} \begin{eqnarray} U_{R2}=\left( \begin{array}{cccc} \frac{c_2 e^{i \phi_2} \left(b c_1 e^{i \phi_1}-a N s_1\right)}{\sqrt{b^2+1}} & \frac{c_2 e^{i \phi_2} \left(e^{i \phi_1} c_1+a b N s_1\right)}{\sqrt{b^2+1}} & \sqrt{b^2+1} c_2 e^{i \phi_2} N s_1 & s_2 \\ -N & b N & -a N & 0 \\ \frac{b u-a N x}{\sqrt{b^2+1}} & \frac{u+a b N x}{\sqrt{b^2+1}} & \sqrt{b^2+1} N x & c_2 s_3 \\ \frac{b v+a N y}{\sqrt{b^2+1}} & \frac{v-a b N y}{\sqrt{b^2+1}} & -\sqrt{b^2+1} N y & c_2 c_3 \\ \end{array} \right), \end{eqnarray} \end{small} where $u=-c_3 e^{i (\phi_1+\phi_3)} s_1-c_1 e^{i(\phi_1+\phi_2)} s_2 s_3, v=-c_1 c_3 e^{i (\phi_1+\phi_2)} s_2+e^{i (\phi_1+\phi_3)} s_1 s_3, x=c_1 c_3 e^{i \phi_3}-s_1 s_2 s_3 e^{i \phi_2}, y=c_1 s_3 e^{i \phi_3}+c_3 s_1 s_2 e^{i \phi_2}$. The three independent conditions $|U_{\mu4}|=0,|U_{\mu3}|=a N$ and $|U_{\mu2}|=b N$ give \begin{eqnarray} |\sin\theta_{24}|&=&0,\nonumber\\ \sin^2\theta_{23}&=&\frac{a^2 N^2}{\cos^2\theta_{13}}=\frac{a^2 N^2(1-|U_{e4}|^2)}{1-|U_{e4}|^2-|U_{e3}|^2}, ~ \textrm{and} \\ \cos\delta_{13}&=&-2 b^2 N^2 \csc(2\theta_{12}) \csc\theta_{13} \csc(2\theta_{23})+\frac{1}{2} \tan\theta_{12} \sin\theta_{13} \tan\theta_{23}+\frac{1}{2} \cot\theta_{12} \csc\theta_{13} \cot\theta_{23},\nonumber \end{eqnarray} respectively. This mixing scheme predicts $\theta_{24}=0$ which is not consistent with the recent global (3+1) neutrino oscillation data \cite{li} and is, therefore, phenomenologically ruled out.\\ For the partial mixing schemes discussed above, $a$ and $b$ are fixed to the values listed in Table II while the other parameters $\theta_{1}$, $\theta_{2}$, $\theta_{3}$, $\phi_{1}$, $\phi_{2}$ and $\phi_{3}$ are free. We have not considered the parametrization $U_{C3}$ in which the third column will be $N( 0~~a~~b~~0)^T$ and $U_{R1}$ in which the first row will be $N( a~~b~~0~~0)$, since they predict vanishing (1,3) element of the neutrino mixing matrix which is experimentally ruled out.\\ The above parametrizations have six free parameters viz. $\theta_{1}$, $\theta_{2}$, $\theta_{3}$, $\phi_{1}$, $\phi_{2}$ and $\phi_{3}$. Thus, the six neutrino mixing angles $\theta_{13}$, $\theta_{12}$, $\theta_{23}$, $\theta_{14}$, $\theta_{24}, \theta_{34}$ and the three $CP$-violating phases $\delta_{13}, \delta_{14}$ and $\delta_{24}$ can be expressed in terms of six free parameters. The mixing scheme $U_{R2}$ is not viable, since, it leads to a vanishing $|U_{\mu4}|$ contrary to the current neutrino oscillation data given in Table I. Therefore, we have three viable parametrizations viz., $U_{C1}$, $U_{C2}$ and $U_{R3}$. The full allowed parameter space for the mixing schemes $U_{C1}$, $U_{C2}$ and $U_{R3}$ at 3$\sigma$ CL is given in Table III. Table IV gives the allowed ranges of various parameters at 3$\sigma$ CL for the viable partial mixing schemes. \begin{table}[h] \begin{center} \begin{tabular}{cccccc} \hline \hline Mixing scheme & $a$ & $b$ &$\theta_{1}$&$\theta_{2}$ &$\theta_{3}$ \\ \hline $U_{C1}$ & $1.4-3.6$ & $0.4-2.2$ &$<14^{\circ}$ & $9^{\circ}-18.5^{\circ}$ & $9^{\circ}-18^{\circ}$\\ $U_{C2}$ & $0.7-1.5$ & $0.6-1.7$ &$<14.5^{\circ}$ & $6^{\circ}-13^{\circ}$ & $9^{\circ}-12^{\circ}$ \\ $U_{R3}$ & $1.0-3.6$ & $0.8-2.8$ &$9^{\circ}-15^{\circ}$ & $5.5^{\circ}-10.5^{\circ}$ & $4.0^{\circ}-9.5^{\circ}$\\ \hline \end{tabular} \end{center} \caption{The experimentally allowed values of various parameters at 3$\sigma$ CL for the mixing schemes $U_{C1},U_{C2}$ and $U_{R3}$. The phases $\phi_1,\phi_2$ and $\phi_3$ can take any value within the range $(0 - 2\pi)$.} \end{table} \begin{table}[h] \begin{small} \begin{center} \begin{tabular}{cccccccc} \hline \hline & &$\theta_{1}$&$\theta_{2}$ &$\theta_{3}$&$\phi_{1}$&$\phi_{2}$&$\phi_{3}$ \\ \hline $U_{C1}$ & TBM &$<12.5^{\circ}$ & $9.8^{\circ}-18.2^{\circ}$ & $13^{\circ}-17^{\circ}$& $0-360^{\circ}$ & $0-360^{\circ}$ & $50^{\circ}-141^{\circ}$\\ & & & & & & & $(220^{\circ}-310^{\circ})$\\ & GRM2 &$<12.5^{\circ}$ & $9.6^{\circ}-18^{\circ}$ & $12.9^{\circ}-16.5^{\circ}$& $0-360^{\circ}$ & $0-360^{\circ}$ & $50^{\circ}-150^{\circ}$\\ & & & & & & & $(215^{\circ}-315^{\circ})$\\ \hline & TBM &$<14.2^{\circ}$ & $6.8^{\circ}-13^{\circ}$ & $9.2^{\circ}-11.6^{\circ}$& $0-360^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ & TFH1 &$<14.2^{\circ}$ & $6.8^{\circ}-13^{\circ}$ & $9.2^{\circ}-11.6^{\circ}$& $0-360^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ $U_{C2}$ & TFH2 &$<14.2^{\circ}$ & $6.8^{\circ}-13^{\circ}$ & $9.2^{\circ}-11.6^{\circ}$& $0-360^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ & HM &$<14.2^{\circ}$ & $6.5^{\circ}-12^{\circ}$ & $8.5^{\circ}-11^{\circ}$& $0-360^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ & GRM1 &$<14.1^{\circ}$ & $6.6^{\circ}-12.4^{\circ}$ & $8.8^{\circ}-11.1^{\circ}$& $0-360^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ & GRM2 &$<14^{\circ}$ & $6.8^{\circ}-13^{\circ}$ & $9.3^{\circ}-11.7^{\circ}$& $0-360^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ \hline & TBM &$10.5^{\circ}-13.5^{\circ}$ & $5.5^{\circ}-10.5^{\circ}$ & $4.4^{\circ}-9.5^{\circ}$& $70^{\circ}-130^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ & & & & &$(220^{\circ}-290^{\circ})$& &\\ $U_{R3}$& BM &$10.5^{\circ}-13.5^{\circ}$ & $5.5^{\circ}-10.5^{\circ}$ & $4.4^{\circ}-9.5^{\circ}$& $140^{\circ}-230^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ & GRM1 &$10.5^{\circ}-13.5^{\circ}$ & $5.5^{\circ}-10.5^{\circ}$ & $4.4^{\circ}-9.5^{\circ}$& $40^{\circ}-105^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ & & & & &$(255^{\circ}-325^{\circ})$& &\\ & GRM2 &$11.4^{\circ}-14.5^{\circ}$ & $5.5^{\circ}-10.5^{\circ}$ & $4.4^{\circ}-9.5^{\circ}$& $80^{\circ}-135^{\circ}$ & $0-360^{\circ}$ & $0-360^{\circ}$\\ & & & & &$(225^{\circ}-280^{\circ})$& &\\ \hline \end{tabular} \end{center} \caption{The experimentally allowed values of various parameters at 3$\sigma$ CL for different partial mixing schemes.} \end{small} \end{table} \section{General $4\times4$ Mixing Schemes with one row or one column fixed} In this section, we discuss $4\times4$ partial mixing schemes with one column or one row fixed and none of the mixing matrix element equal to zero. Here, we study the phenomenology of $4\times4$ mixing scheme keeping the first column or first row fixed. \subsection{Mixing Scheme with one column fixed to $N( a~~b~~c~~1)^T$} Here, we discuss the possibility of having any one of the columns of $4\times4$ mixing matrix fixed to $N( a~~b~~c~~1)^T$. Any column of the mixing matrix fixed to $N( a~~b~~c~~1)^T$ gives three independent conditions on the magnitudes of the elements of mixing matrix viz., \begin{equation} |U_{e1}|=a N,~~~~|U_{\mu 1}|=b N~~~ \textrm{and}~~~|U_{c N}|=c N \end{equation} where $N=1/\sqrt{1+a^2+b^2+c^2}$ is the normalization factor. Here, we consider the general mixing matrix of the form \begin{equation} U^{\prime} = P^{\prime}R_{14}(\theta_{4},\phi_{4})R_{12}(\theta_{1},\phi_{1})R_{13}(\theta_{3},\phi_{3})R_{24}(\theta_{5},\phi_{5})R_{23}(\theta_{2},\phi_{2})R_{34}(\theta_{6},\phi_{6}) P \end{equation} where $R_{ij}(\theta_{k},\phi_{l})$ is the rotation matrix in the $i$-$j$ plane with $\phi_{l}$ as the phase angle. $P^{\prime}$ and $P$ are two diagonal phase matrices. In the above mixing matrix, the three phases ($\phi_1,\phi_3,\phi_4$) can be associated with the Majorana-type CP-violating phases and can be extracted out. Using three conditions from Eq. (41), the general mixing matrix with first column fixed to $N( a~~b~~c~~1)^T$ becomes \begin{small} \begin{equation} U^{\prime}_{C1}=\left( \begin{array}{cccc} a N & U_{e2} & U_{e3} & U_{e4} \\ -b N & U_{\mu2} & U_{\mu3} & U_{\mu4} \\ -c N & U_{\tau2} & U_{\tau3} & U_{\tau4} \\ -N & U_{s2} & U_{s3} & U_{s4} \\ \end{array} \right) \end{equation} where \begin{eqnarray} U_{e2}&=&\cos\theta_{2} \left(\sin\theta_{1} \cos\theta_{4} \cos\theta_{5}-e^{i \phi_{5}} \sin\theta_{4} \sin\theta_{5}\right)-e^{i \phi_{2}} \cos\theta_{1} \sin\theta_{2}\sin\theta_{3} \cos\theta_{4},\nonumber\\ U_{e3}&=&\cos\theta_{6} \left(\cos\theta_{1} \cos\theta_{2} \sin\theta_{3} \cos\theta_{4}+e^{-i \phi_{2}} \sin\theta_{2} \left(\sin\theta_{1} \cos\theta_{4} \cos\theta_{5}-e^{i\phi_{5}} \sin\theta_{4} \sin\theta_{5}\right)\right)-\nonumber\\ && e^{i\phi_{6}} \sin\theta_{6} \left(\sin\theta_{4} \cos\theta_{5}+e^{-i\phi_{5}} \sin\theta_{1} \cos\theta_{4} \sin\theta_{5}\right),\nonumber\\ U_{e4}&=&e^{-i \phi_{6}} \sin \theta_{6} \left(\cos\theta_{1} \cos\theta_{2} \sin \theta_{3} \cos\theta_{4}+e^{-i \phi_{2}} \sin\theta_{2} \left(\sin\theta_{1} \cos\theta_{4} \cos\theta_{5}-e^{i\phi_{5}} \sin\theta_{4} \sin\theta_{5}\right)\right)+\nonumber\\ && \cos\theta_{6} \left(\sin\theta_{4} \cos\theta_{5}+e^{-i \phi_{5}} \sin\theta_{1} \cos\theta_{4} \sin\theta_{5}\right),\nonumber\\ U_{\mu2}&=&\cos \theta_{1} \cos \theta_{2} \cos\theta_{5}+e^{i\phi_{2}} \sin\theta_{1} \sin\theta_{2} \sin\theta_{3},\nonumber\\ U_{\mu3}&=&\cos\theta_{6} \left(-\sin\theta_{1} \cos\theta_{2} \sin\theta_{3}+e^{-i\phi_{2}} \cos\theta_{1} \sin\theta_{2} \cos\theta_{5}\right)-\cos\theta_{1} \sin\theta_{5} \sin\theta_{6} e^{i\phi_{6}-i\phi_{5}},\nonumber\\ U_{\mu4}&=&e^{-i\phi_{6}} \sin\theta_{6} \left(-\sin\theta_{1} \cos\theta_{2} \sin\theta_{3}+e^{-i\phi_{2}} \cos\theta_{1} \sin\theta_{2} \cos\theta_{5}\right)+e^{-i \phi_{5}} \cos\theta_{1} \sin\theta_{5} \cos\theta_{6},\nonumber\\ U_{\tau2}&=&-e^{i\phi_{2}} \sin\theta_{2} \cos\theta_{3},\nonumber\\ U_{\tau3}&=&\cos\theta_{2} \cos\theta_{3} \cos\theta_{6},\nonumber\\ U_{\tau4}&=&e^{-i\phi_{6}} \cos\theta_{2} \cos\theta_{3} \sin\theta_{6},\nonumber\\ U_{s2}&=&e^{i\phi_{2}} \cos\theta_{1} \sin\theta_{2} \sin\theta_{3} \sin\theta_{4}+\cos\theta_{2} \left(\sin\theta_{1} \sin\theta_{4} (-\cos\theta_{5})-e^{i\phi_{5}} \cos\theta_{4} \sin\theta_{5}\right),\nonumber\\ U_{s3}&=&\cos\theta_{6}\left(-\cos\theta_{1} \cos\theta_{2} \sin\theta_{3} \sin\theta_{4}+e^{-i \phi_{2}} \sin\theta_{2} \left(\sin\theta_{1} \sin\theta_{4} (-\cos\theta_{5})-e^{i\phi_{5}} \cos\theta_{4} \sin\theta_{5}\right)\right)-\nonumber\\ && e^{i\phi_{6}} \sin\theta_{6} \left(\cos\theta_{4} \cos\theta_{5}-e^{-i \phi_{5}} \sin\theta_{1} \sin\theta_{4})\sin\theta_{5}\right),\nonumber\\ U_{s4}&=&e^{-i\phi_{6}} \sin\theta_{6} \left(-\cos\theta_{1} \cos\theta_{2} \sin\theta_{3} \sin\theta_{4}+e^{-i \phi_{2}} \sin\theta_{2} \left(\sin\theta_{1} \sin\theta_{4} (-\cos\theta_{5})-e^{i\phi_{5}} \cos\theta_{4} \sin\theta_{5}\right)\right)+\nonumber\\ && \cos\theta_{6}\left(\cos\theta_{4} \cos\theta_{5}-e^{-i\phi_{5}} \sin\theta_{1} \sin\theta_{4} \sin\theta_{5}\right) \end{eqnarray} \end{small} with \begin{eqnarray} \sin\theta_{1}&&=\frac{b N}{\sqrt{1-c^2 N^2}},\nonumber\\ \sin\theta_{3}&&=c N,\nonumber\\ \cos\theta_{4}&&=\frac{a N}{\sqrt{1-b^2 N^2-c^2 N^2}}. \end{eqnarray} \subsection{Mixing Scheme with one row fixed to $N( a~~b~~c~~1)$} A mixing scheme with first row fixed to $N( a~~b~~c~~1)$ leads to the following three independent condition on the magnitudes of the elements of neutrino mixing matrix: \begin{eqnarray} |U_{e1}|=a N,~~~|U_{e2}|=bN,~~~|U_{e3}|=cN \end{eqnarray} where $N=1/\sqrt{1+a^2+b^2+c^2}$ is the normalization factor. Considering the mixing scheme of the form \begin{equation} U^{\prime\prime}=R_{34}(\theta_{6},\phi_{6})R_{24}(\theta_{5},\phi_{5})R_{23}(\theta_{2},\phi_{2})R_{14}(\theta_{4})R_{12}(\theta_{1})R_{13}(\theta_{3}) \end{equation} where the three phases ($\phi_1,\phi_3,\phi_4$) associated with the Majorana-type CP-violating phases can be extracted out. Using conditions from Eq. (46), a neutrino mixing scheme with first row fixed is given by \begin{small} \begin{equation} U^{\prime\prime}_{R1}=\left( \begin{array}{cccc} a N & b N & c N & N \\ U_{\mu1} & U_{\mu2} & U_{\mu3} & U_{\mu4} \\ U_{\tau1} & U_{\tau2} & U_{\tau3} & U_{\tau4} \\ U_{s1} & U_{s2} & U_{s3} & U_{s4} \\ \end{array} \right) \end{equation} where \begin{eqnarray} U_{\mu1}&=&\cos\theta_{3} \left(\sin\theta_{1} (-\cos\theta_{2}) \cos \theta_{5}-e^{-i\phi_{5}} \cos\theta_{1} \sin\theta_{4} \sin\theta_{5}\right)-e^{-i \phi_{2}} \sin \theta_{2} \sin\theta_{3} \cos\theta_{5},\nonumber\\ U_{\mu2}&=&\cos\theta_{1} \cos\theta_{2} \cos\theta_{5}-e^{-i \phi_{5}} \sin\theta_{1} \sin\theta_{4} \sin\theta_{5},\nonumber\\ U_{\mu3}&=&\sin\theta_{3} \left(\sin\theta_{1} (-\cos\theta_{2}) \cos (\theta_{5}-e^{-i \phi_{5}} \cos\theta_{1} \sin\theta_{4} \sin\theta_{5}\right)+e^{-i \phi_{2}} \sin \theta_{2} \cos\theta_{3} \cos\theta_{5},\nonumber\\ U_{\mu4}&=&e^{-i\phi_{5}} \cos\theta_{4} \sin\theta_{5},\nonumber\\ U_{\tau1}&=&\cos\theta_{3} (-\sin\theta_{1} \left(-\cos\theta_{2} \sin\theta_{5} \sin\theta_{6} e^{i(\phi_{5}-\phi_{6})}-e^{i \phi_{2}} \sin\theta_{2} \cos\theta_{6}\right)-\nonumber\\ && e^{-i \phi_{6}} \cos\theta_{1} \sin\theta_{4} \cos\theta_{5} \sin\theta_{6})-\sin\theta_{3} \left(\cos\theta_{2} \cos\theta_{6}-\sin\theta_{2} \sin\theta_{5} \sin\theta_{6} e^{i(- \phi_{2}+ \phi_{5}-\phi_{6})}\right),\nonumber\\ U_{\tau2}&=&\cos\theta_{1} \left(-\cos\theta_{2} \sin\theta_{5} \sin\theta_{6} e^{i \phi_{5}-i\phi_{6}}-e^{i \phi_{2}} \sin\theta_{2} \cos\theta_{6}\right)-e^{-i \phi_{6}} \sin\theta_{1} \sin\theta_{4} \cos\theta_{5} \sin\theta_{6},\nonumber\\ U_{\tau3}&=&\sin\theta_{3} (-\sin\theta_{1} \left(-\cos\theta_{2} \sin\theta_{5} \sin\theta_{6} e^{i\phi_{5}-i \phi_{6}}-e^{i \phi_{2}} \sin \theta_{2} \cos\theta_{6}\right)-\nonumber\\ && e^{-i \phi_{6}} \cos\theta_{1} \sin\theta_{4} \cos\theta_{5} \sin\theta_{6})+\cos\theta_{3} \left(\cos\theta_{2} \cos \theta_{6}-\sin\theta_{2} \sin\theta_{5} \sin\theta_{6} e^{i(-\phi_{2}+\phi_{5}-\phi_{6})}\right),\nonumber\\ U_{\tau4}&=&e^{-i\phi_{6}} \cos\theta_{4} \cos\theta_{5} \sin\theta_{6},\nonumber\\ U_{s1}&=&\cos\theta_{3} \left(-\cos\theta_{1} \sin\theta_{4} \cos\theta_{5} \cos\theta_{6}-\sin\theta_{1} \left(\sin\theta_{2} \sin\theta_{6} e^{i(\phi_{2}+\phi_{6})}-e^{i\phi_{5}} \cos\theta_{2} \sin\theta_{5} \cos\theta_{6}\right)\right)-\nonumber\\ && \sin\theta_{3} \left(\sin\theta_{2} \sin\theta_{5} \cos\theta_{6} \left(-e^{i(\phi_{5}-\phi_{2})}\right)-e^{i\phi_{6}} \cos\theta_{2} \sin\theta_{6}\right),\nonumber\\ U_{s2}&=&-\sin\theta_{1} \sin\theta_{4} \cos\theta_{5} \cos\theta_{6}+\cos\theta_{1} \left(\sin\theta_{2} \sin\theta_{6} e^{i(\phi_{2}+ \phi_{6})}-e^{i \phi_{5}} \cos\theta_{2} \sin\theta_{5} \cos\theta_{6}\right),\nonumber\\ U_{s3}&=&\sin\theta_{3} \left(-\cos\theta_{1} \sin\theta_{4} \cos\theta_{5} \cos\theta_{6}-\sin\theta_{1} \left(\sin \theta_{2} \sin\theta_{6} e^{i(\phi_{2}+ \phi_{6})}-e^{i \phi_{5}} \cos\theta_{2} \sin\theta_{5} \cos\theta_{6}\right)\right)+\nonumber\\ && \cos\theta_{3} \left(\sin\theta_{2} \sin\theta_{5} \cos\theta_{6} \left(-e^{i(\phi_{5}-\phi_{2})}\right)-e^{i \phi_{6}} \cos\theta_{2} \sin\theta_{6}\right),\nonumber\\ U_{s4}&=&\cos\theta_{4} \cos\theta_{5} \cos\theta_{6} \end{eqnarray} with \begin{eqnarray} \sin\theta_{1}&=&\frac{b}{\sqrt{a^2+b^2+c^2}},\nonumber\\ \sin\theta_{3}&=&\frac{c}{\sqrt{a^2+c^2}},\nonumber\\ \cos\theta_{4}&=&N \sqrt{a^2+b^2+c^2}~. \end{eqnarray} \end{small} For the numerical analysis, about $10^7\sim10^8$ points are generated randomly. Comparing Eq. (6) with Eq. (43) for $U^{\prime}_{C1}$ mixing and Eq. (48) for $U^{\prime\prime}_{R1}$ mixing, the corresponding six neutrino mixing angles can be calculated by using Eq. (7). The parameters $\theta_{2},\theta_{5},\theta_{6}$ are generated randomly within the range $(0 - \frac{\pi}{2}$) and phases $\phi_{3},\phi_{5},\phi_{6}$ are generated within the range $(0 - 2\pi$). For $U^{\prime\prime}_{R1}$ mixing scheme the parameters $a$, $b$ and $c$ are varied randomly and for $U^{\prime}_{C1}$ mixing these parameters are varied within the ranges: $a<100,b<100,c<100$. Using available experimental constraints on neutrino oscillation parameters, we obtain the correlations among various parameters as shown in Fig. 5 for $U^{\prime}_{C1}$ mixing and Fig. 6 for $U^{\prime\prime}_{R1}$ mixing. The allowed ranges for various parameters at 3$\sigma$ CL are given in Table V. By following the same procedure, we can obtain the $4\times4$ mixing matrix with any column (row) fixed to $N( a~~b~~c~~1)^T$ ($N( a~~b~~c~~1)$). \begin{figure}[h] \begin{center} \epsfig{file=fig5.eps, width=11.cm, height=10.0cm} \end{center} \caption{Correlation plots among parameters $a,b,c$ and among neutrino mixing matrix elements for $U^{\prime}_{C1}$ mixing.} \end{figure} \begin{figure}[h!] \begin{center} \epsfig{file=fig6.eps, width=11.0cm, height=10.0cm} \end{center} \caption{Correlation plots among parameters $a,b,c$ and among neutrino mixing matrix elements for $U^{\prime\prime}_{R1}$ mixing.} \end{figure} \begin{table}[h] \begin{center} \begin{tabular}{cccccccc} \hline \hline Mixing scheme & $a$ & $b$ & $c$ & $\theta_{2}$&$\theta_{5}$ &$\theta_{6}$ & $\phi_{2}$ \\ \hline $U^{\prime}_{C1}$ & - &-&-&$25^{\circ}-55^{\circ}$ & $<30^{\circ}$ & $<20^{\circ}$& $140^{\circ}-220^{\circ}$\\ $U^{\prime\prime}_{R1}$ & $4.0-9.0$ & $2.5-6.5$ & $0.7-1.7$ &$30^{\circ}-60^{\circ}$ & $4^{\circ}-9.5^{\circ}$ & $<12^{\circ}$& $0^{\circ}-360^{\circ}$ \\ \hline \end{tabular} \end{center} \caption{The experimentally allowed values of various parameters at 3$\sigma$ CL for $U^{\prime}_{C1}$ and $U^{\prime\prime}_{R1}$ mixing schemes. The phases $\phi_5$ and $\phi_6$ can take any value within the range $(0 - 2\pi)$.} \end{table} \section{Summary} In this work, we presented new mixing schemes for (3+1) neutrinos. These include partial mixing schemes having one column or one row of the $4\times4$ mixing matrix fixed to that of the popular mixing schemes such as TBM, BM, DM, HM, GRM1, GRM2, TFH1 and TFH2. These mixing schemes are useful to describe active-active and active-sterile neutrino mixings. These partial mixing schemes are obtained by modifications to exact mixing schemes such as TBM, DM, BM, etc. and can be factored into two parts: $V(a,b)$ and $R(\theta,\phi)$. The $V(a,b)$ part represents one of the popular mixing scheme like TBM etc. having flavor symmetric origin and the $R(\theta,\phi)$ part can be considered as a correction to $V(a,b)$. We calculated the experimentally allowed parameter space for the parameters $a$ and $b$. For $U_{C1}$ mixing with first column fixed, only TBM, GRM2 partial mixing schemes are allowed at 3$\sigma$ CL while for $U_{C2}$ mixing with second column fixed, partial mixings TBM, HM, TFH1, TFH2, GRM1 and GRM2 are allowed at 3$\sigma$ CL. For $U_{R3}$ mixing having third row fixed, the allowed partial mixings are: TBM, BM, GRM1, and GRM2. We, also, studied the phenomenology of general mixing schemes for $(3 + 1)$ neutrinos with one column or one row fixed such that the fixed column or row has no vanishing element. \textbf{\textit{\Large{Acknowledgements}}}\\ The research work of S. D. is supported by the Council of Scientific and Industrial Research (CSIR), Government of India, New Delhi vide grant No. 03(1333)/15/EMR-II. S. D. gratefully acknowledges the kind hospitality provided by IUCAA, Pune. R. R. G. acknowledges the financial support provided by the Council of Scientific and Industrial Research (CSIR), Government of India, New Delhi vide grant No. 13(8949-A)/2017-Pool. \section{Appendix: The parametrization $U_{C1}$} Here, we derive the $4\times4$ mixing matrix with first column fixed to $( aN, bN, N, 0)^T$: \begin{equation} U_{C1}=\left( \begin{array}{cccc} a N & u_1 & v_1 & w_1 \\ -b N & u_2 & v_2 & w_2 \\ -N & u_3 & v_3 & w_3 \\ 0 & u_4 & v_4 & w_4 \end{array} \right). \end{equation} The unknown mixing matrix elements can be written as sum of real and imaginary terms and using the orthogonality of columns, we obtain \begin{small} \begin{equation} U_{C1}=\left( \begin{array}{cccc} a N & x_1+i y_1 & x_2+i y_2 & x_5+i y_5 \\ -b N & x_3+i y_3 & x_4+i y_4 & x_6+i y_6 \\ -N & a x_1-b x_3+i (a y_1-b y_3) & a x_2-b x_4+i (a y_2-b y_4) & a x_5-b x_6+i (a y_5-b y_6) \\ 0 & x_7+i y_7 & x_8+i y_8 & x_9+i y_9 \end{array} \right). \end{equation} \end{small} The parameters $y_{1}$, $y_{2}$ and $y_{5}$ can be related to Majorana phases which can be factored out as a Majorana phase matrix. Therefore, substituting $y_{1}=y_{2}=y_{5}=0$ in above equation and using the unitarity constraints $U U^{\dagger}=U^{\dagger} U=1$, we get \begin{small} \begin{eqnarray} x_{5}&=&\sqrt{-a^2 N^2-x_1^2-x_2^2+1},\nonumber\\ x_{4}&=&\frac{a b N^2 x_2-\frac{\sqrt{d}}{2}-x_1 x_2 x_3}{x_2^2+x_5^2},\nonumber\\ x_{6}&=&\frac{a b N^2-x_1 x_3-x_2 x_4}{x_5},\nonumber\\ y_{6}&=&-\frac{x_1 y_3+x_2 y_4}{x_5},\nonumber\\ y_{7}&=&\sqrt{-\frac{f}{g}},\\ x_{8}&=&\frac{x_1 \left(-x_2 x_7 \left(x_6^2+y_6^2\right)+x_4 x_5 (x_6 x_7+y_6 y_7)+x_5 y_4 (x_7 y_6-x_6 y_7)\right)}{e}+\nonumber\\ &&\frac{x_3 x_5 (x_2 x_6 x_7-x_2 y_6 y_7-x_4 x_5 x_7+x_5 y_4 y_7)+x_5 y_3 (x_2 (x_6 y_7+x_7 y_6)-x_5 (x_4 y_7+x_7 y_4))}{e},\nonumber\\ y_{8}&=&\frac{x_2 \left(x_5 (x_3 x_6 y_7+x_3 x_7 y_6-x_6 x_7 y_3+y_3 y_6 y_7)-x_1 y_7 \left(x_6^2+y_6^2\right)\right)}{e}+\nonumber\\ &&\frac{x_4 x_5 (x_1 x_6 y_7-x_1 x_7 y_6-x_3 x_5 y_7+x_5 x_7 y_3)+x_5 y_4 (x_1 x_6 x_7+x_1 y_6 y_7-x_3 x_5 x_7-x_5 y_3 y_7)}{e},\nonumber\\ x_{9}&=&-\frac{x_3 x_6 x_7-x_3 y_6 y_7+x_4 x_6 x_8-x_4 y_6 y_8+x_6 y_3 y_7+x_6 y_4 y_8+x_7 y_3 y_6+x_8 y_4 y_6}{x_6^2+y_6^2},\nonumber\\ y_{9}&=&\frac{x_6 (-x_3 y_7-x_4 y_8+x_7 y_3+x_8 y_4)-y_6 (x_3 x_7+x_4 x_8+y_3 y_7+y_4 y_8)}{x_6^2+y_6^2},\nonumber \end{eqnarray} \end{small} where \begin{small} \begin{eqnarray} d&=&\left(2 a b N^2 x_2-2 x_1 x_2 x_3\right)^2-4 \left(x_2^2+x_5^2\right)\nonumber \\ && \left(a^2 \left(b^2 N^4-N^2 x_5^2\right)-2 a b N^2 x_1 x_3-N^2 x_5^2+x_1^2 \left(x_3^2+y_3^2\right)+ 2 x_1 x_2 y_3 y_4+x_2^2 y_4^2+x_3^2 x_5^2+x_5^2 y_3^2+x_5^2 y_4^2\right),\nonumber \\ e&=&x_2^2 \left(x_6^2+y_6^2\right)-2 x_2 x_4 x_5 x_6-2 x_2 x_5 y_4 y_6+x_4^2 x_5^2+x_5^2 y_4^2,\\ f&=&x_4^2 \left(x_1^2 x_7^2+x_5^2 \left(x_7^2-1\right)\right)+x_1^2 x_6^2 x_7^2+x_1^2 x_7^2 y_4^2+x_1^2 x_7^2 y_6^2-2 x_2 x_4 \left(x_1 x_3 x_7^2+x_5 x_6 \left(x_7^2-1\right)\right)- \nonumber\\ && 2 x_2 y_4 \left(x_1 x_7^2 y_3+x_5 \left(x_7^2-1\right) y_6\right)-2 x_1 x_3 x_5 x_6 x_7^2-2 x_1 x_5 x_7^2 y_3 y_6+ \nonumber\\ && x_2^2 \left(x_3^2 x_7^2+x_6^2 \left(x_7^2-1\right)+ x_7^2 y_3^2+x_7^2 y_6^2-y_6^2\right)+x_3^2 x_5^2 x_7^2+x_5^2 x_7^2 y_3^2+x_5^2 x_7^2 y_4^2-x_5^2 y_4^2, \nonumber\\ g&=&x_1^2 \left(x_4^2+x_6^2+y_4^2+y_6^2\right)-2 x_2 (x_1 x_3 x_4+x_1 y_3 y_4+x_4 x_5 x_6+x_5 y_4 y_6)- \nonumber\\ && 2 x_1 x_5 (x_3 x_6+y_3 y_6)+x_2^2 \left(x_3^2+x_6^2+y_3^2+y_6^2\right)+x_5^2 \left(x_3^2+x_4^2+y_3^2+y_4^2\right). \nonumber \end{eqnarray} \end{small} In total, there are six free parameters in the mixing matrix $U_{C1}$, viz. $x_{1}, x_{2}, x_{3}, y_{3}, y_{4}$ and $x_{7}$. These parameters can be further reparametrized in terms of six angles $\theta_{1}, \theta_{2}, \theta_{3}, \phi_{1}, \phi_{2}$ and $\phi_{3}$ as \begin{eqnarray} x_{1}&=&\sqrt{b^2+1} N \cos\theta_2 \cos\theta_3,\nonumber \\ x_{2}&=&\sqrt{b^2+1} N \cos\theta_2 \sin\theta_3,\nonumber \\ x_{3}&=&\frac{a b N \cos\theta_2 \cos\theta_3+\sin\theta_1 \sin\theta_2 \cos\theta_3 \cos (\phi_1-\phi_2)+\cos\theta_1 \sin\theta_3 \cos\phi_3}{\sqrt{b^2+1}},\nonumber \\ y_{3}&=&\frac{\cos\theta_1 \sin\theta_3 \sin\phi_3-\sin\theta_1 \sin\theta_2 \cos\theta_3 \sin(\phi_1-\phi_2)}{\sqrt{b^2+1}},\\ y_{4}&=&-\frac{\sin\theta_1 \sin\theta_2 \sin\theta_3 \sin(\phi_1-\phi_2)+\cos\theta_1 \cos\theta_3 \sin\phi_3}{\sqrt{b^2+1}},\nonumber\\ x_{7}&=&\sin\theta_1 \sin\theta_3 \cos(\phi_1+\phi_3)-\cos\theta_1 \sin\theta_2 \cos\theta_3 \cos \phi_2. \nonumber \end{eqnarray} With these redefinitions, the most general mixing matrix of type $U_{C1}$ becomes \begin{scriptsize} \begin{eqnarray} U_{C1}=\left( \begin{array}{cccc} a N & \sqrt{b^2+1} c_2 c_3 N & \sqrt{b^2+1} c_2 N s_3 & \sqrt{b^2+1} N s_2 \\ -b N & \frac{\left(a b c_2 c_3 N+c_3 e^{i (\phi_2- \phi_1)} s_1 s_2+c_1 e^{i \phi_3} s_3\right)}{\sqrt{b^2+1}} & \frac{ \left(-c_1 e^{i \phi_3} c_3+a b c_2 N s_3+e^{i (\phi_2-\phi_1)} s_1 s_2 s_3 \right)}{\sqrt{b^2+1}} & \frac{\left(a b N s_2-c_2 e^{i (\phi_2-\phi_1)} s_1\right)}{\sqrt{b^2+1}} \\ -N & \frac{\left(a c_2 c_3 N-b \left(c_3 e^{i (\phi_2-\phi_1)} s_1 s_2+c_1 e^{i \phi_3} s_3\right)\right)}{\sqrt{b^2+1}} & \frac{\left(b c_1 e^{i \phi_3} c_3+a c_2 N s_3-b e^{i (\phi_2-\phi_1)} s_1 s_2 s_3\right)}{\sqrt{b^2+1}} & \frac{\left(b c_2 e^{i (\phi_2-\phi_1)} s_1+a N s_2\right)}{\sqrt{b^2+1}} \\ 0 & e^{i (\phi_1+\phi_3)} s_1 s_3-c_1 c_3 e^{i \phi_2} s_2 & -c_3 e^{i (\phi_1+\phi_3)} s_1-c_1 e^{i \phi_2} s_2 s_3 & c_1 c_2 e^{i \phi_2} \\ \end{array} \right)P. \end{eqnarray} \end{scriptsize}
\section{Introduction} High order methods for the simulation of time-dependent compressible flow have the potential to achieve higher levels of accuracy at lower costs compared to current low order schemes \cite{wang2013high}. In addition to superior accuracy, the low numerical dispersion and dissipation of high order methods \cite{ainsworth2004dispersive} enables the accurate propagation of waves over long distances and time scales. The same properties also make high order methods attractive for unsteady phenomena such as vorticular and turbulent flows, which are sensitive to numerical dissipation \cite{visbal1999high, wang2013high}. However, when applied to nonlinear conservation laws, high order methods can experience artificial growth and blow-up near under-resolved features such as shocks or turbulence. In practice, the application of high order methods to practical problems requires shock capturing and stabilization techniques (such as artificial viscosity) or solution regularization (such as filtering or limiting) to prevent solution blow-up. The resulting schemes for nonlinear conservation laws walk a fine line between stability, robustness, and accuracy. Aggressive stabilization or regularization can result in the loss of high order accuracy, while too little can result in instability \cite{wang2013high}. Moreover, it can be difficult to determine robust expressions for stabilization paramaters, as parameters which work for one simulation can fail when applied to a different physical regime or discretization setting. These issues have motivated the introduction of high order \textit{entropy stable} discretizations, which satisfy a semi-discrete entropy inequality while maintaining high order accuracy in smooth regions. Proofs of continuous entropy inequalities rely on the chain rule, which does not hold discretely due to effects such as quadrature error. Entropy stable schemes \rnote{were originally introduced in the context of finite volume methods} \cite{tadmor1987numerical, tadmor2003entropy, fjordholm2012arbitrarily,chandrashekar2013kinetic, tadmor2016entropy, ray2016entropy}. They were then extended to high order collocation DG methods on tensor product elements in \cite{fisher2013high, carpenter2014entropy, gassner2016split, gassner2017br1} and to simplicial elements in \cite{crean2017high, chen2017entropy, crean2018entropy, chan2017discretely, chan2018discretely}. \rnote{These extensions combine summation-by-parts (SBP) differentiation operators, which satisfy a matrix analogue of integration by parts, with ``flux differencing'' for the discretization of nonlinear convective terms. Together, these techniques circumvents the loss of the chain rule while preserving a semi-discrete analogue of the continuous entropy inequality.} Entropy stable methods have also been extended to a variety of other discretization settings, including staggered grids \cite{parsani2016entropy, fernandez2019staggered}, Gauss-Legendre collocation \cite{chan2018efficient}, and non-conforming meshes \cite{friedrich2017entropy}. Entropy stable ``modal'' DG discretizations \cite{chan2017discretely, chan2018discretely} are built upon flux differencing and the SBP property. However, the SBP property does not hold for certain under-integrated quadrature rules, which arise naturally in some discretization settings. For example, on hybrid meshes consisting of both quadrilateral and triangular elements, it is convenient to utilize the same quadrature rule on shared faces between different element types. On degree $N$ quadrilateral elements, a popular choice of quadrature is an $(N+1)$-point Gauss-Legendre-Lobatto (GLL) rule. When both volume and surface integrals are approximated using $(N+1)$ point GLL quadrature rules, the SBP property holds, despite the fact that GLL quadrature is inexact for the integrands which appear in finite element formulations \cite{fisher2013high}. However, while GLL quadrature induces an SBP property on quadrilateral elements, it does not guarantee an SBP property if used on triangular elements \cite{chan2017discretely}. This work proposes an alternative formulation which utilizes a \note{skew-symmetric construction of the SBP operator which satisfies the SBP property by construction}. Under such a formulation, the proof of entropy stability \note{holds under weaker quadrature rules} compared to the SBP property introduced in \cite{chan2017discretely, chan2018discretely}. We show that this skew-symmetric formulation is entropy stable, locally conservative, and free-stream preserving on curved elements, and confirm theoretical results with numerical experiments on hybrid triangular-quadrilateral meshes. It should be noted that a similar approach to entropy stable discretizations was introduced within a finite difference framework \cite{chen2017entropy, crean2018entropy} using multidimensional differencing operators which satisfy similar accuracy conditions and an SBP property \cite{hicken2016multidimensional}. These operators exist for nodal points corresponding to sufficiently accurate choices of volume and surface quadrature, but do not correspond to any specific basis or approximation space. The formulations in \cite{chen2017entropy, crean2018entropy} differ from the ones presented in this work in that they are based on SBP finite differences and ``nodal'' (rather than ``modal'') DG formulations, with differentiation operators computed algebraically or through an optimization problem for each specific choice of nodes. In contrast, ``modal'' formulations induce quadrature-based operators from an explicit approximation space, and accomodate general choices of volume and surface quadrature (e.g.\ volume quadratures without boundary nodes and over-integrated quadrature rules). The structure of the paper is as follows: Section~\ref{sec:nonlin} describes the continuous entropy inequality which we aim to replicate discretely. Section~\ref{sec:approx} and Section~\ref{sec:sbp} introduce polynomial approximation spaces and quadrature-based SBP operators on simplicial and tensor product elements. Section~\ref{sec:skew1} introduces \note{an alternative skew-symmetric construction of SBP operators and describes how to construct entropy stable formulations on a reference element. Connections between the accuracy of the new skew-symmetric SBP operators and quadrature accuracy are also discussed.} Section~\ref{sec:skew2} extends the skew-symmetric formulation to curved elements, and provides explicit conditions for entropy stability in terms of quadrature accuracy and the polynomial degree of geometric mappings. Section~\ref{sec:num} concludes by presenting numerical experiments which verify the theoretical assumptions, stability, and accuracy of the proposed formulations. \section{Entropy stability for systems of nonlinear conservation laws} \label{sec:nonlin} We begin by reviewing the dissipation of entropy for a $d$-dimensional system of nonlinear conservation laws on a domain $\Omega$ \begin{equation} \pd{\rnote{\bm{u}}}{t} + \sum_{j=1}^d\pd{\bm{f}_j(\bm{u})}{x_j} = \bm{0}, \qquad \bm{u}\in \mathbb{R}^n, \qquad \bm{f}:\mathbb{R}^n\rightarrow\mathbb{R}^n, \label{eq:nonlineqs} \end{equation} where $\bm{u}$ are the conservative variables and $\bm{f}(\bm{u})$ is a vector-valued nonlinear flux function. We are interested in nonlinear conservation laws for which a convex entropy function $U(\bm{u})$ exists. For such systems, the \emph{entropy variables} are an invertible mapping $\bm{v}(\bm{u}):\mathbb{R}^n\rightarrow \mathbb{R}^n$ defined as the derivative of the entropy function with respect to the conservative variables \begin{align} \bm{v}(\bm{u}) = \pd{U}{\bm{u}} \label{eq:entropyvarsmap} \end{align} Several widely used equations in fluid modeling (Burgers, shallow water, compressible Euler and Navier-Stokes equations) yield convex entropy functions $U(\bm{u})$ \cite{hughes1986new, chen2017entropy}. Let $\partial \Omega$ be the boundary of $\Omega$ with outward unit normal $\bm{n}$. By multiplying the equation (\ref{eq:nonlineqs}) with $\bm{v}(\bm{u})^T$, the solutions $\bm{u}$ of (\ref{eq:nonlineqs}) can be shown to satisfy an entropy inequality \begin{equation} \int_{\Omega}\pd{U(\bm{u})}{t}\diff{x} + \int_{\partial \Omega} \sum_{j=1}^d \LRp{\bm{v}(\bm{u})^T\bm{f}_j(\bm{u}) - \psi_j\LRp{\bm{v}(\bm{u})}}n_j \diff{x} \leq 0, \label{eq:entropyineq} \end{equation} where $\bm{n} = \LRp{n_1,\ldots,n_d}$ denotes the outward unit normal, and $\psi_j(\bm{u})$ is some function referred to as the entropy potential. The proof of (\ref{eq:entropyineq}) requires the use of the chain rule \cite{mock1980systems, harten1983symmetric, dafermos2005compensated}. The instability-in-practice of high order schemes for (\ref{eq:nonlineqs}) can be attributed in part to the fact that the discrete form of the equations do not satisfy the chain rule, and thus do not satisfy (\ref{eq:entropyineq}). As a result, discretizations of (\ref{eq:nonlineqs}) do not typically possess an underlying statement of stability. This can be offset in practice by the numerical dissipation inherent in lower order schemes. However, because high order discretizations possess low numerical dissipation, the lack of an underlying discrete stability has contributed to the perception that high order methods are inherently less stable than low order methods. \section{Polynomial approximation spaces} \label{sec:approx} In this work, we consider either simplicial reference elements (triangles and tetrahedra) or tensor product reference elements (quadrilaterals and hexahedra). We define an approximation space using degree $N$ polynomials on the reference element; however, the natural polynomial approximation space differs depending on the element type \cite{chan2015gpu}. On a $d$-dimensional reference simplex, the natural polynomial space consists of total degree $N$ polynomials \[ P^N\LRp{\hat{D}} = \LRc{\hat{x}_1^{i_1}\ldots\hat{x}_d^{i_d}, \quad \hat{\bm{x}} \in \hat{D}, \quad 0\leq \sum_{k=1}^d i_k \leq N}. \] In contrast, the natural polynomial space on a $d$-dimensional tensor product element is the space of maximum degree $N$ polynomials \[ Q^N\LRp{\hat{D}} = \LRc{\hat{x}_1^{i_1}\ldots\hat{x}_d^{i_d}, \quad \hat{\bm{x}} \in \hat{D}, \quad 0\leq i_k \leq N, \quad k = 1,\ldots, d}. \] We denote the natural approximation space on a given reference element $\hat{D}$ by $V^N$. Furthermore, we denote the dimension of $V^N$ as $N_p = {\rm dim}\LRp{V^N\LRp{\hat{D}}}$. The proofs presented in this work will also refer to anisotropic tensor product polynomial spaces, where the maximum polynomial degree varies depending on the coordinate direction. We denote such spaces by $Q^{N_1, \ldots, N_d}$, where $N_k$ are non-negative integers and \[ Q^{N_1, N_2, \ldots, N_d}\LRp{\hat{D}} = \LRc{\hat{x}_1^{i_1}\ldots\hat{x}_d^{i_d}, \quad \hat{\bm{x}} \in \hat{D}, \quad 0\leq i_k \leq N_k, \quad k = 1,\ldots, d}. \] For example, the isotropic tensor product space $Q^N$ is the same as $Q^{N,\ldots,N}$. We also define trace spaces for each reference element. Let $\hat{f}$ be a face of the reference element $\hat{D}$. The trace space $V^N \LRp{\hat{f}}$ is defined as the restrictions of functions in $V^N\LRp{\hat{D}}$ to $\hat{f}$, and denote the dimension of the trace space as ${\rm dim}\LRp{V^N\LRp{{\hat{f}}}} = N^f_p$. \[ V^N \LRp{\hat{f}} = \LRc{ \left.u\right|_{\hat{f}}, \quad u \in V^N\LRp{\hat{D}}, \quad \hat{f}\in \partial\hat{D}}. \] For example, on a $d$-dimensional simplex, $V^N \LRp{\partial \hat{D}}$ consists of total degree $N$ polynomials on simplices of dimension $(d-1)$. On a $d$-dimensional tensor product element, $V^N \LRp{\partial \hat{D}}$ consists of maximum degree $N$ polynomials on a tensor product element of dimension $(d-1)$. \section{Quadrature-based matrices and ``hybridized'' SBP operators} \label{sec:sbp} Let $\hat{D} \subset\mathbb{R}^d$ denote a reference element with surface $\partial \hat{D}$. The high order schemes in \cite{chan2017discretely, chan2018discretely} begin by approximating the solution in a degree $N$ polynomial basis $\LRc{\phi_j(\hat{\bm{x}})}_{\rnote{j}=1}^{N_p}$ on $\hat{D}$. These schemes also assume volume and surface quadrature rules $(\hat{\bm{x}}_i, w_i)$, $\LRp{\hat{\bm{x}}^f_i,w^f_i}$ on $\hat{D}$. We will specify the accuracy of each quadrature rule later, and discuss how quadrature accuracy implies specific operator properties. Let $\bm{V}_q,\bm{V}_f$ denote interpolation matrices, and let $\bm{D}^i$ be the differentiation matrix with respect to the $i$th coordinate such that \begin{gather} \LRp{\bm{V}_q}_{ij} = \phi_j(\hat{\bm{x}}_i), \qquad \LRp{\bm{V}_f}_{ij} = \phi_j(\hat{\bm{x}}^f_i), \qquad \pd{\phi_j(\hat{\bm{x}})}{\hat{x}_i} = \sum_{k=1}^{N_p} \LRp{\bm{D}^i_{jk}} \phi_k(\hat{\bm{x}}). \end{gather} The interpolation matrices $\bm{V}_q,\bm{V}_f$ map basis coefficients to evaluations at volume and surface quadrature points respectively, while the differentiation matrix ${\bm{D}}_i$ maps basis coefficients of a function to the basis coefficients of its derivative with respect to $\hat{x}_k$. The interpolation matrices are used to assemble the mass matrix $\bm{M}$, the quadrature-based projection matrix $\bm{P}_q$, and lifting matrix $\bm{L}_f$ \begin{gather} \bm{M} = \bm{V}_q^T\bm{W}\bm{V}_q, \qquad \bm{P}_q = \bm{M}^{-1}\bm{V}_q^T\bm{W}, \qquad \bm{L}_f = \bm{M}^{-1}\bm{V}_f^T\bm{W}_f, \end{gather} where $\bm{W}, \bm{W}_f$ are diagonal matrices of volume and surface quadrature weights, respectively. \bnote{We have also assumed that the volume quadrature is sufficiently accurate such that the mass matrix $\bm{M}$ is positive-definite and invertible.} The matrix $\bm{P}_q$ is a quadrature-based discretization of the $L^2$ projection operator $\Pi_N$ onto degree $N$ polynomials, which is given as follows: find $\Pi_N u \in V^N$ such that \begin{equation} \int_{\hat{D}} \Pi_N u v = \int_{\hat{D}} u v, \qquad \forall v \in V^N. \label{eq:l2proj} \end{equation} Interpolation, differentiation, and $L^2$ projection matrices can be combined to construct finite difference operators. For example, the matrix $\bm{D}^i_q = \bm{V}_q\bm{D}^i\bm{P}_q$ maps function values at quadrature points to approximate values of the derivative at quadrature points. By choosing specific quadrature rules, $\bm{D}^i_q$ recovers high order summation-by-parts finite difference operators in \cite{gassner2013skew, fernandez2014generalized, ranocha2018generalised} and certain operators in \cite{hicken2016multidimensional}. However, to address difficulties in designing efficient entropy stable interface terms for nonlinear conservation laws, a new ``hybridized'' summation by parts matrix was introduced in \cite{chan2017discretely} which builds interface terms directly into the approximation of the derivative.\footnote{\note{The term ``hybridized'' SBP operator was introduced in the review paper \cite{chenreview}. These operators were originally referred to as ``decoupled'' SBP operators in \cite{chan2017discretely})}.} Let $\hat{\bm{n}}$ denote the scaled outward normal vector $\hat{\bm{n}} = \LRc{\hat{n}_1\hat{J}_f,\ldots,\hat{n}_d\hat{J}_f}$, where $\hat{J}_f$ is the determinant of the Jacobian of the mapping of a face of $\partial \hat{D}$ to a reference face. Let $\hat{\bm{n}}_i$ denote the vector containing values of the $i$th component $\hat{n}_i\hat{J}_f$ at all surface quadrature points, and define the generalized SBP operator \[ \bm{Q}^i = \bm{W}\bm{D}^i_q = \bm{W}\bm{V}_q\bm{D}^i\bm{P}_q. \] The ``hybridized'' summation by parts operator $\bm{Q}^i_N$ is defined as the block matrix involving both volume and surface quadratures \begin{gather} \bm{E} = \bm{V}_f\bm{P}_q, \qquad \bm{B}^i = \bm{W}_f \diag{\hat{\bm{n}}_i}, \qquad \bm{Q}^i_N = \LRs{ \begin{array}{cc} \bm{Q}^i - \frac{1}{2}\bm{E}^T\bm{B}^i\bm{E} & \frac{1}{2}\bm{E}^T\bm{B}^i\\ -\frac{1}{2}\bm{B}^i\bm{E} & \frac{1}{2} \bm{B}^i \end{array}}. \label{eq:QN} \end{gather} Here, $\bm{B}^i$ is a boundary ``integration'' matrix, and $\bm{E}$ denotes the extrapolation matrix which maps values at volume quadrature points to values at surface quadrature points using quadrature-based $L^2$ projection and polynomial interpolation. For $\bm{Q}^i$ which satisfy a ``generalized'' SBP property, the matrix $\bm{Q}^i_N$ also satisfies a summation-by-parts (SBP) property, which is used to prove semi-discrete entropy stability for nonlinear conservation laws. \begin{theorem If $\bm{Q}^i$ satisfies the generalized SBP property \begin{gather} \bm{Q}^i = \bm{E}^T\bm{B}^i\bm{E} - \LRp{\bm{Q}^i}^T, \label{eq:gsbp} \end{gather} then the hybridized SBP operator $\bm{Q}^i_N$ (\ref{eq:QN}) satisfies a summation by parts property: \begin{gather} \bm{Q}^i_N+\LRp{\bm{Q}^i_N}^T = \bm{B}^i_N, \qquad \bm{B}^i_N = \LRp{\begin{array}{cc}\bm{0}&\\ & \bm{B}^i\end{array}}.\label{eq:dsbp} \end{gather} \label{lemma:dsbp} \end{theorem} \begin{proof} The proof is a straightforward extension of Theorem 1 in \cite{chan2017discretely} to polynomial approximation spaces on non-simplicial elements. \qed\end{proof} The matrix $\bm{Q}^i$ satisfies a generalized SBP property if the volume and surface quadrature rules are sufficiently accurate such that the quantities \[ \int_{\hat{D}} \pd{u}{\hat{x}_i} v, \qquad \int_{\partial \hat{D}} u v \hat{n}_i \] are integrated exactly for all $u,v \in V^N\LRp{\hat{D}}$ and $i = 1,\ldots, d$. This implies that Theorem~\ref{lemma:dsbp} is satisfied for sufficiently accurate volume and surface quadratures. For example, on simplicial elements, (\ref{eq:dsbp}) holds if the volume quadrature is exact for polynomial integrands of total degree $(2N-1)$, and the surface integral is exact for degree $2N$ polynomials on each face. Tensor product elements require stricter conditions: (\ref{eq:dsbp}) holds if both the volume and surface quadratures are exact for polynomial integrands of degree $2N$ in each coordinate, due to the fact that derivatives of $u\in Q^N$ are degree $(N-1)$ polynomials with respect to one coordinate and degree $N$ with respect to others. \begin{remark} It should be stressed that the accuracy conditions on volume and surface quadratures are sufficient but not necessary conditions for Theorem~\ref{lemma:dsbp}. For example, it is well known that the use of $(N+1)$ point Gauss-Legendre-Lobatto (GLL) rules for both volume and surface quadratures result in a generalized SBP property, despite the fact that these rules are only accurate for degree $(2N-1)$ polynomials. \label{remark:dsbp} \end{remark} When a generalized SBP property holds for $\bm{Q}^i$, entropy stability can be proven using the SBP property in Theorem~\ref{lemma:dsbp} \cite{chan2017discretely, chan2018discretely}. The focus of this work is to address cases where the generalized SBP property (and as a result, the SBP property in Theorem~\ref{lemma:dsbp}) do not hold. \section{Skew-symmetric entropy conservative formulations on a single element} \label{sec:skew1} While the SBP property has been used to derive entropy stable schemes, \bnote{it is difficult to enforce the SBP property (\ref{eq:dsbp}) for $\bm{Q}^i_N$} in certain discretization settings, such as hybrid and non-conforming meshes. This difficulty is a result of the choices of volume and surface quadrature which naturally arise in these settings. We first illustrate how specific pairings of volume and surface quadratures can result in the loss of the SBP property (\ref{eq:dsbp}) \bnote{for $\bm{Q}^i_N$}. We then propose an \note{alternative skew-symmetric version of the hybridized SBP operator which satisfies the SBP property by construction}. The use of these operators results in formulations which are entropy conservative \bnote{under a wider range of quadratures.} \subsection{Loss of the SBP property} In this section, we give examples of specific pairings of volume and surface quadratures under which the decoupled SBP property does not hold (see Figure~\ref{fig:sbploss}). We consider two dimensional reference elements $\hat{D}$ with spatial coordinates $x,y$. \begin{figure} \centering \subfloat[GLL volume quadrature, Gauss surface quadrature]{\includegraphics[width=.4\textwidth]{gllgauss.png}\label{subfig:gllgq}} \hspace{2em} \subfloat[Degree $2N$ volume quadrature, GLL surface quadrature]{\includegraphics[width=.4\textwidth]{trigll.png}\label{subfig:trigll}} \caption{Volume and surface quadrature pairs which do not satisfy the assumptions of Theorem~\ref{lemma:dsbp}, and thus do not possess the decoupled SBP property (\ref{eq:dsbp}). Volume quadrature nodes are drawn as circles, while surface quadrature nodes are drawn as squares.} \label{fig:sbploss} \end{figure} \paragraph{Quadrilateral elements (Figure~\ref{subfig:gllgq})} We first consider a quadrilateral element $\hat{D}$ with an $(N+1)$ point tensor product GLL volume quadrature and $(N+1)$ point Gauss quadrature on each face. Let $u,v \in Q^N$ denote two arbitrary degree $N$ polynomials. The assumptions of Theorem~\ref{lemma:dsbp} are that the volume quadrature exactly integrates $\int_{\hat{D}} \pd{u}{x_i} v$ and that the surface quadrature exactly integrates $\int_{\partial \hat{D}} u v \hat{n}_i$ on $\hat{D}$. Because the $(N+1)$-point Gauss rule is exact for polynomials of degree $2N+1$ and the product $uv \in P^{2N}$ on each face, the surface quadrature satisfies the assumptions of Theorem~\ref{lemma:dsbp}. However, the 1D GLL rule is only exact for polynomials of degree $(2N-1)$. The derivative $\pd{u}{x}$ is a polynomial of degree $(N-1)$ in $x$, but is degree $N$ in $y$. Thus, $\pd{u}{x}v$ is a polynomial of degree $(2N-1)$ in $x$ but degree $2N$ in $y$, and is not integrated exactly by the volume quadrature. \paragraph{Triangular elements (Figure~\ref{subfig:trigll})} We next consider a triangular element $\hat{D}$, where the volume quadrature is exact for degree $2N$ polynomials \cite{xiao2010quadrature} and an $(N+1)$-point GLL quadrature on each face. Let $u,v \in P^N$ denote two arbitrary degree $N$ polynomials. The derivative $\pd{u}{x} \in P^{(N-1)}$, and $\pd{u}{x}v \in P^{(2N-1)}$, so the volume quadrature satisfies the assumptions of Theorem~\ref{lemma:dsbp}. However, because the surface quadrature is exact only degree $(2N-1)$ polynomials and the trace of $uv\in P^{2N}$, the surface quadrature does not satisfy the assumptions of Theorem~\ref{lemma:dsbp}. \begin{figure} \centering \begingroup \captionsetup[subfigure]{width=.425\textwidth} \subfloat[Insufficiently accurate surface quadrature on the triangle element.]{\includegraphics[width=.425\textwidth]{hybrid2D.png}\label{subfig:hybrid1}} \endgroup \hspace{2em} \subfloat[Incompatible surface quadrature on the quadrilateral element.]{\includegraphics[width=.425\textwidth]{hybrid2D_GQ.png}\label{subfig:hybrid2}} \caption{Examples of interface couplings which do not result in a decoupled SBP property (\ref{eq:dsbp}). Volume quadrature nodes are drawn as circles, while surface quadrature nodes are drawn as squares. } \label{fig:hybrid} \end{figure} \paragraph{}These specific pairings of volume and surface quadratures appear naturally for hybrid meshes consisting of DG-SEM quadrilateral elements (using GLL volume quadrature) and triangular elements, as shown in Figure~\ref{fig:hybrid}. In Figure~\ref{subfig:hybrid1}, the surface quadrature is a $(N+1)$ point GLL rule, and results in a loss of the SBP property on the triangle. In Figure~\ref{subfig:hybrid2}, the surface quadrature is a $(N+1)$ point Gauss-Legendre rule, and results in a loss of the SBP property on the quadrilateral element. The goal of this work is to construct high order accurate discretizations which preserve entropy conservation for situations in which the decoupled SBP property (\ref{eq:dsbp}) does not hold. \subsection{\bnote{An alternative construction of hybridized SBP operators}} The property (\ref{eq:dsbp}) relates the polynomial exactness of specific quadrature rules to algebraic properties of quadrature-based matrices. We will relax accuracy conditions on these quadrature rules by utilizing \note{an alternative construction of $\bm{Q}^i_N$ based on the skew-symmetric matrix $\bm{Q}^i - \LRp{\bm{Q}^i}^T$. \begin{lemma} \bnote{Let $\tilde{\bm{Q}}^i_{N}$ denote the skew-hybridized SBP operator defined by \begin{equation} \tilde{\bm{Q}}^i_{N} = \frac{1}{2}\begin{bmatrix} \bm{Q}^i - \LRp{\bm{Q}^i}^T & \bm{E}^T\bm{B}^i\\ -\bm{B}^i\bm{E} & \bm{B}^i \end{bmatrix}. \label{eq:skewQN} \end{equation} Then, $\tilde{\bm{Q}}^i_{N}$ satisfies the SBP property (\ref{eq:dsbp}), and $\tilde{\bm{Q}}^i_N$ and ${\bm{Q}}^i_N$ are identical if $\bm{Q}^i$ satisfies a generalized SBP property (\ref{eq:gsbp}).} \end{lemma} \begin{proof} The SBP property (\ref{eq:dsbp}) holds by construction. The equivalence between $\tilde{\bm{Q}}^i_N$ and ${\bm{Q}}^i_N$ requires that \[ \frac{1}{2}\LRp{\bm{Q}^i + \LRp{\bm{Q}^i}^T} = \bm{Q}^i - \frac{1}{2}\bm{E}^T\bm{B}^i\bm{E}. \] Rearranging terms shows that this condition is equivalent to a scaling of the GSBP property (\ref{eq:gsbp}) \[ \frac{1}{2}\bm{Q}^i = \frac{1}{2}\LRp{\bm{E}^T\bm{B}^i\bm{E} - \LRp{\bm{Q}^i}^T}. \] \end{proof} While $\tilde{\bm{Q}}^i_N$ is guaranteed to satisfy the SBP property, the accuracy of $\tilde{\bm{Q}}^i_N$ as a differentiation operator now depends on the volume and surface quadrature rules. Before analyzing accuracy, we first derive conditions under which it is possible to use $\tilde{\bm{Q}}^i_N$ to construct entropy stable formulations of nonlinear conservation laws. } \subsection{Entropy stability on a reference element} \label{sec:singleelem} In this section, we construct so-called ``entropy stable'' schemes on the reference element $\hat{D}$. These methods ensure that the entropy inequality (\ref{eq:entropyineq}) is satisfied discretely by avoiding the use of the chain rule in the proof of entropy dissipation. Entropy stable schemes rely on two main ingredients: an entropy stable numerical flux as defined by Tadmor \cite{tadmor1987numerical} and a concept referred to as ``flux differencing''. Let $\bm{f}_S\LRp{\bm{u}_L,\bm{u}_R}$ be a numerical flux function which is a function of ``left'' and ``right'' states $\bm{u}_L,\bm{u}_R$. The numerical flux $\bm{f}_S$ is \textit{entropy conservative} if it satisfies the following three conditions: \begin{gather} \bm{f}^i_S(\bm{u},\bm{u}) = \bm{f}_i(\bm{u}), \qquad \text{(consistency)}\label{eq:esflux}\\ \bm{f}^i_S(\bm{u}_L,\bm{u}_R) = \bm{f}^i_S(\bm{u}_R,\bm{u}_R), \qquad \text{(symmetry)}\nonumber\\ \LRp{\bm{v}_L-\bm{v}_R}^T\bm{f}^i_S(\bm{u}_L,\bm{u}_R) = \psi_i(\bm{u}_L) - \psi_i(\bm{u}_R), \qquad \text{(conservation)}\nonumber \end{gather} for $i = 1,\ldots, d$. The construction of entropy stable schemes will utilize \rnote{(\ref{eq:esflux})} in discretizations of both volume and surface terms in a DG formulation. We can now construct a skew-symmetric formulation on the reference element $\hat{D}$ and show that it is semi-discretely entropy conservative \bnote{under one additional condition on $\tilde{\bm{Q}}^i_N$}. This formulation can be made entropy stable by adding interface dissipation. Let $\bm{u}_h$ denote the discrete solution, and let $\bm{u}_q$ denote the values of the solution at volume quadrature points. We define the auxiliary conservative variables $\tilde{\bm{u}}$ in terms of the $L^2$ projections of the entropy variables \begin{gather} \bm{v}_q = \bm{v}\LRp{\bm{u}_q}, \qquad \tilde{\bm{v}} = \begin{bmatrix} \bm{V}_q\\ \bm{V}_f \end{bmatrix}\bm{P}_q\bm{v}_q, \qquad \tilde{\bm{u}} = \bm{u}\LRp{\tilde{\bm{v}}}. \end{gather} A matrix formulation for (\ref{eq:nonlineqs}) on $\hat{D}$ is given in terms of $\tilde{\bm{u}}$ \bnote{\begin{gather} \bm{M}\td{\bm{u}_h}{t} + \sum_{i=1}^d\LRs{\begin{array}{c} \bm{V}_q \\ \bm{V}_f\end{array}}^T \LRp{2\tilde{\bm{Q}}^i_N \circ \bm{F}^i_S}\bm{1} + \bm{V}_f^T\bm{B}^i\LRp{\bm{f}_i^*-\bm{f}(\tilde{\bm{u}}_f)} = 0, \label{eq:esdgSkew}\\ \LRp{\bm{F}^i_S}_{jk} = \bm{f}^i_S\LRp{\tilde{\bm{u}}_j,\tilde{\bm{u}}_k}, \qquad 1\leq j,k \leq N_q + N^f_q,\nonumber \end{gather} where $\tilde{\bm{u}}_f$ denotes the values of $\tilde{\bm{u}}$ on face nodes and $\bm{f}^*$ is some numerical flux, and $N_q, N^f_q$ denote the number of volume and face quadrature points, respectively. . This formulation is identical to that of \cite{chan2017discretely}, except that the hybridized SBP operators $\bm{Q}^i_N$ are replaced with their skew-hybridized versions $\tilde{\bm{Q}}^i_N$. For this reason, we refer to (\ref{eq:esdgSkew}) as the ``skew-symmetric'' formulation. Under the condition that $\tilde{\bm{Q}}^i_N \bm{1} = \bm{0}$, the formulation (\ref{eq:esdgSkew}) is entropy conservative over $\hat{D}$:} \begin{theorem} \bnote{Assume that $\tilde{\bm{Q}}^i_N \bm{1} = \bm{0}$. } Then, the formulation (\ref{eq:esdgSkew}) is entropy conservative such that \begin{equation} \bm{1}^T\bm{W}\td{U(\bm{u}_q)}{t} + \sum_{i=1}^d\bm{1}^T\bm{B}^i \LRp{\tilde{\bm{v}}_f^T\bm{f}_i^* - \psi_i(\tilde{\bm{u}}_f)} = 0, \qquad \bm{u}_q = \bm{V}_q\bm{u}_h. \label{eq:esdgthm} \end{equation} \rnote{Here, $\psi_i(\tilde{\bm{u}}_f)$ denotes the function $\psi_i$ evaluated at the face values of the entropy-projected conservative variables $\tilde{\bm{u}}_f$}. \label{thm:esdg} \end{theorem} The steps of the proof are identical to those of Theorem 2 in \cite{chan2017discretely}, and we skip them for brevity. \begin{remark} We note that (\ref{eq:esdgSkew}) is also equivalent to the following skew-symmetric formulation: \begin{gather} \bm{M}\td{\bm{u}_h}{t} + \sum_{i=1}^d\LRs{\begin{array}{c} \bm{V}_q \\ \bm{V}_f\end{array}}^T \LRp{\LRp{\bm{Q}^i_N - \LRp{\bm{Q}^i_N}^T} \circ \bm{F}^i_S}\bm{1} + \bm{V}_f^T\bm{B}^i\bm{f}_i^* = 0, \label{eq:esdgSkew2}\\ \LRp{\bm{F}^i_S}_{jk} = \bm{f}^i_S\LRp{\tilde{\bm{u}}_j,\tilde{\bm{u}}_k}, \qquad 1\leq j,k \leq N_q + N^f_q,\nonumber \end{gather} where the skew-symmetric matrix $\LRp{\bm{Q}^i_N - \LRp{\bm{Q}^i_N}^T}$ possesses the following block structure: \[ \LRp{\bm{Q}^i_N - \LRp{\bm{Q}^i_N}^T} = \begin{pmatrix} \bm{Q}_i-\bm{Q}_i^T & {\bm{E}}^T \bm{B}^i\\ -\bm{B}^i\bm{E} & \bm{0} \end{pmatrix}. \] \end{remark} The skew symmetric formulation can also be shown to be locally conservative in the sense of \cite{shi2017local}, which is necessary to prove that the numerical solution convergences to the weak solution under mesh refinement. \begin{theorem} The formulation (\ref{eq:esdgSkew}) is locally conservative such that \begin{align} \bm{1}^T\bm{W}\td{\LRp{\bm{V}_q\bm{u}}}{t} + \sum_{i=1}^d\bm{1}^T\bm{B}^i\bm{f}_i^* = 0. \end{align} \end{theorem} \begin{proof} To show local conservation, we test (\ref{eq:esdgSkew}) with $1$ \begin{align} \bm{1}^T\bm{W}\bm{V}_q\td{\bm{u}_h}{t} + \sum_{i=1}^d \bm{1}^T \LRp{\LRp{\bm{Q}^i_N - \LRp{\bm{Q}^i_N}^T} \circ \bm{F}_S}\bm{1} + \bm{1}^T\bm{W}_f \diag{\hat{\bm{n}}}\bm{f}_i^* = 0. \end{align} Because $\bm{F}_S$ is symmetric and $\LRp{\bm{Q}^i_N - \LRp{\bm{Q}^i_N}^T}$ is skew-symmetric, their Hadamard product is also skew-symmetric. Using that $\bm{x}^T\bm{A}\bm{x} = 0$ for any skew symmetric matrix $\bm{A}$, the volume term $\bm{1}^T\LRp{\LRp{\bm{Q}^i_N - \LRp{\bm{Q}^i_N}^T} \circ \bm{F}_S}\bm{1}$ vanishes. \qed\end{proof} \subsection{\bnote{Properties of $\tilde{\bm{Q}}^i_N$ and quadrature accuracy}} \bnote{The proof of the semi-discrete entropy inequality in Theorem~\ref{thm:esdg} requires both the SBP condition (\ref{eq:dsbp}) and that $\tilde{\bm{Q}}^i_N\bm{1} = \bm{0}$. While the SBP condition is guaranteed by construction, $\tilde{\bm{Q}}^i_N\bm{1} = \bm{0}$ only holds under sufficiently accurate quadrature rules. In \cite{chan2017discretely}, it was shown that the hybridized SBP operator satisfies $\bm{Q}^i_N\bm{1} = \bm{0}$ for any volume quadrature such that the mass matrix $\bm{M}$ is positive-definite. However, ensuring that the skew-hybridized SBP operator satisfies $\tilde{\bm{Q}}^i_N\bm{1} = \bm{0}$ now requires conditions on both volume and surface quadratures which are related to a weak version of the generalized SBP condition (\ref{eq:gsbp}). } Throughout the remainder of this work, we will assume that the \bnote{volume and surface quadrature satisfy the following assumptions} for specific functions $v(\bm{x})$: \begin{assumption} \label{ass:quad} Let $v \in V^{N}$ denote some fixed polynomial. We assume that: \begin{enumerate} \item the mass matrix $\bm{M}$ is positive definite under the volume quadrature rule, \item the volume quadrature rule is exact for integrals of the form\\$\int_{\hat{D}} \pd{u}{\hat{x}_j} v$ for all $u \in V^N\LRp{\hat{D}}$, $j = 1,\ldots, d$. \item the surface quadrature rule is exact for integrals of the form\\$\int_{\partial \hat{D}} u v \hat{n}_j$ for all $u \in V^N\LRp{\hat{D}}$, $j = 1,\ldots, d$, and $f \in \partial \hat{D}$. \end{enumerate} \end{assumption} The conditions of Assumption~\ref{ass:quad} are relatively standard within the SBP literature \cite{hicken2016multidimensional, chan2017discretely, crean2018entropy}, though they have not previously depended on the specific choice of polynomial $v(\bm{x})$. \bnote{The following theorem shows how these accuracy conditions are related to the condition $\tilde{\bm{Q}}^i_N\bm{1} = \bm{0}$. \begin{lemma \label{lemma:sbpcor} \bnote{Suppose Assumption~\ref{ass:quad} holds for $v(\bm{x}) = 1$. Then, $\tilde{\bm{Q}}^i_N\bm{1} = \bm{0}$.} \end{lemma} \begin{proof} \bnote{ Expanding out $\tilde{\bm{Q}}^i_N\bm{1}$ yields \[ \tilde{\bm{Q}}^i_N\bm{1} = \frac{1}{2}\begin{bmatrix} \bm{Q}^i\bm{1} - \LRp{\bm{Q}^i}^T \bm{1} + \bm{E}^T\bm{B}^i \bm{1}\\ -\bm{B}^i\bm{E}\bm{1} + \bm{B}^i\bm{1}\end{bmatrix}. \] Here, $\bm{1}$ denotes the appropriate length vector with all entries equal to one. Since polynomials are equal to their $L^2$ projection, $\bm{E}\bm{1} = \bm{1}$ \cite{chan2017discretely,chan2018discretely}, and \[ -\bm{B}^i\bm{E}\bm{1} + \bm{B}^i\bm{1} = \bm{0}. \] Moreover, since $\bm{Q}^i$ is a differentation matrix, $\bm{Q}^i\bm{1} = \bm{0}$, and showing $\tilde{\bm{Q}}^i_N\bm{1} = \bm{0}$ reduces to showing that \[ \LRp{\bm{Q}^i}^T \bm{1} = \bm{E}^T\bm{B}^i \bm{1}. \] However, under Assumption~\ref{ass:quad}, the entries of $\LRp{\bm{Q}^i}^T \bm{1}$ are exactly $\int_{\hat{D}} \pd{\phi_j}{\hat{\bm{x}}_i}$ and the entries of $\bm{E}^T\bm{B}^i \bm{1}$ are exactly $\int_{\partial \hat{D}} \phi_j(\bm{x}) \hat{n}_i$ since $\phi_j(\bm{x}) \in V^N$. These two terms are then identical by the exactness of integrals and fundamental theorem of calculus. } \qed\end{proof} In Sections~\ref{sec:singleelem} and \ref{sec:curved}, specific polynomials $v(\bm{x})$ will be motivated by \note{the extension of the proof of entropy stability on curved elements}, and we will present examples of volume and surface quadrature rules on simplicial and tensor product elements which satisfy Assumption~\ref{ass:quad} for these choices of $v$. \subsection{On quadrature conditions for Assumption~\ref{ass:quad} with $v = 1$} \label{sec:assump1} Apart from algebraic manipulations, only Lemma~\ref{lemma:sbpcor} is necessary to prove entropy conservation in Theorem~\ref{thm:esdg}. Lemma~\ref{lemma:sbpcor} requires that Assumption~\ref{ass:quad} holds for $v=1$. Thus, the volume and surface quadratures must be sufficiently accurate to guarantee that the mass matrix is positive definite and to integrate \begin{equation} \int_{\hat{D}} \pd{u}{x_i}, \qquad \int_{\partial \hat{D}} u \hat{n}_i. \label{eq:affineints} \end{equation} On simplicial elements, the mass matrix is guaranteed to be positive definite for any volume quadrature which is exact for degree $2N$ polynomial integrands. This choice of volume quadrature also guarantees that the volume term in (\ref{eq:affineints}) is integrated exactly. The surface quadrature can thus be taken to be any quadrature rule which is exact for only degree $N$ integrands on faces. In contrast, the construction of simplicial decoupled SBP operators has required face quadratures which are accurate for degree $2N$ polynomials \cite{chan2017discretely, chan2018discretely}. On tensor product elements, we can take any degree $(2N-1)$ quadrature rule which ensures a positive definite mass matrix (e.g.\ a $(N+1)$-point GLL quadrature), as a quadrature of this accuracy is sufficient to exactly integrate the volume term in (\ref{eq:affineints}). For the surface quadrature, we can again take any quadrature rule which is exact for degree $N$ polynomial integrands. For example, on a quadrilateral element, one can use $\left\lceil\frac{N+1}{2}\right\rceil$-point Gauss quadrature rule or a $\left\lceil\frac{N+3}{2}\right\rceil$-point GLL rule as face quadratures for a degree $N$ scheme. On tensor product elements, we restrict ourselves to isotropic volume quadrature rules which are construced from tensor products of one-dimensional quadrature formulas. For the remainder of this work, the degree of the multi-dimensional quadrature rule on tensor product elements will refer to the degree of exactness of the one-dimensional rule. For example, we refer to the quadrature rule constructed through a tensor product of one-dimensional $(N+1)$-point GLL quadrature rules as a degree $(2N-1)$ quadrature rule. This choice of quadrature is sufficient to guarantee that the mass matrix is positive definite \cite{canuto2007spectral}. \subsection{On the accuracy of \bnote{skew-hybridized SBP operators }} \label{sec:accskew} It was shown in \cite{chan2017discretely, chan2018efficient} that the \bnote{hybridized SBP operator $\bm{Q}^i_N$} can be interpreted as augmenting a volume approximation of the derivative with boundary correction terms. Let $f(\bm{x}),g(\bm{x})$ denote two $L^2$ integrable functions, and let $\bm{f}_N, \bm{g}_N$ denote the vectors of values of $f,g$ at both volume and surface quadrature points. A degree $N$ approximation $u\in V^N$ to $f\pd{g}{x_i}$ can be constructed via \begin{equation} \bm{M}\bm{u} = \LRs{\begin{array}{c} \bm{V}_q \\ \bm{V}_f\end{array}}^T \diag{\bm{f}_N}\bm{Q}^i_N\bm{g}_N, \qquad \bm{f}_N = \begin{bmatrix} \bm{f}_q\\ \bm{f}_f\end{bmatrix}, \quad \bm{g}_N = \begin{bmatrix} \bm{g}_q\\ \bm{g}_f\end{bmatrix}, \label{eq:dsbpmatrixform} \end{equation} where $\bm{u}$ denotes the vector of coefficients for $u$. This algebraic expression (\ref{eq:dsbpmatrixform}) can be reinterpreted as a quadrature approximation of a variational problem, which can be mapped to a physical element $D^k$. We seek to approximate $f\pd{g}{x_i}$ by $u \in V^N$ such that, $\forall v\in V^N$ \begin{equation} \int_{D^k} u v = \int_{D^k} f\pd{\Pi_N g}{{x}_i}v + \int_{\partial {D}^k} \LRp{g - \Pi_Ng} \LRp{\frac{fv + \Pi_N(fv)}{2}} {n}^k_i,\label{eq:var} \end{equation} where $\Pi_N$ is the $L^2$ projection operator (\ref{eq:l2proj}). Integrating half of the volume term by parts yields the skew-symmetric form of (\ref{eq:var}) \begin{align} \int_{D^k} u v &=\frac{1}{2} \int_{{D^k}} \LRp{f\pd{\Pi_N g}{{x}_i}v - g \pd{\Pi_N\LRp{fv}}{{x}_i}} \label{eq:skewDN}\\ &+\frac{1}{2} \int_{\partial {D}^k} \LRp{fgv + \LRp{g - \Pi_Ng} \LRp{{fv + \Pi_N(fv)}{}}} {n}^k_i \qquad \forall v\in V^N\nonumber, \end{align} which yields a matrix formulation \bnote{involving the skew-hybridized SBP operator $\tilde{\bm{Q}}^i_N$} \begin{align} \bm{M}\bm{u} =& \frac{1}{2}\LRs{\begin{array}{c} \bm{V}_q \\ \bm{V}_f\end{array}}^T \diag{\bm{f}_N}\underbrace{\LRp{\bm{Q}^i_N - \LRp{\bm{Q}^i_N}^T + \bm{B}^i_N}}_{\tilde{\bm{Q}}^i_N}\bm{g}_N \label{eq:dsbpmatrixform2}. \end{align} The accuracy of the formulation (\ref{eq:esdgSkew}) can be understood by analyzing the degree of polynomial exactness of (\ref{eq:dsbpmatrixform2}) as an approximation of the derivative. Let $u(\bm{x})$ be a polynomial of degree $\leq N$ with coefficients $\bm{u}$, and let $\bm{u}_N = \LRs{\bm{u}_q, \bm{u}_f}^T$ denote the values of $u(\bm{x})$ at volume and surface quadrature points. An approximation of $\pd{u}{x_i}$ can be computed by applying (\ref{eq:dsbpmatrixform}) to compute \begin{align} \pd{u}{x_i}\approx \bm{M}^{-1}\LRs{\begin{array}{c} \bm{V}_q \\ \bm{V}_f\end{array}}^T \tilde{\bm{Q}}^i_N\bm{u}_N. \label{eq:dsbpapprox} \end{align} From (\ref{eq:dsbpapprox}), it can be shown that when $\bm{Q}^i$ satisfies a generalized SBP property, the hybridized SBP operator (\ref{eq:dsbp}) produces a degree $N$ approximation to the derivative \cite{chan2017discretely}. When $\bm{Q}^i$ does not satisfy a generalized SBP property, we have the following lemma on the accuracy of (\ref{eq:dsbpapprox}): \begin{lemma} Let $M\leq N$. Suppose that the volume quadrature is exact for degree $M+N-1$ polynomials on simplices, or for polynomials in $Q^{M+N-1,M+N,M+N}$ on tensor product elements. Furthermore, assume that the surface quadrature is exact for degree $M+N$ polynomials on simplices and $Q^{M+N,M+N}$ on tensor product elements. \bnote{Then, so long as the mass matrix is positive definite}, the skew-symmetric approximation of the $x$-derivative (\ref{eq:dsbpapprox}) is exact for polynomials of degree $M$. \label{lemma:dsbpapprox} \end{lemma} \begin{proof} \bnote{Suppose $u \in V^M$. Let $\bm{u}$ denote the polynomial coefficients of $u$, and let $\bm{e}$ denote the difference between $\bm{D}^i\bm{u}$ (the exact coefficients of $\pd{u}{x_i}$) and the approximation (\ref{eq:dsbpapprox}) \[ \bm{e} = \bm{D}^i\bm{u} - \bm{M}^{-1}\LRs{\begin{array}{c} \bm{V}_q \\ \bm{V}_f\end{array}}^T\tilde{\bm{Q}}^i_N\bm{u}_ \] where $\bm{e}$ is a polynomial of degree $N$. Since $u(\bm{x})$ is polynomial, the values of $u(\bm{x})$ at quadrature points are $\bm{u}_q = \bm{V}_q\bm{u}$ and $\bm{u} = \bm{P}_q\bm{u}_q$. This implies that $\bm{u}_f = \bm{V}_f \bm{P}_q\bm{u}_q = \bm{E}\bm{u}_q$. Expanding the latter term yields \begin{align*} \bm{M}^{-1}\LRs{\begin{array}{c} \bm{V}_q \\ \bm{V}_f\end{array}}^T\tilde{\bm{Q}}^i_N\bm{u}_N &= \frac{1}{2}\bm{M}^{-1}\LRs{\begin{array}{c} \bm{V}_q \\ \bm{V}_f\end{array}}^T\begin{bmatrix} \bm{Q}^i - \LRp{\bm{Q}^i}^T & \bm{E}^T\bm{B}^i\\ -\bm{B}^i\bm{E} & \bm{B}^i \end{bmatrix}\begin{bmatrix} \bm{u}_q\\ \bm{u}_f \end{bmatrix}\\ &= \frac{1}{2}\bm{M}^{-1}\LRs{\begin{array}{c} \bm{V}_q \\ \bm{V}_f\end{array}}^T\begin{bmatrix} \bm{Q}^i\bm{u}_q + \LRp{\bm{E}^T\bm{B}^i\bm{E} - \LRp{\bm{Q}^i}^T}\bm{u}_q\\ \bm{B}^i\LRp{\bm{u}_f - \bm{E}\bm{u}_q} \end{bmatrix} \\ &=\frac{1}{2}\bm{M}^{-1} \bm{V}_q^T\LRp{\bm{Q}^i\bm{u}_q + \LRp{\bm{E}^T\bm{B}^i\bm{E} - \LRp{\bm{Q}^i}^T}\bm{u}_q}. \end{align*}} Since $\bm{Q}^i = \bm{W}\bm{V}_q\bm{D}^i\bm{P}_q$ and $\bm{M} = \bm{V}_q^T\bm{W}\bm{V}_q$, we have that $\bm{M}^{-1}\bm{V}_q^T\bm{Q}^i\bm{u}_q = \bm{D}^i\bm{u}$. This simplifies the expression for error to \begin{align} \bm{e}^T\bm{M}\bm{e} &= \frac{1}{2} \bm{e}_q^T\LRp{-\bm{Q}^i\bm{u}_q + \LRp{\bm{E}^T\bm{B}^i\bm{E} - \LRp{\bm{Q}^i}^T}\bm{u}_q} \label{eq:skewerr}\\ &= -\frac{1}{2} \bm{e}_q^T\bm{Q}^i\bm{u}_q + \frac{1}{2}\bm{e}_q^T\LRp{\bm{E}^T\bm{B}^i\bm{E} - \LRp{\bm{Q}^i}^T}\bm{u}_q, \nonumber \end{align} where we have introduced $\bm{e}_q = \bm{V}_q\bm{e}$. Since $u \in V^M$ and $e \in V^N$, by exactness of the quadrature rules, \[ \bm{e}_q^T\LRp{\bm{E}^T\bm{B}^i\bm{E} - \LRp{\bm{Q}^i}^T}\bm{u}_q = \int_{\partial \hat{D}} u e n_i - \int_{\hat{D}} u \pd{e}{x_i} = \int_{\hat{D}} \pd{u}{x_i} e = \bm{e}_q^T\bm{Q}^i\bm{u}_q. \] Combining this with (\ref{eq:skewerr}) implies that $\bm{e}^T\bm{M}\bm{e} = 0$, and since $\bm{M}$ is symmetric positive definite, $\bm{e} = 0$. \qed\end{proof} Lemma~\ref{lemma:dsbpapprox} suggests that, when a generalized SBP property does not hold, the use of under-integrated quadratures results in a loss of one or more orders of accuracy. For example, if the SBP property does not hold, then using $(N+1)$ point GLL rules (which are exact for only polynomials of degree $2N-1$) for either volume or surface quadratures should result in a loss of one order of accuracy compared to the use of $(N+1)$-point Gauss rules (which are exact for polynomials of degree $2N$). This is indeed observed in numerical experiments. \section{Skew-symmetric entropy conservative formulations on mapped elements} \label{sec:skew2} We now construct skew-symmetric formulations on mapped elements. We assume some domain $\Omega$ is decomposed into non-overlapping elements $D^k$, such that $D^k$ is the image of the reference element $\hat{D}$ under an isoparametric mapping $\bm{\Phi}^k$. We define geometric change of variables terms ${G}^k_{ij}$ as scaled derivatives of reference coordinates $\hat{\bm{x}}$ w.r.t.\ physical coordinates $\bm{x}$ \begin{gather} \pd{u}{x_i} = \sum_{j=1}^d {G}^k_{ij}\pd{u}{\hat{x}_j}, \qquad {G}^k_{ij} = J^k\pd{\hat{x}_j}{{x}_i}, \label{eq:geofacs} \end{gather} where $J^k$ is the determinant of the Jacobian of the geometric mapping on the element $D^k$. We also introduce the scaled outward normal components $n_iJ^k_f$, which can be computed in terms of (\ref{eq:geofacs}) and the reference normals $\hat{\bm{n}}$ on $\hat{D}$ \begin{gather} n^k_i J^k_f = \sum_{j=1}^d G^k_{ij} \hat{{n}}_j. \label{eq:normals} \end{gather} We also define $\bm{n}^k_i$ as the vector containing concatenated values of the scaled outward normals $n^k_iJ^k_f$ at surface quadrature nodes. For the remainder of the work, we assume that the mesh is watertight or \note{``well-constructed'' \cite{kopriva2016geometry, chan2018discretely, kopriva2019free}} such that at all points on any internal face, the scaled outward normals $n^k_iJ^k_f$ on the two elements sharing this face are equal and opposite. As shown in the previous section, on a single element (and on affine meshes), it is possible to guarantee entropy stability of the skew-symmetric formulation (\ref{eq:esdgSkew}) under a surface quadrature which is only exact for degree $N$ polynomials. However, on curved meshes, stronger conditions are required to guarantee entropy stability. This is due to the fact that the geometric terms are now high order polynomials which vary spatially over each element. Moreover, Lemma~\ref{lemma:sbpcor} assumes affine geometric mappings, and does not hold on curved elements. In this section, we discuss how to extend Lemma~\ref{lemma:sbpcor} to curved simplicial and tensor product elements. \subsection{Curved elements and the geometric conservation law} \label{sec:curved} In this section, we describe how to construct appropriate hybridized SBP operators on curved meshes, and give conditions on the volume and surface quadrature rules under which a semi-discretely entropy stable scheme can be constructed. We first show how to construct appropriate SBP operators on curved elements. Let $\bm{G}^k_{ij}$ denote the vector of scaled geometric terms ${G}^k_{ij}$ evaluated at both volume and surface quadrature points, and let $\tilde{\bm{Q}}^j_N$ now denote the skew-symmetric construction of the hybridized SBP operator for the $j$th reference coordinate. Hybridized SBP operators on a curved element $D^k$ can be defined as in \cite{chan2018discretely} by \begin{equation} \bm{Q}^i_k = \frac{1}{2}\sum_{j=1}^d \LRp{\diag{\bm{G}^k_{ij}}\tilde{\bm{Q}}^j_N + \tilde{\bm{Q}}^j_N\diag{\bm{G}^k_{ij}}} \label{eq:dncurved} \end{equation} \bnote{Since $\tilde{\bm{Q}}^j_N$ satisfies a summation by parts property on the reference element $\hat{D}$, then $\bm{Q}^i_k$ satisfies an analogous SBP property on the physical element $D^k$ \cite{chan2018discretely}. } We can now construct and prove entropy conservation and free stream preservation for a skew-symmetric formulation on a physical curved element $D^k$. \bnote{Free stream preservation is necessary to discretely preserve both entropy conservation and the condition that constant solutions are stationary solutions of systems of conservation laws. However, on curved meshes, the presence of spatially varying geometric terms can result in the production of spurious transient waves. The construction of geometric terms through (\ref{eq:iconscurl}) guarantees that the resulting methods are free-stream preserving, and that constant solutions remain stationary solutions of discretizations of (\ref{eq:nonlineqs}). } Let $\bm{Q}^i_k$ be given by (\ref{eq:dncurved}), and define the curved mass matrix \[ \bm{M}^k = \bm{V}_q^T\bm{W}\diag{\bm{J}^k}\bm{V}_q. \] Note that $\bm{M}^k$ is positive-definite so long as $J^k$ is positive at all quadrature points. We define the auxiliary quantities $\tilde{\bm{u}}$ \begin{gather*} \bm{v}_q = \bm{v}\LRp{\bm{u}_q}, \qquad \tilde{\bm{v}} = \begin{bmatrix} \bm{V}_q\\ \bm{V}_f \end{bmatrix}\bm{P}^k_q\bm{v}_q, \qquad \tilde{\bm{u}} = \bm{u}\LRp{\tilde{\bm{v}}}. \end{gather*} where $\bm{P}^k_q = \LRp{\bm{M}^k}^{-1}\bm{V}_q^T\bm{W}\diag{\bm{J}^k}$. Then, we have the following theorem: \begin{theorem} \label{thm:skewformcurved} \bnote{Assume that $\bm{Q}^i_k\bm{1}=\bm{0}$.} Let $\tilde{\bm{u}}_f^+$ denote the face value of the entropy-projected conservative variables $\tilde{\bm{u}}_f$ on the neighboring element. Then, the formulation \begin{gather} \bm{M}^k\pd{\bm{u}_h}{t} + \sum_{i=1}^d \LRs{\begin{array}{cc} \bm{V}_q \\ \bm{V}_f\end{array}}^T 2\LRp{\bm{Q}^i_k \circ \bm{F}^i_S}\bm{1} + \bm{V}_f^T \bm{W}_f \diag{\bm{n}^k_i}\LRp{\bm{f}_i^*-\bm{f}(\tilde{\bm{u}}_f)} = 0, \label{eq:skewformcurved}\\ \LRp{\bm{F}^i_S}_{ij} = \bm{f}^i_S\LRp{\tilde{\bm{u}}_i,\tilde{\bm{u}}_j}, \qquad 1\leq i,j\leq N_q + N^f_q, \nonumber\\ \bm{f}_i^* = \bm{f}^i_S(\tilde{\bm{u}}_f^+,\tilde{\bm{u}}_f), \qquad \text{ on interior interfaces,} \nonumber \end{gather} is semi-discretely entropy conservative on $D^k$ such that for $\bm{u}_q = \bm{V}_q\bm{u}$, \begin{gather*} \bm{1}^T\bm{W}\diag{\bm{J}^k}\pd{U(\bm{u}_q)}{t} + \sum_{i=1}^d\bm{1}^T\bm{W}_f \diag{\bm{n}^k_i} \LRp{\psi_i(\tilde{\bm{u}}_f) - \tilde{\bm{v}}_f^T\bm{f}_i^*} = 0. \end{gather*} Additionally, the method is free-stream preserving such that $\pd{\bm{u}_h}{t} = 0$ for constant solutions. \label{thm:esdgCurved} \end{theorem} \bnote{We omit the proof of entropy conservation, since it is identical to the proofs in \cite{chan2017discretely, chan2018discretely}. Free-stream preservation follows directly from $\bm{Q}^i_k\bm{1} = \bm{0}$ and the fact that $\bm{F}_S$ is constant for constant solutions \cite{kopriva2006metric}. } \bnote{The proof of Theorem~\ref{thm:esdgCurved} requires $\bm{Q}^i_k\bm{1} = \bm{0}$. For curved elements, additional steps must also be taken to ensure this condition. Assuming Assumption~\ref{ass:quad} holds for $v(\bm{x}) = 1$ and expanding out the expression for $\bm{Q}^i_k\bm{1} = \bm{0}$ using (\ref{eq:dncurved}) yields} \begin{align} \bm{Q}^i_k \bm{1} = \frac{1}{2} \sum_{j=1}^d \diag{\bm{G}^k_{ij}}\tilde{\bm{Q}}^j_N \bm{1} + \tilde{\bm{Q}}^j_N\diag{\bm{G}^k_{ij}}\bm{1} = \frac{1}{2}\sum_{j=1}^d \tilde{\bm{Q}}^j_N\LRp{\bm{G}^k_{ij}} = 0, \label{eq:dgcl} \end{align} \bnote{where we have used that $\tilde{\bm{Q}}^j_N \bm{1} = 0$ using Lemma~\ref{lemma:sbpcor}.} We refer to the condition $\bm{Q}^i_k\bm{1} = 0$ as the discrete geometric conservation law (GCL) \cite{thomas1979geometric, kopriva2006metric}. For degree $N$ isoparametric mappings, the GCL is automatically satisfied in two dimensions due to the fact that the exact geometric terms ${G}^k_{ij}$ are polynomials of degree $N$ \cite{kopriva2006metric}. However, in three dimensions, the GCL is not automatically satisfied due to the fact that the degree of $G^k_{ij}$ is larger than $N$. Thus, the geometric terms cannot be represented exactly using degree $N$ polynomials, and (\ref{eq:dgcl}) must be enforced through an alternative construction of ${G}^k_{ij}$. To ensure that the geometric terms satisfy the GCL, we first rewrite the geometric terms as the curl of some quantity $\bm{r}^i$, but interpolate $\bm{r}^i$ before applying the curl \cite{thomas1979geometric, visbal2002use, kopriva2006metric, hindenlang2012explicit, chan2018discretely}: \begin{gather} \bm{r}^i = { \pd{\bm{x}}{\hat{x}_i}\times \bm{x}}, \qquad \LRs{\begin{array}{c} {G}^k_{1j}\\ {G}^k_{2j}\\ {G}^k_{3j}\end{array}} = \begin{bmatrix} \LRp{-\hat{\Grad}\times I_{N_{\rm geo}}\LRp{x_3\hat{\Grad}x_2}}_j\\ \LRp{\hat{\Grad}\times I_{N_{\rm geo}}\LRp{x_3\hat{\Grad}x_1}}_j\\ \LRp{\hat{\Grad}\times I_{N_{\rm geo}}\LRp{x_1\hat{\Grad}x_2}}_j \end{bmatrix},\label{eq:iconscurl} \\ N_{\rm geo} \leq \begin{cases} N+1 & \text{(tetrahedra)}\\ N & \text{(hexahedra)} \end{cases},\nonumber \end{gather} where $I_{N_{\rm geo}}$ denotes a degree $N_{\rm geo}$ polynomial interpolation operator with appropriate interpolation nodes.\footnote{This interpolation step must be performed using interpolation points with an appropriate number of nodes on each boundary \cite{chan2018discretely}. These include, for example, GLL nodes on tensor product elements, and optimized interpolation nodes on non-tensor product elements \cite{hesthaven1998electrostatics, warburton2006explicit, chan2015comparison}.} The restriction on the maximum value of $N_{\rm geo}$ ensures that $G^k_{ij} \in V^N$ (e.g. $G^k_{ij} \in P^N$ on tetrahedral elements and $G^k_{ij}\in Q^N$ on hexahedral elements), which is also necessary to guarantee (\ref{eq:dgcl}). Because the \bnote{skew-hybridized SBP operators $\bm{Q}^i_k$} are now defined through (\ref{eq:dncurved}), Lemma~\ref{lemma:sbpcor} and the proof of entropy stability no longer hold for curved elements and must be modified. The introduction of curvilinear meshes will impose slightly different conditions on the accuracy of the surface quadrature. We discuss simplicial and tensor product elements separately, as differences in the natural polynomial approximation spaces will result in different assumptions for each proof. \begin{lemma} \label{lemma:vdsbpcurved} Let $D^k$ be a curved element, and let the geometric terms $G^k_{ij}$ be constructed using \rnote{(\ref{eq:iconscurl})}. Let Assumption~\ref{ass:quad} hold for $v = 1$ and $v = G^k_{ij}$ for all $i,j = 1,\ldots, d$. Then \[ \qquad \bm{Q}^i_k\bm{1} = \bm{0}, \] \end{lemma} \begin{proof} The proof of $\bm{Q}^i_k\bm{1} = \bm{0}$ is analogous to the proof of Lemma~\ref{lemma:sbpcor}. The results follow for tensor product elements using results from \cite{kopriva2006metric} and for simplicial elements using results from \cite{chan2018discretely}. In both cases, the proof relies only on the fact that $G^k_{ij} \in V^N$. \qed\end{proof} The proof of global entropy conservation follows from summing up (\ref{eq:esdgthm}) over all elements and noting that the surface terms cancel due to the symmetry and conservation properties of the Tadmor flux (\ref{eq:esflux}) \cite{chan2017discretely}. The entropy conservative formulations presented in this work can be made entropy stable by adding appropriate interface dissipation, such as Lax-Friedrichs or matrix-based penalization terms \cite{winters2017uniquely, chen2017entropy, chan2017discretely}. \begin{remark} It is also possible to replace the curved mass matrix $\bm{M}^k$ with a more easily invertible weight-adjusted approximation while maintaining high order accuracy, entropy stability, and local conservation \cite{chan2018discretely}. This approximation avoids the inversion of dense weighted $L^2$ mass matrices $\bm{M}^k$ on curved simplicial elements, but is generally unnecessary on tensor product elements as common choices of volume quadrature result in a diagonal (lumped) mass matrix \cite{carpenter2014entropy, parsani2016entropy, chan2018efficient}. \end{remark} \subsection{On quadrature conditions for Assumption~\ref{ass:quad} for $v = 1$ and $v = G^k_{ij}$} \label{sec:quadacc} The previous sections outline minimal conditions under which entropy stability is guaranteed under a skew-symmetric formulation and a polynomial geometric mapping. In this section, we translate these minimial conditions into conditions on quadrature accuracy. Semi-discrete entropy conservation on curved meshes requires that Assumption~\ref{ass:quad} holds for $v = 1$ and $v = G^k_{ij}$. We discuss specific choices of volume and surface quadrature for which this assumption is valid, and summarize the maximum degree $N_{\rm geo}$ of the polynomial geometric approximation under which entropy stability holds for common choices of volume and surface quadrature. In order to ensure that the mass matrix is positive-definite in Assumption~\ref{ass:quad}, the volume quadrature must be degree $2N$ in general on simplices. The following lemma summarizes expected behavior for surface quadrature rules of varying order: \begin{lemma} Let $\hat{D}$ be a simplex with volume quadrature which is exact for degree $2N$ polynomials. Let the surface quadrature be exact for polynomials of degree $M+N$. Then, the skew-symmetric formulation (\ref{eq:skewformcurved}) is entropy stable for $N_{\rm geo} \leq \min\LRp{N+1,M+1}$. \label{lemma:curvsimp} \end{lemma} \begin{proof} Entropy stability holds if Assumption~\ref{ass:quad} holds for $v = 1$ and $v = G^k_{ij}$. Simplicial elements require $N_{\rm geo}\leq (N+1)$ in order to guarantee that $G^k_{ij}\in P^{N_{\rm geo}-1} \subset P^{N}$, which is necessary to satisfy the discrete GCL \cite{chan2018discretely}. Then, for $u \in P^N$, $\pd{u}{\hat{x}_j}\in P^{N-1}$, the integrands in Assumption~\ref{ass:quad} are $\pd{u}{\hat{x}_j} v \in P^{N+N_{\rm geo}-2}$ and $uv n_i \in P^{N+N_{\rm geo}-1}$ for $v = G^k_{ij}$. The volume quadrature exactly integrates the first integrand for $N_{\rm geo} \leq N+1$, while the surface quadrature exactly integrates the second integrand for $M \geq N_{\rm geo}-1$, or $N_{\rm geo} \leq M+1$. \qed\end{proof} The situation is more complicated for curved tensor product elements. It was shown in Section~\ref{sec:assump1} that tensor product quadratures of degree $(2N-1)$ satisfy Assumption~\ref{ass:quad} for $v = 1$. However, in contrast to the simplicial case, it is not immediately clear that degree $(2N-1)$ volume quadratures exactly integrate $\int_{\hat{D}} \pd{u}{\hat{x}_j}v$ for $v = G^k_{ij}$ for tensor product elements. The difference between simplicial and tensor product elements is the polynomial space in which the derivative lies. In contrast to the simplicial case, if $u \in Q^N$, $\pd{u}{\hat{x}_j} \not\in Q^{N-1}$. Consider the three-dimensional case with $u, v \in Q^N$ and $i = 1$. Then, differentiation reduces the polynomial degree in one coordinate but not others and $\pd{u}{\hat{x}_1} \in Q^{N-1,N,N}$. As a result, $\pd{u}{\hat{x}_j}v \not\in Q^{2N-1}$, and a tensor product quadrature of degree $(2N-1)$ (in each coordinate) does not exactly integrate $\int_{\hat{D}} \pd{u}{\hat{x}_j}v$ for general $v\in Q^N$. We address the quadrilateral case first: \begin{lemma} Let $\hat{D}$ be a quadrilateral. Suppose the volume quadrature be exact for degree $M+N$ polynomials, and that the surface quadrature be exact for polynomials of degree $M+N$. Then, the skew-symmetric formulation (\ref{eq:skewformcurved}) is entropy stable for $N_{\rm geo} \leq \min\LRp{N,M+1}$. \label{lemma:curvquad} \end{lemma} \begin{proof} As in Lemma~\ref{lemma:curvsimp}, entropy stability holds if Assumption~\ref{ass:quad} holds for $v = 1$ and $v = G^k_{ij}$. The case of $v = 1$ was addressed previously, and we focus on $v = G^k_{ij}$. We first characterize the polynomial degree of the geometric terms $G^k_{ij}$. In contrast to the simplicial case, tensor product elements require $N_{\rm geo}\leq N$ in order to ensure that $G^k_{ij}\in Q^{N,N}$ and that the discrete GCL is satisfied \cite{kopriva2006metric}. On a quadrilateral element with a degree $N_{\rm geo}$ geometric mapping, $G^k_{ij}$ is \begin{align*} G^k_{11} &= \pd{x_2}{\hat{x}_2} \in Q^{N_{\rm geo}, N_{\rm geo}-1}, \qquad G^k_{12} = -\pd{x_2}{\hat{x}_1} \in Q^{N_{\rm geo}-1, N_{\rm geo}},\\ G^k_{21} &= -\pd{x_1}{\hat{x}_2} \in Q^{N_{\rm geo}, N_{\rm geo}-1}, \qquad G^k_{22} = \pd{x_1}{\hat{x}_1}\in Q^{N_{\rm geo}-1, N_{\rm geo}}.\nonumber \end{align*} Since $\pd{u}{\hat{x}_1} \in Q^{N-1,N}$ and $\pd{u}{\hat{x}_2} \in Q^{N,N-1}$ \[ \pd{u}{\hat{x}_i}G^k_{ij} \in Q^{N+N_{\rm geo}-1} \] The volume quadrature exactly integrates this integrand for $M \geq N_{\rm geo}-1$. We now consider the condition in Assumption~\ref{ass:quad} on the surface integrals $\int_{\partial \hat{D}} u v \hat{n}_j$ for $v= G^k_{ij}$. For left and right faces of the quadrilateral, $\hat{n}_2 = 0$, so this condition reduces to ensuring that the quantity $u G^k_{i1}$ is integrated exactly using quadrature for $i = 1,2$. Since $G^k_{i1}$ are degree $N_{\rm geo}-1$ in the $\hat{x}_2$ coordinate, $G^k_{i1}$ is degree $N_{\rm geo}-1$ and $uG^k_{i1} \hat{n}_1 \in Q^{N+N_{\rm geo}-1}$ along the left and right faces. Similarly, $uG^k_{i2} \hat{n}_2 \in Q^{N+N_{\rm geo}-1}$ along the top and bottom faces and are zero along the left and right faces. The surface quadrature rule exactly integrates such integrands for $M \geq N_{\rm geo} - 1$, or $N_{\rm geo} \leq M+1$. \qed\end{proof} Existing proofs of entropy stability on quadrilaterals rely on $(N+1)$-point GLL volume and surface quadratures, which are exact for degree $2N-1$ polynomials. The novelty of Lemma~\ref{lemma:curvquad} is that the proof holds for any combination of degree $2N-1$ volume and surface quadratures (for example, $(N+1)$-point GLL volume quadrature and an $(N-1)$-point Gauss surface quadrature). We now consider the three-dimensional case. In contrast to the quadrilateral case, the GCL is not automatically satisfied for a degree $N_{\rm geo} \leq N$ geometric mapping. Instead, GCL-satisfying geometric terms are approximated using (\ref{eq:iconscurl}). Expanding out the expression for $G^k_{11}$ gives \[ G^k_{11} = \pd{}{\hat{x}_3} I_{N_{\rm geo}}\LRp{{x}_3 \pd{x_2}{\hat{x}_2}} - \pd{}{\hat{x}_2} I_{N_{\rm geo}}\LRp{{x}_3 \pd{x_2}{\hat{x}_3}} \in Q^{N_{\rm geo}}. \] Repeating for the other geometric terms, one can show that $G^k_{ij} \in Q^{N_{\rm geo}}$ on hexahedral elements. Thus, if $u\in Q^N$, $\pd{u}{\hat{x}_1} G^k_{i1} \in Q^{N+N_{\rm geo}-1,N+N_{\rm geo},N+N_{\rm geo}}$, and is only integrated exactly by volume quadratures of degree $(2N-1)$ for geometric degrees $N_{\rm geo}\leq (N-1)$. Similarly, Assumption~\ref{ass:quad} does not hold under degree $(2N-1)$ surface quadratures unless $N_{\rm geo} \leq (N-1)$, due to the fact that traces of $G^k_{ij}$ are degree $N_{\rm geo}$ polynomials in each coordinate.\footnote{It is possible to construct the geometric terms for $N_{\rm geo} = N$ using a local $H_{\rm div}$ basis where \[ \bm{r}^i \in Q^{N-1,N,N} \times Q^{N,N-1,N} \times Q^{N,N,N-1}. \] Then, the geometric terms satisfy $\Grad \times \bm{r}^i \in Q^{N,N-1,N-1}\times Q^{N-1,N,N-1} \times Q^{N-1,N-1,N}$ with traces in $Q^{N-1}$, and Assumption~\ref{ass:quad} holds under degree $(2N-1)$ volume and surface quadrature. This approach will be investigated in more detail in future work. } We summarize these findings in the following lemma for hexahedral elements: \begin{lemma} Let $\hat{D}$ be a hexahedral element, with geometric terms constructed using (\ref{eq:iconscurl}). Let the volume quadrature be exact for degree $M+N$ polynomials, and let the surface quadrature be exact for polynomials of degree $M+N$. Then, the skew-symmetric formulation (\ref{eq:skewformcurved}) is entropy stable for $N_{\rm geo} \leq \min\LRp{N,M}$. \label{lemma:curvquad} \end{lemma} Most implementations on tensor product elements utilize volume and surface quadratures of either degree $(2N-1)$ or $2N$. We summarize below for different pairings of volume and surface quadrature the maximum degree $N_{\rm geo}$ under which Assumption~\ref{ass:quad} is satisfied and entropy stability is guaranteed: \begin{enumerate} \item On quadrilateral elements, Assumption~\ref{ass:quad} holds for $N_{\rm geo} \leq N$ and any tensor product volume and surface quadratures of degree $(2N-1)$ \item On hexahedral elements, Assumption~\ref{ass:quad} holds for $N_{\rm geo} \leq N-1$ and any tensor product volume and surface quadratures of degree $(2N-1)$. If the SBP property holds (e.g.\ for GLL quadrature, or for volume and surface quadratures of degree $2N$) then Assumption~\ref{ass:quad} holds for $N_{\rm geo} \leq N$. \end{enumerate} We note that the condition $N_{\rm geo} \leq N-1$ is non-standard for tensor product elements. However, this condition is only necessary for entropy stability when $\bm{Q}^i$ does not satisfy a generalized SBP property (see Remark~\ref{remark:dsbp}). To the author's knowledge, this setting has not been considered within the literature. \section{Numerical experiments} \label{sec:num} In this section, we present two-dimensional experiments which verify the theoretical results presented and qualify the accuracy of the proposed methods. We begin by investigating the maximum stable timestep, stability, and accuracy of the skew-symmetric formulation on triangular and quadrilateral meshes, and conclude with two-dimensional experiments on a hybrid mesh containing mixed quadrilateral and triangular elements. We consider numerical solutions of the 2D compressible Euler equations \begin{align*} \pd{\rho}{t} + \pd{\LRp{\rho u}}{x_1} + \pd{\LRp{\rho v}}{x_2} &= 0,\\ \pd{\rho u}{t} + \pd{\LRp{\rho u^2 + p }}{x_1} + \pd{\LRp{\rho uv}}{x_2} &= 0,\nonumber\\ \pd{\rho v}{t} + \pd{\LRp{\rho uv}}{x_1} + \pd{\LRp{\rho v^2 + p }}{x_2} &= 0,\nonumber\\ \pd{E}{t} + \pd{\LRp{u(E+p)}}{x_1} + \pd{\LRp{v(E+p)}}{x_2}&= 0,\nonumber \end{align*} where we have introduced the pressure is $p = (\gamma-1)\LRp{E - \frac{1}{2}\rho (u^2+v^2)}$ and the specific internal energy $\rho e = E - \frac{1}{2}\rho (u^2+v^2)$. We seek entropy stability with respect to the entropy for the compressible Navier-Stokes equations \cite{hughes1986new} \begin{equation*} U(\bm{u}) = -\frac{\rho s}{\gamma-1}, \label{eq:entropy2d} \end{equation*} where $s = \log\LRp{\frac{p}{\rho^\gamma}}$ denotes the specific entropy. The mappings between conservative and entropy variables in two dimensions are given by \begin{align*} v_1 &= \frac{\rho e (\gamma + 1 - s) - E}{\rho e}, \qquad v_2 = \frac{\rho u}{\rho e}, \qquad v_3 = \frac{\rho v}{\rho e}, \qquad v_4 = -\frac{\rho}{\rho e}\\ \rho &= -(\rho e) v_4, \qquad \rho u = (\rho e) v_2, \qquad \rho v = (\rho e) v_3, \qquad E = (\rho e)\LRp{1 - \frac{{v_2^2+v_3^2}}{2 v_4}}, \end{align*} where $\rho e$ and $s$ can be expressed in terms of the entropy variables as \begin{equation*} \rho e = \LRp{\frac{(\gamma-1)}{\LRp{-v_4}^{\gamma}}}^{1/(\gamma-1)}e^{\frac{-s}{\gamma-1}}, \qquad s = \gamma - v_1 + \frac{{v_2^2+v_3^2}}{2v_4}. \end{equation*} There exist several choices for entropy conservative fluxes \cite{ismail2009affordable, ranocha2018comparison,chandrashekar2013kinetic}. We utilize the the entropy conservative numerical fluxes given by Chandrashekar in \cite{chandrashekar2013kinetic} \begin{align*} &f^1_{1,S}(\bm{u}_L,\bm{u}_R) = \avg{\rho}^{\log} \avg{u},& &f^1_{2,S}(\bm{u}_L,\bm{u}_R) = \avg{\rho}^{\log} \avg{v},&\\ &f^2_{1,S}(\bm{u}_L,\bm{u}_R) = f^1_{1,S} \avg{u} + p_{\rm avg},& &f^2_{2,S}(\bm{u}_L,\bm{u}_R) = f^1_{2,S} \avg{u},&\nonumber\\ &f^3_{1,S}(\bm{u}_L,\bm{u}_R) = f^2_{2,S},& &f^3_{2,S}(\bm{u}_L,\bm{u}_R) = f^1_{2,S} \avg{v} + p_{\rm avg},&\nonumber\\ &f^4_{1,S}(\bm{u}_L,\bm{u}_R) = \LRp{E_{\rm avg} + p_{\rm avg}}\avg{u},& &f^4_{2,S}(\bm{u}_L,\bm{u}_R) = \LRp{E_{\rm avg} + p_{\rm avg} }\avg{v},& \nonumber \end{align*} where the quantities $p_{\rm avg}, E_{\rm avg}, \nor{\bm{u}}^2_{\rm avg}$ are defined as \begin{gather*} p_{\rm avg} = \frac{\avg{\rho}}{2\avg{\beta}}, \qquad E_{\rm avg} = \frac{\avg{\rho}^{\log}}{2\avg{\beta}^{\log}\LRp{\gamma -1}} + \frac{\nor{\bm{u}}^2_{\rm avg}}{2}, \qquad \beta = \frac{\rho}{2p},\\ \nor{\bm{u}}^2_{\rm avg} = 2(\avg{u}^2 + \avg{v}^2) - \LRp{\avg{u^2} +\avg{v^2}} \nonumber. \end{gather*} From here on, \emph{entropy conservative} refers to a scheme which uses these entropy conservative fluxes at inter-element interfaces. We will refer to schemes which add interface dissipation as \emph{entropy stable}. In this work, we utilize a local Lax-Friedrichs interface dissipation. For all convergence experiments, we compare the numerical solution to analytic solution for the isentropic vortex problem \cite{shu1998essentially} \begin{align*} \rho(\bm{x},t) &= \LRp{1 - \frac{\frac{1}{2}(\gamma-1)(\beta e^{1-r(\bm{x},t)^2})^2}{8\gamma \pi^2}}^{\frac{1}{\gamma-1}}, \qquad p = \rho^{\gamma},\\ u(\bm{x},t) &= 1 - \frac{\beta}{2\pi} e^{1-r(\bm{x},t)^2}(x_2-c_2), \qquad v(\bm{x},t) = \frac{\beta}{2\pi} e^{1-r(\bm{x},t)^2}(x_2-c_2).\nonumber \end{align*} Here, $u, v$ are the $x_1$ and $x_2$ velocity and $r(\bm{x},t) = \sqrt{(x_1-c_1-t)^2 + (x_2-c_2)^2}$. The following experiments utilize $c_1 = 5, c_2 = 0$ and $\beta = 5$. A low storage 4th order Runge-Kutta scheme \cite{carpenter1994fourth} is used for all numerical experiments. The time-step is estimated based on formulas derived for linear advection in \cite{chan2015gpu, chan2018multi} \[ dt = C \frac{h}{c_{\max} \max\LRc{\frac{1}{2}C_T, C_I}} \] where $h$ is the mesh size, $c_{\max}$ is the maximum wave-speed, $C$ is a user-defined CFL constant, and $C_T, C_I$ are constants in finite element inverse and trace inequalities. These constants scale proportionally to $N^2$, though precise values of $C_I, C_T$ vary slightly depending on the choice of volume or surface quadrature used. The dependence of $C_I, C_T$ on quadrature is discussed in more detail in Appendix~\ref{sec:consts}, where computed values are also given. \subsection{Choices of volume and surface quadrature considered} \label{sec:opts} On quadrilaterals, we consider volume quadratures which are tensor products of one-dimensional quadrature rules, while for triangles we utilize volume quadratures from \cite{xiao2010quadrature}. Surface quadratures are constructed face-by-face, and we refer to surface quadrature rules by the specific quadrature used over each face. We consider three choices of volume and surface quadrature on quadrilaterals: \begin{enumerate} \item $(N+1)$ point GLL volume quadrature, $(N+1)$ point GLL surface quadrature. \item $(N+1)$ point GLL volume quadrature, $(N+1)$ point Gauss surface quadrature, \item $(N+1)$ point Gauss quadrature, $(N+1)$ point Gauss surface quadrature, \end{enumerate} On triangles, we consider two cases: \begin{enumerate} \item degree $2N$ volume quadrature, $(N+1)$ point Gauss surface quadrature, \item degree $2N$ volume quadrature, $(N+1)$ point GLL surface quadrature. \end{enumerate} These choices can be combined to provide three different options on two-dimensional hybrid meshes of quadrilateral and triangular elements, which are motivated by balancing computational efficiency and accuracy: \begin{enumerate} \item Option 1: $(N+1)$ point GLL volume quadrature on quadrilaterals and $(N+1)$ point GLL surface quadrature on quadrilaterals and triangles.\label{opt:1} \item Option 2: $(N+1)$ point GLL volume quadrature on quadrilaterals and $(N+1)$ point Gauss surface quadrature on quadrilaterals and triangles.\label{opt:2} \item Option 3: $(N+1)$ point Gauss volume quadrature on quadrilaterals and $(N+1)$ point Gauss surface quadrature on quadrilaterals and triangles.\label{opt:3} \end{enumerate} All three options assume a triangular volume quadrature which is exact for all polynomials of degree $2N$ or less. All three options result in similar computational costs on triangles, but slight differences in computational cost and complexity on quadrilaterals. On quadrilaterals, Option~\ref{opt:1} is the most computationally efficient option, as the formulation (\ref{thm:skewformcurved}) reduces to a standard entropy stable DG-SEM \cite{gassner2016split} or spectral collocation method \cite{carpenter2014entropy}. Option 3 is most involved, resulting in a Gauss collocation method on quadrilaterals \cite{chan2018efficient}, and requires interpolation and two-point flux interactions between lines of volume quadrature nodes and boundary nodes. Option~\ref{opt:2} is slightly more expensive than Option~\ref{opt:1}, as the solution must be interpolated from GLL to Gauss nodes on the boundary. However, this is less expensive than Option~\ref{opt:3} since volume GLL nodes include GLL boundary nodes as a subset. This implies that the matrix $\bm{V}_f$ is sparse, such that interpolation to boundary Gauss nodes involves only nodal values at boundary GLL nodes. Thus, Option~\ref{opt:2} requires only two-point flux computations between boundary GLL and Gauss nodes. In contrast, the Gauss collocation scheme in Option~\ref{opt:3} computes two-point flux interactions through $\bm{f}_S$ between each boundary node and a line of volume nodes. \subsection{Verification of discrete entropy conservation} We first verify that, for an entropy conservative flux and periodic domain, the spatial formulation tested against the projected entropy variables is numerically zero. We refer to this quantity as the entropy right-hand side (RHS). Section~\ref{sec:quadacc} outlines conditions on quadrature accuracy which guarantee that the formulations (\ref{eq:esdgSkew}) and (\ref{eq:skewformcurved}) are discretely entropy conservative. These numerical results confirm that these conditions are tight. We induce a curved polynomial mapping by defining curved coordinates $\tilde{\bm{x}}$ through a mapping of Cartesian coordinates $\bm{x} \in [-1,1]^2$ \begin{align*} \tilde{x}_1 &= x_1 + \alpha \cos\LRp{\frac{\pi}{2}x_1}\sin\LRp{\pi x_2}\\ \tilde{x}_2 &= x_2 + \alpha \sin\LRp{{\pi}x_1}\cos\LRp{\frac{\pi}{2} x_2}, \end{align*} where $\alpha = 1/8$ for the following experiments. We vary the geometric degree of this mapping from $N_{\rm geo} = 1$ to $N_{\rm geo} = N$, where $N_{\rm geo}$ denotes the polynomial degree of the geometric mapping on a quadrilateral or triangular element. Since Assumption~\ref{ass:quad} requires that the volume quadrature is sufficiently accurate to ensure that the mass matrix is positive-definite, we fix the volume to quadrature to be exact for degree $2N$ polynomials on triangles. On quadrilaterals, we fix the volume quadrature to be an $(N+1)$ point GLL quadrature. To verify the conditions given in Section~\ref{sec:quadacc}, we vary the accuracy of the 2D surface quadrature rule. The initial condition is taken as the $L^2$ projection of the discontinuous profile \[ \rho = \begin{cases} 3 & |x-x_0| < 2.5\\ 2 & \text{ otherwise} \end{cases}, \qquad x_0 = 7.5, \qquad u = v = 0, \qquad p = \rho^\gamma. \] We evolve the solution until final time $T = 1.0$ on a domain $[0,15]\times[-.5,.5]$ using the skew symmetric formulation with $N = 6$ and a CFL of $1/2$. Table~\ref{table:ecrhs} shows the maximum entropy RHS over the duration of the simulation. We observe that for all $N_{\rm geo} \leq M+1$, the maximum entropy RHS is $O(10^{-14})$ and at the level of machine precision. When $N_{\rm geo}> M+1$, we observe that the maximum entropy RHS increases. We note that the case of $M= 5$ for the quadrilateral corresponds to the use of an $(N+1)$-point GLL rule for both volume and surface quadrature. For this choice of quadrature, the skew-symmetric formulation is equivalent to the entropy stable spectral collocation or DG-SEM methods of \cite{carpenter2014entropy, gassner2016split}. \begin{table} \centering \subfloat[Triangular mesh]{ \begin{tabular}{c||c|c|c|c|c|c|} & $N_{\rm geo} = 1$ & $N_{\rm geo} = 2$ & $N_{\rm geo} = 3$ & $N_{\rm geo} = 4$ & $N_{\rm geo} = 5$ & $N_{\rm geo} = 6$ \\ \hline\hline $M = 5 $ & 8.68e-14 & 9.41e-14 & 9.31e-14 & 9.10e-14& 9.92e-14 & 8.90e-14\\ \hline $M = 3 $ & 1.01e-13 & 8.87e-14 & 8.79e-14 & 9.68e-14 & 0.00833 & 0.00967 \\ \hline $M = 1 $ & 1.8e-13 & 1.82e-13 & 1.998 & 2.104 & 2.080 & 2.086\\ \hline \end{tabular} }\\ \subfloat[Quadrilateral mesh]{ \begin{tabular}{c||c|c|c|c|c|c|} & $N_{\rm geo} = 1$ & $N_{\rm geo} = 2$ & $N_{\rm geo} = 3$ & $N_{\rm geo} = 4$ & $N_{\rm geo} = 5$ & $N_{\rm geo} = 6$ \\ \hline\hline $M = 5$ & 1.74e-14 & 1.06e-14 & 1.31e-14 & 1.35e-14 & 1.06e-14 & 1.31e-14\\ \hline $M = 3$ & 2.89e-14 & 2.59e-14 & 2.83e-14 & 2.43e-14 & 3.20e-05 & 3.27e-05 \\ \hline $M = 1$ &4.68e-14 & 3.77e-14 & 0.1548 & 0.1532 & 0.1517 & 0.1517\\ \hline \end{tabular} } \caption{Maximum absolute value of the entropy RHS for degree $N=6$ over $t\in [0,1]$ on triangular and quadrilateral meshes. The volume quadrature for the quadrilateral mesh is taken to be $(N+1)$-point GLL quadrature. The surface quadrature is taken to be a 1D GLL quadrature with a varying number of points, such that the rule is exact for degree $M+N$ polynomials. } \label{table:ecrhs} \end{table} \subsection{Hybrid quadrilateral-triangular meshes} We conclude with experiments on a mixed mesh containing both quadrilateral and triangular elements (Figure~\ref{fig:hybridmesh}). Figure~\ref{fig:hybriderrors} shows $L^2$ errors for the isentropic vortex computed at $T = 5$ for Options~\ref{opt:1}, \ref{opt:2}, and \ref{opt:3}. We observe that, in all cases, Option~\ref{opt:1} is less accurate than Options~\ref{opt:2} and \ref{opt:3}, and that Option~\ref{opt:3} achieves a rate of convergence close to the optimal $O(h^{N+1})$ rate, while Option~\ref{opt:1} typically achieves rates of convergence between $O(h^N)$ and $O(h^{N+1/2})$. However, Option~\ref{opt:2} behaves differently depending on the order $N$. For $N = 1$, Option~\ref{opt:2} achieves an accuracy similar to Option~\ref{opt:1}. However, as $N$ increases, Option~\ref{opt:2} becomes more accurate. For $N=4$, Option~\ref{opt:2} achieves the same level of error observed for Option~\ref{opt:3}. This suggests that Lemma~\ref{lemma:dsbpapprox} may be sufficient but not necessary for full order accuracy. These results may also differ depending on the type of interface dissipation applied \cite{hindenlang2019order}. \begin{figure} \centering \subfloat{\raisebox{3em}{ \includegraphics[width=.43\textwidth]{hybrid_mesh.png} }\label{fig:hybridmesh}} \subfloat[Convergence for $N = 1,2,3,4$]{ \begin{tikzpicture} \begin{loglogaxis}[ width=.5\textwidth, xlabel={Mesh size $h$}, ylabel={$L^2$ errors}, xmax=.75, ymin=1e-5, ymax=5, legend pos=south east, legend cell align=left, legend style={font=\tiny}, xmajorgrids=true, ymajorgrids=true, grid style=dashed, legend entries={GLL-GLL, GLL-Gauss, Gauss-Gauss} ] \pgfplotsset{ cycle list={{blue, mark=*}, {red, dashed ,mark=square*},{black ,mark=triangle*}} } \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,2.50656)(0.166667,1.874)(0.0833333,1.05647)(0.0416667,0.438926)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,2.42633)(0.166667,1.75142)(0.0833333,0.958902)(0.0416667,0.462137)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,2.09363)(0.166667,0.981664)(0.0833333,0.264928)(0.0416667,0.0536376)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,1.36947)(0.166667,0.390076)(0.0833333,0.0623387)(0.0416667,0.011361)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,1.28187)(0.166667,0.326338)(0.0833333,0.0427717)(0.0416667,0.00402484)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,0.859449)(0.166667,0.132239)(0.0833333,0.0187852)(0.0416667,0.0026063)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,0.48545)(0.166667,0.0615538)(0.0833333,0.00665061)(0.0416667,0.000711264)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,0.446407)(0.166667,0.0477486)(0.0833333,0.00372164)(0.0416667,0.000309705)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,0.286258)(0.166667,0.0331728)(0.0833333,0.00239593)(0.0416667,0.000144346)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,0.211329)(0.166667,0.0179798)(0.0833333,0.000816429)(0.0416667, 4.583068530777824e-05)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,0.160937)(0.166667,0.0110045)(0.0833333,0.00041413)(0.0416667, 1.438708299584088e-05)}; \addplot+[semithick, mark options={solid, fill=markercolor}] coordinates{(0.333333,0.13975)(0.166667,0.00977304)(0.0833333,0.00037731)(0.0416667, 1.337566281886131e-05)}; \node at (axis cs:.5,2.5) {$N = 1$}; \node at (axis cs:.5,1.2) {$N = 2$}; \node at (axis cs:.5,.425) {$N = 3$}; \node at (axis cs:.5,.185) {$N = 4$}; \end{loglogaxis} \end{tikzpicture} } \caption{Coarse hybrid mesh and $L^2$ errors for the isentropic vortex solution for Option~\ref{opt:1}, Option~\ref{opt:2}, and Option~\ref{opt:3} for $N = 1,\ldots, 4$.} \label{fig:hybriderrors} \end{figure} \section{Conclusions} We have constructed skew-symmetric ``modal'' DG formulations of nonlinear conservation laws which are entropy stable under less restrictive conditions on quadrature accuracy. These formulations are motivated by volume and surface quadratures which arise naturally on hybrid meshes. \bnote{Because these quadrature rules do not induce operators which satisfy properties necessary for entropy stability, we derive new ``skew-symmetric'' operators which satisfy necessary conditions under reduced restrictions on quadrature. We also derive a separate set of conditions relating the accuracy of the new operators and the degree of accuracy of each quadrature rule, and show that design order accuracy is recovered under the common assumptions of degree $2N-1$ volume quadratures and degree $2N$ surface quadratures. } Finally, we derive conditions under which the skew-symmetric formulation is entropy stable on curved meshes in terms of the degree of quadrature accuracy and polynomial degree of the geometric mapping. Numerical experiments confirm the entropy stability and high order accuracy of the proposed schemes on triangular, quadrilateral, and 2D hybrid meshes. \section{Acknowledgments} The author thanks David C.\ Del Rey Fernandez for helpful discussions, \rnote{as well as the two anonymous reviewers whose comments significantly improved the readabilty of this manuscript}. Jesse Chan is supported by the National Science Foundation under awards DMS-1719818 and DMS-1712639.
\section{Introduction} \begin{figure*} \includegraphics[width=\textwidth]{Fig1_HydraARadioHSTCombinedImage} \caption{\textbf{Left:} A 5GHz \textit{Karl G. Jansky Very Large Array} (VLA) radio image of Hydra-A showing powerful radio lobes emanating from the centre of the brightest cluster galaxy, with 0.19 arcsec pixel$^{-1}$ resolution (Project 13B-088). Contours of our 233 GHz ALMA continuum image are overlaid in blue and lower angular resolution 103 GHz contours are shown in red. \textbf{Right:} Contours from a CO(2-1) integrated brightness map (described in \S\ref{sec:DiscDynamics}), which mark the 0.15, 0.25, 0.35 and \mbox{0.45 mJy beam$^{-1}$} emission regions, overlaid onto a F814W \textit{Hubble Space Telescope} (HST) near-infrared image of the brightest cluster galaxy \citep{Mittal2015}, with a resolution of \mbox{0.05 arcsec pixel$^{-1}$}. This highlights how the galaxy's dust lane, which is opaque to optical wavelengths, is spatially coincident with a molecular gas disc.} \label{fig:HydraAHSTRadioCombinedImage} \end{figure*} The accretion of gas onto a galaxy's central supermassive black hole produces powerful outflows of up to \mbox{10$^{46}$ erg s$^{-1}$} which regulate a wide range of physical phenomena, such as gas accretion and star formation \citep{Bower2006,Croton2006,King2015}. Despite being extremely energetic, the processes responsible for the growth of supermassive black holes currently have very limited observational constraints and are far from well understood. For simplicity, many contemporary models and simulations assume that supermassive black holes are fed through highly idealized Bondi accretion. In these models, the supermassive black hole is powered by the smooth and spherical inflow of very hot gas \citep{Bondi1952}, or a similar process based upon a modified version of this approach \citep[e.g.][]{Proga2003, Gaspari2010}. However, models which make use of Bondi accretion do so despite there being a lack of observational evidence indicating that behaviour of this kind is a reality. Instead, recent observations have shown that the central regions of AGN are dominated by the considerably colder molecular gas phase \citep[e.g.][]{Combes2013,GarciaBurillo2014}. Additionally, recent theory and simulations of massive galaxies, groups and clusters point towards supermassive black hole accretion which at sub-parsec scales is chaotic, clumpy and cold, with typical gas temperatures of a few tens of Kelvin \citep[e.g.][]{Pizzolato2005,Pizzolato2010,McNamara2016}. In this picture, often described in theoretical works as chaotic cold accretion \citep[or CCA for short, see][]{Pizzolato2005,Gaspari2013,Gaspari2015,Gaspari2017}, the accretion and feedback processes in massive galaxies are linked, at least in part, by radio jets. These jets emanate from a galaxy's central supermassive black hole and inflate buoyant bubbles within the surrounding X-ray gas. In turn, these bubbles then migrate outwards from the galaxy centre. Turbulent motions driven by AGN outflow, jets and bubbles, together with the uplift of low entropy gas material, drive a top-down non-linear condensation of warm filaments and cold clouds. Recurrent inelastic collisions between clouds then promotes the cancellation of angular momentum and boosts the supermassive black hole accretion rate. Behaviour of this kind is expected close to the core, where the velocity dispersion of the molecular gas dominates over the rotational velocity. Subsequent periods of radio-mode AGN feedback are likely to influence further accretion and star formation throughout the galaxy. They are also predicted to significantly affect the thermodynamics of the surrounding intracluster medium gas and to repeatedly shape the evolution of the galaxies within the whole cluster \citep{Churazov2001,Nulsen2005,McNamara2012}. In the last two decades the cooled gas within clusters has been widely surveyed at a range of wavelengths e.g. optical lines \citep{Crawford1999,Tremblay2018}, near infra-red to infra-red \citep{Jaffe2001,Edge2002, Egami2006}, with atomic cooling lines \citep{Edge2010} and with H$_{2}$ observations \citep{Jaffe2005,Donahue2011}. These results show that a significant mass of cold, $<40$ K gas exists within the majority of relaxed galaxy clusters, with typical column densities of $10^{21}-10^{23} \text{ cm}^{-2}$ in the central \mbox{3 - 10 kpc} of the brightest cluster galaxies \citep{Edge2001,SalomeCombes2003}. Important observational constraints can be placed on accretion models such as chaotic cold accretion by determining the properties of this cold gas closer to the supermassive black hole, particularly the typical mass, dynamics and covering fraction. To date, the most direct observational evidence supporting a chaotic cold accretion type model in brightest cluster galaxies has been provided by \cite{David2014} and \cite{Tremblay2016}. Their pencil-beam observations of the \mbox{NGC 5044} and \mbox{Abell 2597} brightest cluster galaxies, respectively, detect cold molecular gas inferred to be within \mbox{$\sim$100 pc} of the galaxy's supermassive black hole. The clouds are detected through absorption by using the AGN as a bright backlight, and give a random snapshot of the properties of the molecular gas which may go on to fuel the AGN. The cold molecular gas regions detected have dynamics consistent with their warmer H\thinspace\small I\normalsize\space clouds and their narrow absorption lines \mbox{(FWHM$\sim$6-30 \mbox{km s$^{-1}$})} indicate that they may potentially be giant molecular clouds, rather than giant molecular associations, which are falling towards their respective galaxy's supermassive black hole with velocities of between \mbox{240 and 335 \mbox{km s$^{-1}$}}. A larger sample of absorbing clouds is needed to constrain their overall properties, something which is provided by this work with the addition of observations of one more particularly interesting brightest cluster galaxy. We present new \textit{Atacama Large Millimeter/submillimeter Array} (ALMA) radio observations of Hydra-A (see Fig. \ref{fig:HydraAHSTRadioCombinedImage}), a giant elliptical galaxy with a nearly edge-on disk of dust and cool gas which lies at the centre of an X-ray luminous cluster. Hydra-A is an archetype of a brightest cluster galaxy lying in a cooling flow; it has powerful radio jets and lobes emanating from its centre \citep{Taylor1990}, around which are cavities in the intracluster medium's X-ray emitting gas which have been created by repeated AGN outbursts \citep{McNamara2000,Wise2006}. The radio jets and lobes are almost perpendicular to a rotating gas disc and a spatially coincident dust lane \citep{Hansen1995,Hamer2013}. Hydra-A, or 3C218, is an ideal target for a molecular absorption study for two main reasons. Firstly, it is an extremely strong radio/mm source with amongst the highest flux density in the 3C catalogue of radio sources \citep{Edge1959}. In our ALMA observations, we measure a flux density of $\sim$60 mJy at 230 GHz and in the sample of 35 brightest cluster galaxies observed by \citet{Hogan2015}\footnote{See supplementary data table 2 and 5.}, Hydra-A also has the highest flux density at both 150 and 353 GHz. This makes it an ideal backlight against which to observe molecular absorption. Secondly, previous observations at many different wavelengths suggest that the galaxy's core contains a significant mass of both atomic and molecular gas, making positive detections highly likely e.g. H\thinspace\small{I}\normalsize\space absorption by \citet{Dwarakanath1995,Taylor1996}, CO emission by \citet{Hamer2013} and H$_{2}$ studies by \citet{Edge2002,Donahue2011,Hamer2013}. Our observations show the rotating disc of molecular gas which was previously observed by \citet{Hamer2013} in much greater detail, thanks to the high angular and spectral resolution which is provided by ALMA. They also reveal a series of cold molecular gas clouds lying along the line-of-sight to the galaxy's AGN. These have apparent velocities of between \mbox{-43 and -4 \mbox{km s$^{-1}$}} relative to the central supermassive black hole and are most likely moving along low ellipticity orbits, with the supermassive black hole at one focus. This paper is laid out as follows. In \S\ref{sec:observations} we outline the details of our ALMA observations, in \S\ref{sec:DiscDynamics} we discuss the kinematic properties of Hydra-A's molecular gas disc and in \S\ref{sec:MolecularGasMass} we estimate its mass. The properties of the molecular clouds which lie along the line-of-sight to the mm-continuum source are discussed in \S\ref{sec:accretion} and \S\ref{sec:derivations}. Finally, in \S\ref{sec:discussion} we discuss the significance and implications of our observations. Throughout the paper we assume a flat $\Lambda$CDM Universe with \mbox{$H_{0}=70$ km s$^{-1}$ Mpc$^{-1}$}, \mbox{$\Omega_{M}$=0.3} and \mbox{$\Omega_{\Lambda}$=0.7}. When applying velocity corrections we use a stellar redshift of \mbox{$z$ = 0.0543519}, which provides the best estimate of the gravitational centre of the galaxy. This redshift is calculated from MUSE observations (ID: 094.A-0859) and corresponds to a recession velocity of \mbox{16294 \mbox{km s$^{-1}$}}. This velocity carries an uncertainty of 15 \mbox{km s$^{-1}$}. At Hydra-A's redshift, there is a spatial scale of \mbox{1.056 kpc arcsec$^{-1}$}, meaning that kpc and arcsec scales in figures are approximately equivalent. \section{Observations} \label{sec:observations} \begin{table} \centering \begin{tabular}{lcr} & \multicolumn{2}{c}{Observation} \\ \hline & CO(2-1) & CO(1-0) \\ \hline Observation date & 2016 Oct 23 & 2018 Jul 18 \\ \\ Integration time / s & 2700 & 2700 \\ \\ Velocity resolution / \mbox{km s$^{-1}$} & 1.3 & 2.7 \\ \\ Frequency resolution / kHz & 977 & 977 \\ \\ Angular resolution / arcsec & 0.19 & 1.63 \\ \\ PWV / mm & 1.11 & 2.85 \\ \\ Field of view / arcsec & 27.8 & 62.1 \\ \\ Central frequency / GHz & 218.55 & 109.33 \\ \\ Maximum spacing / km & 1.1 & 0.16 \\ \\ RMS noise per channel / mJy & 1.4 & 0.7 \\ \hline \end{tabular} \caption{Image properties for the CO(2-1) and CO(1-0) data.} \label{tab:observations_table} \end{table} The Hydra-A brightest cluster galaxy, located at \mbox{RA 09h18m05.65s}, \mbox{dec. $-12^{\circ}05^{\prime}44.0^{\prime\prime}$ (J2000)}, was observed over two ALMA cycles in bands 3 and 6. For these observations, the ALMA receivers were tuned to emission from the \mbox{$J$=1-0} and \mbox{$J$=2-1} rotational lines of carbon monoxide (CO). This CO emission acts as a tracer for cold molecular hydrogen at temperatures of \mbox{$\lesssim$50 K}. Although molecular hydrogen is significantly more abundant, it is not possible to directly observe it at these temperatures because of a lack of any rotational line emission. The spectral line observations from ALMA allowed us to create three dimensional position-velocity maps which trace the brightest cluster galaxy's cold molecular gas. With these high resolution maps, the projected position and line-of-sight velocity of cold molecular gas can be traced throughout Hydra-A. The first observations taken were during ALMA Cycle 4, of CO(2-1) on 2016 October 23, using band 6. The \mbox{CO(1-0)} observations were taken on 2018 July 18 during ALMA Cycle 5, using band 3. Further technical details of each observation are given in Table \ref{tab:observations_table}. The data were calibrated using \texttt{CASA} version 5.1.1, a software package which is produced and maintained by the ALMA observatory \citep{CASA}. For each of the observed CO lines, the calibrated data were produced by the ALMA observatory. After their delivery, we performed the necessary continuum subtractions and made channel maps at velocity resolutions to suit our needs. \section{Dynamics of the cold gas disc} \label{sec:DiscDynamics} \begin{figure*} \includegraphics[width=\linewidth]{Fig2_Full_Hydra-A_CO21_CO10_Spectra} \caption{Peak-normalized \mbox{CO(1-0)} and \mbox{CO(2-1)} spectra of Hydra-A's disc from our ALMA observations, extracted using the region indicated by the large blue box shown in Fig. \ref{fig:HydraAContourImage}. The spectra both show a double-peaked structure with a trough at the galaxy's dynamical centre, which itself shows some absorption close to the systemic velocity. The peak-normalization applied to the spectra aids comparison of the emission, but due to the CO(1-0) having a much lower peak, it over emphasizes the strength of the CO(1-0) absorption at the centre. The emission from the CO(2-1) and CO(1-0) continuum-subtracted spectra peak at 13 mJy and 3 mJy, respectively. Additionally, both peak-normalized spectra appear to have a similar noise levels because each observation was done while working towards a similar signal-to-noise ratio. The \mbox{CO(1-0)} and \mbox{CO(2-1)} absorption features are discussed in more detail in \S\ref{sec:accretion} and \S\ref{sec:derivations}.} \label{fig:HydraAFullSpectrum} \end{figure*} \begin{figure*} \includegraphics[width=\linewidth]{Fig3_HydraAContourImage} \caption{An integrated brightness map of \mbox{${\geq} 3 \sigma$ CO(2-1)} emission in the Hydra-A brightest cluster galaxy. The brightness is integrated from \mbox{-500 km s$^{-1}$} to \mbox{+500 km s$^{-1}$} about the galaxy's systemic velocity. Contours marking 0.15, 0.25, 0.35 and \mbox{0.45 Jy \mbox{km s$^{-1}$}\space beam$^{-1}$} emission are shown in white. The yellow star indicates the position of the mm-continuum source while the large, dashed blue box and dashed white circle indicate the respective regions from which the spectra in Fig. \ref{fig:HydraAFullSpectrum} and \ref{fig:CombinedUncorrectedandCorrectedSpectrum} are extracted. The large, dashed red circle, which is approximately the same size as the CO(1-0) beam, indicates the region from which the spectra in Fig. \ref{fig:1021Spectrum} are extracted. The CO(2-1) beam size is shown in blue in the bottom-left corner.} \label{fig:HydraAContourImage} \end{figure*} \begin{figure*} \includegraphics[width=\linewidth]{Fig4_CombinedVelocityAndDispersionImage} \caption{Moments maps of \mbox{${\geq} 5\sigma$} \mbox{CO(2-1)} emission produced using \texttt{CASA}'s \texttt{immoments} task \citep{CASA}. \textbf{Left:} The intensity-weighted velocity of the CO(2-1) line emission relative to the galaxy's systemic recession velocity, showing a disc of cold molecular gas with a line-of-sight velocity gradient of \mbox{${\sim}$140 km s$^{-1}$ kpc$^{-1}$} running across the galaxy's dust lane. \textbf{Right:} The intensity-weighted velocity dispersion of the CO(2-1) emission, which remains significantly smaller than the rotation velocity throughout all but the very centre of the disc. This suggests that the cold molecular gas within Hydra-A's disc is undergoing relatively ordered rotation.} \label{fig:CombinedVelocityAndDispersionImage} \end{figure*} \begin{figure*} \includegraphics[width=\linewidth]{Fig5_HydraApVImage} \caption{\textbf{Top:} Position-velocity diagram of Hydra-A's ${\geq} 5 \sigma$ CO(2-1) emission along the kinematic axis of the disc, with integrated brightness contours of 0.75, 1.0, 1.25 and 1.5 mJy beam$^{-1}$. The offset is centred at the position of the continuum source and the velocity is centred at Hydra-A's recession velocity. \textbf{Bottom:} Integrated brightness contours reflected about the velocity and offset of the core highlight the slight asymmetry within the disc. Though the disc has a largely symmetric velocity distribution, there is an extended emission region at the extreme edge of the blueshifted side of the disc.} \label{fig:Hydra-A_pV_Image} \end{figure*} Fig. \ref{fig:HydraAFullSpectrum}\space shows the spectra of the CO(1-0) and CO(2-1) emission observed across Hydra-A's disc. The region from which the spectra are extracted is indicated by the large, blue rectangle on the integrated brightness map shown in Fig. \ref{fig:HydraAContourImage}. Due to its considerably higher angular resolution, we only show an integrated brightness map of the CO(2-1) data, which was produced using the \mbox{\texttt{immoments}} task in \texttt{CASA}. The map reveals a close to edge-on disc of cold molecular gas, with two peaks in brightness on either side of the centre corresponding to those seen in Fig. \ref{fig:HydraAFullSpectrum}. Brightness contours from Fig. \ref{fig:HydraAContourImage} overlaid onto the HST F814 image of Fig. \ref{fig:HydraAHSTRadioCombinedImage} show a cold molecular gas disc that is spatially coincident with the dust lane of the galaxy. The molecular disc and dust lane are aligned with the \mbox{${\sim}$5 kpc} diameter disc of ionized and warm molecular hydrogen identified by \citet{Hamer2013}. The strong, broad and double-peaked line emission seen in Fig. \ref{fig:HydraAFullSpectrum} results from the disc's rotation and has a large full width zero intensity of \mbox{$\sim$1000 km s$^{-1}$}, consistent with previous CO observations of Hydra-A \citep{ODea1994,Edge2001,Hamer2013}. The double-peaked nature of the CO emission, also previously identified by \citet{Hamer2013}, has so far only been detected in limited number of elliptical galaxies \citep[e.g.][]{Lim2001,Salome2011}, particularly in brightest cluster galaxies. This is due to the low probability of a galactic disc lying almost perfectly edge-on along the line-of-sight. Moments maps of the high angular resolution \mbox{CO(2-1)} data, also produced using \texttt{CASA}'s \mbox{\texttt{immoments}} task, show the velocity structure of the disc in greater detail. The intensity-weighted velocity map in the left panel of Fig. \ref{fig:CombinedVelocityAndDispersionImage} shows that the brightest cluster galaxy has an average line-of-sight velocity gradient of \mbox{${\sim}$140 km s$^{-1}$ kpc$^{-1}$}. Throughout the disc the intensity-weighted velocity dispersion shown in the right panel of Fig. \ref{fig:CombinedVelocityAndDispersionImage}, remains small and never exceeds \mbox{$\sim$50 km s$^{-1}$}, implying that the cold gas within the disc is undergoing relatively ordered rotation without large proportions deviating from this significantly. This is further demonstrated by the turbulent Taylor number, the ratio of the rotational velocity to the velocity dispersion. It is clear from Fig. \ref{fig:CombinedVelocityAndDispersionImage} that this ratio is $>1$ throughout the majority of the disc i.e. the rotation velocity dominates over the velocity dispersion. It does however appear to fall below unity in a small region which is coincident with the mm-continuum source; likely because at this point the disc rotation is transverse to the line-of-sight. Chaotic cold accretion simulations \citep[e.g.][]{Gaspari2015,Gaspari2017}, show that where the turbulent Taylor number does reach unity, gas condensation becomes increasingly clumpy \citep[as is seen in the example of NGC 7049, described by][]{Juranova2018}. Although the velocity dispersion remains small throughout the disc, there are small increases approximately half-way between the galaxy centre and the edges of its visible disc of cold gas which coincide with the peaks in the intensity of the \mbox{CO} emission seen in both Fig. \ref{fig:HydraAFullSpectrum} and \ref{fig:HydraAContourImage}. The increase in the velocity dispersion occurs where the change in the rotational velocity of the disc with respect to the orbital radius is highest, as is demonstrated by the position-velocity diagram shown in Fig. \ref{fig:Hydra-A_pV_Image}. The position-velocity diagram also shows that there are no significant inflows or outflows of cold molecular gas from the disc, as well as highlighting some asymmetry; the blueshifted side of the disc extends to around \mbox{2.5 kpc}, while the redshifted side extends to around \mbox{2 kpc}. \section{Molecular Gas Mass of the Disc} \label{sec:MolecularGasMass} The total mass of cold molecular gas in Hydra-A can be estimated from both the CO(1-0) and CO(2-1) emission measured along the galaxy's disc using the following relation from \citet{Bolatto2013}, \begin{equation} \begin{split} M_{\text{mol}} = \frac{1.05\times 10^{4}}{F_{ul}} \left( \frac{X_{\text{CO}}}{2\times 10^{20}\frac{\text{cm}^{-2}}{\text{K km s}^{-1}}}\right)\left( \frac{1}{1+z}\right) \\ \times \left( \frac{S_{\text{CO}} \Delta v}{\text{Jy km s}^{-1}}\right) \left( \frac{D_{\text{L}}}{\text{Mpc}}\right)^{2} M_{\odot}\enspace , \end{split} \label{eq:massequation} \end{equation} where $M_{\text{mol}}$ is the mass of molecular hydrogen, $X_{\text{CO}}$ is the CO-to-H$_{2}$ conversion factor, $z$ is the redshift of the source, $S_{\text{CO}} \Delta v$ is the CO emission integral, $D_{\text{L}}$ is the luminosity distance in Mpc and $M_{\odot}$ is a solar mass. $F_{ul}$ is a factor which is included as an approximate conversion between the expected flux density ratios of the two lines, where $u$ and $l$ represent the upper and lower levels. For CO(1-0), $F_{10}=1$ and for CO(2-1) we use a value of $F_{21}=3.2$. This value is consistent with similar studies \citep[e.g.][]{David2014,Tremblay2016,Tami2018}, and originates from a combination of the factor of two between the frequencies of the lines and the brightness temperature ratio observed for molecular clouds in spiral galaxies of 0.8 \citep{BraineandCombes1992}. For \mbox{Hydra-A}, \mbox{$z=0.0543519$} and \mbox{$D_{\textnormal{L}}=242.4$ Mpc}. We use a standard value of \mbox{$X_{\text{CO}} = 2 \times 10^{20}$ cm$^{-2}$ (K km s$^{-1}$)$^{-1}$} for the CO-to-H$_{2}$ conversion factor in our calculations. This is the same as is used by e.g. \citet{Bolatto2013,David2014,Tremblay2016}. To determine the mass of cold molecular hydrogen in Hydra-A's disc and its uncertainties, Monte Carlo simulations which allow us to estimate the emission integral for the spectra shown in Fig. \ref{fig:HydraAFullSpectrum} are performed in the following way. Firstly, for each spectrum the noise in the observed spectrum was estimated from the root mean square (rms) of the continuum emission. This was calculated after excluding the region where the emission is clearly visible (\mbox{-600 \mbox{km s$^{-1}$}} to \mbox{+600 \mbox{km s$^{-1}$}}). Following this, \mbox{100 000} simulated spectra are created based upon the observed spectrum. To produce each simulated spectrum, a Gaussian distribution is created for each velocity channel. This Gaussian distribution is centred at the intensity in the observed spectrum for that particular velocity channel, and has a variance equal to the rms noise squared. A random value for the intensity is drawn from the Gaussian distribution and when this has been done across all velocity channels, a simulated spectrum is produced. A double-Gaussian line provides the best fit and for each of the \mbox{100 000} spectra produced such a fit is found using $\chi^{2}$ minimisation. Finally, the molecular mass is found by using Eq. \ref{eq:massequation} and the median value resulting from the \mbox{100 000} estimates of $S_{\text{CO}} \Delta v$. The upper and lower ${1\sigma}$ errors are taken from the values which delimit the 15.865 per cent highest and lowest results for each of the fits (i.e. 68.27 per cent of the fitted parameters will therefore lie within this ${1\sigma}$ range). This procedure treats the CO(1-0) and CO(2-1) spectra independently and provides two inferred masses for Hydra-A's cold molecular gas. Using the CO(1-0), we find an estimated mass of \mbox{$M_{\text{mol}}=1.06^{+0.02}_{-0.02}\times 10^{9}$ $\text{M}_{\odot}$}, while for the CO(2-1), we estimate a mass of \mbox{$M_{\text{mol}}=5.6^{+0.1}_{-0.1}\times 10^{9}$ $M_{\odot}$}. It is important to note that the errors quoted in these values are due to the noise seen in each of the spectra. In reality, the molecular mass may differ from the estimated values by as much as an order of magnitude due to the uncertainty surrounding the values of the X-factor and the conversion factor, $F_{ul}$. However, given these larger errors, the masses we find are consistent with the value of \mbox{$M_{\text{mol}}=2.26 \pm 0.29\times 10^{9}$ $M_{\odot}$} found from \textit{Institut de RadioAstronomie Millim\'etrique} (IRAM) 30m observations observations presented in \citet{Hamer2013} and are typical molecular gas masses when compared with those found through CO detections for other brightest cluster galaxies with cooling flows \citep[e.g.][]{Edge2001,SalomeCombes2003}. \section{Cold, Clumpy Gas Clouds} \label{sec:accretion} \begin{figure*} \includegraphics[width=\textwidth]{Fig6_Hydra-A_CO_2-1_Spectrum_Combined} \caption{\textbf{Left:} Hydra-A's continuum-normalized \mbox{CO(2-1)} spectrum, extracted from the region lying along the line-of-sight to the bright mm-continuum source (the exact region is shown by a dashed, white circle in Fig. \ref{fig:HydraAContourImage}). The spectrum shows a broad emission component \mbox{(FWHM=151$^{+8}_{-7}$ \mbox{km s$^{-1}$})} and very clear absorption regions. The broad component is present throughout the disc and is produced by emission from a large scale ensemble of cold molecular gas clouds. To show the strength of the absorption regions more clearly, a Gaussian line is fitted to the spectrum (shown in red). This fit is made after excluding the spectral bins where absorption is visible (approximately \mbox{-48 \mbox{km s$^{-1}$}} to \mbox{-1 \mbox{km s$^{-1}$}}, indicated by the vertical grey lines). \textbf{Right:} The continuum-normalized \mbox{CO(2-1)} spectrum extracted from the region lying along the line-of-sight to the mm-continuum source, with the broad emission component removed. The absorption features are due to cold molecular gas clouds which are likely to be within $\sim$200 pc of the supermassive black hole. The best fit parameters of the absorbing regions labelled `A', `B' and `C' are shown in Table \ref{tab:results_table}.} \label{fig:CombinedUncorrectedandCorrectedSpectrum} \end{figure*} \begin{table*} \centering \begin{tabular}{lcccr} \hline Region & $v_{\text{cen}}$ / \mbox{km s$^{-1}$} & $v_{\text{cen}}$ - $v_{\textnormal{emission}}$ / \mbox{km s$^{-1}$} & FWHM / \mbox{km s$^{-1}$} & $\tau_{\text{max}}$\\ \hline Emission & -10 $^{+2}_{-2}$ &- & 151$^{+8}_{-7}$ & - \\ \\ A & -42.8 $^{+0.1}_{-0.1}$ & -33$^{+2}_{-2}$& 4.4 $^{+0.3}_{-0.3}$ & 0.88$^{+0.06}_{-0.06}$\\ \\ B & -16.5 $^{+0.8}_{-0.8}$ & -7$^{+2}_{-2}$ & 17 $^{+2}_{-2}$ & 0.11 $^{+0.01}_{-0.01}$\\ \\ C & -4.4 $^{+0.2}_{-0.3}$&+6$^{+2}_{-2}$ & 2.3$^{+1.6}_{-0.8}$ & 0.13 $^{+0.03}_{-0.03}$\\ \hline \end{tabular} \caption{Best fit parameters for the broad emission and absorption regions along the line of sight to Hydra-A's mm-continuum source, as seen in Fig. \ref{fig:CombinedUncorrectedandCorrectedSpectrum}. The 1$\sigma$ errors in the v$_{\textnormal{cen}}$ values are in addition to the systemic uncertainty of \mbox{15 \mbox{km s$^{-1}$}} in the recession velocity of Hydra-A taken from MUSE observations of stellar absorption lines. We also include the velocities of the absorption regions relative to the centre of the CO(2-1) line-of-sight emission, since this provides a second plausible value for the zero velocity reference point.} \label{tab:results_table} \end{table*} \begin{figure} \includegraphics[width=\columnwidth]{Fig7_Hydra-A_CO_2-1_and_HI_Apparent_Optical_Depth} \caption{Hydra-A's normalized CO(2-1) and H\thinspace\small{I}\normalsize\space optical depth profiles for the region co-spatial with the mm-continuum source. The CO(2-1) optical depth profile is produced using the spectrum shown in the the right panel of Fig. \ref{fig:CombinedUncorrectedandCorrectedSpectrum}, and the H\thinspace\small{I}\normalsize\space profile is taken from VLBA observations presented in \citet{Taylor1996}.} \label{fig:ApparentOpticalDepth} \end{figure} As can be seen in Fig. \ref{fig:HydraAFullSpectrum}, the \mbox{CO(1-0)} and \mbox{CO(2-1)} spectra from Hydra-A's disc show the presence of a narrow absorption feature close to the zero-velocity point, caused by molecular clouds which lie along the line-of-sight to the bright mm-continuum source. Due to the high angular resolution of the CO(2-1) observations, this absorption can be seen in more detail by extracting spectra from a much smaller region. The left panel of Fig. \ref{fig:CombinedUncorrectedandCorrectedSpectrum} shows the continuum-normalized \mbox{CO(2-1)} spectrum along the line-of-sight to the mm-continuum source, taken from the region shown by the small, dashed white circle in Fig. \ref{fig:HydraAContourImage}. The spectrum, which is centred on the stellar recession velocity of the galaxy, has two main features. Firstly, there is a broad emission component. This can also be seen across the rest of the galaxy's disc and is produced by a large-scale ensemble of molecular gas clouds. It is this component which, when summed across the disc, produces the double-peaked spectrum seen in Fig. \ref{fig:HydraAFullSpectrum}. Secondly, the spectrum reveals a group of absorption features which are produced by the cold molecular gas clouds which lie along the line-of-sight to the bright and unresolved continuum source. Importantly, the compact nature of the continuum source ensures that we are probing a single line-of-sight and seeing no contamination from more extended emission. These absorption features appear to be unique to the radio core of the galaxy and do not arise elsewhere, such as along the line-of-sight to the bright spots in galaxy's radio lobes. To show the strength of the absorption more clearly, the broad emission component is removed by fitting and subtracting a Gaussian line to the spectrum, with the Gaussian fit excluding the spectral bins where absorption can be seen (approximately \mbox{-48 to -1 \mbox{km s$^{-1}$}}, as indicated by the vertical grey lines in Fig. \ref{fig:CombinedUncorrectedandCorrectedSpectrum}). This region was chosen by performing Gaussian fits to the emission after applying masks to the spectrum with limits at every spectral bin between \mbox{-55 $\pm$ 10 \mbox{km s$^{-1}$}} and \mbox{+5 $\pm$ 10 \mbox{km s$^{-1}$}}. The selected range produces a spectrum with the lowest \mbox{$\chi^{2}_{\nu}$} value when the non-masked region is fitted to a flat line after the removal of the emission. The right panel of Fig. \ref{fig:CombinedUncorrectedandCorrectedSpectrum} shows the spectrum after the subtraction of the optimum Gaussian fit. Following this correction, an apparent optical depth profile, $\tau_{\text{a}}$, was calculated from the observed intensities using the relation \citep{Savage1991}, \begin{equation} \tau_{\text{a}} = \ln{ [ I_{\text{0}}/I_{\text{obs}}(\lambda)]}\text{\space}, \end{equation} where $I_{\text{0}}$ is the continuum intensity (independent of $\lambda$ over the wavelength range observed) and $I_{\text{obs}}(\lambda)$ is the observed intensity. Due to the high signal to noise ratio and because the spectrum's velocity resolution is relatively high compared with the line widths, our calculations of $\tau_{\text{a}}$ are likely to be minimally affected by the instrumental spread function. In this case $\tau_{\text{a}}$ is a good representation of the optical depth, $\tau$, and so we treat the two as being equivalent. We find that a triple-Gaussian line provides the best fit to the absorption features seen in Fig. \ref{fig:CombinedUncorrectedandCorrectedSpectrum}. As such, we estimate the properties of these emission lines using an appropriately modified version of the Monte Carlo method previously described in \S\ref{sec:MolecularGasMass}. We assume a filling factor of 1, so our calculations provide a lower limit on the optical depths of the absorbing regions. The estimates for the optical depths of the absorbing regions are shown in Table \ref{tab:results_table}, along with their velocities, $v_\textnormal{cen}$, and the FWHM of the lines. As well as the observed MUSE stellar redshift the spectrum is centred on, we show the velocities of the absorption regions relative to the line-of-sight emission since this provides a second plausible value for the zero velocity reference point. One particularly strong absorption feature (labelled `A' in Fig. \ref{fig:CombinedUncorrectedandCorrectedSpectrum}) can be seen in the spectrum, where a peak of around 60 per cent of the continuum emission is absorbed. This has a narrow line width of \mbox{FWHM=4.4$ ^{+0.2}_{-0.3}$ km s$^{-1}$}; the narrowest such absorption feature found to date in a brightest cluster galaxy. Previous observations by \citet{David2014,Tremblay2016} have comparable velocity resolution, so this is unlikely to be the narrowest feature observed purely because their absorption regions are not sufficiently resolved in velocity. This absorption region is found to have a high peak optical depth of \mbox{$\tau$=0.88$^{+0.06}_{-0.06}$}. Therefore, it is also by far the deepest CO absorption line detected so far in a brightest cluster galaxy, with the next strongest being found in \mbox{Abell 2597} with an optical depth of \mbox{${\tau \sim}$0.3} \citep{Tremblay2016}. At the line's peak around \mbox{${\sim}$60} per cent of the emission from the continuum source is being absorbed, either by optically thick gas which covers \mbox{${\sim}$60} per cent of the continuum source spatially, or by more diffuse gas which completely covers the source's synthesised beam with an optical depth of \mbox{${\tau \sim}$0.9}. Further absorption regions due to clouds moving away from the mm-continuum source at slightly lower velocities are also present. The central velocity, FWHM and peak optical depth of each of these absorption features are also shown in Table \ref{tab:results_table}. Collectively, these absorption features reveal the presence of cold molecular gas clouds moving relative to the galaxy's central supermassive black hole at velocities of between \mbox{-43} and \mbox{-4 km s$^{-1}$}. However, these are simply apparent motions along the line-of-sight and do not necessarily imply that the gas clouds are flowing away from the galaxy centre at those velocities. Nevertheless, simulations predict that over long periods of time clouds such as those observed here experience collisions in the inner region which reduce their angular momentum. This disrupts their relatively stable, slightly elliptical orbits and funnels them towards the galaxy's supermassive black hole \citep{Gaspari2017, Gaspari2018}. However, it is also possible that the slightly blueshifted velocities seen could be due to a bar, though this is typically associated with lower mass spiral galaxies. As well as cold molecular gas, warmer atomic gas has also been detected in Hydra-A with the \textit{Very Long Baseline Array} (VLBA) telescope \citep{Taylor1996}. These observations detect H\thinspace\small I\normalsize\space gas in absorption along multiple lines-of-sight close to the centre of the galaxy; absorption is seen against the knots of the active galactic nucleus's jets, as well as against the extremely bright continuum source. The optical depth profiles of the H\thinspace\small I\normalsize\space and CO(2-1) absorption for the line-of-sight to the continuum source are shown in Fig. \ref{fig:ApparentOpticalDepth}, where both have been normalized to aid comparison. Both optical depth profiles probe the region along the line-of-sight to the continuum source. The H\thinspace\small{I}\normalsize\space line lies at 1.4 GHz and the CO(2-1) line lies at \mbox{230 GHz}. Due to the large difference in these frequencies, if there are spectral index variations or synchrotron opacity effects in the radio core, it is possible that different parts of the core would dominate at the different frequencies. However, in both cases the absorption is observed against an unresolved core and so this should not be an issue when comparing the two spectra. Both the warm atomic gas and cold molecular gas appear to be centred at slightly blueshifted velocities relative to the supermassive black hole. Additionally, both absorption profiles have velocity ranges with comparable widths and profiles which may suggest that the clouds detected as a narrow CO(2-1) line are visible as a blended H\thinspace\small I\normalsize\space line. Given that the clouds are spatially coincident, if this is the case it would be consistent with the hypothesis that when heated, cold molecular gas regions produce an encompassing skin of warm atomic gas \citep[e.g.][]{Jaffe2005}. With the exception of the small velocity discrepancy between the peaks in the optical depths of the atomic and molecular gas, this relationship is similar to that seen in Abell 2597 \citep{Tremblay2016} and demonstrates the need for an increase in the number of joint CO and H\thinspace\small I\normalsize\space observations to advance our understanding of the link between the atomic and molecular gas and how they fit into the predictions of accretion models and simulations. Nevertheless, the spatially coincident detections of clumpy molecular and atomic gas clouds in these systems provides a strong argument against models related to Bondi accretion, which rely upon the smooth and spherically symmetric accretion of hot gas. The detections made so far are more consistent with the predictions of clumpy accretion models such as chaotic cold accretion. \section{Temperature and Column Density Derivations} \label{sec:derivations} Although the angular resolution of our CO(2-1) observations is considerably higher than those of CO(1-0), both have sufficient spectral resolution to show the narrow absorption along the line-of-sight to the mm-continuum source. Fig. \ref{fig:1021Spectrum} shows the spectra for each CO line, extracted from the region shown by the large, dashed red circle in Fig. \ref{fig:HydraAContourImage}, which is of a similar size to the CO(1-0) beam. The strength of the CO(1-0) absorption line is primarily dependent on the number of CO molecules in the ground rotational state ($J$=0), whereas the absorption line observed in CO(2-1) primarily depends on the number of molecules in the first rotational state ($J$=1). The relative number of molecules in these two states is determined by the temperature of the gas. Therefore, the ratio of the optical depth values for these two absorption lines will give a direct measure of the gas temperature, assuming that the lines are not optically thick. Due to the lower resolution and larger beam size of the CO(1-0) observations, only the most strongly absorbing region remains clearly visible in both spectra when the larger extraction region is used, so we are only able to estimate the temperature for this absorption region. For optically thin gas in local thermodynamic equilibrium, the \mbox{CO(1-0)} and \mbox{CO(2-1)} velocity integrated optical depths are related by, \begin{equation} \label{eq:opacityratio} \frac{\int \tau_{21} dv}{\int \tau_{10} dv} = 2 \frac{1 - e^{- h\nu_{21}/k T_{\textnormal{ex}}}}{e^{h\nu_{10}/k T_{\textnormal{ex}}} -1}\enspace , \end{equation} where $h$ and $k$ are the Planck and Boltzmann constants, $\nu_{10}$ and $\nu_{21}$ are the rest frequencies of the \mbox{CO(1-0)} and \mbox{CO(2-1)} lines and $T_{\textnormal{ex}}$ is the excitation temperature \citep{Bolatto2003,Godard2010,Magnum2015}. In the above, CO is approximated to being a stiff molecule such that $\nu_{10}$ and $\nu_{21}$ differ by a factor of two. To estimate $T_{\textnormal{ex}}$ for the strongly absorbing cloud, we carry out calculations using a Monte Carlo approach similar the one described in \S\ref{sec:MolecularGasMass}, again using 100 000 simulated spectra for each line. For each pair of simulated spectra, the emission is removed and the optical depth integrals are estimated using a single Gaussian fit to each line. We then use Eq. \ref{eq:opacityratio} to calculate $T_\textnormal{ex}$ numerically and find a cloud excitation temperature of \mbox{$T_\textnormal{ex} = 42^{+25}_{-11}$ K}. Using the derived excitation temperature, it is also possible to estimate the total column density, $N_{\textnormal{tot}}$, of the molecular cloud. In general, \begin{equation} \label{} N_{\textnormal{tot}} = Q(T_{\textnormal{ex}}) \frac{8 \pi \nu_{ul}^{3}}{c^{3}}\frac{g_{l}}{g_{u}}\frac{1}{A_{ul}} \frac{1}{ 1 - e^{-h\nu_{ul}/k T_{\textnormal{ex}}}}\int \tau_{ul} dv \enspace , \end{equation} where $Q$($T_{\textnormal{ex}}$) is the partition function, $c$ is the speed of light, $A_{ul}$ is the Einstein coefficient of the observed transition and $g$ the level degeneracy, with the subscripts $u$ and $l$ representing the upper and lower levels \citep{Godard2010,Magnum2015}. Using the derived excitation temperature and the velocity integrated optical depth of the CO(2-1) line, we find a line-of-sight CO column density of $N_{ \textnormal{CO}}=2^{+3}_{-1}\times 10 ^{17}\textnormal{cm}^{-2}$; a similar CO column density to the absorption regions identified by e.g. \citep{Wiklind2018}. This value can also be used to estimate the column density of molecular hydrogen by assuming a carbon abundance equal to the Milky Way gas phase, and assuming that all gas-phase carbon exists in CO molecules \citep{Sofia}. In this case, there is a conversion factor of CO/H$_{2}=3.2\times 10^{-4}$, giving an H$_{2}$ column density of \mbox{$N_{ \textnormal{H}_{2} }=7^{+10}_{-4}\times 10 ^{20}\textnormal{cm}^{-2}$}. Observations of Hydra-A's X-ray emission by \citet{Russell2013} have also been used to estimate the total H$_{2}$ column density along the line-of-sight to the core. They find a value of $N_{ \textnormal{H}_{2}} = 3.5\pm 0.3 \times 10^{22}$ cm$^{-2}$, many times larger than our estimated value. However, this difference is likely due to the fact that our estimate is for the mass of gas which lies in the most strongly absorbing region. The \mbox{X-ray} observations of \citet{Russell2013} would instead probe all of the gas along this line-of-sight. \begin{figure} \includegraphics[width=\columnwidth]{Fig8_Core_Hydra-A_CO_21_10_Spectrum} \caption{Hydra-A's continuum-normalized CO(1-0) and \mbox{CO(2-1)} flux density after the removal of the emission which is seen across the galaxy's disc. These spectra are both extracted from the region indicated by the large, dashed red circle in Fig \ref{fig:HydraAContourImage}. A wider region is used to extract these spectra due to the larger beam size of the CO(1-0) images. By comparing the strength of the absorption seen for the two lines, we find that the absorbing gas has a temperature of $T_\textnormal{ex} = 42^{+25}_{-11}$ K and line-of-sight column densities of $N_{ \textnormal{CO} }=2^{+3}_{-1}\times 10 ^{17}\textnormal{cm}^{-2}$ and \mbox{$N_{ \textnormal{H}_{2} }=7^{+10}_{-4}\times 10 ^{20}\textnormal{cm}^{-2}$}.} \label{fig:1021Spectrum} \end{figure} \section{Discussion} \label{sec:discussion} The near edge-on orientation of Hydra-A's dust and gas discs is a rarity and so our observations of this brightest cluster galaxy provide a unique opportunity to analyse the dynamics of its molecular gas disc with crucial knowledge of how it is placed within the overall structure of the galaxy. The principal absorption line detected in Hydra-A is by far the deepest found to date in a brightest cluster galaxy, with a peak CO(2-1) optical depth of \mbox{${\tau} = 0.88^{+0.06}_{-0.06}$}, a temperature of \mbox{$T_\textnormal{ex} = 42^{+25}_{-11}$ K} and line-of-sight column densities of \mbox{$N_{ \textnormal{CO}}=2^{+3}_{-1}\times 10 ^{17}\textnormal{cm}^{-2}$} and \mbox{\mbox{$N_{ \textnormal{H}_{2} }=7^{+10}_{-4}\times 10 ^{20}\textnormal{cm}^{-2}$}}. The strength of this absorption is likely due to the edge-on nature of the disc. As a result of this orientation, the column density of the molecular gas intersecting the line-of-sight to the mm-continuum source is particularly high and so very strong absorption is seen. Although it is not possible to directly measure the velocity component of the molecular gas clouds orthogonal to the line-of-sight, the \mbox{${\sim}$140 \mbox{km s$^{-1}$}\space kpc$^{-1}$} line-of-sight velocity gradient across the disc of the galaxy implies that unless they lie at very large radii, they should be significantly larger than the infall velocities of the molecular clouds. However, it is unlikely that the clouds we detect lie at large distances from the supermassive black hole. Simulations by \citet{Gaspari2017} of clumpy molecular gas condensation show that both the volume filling factor and internal density of molecular clouds are inversely proportional to radius. Therefore, most of the dense, absorbing clouds contributing to the line-of-sight obscuration are expected to reside in the inner region, within radii of up to $\sim$200 pc. Conversely, the clouds' low velocities relative to the supermassive black hole suggest that they lie beyond the Bondi capture radius of \mbox{$\sim$10 pc}, within which they would gain large velocities towards the core due to the increasing likelihood of collisions and the strength of the supermassive black hole's gravitational field. Regarding the velocity structure of the disc, the large inferred horizontal velocities, combined with the comparatively small line-of-sight velocities of a few tens of \mbox{km s$^{-1}$}\space away from the core, suggest the molecular clouds are moving within a relatively stable, slightly elliptical disc. The asymmetry seen in Hydra-A's position-velocity diagram also point towards a low ellipticity disc. However, it is also possible that the non-circular motion inferred in the absorbing clouds may be caused by a bar, though this would typically be associated with spiral galaxies of lower mass. In terms of the line-of-sight velocities of the molecular clouds, this observation is in contrast to those of \citet{David2014} and \citet{Tremblay2016}, where velocities of \mbox{$\sim 200 - 300$ \mbox{km s$^{-1}$}} towards the supermassive black hole were observed. Additionally, in Hydra-A's case the absorbing clouds along the line-of-sight to the core lie roughly at the centre of the broad CO emission (shown in the left panel of Fig. \ref{fig:CombinedUncorrectedandCorrectedSpectrum}). This implies that clouds are not yet falling within the black hole's influence region ($< 10$ pc), but drifting in the turbulent field at up to $\sim 200$ pc. Indeed, our pencil-beam observations are simply showing a random sample of molecular clouds which correlate well with the line-of-sight velocity dispersion close to the core This work represents one of very few detections of cold molecular gas lying in front of a brightest cluster galaxy's strong and unresolved mm-continuum source. As such, it is difficult to make more general predictions regarding the properties of the molecular gas that would be expected in other brightest cluster galaxies. A larger, more statistically significant survey is needed to investigate the universal properties of this molecular gas, such as the covering fraction of cold molecular gas clouds, their temperatures and masses. Further ALMA cycle 5 \mbox{CO(1-0)} observations of a significantly larger sample of 21 extremely bright, core dominated radio sources with unresolved emission at \mbox{${85 - 110}$ GHz} of \mbox{${>}10$ mJy} and which have been drawn from an X-ray selected sample of over 1000 clusters of galaxies will be presented in Rose et al. (in preparation). Further scheduled Cycle 6 ALMA observations of Hydra-A will also allow us to examine the properties of the galaxy's molecular gas in much greater detail. We will be able to place constraints on the isotopic ratios of carbon and oxygen using \mbox{$^{13}$CO(1-0)}, \mbox{$^{13}$CO(2-1)}, \mbox{C$^{18}$O(1-0)}, \mbox{C$^{18}$O(2-1)} and \mbox{C$^{17}$O(1-0)} lines. Observations of \mbox{HCN(1-0)}, \mbox{HNC(1-0)}, \mbox{HCO+(1-0)}, \mbox{CS(2-1)} and \mbox{CN(2-1)} will allow us to determine the column density of these molecules relative to CO in the absorbing clouds. The study will also provide additional constraints on the temperature and column densities of the molecular gas along the line-of-sight. \section*{Acknowledgements} T.R. is supported by the Science and Technology Facilities Council (STFC) through grant ST/R504725/1. A.C.E. acknowledges support from STFC grant ST/P00541/1. The work of S.B. and C.O. was supported by NSERC (Natural Sciences and Engineering Research Council of Canada). M.G. is supported by NASA through Einstein Postdoctoral Fellowship Award Number PF5-160137 issued by the Chandra X-ray Observatory Center, which is operated by the SAO for and on behalf of NASA under contract NAS8-03060. Support for this work was also provided by Chandra grant GO7-18121X. G.R.T. acknowledges support from the National Aeronautics and Space Administration (NASA) through Chandra Award Number GO7-8128X8, issued by the Chandra X-ray Center, which is operated by the Smithsonian Astrophysical Observatory for and on behalf of NASA under contract NAS8-03060. This paper makes use of the following ALMA data: ADS/JAO.ALMA\#2016.1.01214.S, ADS/JAO.ALMA\#2017.1.00629.S. ALMA is a partnership of ESO (representing its member states), NSF (USA) and NINS (Japan), together with NRC (Canada) and NSC and ASIAA (Taiwan) and KASI (Republic of Korea), in cooperation with the Republic of Chile. The Joint ALMA Observatory is operated by ESO, AUI/NRAO and NAOJ. This work used the DiRAC Data Centric system at Durham University, operated by the Institute for Computational Cosmology on behalf of the STFC DiRAC HPC Facility (www.dirac.ac.uk). This equipment was funded by BIS National E-infrastructure capital grant ST/K00042X/1, STFC capital grant ST/H008519/1, and STFC DiRAC Operations grant ST/K003267/1 and Durham University. DiRAC is part of the National E-Infrastructure. This research made use of APLpy, an open-source plotting package for Python \citep{aplpy}. The authors gratefully acknowledge the referee Dr. Rick Perley for his comments, which helped us to improve the paper. We give him extra thanks for providing the JVLA dataset used in Fig. \ref{fig:HydraAHSTRadioCombinedImage}. \bibliographystyle{mnras} \section{Introduction} The journal \textit{Monthly Notices of the Royal Astronomical Society} (MNRAS) encourages authors to prepare their papers using \LaTeX. The style file \verb'mnras.cls' can be used to approximate the final appearance of the journal, and provides numerous features to simplify the preparation of papers. This document, \verb'mnras_guide.tex', provides guidance on using that style file and the features it enables. This is not a general guide on how to use \LaTeX, of which many excellent examples already exist. We particularly recommend \textit{Wikibooks \LaTeX}\footnote{\url{https://en.wikibooks.org/wiki/LaTeX}}, a collaborative online textbook which is of use to both beginners and experts. Alternatively there are several other online resources, and most academic libraries also hold suitable beginner's guides. For guidance on the contents of papers, journal style, and how to submit a paper, see the MNRAS Instructions to Authors\footnote{\label{foot:itas}\url{http://www.oxfordjournals.org/our_journals/mnras/for_authors/}}. Only technical issues with the \LaTeX\ class are considered here. \section{Obtaining and installing the MNRAS package} Some \LaTeX\ distributions come with the MNRAS package by default. If yours does not, you can either install it using your distribution's package manager, or download it from the Comprehensive \TeX\ Archive Network\footnote{\url{http://www.ctan.org/tex-archive/macros/latex/contrib/mnras}} (CTAN). The files can either be installed permanently by placing them in the appropriate directory (consult the documentation for your \LaTeX\ distribution), or used temporarily by placing them in the working directory for your paper. To use the MNRAS package, simply specify \verb'mnras' as the document class at the start of a \verb'.tex' file: \begin{verbatim} \documentclass{mnras} \end{verbatim} Then compile \LaTeX\ (and if necessary \bibtex) in the usual way. \section{Preparing and submitting a paper} We recommend that you start with a copy of the \texttt{mnras\_template.tex} file. Rename the file, update the information on the title page, and then work on the text of your paper. Guidelines for content, style etc. are given in the instructions to authors on the journal's website$^{\ref{foot:itas}}$. Note that this document does not follow all the aspects of MNRAS journal style (e.g. it has a table of contents). If a paper is accepted, it is professionally typeset and copyedited by the publishers. It is therefore likely that minor changes to presentation will occur. For this reason, we ask authors to ignore minor details such as slightly long lines, extra blank spaces, or misplaced figures, because these details will be dealt with during the production process. Papers must be submitted electronically via the online submission system; paper submissions are not permitted. For full guidance on how to submit a paper, see the instructions to authors. \section{Class options} \label{sec:options} There are several options which can be added to the document class line like this: \begin{verbatim} \documentclass[option1,option2]{mnras} \end{verbatim} The available options are: \begin{itemize} \item \verb'letters' -- used for papers in the journal's Letters section. \item \verb'onecolumn' -- single column, instead of the default two columns. This should be used {\it only} if necessary for the display of numerous very long equations. \item \verb'doublespacing' -- text has double line spacing. Please don't submit papers in this format. \item \verb'referee' -- \textit{(deprecated)} single column, double spaced, larger text, bigger margins. Please don't submit papers in this format. \item \verb'galley' -- \textit{(deprecated)} no running headers, no attempt to align the bottom of columns. \item \verb'landscape' -- \textit{(deprecated)} sets the whole document on landscape paper. \item \verb"usenatbib" -- \textit{(all papers should use this)} this uses Patrick Daly's \verb"natbib.sty" package for citations. \item \verb"usegraphicx" -- \textit{(most papers will need this)} includes the \verb'graphicx' package, for inclusion of figures and images. \item \verb'useAMS' -- adds support for upright Greek characters \verb'\upi', \verb'\umu' and \verb'\upartial' ($\upi$, $\umu$ and $\upartial$). Only these three are included, if you require other symbols you will need to include the \verb'amsmath' or \verb'amsymb' packages (see section~\ref{sec:packages}). \item \verb"usedcolumn" -- includes the package \verb"dcolumn", which includes two new types of column alignment for use in tables. \end{itemize} Some of these options are deprecated and retained for backwards compatibility only. Others are used in almost all papers, but again are retained as options to ensure that papers written decades ago will continue to compile without problems. If you want to include any other packages, see section~\ref{sec:packages}. \section{Title page} If you are using \texttt{mnras\_template.tex} the necessary code for generating the title page, headers and footers is already present. Simply edit the title, author list, institutions, abstract and keywords as described below. \subsection{Title} There are two forms of the title: the full version used on the first page, and a short version which is used in the header of other odd-numbered pages (the `running head'). Enter them with \verb'\title[]{}' like this: \begin{verbatim} \title[Running head]{Full title of the paper} \end{verbatim} The full title can be multiple lines (use \verb'\\' to start a new line) and may be as long as necessary, although we encourage authors to use concise titles. The running head must be $\le~45$ characters on a single line. See appendix~\ref{sec:advanced} for more complicated examples. \subsection{Authors and institutions} Like the title, there are two forms of author list: the full version which appears on the title page, and a short form which appears in the header of the even-numbered pages. Enter them using the \verb'\author[]{}' command. If the author list is more than one line long, start a new line using \verb'\newauthor'. Use \verb'\\' to start the institution list. Affiliations for each author should be indicated with a superscript number, and correspond to the list of institutions below the author list. For example, if I were to write a paper with two coauthors at another institution, one of whom also works at a third location: \begin{verbatim} \author[K. T. Smith et al.]{ Keith T. Smith,$^{1}$ A. N. Other,$^{2}$ and Third Author$^{2,3}$ \\ $^{1}$Affiliation 1\\ $^{2}$Affiliation 2\\ $^{3}$Affiliation 3} \end{verbatim} Affiliations should be in the format `Department, Institution, Street Address, City and Postal Code, Country'. Email addresses can be inserted with the \verb'\thanks{}' command which adds a title page footnote. If you want to list more than one email, put them all in the same \verb'\thanks' and use \verb'\footnotemark[]' to refer to the same footnote multiple times. Present addresses (if different to those where the work was performed) can also be added with a \verb'\thanks' command. \subsection{Abstract and keywords} The abstract is entered in an \verb'abstract' environment: \begin{verbatim} \begin{abstract} The abstract of the paper. \end{abstract} \end{verbatim} \noindent Note that there is a word limit on the length of abstracts. For the current word limit, see the journal instructions to authors$^{\ref{foot:itas}}$. Immediately following the abstract, a set of keywords is entered in a \verb'keywords' environment: \begin{verbatim} \begin{keywords} keyword 1 -- keyword 2 -- keyword 3 \end{keywords} \end{verbatim} \noindent There is a list of permitted keywords, which is agreed between all the major astronomy journals and revised every few years. Do \emph{not} make up new keywords! For the current list of allowed keywords, see the journal's instructions to authors$^{\ref{foot:itas}}$. \section{Sections and lists} Sections and lists are generally the same as in the standard \LaTeX\ classes. \subsection{Sections} \label{sec:sections} Sections are entered in the usual way, using \verb'\section{}' and its variants. It is possible to nest up to four section levels: \begin{verbatim} \section{Main section} \subsection{Subsection} \subsubsection{Subsubsection} \paragraph{Lowest level section} \end{verbatim} \noindent The other \LaTeX\ sectioning commands \verb'\part', \verb'\chapter' and \verb'\subparagraph{}' are deprecated and should not be used. Some sections are not numbered as part of journal style (e.g. the Acknowledgements). To insert an unnumbered section use the `starred' version of the command: \verb'\section*{}'. See appendix~\ref{sec:advanced} for more complicated examples. \subsection{Lists} Two forms of lists can be used in MNRAS -- numbered and unnumbered. For a numbered list, use the \verb'enumerate' environment: \begin{verbatim} \begin{enumerate} \item First item \item Second item \item etc. \end{enumerate} \end{verbatim} \noindent which produces \begin{enumerate} \item First item \item Second item \item etc. \end{enumerate} Note that the list uses lowercase Roman numerals, rather than the \LaTeX\ default Arabic numerals. For an unnumbered list, use the \verb'description' environment without the optional argument: \begin{verbatim} \begin{description} \item First item \item Second item \item etc. \end{description} \end{verbatim} \noindent which produces \begin{description} \item First item \item Second item \item etc. \end{description} Bulleted lists using the \verb'itemize' environment should not be used in MNRAS; it is retained for backwards compatibility only. \section{Mathematics and symbols} The MNRAS class mostly adopts standard \LaTeX\ handling of mathematics, which is briefly summarised here. See also section~\ref{sec:packages} for packages that support more advanced mathematics. Mathematics can be inserted into the running text using the syntax \verb'$1+1=2$', which produces $1+1=2$. Use this only for short expressions or when referring to mathematical quantities; equations should be entered as described below. \subsection{Equations} Equations should be entered using the \verb'equation' environment, which automatically numbers them: \begin{verbatim} \begin{equation} a^2=b^2+c^2 \end{equation} \end{verbatim} \noindent which produces \begin{equation} a^2=b^2+c^2 \end{equation} By default, the equations are numbered sequentially throughout the whole paper. If a paper has a large number of equations, it may be better to number them by section (2.1, 2.2 etc.). To do this, add the command \verb'\numberwithin{equation}{section}' to the preamble. It is also possible to produce un-numbered equations by using the \LaTeX\ built-in \verb'\['\textellipsis\verb'\]' and \verb'$$'\textellipsis\verb'$$' commands; however MNRAS requires that all equations are numbered, so these commands should be avoided. \subsection{Special symbols} \begin{table} \caption{Additional commands for special symbols commonly used in astronomy. These can be used anywhere.} \label{tab:anysymbols} \begin{tabular}{lll} \hline Command & Output & Meaning\\ \hline \verb'\sun' & \sun & Sun, solar\\[2pt] \verb'\earth' & \earth & Earth, terrestrial\\[2pt] \verb'\micron' & \micron & microns\\[2pt] \verb'\degr' & \degr & degrees\\[2pt] \verb'\arcmin' & \arcmin & arcminutes\\[2pt] \verb'\arcsec' & \arcsec & arcseconds\\[2pt] \verb'\fdg' & \fdg & fraction of a degree\\[2pt] \verb'\farcm' & \farcm & fraction of an arcminute\\[2pt] \verb'\farcs' & \farcs & fraction of an arcsecond\\[2pt] \verb'\fd' & \fd & fraction of a day\\[2pt] \verb'\fh' & \fh & fraction of an hour\\[2pt] \verb'\fm' & \fm & fraction of a minute\\[2pt] \verb'\fs' & \fs & fraction of a second\\[2pt] \verb'\fp' & \fp & fraction of a period\\[2pt] \verb'\diameter' & \diameter & diameter\\[2pt] \verb'\sq' & \sq & square, Q.E.D.\\[2pt] \hline \end{tabular} \end{table} \begin{table} \caption{Additional commands for mathematical symbols. These can only be used in maths mode.} \label{tab:mathssymbols} \begin{tabular}{lll} \hline Command & Output & Meaning\\ \hline \verb'\upi' & $\upi$ & upright pi\\[2pt] \verb'\umu' & $\umu$ & upright mu\\[2pt] \verb'\upartial' & $\upartial$ & upright partial derivative\\[2pt] \verb'\lid' & $\lid$ & less than or equal to\\[2pt] \verb'\gid' & $\gid$ & greater than or equal to\\[2pt] \verb'\la' & $\la$ & less than of order\\[2pt] \verb'\ga' & $\ga$ & greater than of order\\[2pt] \verb'\loa' & $\loa$ & less than approximately\\[2pt] \verb'\goa' & $\goa$ & greater than approximately\\[2pt] \verb'\cor' & $\cor$ & corresponds to\\[2pt] \verb'\sol' & $\sol$ & similar to or less than\\[2pt] \verb'\sog' & $\sog$ & similar to or greater than\\[2pt] \verb'\lse' & $\lse$ & less than or homotopic to \\[2pt] \verb'\gse' & $\gse$ & greater than or homotopic to\\[2pt] \verb'\getsto' & $\getsto$ & from over to\\[2pt] \verb'\grole' & $\grole$ & greater over less\\[2pt] \verb'\leogr' & $\leogr$ & less over greater\\ \hline \end{tabular} \end{table} Some additional symbols of common use in astronomy have been added in the MNRAS class. These are shown in tables~\ref{tab:anysymbols}--\ref{tab:mathssymbols}. The command names are -- as far as possible -- the same as those used in other major astronomy journals. Many other mathematical symbols are also available, either built into \LaTeX\ or via additional packages. If you want to insert a specific symbol but don't know the \LaTeX\ command, we recommend using the Detexify website\footnote{\url{http://detexify.kirelabs.org}}. Sometimes font or coding limitations mean a symbol may not get smaller when used in sub- or superscripts, and will therefore be displayed at the wrong size. There is no need to worry about this as it will be corrected by the typesetter during production. To produce bold symbols in mathematics, use \verb'\bmath' for simple variables, and the \verb'bm' package for more complex symbols (see section~\ref{sec:packages}). Vectors are set in bold italic, using \verb'\mathbfit{}'. For matrices, use \verb'\mathbfss{}' to produce a bold sans-serif font e.g. \mathbfss{H}; this works even outside maths mode, but not all symbols are available (e.g. Greek). For $\nabla$ (del, used in gradients, divergence etc.) use \verb'$\nabla$'. \subsection{Ions} A new \verb'\ion{}{}' command has been added to the class file, for the correct typesetting of ionisation states. For example, to typeset singly ionised calcium use \verb'\ion{Ca}{ii}', which produces \ion{Ca}{ii}. \section{Figures and tables} \label{sec:fig_table} Figures and tables (collectively called `floats') are mostly the same as built into \LaTeX. \subsection{Basic examples} \begin{figure} \includegraphics[width=\columnwidth]{example} \caption{An example figure.} \label{fig:example} \end{figure} Figures are inserted in the usual way using a \verb'figure' environment and \verb'\includegraphics'. The example Figure~\ref{fig:example} was generated using the code: \begin{verbatim} \begin{figure} \includegraphics[width=\columnwidth]{example} \caption{An example figure.} \label{fig:example} \end{figure} \end{verbatim} \begin{table} \caption{An example table.} \label{tab:example} \begin{tabular}{lcc} \hline Star & Mass & Luminosity\\ & $M_{\sun}$ & $L_{\sun}$\\ \hline Sun & 1.00 & 1.00\\ $\alpha$~Cen~A & 1.10 & 1.52\\ $\epsilon$~Eri & 0.82 & 0.34\\ \hline \end{tabular} \end{table} The example Table~\ref{tab:example} was generated using the code: \begin{verbatim} \begin{table} \caption{An example table.} \label{tab:example} \begin{tabular}{lcc} \hline Star & Mass & Luminosity\\ & $M_{\sun}$ & $L_{\sun}$\\ \hline Sun & 1.00 & 1.00\\ $\alpha$~Cen~A & 1.10 & 1.52\\ $\epsilon$~Eri & 0.82 & 0.34\\ \hline \end{tabular} \end{table} \end{verbatim} \subsection{Captions and placement} Captions go \emph{above} tables but \emph{below} figures, as in the examples above. The \LaTeX\ float placement commands \verb'[htbp]' are intentionally disabled. Layout of figures and tables will be adjusted by the publisher during the production process, so authors should not concern themselves with placement to avoid disappointment and wasted effort. Simply place the \LaTeX\ code close to where the figure or table is first mentioned in the text and leave exact placement to the publishers. By default a figure or table will occupy one column of the page. To produce a wider version which covers both columns, use the \verb'figure*' or \verb'table*' environment. If a figure or table is too long to fit on a single page it can be split it into several parts. Create an additional figure or table which uses \verb'\contcaption{}' instead of \verb'\caption{}'. This will automatically correct the numbering and add `\emph{continued}' at the start of the caption. \begin{table} \contcaption{A table continued from the previous one.} \label{tab:continued} \begin{tabular}{lcc} \hline Star & Mass & Luminosity\\ & $M_{\sun}$ & $L_{\sun}$\\ \hline $\tau$~Cet & 0.78 & 0.52\\ $\delta$~Pav & 0.99 & 1.22\\ $\sigma$~Dra & 0.87 & 0.43\\ \hline \end{tabular} \end{table} Table~\ref{tab:continued} was generated using the code: \begin{verbatim} \begin{table} \contcaption{A table continued from the previous one.} \label{tab:continued} \begin{tabular}{lcc} \hline Star & Mass & Luminosity\\ & $M_{\sun}$ & $L_{\sun}$\\ \hline $\tau$~Cet & 0.78 & 0.52\\ $\delta$~Pav & 0.99 & 1.22\\ $\sigma$~Dra & 0.87 & 0.43\\ \hline \end{tabular} \end{table} \end{verbatim} To produce a landscape figure or table, use the \verb'pdflscape' package and the \verb'landscape' environment. The landscape Table~\ref{tab:landscape} was produced using the code: \begin{verbatim} \begin{landscape} \begin{table} \caption{An example landscape table.} \label{tab:landscape} \begin{tabular}{cccccccccc} \hline Header & Header & ...\\ Unit & Unit & ...\\ \hline Data & Data & ...\\ Data & Data & ...\\ ...\\ \hline \end{tabular} \end{table} \end{landscape} \end{verbatim} Unfortunately this method will force a page break before the table appears. More complicated solutions are possible, but authors shouldn't worry about this. \begin{landscape} \begin{table} \caption{An example landscape table.} \label{tab:landscape} \begin{tabular}{cccccccccc} \hline Header & Header & Header & Header & Header & Header & Header & Header & Header & Header\\ Unit & Unit & Unit & Unit & Unit & Unit & Unit & Unit & Unit & Unit \\ \hline Data & Data & Data & Data & Data & Data & Data & Data & Data & Data\\ Data & Data & Data & Data & Data & Data & Data & Data & Data & Data\\ Data & Data & Data & Data & Data & Data & Data & Data & Data & Data\\ Data & Data & Data & Data & Data & Data & Data & Data & Data & Data\\ Data & Data & Data & Data & Data & Data & Data & Data & Data & Data\\ Data & Data & Data & Data & Data & Data & Data & Data & Data & Data\\ Data & Data & Data & Data & Data & Data & Data & Data & Data & Data\\ Data & Data & Data & Data & Data & Data & Data & Data & Data & Data\\ \hline \end{tabular} \end{table} \end{landscape} \section{References and citations} \subsection{Cross-referencing} The usual \LaTeX\ commands \verb'\label{}' and \verb'\ref{}' can be used for cross-referencing within the same paper. We recommend that you use these whenever relevant, rather than writing out the section or figure numbers explicitly. This ensures that cross-references are updated whenever the numbering changes (e.g. during revision) and provides clickable links (if available in your compiler). It is best to give each section, figure and table a logical label. For example, Table~\ref{tab:mathssymbols} has the label \verb'tab:mathssymbols', whilst section~\ref{sec:packages} has the label \verb'sec:packages'. Add the label \emph{after} the section or caption command, as in the examples in sections~\ref{sec:sections} and \ref{sec:fig_table}. Enter the cross-reference with a non-breaking space between the type of object and the number, like this: \verb'see Figure~\ref{fig:example}'. The \verb'\autoref{}' command can be used to automatically fill out the type of object, saving on typing. It also causes the link to cover the whole phrase rather than just the number, but for that reason is only suitable for single cross-references rather than ranges. For example, \verb'\autoref{tab:journal_abbr}' produces \autoref{tab:journal_abbr}. \subsection{Citations} \label{sec:cite} MNRAS uses the Harvard -- author (year) -- citation style, e.g. \citet{author2013}. This is implemented in \LaTeX\ via the \verb'natbib' package, which in turn is included via the \verb'usenatbib' package option (see section~\ref{sec:options}), which should be used in all papers. Each entry in the reference list has a `key' (see section~\ref{sec:ref_list}) which is used to generate citations. There are two basic \verb'natbib' commands: \begin{description} \item \verb'\citet{key}' produces an in-text citation: \citet{author2013} \item \verb'\citep{key}' produces a bracketed (parenthetical) citation: \citep{author2013} \end{description} Citations will include clickable links to the relevant entry in the reference list, if supported by your \LaTeX\ compiler. \defcitealias{smith2014}{Paper~I} \begin{table*} \caption{Common citation commands, provided by the \texttt{natbib} package.} \label{tab:natbib} \begin{tabular}{lll} \hline Command & Ouput & Note\\ \hline \verb'\citet{key}' & \citet{smith2014} & \\ \verb'\citep{key}' & \citep{smith2014} & \\ \verb'\citep{key,key2}' & \citep{smith2014,jones2015} & Multiple papers\\ \verb'\citet[table 4]{key}' & \citet[table 4]{smith2014} & \\ \verb'\citep[see][figure 7]{key}' & \citep[see][figure 7]{smith2014} & \\ \verb'\citealt{key}' & \citealt{smith2014} & For use with manual brackets\\ \verb'\citeauthor{key}' & \citeauthor{smith2014} & If already cited in close proximity\\ \verb'\defcitealias{key}{Paper~I}' & & Define an alias (doesn't work in floats)\\ \verb'\citetalias{key}' & \citetalias{smith2014} & \\ \verb'\citepalias{key}' & \citepalias{smith2014} & \\ \hline \end{tabular} \end{table*} There are a number of other \verb'natbib' commands which can be used for more complicated citations. The most commonly used ones are listed in Table~\ref{tab:natbib}. For full guidance on their use, consult the \verb'natbib' documentation\footnote{\url{http://www.ctan.org/pkg/natbib}}. If a reference has several authors, \verb'natbib' will automatically use `et al.' if there are more than two authors. However, if a paper has exactly three authors, MNRAS style is to list all three on the first citation and use `et al.' thereafter. If you are using \bibtex\ (see section~\ref{sec:ref_list}) then this is handled automatically. If not, the \verb'\citet*{}' and \verb'\citep*{}' commands can be used at the first citation to include all of the authors. \subsection{The list of references} \label{sec:ref_list} It is possible to enter references manually using the usual \LaTeX\ commands, but we strongly encourage authors to use \bibtex\ instead. \bibtex\ ensures that the reference list is updated automatically as references are added or removed from the paper, puts them in the correct format, saves on typing, and the same reference file can be used for many different papers -- saving time hunting down reference details. An MNRAS \bibtex\ style file, \verb'mnras.bst', is distributed as part of this package. The rest of this section will assume you are using \bibtex. References are entered into a separate \verb'.bib' file in standard \bibtex\ formatting. This can be done manually, or there are several software packages which make editing the \verb'.bib' file much easier. We particularly recommend \textsc{JabRef}\footnote{\url{http://jabref.sourceforge.net/}}, which works on all major operating systems. \bibtex\ entries can be obtained from the NASA Astrophysics Data System\footnote{\label{foot:ads}\url{http://adsabs.harvard.edu}} (ADS) by clicking on `Bibtex entry for this abstract' on any entry. Simply copy this into your \verb'.bib' file or into the `BibTeX source' tab in \textsc{JabRef}. Each entry in the \verb'.bib' file must specify a unique `key' to identify the paper, the format of which is up to the author. Simply cite it in the usual way, as described in section~\ref{sec:cite}, using the specified key. Compile the paper as usual, but add an extra step to run the \texttt{bibtex} command. Consult the documentation for your compiler or latex distribution. Correct formatting of the reference list will be handled by \bibtex\ in almost all cases, provided that the correct information was entered into the \verb'.bib' file. Note that ADS entries are not always correct, particularly for older papers and conference proceedings, so may need to be edited. If in doubt, or if you are producing the reference list manually, see the MNRAS instructions to authors$^{\ref{foot:itas}}$ for the current guidelines on how to format the list of references. \section{Appendices and online material} To start an appendix, simply place the \verb'
\section{#1}
\section{Introduction}\label{intro} Given a graph $G=(V,E)$ of order~$n$, a dominating set $S \subseteq V$ is a subset of~$V$ such that any $v_i \in V$ is either included in~$S$ or connected to a vertex of~$S$ by an edge of~$E$. The \textsc{min dominating set}{} problem consists of finding a minimum-size dominating in~$G$. \textsc{min dominating set}{} is a very well-known \textbf{NP}-hard problem completely equivalent (from both complexity and polynomial approximation points of view) to \textsc{min set cover problem}. Dealing with the exact solution of \textsc{min dominating set}{}, besides the obvious~$O(2^n)$ algorithm which considers the power set of~$V$ and chooses the smallest one that also forms a dominating set, several moderately exponential algorithms have been proposed mainly during the last fifteen years. To the best of our knowledge, the fastest one is the~$O(1.4969^n)$ algorithm due to~\cite{VANROOIJ20112147}. The main purpose of this paper is the study of the average case complexity of branch-and-bound algorithms for the \textsc{min dominating set}{} problem in random graphs in the $\mathcal{G}(n,p)$ model. This model represents graphs on~$n$ vertices where each of the possible $\binom{n}{2}$ edges appears independently with probability~$p$. For an extensive treatment of random graphs, we refer the reader to the monograph~\cite{bo}. Even though {branch-and-bound}{} is one of the best known and most widely used techniques for exactly solving \textbf{NP}{}-hard problems, there has been little systematic study of its complexity, worst- or average case. Also, even though mathematical tools for average case analysis of algorithms have existed for decades~\cite{knuth1} and have much advanced in sophistication~\cite{flajolet-sedgewickbook}, we do not know of many results on the average case complexity of exact algorithms for \textbf{NP}{}-hard problems. The only works known to us are the ones of~\cite{banderieretal_siam} where the authors study the complexity of a ``pruning the search-tree algorithm" for \textsc{max independent set}{} (the worst-case complexity of this algorithm is~$O(1.3803^n)$,~\cite{Woeg2}) under the~$\mathcal{G}(n,p)$ model, the one of~\cite{BanderierHwangRavelomananaZacharovas2009}, where the same algorithm is studied under the~$\mathcal{G}(n,m)$ model and, finally, the one in~\cite{DBLP:journals/corr/BourgeoisCDP15} where the average-case complexity of a {branch-and-bound}{} algorithm for \textsc{max independent set}{} is studied under the~$\mathcal{G}(n,p)$ model. In what follows, in Section~\ref{bbalg} we specify the {branch-and-bound}{} algorithm the complexity of which is then analysed in Section~\ref{b&b}. Finally, in Section~\ref{simpleb&b} we study the complexity of simple exhaustive search algorithm which, starting from the whole vertex-set~$V$ of the input graph, produces a minimum dominating set by considering all the subsets of~$V$ and finally returns the smallest one that is a dominating set. \section{The {branch-and-bound}{} algorithm}\label{bbalg} Let $G = (V, E)$ be a graph; set $n=|V|$ and fix an order $v_1,v_2,\ldots,v_n$ on~$V$. The type of {branch-and-bound}{} algorithms for \textsc{min dominating set}{} studied here works by building a {branch-and-bound}{} binary tree, nodes of which are associated with a vector $\vec{x}\in \{0,1\}^{n}$ and a depth $\delta$ in the binary tree. Obviously, $x_i=1$ means that vertex~$v_i$ has been taken in the solution under construction and $x_i = 0$ means that~$v_i$ has not been taken. For a tree-node at level~$\delta$ only vertices $v_1, v_2, \ldots, v_{\delta}$ have been explored, i.e., only $x_1,x_2,\ldots,x_{\delta}$ have been assigned definite values. At this point the values for~$x_{\delta+1}, \ldots, x_n$ are, for the moment, equal to~1. We remark that the superset of a dominating set is also a dominating set. The root of the {branch-and-bound}{} tree~$T$ corresponds to the trivial dominating set including all the vertices ($\vec{x}=(1,1,...,1)$) at the depth 0 and is initially visited. The left child $(\vec{x},\delta)_l = (\vec{x},\delta+1) $ of a node $n_i=(\vec{x},\delta)$ at level $\delta$ of~$T$, has exactly the same vector~$\vec{x}$ as~$n_i$ but with the value of $x_{\delta+1}=1$ now determined, i.e., the partial solution represented by~$n_i$ is extended by putting~$v_{\delta+1}$ in the solution under construction. The right child~$(\vec{x},\delta)_r$ of~$(\vec{x},\delta)$ corresponds to changing the partial solution represented by~$n_i$ by putting $x_{\delta+1} = 0$. At each new step of the algorithm a new node will be explored. In order to be explorable a node~$(\vec{x},\delta)$ must correspond to a dominating set in~$G$ and be either the left or the right child of an already visited node. Therefore, at each step of the algorithm, the nodes can be divided in four categories: \begin{enumerate} \item the already visited nodes which correspond to dominating sets (feasible solutions); \item the nodes that correspond to vertex-sets that are not dominating sets in~$G$ (the infeasible solutions); \item the explorable solutions which correspond to dominating sets in~$G$ and are either the left or the right child of an already visited node; \item the currently ``hidden'' feasible solutions which correspond to dominating sets in~$G$ but are not the left nor the right child of an already visited node. \end{enumerate} For a node at level $\delta$ with vector $\vec{x}$, we define its score $u(\vec{x}, \delta)$ as the number of vertices that currently must be included in the solution. Formally: $$ u\left(\vec{x},\delta\right) =\left|\vec{x}\right| - n + \delta $$ where $\vert \vec{x}\vert = \sum_{i=1,2, \ldots n} x_i$. Score~$u(\vec{x},\delta)$ can be seen as an optimistic prediction of the value of the optimal solution since it implies that no other vertex will be added to the feasible solution corresponding to the node at hand. The choice of the next node to be explored among the explorable nodes (solutions) is made by minimizing a score~$u(\vec{x},\delta)$, named potential in what follows, associated with each node of the {branch-and-bound}{} tree. The explorable solutions corresponding to tree-nodes of depth~$n$ constitute feasible dominating sets for the whole~$G$. It is easy to see that the leftmost among them corresponds to a minimum dominating set of~$G$. \begin{figure}[h!] \centering \includegraphics[scale=0.4]{binaryTree2.png} \caption{Illustration of the {branch-and-bound}{} algorithm for the minimum dominating set problem. The instance~$G$ appears on the upper left corner of the figure. In the {branch-and-bound}{} tree, the nodes representing feasible solutions are coloured in deep blue. The green number above each node represents the score function~$u(\vec{x})$. } \label{Necess} \end{figure} \begin{figure}[h!] \centering \includegraphics[scale=0.4]{binaryTree1.png} \caption{Illustration of the fifth step of the algorithm. Here, the explored node are in deep blue, the explorable solutions are in yellow, the hidden solutions in white and the infeasible solutions are in red.} \label{Necess1} \end{figure} \begin{figure}[h!] \centering \includegraphics[scale=0.4]{binaryTree.png} \caption{Illustration of the whole execution of {branch-and-bound}{} algorithm for the minimum dominating set problem. The optimal solution is coloured in purple.} \label{Necess2} \end{figure} As an example, on figure \ref{Necess} the graph~$G$ contains three vertices~$A$, $B$ and~$C$. Therefore, the {branch-and-bound}{} tree contains~3 levels. The branch and bound algorithm starts by exploring the root $\lbrace 1,1,1\rbrace ,0$. Now, the explorable nodes are $\lbrace 1,1,1\rbrace ,1$ and $\lbrace 0,1,1\rbrace ,1$ with respective potentials~$1$ and~$0$. Therefore, the node $\lbrace 0,1,1\rbrace ,1$ is explored next. Then, the two explorable nodes are $\lbrace 1,1,1\rbrace ,1$ and $\lbrace 0,1,1\rbrace ,2$, both with potential~$1$. The next node to be explored is chosen randomly. Assume that the next explored node is $\lbrace 1,1,1\rbrace ,1$ and so on. Finally, the complete solution $\lbrace 0,1,0\rbrace ,3$ is found. As its depth is 3, this solution $\lbrace B\rbrace$ is the minimum dominating set. In what follows, we denote by~$\mathbb{T}(n,p)$ the average complexity of {branch-and-bound}{} in a binomial random graph $G=(V,E)$ with parameters~$(n,p)$, that is, the total number of leaves expansions, and by~$\mathbb{E}[\# S(G)]$ the expectation of the number of dominating sets in a binomial random graph~$G$. \section{Analysis of the branch-and-bound algorithm}\label{b&b} Notice first that any child~$xb$ of a node $x$ of the branch and bound tree, where $b\in \{0,1\}$, has $u(xb) \geq u(x)$. So, let~$x$ be the first leaf at the $n$th level --- that is with $|x|=n$ --- expanded by the algorithm; obviously $u(x) = |S_x|$. Any leaf that has not been expanded yet must have a bound that is at least~$|S_{x}|$ (otherwise they would have been handled before). Since all other unexpanded leaves have bounds no smaller than $|S_x|$, $S_x$ must be a minimum dominating set, and the algorithm terminates. It follows that, during the running of the algorithm, a leaf~$x$ is expanded only if $u(x) \leq |S^*|$, where $S^*$ is the minimum dominating set. Thus, the expanded leaves $x$ with $|x|=i$ are dominating subsets $S\subseteq \{1,\ldots,i\}$ satisfying $n-|S|\leq|S^*|$. We can therefore write: \begin{eqnarray}\label{tnp1} \mathbb{T} &\leq& \sum\limits_{i=0}^{n}\sum\limits_{S\subseteq\{1,2,\ldots,i\}}\mathbb{P}\left(( \text{$S$ is a dominating set})\cap \left(n-|S| \leq \left|S^*\right|\right)\right) \Rightarrow \nonumber \\ \Rightarrow \mathbb{T} &\leq& \sum\limits_{i=0}^{n}\sum\limits_{S\subseteq\{1,2,\ldots,i\}}\mathbb{P}\left( \text{$S$ is a dominating set}\right) \;\; \wedge \;\; \mathbb{T} \leq \sum\limits_{i=0}^{n}\sum\limits_{S\subseteq\{1,2,\ldots,i\}}\mathbb{P} \left(n-|S| \leq \left|S^*\right|\right) \nonumber \\ &\leq& n \cdot \max_{1 \leq k \leq n} \binom{n}{k} \Pr[\gamma > n -k]\\ \end{eqnarray} Thus, we need to upper-bound the quantity $M:=\binom{n}{k} \Pr[\gamma > n -k]$ for all $ 1 \leq k \leq n$. \subsection{Upper bounds} The following theorem provides upper bounds for the complexity of the {branch-and-bound}{} algorithm presented in Section~\ref{bbalg} for random graphs in the $\mathcal{G}(n,p)$ model. \begin{theorem}\label{positive} The following two facts hold: \begin{enumerate} \item[(a)] If $pn \to \infty$, then the {branch-and-bound}{} algorithm takes subexponential time. \item[(b)] If $pn = c$, where $c \geq 20$ is a constant, then the {branch-and-bound}{} algorithm takes time $(2-\epsilon)^n$, where $\epsilon \geq 0.01$ is some constant. \end{enumerate} \end{theorem} \begin{proof} We first focus on the case where $p$ is fixed. We show that in this case,~$M$ is subexponential. We use the fact that $\gamma(G) \leq \alpha(G)$ for every graph~$G$, where~$\alpha(G)$ denotes the stability number of graph~$G$ (indeed, a maximal independent set is a dominating set) and the union bound. We recall that $1-x \leq e^{-x}$ for all values of~$x$ ( this follows from the fact that $1-x$ is the tangent line of $e^{-x}$ at $x=0$). We remark that $\alpha(G) > x$ for some~$x$, implies that one of the~$\binom{n}{x}$ subsets of vertices of size~$x$ induces an independent set in~$G$. Thus: $$ M \leq \binom{n}{k} \Pr[\alpha > n - k] \leq \binom{n}{k} \binom{n}{n-k} (1-p)^{\binom{n-k}{2}} \leq \left(\binom{n}{n-k}\right)^2 e^{\nicefrac{-p(n-k)(n-k-1)}{2}} = \binom{n}{x}^2 e^{-\nicefrac{px(x-1)}{2}} $$ where $x = n-k$. We consider~$x$ as a function of~$n$, setting $x:=f(n)$. If $f(n) = o(n)$, then $\binom{n}{x}^2 < (\nicefrac{en}{x})^{2x}$ is clearly subexponential. Thus, we may assume $f(n) = \Theta(n)$. Quantity~$M$ clearly satisfies: $$ M \leq \left( \left(\frac{en}{x}\right)^2e^{\nicefrac{-p(x-1)}{2}} \right) ^x $$ Since $f(n)= \Theta(n)$ and~$p$ is fixed, clearly, $(\nicefrac{en}{x})^2e^{\nicefrac{-p(x-1)}{2}} < 1$ for~$n$ sufficiently large. In fact, with a slightly more careful analysis, we can obtain that~$M$ is subexponential in the regime $pn \to \infty$. Indeed, we may suppose as before that $x = \Theta(n)$ and now it follows that $(\nicefrac{en}{x})^2$ is bounded by a constant and since $p = \omega(1)$ we have that $e^{-\nicefrac{p(x-1)}{2}} \to 0$, as $n \to \infty$. Therefore, $(\nicefrac{en}{x})^2e^{-\nicefrac{p(x-1)}{2}} < 1$ for~$n$ sufficiently large and the claim follows. It remains to consider the case~(b), where $p = \nicefrac{c}{n}$, where $c \geq 20 $ is some absolute constant. As before, we consider the quantity~$\binom{n}{x}^2 e^{\nicefrac{-px(x-1)}{2}}$. We may assume as before that $x = \Omega(n)$, i.e. $\lim_{x \to \infty} \nicefrac{x}{n} = \epsilon$, for some $\epsilon > 0$. Indeed, otherwise the time is subexponential. Thus, we need to show that $\binom{n}{\epsilon n}^2 (1-p)^{\nicefrac{\epsilon^2 n^2}{2}}$ is bounded for any $\epsilon > 0$. We use the fact that $\binom{n}{\epsilon n} = 2^{(1+o(1)) H(\epsilon) n} $, where $H(\epsilon)$ is the binary entropy function. Thus, \begin{equation*} \binom{n}{\epsilon n}^2 (1-p)^{\nicefrac{\epsilon^2 n^2}{2}} \leq \left(\left[\left(\epsilon^{-\epsilon}(1-\epsilon)^{-(1-\epsilon)}\right)^{(1+o(1))}\right]^2 e^{-c \nicefrac{\epsilon^2}{2}} \right)^n \end{equation*} We remark that $(\epsilon^{-\epsilon}(1-\epsilon)^{-(1-\epsilon)})$ is increasing on the interval $(0, \nicefrac{1}{2})$ and decreasing on $(\nicefrac{1}{2}, 1)$, with its maximum at $\epsilon = \nicefrac{1}{2}$, since $H(\epsilon)$ is the logarithm of this function. Thus, there is some constant $\epsilon_0 < \nicefrac{1}{2}$ such that, for all $\epsilon \leq \epsilon_0$, $(\epsilon^{-\epsilon}(1-\epsilon)^{-(1-\epsilon)}) < \sqrt{2}$. It is easy to check that we can take $\epsilon_0 = \nicefrac{1}{10}$. Thus, we may assume that $\epsilon > \nicefrac{1}{10}$. Since $c\geq 20$, it suffices to show that: $$ \left[\left(\epsilon^{-\epsilon}(1-\epsilon)^{-(1-\epsilon)}\right)^{(1+o(1))}\right]^2 e^{-10 \epsilon^2} < 2 $$ for all $\epsilon \in [\nicefrac{1}{10}, \nicefrac{1}{2}]$. Since the first of the two products is increasing and the second is decreasing with~$\epsilon$, we will have to dominate each separately. To this end, we refine the intervals~of $\epsilon$. First consider the interval $\epsilon \in [\nicefrac{1}{10}, \nicefrac{1}{8}]$. To bound our product, it is sufficient to substitute~$\nicefrac{1}{8}$ in the first term and~$\nicefrac{1}{10}$ in the second. By doing this, we obtain that the product is less than, say,~1.99. It is easily verified that we can repeat this argument on the following intervals, thus finishing the theorem. In each case, we obtain a bound of less than~1.99. The precise bounds are given below, where $f(\epsilon) := [(\epsilon^{-\epsilon}(1-\epsilon)^{-(1-\epsilon)})^{(1+o(1))}]^2 e^{-10 \epsilon^2}$: \begin{itemize} \item $\epsilon \in [1/8, 1/7]; f(\epsilon) < 1.943$; \item $\epsilon \in [1/7, 0.15]; f(\epsilon) < 1.9$; \item $\epsilon \in [0.15, 0.17]; f(\epsilon) < 1.988$; \item $\epsilon \in [0.17, 0.19]; f(\epsilon) < 1.981$; \item $\epsilon \in [0.19, 0.21]; f(\epsilon) < 1.95$; \item $\epsilon \in [0.21, 0.25]; f(\epsilon) < 1.982$; \item $\epsilon \in [0.25, 0.35]; f(\epsilon) < 1.955$; \item $\epsilon \in [0.35, 0.5]; f(\epsilon) < 1.2$. \end{itemize} The proof of the theorem is now completed.~\end{proof} \subsection{Lower bounds} The following result shows that the upper bound on complexity of the algorithm given by Item~(b) of Theorem~\ref{positive} cannot be drastically improved in order that a subexponential bound is taken. \begin{theorem} Let $p = \nicefrac{c}{n}$, where~$c$ is a positive fixed constant. Then, the branch-and-bound algorithm takes at least $(\nicefrac{1}{\epsilon})^{\epsilon n}$ time for~$G(n,p)$, where $\epsilon:= \max\{0.99, 1-(\nicefrac{1}{10c})\}$ \end{theorem} \begin{proof} It is sufficient to show that: $$ \binom{n}{\epsilon n} \Pr[\gamma > n - \epsilon n] = \Omega\left(\left(\frac{1}{\epsilon}\right)^{\epsilon n}\right) $$ for~$n$ sufficiently large. We will prove that $\Pr[\gamma \leq n - \epsilon n]$ is arbitrarily small. This is clearly sufficient. Let~$A$ be the event that a fixed set~$S$ of size $n - \epsilon n$ is a dominating set. Then, $\Pr[\gamma \leq n - \epsilon n] \leq \binom{n}{n-\epsilon n}\Pr[A] < 2^n \Pr[A]$. We use the fact that $1-x \geq e^{-2x}$ for all $x \in (0, \nicefrac{1}{2})$; this can be seen, for example, by noticing that $e^{-2x}$ is a convex function and that $1-x = e^{-2x}$ has two solutions at $x=0$ and at some $x \in (0.5, 1)$. Now, $\Pr[A] = \left(1- (1-p)^{n - \epsilon n} \right)^{\epsilon n} \leq (1- e^{-2c(1-\epsilon)})^{\epsilon n}$. Thus: $$ \Pr[\gamma \leq n - \epsilon n] \leq \left(2 \left(1- e^{-2c(1-\epsilon)}\right)^{\epsilon}\right)^n $$ Now, if $c< 10$, then $(1- e^{-2c(1-\epsilon)})^{\epsilon} < (1 - e^{-\nicefrac{1}{5}})^{0.99} < 1/2$. Similarly, if $c \geq 10$, then $(1- e^{-2c(1-\epsilon)})^{\epsilon} < (1 - e^{-\nicefrac{1}{5}})^{1- \nicefrac{1}{10c}} < 1/2$. Thus, $\Pr[\gamma \leq n - \epsilon n]< \delta^n$, for some $\delta < 1$. It follows that: $$ \binom{n}{\epsilon n} \Pr[\gamma > n - \epsilon n] = \Omega\left(\left(\frac{1}{\epsilon}\right)^{\epsilon n}\right) $$ as required. \end{proof} \section{Analysis of the simple exhaustive search algorithm}\label{simpleb&b} We conclude the paper by studying in this section a simple exhaustive search algorithm which, starting from the whole vertex-set~$V$ of the input graph produces a minimum dominating set by considering all the subsets of~$V$ and finally returns the smallest one that is a dominating set. In the remaining part of this section, we prove the following proposition. \begin{proposition} Consider a random $(n,p)$-binomial graph~$G$. Then the following hold: \begin{enumerate} \item if~$p$ is smaller than~$\nicefrac{1}{n}$, then the complexity of the exhaustive search algorithm is subexponential; \item if $p = \nicefrac{c}{n}$, for some constant $c > 1$, then: $$ \mathbb{T}(n,p) \leq \max\left\{1.99^n, \left(2\left(1 - e^{-2c}\right)^{1/3}\right)^{n}\right\} $$ \end{enumerate} \end{proposition} \begin{proof} We first prove item~1. Consider a random $(n,p)$-binomial graph~$G$. Recall that by definition of the $(n,p)$-binomial random model, the probability that a set of which~ $k$ vertices are excluded is a dominating set of $G$ is equal to $(1-(1-p)^{n-k})^k$; henceforth: \begin{equation}\label{es} \mathbb{E}[\# S(G)] = \sum_{k=0}^n{n \choose k}\left(1-(1-p)^{n-k}\right)^k \leq n \cdot\max\limits_{k \leq n}\left\{{n \choose k}(1-(1-p)^{n-k})^k \right\} \end{equation} The number of dominating sets in the sub-graph induced by the~$\alpha$ first fixed vertices is strictly greater than the number of dominating sets induced in the $\alpha-1$ first such vertices (since the~$\alpha$-th vertex is a dominating set by itself); so, using~(\ref{es}): \begin{equation}\label{boundcn} \mathbb{T}(n,p) \leq n\cdot\mathbb{E}[\# S(G)] \leq n \sum_{k=0}^n{n \choose k}\left(1-(1-p)^{n-k}\right)^k \leq n^2 \cdot\max\limits_{k \leq n}\left\{{n \choose k}(1-(1-p)^{n-k})^k \right\} \end{equation} Obviously, the more the edges in the graph the more likely is that a sub-graph is a dominating set and therefore the probability that a sub-graph is a dominating set increases with~$p$ and decreases with $q=1-p$. Let us consider the case $p=\nicefrac{j}{n}$. We will thereafter consider that $k \sim i n$ with $0<i<1$. Indeed, when $k< i n, \forall i>0$ (resp. $k> i n, \forall i<1$) then ${n \choose k}$ is at most subexponential. Hence, the probability for a graph of size $n-k $ to be a dominating set is: $$ \left(1-\left(1-\frac{j}{n}\right)^{(1-i)n}\right)^{in} $$ which when $n$ tends to infinity tends to $(1-e^{j(i-1)})^{in}$. Using~(\ref{boundcn}), discussion just above leads to: \begin{equation}\label{tnp} \mathbb{T}(n,p) \leq n^2 \cdot\max\limits_{0\leq i \leq 1}\left\{{n \choose in}(1-e^{j(i-1)})^{in} \right\}\leq n^2 \cdot\max\limits_{0\leq i \leq 1}\left\{\frac{e^{i n}}{i^{i n}}(1-e^{j(i-1)})^{in} \right\} \end{equation} Let $f(x)=(\nicefrac{e^{x}}{x^{x}})(1-e^{j(x-1)})^{x}$. Then: $$ f'(x)= -e^x \left(\frac{1}{x}\right)^x \left(1 - e^{j(x - 1)}\right)^{x - 1} \left(\left(e^{j(x - 1)} - 1\right) \left(\log\left(1 - e^{j(x - 1)}\right) - \log(x)\right)\right) $$ which gives: $f'(x)=0 \Leftrightarrow 1 - e^{j(x - 1)}=x \Leftrightarrow x= 1- (\nicefrac{W(j)}{j})$. So: $$ \max\limits_{0\leq x \leq 1}f(x) = f\left(1- \frac{W(j)}{j}\right)=e^{1- \frac{W(j)}{j}} $$ where $W(\cdot)$ denotes the {Lambert}'s function defined by $x =W(x)e^{W(x)}$. Let $g_+(j)=e^{1- (\nicefrac{W(j)}{j})}$. Then, using~(\ref{tnp}), we get: $\mathbb{T}(n,p)\leq n^2 \cdot g_+(j)^n$. Note that $g_+(0)=1$ and $\lim_{x \to \infty} g_+(x)=e$. Then: $$ \mathbb{T}(n,p) \geq \max\limits_{0\leq i \leq 1}\left\{{n \choose in}(1-e^{j(i-1)})^{in} \right\} \geq \max\limits_{0\leq i \leq 1}\left\{\frac{1}{(i)^{i n}}(1-e^{j(i-1)})^{in} \right\} \geq \exp\left(\frac{1}{e}-\left(\frac{W\left(j e^{-j-1+\frac{j}{e}}\right)}{j}\right) \right)^n = g_-^n(x) $$ Observe that $\lim_{x \to \infty} g_-(x)=e^{\nicefrac{1}{e}}\simeq 1.44$. Given that the complexity of the exhaustive search algorithm is increasing with $p$, discussion above concludes that it is subexponential if and only if~$p$ is smaller than~$\nicefrac{1}{n}$ and the proof of item~1 is now complete. We now prove item~2. Here, we can clearly suppose $n/3 < k < 2n/3$; otherwise $\binom{n}{k} \leq 1.99^n$ and we are done. Using the fact that $1-x \geq e^{-2x}$ for $x \in (0, 0.5)$, one can deduce: \begin{eqnarray*} \mathbb{T}(n,p) &\leq& 2^n n^2 \max\limits_{\nicefrac{n}{3} \leq k \leq \nicefrac{2n}{3}}\left\{{n \choose k}\left(1-(1-p)^{n-k}\right)^k \right\} \\ &\leq& 2^n n^2 \left(1 - \left(1-\frac{c}{n}\right)^{\nicefrac{2n}{3}}\right)^{\nicefrac{n}{3}} \;\; \leq \;\; 2^n n^2 \left(1 - e^{-\nicefrac{4c}{3}}\right)^{\nicefrac{n}{3}} \;\; \leq \;\; n^2 \left(2 \left(1 - e^{-\nicefrac{4c}{3}}\right)^{\nicefrac{1}{3}}\right)^{n} \end{eqnarray*} and the result for item~2 follows immediately. \end{proof} \section{Conclusion} We have studied in this paper the average-case complexity of a {branch-and-bound}{} algorithm for \textsc{min dominating set}{} in random graphs under the $\mathcal{G}(n,p)${} model. It has been proved that this complexity is: (a)~\textit{subexpontial} when $p = \nicefrac{f(n)}{n}$, for any function $f \rightarrow \infty$ with~$n$; (b)~\textit{exponential} when $p= \nicefrac{c}{n}$. For the latter case it was proved that the smaller the constant~$c$ the closer to~$2^n$ average case complexity of the algorithm. Then the complexity of a naive exhaustive search algorithm has been studied. Here, for $p$ smaller than~$\nicefrac{1}{n}$ the algorithm is subexponential, while for $p \geqslant \nicefrac{c}{n}$, $c > 1$, its complexity becomes exponential, tending, for very large values of~$c$, to~$2^n$. \bibliographystyle{plain}
\section{\label{intro}Introduction} The inflation\cite{guth,Starobinsky:1980te,Sato:1980yn,linde1,steinhardt} is a model independent mechanism proposed to solve some of the outstanding problems in standard Big-Bang cosmology. It is an early exponential expansion phase of our universe, which sets the required initial conditions for the standard Big-Bang evolution. Over the years a large number of models have been introduced to realize this mechanism\cite{Martin:2013tda}, and to explain the cosmological observations\cite{PLANCK}. The latest PLANCK data turned out to favor inflationary models with plateau potential. Such kind of plateau models include the well known Starobinsky model\cite{Starobinsky:1980te}, the Chaotic inflation in supergravity \cite{Goncharov:1983mw}, the Higgs inflation\cite{Salopek:1988qh,Bezrukov:2007ep}. A particularly interesting class of models that also unifies and generalizes a broad class of plateau models are the $\alpha$ attractor models\cite{Kallosh:2013hoa,Ferrara:2013rsa,Kallosh:2013daa,Kallosh:2013yoa,Galante:2014ifa}. In this paper, we will introduce a new class of inflationary model generalizing the work proposed in \cite{mhiggs}. We also discussed two possible ways of generating such plateau potentials. Our first approach is to realize the potential in the supergravity framework. We have shown that choosing particular forms of supergravity potentials we can generate the scalar field plateau potential. However, important ingredient in our construction is the presence of anomalous $U(1)$ symmetry. This supergravity inspired scalar potentials will reduce to our desired power-law plateau potentials in a specific limit. We have also provided another realization of our potential starting from the simple power-law potentials $V(\phi) \propto \phi^n$ with general scalar-tensor theory given in appendix-\ref{appendix:appA}. At this point let us motivate the reader pointing out important points of our study. It is well known that the simple power-law canonical potentials of the form $V(\phi) \propto |\phi|^n$ are not cosmologically viable because of their prediction of large tensor-to-scalar ratio. In addition, because of super-Planckian initial value of the scalar field, the effective field theory description may not be valid. One of our goals in this paper is to circumvent the above mentioned problems in the framework of canonical scalar field theory. In order to achieve this, we generalize the power-law potentials to a non-polynomial form such that it can give successful inflation with sub-Plankian initial condition. After the inflation, the production of radiation and other matter fields occur during reheating phase which also sets the initial condition for the standard big-band. Therefore, for completeness we also study the reheating phase considering the simplest scenario where inflaton is decaying into radiation though discrete change of equation of state \cite{kamionkowski}. It is well known that for inflation with the potential $V(\phi) \propto |\phi|^n$ the effective equation of state can be defined as $w_{\rm eff}=(n-2)/(n+2)$\cite{Turner:1983he,Mukhanov:2005sc,Martin:2010kz}. As the usual power-law potentials for $n\geq2$ turned out to be disfavored from CMB data, a detailed analysis of this phase for arbitrary power-law inflaton potential, to the best of our knowledge, is still missing. Therefore, in this paper for the first time we generalize the existing reheating constraint analysis by considering the above general inflaton equation of state, and qualitatively include the fact that $w_{eff}$ has to go to that of radiation because of inflaton decay at the end of reheating. This is what we call two stage reheating. We believe that our present two stage reheating approach is more realistic compared to that of usual reheating constraint analysis proposed in \cite{kamionkowski}. However detail studies of the perturbative and non-perturbative issues of reheating phase for general equation of state will be reported elsewhere. To complete our discussion, in the appendix-\ref{appendix:appB}, we briefly discuss about an important theoretical issue related to unitarity. Since our model has an additional scale $\phi_*$ which controls the dynamics and sets the scale of inflation, it is very important to maintain the unitarity scale say $\Lambda$ to be greater than $\phi_*$ during the inflation period. We structured our paper as follows: In section-\ref{model}, we generalize the model introduced in \cite{mhiggs}, and study in detail the cosmological dynamics of inflaton starting from inflation to reheating. We compute the important cosmological parameters such as scalar spectral index $(n_s)$, the tensor to scalar ratio $(r)$, and the spectral running $(\dd{n_s^k})$ and compare them with the observations. From those cosmological observations, we constrain the parameters of our models. In section-\ref{sugra}, we constructed the supergravity realization of our model and also compare the PLANCK result with the model under consideration. After the end of inflation, in general, the inflaton starts to have coherent oscillation around the minimum of the potential, during which the universe said to undergo reheating phase. We have computed the effective equation of state of the oscillating inflaton to study the reheating phase. In section-\ref{reheatingprediction}, we have done the model independent analysis for possible ranges of reheating temperatures $(T_{re})$, and e-folding numbers $(N_{re})$ during reheating considering the background expansion and the evolution of entropy density. These considerations put further constraints on the parameter space of our model. We concluded in section-\ref{conclusion}. We will consider $\hbar = c = 1$ unless otherwise stated. We have denoted ${\rm M_p}( = 1/\sqrt{8\pi G}) = 2.43\times 10^{18}{\rm GeV}$ as the reduced Planck constant. We will take the usual Friedmann-Le\^{i}matre-Roberson-Walker (FLRW) metric as our background metric $\dd{s}^2= \dd{t}^2 -a^2(t)(\dd{x}^2+\dd y^2+\dd{z}^2) $ for deriving our equations. Where $a(t)$ is the scale factor and $t$ represents the cosmic time. \section{\label{model}The Model} In this section will describe a class of phenomenological power-law plateau potentials which is flat at large field values. The form of the potentials are given as, \begin{eqnarray} V_{\rm min}(\phi) = \lambda \frac{m^{4-n} \phi^n}{1+\left(\frac{\phi}{\phi_*}\right)^n} . \end{eqnarray} In the above form of the potentials, the parameters $n$, and $\lambda$ or $m$ has the same role as in chaotic power-law inflationary models. The index $n$ is assumed to be even integer. The parameter $\lambda$ assumes non-trivial value only for $n=4$, which has been studied as minimal Higgs inflation in \cite{mhiggs}. For other values of $n$, we will set $\lambda =1$. In our model we have introduced a mass scale $\phi_{\ast}$ which controls the shape of the potentials. For large field value the potentials becomes flat which sets the scale of inflation as $\Lambda = \lambda m^{4-n} \phi_*^n$. One can further generalize this model by considering the potential to be dependent only upon the modulus of the inflaton field. In that case, $n$ can take all positive integer value. For the sake of simplicity we will stick to only even values of $n$. Another simple generalization of our model can be done by defining $V(\phi)^q$ as a new potential. Where, $q$ will be an another positive integer. As emphasized before, in section-\ref{sugra}, we will describe possible realization of these type of plateau potentials in the supergravity framework specifically in the sub-Planckian limit of $\phi_*$. An alternative construction of this class of potential from general scalar-tensor theory has also been presented in the appendix-\ref{appendix:appA}. \subsection{\label{background}Background Equations} In this section we will study the background dynamics using the above form of the potentials. We will start with the following action, \begin{eqnarray} S ~=~ \int \dd^4x \sqrt{-g} \left[\frac {\rm M_p^2}{2} R - \frac{1}{2}g^{\mu\nu}\partial_{\mu}\phi \partial_{\nu}\phi- V_{\rm min}(\phi) \right] \label{action} \end{eqnarray} Assuming the usual FLRW background ansatz for the space-time, the system of equations governing the dynamics of inflaton and scale factor are \begin{align} 3{\rm M_{p}^2} H^2 &= \frac{1}{2}\dot{\phi}^2 + V_{\rm min}(\phi)\\ 2{\rm M_{p}^2} \dot{H} &= -\dot{\phi}^2\\ \ddot{\phi} + 3 H \dot{\phi} + V'_{\rm min}(\phi) &= 0 , \label{friedman} \end{align} where, the usual definition of Hubble constant is $H = {\dot{a}}/a$. As the potential is asymptotically flat for large field value compared to $\phi_*$, the condition for sufficient inflation is automatically satisfied. The flatness conditions for the potential during inflation are quantified in terms of the \textit{slow-roll} parameters, defied as \begin{eqnarray} \epsilon \equiv \frac{\rm M_p^2}{2} \left( \frac{V'_{\rm min}}{V_{\rm min}}\right)^2 &=& \nonumber \frac{n^2 {\rm M_p^2} \phi_* ^{2 n}}{2 \phi ^2 \left(\phi_* ^n+\phi ^n\right)^2} \\ \eta \equiv {\rm M_p^2} \left( \frac{V''_{\rm min}}{V_{\rm min}}\right) &=& \frac{n {\rm M_p^2} \phi_* ^n \left((n-1) \phi_* ^n-(n+1) \phi ^n\right)}{\phi ^2 \left(\phi_* ^n+\phi ^n\right)^2} . \label{eq-slow-roll} \end{eqnarray} During inflation $\epsilon \ll 1$ and $|\eta| \ll 1$. Therefore, the end of inflation is usually set by the condition $\epsilon=1$. Let us also define the third order slow-roll parameter related to the third derivative of the potential as, \begin{equation} \xi \equiv {\rm M_p^4} \left(\frac{V'_{\rm min} V'''_{\rm min}}{V^2} \right) = \frac{n^2 {\rm M_p^4} \phi_* ^{2 n} \left(\left(n^2-3 n+2\right) \phi_* ^{2 n}-4 \left(n^2-1\right) \phi_* ^n \phi ^n+\left(n^2+3 n+2\right) \phi ^{2 n}\right)}{\phi ^4 \left(\phi_* ^n+\phi ^n\right)^4} . \end{equation} In addition to provide the successful inflation, all the aforementioned slow-roll parameters play very important role in controlling the dynamics of cosmological perturbations during inflation. An important cosmological parameter, which quantifies the amount of inflation is called e-folding number $(N)$. The e-folding number is expressed as \begin{eqnarray} N = \ln\left(\frac{a_{\rm end}}{a_{\rm in}}\right) = \int\limits_{a_{\rm in}}^{a_{\rm end}} \dd \ln a = \int\limits_{t_{\rm in}}^{t_{\rm end}} H \dd{t} \simeq \int\limits_{\phi_{\rm in}}^{\phi_{\rm end}} \frac{1}{\sqrt{2 \epsilon}} \frac{|\dd \phi|}{\rm M_p} . \label{efold} \end{eqnarray} As we have mentioned, the inflation ends when $\epsilon=1$, therefore, one can use Eq.(\ref{efold}) to find the value of the inflaton field when a particular mode exits the horizon during inflation. By solving the aforementioned condition, we can express the e-folding number $N$ into the following form, \begin{align} N=\frac{\phi_*^2}{n {\rm M_p}^2}\left[\frac{1}{(n+2)}(\tilde{\phi}^{(n+2)}-\tilde{\phi}_{end}^{(n+2)}) + \frac{1}{2} (\tilde{\phi}^2-\tilde{\phi}_{end}^2)\right] & \simeq \frac{\phi_*^2}{n {\rm M_p}^2} \frac{1}{(n+2)} \tilde{\phi}^{(n+2)}. \label{efold3} \end{align} Where we have defined, $\tilde{\phi} = {\phi}/{\phi_*}$. In the above expressions for $N$, we have ignored the contribution coming from $\phi_{\rm end}$, and its squared terms. We have numerically checked the validity of those expressions for a wide range of value of $\phi_* \leq {\cal O}({\rm M_p})$. From cosmological observations one needs $N \simeq 50-60$, so that the scales of our interest in CMB were inside the causal horizon during inflation. By using the above mentioned boundary conditions for the inflaton we have solved for the homogeneous part of inflaton $\phi(t)$ field and the scale factor $a(t)$. Next we describe the relevant cosmological parameters associated various correlation functions of the fluctuation. \subsection{\label{pert} Computation of $(n_s,r,\dd{n_s^k})$} As we have described in the introduction, the very idea of inflation was introduced to solve the outstanding problems of standard Big-Bang cosmology. Soon it was realized that inflation also provides seed for the large-scale structure of our universe through quantum fluctuation. All the cosmologically relevant inflationary observables are identified with various correlation functions of those primordial fluctuations calculated in the framework of quantum field theory. We have curvature and tensor perturbation. The two and higher point correlation functions of those fluctuations are parametrized by power spectrum(see, \cite{cpt1,cpt2,Baumann:2009ds,Baumann:2018muz} for a comprehensive review of Cosmological Perturbation Theory). The scalar curvature power spectrum is given by \begin{equation} \Delta_{\mathcal{R}}^2 = \frac{1}{8 \pi^2} \frac{1}{\epsilon} \frac{H^2}{\rm M_p^2} \bigg|_{k=aH} = \frac{1}{12 \pi^2} \frac{V_{\rm min}^3}{{\rm M_p^6} (V'_{\rm min})^2} . \end{equation} Once we know the power spectrum, the cosmological quantity of our interests are the spectral tilt and its running. During inflation a particular inflaton field value corresponds to a particular momentum mode exiting the horizon. Hence by using the following relation to the leading order in slow-roll parameters, $\dv{}{\ln k} = \frac{\dot{\phi}}{H}\frac{d}{\dd\phi}$, one obtains the following inflationary observables \begin{eqnarray} n_s -1 \equiv \dv{\ln \Delta_{\cal R}^2}{\ln k} = -6\epsilon + 2 \eta \end{eqnarray} \begin{eqnarray} \dd n_s^k \equiv \dv{n_s}{\ln k} = -2 \xi + 16 \epsilon \eta - 24 \epsilon^2 . \end{eqnarray} Similarly we can compute the tensor power spectrum $\Delta_{t}$ for the gauge invariant tenor perturbation $h_{ij}$ that generates the primordial gravitational waves. Finally normalizing the gravitational wave amplitude with the scalar one, we get the scalar-to-tensor ratio \begin{eqnarray} r = \frac{\Delta_{t}^2}{\Delta_{\cal R}^2} = 16\epsilon . \end{eqnarray} Once we have all the expression for cosmological quantities in terms of slow roll parameters, by using Eqs.(\ref{eq-slow-roll}) and (\ref{efold3}), and considering $\phi_* \leq {\cal{O}}(1)$ in unit of ${\rm M_p}$, we express $(n_s,r,\dd{n_s^k})$ in terms of $n$,$N$, and $\phi_*$, as \begin{eqnarray} \label{nsrvsN} 1 - n_s &=& \frac{2(n+1)}{(n+2)} \frac{1}{N} ~~;~~dn_s^k = -\frac{(2+3n+n^2)}{(n+2)^2} \frac{1}{N^2} \\ \nonumber r &=& 8n^2 \left(\frac{\phi_*}{\rm M_p}\right)^{\frac{2n}{(n+2)}} \frac{1}{[n(n+2)]^{\frac{2(n+1)}{(n+2)}} N^{\frac{2(n+1)}{(n+2)}}} . \end{eqnarray} The numerical results for inflationary predictions of this model is shown in Fig.(\ref{planckplot}) with respect to the latest Planck data\cite{PLANCK}. \begin{figure} \includegraphics[scale=1.0]{MI_PLANCK} \caption{\scriptsize The $n_s$-$r$ plot of the model on the marginalized joint 68\% and 95\% CL regions at $k = 0.002Mpc^{-1}$ from Planck alone and in combination with BK14 or BK14 plus BAO data\cite{Akrami:2018odb}.} \label{planckplot} \end{figure} It is evident that the above analytic expressions for the inflationary observables derived in Eq.(\ref{nsrvsN}) are valid for subplanckian values of the scale $\phi_{\ast}$. For large values of this scale, the potentials reduce to the simple power-law form $V(\phi)\propto \phi^n$ and the observables are given by well-known results \begin{align} 1-n_s = \frac{(2+n)}{2N},\quad r=\frac{4n}{N},\quad \dd n^k_s = -\frac{2}{N^2},~~ \label{eq:largeNchaotic}. \end{align} At this point let us point out an important difference between our models and the $\alpha$-attractor models. For large $N$, with $\alpha \ll N$, the spectral data for the $\alpha$-attarctor models are\cite{Galante:2014ifa} \begin{equation} 1-n_s = \frac{2}{N},\quad r = \frac{12\alpha}{N^2}. \label{eq:largeNaplpha} \end{equation} This is in sharp contrast with that of our models given in Eq.(\ref{nsrvsN}). Therefore, as emphasized before, our model will not fall in the class of $\alpha$-attractor models. An important feature of the $\alpha$-attractor models is that the cosmological parameters do not depend upon the details of the potentials specifically on the power of the potential. We will do the detailed comparison on this in section \ref{sugra}. So far all we have discussed is directly related to the cosmological observation made by PLANCK. Another important quantity of theoretical interest we would like to compute is Lyth bound \cite{lythbound} $\Delta \phi$. This quantity measures the difference of field values which is traversed by the inflaton field during inflation. This is so calculated that for a particular model $\Delta \phi$ is the maximum possible value for a particular e-folding number. Inflation is a semi-classical phenomena. It is believed that natural cut off scale for any theory minimally or non-minimally coupled with gravity is Planck scale ${\rm M_p}$. Therefore, amount of inflaton field value can naturally be a good measure to tell us the effective validity of a model under study in the effective field theory language. Hence the calculated expression for the field excursion in terms of $N$ and $\phi_*$ are: \begin{eqnarray} \Delta \phi \gtrsim {\rm M_p} N \sqrt{\frac{r}{8}} = {\rm M_p} \left( \frac{n}{n+2} \right) \frac{1}{\left[n(n+2)\right]^{\left(\frac{n+1}{n+2}\right)}} N^{\frac{1}{(n+2)}} \end{eqnarray} \begin{table}[t] \begin{tabular}{|p{0.7cm}|p{0.6cm}|p{1.0cm}|p{1.5cm}| p{1.5cm} |p{1.0cm}|} \hline $\frac{\phi_*}{\rm M_p}$ & $n$ & $n_s$ & $r$ & $dn_s^k$ & $\Delta \phi $ \\ \hline \hline 0.01 & 2 & 0.969 & $4\times10^{-5}$ & -0.00066 & 0.39 \\ \cline{2-6} & 4 & 0.966 & $2\times10^{-6}$ & -0.00066 & 0.12 \\ \cline{2-6} & 6 & 0.965 & $3\times10^{-7}$ & -0.00069 & 0.06 \\ \hline \hline 1.00 & 2 & 0.969 & $4\times10^{-3}$ & -0.0006 & 3.53 \\ \cline{2-6} & 4 & 0.966 & $9.6\times10^{-4}$ & -0.0007 & 2.13 \\ \cline{2-6} & 6 & 0.964 & $3.5\times10^{-4}$ & -0.0007 & 1.47\\ \hline \hline \end{tabular} \caption{\scriptsize The spectral quantities for different values of $n$ for 50 efolding. The two values of $\phi_*$ are chosen to illustrate that we can have both small field and large field inflation depending on the value of $\phi_*$.} \label{tab1} \end{table} All the quantities we have discussed so far is independent of $m$ or $\lambda$. (At this point let us again remind the reader that for $n \neq 4$, $\lambda$ is a dimensionless quartic coupling parameter. While for $n\neq 4$, $m$ is dimensionful parameter, and we set $\lambda =1$). However, comparing the inflationary power spectrum with the PLANCK normalization we will determine the value of $m$ or $\lambda$ and then calculate all the other quantities of our interest. The expression for the power spectrum of the curvature perturbation is \begin{eqnarray} \Delta_{\cal R}^2 = \frac{\lambda}{12 \pi^2 n^2} \left(\frac{m}{\rm M_p}\right)^{4-n} \left(\frac{\phi_*}{\rm M_p}\right)^{\frac{n^2}{n+2}} \left[n(n+2) N\right]^{\frac{2(n+1)}{(n+2)}} = 2.4 \times 10^{-9}. \label{powspectrum} \end{eqnarray} As mentioned we considered the PLANCK normalization: $\Delta_{\cal R}^2$ at the pivot scale $k/a_0 = 0.05 Mpc^{-1}$, and corresponding estimated scalar spectral index is $n_s = 0.9682 \pm 0.0062$. \begin{table}[t] \begin{tabular}{|p{1.2cm}|p{0.6cm}|p{1.6cm}|p{1.6cm}| p{1.6cm} |p{1.6cm}|} \hline $\phi_*/{\rm M_p}$ & $n$ & $m/{\rm M_p}$ & $\lambda$ & $H_*/{\rm M_p}$ & $V_*^{1/4}/{\rm M_p}$\\ \hline \hline $0.01$ & 2 & $1.2\times10^{-4}$ & $1$ & $6.8\times10^{-7}$ & $1.1\times10^{-3}$ \\ \cline{2-6} & 4 & - & $7.3\times10^{-6}$ & $1.6\times10^{-7}$ & $5.2\times10^{-4}$ \\ \cline{2-6} & 6 & $8.9$ & 1 & $6.5\times10^{-8}$ & $3.3\times10^{-4}$ \\ \cline{2-6} & 8 & $4.0\times10^{-1}$ & 1 & $3.6\times10^{-8}$ & $2.5\times10^{-4}$ \\ \hline \hline $1$ & 2 & $1.3\times10^{-5}$ & $1$ & $4.6\times10^{-6}$ & $2.8\times10^{-3}$ \\ \cline{2-6} & 4 & - & $3.5\times10^{-11}$ & $2.7\times10^{-6}$ & $2.1\times10^{-3}$ \\ \cline{2-6} & 6 & $2.8\times10^{5}$ & 1 & $1.7\times10^{-6}$ & $1.7\times10^{-3}$ \\ \cline{2-6} & 8 & $6.4\times10^{2}$ & $1$ & $1.3\times10^{-6}$ & $1.5\times10^{-3}$ \\ \hline \hline 10 & 2 & $5.7\times10^{-6}$ & $1$ & $2.5\times10^{-5}$ & $6.5\times10^{-3}$ \\ \cline{2-6} & 4 & - & $1.5\times10^{-13}$ & $2.0\times10^{-5}$ & $6.0\times10^{-3}$ \\ \cline{2-6} & 6 & $3.8\times10^{7}$ & 1 & $1.4\times10^{-5}$ & $5.0\times10^{-3}$ \\ \cline{2-6} & 8 & $2.3\times10^{4}$ & $1$ & $1.0\times10^{-5}$ & $4.2\times10^{-3}$ \\ \hline \hline \end{tabular} \caption{\scriptsize Inflationary energy scales and the parameter $m$ and $\lambda$ for two different values of $\phi_*$} \label{scales} \end{table} After having all our necessary expressions for the cosmological quantities, we have plotted our main results in $(n_s,r)$ plane and compared it with the experimental values $n_s=0.968 \pm 0.006$ and the upper limit on $r<0.11$ in the Fig.(\ref{planckplot}). In the table-(\ref{tab1}) we have given some sample values of all the cosmologically relevant quantities for different values of theoretical parameters. As emphasized before, specifically for $\phi_*<\mbox{M}_p$, our model predictions match well with the PLANCK data in the sub-Planckian regime. Importantly we can envision infinite numbers of model potentials for different values of $(n,\phi_{\ast})$ which give rise to low scale inflation. Most interesting case would probably be $n=4$. In the recent paper \cite{mhiggs}, it has been identified as a minimal Higgs inflation. Even though this identification is not straight forward, however, for small field value Taylor expanding the potential one can identify $\lambda$ as Higgs quartic coupling which can be set to its electroweak value. Renormalization group analysis needs to be performed from inflation scale to the electroweak scale to make this identification precise. In addition an important question needs to be addressed with regard to the unitarity of the models at the inflationary. For completeness, in the appendix we provide a short discussion on this issue, and details will be studied elsewhere. The values of $m$ and $\lambda$ for different models have been listed in Table-\ref{scales}. It can be seen that for super-Planckian $\phi_{\ast}$, the predictions match with that of the large-field chaotic models. Interestingly for $n=4$, with the decreasing $\phi_*$ the value of $\lambda$ increases, which could be useful in the context of pure Higgs inflation without the non-minimal curvature coupling. Another important point to notice that for $\phi_*<\mbox{M}_p$, all the relevant scales and importantly the field excursion became sub-Planckian, which is one of the important criteria for an effective field theory to be valid. \subsection{End of inflation and general equation of state} In this section we will be interested in the dynamics of the inflaton field after the inflation. During this phase the inflaton field oscillates coherently around the minimum of the potential. At the beginning the oscillation dynamics will naturally be dependent upon the inflation scale $\phi_*$ because of the large amplitude. This is the stage during which non-perturbative particle production will be effective. Therefore, resonant particle production will take place and conversion of energy from the inflaton to matter particles will be highly efficient. This phenomena is usually known as pre-heating of the universe. In this section we will discuss about the late time behaviour of the inflaton, specifically focusing on the dynamics of the energy density of the inflaton field. After many oscillations, when the amplitude of the inflaton decreases below $\phi_*$, the dynamics will be controlled by usual power law potential. As we have emphasized the coherent oscillation is very important in standard treatment of reheating. For any model of inflation this is thought to be an important criterion to have successful reheating. In this section, we will first discuss the evolution of inflaton and its energy density. At late time the potential can naturally be approximated as \begin{equation} \lim_{\frac{\phi}{\phi_*} <1}V_{\rm min}(\phi) = \lambda m^{4-n} \phi^n . \end{equation} \begin{table}[t!] \begin{tabular}{|p{0.6cm}|p{2.0cm}|p{2.5cm}|p{2.5cm}| } \hline $n$& $ \textit{w} =\frac{n-2}{n+2} $ & $p = 3(1 + \textit{w})$& $p$ from fitting\\ \hline \hline $2$ & 0 & 3 & 3.12 \\ \hline 4 & $\frac{1}{3}$ & 4 & 3.99 \\ \hline 6 & $\frac{1}{2}$ & 4.5 & 4.56 \\ \hline 8 & $\frac{3}{5}$ & 4.8 & 4.83 \\ \hline \end{tabular} \caption{The variation of inflation energy density with scale factor for various potential} \label{T-rhoVa} \end{table} In cosmology for any dynamical field such as inflaton, one usually defines the equation of state parameter $\textit{w}$. For the oscillating inflaton, when the time scale of oscillation about the minimum of a potential is small enough compared to the background expansion time scale, by using virial theorem effective equation of state for a potential of the form $V(\phi) \propto \phi^n$ can be expressed as\cite{Mukhanov:2005sc} \begin{equation} \textit{w} \equiv \frac{P_{\phi}}{\rho_{\phi}} \simeq \frac{\langle \phi V'(\phi) \rangle - \langle 2 V\rangle}{\langle \phi V'(\phi)\rangle + \langle 2 V\rangle}=\frac{n-2}{n+2} . \label{w-n} \end{equation} Therefore, in an expanding background, the evolution of energy density $\rho_{\phi}$ of the inflaton averaged over many oscillation will follow, \begin{eqnarray} \dot{\rho}_{\phi} + 3 H (1+\textit{w}) \rho_{\phi} = 0 . \end{eqnarray} At late time we relate the energy density$(\rho_{\phi})$ of the universe (assuming that the universe is dominated by a single component) and the scale factor $(a)$ as \begin{equation} \rho_{\phi} \propto a^{-3(1+\textit{w})} = a^{-p} . \label{rho-n} \end{equation} In the table-\ref{T-rhoVa}, we provide some theoretical as well as numerically fitting values corresponding to the equation of state parameter $\textit{w}$ of the inflaton and the power law evolution of the energy density namely the value of $p$. Before we come to reheating analysis, in the next section we describe our model potential originating from the supergravity in a specific limit. \section{\label{sugra}Supergravity realization of our model potential } As we have already mentioned, in this section we will construct our non-polynomial potential from supergravity generalizing the construction proposed in \cite{Dimopoulos:2016zhy} for $n=2$. Let us first briefly review the scalar field inflation from supergravity\cite{Mazumdar:2010sa,Yamaguchi:2011kg,Nakayama:2016eqv}. For supergravity model of inflation, the usual approach is to consider the K\"ahler potential $K(\Phi_i, \Phi_{\bar{i}}^{\ast})$, the superpotential $W(\Phi_i)$ in terms of scalar superfields $\{\Phi_i\}$ with the associated Lagrangian in the Einstein frame \begin{equation} \mathcal{L} = K_{i\bar{j}} (\partial^{\mu}\Phi_i)(\partial_{\mu}\Phi_{\bar{j}}^{\ast}) - V. \end{equation} However for our present purpose, we also need to consider gauge kinetic function $f(\Phi_i)$, which couples with the gauge field kinetic term. Considering all those terms in the supergravity Lagrangian, one obtains $F$-term and $D$-term potential for the inflaton and other associated moduli fields as, \begin{eqnarray} V &=& V_F + V_D,\\ V_F &=& e^{K/{\rm M_p^2}} \left[ K^{i\bar{j}}(D_i W)(D_{\bar{j}}\bar{W}) -3\frac{|W|^2}{\rm M_p^2}\right],\\ V_D &=& \frac{g^2}{2}\mathfrak{R}(f)^{-1}(iK_i X_i)^2, \end{eqnarray} where $K^{i\bar{j}}( = K_{i\bar{j}}^{-1})$ is the inverse K\"ahler metric $K_{i\bar{j}}$. $D_i W = W_i + K_i W/{\rm M_p^2}$ is the K\"ahler covariant derivative, and $X_i$ is the Killing vector of the K\"ahler manifold, and $g$ is the gauge coupling constant. For a linearly transforming field under $U(1)$ symmetry we have $X_i = i q_i \Phi_i$, where $q_i$ is the $U(1)$ charge of $\Phi_i$. The D-term potential in this case reduces to \begin{equation} V_D = \frac{1}{2\mathfrak{R}(f)}\left( \sum_i q_i K_i \Phi_i + \xi_i \right)^2 , \end{equation} where $\xi_i$ is the known as Fayel-Iliopoulos (FI) term which is non-zero only when the gauge symmetry is Abelian. \subsection{The power-law plateau potential form Supergravity} Let us consider a particular form of the aforementioned superpotential with two chiral superfields $S$ and $\{\Phi_i\}$ as \begin{equation} W(S, \Phi_i) = \frac{\phi_{\ast}^{3-n}S^n}{n} F(\Phi_i) . \end{equation} Where, $\phi_{\ast}$ mass scale and $F$ is a dimensionless holomorphic function of the superfields $\Phi_i$. The canonical K\"ahler potential is taken to be \begin{equation} K = |S|^2 + \sum_i |\Phi_i|^2 . \end{equation} With the above ingredients we can straightforwardly compute the $F$-term potential as, \begin{align} V_F = \phi_{\ast}^{2(3-n)}e^{K/{\rm M_p^2}} \left\{ |F|^2|S|^{2(n-1)}\left(1 + \frac{|S|^2}{n{\rm M_p^2}}\right) + \frac{|S|^{2n}}{n^2}\left| \frac{\partial F}{\partial \Phi_i} + \frac{\Phi_i^{\ast}F}{\rm M_p^2} \right|^2 -3\frac{|W|^2}{\rm M_p^2} \right\} . \end{align} For our present purpose, let us consider $n=2$ and two superfields with the following form of $F$, \begin{align} W(S,\Phi_1, \Phi_2) =& \frac{\phi_{\ast} S^2}{2}F(\Phi_1, \Phi_2)\\ \nonumber \text{with,\quad} F(\Phi_1, \Phi_2) =& F_1(\Phi_1) - F_2(\Phi_2) \end{align} Further we assume the functional form of the holomorphic functions $F_1$ and $F_2$ to be same, i.e., $F_1 \equiv F_2$. The $D$-term potential for a suitable gauge coupling function and charge we will take from the reference \cite{delaMacorra:1995qh,Dimopoulos:2016zhy}, and the expression is given as \begin{equation} V_D = \frac{1}{2} \left( |S|^2 - \sqrt{2}M^2 \right)^2 \end{equation} where $M$ is another scale which is associated with the FI term. As mentioned before the D-term potential is generated considering anomalous $U(1)$ symmetry\cite{Binetruy:1996xj,Halyo:1996pp}. These type of symmetries usually appears in the realm of string theories\cite{Dine:1987xk,Atick:1987gy,Dine:1987gj}. The anomaly cancellation requires the Green-Schwarz (GS) mechanism\cite{Green:1984sg} which sets the value of the FI term as \begin{equation} \xi_{\rm GS} = \frac{Tr[Q_A]}{192\pi}g^2 M^2 , \end{equation} where, $Q_A$ is the charge of the fields under the anomalous $U(1)$ gague and trace is taken over fields. Now let us assign the charges of the fields following the discussion in\cite{Halyo:1996pp}. The charge of the fields $\Phi_1$ and $\Phi_2$ (whose modulus will be identified as the inflaton) are assumed to be zero. The charge of $S$ will be non-zero as long as it is opposite of ${\rm Tr}[Q_A]$, and is taken to be $-1$.(This will make it necessary to consider the existence of another field charged under the anomalous $U(1)$ with zero VEV.) With the above considerations, the total potential for inflaton $\phi$ and the moduli $S$ will be $V_T = V_D + V_F$. Given the simple form of the superpotential, the minimization along ${\Phi_i}$ leads to the condition $\Phi_1=\Phi_2$. Now assuming a suitable R-symmetry and considering a particular direction in field space as $|\Phi_1|=|\Phi_2| =\phi$, the total scalar potential for sub-Planckian value of $|S|$ simplifies to \begin{align} V_T = e^{\frac{\phi}{\rm M_p^2}} \phi_{\ast}^2 |S|^4 \left|F'(\phi)\right|^2 + \frac{1}{2} \left( |S|^2 - \sqrt{2}M^2 \right)^2 \end{align} \begin{figure}[!t] \includegraphics[scale=0.5]{sugra-pot2.pdf} \caption{ Total supergravity potential $V_T$ has been plotted. All the field are plotted in unit of Planck unit with $\phi_*= M = {\rm M_p}$. The black curve corresponds to a possible inflationary trajectory around the minimum direction of $|S|$ which is the scalar field potential $V_{\rm sugra}$.} \label{sugra3d} \end{figure} In fig.\ref{sugra3d} we have given simple illustration of our supergravity potential in $(|S|,\phi)$ space and the inflationary trajectory. In order to obtain an effective potential in term of inflaton $\phi$, we minimize $V_T$ along the $S$ direction and plug it back into the total potential which takes the following simple form \begin{equation} V_{T}(\phi) = M^4\left[\frac{ e^{\left(\frac{\phi}{\rm M_p}\right)^2} \phi_{\ast}^2 \left|F'(\phi)\right|^2}{1 + e^{\left(\frac{\phi}{\rm M_p}\right)^2} \phi_{\ast}^2 \left|F'(\phi)\right|^2} \right] \label{eq:sugrapot0} \end{equation} It is now easy to check that for $F(\varphi)\propto (\phi/\phi_{\ast})^p$ ($\{ p \in \mathbb Z \mid p > 1 \}$ ) we get a potential of the form \begin{equation} V_{\rm sugra}(\phi) = \frac{m^{4-n}\phi^n}{{\rm exp}(-\frac{\phi^2}{2{\rm M_p^2}}) + \left( \frac{\phi}{\phi_{\ast}}\right)^n } \label{eq:sugrapot} \end{equation} Where $n=2(p-1)$ and the scale $m$ is defined by combining the scale $M$ with $\phi_{\ast}$ as $m=(M^4\phi_{\ast}^{-n})^{1/(4-n)}$. In the limit $\phi_* < {\rm M_p}$, this potential reduces to the minimal plateau model given as, \begin{equation} V_{\rm min}(\phi) = \frac{m^{4-n}\phi^n}{1 + \left( \frac{\phi}{\phi_{\ast}}\right)^n } \end{equation} \begin{figure}[t!] \centering \subfigure[]{\includegraphics[scale=0.4]{pot_n2_10}} \subfigure[]{\includegraphics[scale=0.4]{pot_n2_1}} \subfigure[]{\includegraphics[scale=0.4]{pot_n2_001}} \caption{\scriptsize Comparison of the shape of the two potentials for three different values the scale $\phi_{\ast}$. It can be seen that for subplanckian values of $\phi_{\ast}$ the two potentials are identical.} \label{fig:pots1} \end{figure} \begin{figure}[!] \centering \subfigure[]{\includegraphics[scale=0.6]{plateau}} \subfigure[]{\includegraphics[scale=0.6]{minimal}} \caption{\scriptsize The variation of the shape of the two potentials with scale $\phi_{\ast}$. The width of the potential vary slowly with $\phi_{\ast}$ for the plateau potential compared to the minimal potential.} \label{fig:pots2} \end{figure} In our subsequent discussions, we will try to compare both aforementioned potentials as a separate entity. In fig.(\ref{fig:pots1}), we plotted them for illustrations corresponding to different values of the parameters. It is apparent that the supergravity potential $V_{\rm sugra}$ and our minimal plateau potential $V_{\rm min}$ are identical for the sub-Planckian values of the scale $\phi_{\ast}$. Therefore, for our subsequent analysis, we will mostly concentrate in the sub-Planckian region of $\phi_*$. At this point we also would like to point out that we can arrive at the same form of our minimal potential if we start from the non-minimal scalar filed theory as discussed in the appendix. \begin{figure}[!] \centering \subfigure[]{\includegraphics[scale=0.6]{Plateau_mns}} \subfigure[]{\includegraphics[scale=0.6]{Plateau_mr}} \caption{\scriptsize variation of the spectral index $(n_s)$ and scalar-to-tensor ratio with the scale $\phi_{\ast}$ for the two potentials. The solid lines corresponds to the minimal model while the dotted lines are for the SUGRA model. For smaller values of $\phi_{\ast}$ the two model predictions are identical.} \label{fig:mnsr} \end{figure} Nevertheless in Fig.(\ref{fig:pots2}) we illustrate the change of the shape of the two potentials with the scale $\phi_{\ast}$. The $V_{\rm sugra}$ is extremely flat even for large value $\phi_{\ast}$, while the minimal potential reduces to the simple power law potentials. This fact significantly controls the prediction of inflationary observables for both the models. In Fig.(\ref{fig:mnsr}), we have plotted the dependence of the $n_s$ and $r$ on the scale $\phi_{\ast}$. We clearly notice that the predictions of both the models are identical as we go towards sub-Planckian value of $\phi_*$. In the Fig.(\ref{pplanck}), we have plotted predictions of our different models in $n_s$-$r$ plane. For explicit comparison, we have also plotted the predictions of the $\alpha$ attractor $T$ model($V=\Lambda^4[1-exp(-\sqrt{2/3\alpha}~\phi/{\rm M_p})]^{n}$) for different $n$ with increasing values of the parameter $\alpha$ with $(n=2,\alpha=1)$ being the Starobinsky model. Interestingly, the super-gravity model turned out to be well within the $2\sigma$ region of $n_s$ at all scales. Even at large field value of the inflaton the prediction of $r$ is always small. On the other hand as discussed before, our minimal potential mimics the usual chaotic inflation at large field value. Another interesting point that is worth mentioning is the absence of attarctor behavior in terms of cosmological predictions for the minimal plateau models. As can be seen from the Fig.(\ref{pplanck}), for our supergravity potential and the $\alpha$-attractor potential the value of $(n_s,r)$ going towards their respective unique attractor value with increasing $\phi_*$ and $\alpha$ respectively irrespective of any other parameter values. For $\alpha$-attractor this unique value is that of Starobinsky model with $(n_s=0.9667, r=3\times10^{-3})$, and for our supergravity potential the unique attractor value turned out to be $(n_s=0.9667, r=1\times10^{-5})$. It would be interesting to find that specific theory for this particular prediction. For the $\alpha$-attractor models, these attractor behavior is due to the pole in the kinetic term\cite{Galante:2014ifa}. As we have considered only the canonical kinetic term in our Lagrangian, the attractor behavior is absent for our minimal plateau models(see also appendix-\ref{appendix:appA} for the region when this approximation is valid). However, the emergence of attractor behavior for the original supergravity potential given in (\ref{eq:sugrapot0}) is indeed an interesting phenomena. The detailed theoretical implications of this supergravity potential will be important which we leave for future study. In our subsequent discussion we will only concentrate on the power-law minimal plateau potentials. \begin{figure}[t] \includegraphics[scale=0.6]{PlateauPlanck} \caption{\scriptsize The $n_s$-$r$ plot ffor $60$-efolding number of the two models plotted on the Planck data\cite{Akrami:2018odb}. The solid lines corresponds to the minimal model while the dotted lines are for the SUGRA model. We have varied the values of $\phi_{\ast}$ in the range $(10^{-3}\mathrm{M_p},10^2\mathrm{M_p})$. The dots are the theoretical prediction from Eq.(\ref{nsrvsN}) for $\phi_{\ast}=0.1~{\rm M_p}$. The orange lines correspond to the $\alpha$-attractor T model with solid line being $n=2$, and densely dashed and dashed lines for $n=4$, and $n=6$ respectively. We have varied $\alpha=1$ to $\alpha=10^4$. The orange dot corresponds to the Starobinsky model($\alpha=1$) for the same efolding number.} \label{pplanck} \end{figure} In the next section, will be considering the equation of state parameters and study their role in the subsequent cosmological evolution. We will first discuss about the constraint on reheating phenomena by taking the model independent approach, where explicit dynamics during reheating phase will not be considered. \section{\label{reheatingprediction}Model independent constraints from reheating predictions} After inflation, reheating is the most important phase, where, all the visible matter energy will be pumped in. In this section, we will try to constrain our model parameters without any specific mechanism of reheating. The background evolution of cosmological scales from inflation to the present day and the conservation of entropy density provide us important constraints on reheating as well as our model parameters. Reheating is the supposed to be the integral part of the inflationary paradigm. However, because of the single observable universe, it is very difficult to understand this process by the present day cosmological observation. Thermalization process erases all the information about the initial conditions which is the most important part of this phase. To understand this phase an indirect attempt has been made in the recent past \cite{liddle,kamionkowski,cook} through the evolution of cosmological scales and the entropy density. The dynamics is parameterized by three independent parameters, reheating temperature $(T_{re})$, equation of state $(w_{re})$, and e-folding number $(N_{re})$. In this section we follow the reference \cite{debuGB}, and consider two stage reheating process generalizing the formalism of \cite{liddle}. Because of two stage reheating process, the suitable reheating parameters are as follows, $(N_{re}=N^1_{re}+N^2_{re},T_{re},w^1_{re},w^2_{re})$. Where, $N^1_{re}, N^2_{re}$ are e-folding number during the first and second stage of the reheating phase with the equation of state $w^1_{re}, w^2_{re}$ respectively. At the initial stage the oscillating inflaton will be the dominant component, and at the end radiation must be the dominant component. Therefore, one sharp contrast between our present analysis with that of the well known reheating constraint analysis \cite{kamionkowski} is that our reheating equation of state $w_{re}$ is no longer a free parameter. We rather consider the following particular case, \begin{eqnarray} w^1_{re} = \frac{n-2}{n+2} ~~;~~~ w^2_{re} = \frac 1 3 . \label{eqparameter} \end{eqnarray} We also assumed the change of reheating phase from the first to the second stage as instantaneous. A particular scale $k$ going out of the horizon during inflation will re-enter the horizon during usual cosmological evolution. This fact will provide us an important relation among different phases of expansion parameterizing by e-folding number as follows \begin{eqnarray} \ln{\left(\frac k {a_0 H_0}\right)} = \ln{\left(\frac {a_k H_k}{a_0 H_0}\right)} =-N_k -\sum_{i=1}^{2}N^i_{re} - \ln{\left(\frac {a_{re} H_k}{a_0 H_0}\right)}, \label{scalek} \end{eqnarray} In the above expressions, use has been made of $k = a_0 H_0 = a_k H_k$. Where, $(a_{re}, a_0)$ are the cosmological scale factor at the end of the reheating phase and the present time respectively. $(N_k,H_k)$ are the e-folding number and the Hubble parameter respectively for a particular scale $k$ which exits the horizon during inflation. Therefore, following mathematical expressions will be used in the final numerical calculation, \begin{eqnarray} H_k &=& \sqrt{\frac{V(\phi_k)}{3 {\rm M_p^2}}} = \begin{cases} \left(\frac{\lambda \phi_*^n}{3 {\rm M_p^2}}\right)^{\frac 1 2} \frac{m^{\frac{4-n}{2}} \tilde{\phi}_k^{\frac {n}{2}}} {\left(1+\tilde{\phi}_k^n\right)^{\frac 1 2}} \\ \left(\frac{\lambda \phi_*^n}{\rm 3 M_p^2}\right)^{\frac 1 2} \frac{m^{\frac{4-n}{2}} \tilde{\phi}_k^{\frac{n}{2}}}{\left(1+\tilde{\phi}_k^2\right)^{\frac{n}{4}}}, \end{cases} \\ N_k &=& \frac 1 {\rm M_p} \int_{\phi_{end}}^{\phi_{k}} \frac {1} {\sqrt{2 \epsilon}} d\phi \simeq \begin{cases} \frac{\phi_*^2}{n {\rm M_p^2}}\left[\frac{1}{(n+2)}\tilde{\phi}_k^{(n+2)} + \frac{1}{2} \tilde{\phi}_k^2\right] \\ \frac{\phi_*^2}{n {\rm M_p^2}} \left[\frac{1}{4} \tilde{\phi}_k^4 + \frac{1}{2} \tilde{\phi}_k^2\right] , \end{cases} \label{HandN} \end{eqnarray} \begin{figure}[t!] \begin{center} \includegraphics[width=006.0cm,height=04.0cm]{nre1.pdf} \includegraphics[width=006.0cm,height=04.0cm]{tre1.pdf} \caption{\scriptsize Variation of $(N_{re}(\mbox{solid}), N_{k}(\mbox{dotted}),T_{re})$ as a function of $n_s$ have been plotted for $\phi_* = 0.01 {\rm M_p}$. This is the plot for our model potential. (Blue, red, magenta, brown, green) curves correspond to $n=(2,4,6,8,30)$. Each curve corresponds to a specific set of equation of state parameters $(w^1_{re},w^2_{re}) =((n-2)/(n+2),1/3)$ during reheating. We also consider $N^1_{re}=N^2_{re}$. The light blue shaded region corresponds to the $1 \sigma$ bounds on $n_s$ from Planck. The brown shaded region corresponds to the $1 \sigma$ bounds of a further CMB experiment with sensitivity $\pm 10^{-3}$ \cite{limit1,limit2}, using the same central $n_s$ value as Planck. Temperatures below the horizontal red line is ruled out by BBN. The deep green shaded region is below the electroweak scale, assumed 100 GeV for reference.} \label{tre1} \end{center} \end{figure} where, $\phi_k$ and $\phi_{end}$ are the inflaton field values corresponding to a particular scale $k$ crossing the inflationary horizon, and at the end of inflation respectively. In the above expressions, we have ignored the contribution coming from the inflaton field value $\phi_{end}$. It is important to note that, in principle we can write the field value at a particular scale $k$ in terms of $n_s, r$, by inverting those relations. Because of non-linear form, we will numerically solve those. The above unknown efolding numbers during reheating will certainly be dependent upon the energy densities $(\rho_{end},\rho_{re})$, at the end of inflaton (beginning of reheating phase) and at the end of the reheating phase( beginning of the standard radiation dominated phase); \begin{eqnarray} \ln\left(\frac {\rho_{end}}{\rho_{re}}\right) = 3(1+ w^1_{re}) N^1_{re} + 3(1+ w^2_{re}) N^2_{re}= 3\sum_{i=1}^{2} (1+ w^i_{re}) N^i_{re}. \label{rho2} \end{eqnarray} Above two Eqs.(\ref{scalek}) and (\ref{rho2}), can be easily generalized for multi-stage reheating with different equation of state parameters. As has been mentioned, after the end of reheating standard evolution of our universe is precisely known in terms of energy density and the equilibrium temperature of the relativistic degrees of freedom such as photon and the neutrinos. Therefore, the equilibrium temperature after the end of reheating phase, $T_{re}$, is related to temperature $(T_0, T_{\nu 0})$ of the CMB photon and neutrino background at the present day respectively, as follows \begin{eqnarray} \label{entropy} g_{re} T_{re}^3 = \left(\frac {a_0}{a_{re}}\right)^3\left( 2 T_0^3 + 6 \frac 7 8 T_{\nu 0}^3\right). \end{eqnarray} \begin{figure}[t] \begin{center} \includegraphics[width=8.0cm,height=02.8cm]{nretre1phistar.pdf} \includegraphics[width=8.0cm,height=02.8cm]{nretre2phistar.pdf} \caption{\scriptsize Variations of $(N_{re}(\mbox{solid}), N_{k}(\mbox{dotted}),T_{re})$ as a function of $n_s$ have been plotted for three different values of $\phi_*$. (Blue, magenta, purple) curves are for $\phi_* = (0.01, 0.1,10) {\rm M_p}$ respectively. The left two figures are for $n=2$, and right two figures are for $n=6$.} \label{tre2phi*n2} \end{center} \end{figure} The basic underlying assumption of the above equation is the conservation of reheating entropy during the evolution from the radiation dominated phase to the current phase. $g_{re}$ is the number of relativistic degrees of freedom after the end of reheating phase. We also use the following relation between the two temperatures, $T_{\nu 0} = (4/11)^{1/3} T_0$. For further calculation, we define a quantity, $\gamma = N^2_{re}/N^1_{re}$. If we identify the scale of cosmological importance $k$ as the pivot scale of PLANCK, so that $k/a_0 = 0.05 Mpc^{-1}$, and the corresponding estimated scalar spectral index $n_s = 0.9682 \pm 0.0062$, we arrive at the following equation for the efolding number during reheating period, and the reheating temperature, \begin{eqnarray} \label{nretre} && N_{re} = \frac{4(1+\gamma)}{(1-3w_{re1})+\gamma(1-3 w_{re2})}\left[61.6 - \ln\left(\frac{V_{end}^\frac{1}{4}}{H_k}\right) -N_k\right]\\ && T_{re} = \left[\left(\frac{43}{11g_{re}}\right)^\frac{1}{3} \frac{a_0 T_0}{k} H_ke^{-N_k}\right]^{\frac{3[(1+w_{re1})+\gamma(1+w_{re2})]} {(3w_{re1}-1)+\gamma(3 w_{re2}-1)}} \left[\frac{3^2.5V_{end}}{\pi^2g_{re}}\right]^{\frac{1+\gamma}{(1-3w_{re1})+\gamma(1-3 w_{re2})}} . \label{nretre} \end{eqnarray} In the above derivation, we have used $g_{re} = 100$. Before discussing any further, let us provide the general descriptions of the figures we have drawn in this section. As has been mentioned before, we have considered specific values of equation of state parameter $(w^1_{re},w^2_{re}) =((n-2)/(n+2), 1/3)$ in compatible with our model discussed in the previous section. It is important to mention regarding the special point in the aforementioned state space $(1/3,1/3)$ which is realized for $n=4$. Analytically one can check that at this special point both $(T_{re}, N_{re})$ become indeterminate seen in Eq.(\ref{nretre}). This fact corresponds to all the vertical solid red lines in $(n_s~vs~T_{re})$ and $(n_s~vs~N_{re})$ plots in Figure \ref{tre1}. We have considered $\gamma =1$ as our arbitrary choice. Each curve corresponds to different values of $n$. On the same plot of $(n_s~vs~N_{re})$, we also plotted $(n_s~vs~N_k)$ corresponding to the dotted curves for different models. At this stage, we would like to remind the reader again that for a wide range of $\phi_*$, all the models predict very small value of tensor to scalar ratio $r$. Therefore, we will be discussing all the constraints without explicitly mentioning $r$. Given the overall description of all the plots, we now set to discuss the prediction and constraints for two different models. In the table-(\ref{tab3}) we provide the important numbers for reheating temperature and the e-folding number. We provided only the limiting values of $T_{re}$ which are still allowed from the cosmological observation. \begin{table}[t] \begin{tabular}{|p{0.6cm}|p{1.2cm}|p{1.5cm}|p{0.7cm} |p{0.7cm}|} \hline n & $n_s$ & $T_{re}$(GeV) & $N_{re}$ & $N_{k}$ \\ \hline \hline 2 & \begin{tabular}{c}0.9723 \\0.9702 \end{tabular} & \begin{tabular}{c} $1\times10^{15}$\\ $1\times10^{3} $ \end{tabular}& \begin{tabular}{c} 0.4\\32\end{tabular} & \begin{tabular}{c}54\\50\end{tabular} \\ \hline 6 &\begin{tabular}{c} 0.9670\\0.9679 \end{tabular}&\begin{tabular}{c} $1\times10^{14}$\\ $2\times10^{3} $ \end{tabular}& \begin{tabular}{c}00\\23\end{tabular} &\begin{tabular}{c} 53\\55 \end{tabular} \\ \hline 8 & \begin{tabular}{c}0.9659\\0.9673 \end{tabular}&\begin{tabular}{c} $7\times10^{13}$\\ $1\times10^{3}$\end{tabular} &\begin{tabular}{c} 0.6\\23 \end{tabular}&\begin{tabular}{c} 53\\55 \end{tabular}\\ \hline 30 & \begin{tabular}{c}0.9625\\0.9653 \end{tabular}& \begin{tabular}{c} $6\times10^{13}$\\ $1\times10^{3} $ \end{tabular}&\begin{tabular}{c} 00\\21 \end{tabular}&\begin{tabular}{c} 52\\56 \end{tabular} \\ \hline \end{tabular} \caption{\scriptsize Some sample values of $(n_s, T_{re}, N_{re},N_k)$ are give for two different models for $n=(2,6,8,30)$. As we have mentioned, for $n=4$, $(T_{re}, N_{re})$ become indeterministic. All these prediction are for $\phi_* = 0.01 {\rm M_p}$.} \label{tab3} \end{table} From the figure we see that for a very small change in $n_s$, the variation of reheating temperature is very high. Therefore, reheating temperature provides tight constraints on the possible values of e-folding number $N_{re}$. Except for $n=4$, if we restrict the value of $T_{re} \gtrsim 10^3$ GeV, the e-folding number turned out to be $N_{re} \lesssim 35$ during reheating. As an example, for $n=2$, we find spectral index lies within $0.9723 \lesssim n_s \lesssim 0.9702$. Within this range of spectral index, the reheating temperature has to be within $1\times10^{15} \gtrsim T_{re} \gtrsim 1\times10^{3}$ in unit of GeV. This restriction in turn fixed the possible value of e-folding number within a very narrow range $50< N_k < 54$ for $n=2$. For other value of $n$, the ranges are provided in the table-\ref{tab3}. Through our present analysis one of the important points we infer that in order to achieve the present CMB scale, it must exits the horizon within a very narrow range of e-folding number. This restriction is originated from the allowed range of reheating temperature. The present reheating analysis essentially connects between those two ranges. Interesting relation can be found between the reheating temperature $T_{re}$ and the spectral index $n_s$ by numerical fitting them as, \begin{eqnarray} \ln\left( T_{re}\right)\propto A + B(n_s - 0.962) + C(n_s - 0.962)^2 . \label{nsTrefor} \end{eqnarray} Where, the dimensionless constants can be approximately found out to be $A=-5\times10^1$, $B =4\times10^3$ and $C=2\times 10^5$ for $n=2$, $A=2\times10^2$, $B =-1\times10^4$ and $C=-7\times 10^5$ for $n=6$ and $A=2\times10^2$, $B =-9\times10^3$ and $C=-4\times 10^5$ for $n=8$. The proportionality constant $Q_p$ is $\phi_*$ dependent constant. Another interesting observation is that with increasing inflaton equation of state, maximum e-folding number during reheating, $N_{re}$, decreases for a fixed value of reheating temperature. As given in the table, taking $n=(2,6,8,30)$, the associated maximum $N_{re}$ assumes $(32,23,23,21)$ respectively. This essentially suggests that with increasing inflationary equation of state $w$ or in other words as increase $n$, the faster will be the thermalization process, and consequently earlier will be the radiation dominated phase. To complete the discussion, in the Fig.\ref{tre2phi*n2}, we have also plotted the dependence of reheating parameters for different values of $\phi_*$. We have plotted for $n=2,6$. For all the other models qualitative behaviors of those plots will be same, except $n=4$. Qualitative behavior of $(N_{re},T_{re},N_k)$ remain same for different $\phi_*$. \textcolor{red}{} \section{\label{conclusion}Summary and Conclusion} Before we conclude, let us summarize the main results of our study. We studied in detail a specific class of supergravity inspired inflationary models. Most importantly to best fit the experimental data all the important scales $(\phi_*, m)$ which control the inflationary as well as reheating dynamics turned out to be sub-Planckian. Therefore, our model prediction can be trusted from the effective field theory point of view. As a result we also have sub-Planckian field excursion during inflation, which is thought to be important in order to avoid any unwanted quantum gravity effect. However, depending upon the choice of scale we realized both large field as well as small field inflation. For both the cases, the prediction of tensor to scalar ratio $(r)$ turned out to be significantly small for a wide range of parameter space. Another important point we would like to point out that our model belong to different class as compared to recently proposed $\alpha$-attractor models. At this point let us point out that a detailed statistical analysis on inflationary models is done in \cite{Martin:2013tda,martin2} to select the \textit{best fit} models out of a large number of models. Similar analysis is beyond the scope of the present work. However, an important conclusion of their work is that there exist a common feature among all the best fit models. They found that all these best fit model potentials have a large plateau region, i.e., $V'(\phi)\to 0$ as $\phi\to\infty$. Thus it can be inferred that our power-law plateau model as well as the full supergravity model will also be among the best fit models of inflation. Near the minimum, the inflaton potentials behaves like a power law $V \propto \phi^n$. Therefore, after the end of inflation coherently oscillating inflaton can be well approximated as an effective fluid with the equation of state parameter, $w=(n-2)/(n+2)$ at least at the initial stage of reheating. With the usual power law potential, one finds it very difficult to fit the cosmological observation for even $n \geq 2$. As a result, detailed studies have not been done for general power law potential specifically in the context of reheating. However, as we have advertised throughout our paper, with the non-polynomial generalization we can easily have power law form specifically at the minimum of the potential. This fact leads us to generalize the work of reheating constraint analysis proposed in \cite{kamionkowski,liddle} for general effective inflaton equation of state $w$. Main outcome of this analysis can be seen in the Table-\ref{tab3}. After studying the PLANCK constraints it would be very much important to study in detail the reheating dynamics. Reheating is the stage during which all the matter fields are produced. Usual strategy would be to consider the effective coupling among the inflaton and various other matter fields we see today. Considering perturbative reheating phenomena, we have discussed important issue of constraining the dark matter parameter space with CMB data in\cite{Maity:2018exj}. The non-perturbative particle production or preheating for this model with full numerical lattice simulation has been studied in\cite{Maity:2018qhi}. \section{Acknowledgement} We would like to thank our HEP and Gravity group members for their valuable comments and discussions. We thank Abhijit Saha for useful discussions. We thank the anonymous referees for useful comments which helps us to improve the work.
\section{INTRODUCTION}\label{sec:intro} While major advances have been made in improving the capabilities of decision making systems for automated vehicles, validation of these systems is challenging due to the vast space of driving scenarios~\cite{kalra2016driving, koopman2016challenges, wachenfeld2017new}. Establishing confidence in any automotive system will involve road tests, but road tests alone do not adequately cover the space of critical scenarios~\cite{wachenfeld2017thesis, winner2015quo, zhao2017accelerated}. Hence, research efforts have focused on validation by simulation with a particular emphasis on building realistic models of the environment, including models of driving behavior and sensors~\cite{woodrooffe2014performance, yang2010development, huang2017cutin, sunberg2017value, wheeler2017radar}. In the validation of autonomous vehicles, it can be very valuable to know the most-likely failure scenarios as predicted by a probabilistic model of the environment. Direct sampling is inefficient due to the rarity of failure events. Adaptive stress testing (AST) has been proposed as a practical approach to finding most-likely failure scenarios by using a Markov decision process (MDP) formulation. The AST approach was first applied to test an aircraft collision avoidance system~\cite{lee2015adaptive}. The original method uses Monte Carlo tree search (MCTS) with double progressive widening (DPW)~\cite{couetoux2011continuous} to search for the most-likely failure condition. This paper adapts this approach to the automotive setting where the system under test (SUT) is an autonomous vehicle with noisy sensors approaching a pedestrian crosswalk. This paper also proposes deep reinforcement learning (DRL) as an alternative solver for AST. This paper makes the following contributions: \begin{itemize} \item We extend the AST methodology by introducing a new solver technique, DRL. We show that the theoretical advantages of AST still apply to the more general formulation. \item We present a simulation framework for autonomous vehicles that interfaces with our AST implementation. The framework is modular, which enables components such as decision making systems, sensor models, and simulation dynamic models to be interchanged with alternative and more sophisticated versions. \item We apply AST to a set of autonomous vehicle scenarios and show that AST can successfully find high probability failure scenarios. Our experiments show that DRL can find better solutions much more efficiently compared to MCTS. \end{itemize} The remainder of the paper is organized as follows. \Cref{sec:method} provides a review of MDPs, the two reinforcement learning algorithms used in this paper, and the AST framework. \Cref{sec:astav} introduces the specific formulation of AST for autonomous vehicles as well as the problem setup and evaluation metrics. \Cref{sec:res} presents the experimental results and analysis of performance. \Cref{sec:conc} concludes the paper. \section{BACKGROUND AND METHODOLOGY} \label{sec:method} We present background material on the MDP formulation and the solvers we use along with the AST methodology. We also extend the AST methodology to include DRL. \subsection{Markov Decision Processes} \label{sec:MDPs} In a Markov decision process (MDP), the agent chooses an action $a$ based on a state $s$ and receives a reward $r$ according to the reward function $R(s,a)$~\cite{DMU}. The state transitions to the next state $s'$ stochastically according to the state transition function $T(s' \mid s, a)$. The probability of transitioning to state $s'$ depends only on $s$ and $a$, which is known as the Markov assumption. The goal of an agent is to find a policy $\pi$ that specifies the action $a = \pi(s)$ at each state to maximize the expected utility. The utility of executing a policy $\pi$ from state $s$ is given recursively by the value function: \begin{equation} V^{\pi} \left(s\right) = R\left(s, \pi\left(s\right)\right) + \gamma \sum_{s'}T\left(s'\mid s,\pi \left(s\right)\right)V^{\pi}\left(s'\right) \end{equation} where $\gamma$ is the discount factor that controls the weight of future rewards. Reinforcement learning algorithms, such as MCTS and DRL, can be used to find the optimal policy $\pi(s)$. \subsection{Monte Carlo Tree Search} MCTS is an online sampling-based algorithm that can be used to solve MDPs~\cite{browne2012survey}. MCTS builds a search tree by sampling the state space and using forward simulation to estimate the value of states and actions. This paper uses a variation of MCTS with double progressive widening (DPW)~\cite{couetoux2011continuous}. DPW regulates branching in the search tree to prevent the number of children from exploding when the number of states or actions is very large. \subsection{Deep Reinforcement Learning}\label{sec:drl} Deep reinforcement learning (DRL) is an alternative approach to solving MDPs that uses a feed-forward neural network to represent the policy $\pi_\theta(s)$. The policy is parameterized by $\theta$, which represents the neural network weights. In our implementation, the policy maps an input state to the mean of a Gaussian distribution. The actions are then sampled from the distribution $a \sim \mathcal{N}(\pi_\theta(s), \Sigma)$, with the diagonal covariance matrix $\Sigma$ separately parametrized and independent of state \cite{schulman2015trust}. To update the policy, we use Generalized Advantage Estimation (GAE) to estimate the policy-gradient from batches of simulation trajectories \cite{schulman2015high}. GAE defines an advantage function \begin{equation} A^{\pi,\gamma} \left(s, a\right) := Q^{\pi,\gamma}\left(s, a\right)-V^{\pi,\gamma}\left(s\right) \end{equation} where $\gamma$ is the discount factor that governs the weight of future rewards. The Q-function evaluates the value of taking an action from a state and then following the policy, and is defined as \begin{align} Q^{\pi,\gamma}\left(s, a\right) &= R\left(s,a\right)\notag \\ &+ \gamma \sum_{s'}T\left(s'\mid s,a\right)Q^{\pi,\gamma}\left(s', \pi\left(s'\right)\right) \end{align} Once the policy-gradient is known, Trust Region Policy Optimization (TRPO) is used to step the policy. TRPO generally gives monotonic increases in policy performance by constraining the KL divergence~\cite{schulman2015trust}. \subsection{Adaptive Stress Testing}\label{sec:ast} We formulate the problem of finding failure events as a sequential decision process, following prior work~\cite{lee2015adaptive}. The inputs to the problem are the pair ($\mathscr{S}$, $E$), where $\mathscr{S}$ is a generative simulator that is treated as a black box and $E$ is a subset of the state space where the event of interest (e.g. a collision) occurs. The simulator contains the models for the SUT, the models of the other agents in the environment, and the dynamics of the environment. The simulator exposes the following simulation control functions to the solver: \begin{itemize} \item \textsc{Initialize}$(\mathscr{S})$: Resets $\mathscr{S}$ to its initial state $s_0$. \item \textsc{Step}$(\mathscr{S}, E, a)$: Steps the simulation in time by drawing the next state $s'$ after taking action $a$. The function returns the probability of the transition and an indicator whether $s'$ is in $E$ or not. \item \textsc{IsTerminal}$(\mathscr{S}, E)$: Returns true if the current state of the simulation is in $E$, or if the horizon of the simulation $T$ has been reached. \end{itemize} This formulation assumes that the state of the simulator is hidden, which in general means that the simulator is non-Markovian from the point of the view of the solver. However, because we have chosen our actions $a$ to fix the stochastic elements of the simulator, the state transitions now become deterministic. In this setting, we can deterministically revisit a state $s$ by replaying the history of actions that led to the state starting from the initial state. As such, we can use the sequence of actions $a_{0:t-1}$ to represent the state $s_t$~\cite{lee2015adaptive}. The abstraction allows us to overcome partial observability in the simulator. The definition of the problem is as follows: Given a simulator $\mathscr{S}$ and a subset of the state space $E$, find the most likely trajectory that leads to an event in $E$. Because $a$ controls the stochastic elements of the simulator, the simulation does not evolve stochastically. Rather, the actions controlling the adversarial environment uniquely determine the evolution of the scenario. The approach to solve the AST problem is shown in~\Cref{fig:ASTStruct}. We start with the solver, which samples environment actions and passes them to the simulator through the control functions \textsc{Initialize}, \textsc{Step}, and \textsc{IsTerminal}. The simulator applies these actions, updates its internal state, and outputs an indication whether an event in $E$ occurred and the likelihood of the latest state transition. The reward function transforms the simulator outputs into a reward to be passed back to the solver. The solver completes the loop by using the reward to choose the next action. \begin{figure}[htbp] \centering \scalebox{0.8}{\input{ASTStruct.tex}} \caption{The AST methodology. The simulator is treated as a black box. The solver optimizes a reward based on transition likelihood and whether an event has occurred.} \label{fig:ASTStruct} \end{figure} \section{AUTONOMOUS VEHICLES APPLICATION}\label{sec:astav} This section defines the set of scenarios and metrics that we will use to evaluate the performance of the methods as well as the reward function used by the solvers. \subsection{Simulator Design}\label{sec:algmet} \begin{figure}[htbp] \centering \scalebox{0.60}{\input{SimStruct.tex}} \caption{The modular implementation of AST. The modules of the simulator can be easily swapped to test different scenarios, SUTs, or sensor configurations.} \label{fig:SIMStruct} \end{figure} The driving algorithm, the sensors, the tracker, the solver, and the scenario definition are separate components in the framework. We use a modified version of the Intelligent Driver Model (IDM) as the SUT~\cite{PhysRevE621805}. If multiple IDM implementations were to be compared, it would be easy to swap them out and compare the results. The modularity gives AST the potential to be a useful benchmarking tool, or a batch testing method for autonomous systems. The simulator architecture is shown in~\Cref{fig:SIMStruct}. The solver outputs the environment actions to the simulator, which is used to update non-SUT agents controlled by AST, called \emph{participants}. In our experiments, the only participants are pedestrians. The sensors receive the new participant states and output measurements augmented with the noise from the environment actions. The measurements are filtered by the tracker and passed to the SUT. The SUT, which is the driving model, decides how to maneuver the vehicle based on its observations. The SUT actions are used to update the state of the vehicle. The simulator outputs the transition probability and event indicator to the reward function. The current state of the simulator can be represented in different ways. If the state of the simulator is fully observable, the simulator can provide it or an autoencoder processed version of it~\cite{kingma2013auto}. Otherwise, the history of previous actions can be used to represent the current state. The state representation, along with the reward of the previous step, are then input to the solver. Solvers use different procedures to generate the environment actions as shown in~\Cref{fig:SolverStruct}. MCTS outputs pseudorandom seeds, which are used to seed random number generators. The environment actions are then sampled using these random number generators. DRL outputs a mean and standard deviation that characterize a multivariate Gaussian distribution. Environment actions are sampled from the distribution. \begin{figure}[htbp] \centering \scalebox{0.65}{\input{SolverStruct.tex}} \caption{A comparison of the solver methods. MCTS uses a seed to control a random number generator. DRL outputs a distribution, which is then sampled. Both of these methods produce the environment actions.} \label{fig:SolverStruct} \end{figure} \subsection{Problem Formulation}\label{sec:setup} \begin{figure}[htbp] \centering \begin{subfigure}{\columnwidth} \vspace*{0.25cm} \centering \includegraphics[width=0.70\columnwidth]{initial1.png} \caption{First scenario.} \label{fig:scenario1} \end{subfigure} \begin{subfigure}{\columnwidth} \centering \includegraphics[width=0.75\columnwidth]{initial_ped.png} \caption{Initial pedestrian configurations for each scenario.} \label{fig:scenario2} \end{subfigure} \caption{Three variations of initial configurations in the crosswalk scenario.} \label{fig:scenarios} \end{figure} To evaluate the effectiveness of AST as applied to autonomous vehicles, we stress test a vehicle in a set of scenarios at a pedestrian crosswalk, shown in \Cref{fig:scenarios}. The scenario is defined by a single autonomous vehicle approaching a crosswalk. The road has two lanes to model a regular neighborhood road, although there is no traffic in either direction for this specific example. We intentionally chose the simplest possible representative scenario for pedagogical reasons to illustrate the fundamental difference in scalability between DRL and MCTS. The road and crosswalk are sized according to California state regulations \cite{crosswalk}. The Cartesian origin is set at the intersection of the central vertical axis of the crosswalk and the central horizontal axis of the bottom lane, with the positive $x$ direction follows the direction of the arrow in \Cref{fig:scenarios}, and positive $y$ motion being towards the top side of the street. We test with different numbers of pedestrians, as well as with different starting states. The state of the $i$th pedestrian is $\vect{s}_{\text{ped}}^{( i )} = [v_x^{( i )},v_y^{( i )},x^{( i )},y^{( i )}]$ where \begin{itemize} \item $v_x^{( i )},v_y^{( i )}$ are the $x$ and $y$ components of the velocity of the $i$th pedestrian. \item $x^{( i )},y^{( i )}$ are the $x$ and $y$ components of the position of the $i$th pedestrian. \end{itemize} We present data from each pedestrian from the three different variations of the scenario: \begin{itemize} \item 1 pedestrian, with initial state $$\vect{s}_{\text{ped}}^{\left( 1 \right)} = \left[\SI{0.0}{\meter\per\second},\SI{1.4}{\meter\per\second},\SI{0.0}{\meter},\SI{-2.0}{\meter}\right]$$ \item 1 pedestrian, with initial state $$\vect{s}_{\text{ped}}^{\left( 1 \right)} = \left[\SI{0.0}{\meter\per\second},\SI{1.4}{\meter\per\second},\SI{0.0}{\meter},\SI{-4.0}{\meter}\right]$$ \item 2 pedestrians, with initial state $$\vect{s}_{\text{ped}}^{\left( 1 \right)} = \left[\SI{0.0}{\meter\per\second},\SI{1.4}{\meter\per\second},\SI{0.0}{\meter},\SI{-2.0}{\meter}\right]$$ $$\vect{s}_{\text{ped}}^{\left( 2 \right)} = \left[\SI{0.0}{\meter\per\second},\SI{-1.4}{\meter\per\second},\SI{0.0}{\meter},\SI{5.0}{\meter}\right]$$ \end{itemize} shown in~\Cref{fig:scenario2}. The first scenario was chosen as a basic example to demonstrate AST. The second scenario was chosen to show that a different initial condition leads to different collision trajectories found. The third scenario shows the scalability of AST by including more participants in the scenario. \subsubsection{Environment Models} Both solvers use the same representation for environment actions. The environment action vector at each time step is $\vect{a}_{\text{env}} = [\vect a^{(1)},\vect a^{(2)},\ldots,\vect a^{(n)}]$, where $n$ is the number of pedestrians. For the $i$th pedestrian, $\vect{a}^{( i )} = [a_x^{( i )}, a_y^{( i )}, \epsilon_{v_x}^{( i )},\epsilon_{v_y}^{( i )},\epsilon_{x}^{( i )},\epsilon_{y}^{( i )} ]$ where \begin{itemize} \item $a_x^{( i )},a_y^{( i )}$ are the $x$ and $y$ components of the $i$th pedestrian's acceleration. \item $\epsilon_{v_x}^{( i )},\epsilon_{v_y}^{( i )}$ are the noise injected into the SUT measurement of the components of the $i$th pedestrian's velocity $v_x^{( i )}$ and $v_y^{( i )}$. \item $\epsilon_{x}^{( i )},\epsilon_{y}^{( i )}$ are the noise injected into the SUT measurement of $x$ and $y$ components of the $i$th pedestrian's position. \end{itemize} AST controls both the pedestrian motion and the sensor noise, allowing it to search over both pedestrian actions and hardware failures to find the most likely collision. The inputs to the solvers vary slightly. MCTS does not make use of the simulator's internal state, treating it entirely as a black box. Instead, the AST implementation of MCTS differentiates states using a history of previous pseudorandom seeds~\cite{lee2015adaptive}. In contrast, DRL takes the simulation state as input. The simulation state is $\vect{s}_{\text{sim}} = [s_{\text{sim}}^{(1)},s_{\text{sim}}^{(2)},\ldots,s_{\text{sim}}^{(n)}]$. For the $i$th pedestrian, $\vect{s}_{\text{sim}}^{( i )} =[\hat v_x^{( i )},\hat v_y^{( i )},\hat x^{( i )},\hat y^{( i )}]$ where \begin{itemize} \item $\hat v_x^{( i )},\hat v_y^{( i )}$ are the $x$ and $y$ components of the relative velocity between the SUT and the $i$th pedestrian. \item $\hat x^{( i )},\hat y^{( i )}$ are the $x$ and $y$ components of the relative position between the SUT and the $i$th pedestrian. \end{itemize} At each time step, the pedestrian samples $\vect{a}^{(i)}$ (the procedure of this sampling differs slightly between solvers, but the representation of the action vector $\vect{a}^{(i)}$ is the same). To find the likelihood of $\vect{a}^{(i)}$, a model of the expected pedestrian action vector is needed. The model of the pedestrian is a multivariate Gaussian distribution $\mathcal{N}(\vect{\mu}_a, \vect\Sigma)$ where $\vect{\mu}_a$ is a zero-vector, and $\vect\Sigma$ is diagonal. Our pedestrian model is parameterized by $\sigma_{\text{aLat}}$, $\sigma_{\text{aLon}}$, and $\sigma_{\text{noise}}$, which are the diagonal elements of the covariance matrix and correspond to lateral acceleration, longitudinal acceleration, and sensor noise respectively. The values we use are: $\sigma_{\text{aLat}} = 0.01$, $\sigma_{\text{aLon}} = 0.1$, and $\sigma_{\text{noise}} = 0.1$. The acceleration parameters are designed to encourage the pedestrians to move across the street with some lateral movement. The assumption of the mean action being the zero-vector implies that, on average, a pedestrian holds course. In reality, this distribution could depend on the location of the pedestrian, where the vehicle is, the attitude or attention of the pedestrian, or other factors. Applying a more realistic pedestrian model is an avenue for future work. The initial speed of the pedestrian is set to \SI{1.5}{\meter \per \second}, which is the average human walking speed. \subsubsection{Sensor and Tracker Models} The sensors of the SUT receive a vector of the participant state and output a vector of noisy measurements $\vect m = [m^{(1)},m^{(2)},\ldots,m^{(n)}]$. For the $i$th pedestrian, $\vect m^{( i )} = \vect s_{ped}^{( i )} + \vect\epsilon^{(i)}$ where $ \vect\epsilon^{(i)} = [ \epsilon_{v_x}^{( i )},\epsilon_{v_y}^{( i )},\epsilon_{x}^{( i )},\epsilon_{y}^{( i )} ]$. The measurements are passed to an alpha-beta tracker \cite{alphabeta}, parameterized by $\alpha_{\text{tracker}}$ and $\beta_{\text{tracker}}$, which returns the filtered versions of the measurements as the SUT's observations. We use the values $\alpha_{\text{tracker}} = 0.85$ and $\beta_{\text{tracker}} = 0.005$. \subsubsection{System Under Test Model} The SUT is based on the Intelligent Driver Model \cite{PhysRevE621805}. The IDM is designed to stay in one lane and safely follow traffic. To follow the rules around crosswalks, we set the desired velocity at $25$ miles per hour (\SI{11.17}{\meter \per \second}). If no lead vehicle is available to follow, the model maintains a desired velocity. We adapted the IDM for interacting with pedestrians by modifying it to treat the closest pedestrian in the road as the target vehicle. The IDM then tries to follow a safe distance behind the pedestrian based on their relative velocity, which results in the vehicle stopping at the crosswalk since the pedestrian's velocity along the $x$-axis is negligible. Our modified IDM is not a safe model; as we will show, ignoring any pedestrian outside of the road makes the vehicle vulnerable to being blindsided by people moving quickly from the curb. The goal of this paper, however, is to show that AST can effectively induce poor behavior in an autonomous driving algorithm, not to develop a safe algorithm ourselves. The SUT model receives a series of filtered observations $\vect o = [o^{(1)},o^{(2)},\ldots,o^{(n)}]$. If there are pedestrians in the road, the SUT model uses the closest pedestrian to find $\vect s_{\text{SUT}} = [v_{\text{oth}}, s_{\text{headway}}]$ where \begin{itemize} \item $v_{\text{oth}}$ is the relative $x$ velocity between the SUT and the closest pedestrian. \item $s_{\text{headway}}$ is the relative $x$ distance between the SUT and the closest pedestrian. \end{itemize} These factors determine the acceleration of the SUT in the next time step. \subsubsection{Modified Reward Function} As a proxy for the probability of an action, we use the Mahalanobis distance \cite{mahalanobis1936generalised}, which is a measure of distance from the mean generalized for multivariate continuous distributions. The penalty for failing to find a collision is not actually $-\infty$, but instead a very large negative number. In addition, the penalty at the end of a no-collision case includes a component that is scaled by the distance ($\textsc{dist}$) between the pedestrian and the vehicle. The penalty encourages the pedestrian to end early trials closer to the vehicle, and leads to faster convergence. The reward function is modified from the previous version of AST \cite{lee2015adaptive} as follows: \begin{equation} R\left(s\right) = \left\{ \begin{array}{ll} 0 & s \in E \\ -10000 - 1000\times\textsc{dist}\left(\vect p_v,\vect p_p\right) & s \notin E, t\geq T \\ - \log \left(1 + M\left(a, \mu_a\mid s\right)\right) & s \notin E, t < T \end{array} \right. \end{equation} where $ M(a, \mu_a\mid s)$ is the Mahalanobis distance between the action $a$ and the expected action $\mu_a$ given the current state $s$. The distance between the vehicle position $\vect p_v$ and the closest pedestrian position $\vect p_p$ is given by the function $\textsc{dist}(\vect p_v,\vect p_p)$. \subsubsection{Metrics} We use two metrics to evaluate the AST algorithms. The first is the likelihood of the final collision trajectory output by the system. The second metric is the number of calls to the step function. The goal of the second metric is to compare the efficiency of the two AST solvers. The separate implementations render both wall clock time and iterations inappropriate. The simulator update function (\textsc{Step}), which was the computational bottleneck, is used instead. This metric is agnostic to the implementation hardware, the algorithm used, and to the run-time of updating the simulation. \subsubsection{Solvers} For MCTS, the parameters that control how much of the state space is explored are the depth, the horizon $T$, and the number of iterations. The depth and horizon are chosen to be equal so that the search and rollout stages explore the same scenario. We experimented with different values for the horizon $(50,75,100)$, and found that 100 was the minimum horizon that is sufficiently long to cover the scenario of interest. We used 2000 iterations. For additional detail on MCTS and DPW, see the paper by Lee et al. ~\cite{lee2015adaptive}. For DRL, the results shown are obtained using a batch size of 4000. Experimentation showed that reducing the batch size any further resulted in too much variance during the trials. We use a step size of 0.1, and a discount factor of 0.99. The DRL approach is implemented using RLLAB~\cite{duan2016benchmarking}. \section{RESULTS}\label{sec:res} \begin{table*}[htbp] \vspace*{0.25cm} \ra{1.3} \centering \caption{Numerical results from both solvers. Reward without noise shows the reward of the MCTS path if sensor noise was set to zero, to illustrate the difficulty MCTS has with eliminating noise. DRL is able to find a more probable path than MCTS with a large reduction in calls to the \textsc{Step} function.} \label{table:2} \begin{tabularx}{\textwidth}{@{}XXXXcXX@{}} \toprule & \multicolumn{3}{c}{MCTS} & & \multicolumn{2}{c}{DRL} \\ \cmidrule{2-4} \cmidrule{6-7} Scenario & Calls to \textsc{Step} & Reward & Reward w/o noise && Calls to \textsc{Step} & Reward \\ \midrule 1 & \num{4.91e+08} & \num{-131} &\num{-71} && \num{8e+05} &\num{ -62} \\ 2 & \num{1.85e+06} &\num{ -38} & \num{-15} && \num{8e+05} & \num{-1.7} \\ 3 & \num{1.61e+09} &\num{ -161} & \num{-104} && \num{1e+06} & \num{ -52}\\ \bottomrule \end{tabularx} \end{table*} \begin{figure*}[h!] \centering \begin{subfigure}[t]{0.3\textwidth} \scalebox{0.55}{\input{scen11_traj.tex}} \end{subfigure} \begin{subfigure}[t]{0.3\textwidth} \scalebox{0.55}{\input{scen12_traj.tex}} \end{subfigure} \begin{subfigure}[t]{0.3\textwidth} \scalebox{0.55}{\input{scen13_traj.tex}} \end{subfigure}\\ \begin{subfigure}[t]{0.3\textwidth} \scalebox{0.55}{\input{scen21_traj.tex}} \caption{Scenario 1} \end{subfigure} \begin{subfigure}[t]{0.3\textwidth} \scalebox{0.55}{\input{scen22_traj.tex}} \caption{Scenario 2} \end{subfigure} \begin{subfigure}[t]{0.3\textwidth} \scalebox{0.55}{\input{scen23_traj.tex}} \caption{Scenario 3} \end{subfigure} \caption{Pedestrian motion trajectories for each scenario and algorithm. The collision point is the point of contact between the vehicle and the pedestrian. In scenario 3, pedestrian 1 does not collide with the vehicle.} \label{fig:Traj} \end{figure*} The results show that both solvers are able to identify failure trajectories in an autonomous vehicle scenario. MCTS and DRL produce several situations where the vehicle collides with the pedestrian. \Cref{table:2} shows the results for the three different scenarios. Both methods successfully converge to a solution in a tractable amount of simulator steps. AST is able to take advantage of the modified IDM's decision to ignore any pedestrian that is not in the road to find collisions. Although the likelihoods seem to vary greatly, much of this difference is due to MCTS having non-zero noise that adds up over the long horizon. The likelihood of pedestrian motion dominates that of sensor noise. As such, the noise should be very sparse, and the DRL solution reflects this. MCTS, however, has difficulty driving the noise to true zero. Instead, there are very small numbers in the noise vector throughout that can accumulate to a large probability error. We recomputed the reward as if the noise was 0 as a reference, which is also shown in \Cref{table:2}. \subsection{Performance} The number of calls to \textsc{Step} for MCTS is the number of calls required to find a collision in the rollouts. The algorithm itself does not commit to the actions that cause the collision until later. The number is provided to highlight the computational ability of the algorithm to find a collision, not the termination time. In addition, the number of calls presented for MCTS is the average over 100 single runs multiplied by 100 to represent the number of calls needed to have confidence in the results. Across all scenarios, DRL consistently requires orders of magnitude fewer calls to \textsc{Step} than does MCTS. DRL converges to solutions with less than 1\% of the number of calls to \textsc{Step} required by MCTS despite the state and action spaces being very small. Theoretically, the scalability advantages of DRL should be even more apparent in a higher-dimensional problem. This advantage is supported by the fact that MCTS performs worse on the dual pedestrian scenario relative to both single pedestrian scenarios. \subsection{Trajectories} \Cref{fig:Traj} shows the pedestrian paths until the collision from each solver for scenarios 1, 2, and 3, respectively. The vehicle collides with the pedestrian at the collision point. In scenario 1, both solvers send a single pedestrian into the road, and have the pedestrian move towards the vehicle to create a collision. However, the turn towards the vehicle is much more pronounced in MCTS, where the pedestrian comes to a near stop, before angling hard left and into the vehicle. DRL instead settles on a smoother path. The DRL path is slightly more likely because there is less acceleration needed. Scenario 2 has similar paths from the solvers. The pedestrians start at a point from which their mean action should create a collision. Both solvers identify this path quickly and the pedestrians take very little action. Both scenarios are relevant to scenario 3, which presents the largest difference. Because pedestrian 2 starts farther away from the vehicle, it has the more likely path to being hit by the vehicle as in scenario 2. In both solvers, the second pedestrian takes actions similar to scenario 1. However, there is a large difference in the first pedestrian. In MCTS, the pedestrian holds course for a bit before aggressively accelerating towards the other side of the road. In DRL, the first pedestrian takes a slight turn to the right, and then holds a constant path from there. MCTS has less ability to minimize the effect of the first pedestrian on the total reward since using a single seed results in coupling the actions of the pedestrians. Hence, the first pedestrian has a different and less optimal trajectory than its counterpart in DRL. In DRL, the first pedestrian had a change of direction at first, causing the second pedestrian to be closer to the vehicle. Then the first pedestrian maintained a course with very little acceleration, minimizing the pedestrian's effect on the reward. In scenarios 1 and 3, the blame of the collision is on the pedestrian, which does not inform any modifications to the SUT. However, in scenario 2, the blame is on the vehicle, since it does not check for pedestrians approaching the crosswalk until the pedestrians are in the crosswalk, which gives very short response time for the vehicle. The suggestion for avoiding a collision like scenario 2 is to expand the sensing range of the IDM to go beyond the curb of the road. The reason AST returns situations where the blame is not on the vehicle is that we define the subset of state space that we are interested in $E$ to be any collision. The kind of collisions reported by the examples shown in scenario 1 and 3 do not give the designer of the SUT any insight on how the SUT should be improved. The solution is to redefine the space of events of interest $E$ to be the subset of collisions where the responsibility of the collision was on the SUT. The definition of $E$ requires formal models of responsibility and blame in various road situations~\cite{mobileye}. Incorporating these models in the AST framework is an area of future work. \section{CONCLUSIONS}\label{sec:conc} This paper extended the adaptive stress testing methodology used before to test an aircraft collision avoidance system to autonomous vehicles. In addition, this paper introduced how to use deep reinforcement learning to improve the efficiency of adaptive stress testing. Deep reinforcement learning can find more-likely failure scenarios than Monte Carlo tree search, and it finds them more efficiently. Another contribution of this paper is a testing framework for autonomous vehicles that has modular components. By adapting one of the approaches, any manufacturer who wishes to test the sensor or decision system of a vehicle in simulation can use this framework. Further work will involve incorporating more realistic sensor and pedestrian models and imposing a tighter constraint on the definition of the events of interest. \section*{Acknowledgements} The authors would like to express their gratitude towards Tim Wheeler for his helpful comments and his assistance in using the Automotive Driving Models simulator, which this work is built on. \bibliographystyle{IEEEtran}
\section{Introduction}\label{sec:introduction}} \subsection{Background} \IEEEPARstart{S}{cheduling} and resource management are important but challenge tasks for parallel processing systems. A major problem in scheduling is to decide the fraction of load for each processor to minimize the overall finishing time (i.e makespan). Such scheduling should be made under a consideration of network topology, load distribution manner, number of processors, processor's processing and link's communication speeds, etc. In this paper we will focus on the sequential distribution policy, where the load can be distributed to one processor at a time. Under such an assumption, the load distribution sequencing emerges as a crucial key to shorten the finishing time in heterogeneous system, where different processor has different computation/communication speed. \\ There are many ways to classify load sharing problems. One of them is to model the type of load as either indivisible or divisible. The indivisible load can not be partitioned and usually assigned to a single processor. However in modern data-intensive computing system, it is common to encounter large amount of similar data units, such as image processing, signal processing and so on [1,2]. Such load can be divided into parts of arbitrary sizes and processed in parallel. Scheduling for such data units can be solved efficiently by Divisible Load Theory (DLT).\\ The DLT was first studied by Cheng and Robertazzi in [3] and Agrawal and Jagadish in [23]. Since then, DLT has been utilized in various scheduling problems. For the sequential load distribution policy studied in this paper, DLT usually assumes that there is one or more control processors which hold the load at beginning. There are multiple worker processors which receive load from the control processor(s). The load distribution sequence is predefined and the control processor(s) transfers the load to worker processors one by one. The load amount for each processor is calculated from the optimality principle [4,5] that all the processors should finish processing at the same time. Our problem is to find the optimal predefined load distribution sequence to achieve the minimum finishing time.\\ \subsection{Optimal Sequencing in Resource-sharing System} The optimal sequencing problem under the DLT framework has been studied in various papers. Optimal load distribution sequencing for heterogeneous system was studied in [6], where multi-round scheduling was taken into consideration. In [7], the optimal sequencing problem is studied in a single-level tree network with communication delays. Also, distribution sequencing of divisible load jobs with communication start-up costs is studied in [8]. In [8], a wide range of interconnection architectures of distributed computer systems is taken into consideration: a chain, a loop, a tree, a star of processors, a set of processors using shared buses and a hypercube of processors. Finally, optimal load distribution sequences for multi-level tree networks was studied in [9].\\ These previous works assume that the system is exclusively occupied by the divisible load job of interest, which indicates that the processor's full communication and computation power are entirely devoted to the divisible load job. However, such an assumption may not be true in the modern resource-sharing systems, where one processor can both communicate with multiple networks and process multiple jobs. Such resource-sharing technique and multi-tasking processors are commonly encountered in virtualized networks [10-12]. As a result, the extra communication and background jobs will take up system's communication and computation resources. The processor's processing and communication speeds for the divisible load job of our interest will be time-varying according the number of background jobs and extra communication links in the system.\\ \subsection{Our Contribution} This paper studied an optimal load distribution sequencing problem in resource-sharing systems. A single level tree network with heterogeneous channel is used as the network model in our system. A control processor holds the load at first. The load is then distributed to the worker processors in sequence. The communication and computation speeds of all processors are time-varying in our system due to virtualization. There is a hypervisor which is in charge of sharing the resources of the physical processor to the multiple virtual processors, as shown in Fig. \ref{fig:vir}.\\ \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{vir.png} \caption{Processor virtualization} \label{fig:vir} \end{figure} Since the system is time-varying according to the randomly arrived background jobs, it is impossible to find an analytical solution for the optimal sequence. Instead, we perform a reinforcement learning method, multi-armed bandit (MAB), to train the system for the optimal sequencing. The MAB algorithm balances the explore and exploitation to minimize the regret. Such an algorithm is effective for rapid experimentation because it concentrates testing on actions that have the greatest potential power [13]. The empirical performance is good for MAB algorithms [14] and they are easy to apply. For each time a new divisible load job arrives at the control processor, MAB will help the user select a load distribution sequence. The system will learn the optimal sequence step by step. Thompson sampling (TS) is used in our MAB algorithm, which is a randomized Bayesian algorithm. The details will be discussed in section 3. \subsection{Organization} The rest of this paper is organized as follows. We begin with time-varying scheduling preliminaries in Section 2. Next a reinforcement learning algorithm for optimal sequencing is introduced in Section 3. We first introduce the basic TS based MAB algorithm, then several optimization were studied for a better space and time complexity. The numerical test is in Section 4 and the conclusion is in Section 5.\\ The following notations are used in this paper: \begin{enumerate} [leftmargin=1em,align=left] \item[$\kappa_{i}$] The partition of the entire divisible load that is assigned to processor $i$. \item[$\omega_{i}$] Inverse of processing speed of $ith$ processor when there is only one job. \item[$\omega_{i}(t)$] Inverse of time-varying processing speed of $ith$ processor applied to the divisible job at interest. \item[$\bar{\omega}_{i}$] Equivalent constant value of $\omega_{i}(t)$ during the processing time. \item[$T_{cp}$] Time to process the entire load when $\omega_{i} = 1$ for the $ith$ processor. \item[$z_i$] Inverse of channel speed when control processor is only communicating with $ith$ processor. \item[$z_{i}(t)$] Inverse of time-varying channel speed applied to the divisible job at interest. \item[$\bar{z}_{i}$] Equivalent constant value of $z_{i}(t)$ when the control processor is communicating with the $ith$ worker processor \item[$Beta(\alpha,\beta)$] Beta distribution with parameter $\alpha,\beta$. \item[$T_{cm}$] Time to transmit the entire load when $z = 1$. \item[$T_{f}$] The finishing time of processing the entire load. \end{enumerate} \section{Preliminaries} The scheduling problem in resource-sharing system has been studied in [15] and [16]. In this section, we briefly introduce the problem formulation and solutions. This will be utilized in the later sections where we train the load distribution sequence.\\ Consider a single level tree network with N+1 nodes in Fig. \ref{fig:singleleveltree}. \begin{figure}[h!] \centering \begin{tikzpicture} [processor/.style = {circle,draw,inner sep=0pt,minimum size=6mm}] \node[processor] (p0) at (0,1.5) {$P_{0}$}; \node[processor] (p1) at (-1.5,-0.5) {$P_{1}$}; \node[processor] (p2) at (-0.2,-0.5) {$P_{2}$}; \node[processor] (p3) at (1.5,-0.5) {$P_{N}$}; \draw [->] (p0) to (p1); \draw [->] (p0) to (p2); \draw [->] (p0) to (p3); \filldraw [black] (0.5,-0.5) circle [radius=0.5pt]; \filldraw [black] (0.6,-0.5) circle [radius=0.5pt]; \filldraw [black] (0.7,-0.5) circle [radius=0.5pt]; \end{tikzpicture} \caption{Single level tree network} \label{fig:singleleveltree} \end{figure} The divisible load originally arrived at the control processor $P_{0}$. The control processor will divide the load into N+1 parts, which will be assigned to each processor in the system respectively. In this paper, it is assumed that the control processor can only communicate with one processor at a time. Due to the resource-sharing and virtualization, the processors' processing speed and communication speed are time-varying. According to the optimality principle [4,5], all processors should finish processing at the same moment. The system timing diagram is shown in Fig. \ref{fig:case2time}.\\ \begin{figure}[h!] \centering \begin{tikzpicture} \draw[->] (-4.5,3) -- (3.5,3); \draw (-4.5,1.8) -- (-4.5,4.4); \draw (-4.8,3) node {$P_{0}$}; \draw (-4.5,3.5) -- (-4,3.5); \draw (-4,3.5) -- (-4,3.8); \draw (-4,3.8) -- (-2,3.8); \draw (-2,3.8) -- (-2,4.1); \draw (-2,4.1) -- (-0.5,4.1); \draw (-0.5,4.1) -- (-0.5,3.8); \draw (-0.5,3.8) -- (1.4,3.8); \draw (1.4,3.8) -- (1.4,3); \draw (-2.8,3.8) -- (-2.8,3) \draw (-3.6,3.25) node {$\kappa_{1}\bar{z_{1}}T_{cm}$}; \draw (-1.1,4.1) -- (-1.1,3) \draw (-1.9,3.25) node {$\kappa_{2}\bar{z}_{2}T_{cm}$}; \draw (-0.3,3.8) -- (-0.3,3) \draw (0.6,3.25) node {$\kappa_{N}\bar{z}_{N}T_{cm}$}; \draw[dashed] (-4.5,3.8) -- (-4,3.8); \draw[dashed] (-4.5,4.1) -- (-2,4.1); \draw (-4.8,3.5) node {$z_1$}; \draw (-5.0,3.9) node {$z_1^h(2)$}; \draw (-5.0,4.3) node {$z_2^h(3)$}; \filldraw [black] (-0.8,3.25) circle [radius=0.5pt]; \filldraw [black] (-0.7,3.25) circle [radius=0.5pt]; \filldraw [black] (-0.6,3.25) circle [radius=0.5pt]; \draw (-4.5,2.5) -- (-3.5,2.5); \draw (-3.5,2.5) -- (-3.5,2); \draw (-3.5,2) -- (-2.6,2); \draw (-2.6,2) -- (-2.6,2.5); \draw (-2.6,2.5) -- (-2,2.5); \draw (-2,2.5) -- (-2,2); \draw (-2,2) -- (1,2); \draw (1,2) -- (1,2.5); \draw (1,2.5) -- (2,2.5); \draw (2,2.5) -- (2,2); \draw (2,2) -- (3,2); \draw (3,2) -- (3,3); \draw[dashed] (-4.5,2) -- (-3.5,2); \draw (-4.8,2.5) node {$\omega_{0}$}; \draw (-5.0,2) node {$\omega_{0}^h(2)$}; \draw (-0.5,2.55) node {$\kappa_{0}\bar{\omega}_{0}T_{cp}$}; \draw[->] (-4.5,1.2) -- (3.5,1.2); \draw (-4.5,0) -- (-4.5,1.5); \draw (-4.8,1.2) node {$P_{1}$}; \draw (-2.8,1.2) -- (-2.8,0.7); \draw (-2.8,0.7) -- (-1.6,0.7); \draw (-1.6,0.7) -- (-1.6,0.2); \draw (-1.6,0.2) -- (1,0.2); \draw (1,0.2) -- (1,0.7); \draw (1,0.7) -- (3,0.7); \draw (3,0.7) -- (3,1.2); \draw[dashed] (-4.5,0.7) -- (-2.8,0.7); \draw[dashed] (-4.5,0.2) -- (-1.6,0.2); \draw (-4.8,0.7) node {$\omega_{1}$}; \draw (-5.0,0.2) node {$\omega_{1}^h(2)$}; \draw (-0.4,0.75) node {$\kappa_{1}\bar{\omega}_{1}T_{cp}$}; \draw[dashed] (-2.8,3) -- (-2.8,1.2); \draw (-3,1.4) node {$T_{1}$}; \draw[->] (-4.5,-0.6) -- (3.5,-0.6); \draw (-4.5,-1.8) -- (-4.5,-0.3); \draw (-4.8,-0.6) node {$P_{2}$}; \draw (-1.1,-0.6) -- (-1.1,-1.6); \draw (-1.1,-1.6) -- (1.6,-1.6); \draw (1.6,-1.6) -- (1.6,-1.1); \draw (1.6,-1.1) -- (3,-1.1); \draw (3,-1.1) -- (3,-0.6); \draw[dashed] (-4.5,-1.6) -- (-1.1,-1.6); \draw[dashed] (-4.5,-1.1) -- (-1.1,-1.1); \draw (-4.8,-1.1) node {$\omega_{2}$}; \draw (-5.0,-1.6) node {$\omega_{2}^h(2)$}; \draw (0.5,-1.05) node {$\kappa_{2}\bar{\omega}_{2}T_{cp}$}; \draw[dashed] (-1.1,3) -- (-1.1,1.2); \draw[dashed] (-1.1,0.2) -- (-1.1,-0.6); \draw (-1.3,-0.4)node {$T_{2}$}; \filldraw [black] (-3.2,-2.0) circle [radius=0.5pt]; \filldraw [black] (-3.2,-2.2) circle [radius=0.5pt]; \filldraw [black] (-3.2,-2.4) circle [radius=0.5pt]; \draw[->] (-4.5,-2.9) -- (3.5,-2.9); \draw (-4.5,-3.9) -- (-4.5,-2.6); \draw (-4.8,-2.9) node {$P_{N}$}; \draw (1.4,-2.9) rectangle (3,-3.4); \draw[dashed] (-4.5,-3.4) -- (1.4,-3.4); \draw (-4.8,-3.4) node {$\omega_{N}$}; \draw (2.2,-3.15) node {$\kappa_{N}\bar{\omega}_{N}T_{cp}$}; \draw[dashed] (1.4,2.5) -- (1.4,1.2); \draw[dashed] (1.4,0.7) -- (1.4,-0.6); \draw[dashed] (1.4,-1.6) -- (1.4,-2.9); \draw(1.2,-2.7)node {$T_{N}$}; \draw[dashed] (3,2.5) -- (3,1.2); \draw[dashed] (3,0.7) -- (3,-0.6); \draw[dashed] (3,-1.1) -- (3,-2.9); \draw(3,3.2)node {$T_{f}$}; \end{tikzpicture} \caption{Timing diagram for single level tree network with time-varying channel speed and computing speed } \label{fig:case2time} \end{figure} In Fig. \ref{fig:case2time} $z_i^h(k)$ and $\omega_i^h(k)$ represents the inverse of communication and computation speed of $i$th processor when there is $k-1$ background jobs in it. The superscript $h$ means that it is controlled by the hypervisor. Steps are used to represent the arrival and departure of the background jobs, and the value of $\omega(t)$ and $z(t)$ are noted on the vertical axis. The communication is above the time axis and the computation is below the time axis. One can find that all processors finish processing at the same time $T_f$. The equivalent constant value of the time-varying inverse communication and computation speed from $T_m$ to $T_n$ for processor $i$ is calculated by: \begin{subequations} \begin{align} \bar{\omega}_{i} = \frac{T_{n} - T_{m}}{\int_{T_{m}}^{T_{n}} \frac{1}{\omega_{i}(t)}dt}\\ \bar{z}_{i} = \frac{T_{n} - T_{m}}{\int_{T_{m}}^{T_{n}} \frac{1}{z_i(t)}dt} \end{align} \end{subequations} Both a recursive algorithm and a simulation-based algorithm are introduced in [16] to solve the scheduling problem under different situations. \section{Problem Formulation} \subsection{Problem Setting} The optimal sequencing problem can be defined as the selection of a sequence of load distribution in order to achieve the minimum finishing time (makespan). For each arrived divisible load job, the algorithm informs the user which sequence of load distribution should be selected to achieve lower finishing time. For time-invariant case, it has been proved [17] that the order of distributing load resulting in the shortest schedule is the order of nondecreasing inverse of communication speeds ($z_1 \leq z_2 \leq ... \leq z_N$). However, in the situation of resource-sharing and virtualization, one channel may be shared by multiple jobs, and the number of jobs is varying with time, which makes the channel speed time-varying. In such scenario, the optimal load distribution sequencing cannot be directly achieved.\\ A stochastic multi-armed bandit (MAB) algorithm is implemented to deal with the problem. Here we will briefly introduce the MAB framework [18]. We are given a slot machine with $N$ arms. For each time step t, one of the arms will be selected to be played and a reward will be observed. The reward is assumed to be a random value obtained from some fixed distribution. The random rewards are i.i.d for a specific arm along the time axis. The MAB algorithm will decide which arm to play at each time step t to achieve the maximum reward.\\ The optimal sequencing problem is now combined with a stochastic MAB framework. It is assumed that there are $N$ worker processors, thus there are totally $K = N!$ combinations of load distribution sequence, which is defined as $S_1, S_2,...,S_K$. In this case, it is noted as there are $N!$ arms. The algorithm proceeds in trials t = 1, 2, ..., T, where each trial represents an incoming divisible load job. On trial t, a sequence $S_t$ is selected and a schedule is made by the method described in the previous section. Such schedule is implemented to process the divisible load job arrived at trial t and finishing time $T_f(S_t,t)$ is observed. For a certain sequence $S_i$, its corresponding $T_f(S_i)$ can be modeled as a random variable as the reward in MAB framework. Let $S^{\star}(t)$ denote the optimal sequence at time t such that: \begin{align} S^{\star}(t) = \argmin_i E[T_f(S_i, t)] \end{align} So the objective of our algorithm is to minimize the cumulative regret for not selecting the optimal sequence over T trials: \begin{align*} & \text{minimize} & & \text{regret}\\ & \text{subject to} & & \text{regret} = \sum_{t=1}^{T} E[T_f(S(t), t)] - E[T_f(S^{\star}(t), t)] \end{align*} From now on, arms and sequences will be used exchangeable. \subsection{Thompson Sampling Based Multi-armed Bandit Algorithm} Thompson sampling (TS) [19] is a common algorithm that addresses the exploration-exploitation dilemma in the multi-armed bandit problem. The selection is based on the Bayesian posterior distribution of the reward for each arm. The Bernoulli bandit problem is well studied [20], where the rewards are either 0 or 1. Furthermore, [18] introduced a method to map the reward in range $[0,1]$. \\ For Bernoulli bandits, TS often uses a Beta distribution to model the Bernoulli means. For a certain arm $i$, the reward is a Bernoulli random variable with mean $\mu_i$. The $\mu_i$ is assumed to be a random variable with a Beta($\alpha$, $\beta$) distribution. The Beta distribution turns out to be a convenient choice for updating the posterior distribution for Bernoulli trials. Here the details of updating the posterior distribution will be discussed.\\ For a certain arm i, the reward $R_i$ follows a Bernoulli distribution with mean $\mu_i$. The mean $\mu_i$ is also the probability that $R_i = 1$. The $\mu_i$ has a prior distribution $f(\mu_i) \sim Beta(\alpha_i, \beta_i)$. Now let's assume that one trial is performed at arm i and the reward is $R_t$. So the posterior distribution of $\mu_i$ given observed $R_t$ can be written as: \begin{align*} f(\mu_i|R_t) = \frac{f(R_t|\mu_i)f(\mu_i)}{\int f(R_t|\mu_i)f(\mu_i)d\mu_i} \end{align*} Given $R_t$ is a Bernoulli random variable, the probability density function of $R_t$ given $\mu_i$ can be written as: \begin{align*} f(R_t|\mu_i) = \mu_i^{R_t}(1-\mu_i)^{1-R_t} \end{align*} The posterior distribution of $\mu_i$ can be further deduced as: \begin{align*} f(\mu_i|R_t) &= \frac{\frac{\Gamma(\alpha_i + \beta_i)}{\Gamma(\alpha_i)\Gamma(\beta_i)}\mu_i^{\alpha_i-1 + R_t}(1-\mu_i)^{\beta_i - R_t}}{\int_{0}^{1}\frac{\Gamma(\alpha_i + \beta_i)}{\Gamma(\alpha_i)\Gamma(\beta_i)}\mu_i^{\alpha_i-1 + R_t}(1-\mu_i)^{\beta_i - R_t}d\mu_i}\\ &= \frac{\frac{\Gamma(\alpha_i + \beta_i)}{\Gamma(\alpha_i)\Gamma(\beta_i)}\mu_i^{\alpha_i-1 + R_t}(1-\mu_i)^{\beta_i - R_t}}{\frac{\Gamma(\alpha_i + \beta_i)}{\Gamma(\alpha_i)\Gamma(\beta_i)}\frac{\Gamma(\alpha_i+R_t)\Gamma(\beta_i - R_t + 1)}{\Gamma(\alpha_i+\beta_i+1)}}\\ &= \frac{\Gamma(\alpha_i+\beta_i+1)}{\Gamma(\alpha_i+R_t)\Gamma(\beta_i - R_t + 1)}\mu_i^{\alpha_i-1 + R_t}(1-\mu_i)^{\beta_i - R_t} \end{align*} which is also a Beta distribution with parameters $\tilde{\alpha_i} = \alpha_i+R_t \ and \ \tilde{\beta_i} = \beta_i - R_t + 1$. Since the reward $R_t$ can only be 0 or 1, so when updating the posterior distribution, it is simply done by adding $\alpha$ or $\beta$ with one depending on whether the Bernoulli trial deliver a 1 or 0. With higher $\alpha$, $\beta$, the Beta random variable is more concentrated around the mean.\\ In order to map the finishing time to a interval between 0 and 1, an upper bound of the finishing time $T_f^{max}(t)$ is obtained for each time step $t$. Such an upper bound can be the estimation of sequential processing time with a single processor. With $T_f^{max}(t)$, the parallel processing time can be mapped into an interval of $[0,1]$. In this way, each arm's finishing time $T_f(S_i)$ is modeled as a Beta distribution of parameter $\alpha_i$ and $\beta_i$. Then the Bernoulli TS algorithm can be modified to fit our situation. The details is described in Algorithm I.\\ \begin{algorithm} \begin{algorithmic}[1] \State For each arm $S_i$, i = 1, 2, ..., $N!$, set $\alpha_{S_i} = 0$, $\beta_{S_i} = 0$ \For {t = 1,2,3,..} \State Find the $T_f^{max}(t)$ based on the estimate of sequential processing time with a single processor. \State For each arm $S_i$, i = 1, 2, ..., $N!$, sample $T_f(S_i, t)$ from Beta($\alpha_{S_i}$, $\beta_{S_i}$) distribution. \State Select the arm $S(t) = \argmin_i T_f(S_i, t)$. \State Perform the scheduling based on the selected arm (sequence) and observe the real finishing time $T_f(t)$. \State Set $\tilde{T_f(t)} = T_f(t) / T_f^{max}(t)$. \State Perform a Bernoulli trial with success probability $\tilde{T_f(t)}$ and observe output $r_t$. \State If $r_t = 1, \alpha_{S(t)} = \alpha_{S(t)} + 1$, else $\beta_{S(t))} = \beta_{S(t)} + 1$ \EndFor \end{algorithmic} \caption{Thompson sampling for optimal load distribution sequencing} \end{algorithm} The TS algorithm has a good property of balance in exploration-exploitation. For exploitation, every time step the algorithm tends to pick the arm with minimum expectation of finishing time. For exploration, instead of simply using the mean as the selection criterion, a random sample is drawn from the distribution, which makes it possible that the arms with higher mean are still able to be selected, in a low probability. The algorithm I is proved [18] to have a upper bound regret of $O((\sum_{i=2}^{N} \frac{1}{\mu_i - \mu_1})^2 lnT)$ in time $T$, where the first arm is assumed to be the optimal arm without loss of generality. \section{Algorithm Optimization} The idea of Algorithm I is straightforward: sample the estimated finishing time from the prior distribution of each arm, pick the smallest one each time step. This method works well for the compact system where the number of processors is not very large. For the large systems with 10 processors or more, Algorithm I turns out to be inefficient. Due to the fact that Algorithm I needs to store the distribution parameter for each arm, the space complexity is $O(N!)$. Also, the arm selection step is $O(N!)$ time complexity since every arm could be visited. Such complexity makes scaling a very significant problem for Algorithm I when the system size is large.\\ To deal with the space and time complexity problem, two solutions are provided here. To reduce the space complexity, we redesign the representation of the load distribution. Thus the parameter space can be significantly condensed. For time complexity, two alternative searching algorithms are introduced, which are trade-offs between global optimality and time complexity. \subsection{Parameter Space Reformulation} In this section the parameter space is reformulated with a novel representation of the load sequence. Assume there are $N$ processors, indexed from $1$ to $N$, respectively. The sequence vector $S_V$ is defined as: \begin{align} S_V = [sv_1^T, sv_2^T, ... , sv_N^T]^T \end{align} where $sv_i, i = 1,2,...N$ are all $N \times 1$ vectors and thus $S_V$ is a $N^2 \times 1$ vector. Each subvector $sv_i$ represents the identity of $i$th receiving load processor. The subvector $sv_i$ has only one entry which equals to one, while the other entries are all equal to zero. For example, if the $j$th entry of $sv_i$ equals to one, this represents that the $i$th processor to receive the load from the control processor is the processor with the index $j$. Such design allows efficient and concise representation of the load distribution sequence. By this definition, the sequence vector of $S_i$ will be represented as $S_v(S_i)$.\\ Now, instead of assigning parameters for each sequence, weights are assigned for all entries of sequence vector $S_V$. The weight vector is thus defined as: \begin{align} W = [w_1, w_2, ... , w_{N^2}]^T \end{align} Here, vector $W$ shares exactly same length as vector $S_V$ and each entry of $W$ corresponds to each entry of $S_V$. Each entry $w_i$ in W vector is a random variable which follows Beta($\alpha_i$, $\beta_i$). For each time step $t$, $W(t)$ is sampled from its prior distribution. Instead of simply estimating the finishing time, we calculate the score for each sequence $S_v(S_i)$, which is defined as: \begin{align} Score(S_V(S_i), t) = S_V(S_i)^TW(t), \quad i = 1, 2, ..., N! \end{align} By adopting the score as the updating criteria in the algorithm, the Algorithm I can be modified as Algorithm II.\\ \begin{algorithm} \begin{algorithmic}[1] \State For each entry $w_i$ of $W$, set $\alpha_i = 0$, $\beta_i = 0$ \For {t = 1,2,3,..} \State Find the $T_f^{max}(t)$ based on the estimate of sequential processing time with a single processor. \State Sample $W(t)$ from prior Beta($\alpha$, $\beta$) distribution. \State Select the arm $S(t) = \argmin_i S_V(S_i)^TW(t)$. \State Perform the scheduling based on the selected arm (sequence) and observe the real finishing time $T_f(t)$. \State Set $\tilde{T_f(t)} = T_f(t) / T_f^{max}(t)$. \State Perform a Bernoulli trial with success probability $\tilde{T_f(t)}$ and observe output $r_t$. \For {i = 1,2,3,...$N^2$} \State If $r_t = 1, \alpha_i = \alpha_i + S_V(S(t))[i] $, else $\beta_i = \beta_i + S_V(S(t))[i]$, where $S_V(S(t))[i]$ is the $i$th entry in $S_V(S(t))$ \EndFor \EndFor \State The optimal sequence $S^{\star} = \argmin_i S_V(S_i)^TW(t)$. \end{algorithmic} \caption{Thompson sampling for optimal load distribution sequencing} \end{algorithm} It is important that when updating W's the posterior distribution, only the entries which were used in the sequence vector $S_V(S(t))$ are updated. So we have to change the weight only if the corresponding position is valid, as can be found at step 10 in Algorithm II: the $\alpha$ and $\beta$ are only updated if it is 1 for the $i$th entry in $S_V(S(t))[i]$. The score is designed to be positive correlated to the finishing time. Such relationship can be found when updating the posterior distribution of the $W$ vector. For example when $r_t = 1$, algorithm increases $\alpha$ values of the entries of $W$ vector. Such positive incentive indicates an increase of $T_f(S(t))$ and may also results in an increase of the score for $S(t)$ in the next time step, which makes it less possible to be selected.\\ By such parameter space reformulation, the space complexity is now $O(N^2)$, which is a impressive improvement from $O(N!)$. However, the time complexity still remains $O(N!)$ since every sequence will be traversed to find the one with minimum score. \subsection{Time complexity optimization} In this section two approximation algorithms are introduced to relax the time complexity problem. \subsubsection{Hill Climbing Algorithm for Searching} Instead of an exhaustive search of all arms to find the global minimum score, an alternative searching algorithm is performed to find the local optimum. Hill climbing optimization [21] is a mathematical optimization technique which attempts to find a better solution by changing a single element at a step of an random initialized solution, i.e. climbing the hill. Such optimization technique may result in a local optimum, but can be more efficient than the exhaustive searching.\\ To combine the hill climbing optimization with Algorithm II, we initialize the solution with an random arm $S_0$ and perform a hill climbing process. For each step, a subvector $sv_j$ is randomly picked to optimize, which corresponds to the $j$th position to receive load. By swapping the subvector $sv_j$ with all subvectors $sv_i, i = 1,2,...N$, the suboptimal arm can be found which will produce a minimum score. This is equivalent to swap the position of two processor in the system. We repeat this step $m$ times, where $m$ is a predefined iteration parameter. The searching can also be terminated before $m$ iterations if none of the subvectors is eligible to be optimized. In order to deal with the local optimum problem, the algorithm is performed from $K$ random start sequences instead of a single one. The details of hill climbing algorithm is described in Algorithm III.\\ \begin{algorithm} \begin{algorithmic}[1] \Require $W(t)$-weight for each position \For {i = 1,2,3,..,K} \State Pick a sequence $S_i(0)$ randomly as the initialization. \For {j = 1,2,3,..,m} \State Randomly pick a position $p_j$ to optimize. \State Swap all processor with processor at position $p_j$, find the one $\tilde{S}_i(j-1)$ that minimize $S_V(\tilde{S}_i(j-1))^TW(t)$ \State $S_i(j) =\tilde{S}_i(j-1)$ \EndFor \EndFor \State $S^\star = \argmin_i S_V(S_i(m))^TW(t)$\\ \Return $S^\star$ \end{algorithmic} \caption{Hill climbing algorithm for searching} \end{algorithm} A new TS algorithm can be achieved by replacing the step 5 in Algorithm II by Algorithm III. Since the swapping step in Algorithm III takes $O(N)$ time, the new TS algorithm only has a $O(KmN)$ time complexity, compared with the previous $O(N!)$ time complexity for exhaustive search.\\ \subsubsection{Batch Optimization} The previous hill climbing algorithm reduced the time complexity from $O(N!)$ to $O(KmN)$. Such an improvement can be efficient sometimes, but for very large systems, the parameter $m$ and $N$ should be set large in order to avoid the local optimum problem, which will make the $O(KmN)$ time complexity also slow. Under such circumstance, pre-precessing to find the optimal sequence may cost too much time and thus impede the real divisible load processing.\\ For a very large system, adding one more processor at the end of all other processors won't affect the finishing time too much, even if that processor is a very fast processor [22]. This fact that the sequence of the processors at the front have higher influence on the finishing time than the ones at the end provides the intuition that if the front processors' sequences can be first processed. Under such intuition, a concept of batch optimization is introduced here. \\ To perform the batch optimization, a batch number is set as $b_n$, which means how much batch is utilized. Then the processors are randomly divided into $b_n$ groups, the processors within each group are randomly sequenced. Each of these groups is called a "batch". Now, instead of finding the sequence of all processors, we find the sequence of the batches. Because the processors' sequence inside each batch is predefined by random choice, the optimal sequence of batches can be trained by Algorithm II. After the optimal batch sequence is trained, we start to train the processors' sequence inside each batch. Since the sequence of the processors at the front have higher impact than the the ones at the end, the batches are trained in a sqeuence from the first to the last. Such a training policy allows maximum utilization of training samples. If the number of processors inside of each batch is still too large, we divide them into batches and train the sequence of batches. Such an operation can be performed recursively until all the batches finish training. A detailed algorithm is described in Algorithm IV\\ \begin{algorithm} \begin{algorithmic}[1] \Require $b_n$-batch number, $b_s$-maximum number of processors that do not need to be divided into batches \If {processor number $\leq$ $b_s$} \State call Algorithm II for training the sequences of all processors \Else \State divide the processors into $b_n$ batches, call Algorithm II for training the sequences of all $b_n$ batches \For {each batch} \State repeat from step 1 \EndFor \EndIf \end{algorithmic} \caption{Batch optimization} \end{algorithm} The batch optimization's time complexity for one trial is $O(max(b_n!, b_s!))$, which can be very small if the $b_n, b_s$ are not set to be large. Compared with hill climbing algorithm, batch optimization is time-efficient for one trail, but may need more samples to train. Also, since the processors are randomly selected for each batch, it is possible that the batch optimization never reaches the global optimum. Note that if the number of processors is divisible by the batch number, the remainder will be evenly shared by the front batches. The number of processors inside each batch is not required to be exactly the same. \section{Numerical Test} In this section numerical tests are performed to evaluate our algorithms. In order to have a clear vision of the regret, the algorithms are first tested on the time-invariant cases, where the optimal arm is known beforehand. The exhaustive search and hill climbing are also compared in a compact system where the number of processors is less than 5. Finally, a general case is analyzed where the system is time-varying and relatively large. \subsection{Time-invariant Case} In this section, a time-invariant system is used to evaluate our algorithms. The finish time of each sequence can be explicitly calculated when the system is time-invariant. The time-varying case will be analyzed in the next section. \subsubsection{General Performance Analysis} Assume there are one control processor and four worker processors. As a result, there are totally $4! = 24$ load distribution sequences. In this case it is assumed that the control processor does not process data. The inverse of the processing speeds for four worker processors are set to be $\omega_1 = 1, \omega_2 = 2, \omega_3 = 9, \omega_4 = 16$ and the inverse of communication speed $z_i$ is set equal to $\omega_i$. To ensure that the fact that the communication is usually faster than the computation, we set the $T_{cm} = 1$ and $T_{cp} = 4$. The finishing time for each sequence is shown in Fig. \ref{fig:1-1}.\\ \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{1-1.jpg} \caption{Finishing time for each sequences} \label{fig:1-1} \end{figure} There are totally 24 possible load distribution sequences. The fastest sequence yield a finishing time of 3.8370 time units, while the slowest one is 6.0725. Since the system is deterministic, i.e. there will not be any variation for the different trials. The cumulative regret during interval $T$ is simply calculated as: \begin{align} regret = \sum_{t=1}^{T} T_f(S(t),t) - T_f^\star \end{align} where the $T_f(t)$ is the finishing time of the sequence $S(t)$ selected at time $t$ and $T_f^\star$ ids the finishing time of the optimal sequence. The $T_f^\star$ is a constant (in our case 3.8370) and $T_f(S(t),t)$ can never be smaller than $T_f^\star$. \\ The evaluation of Algorithm I is conducted by analysis the finishing time and regret as the algorithm is trained to select the optimal arm. In order to have a clear vision how the regret varies according to the trials, the average regret during interval $t_1$ and $t_2$ is defined as: \begin{align} regret = \frac{\sum_{t=t_1}^{t_2} T_f(S(t),t) - T_f^\star}{t_2-t_1+1} \end{align} The average finishing time and regret is shown in Fig. \ref{fig:1-2} and Fig. \ref{fig:1-3}.\\ \begin{figure}[h!] \centering \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=1\linewidth]{1-2.jpg} \caption{} \label{fig:1-2} \end{subfigure} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=1\linewidth]{1-3.jpg} \caption{} \label{fig:1-3} \end{subfigure} \caption[]{For a time time-invariant system (a) Finishing time vs trials (b) Regret vs trials.} \end{figure} The Algorithm I is totally trained for 5000 trials. Both the $\alpha$ and $\beta$ are initialized as one for all arms. An average is taken for the finishing time and regret every 100 trials. i.e. every step on x axis is an average of 100 trials for Fig. \ref{fig:1-2} and Fig. \ref{fig:1-3}. It can be found that the finishing time and regret drops dramatically in the first 100 trials, where the algorithm is exploring all sequences to find the optimal sequence. After the first 100 trials the variation gradually decreases and the regret is approaching zero. In this phase the algorithm already find one or more sequences that are close to the optimal solution, but it is also possible to try other sequences with a small probability. One thing to notice is that even the system does not have enough samples to train the algorithm for the optimal solution, the algorithm can still yield decreasing finishing times over time. \subsubsection{Exhaustive Search vs Hill Climbing} In order to resolve the scaling problem in time complexity and space complexity, a new parameter space is introduced in section 3. An approximating algorithm is also utilized to take place of exhaustive search: hill climbing. In this section the performance of Algorithm III is evaluated compared with the exhaustive search in Algorithm II.\\ The system parameters are the same as the last subsection. Since there are 4 worker processors, the weight vector $W$ is a $16 \times 1$ column vector and each element in $W$ vector is initialized as a random variable with $Beta(1,1)$. The $S_V$ vector is also a $16 \times 1$ column vector. The hill climbing iteration $m$ is set to be 500. In order to resolve the local optimum problem, we use random start at Algorithm III. The number of random starts $K$ is set to be 20. \\ \begin{figure}[h!] \centering \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=1\linewidth]{2-1.jpg} \caption{} \label{fig:2-1} \end{subfigure} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=1\linewidth]{2-2.jpg} \caption{} \label{fig:2-2} \end{subfigure} \caption[]{Exhaustive search vs hill climbing (a) Finishing time (b) Regret.} \end{figure} Fig. \ref{fig:2-1} and Fig. \ref{fig:2-2} shows the performance of the exhaustive search and hill climbing algorithms. In this case the hill climbing converged to a local optimum while the exhaustive search converged to the global optimum when the sample size is small. When the sample size grows large, the hill climbing finally converged to the global optimum. This convergence correction is caused by the explore-exploitation balance property in Thompson sampling. Since the weight is also generated by drawing a sample from its distribution instead of just taking the mean, it is always possible to try solutions that seem not to be optimal due to randomness. Such randomness can help correct the error if the algorithm converges to a local optimal solution.\\ This case shows an experiment that the hill climbing converged to a local optimum. However, it is also possible that hill climbing can converge to the global optimum at first. The experiment result may vary due to randomness. Another thing to notice is that the new parameter space has a better performance than the old one when compare Fig. 6 with Fig. 5. This is because that the new parameter space give every position a weight to indicate which processor performs better in this position. Such design can be taken as having more features during the training process and thus results in a better solution. \subsection{General Time-varying System} For the general time-varying case, the processor's processing (communication) speed will be time varying according to the number of background jobs (extra links). The physical processor will be virtualized to multiple virtual processors and a hypervisor will assign the communication/computation power of the physical processor to the virtual processors. For simplicity, it is assume that the hypervisor evenly distributes the communication/computation power to the virtual processors. In case there is no background jobs, the system parameters are set to be: $\omega_i = 1 + i$ and $z_i = 1 + i, i = 1,2, .., N$ for totally N processors. Also, we set the $T_{cm} = 1$ and $T_{cp} = 4$ to make the communication is in general faster than computation.The number of background jobs (extra links) for each processor (channel) is simulated as a random number from 10 to 200 for totally 40 time units. As in the last section we take an average of 100 trials. The scheduling is performed by the algorithm in [16].\\ \subsubsection{Hill Climbing Optimization} To perform the hill climbing optimization, the random initialization parameter $K$ and the search parameter are both set to be 100, which means for each trial, the best sequence is selected from the best of the hill climbing result of 100 random starts, each random start is optimized 100 times. The total comparison for hill climbing is $100 \times 100 = 10000$.\\ \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{hc.jpg} \caption{Finishing time for hill climbing optimization compared with random selection} \label{fig:3-1} \end{figure} Fig. \ref{fig:3-1} demonstrates the finishing time for a case of 20 processors and there are $20! = 2.4329 \times 10^{18}$ sequences in total. Under such scaling condition, Algorithm I is not a valid solution for this case. Fig. \ref{fig:3-1} indicates that the algorithm can decrease the finishing time as the time grows. The local optimum problem is also appears in Fig. \ref{fig:3-1} as between the 15th to 25th averaged trials where there is small period of stable condition. Moreover, the finishing time at the end of Fig. \ref{fig:3-1} is not guaranteed to be the optimal solution, i.e. it is still possible to be locally optimal. Since the system is time-varying, the optimal solution may not be unique and may also be time-varying. It can be seen that the major drop of finishing time happens before the first 10 averaged trials, which indicates that even if the sample size is not large enough, our algorithm can still reduce the finishing time. \subsubsection{Batch Optimization} Same as the hill climbing optimization, the number of processors is set to be 20. To perform the batch optimization, the batch number is set to be $b_n = 5$ and the maximum number of processors that do not need to be divided into batches $b_s$ is set to be 6. In this case, each batch has 4 processors so the inside batch optimization does not require further division. \begin{figure}[h!] \centering \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=1\linewidth]{batch1.jpg} \caption{} \label{fig:3-2} \end{subfigure} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=1\linewidth]{batch2.jpg} \caption{} \label{fig:3-3} \end{subfigure} \caption[]{batch optimization (a) batch sequencing (b) inside batch optimization.} \end{figure} Fig. \ref{fig:3-2} and Fig. \ref{fig:3-3} shows the 2 phases of batch optimization. The first phase is to find the optimal sequence of the batches and the second phase is to optimize the inside the batches. There are 5 batches and each batch has 4 processors. In Fig. \ref{fig:3-3} each batch takes 10 averaged trials to train the sequence. We can find that the finishing time dropping happens in the first 30 averaged trials, which means the first 3 batches. This meets our expectation since the processors at front have higher impact on the finishing time.\\ \begin{figure}[h!] \centering \includegraphics[width=0.5\textwidth]{batch3.jpg} \caption{Finishing time for batch optimization compared with random selection} \label{fig:3-4} \end{figure} Fig. \ref{fig:3-4} shows the overall performance of batch optimization compared with random selection. Using the same parameters (sample size, number of processors) as the previous section of hill climbing optimization, it can be figure out that the training process for batch optimization is much slower than the hill climbing optimization. Such condition can be improved by dynamically adjust the sample size assigned for each training phase. For batch optimization, the total comparison for each trial is $max(b_n!,b_m!) = 120$, which is much smaller than the hill climbing optimization (which is 10000). \section{Conclusion} This paper studied an optimal load distribution sequencing problem in a resource-sharing system. In the resource-sharing system the processors' communication and computation speeds are time-varying due to multi-tasking and virtualization. Thus the analytical solution can not be achieved. To deal with this issue, a reinforcement learning method was performed to train the optimal sequence using the multi-armed bandit algorithm. A Thompson sampling based multi-armed bandit algorithm was first introduced to train the optimal sequence. Then several optimization techniques were performed in order to decrease the time complexity and space complexity. The numerical test showed that our algorithm can deliver a continuing decreasing finishing time during the training progress and reach the global optimum if the sample size is large enough.\\ Future work for this research can be focused on other network topologies such as meshes or multi-level trees. It is also possible to combine the MAB algorithm with other optimization techniques such as genetic algorithm or random optimization instead of hill climbing. Dealing with the local optimum problem and achieving a better performance in large systems should also be further investigated. \ifCLASSOPTIONcaptionsoff \newpage \fi
\section{Introduction} An astronomically important effect of general relativity is the deflection of light due to the curvature of spacetime, known as gravitational lensing (e.g., \cite{SEF}). When this was first confirmed observationally by Eddington's eclipse expeditions -- whose centenary we celebrate this year -- it provided a crucial corroboration of Einstein's theory. \newline \indent From a mathematical point of view, three geometrical frameworks are usually employed to study this effect\footnote{MCW is grateful to Kyoji Saito for encouraging and regularly attending the {\it Mathematics-Astronomy Seminar Series} (2011-2014) and the {\it Symposium on Gravity and Light} (2013) at Kavli IPMU, University of Tokyo, which was dedicated to such mathematical aspects of gravitational lensing theory. The present collaboration was initiated at the related MRC {\it The Mathematics of Gravity and Light} (2018) organized by the American Mathematical Society.}: null geodesics in 4-dimensional Lorentzian spacetimes (e.g., \cite{P}); the standard approximation of gravitational lensing in 3-space, with applications of Morse theory to image multiplicity and singularity theory to caustics (e.g., \cite{PLW}); and optical geometry, which we will employ in this paper. \newline \indent Optical geometry is defined by a 3-dimensional space whose geodesics are spatial light rays (not null geodesics), by Fermat's Principle. More precisely, a stationary spacetime has a timelike Killing vector field, and light rays in 3-space obtained by projecting along this vector field are curves which are geodesic with respect to a Finsler metric of Randers type (cf. \cite{GHWW}). For a static spacetime, the Killing vector field is also hypersurface-orthogonal, so that the spacetime metric may be written \[ g=g_{00} \mathrm{d} t \otimes \mathrm{d} t+g_{ij}\mathrm{d} x^i \otimes \mathrm{d} x^j\,, \] thus yielding light rays which are geodesics of a spatial Riemannian metric \begin{equation} \bar{g}=-\frac{g_{ij}}{g_{00}}\mathrm{d} x^i \otimes \mathrm{d} x^j\,, \label{optmetric} \end{equation} called the optical metric. Moreover, if we restrict ourselves to the spherically symmetric case, then light rays will be geodesics in totally geodesic surfaces and we can consider, without loss of generality, the optical metric in the equatorial plane. \newline \indent Now it turns out that optical geometry provides a useful framework for gravitational lensing theory yielding, for example, topological criteria for image multiplicity as well as a method to derive the light deflection angle, using the Gauss-Bonnet theorem \cite{GW}. However, one aspect of optical geometry that has hitherto not been exploited, is the fact that the {\it length} of a geodesic in optical geometry, i.e. a light ray, is directly related to {\it time}, by construction (Fermat's Principle), and the time delay between gravitationally lensed images is an important observable. \newline \indent Thus in order to approach this problem here, we study geometrical constraints on the lengths of curves bounding areas in the optical geometry of static spherically symmetric spacetimes, in other words, a version of the isoperimetric problem. As is well known (for a detailed review, see e.g. \cite{O}), the length of a closed curve $\partial A$ in the Euclidean plane bounding an area $A$ satisfies the standard isoperimetric inequality \begin{equation} |\partial A|^2\geq 4\pi |A|\,, \label{isoineq} \end{equation} where equality is obtained for {\it circles}, a fact whose discovery has historically been ascribed to Dido, Queen of Carthage\footnote{According to legend, discovered in the process of enclosing the maximum area for the new town centre Byrsa with a string made of hide. Vergil's {\it Aeneis} I 365-369 states, \begin{quote} {\it Devenere locos, ubi nunc ingentia cernis \\ moenia surgentemque novae Karthaginis arcem, \\ mercatique solum, facti de nomine Byrsam, \\ taurino quantum possent circumdare tergo.}\end{quote} }, and is therefore also referred to as {\it Dido's theorem}. \newline \indent In section \ref{sec-dido1} of this paper, we begin extending Dido's theorem to the Riemannian optical geometry of static spherically symmetric spacetimes with a constructive proof for the optical geometry of the Schwarzschild solution. Next, we consider the implications of a more general theorem by Bray and Morgan \cite{BM} for Reissner-Nordstr\"{o}m and solutions of the Tolman-Oppenheimer-Volkoff equation. Then in section \ref{sec-ineq}, we proceed from the limiting case of Dido's theorem to derive an isoperimetric inequality applicable to gravitational lensing, where in contrast to (\ref{isoineq}) the enclosed area has Euler characteristic zero. This is established using curve shortening flow and the Gauss-Bonnet theorem. \newline \indent The Einstein convention for summation over repeated indices is used throughout this paper. On occasion, we will employ a prime for short to denote differentiation with respect to the radial coordinate. Finally, note also that we set the speed of light to unity, and $c$ denotes a constant radius. \section{Dido's theorem} \label{sec-dido1} \subsection{Schwarzschild} We begin by recalling the optical metric of the Schwarzschild solution, in Schwarzschild coordinates $(t,r,\vartheta,\varphi)$. By spherical symmetry, a light ray may be regarded as being located in the totally geodesic slice $\mathcal{S}$ of the equatorial plane with $\vartheta\equiv \tfrac{\pi}{2}$. Thus, for some $m>0$, we consider the set $\mathbb{R}^2-B(2m)$ with optical metric \begin{equation} \bar{g}=\frac{1}{(1-\frac{2m}{r})^2}\mathrm{d} r \otimes \mathrm{d} r+\frac{r^2}{1-\frac{2m}{r}}\mathrm{d} \varphi \otimes \mathrm{d} \varphi\,. \label{optmetric-schw} \end{equation} Note also that the Schwarzschild solution has a photon sphere at $r=r_{\rm ph}=3m$, corresponding to closed circular geodesics in the optical geometry. \begin{theorem} In the equatorial Schwarzschild optical geometry, the curve $\{r=c\}$ minimizes length within the homology class of piecewise smooth curves bounding the area $|\{r_{\rm ph} \leq r \leq c\}|$ with $\{r=r_{\rm ph}\}$. \label{theorem1} \end{theorem} \begin{corollary} Dido's theorem for Schwarzschild\\ In Schwarzschild optical geometry, light rays bounding solutions of the isoperimetric problem must lie on the photon sphere. \label{coro-schw} \end{corollary} \begin{proof} Since $\nabla_\varphi\partial_\varphi = (3m-r)\partial_r$, and only the sets $\{r=c\}$ bound solutions of the isoperimetric problem by Theorem \ref{theorem1}, the result follows for geodesics (light rays) on the photon sphere $\{r=r_{\rm ph}\}$. \end{proof} We now provide a direct constructive proof of Theorem \ref{theorem1}, before exploring the implications of a more general isoperimetric theorem for our optical geometry problem in the next subsection. \begin{proof} For the case $c=r_{\rm ph}$, any curve $C$ parametrized by $\lambda$ within the homology class bounding a trivial area with $\{r=r_{\rm ph}\}$ must have $C\supset \{r=r_{\rm ph}\}$, and therefore $\tfrac{r}{\sqrt{1-\frac{2m}{r}}}|_C \geq 3\sqrt{3}m$. So its length satisfies \begin{align*} |C|=&\int_C \sqrt{\frac{\dot{r}^2}{(1-\frac{2m}{r})^2}+\frac{r^2\dot{\varphi}^2}{1-\frac{2m}{r}}}\ \mathrm{d} \lambda\\ \mbox{}\geq &\int_C\frac{r}{\sqrt{1-\frac{2m}{r}}}\dot{\varphi}\ \mathrm{d} \lambda \geq 2\pi(3\sqrt{3}m) = |\{r=r_{\rm ph}\}|\,, \end{align*} which is the desired result. \\ \indent For the case $c>r_{\rm ph}$, we adapt a theorem by Bray \cite{B} and express the optical metric (\ref{optmetric-schw}) in two adjacent domains as follows, \begin{equation} \bar{g}=\begin{cases} \omega^2(r)\Big(a^{-2}\nu'_-(r)^2\mathrm{d} r\otimes \mathrm{d} r+a^2\nu_-(r)^2\mathrm{d} \varphi \otimes \mathrm{d} \varphi \Big) & (r\leq c)\,, \\ u^{-2}(r)\nu'_+(r)^2\mathrm{d} r \otimes \mathrm{d} r+u^2(r)\nu_+(r)^2\mathrm{d} \varphi \otimes \mathrm{d} \varphi & (r\geq c)\,, \end{cases} \label{metric} \end{equation} and as for the matching condition at $r=c$, we require that \begin{equation} \omega(c)=1\,, \quad \quad u(c)=a \quad \mbox{such that} \quad \omega'(c)=0\,, \label{matching} \end{equation} so one may regard $u(r)=a=\mathrm{const.}$ for $r\leq c$. We also define a metric $\bar{g}_c$ by setting $\omega\equiv 1$ in (\ref{metric}), such that $\bar{g}=\bar{g}_c$ for $r\geq c$ independent of $\omega$. \\ \indent This form of the metric is motivated by the desire to obtain polar coordinate charts $(R,\varphi)$ with $R(r) = \nu_{\pm}(r)$ in the respective domains. For $r\geq c$, this allows us to recognize the area of any set as precisely the Euclidean area on $\mathbb{R}^2$. For $r\leq c$, $\bar{g}$ is conformally related to a conical $\bar{g}_c$. \\ \indent To see this, note first of all that by comparing the metric components of (\ref{optmetric-schw}) and (\ref{metric}) for $r\leq c$, \begin{align} a^2\omega^2(r)\nu_-(r)^2 &= \frac{r^2}{1-\frac{2m}{r}}\,, \label{nu-1} \\ a^{-2}\omega^2(r){\nu'_-}^2&=\frac{1}{(1-\frac{2m}{r})^2}\,. \label{nu-2} \end{align} Now differentiating (\ref{nu-1}) and evaluating it at $r=c$ gives \[ a^2\omega(c)\omega'(c)\nu_-(c)^2+a^2\omega^2(c)\nu_-(c)\nu'_-(c)=\frac{c}{1-\frac{2m}{c}}-\frac{m}{(1-\frac{2m}{c})^2}\,, \] whence, using the matching conditions (\ref{matching}), \begin{equation} a^2(\nu_-\nu'_-)(c)=\frac{c-3m}{(1-\frac{2m}{c})^2}\,. \label{numinus} \end{equation} Also, applying (\ref{matching}) to the positive root of the product of (\ref{nu-1}) and (\ref{nu-2}), \[ (\nu_-\nu'_-)(c) = \frac{c}{(1-\frac{2m}{c})^{\frac32}}\,, \] which together with (\ref{numinus}) implies that \begin{equation} a^2=\frac{1-\frac{3m}{c}}{\sqrt{1-\frac{2m}{c}}}<1\,, \label{a} \end{equation} since $1-\frac{3m}{c}<1-\frac{2m}{c}<\sqrt{1-\frac{2m}{c}}$. Now recasting (\ref{metric}) for $r\leq c$ in a polar coordinate chart $(\tilde{R},\tilde{\varphi})$ with $\tilde{R}=\tfrac{\nu_-}{a}$, $\tilde{\varphi}=a^2\varphi$, \begin{equation} \bar{g}_c = \mathrm{d}\tilde{R}\otimes\mathrm{d}\tilde{R}+\tilde{R}^2\mathrm{d}\tilde{\varphi}\otimes\mathrm{d}\tilde{\varphi}\,, \label{cone} \end{equation} which, clearly, is locally Euclidean and conical as promised, for (\ref{a}) restricts the range of $\tilde{\varphi}$. This is illustrated in Fig. \ref{fig1}. \\ \indent Finally, for later reference, we note in passing that comparison of (\ref{optmetric-schw}) and (\ref{metric}) for $r\geq c$ implies \begin{eqnarray} \nu_+^2 u^2&=\frac{r^2}{1-\frac{2m}{r}}\,, \label{nu1}\\ \nu_+ \nu'_+&=\frac{r}{\left(1-\frac{2m}{r}\right)^{\frac32}}\,. \label{nu2} \end{eqnarray} \indent Now given these definitions, we need the following two lemmata to prove the theorem. The first is a technical property of the optical metric expressed as (\ref{metric}); the second is a proof of our statement for the metric $\bar{g}_c$. Then, we shall proceed with the proof of the theorem in general. \begin{figure}[h] \centering \def\svgwidth{0.95\textwidth} \input{OS2.pdf_tex} \caption{Schwarzschild optical geometry outside $r_{\rm ph}$. Isometric embedding in Euclidean space, for metrics $\bar{g}$ and $\bar{g}_c$. Note the conical surface for $r\leq c$.} \label{fig1} \end{figure} \begin{lemma} $a^2\leq u^2(r)\leq 1$ for all $r$. \end{lemma} \begin{proof} We begin by recalling that, in the domain $r\leq c$, $u(r)=a <1$ by (\ref{a}). Next, we consider the domain $r\geq c$ and first show that \begin{equation} \nu_+^2\geq \frac{r^2}{(1-\frac{3m}{r})\sqrt{1-\frac{2m}{r}}}\,. \label{inequality} \end{equation} To this end, notice that equality obtains at $r=c$ since, from (\ref{nu1}) together with (\ref{matching}) and (\ref{a}), \[ \nu_+(c)^2=\frac{1}{a^2}\frac{c^2}{1-\frac{2m}{c}}= \frac{c^2}{(1-\frac{3m}{c}) \sqrt{1-\frac{2m}{c}}}\,. \] Now the inequality follows from the fact that the derivative of the left-hand side of (\ref{inequality}) exceeds the derivative of the right-hand side: on the one hand, (\ref{nu2}) implies that \begin{equation} \frac{\mathrm{d} \nu_+^2}{\mathrm{d} r}=2\nu_+{\nu'}_+ = \frac{2r}{(1-\frac{2m}{r})^{\frac32}}\,. \label{derivative} \end{equation} On the other hand, the derivative of the right-hand side is \begin{align*} &\frac{\mathrm{d}}{\mathrm{d} r}\frac{r^2}{(1-\frac{3m}{r})\sqrt{1-\frac{2m}{r}}} = \\ &=\frac{2r}{(1-\frac{3m}{r})\sqrt{1-\frac{2m}{r}}}-\frac{3m}{(1-\frac{3m}{r})^2\sqrt{1-\frac{2m}{r}}}-\frac{m}{(1-\frac{3m}{r})(1-\frac{2m}{r})^{\frac32}} \\ &=\frac{2r}{(1-\frac{2m}{r})^{\frac32}}+\frac{m}{(1-\frac{3m}{r})(1-\frac{2m}{r})^{\frac32}}-\frac{3m}{(1-\frac{3m}{r})^2\sqrt{1-\frac{2m}{r}}} \\ &=\frac{2r}{(1-\frac{2m}{r})^{\frac32}}-2m\frac{1-\frac{3m}{2r}}{(1-\frac{3m}{r})^2(1-\frac{2m}{r})^{\frac32}}\leq \frac{2r}{(1-\frac{2m}{r})^{\frac32}}=\frac{\mathrm{d} \nu_+^2}{\mathrm{d} r}\,, \end{align*} with (\ref{derivative}), yielding the result. We can now prove the inequality of the lemma using an analogous argument: first, recall again from (\ref{matching}) that $u(c)=a$. Then using (\ref{nu1}) and (\ref{inequality}), \begin{align*} \frac{\mathrm{d} u^2}{\mathrm{d} r} &= \frac{\mathrm{d}}{\mathrm{d} r}\frac{r^2}{\nu^2_+(1-\frac{2m}{r})} = \frac{2r}{\nu_+^2(1-\frac{2m}{r})}-\frac{2m}{\nu_+^2(1-\frac{2m}{r})^2}-\frac{r^2}{\nu^4_+(1-\frac{2m}{r})}\frac{\mathrm{d} \nu^2_+}{\mathrm{d} r}\\ &=\frac{2r}{\nu_+^4(1-\frac{2m}{r})^2}\left(\left(1-\frac{3m}{r}\right)\nu_+^2-\frac{r^2}{\sqrt{1-\frac{2m}{r}}}\right)\geq 0\,, \end{align*} with equality at $r=c$, and therefore $u(r)$ will increase from $a$ for $r>c$. But using (\ref{inequality}), we also see that \[ \left(1-\frac{2m}{r}\right)\nu_+^2\geq \left(1-\frac{3m}{r}\right)\nu_+^2\geq \frac{r^2}{\sqrt{1-\frac{2m}{r}}}\geq r^2\,, \] and hence, again from (\ref{nu1}), $$u^2(r) = \frac{r^2}{(1-\frac{2m}{r})\nu_+^2}\leq 1\,,$$ which completes the proof of the lemma. \end{proof} \begin{lemma} For $(\mathbb{R}^2-\{0\},\bar{g}_c)$, assume the sets $S'$ and $\Sigma':=\{r\leq c\}$ satisfy $|S'|_c\geq |\Sigma'|_c$. Then, $|\partial S'|_c\geq |\partial\Sigma'|_c$. \end{lemma} \begin{proof} Recall that the metric $\bar{g}_c$ may be expressed in polar coordinate charts $(R,\phi)\in \mathbb{R}^2-\{0\}$ as, \[ \bar{g}_c=\begin{cases} \frac{1}{u(c)^2}\mathrm{d} R\otimes \mathrm{d} R+u(c)^2R^2\mathrm{d} \varphi \otimes \mathrm{d} \varphi & (r\leq c)\,, \\ \frac{1}{u(R)^2}\mathrm{d} R\otimes \mathrm{d} R+u(R)^2R^2\mathrm{d} \varphi \otimes \mathrm{d} \varphi & (r\geq c)\,. \end{cases} \] Thus, the area element becomes \[ \mathrm{d} A_c=\sqrt{\det \bar{g}_c}\,\mathrm{d} R\mathrm{d} \varphi=R\mathrm{d} R\mathrm{d} \varphi=\mathrm{d} A_{\mathbb{R}^2}\,, \] that is, the standard Euclidean area element, whence \[ |S'|_c=\int_{S'}\mathrm{d} A_c=\int_{S'}\mathrm{d} A_{\mathbb{R}^2}=|S'|_{\mathbb{R}^2}\,, \quad |\Sigma'|_c=\int_{\Sigma'}\mathrm{d} A_c=\int_{\Sigma'}\mathrm{d} A_{\mathbb{R}^2}=|\Sigma'|_{\mathbb{R}^2}\,, \] and therefore, by assumption, \[ |S'|_{\mathbb{R}^2}=|S'|_c\geq |\Sigma'|_c = |\Sigma'|_{\mathbb{R}^2}\,. \] Hence, from the Euclidean version of the isoperimetric problem, we conclude that \begin{equation} |\partial S'|_{\mathbb{R}^2}\geq |\partial \Sigma'|_{\mathbb{R}^2}\,. \label{isoperi} \end{equation} Moreover, the line element of $\bar{g}_c$ satisfies \begin{equation} \mathrm{d} t_c^2=\frac{1}{u^2}\mathrm{d} R^2+u^2 R^2\mathrm{d}\varphi^2\geq a^2(\mathrm{d} R^2+R^2\mathrm{d} \varphi^2)=a^2\mathrm{d} t_{\mathbb{R}^2}^2 \label{lineelement} \end{equation} since, by Lemma 1, \[ u^2\geq a^2 \ \mbox{and also} \ 1\geq u^2\geq u^4 \geq a^2 u^2 \Rightarrow \frac{1}{u^2} \geq a^2\,. \] Notice also that, \[ |\partial\Sigma'|_c=\int_{\partial\Sigma'}\mathrm{d} t_c=\int_{\{r=c\}}\mathrm{d} t_c=\int_{\{R(c)=\mathrm{const.}\}}a \mathrm{d} t_{\mathbb{R}^2}=a|\partial \Sigma'|_{\mathbb{R}^2}\,. \] Thus, using (\ref{isoperi}) and (\ref{lineelement}), $$|\partial S'|_c\geq a|\partial S'|_{\mathbb{R}^2}\geq a|\partial\Sigma'|_{\mathbb{R}^2} = |\partial\Sigma'|_c\,,$$ as required. \end{proof} Now having established the isoperimetric problem for $\bar{g}_c$ with Lemma 2, we shall see in the following how it can be extended to $\bar{g}$, thus proving the theorem. \\ \indent First, consider the Gaussian curvature of the equatorial plane in the optical metric. In general, the Gaussian curvature is defined as \begin{align} K&=\frac{\bar{g}\left((\nabla_\varphi\nabla_r-\nabla_r\nabla_\varphi)\tfrac{\partial}{\partial r},\frac{\partial}{\partial \varphi}\right)}{\det \bar{g}}=\frac{R_{r\varphi r\varphi}}{\det \bar{g}}\label{gauss1} \\ &=\frac{1}{\sqrt{\det \bar{g}}}\left(\frac{\partial}{\partial \varphi}\left(\frac{\sqrt{\det \bar{g}}}{\bar{g}_{rr}}\Gamma^\varphi{}_{rr}\right)-\frac{\partial}{\partial r}\left(\frac{\sqrt{\det \bar{g}}}{\bar{g}_{rr}}\Gamma^\varphi_{r\varphi}\right)\right)\nonumber \\ &=-\frac{2m}{r^3}\left(1-\frac{3m}{2r}\right)\,, \label{gauss2} \end{align} which is negative outside the event horizon, $r>2m$. Moreover, recall that in the domain $r\leq c$, the metric $\bar{g}$ is conformally related to $\bar{g}_c$ according to $\bar{g}=\omega^2 \bar{g}_c$. Applying this relation to (\ref{gauss1}), one finds that $K$ is related to the Gaussian curvatures $K_c$ with respect to $\bar{g}_c$ by \begin{equation} K=\frac{1}{\omega^2}(K_c-\Delta \ln \omega)\,, \label{gauss3} \end{equation} where $\Delta$ is the usual Laplace-Beltrami operator with respect to $\bar{g}$, \[ \Delta=\frac{1}{\sqrt{\det \bar{g}}}\frac{\partial}{\partial x^i}\left(\sqrt{\det \bar{g}} \bar{g}^{ij}\frac{\partial}{\partial x^j}\right)\,. \] Now since $\bar{g}_c$ is conical and locally Euclidean by (\ref{cone}), we have $K_c=0$. But then (\ref{gauss3}) and $K<0$ from (\ref{gauss2}) imply that \[ \Delta \ln \omega \geq 0 \quad (r\leq c)\,, \] and so we know from the Hopf maximum principle that $\ln \omega$ must attain its maximum on the boundary of an annulus $b\leq r\leq c$ for some arbitrary $b$, with a non-zero outward-pointing gradient. Since $(\ln\omega)'(c) = 0$ by the matching condition, this must be at the arbitrary \textit{inner} boundary, $r=b$. Therefore, $\ln \omega$ must increase from its value $\ln\omega(c) = 0$ for $r<c$, and thus we conclude that \begin{equation} \omega (r) >1 \quad (r < c)\,. \label{omega} \end{equation} \indent Next, we shall assume that a curve $C$ within the homology class of $\{r=c\}$ bounds, with $\{r=3m\}$, a set $S$ of area $|S|\geq |\Sigma|$ where $\Sigma:=\{3m\leq r\leq c\}$, as illustrated in Fig. \ref{fig1}. Then consider the domain $U = S\cap\Sigma$ and note that, within $\Sigma$ and hence $U$, $r\leq c$ and so $\bar{g}=\omega^2 \bar{g}_c$ and the area element becomes $\mathrm{d} A=\sqrt{\det \bar{g}}\,\mathrm{d} A_{\mathbb{R}^2}=\omega^2\mathrm{d} A_c$. On the other hand, in the domain $S-U$, $\mathrm{d} A=\mathrm{d} A_c$. Thus, \[ |S|=\int_S\mathrm{d} A=\int_U\omega^2 \mathrm{d} A_c+\int_{S-U}\mathrm{d} A_c\,, \] and so, by assumption, \[ \int_U\omega^2 \mathrm{d} A_c+\int_{S-U}\mathrm{d} A_c = |S|\geq |\Sigma| = \int_U\omega^2\mathrm{d} A_c+\int_{\Sigma-U}\omega^2\mathrm{d} A_c\,, \] which together with (\ref{omega}) yields \begin{equation} \int_{S-U}\mathrm{d} A_c\geq \int_{\Sigma-U}\omega^2\mathrm{d} A_c\geq \int_{\Sigma-U}\mathrm{d} A_c\,. \label{area1} \end{equation} By adding the area within $U$ on both sides of (\ref{area1}), we obtain the areas $|S'|_c$ and $|\Sigma'|_c$, respectively, which again by (\ref{area1}) obey \[ |S'|_c\geq |\Sigma'|_c\,. \] We can now apply Lemma 2 to these areas, to conclude that their boundary curves satisfy \begin{equation} |\partial S'|_c\geq |\partial\Sigma'|_c\,. \label{area2} \end{equation} \indent Finally, we turn to the length of the curve $C$. Note that $C$ conists of $\partial S-\partial U$, its portion outside of $\Sigma$, and $\partial U-\partial \Sigma$, its portion inside of $\Sigma$. Again, since $\bar{g}=\omega^2 \bar{g}_c$ within $\Sigma$, the line element is $\mathrm{d} t=\omega \mathrm{d} t_c$. On the other hand, $\mathrm{d} t=\mathrm{d} t_c$ outside of $\Sigma$. Thus, \[ |C| =\int_C \mathrm{d} t= \int_{\partial U-\partial\Sigma}\omega \mathrm{d} t_c+\int_{\partial S-\partial U}\mathrm{d} t_c\geq \int_C\mathrm{d} t_c=|\partial S'|_c \] using (\ref{omega}). Hence, from (\ref{area2}), \[ |C| \geq |\partial\Sigma'|_c=|\{r=c\}|_c=|\{r=c\}| \] since $\bar{g}_c=\bar{g}$ at $r=c$. Overall, therefore, $|S|\geq |\Sigma| \Rightarrow |C|\geq |\{r=c\}|$, completing the proof. \end{proof} \subsection{More general case} Having established Dido's theorem for Schwarzschild optical geometry, we shall now discuss how it may be also be regarded as a consequence of a deeper theorem by Bray and Morgan, which allows a generalization of the result beyond Schwarzschild as well. \begin{proposition}\cite{BM}(Corollary 2.4) Given an $n+1$-dimensional hypersurface of revolution with line element \begin{equation} \mathrm{d} t^2=\mathrm{d} r^2+f^2(r)\mathrm{d} \Omega^2_n\,, \label{bm} \end{equation} where $\mathrm{d}\Omega^2_n$ is the line element of the $n$-dimensional unit sphere, with the following conditions for $r\geq r_0$, \begin{align} 0\leq &\frac{\mathrm{d} f}{\mathrm{d} r}<1\,, \label{bm-cond1}\\ &\frac{\mathrm{d} f^2}{\mathrm{d} r^2}\geq 0\,, \label{bm-cond2} \end{align} then every sphere of revolution $S_r$ for $r\geq r_0$ minimizes perimeter uniquely among smooth surfaces enclosing fixed volume with $S_{r_0}$. \label{prop-bm} \end{proposition} \subsubsection{Schwarzschild revisited} The optical metric of the Schwarzschild equatorial plane (\ref{optmetric-schw}) can be recast as a line element in the form of (\ref{bm}), \[ \mathrm{d} t^2=\frac{\mathrm{d} r^2}{\left(1-\frac{2m}{r^2}\right)^2}+\frac{r^2 \mathrm{d} \varphi^2}{1-\frac{2m}{r}}=\mathrm{d} r^{\ast2}+f(r^\ast)\mathrm{d} \Omega_1^2\,, \] where $r^\ast$ is known in the physical context as the Regge-Wheeler tortoise coordinate. Thus, comparison yields \[ \frac{\mathrm{d} f}{\mathrm{d} r^\ast}\left(r(r^\ast)\right)=\frac{1-\frac{3m}{r}}{\sqrt{1-\frac{2m}{r}}}\,, \] and it is immediately apparent that condition (\ref{bm-cond1}) of Proposition \ref{prop-bm} is satisfied outside the photon sphere, \[ 0\leq \frac{\mathrm{d} f}{\mathrm{d} r^\ast}<1\,: \quad r_{\rm ph}\leq r<\infty\,, \] and since \[ \frac{\mathrm{d}^2f}{\mathrm{d} r^{\ast2}}\left(r(r^\ast)\right)=\frac{2m}{r^2\sqrt{1-\frac{2m}{r}}}\left(1-\frac{3m}{2r}\right)\,, \] likewise condition (\ref{bm-cond2}), \[ \frac{\mathrm{d}^2f}{\mathrm{d} r^{*2}}\geq 0\,: \quad 2m<r_{\rm ph}\leq r < \infty\,. \] Thus, we recover Dido's theorem for Schwarzschild, Corollary \ref{coro-schw}. \subsubsection{Reissner-Nordstr\"{o}m} Next, we shall turn to the Reissner-Nordstr\"{o}m solution of the Einstein-Maxwell equations, described by a mass parameter $m$ and a charge parameter $q$. The line element of the equatorial plane in the optical geometry is \begin{equation} \mathrm{d} t^2=\frac{\mathrm{d} r^2}{\left(1-\frac{2m}{r^2}+\frac{q^2}{r^2}\right)^2}+\frac{r^2 \mathrm{d} \varphi^2}{1-\frac{2m}{r}+\frac{q^2}{r^2}}\,. \label{optmetric-rn} \end{equation} As a result of the additional parameter, Reissner-Nordstr\"{o}m admits {\it two} photon spheres, at radii \begin{equation} r^{\pm}_{\rm ph}=\frac{3}{2}\left(m\pm\sqrt{m^2-\frac{8}{9}q^2}\right)\,, \label{rn-phsph} \end{equation} provided that $m^2 > \tfrac{8}{9}q^2$. Now comparing (\ref{optmetric-rn}) with (\ref{bm}), we obtain \begin{equation} \frac{\mathrm{d} f}{\mathrm{d} r^\ast}\left(r(r^\ast)\right)=\frac{1-\frac{3m}{r}+\frac{2q^2}{r^2}}{\sqrt{1-\frac{2m}{r}+\frac{q^2}{r^2}}}\,, \label{rn-f1} \end{equation} and conclude that condition (\ref{bm-cond1}) is indeed satisfied outside of the outer photon sphere at $r^+_{\rm ph}$, \[ 0\leq \frac{\mathrm{d} f}{\mathrm{d} r^\ast}<1\,: \quad r^+_{\rm ph}\leq r<\infty\,, \] and this is also the case for the second condition, (\ref{bm-cond2}), albeit less obviously: \begin{lemma} \[ \frac{\mathrm{d}^2f}{\mathrm{d} r^{*2}}\geq 0\,: \quad r^+_{\rm ph}\leq r < \infty\,. \] \end{lemma} \begin{proof} Differentiating (\ref{rn-f1}) yields \begin{equation} \frac{\mathrm{d}^2f}{\mathrm{d} r^{\ast2}}\left(r(r^\ast)\right)=\frac{2m}{r^5\sqrt{1-\frac{2m}{r}+\frac{q^2}{r^2}}}P(r;m,q)\,, \label{rn-f2} \end{equation} with the polynomial function of $r$ and the two parameters $m,\ q$, \begin{equation} P(r;m,q)=r^3-\frac{3}{2m}(m^2+q^2)r^2+3q^2r-\frac{q^4}{m}\,. \label{P} \end{equation} Now in order to check that $\tfrac{\mathrm{d}^2f}{\mathrm{d} r^{\ast2}}\geq 0$ for $r^+_{\rm ph}\leq r < \infty$, we first observe in (\ref{rn-f2}) that the right-hand side is positive as $r\rightarrow \infty$, and it remains to be shown that the largest root of (\ref{P}) is at most $r^+_{\rm ph}$. To this end, consider the shifted polynomial $P(r+r^+_{\rm ph};m,q)$. Then it turns out that all monomial coefficients for $m^2>\frac{8}{9}q^2$ are positive. Therefore, by Descartes' Rule of Signs, there is no sign change and thus no positive root of the shifted polynomial, as required. Furthermore, direct computation shows that the limiting case is obtained for \[ P\Big(r^+_{\rm ph}; m^2=\tfrac{8}{9}q^2\Big)=0. \] \end{proof} Hence, we conclude that Dido's theorem also applies to the outer photon sphere of Reissner-Nordstr\"{o}m. \subsubsection{Tolman-Oppenheimer-Volkoff} In the final part of this section, we turn to smooth mass distributions that give rise to static spherically symmetric solutions of general relativity, rather than black hole solutions. Although such models may, in fact, not possess a photon sphere at all, it is instructive to see what the two conditions of Proposition \ref{prop-bm} mean physically in this setting. \newline \indent Starting with a general static spherically symmetric spacetime metric, \[ g=-e^{2A}\mathrm{d} t\otimes \mathrm{d} t+e^{2B}\mathrm{d} r\otimes\mathrm{d} r+r^2\left(\mathrm{d} \theta\otimes \mathrm{d} \theta+\sin^2\theta \mathrm{d} \varphi\otimes \mathrm{d} \varphi\right)\,, \] with functions $A=A(r), \ B=B(r)$, consider a spatial mass density $\rho=\rho(r)$ and pressure $p=p(r)$, which are defined in terms of components of the energy-momentum tensor. Now the cumulative mass parameter of the model is defined by \[ \mu(r)=4\pi G\int_0^r\rho(\bar{r})\bar{r}^2\mathrm{d} \bar{r}\,, \] and Einstein's field equations yield \[ e^{-2B}=1-\frac{2\mu}{r}\,, \qquad \frac{\mathrm{d} A}{\mathrm{d} r}=\frac{1}{1-\frac{2\mu}{r}}\left(\frac{\mu}{r^2}+4\pi Gpr\right)\,, \] as well as the Tolman-Oppenheimer-Volkoff equation of hydrostatic equilibrium, \[ \frac{\mathrm{d} p}{\mathrm{d} r}=-\frac{(\rho+p)(\mu+4\pi Gpr^3)}{r^2\left(1-\frac{2\mu}{r}\right)}\,. \] Moreover, the corresponding optical geometry has the following line element in the equatorial plane (cf. \cite{GW} for a discussion of lensing properties) whence, again, we can compare with (\ref{bm}), \[ \mathrm{d} t^2=e^{2B-2A}\mathrm{d} r^2+e^{-2A}r^2\mathrm{d} \varphi^2=\mathrm{d} r^{\ast2}+f^2(r^\ast)\Omega^2_1\,, \] and read off \begin{equation} \frac{\mathrm{d} f}{\mathrm{d} r^\ast}\left(r(r^\ast)\right)=e^{-B}\left(1-r\frac{\mathrm{d} A}{\mathrm{d} r}\right)\,. \label{tov-f1} \end{equation} Thus, the first condition (\ref{bm-cond1}) of Proposition \ref{prop-bm} becomes \[ 0\leq \frac{\mathrm{d} f}{\mathrm{d} r^*}<1\,: \quad 1-e^B< r\frac{\mathrm{d} A}{\mathrm{d} r}\leq 1\,, \] which can be recast in terms of upper and lower bounds on the pressure gradient, \begin{equation} 1-\frac{1}{\sqrt{1-\frac{2\mu}{r}}}<\frac{-r}{\rho+p}\frac{\mathrm{d} p}{\mathrm{d} r}\leq 1\,. \label{tov-cond1} \end{equation} Differentiating (\ref{tov-f1}) yields \[ \frac{\mathrm{d}^2 f}{\mathrm{d} r^{*2}}\left(r(r^\ast)\right)=e^{-2B+A}\left(r\frac{\mathrm{d} A}{\mathrm{d} r}\frac{\mathrm{d} B}{\mathrm{d} r}-\left(\frac{\mathrm{d} A}{\mathrm{d} r}+\frac{\mathrm{d} B}{\mathrm{d} r}\right)-r\frac{\mathrm{d}^2A}{\mathrm{d} r^2}\right)\,, \] which is related to the Gaussian curvature (\ref{gauss1}) of the equatorial plane in the optical geometry, \begin{align*} K&=-\frac{1}{f}\frac{\mathrm{d} ^2f}{\mathrm{d} r^{*2}}\\ &=-\frac{2\mu e^{2A-2B}}{r^3\left(1-\frac{2\mu}{r}\right)^2}\left[1-\frac{3\mu}{2r}-4\pi Gr^3\left(\frac{\rho+p-2\pi Gp^2r^2}{\mu}-\frac{2\rho+3p}{r}\right)\right]. \end{align*} Therefore, the second condition (\ref{bm-cond2}) can now be expressed as \begin{equation} \frac{\mathrm{d}^2 f}{\mathrm{d} r^{*2}}\geq 0\,: \quad 1-\frac{3\mu}{2r}-4\pi Gr^3\left(\frac{\rho+p-2\pi Gp^2r^2}{\mu}-\frac{2\rho+3p}{r}\right)\geq 0 \label{tov-cond2} \end{equation} in terms of density, pressure and the mass parameter. Thus, (\ref{tov-cond1}) and (\ref{tov-cond2}) provide physical conditions for Dido's theorem to apply, although we shall not pursue a more detailed discussion here. Instead, we proceed beyond the limiting case of Dido's theorem and provide a derivation of an isoperimetric inequality applicable to gravitational lensing in optical geometry, starting with a brief review of curve shortening flow. \section{An isoperimetric inequality} \label{sec-ineq} \subsection{Curve shortening flow} Suppose that $(\mathcal{S},\bar{g})$ is a Riemannian surface representing the optical geometry of a static spherically symmetric spacetime. \begin{definition} We say a simple closed geodesic $\gamma:\mathbb{S}^1\to\mathcal{S}$ is the boundary of a convexly foliated infinity, provided $\gamma=\partial \Sigma$ for some set $\Sigma\subset \mathcal{S}$, and $\mathcal{S}-\Sigma\cong\mathbb{R}^2-B(1)$. On $\mathcal{S}-\Sigma$ we have, $$\bar{g} = \mathrm{d} r\otimes \mathrm{d} r+r^2\mathrm{d}\varphi\otimes \mathrm{d}\varphi + h$$ with components satisfying $h_{\varphi i}=\mathcal{O}(r), h_{\varphi i,j} = \mathcal{O}(1)$. \end{definition} The reason for Definition 1 is clarified by the following lemma. \begin{lemma} The coordinate curves parametrized by $\varphi$ are convex for sufficiently large $r$. \begin{proof} It is an easy exercise to show that the unit normal to the coordinate curves $\varphi\mapsto(r_0,\varphi)$ \textit{pointing away from infinity} is given by $$N =\frac{1}{\sqrt{\det \bar{g}}}\left(-\bar{g}_{\varphi\varphi}\partial_r+\frac{\bar{g}_{r\varphi}}{\sqrt{\bar{g}_{\varphi\varphi}}}\partial_\varphi\right)\,.$$ It therefore follows that \begin{align*} \bar{g}\left( \nabla_{\frac{\partial_\varphi}{\sqrt{\bar{g}_{\varphi\varphi}}}}\frac{\partial_\varphi}{\sqrt{\bar{g}_{\varphi\varphi}}},N\right) &= \frac{-1}{\sqrt{\bar{g}_{\varphi\varphi}\det \bar{g}}}\left(\bar{g}\left( \nabla_{\partial_\varphi}\partial_{\varphi}, \partial_r\right)-\frac{\bar{g}_{r\varphi}}{\bar{g}_{\varphi\varphi}}\bar{g}\left( \nabla_{\partial_\varphi}\partial_\varphi,\partial_\varphi\right)\right)\\ &=\frac{-1}{\sqrt{\bar{g}_{\varphi\varphi}\det\bar{g}}}\Big(\bar{g}_{r\varphi,\varphi}-\frac12g_{\varphi\varphi,r}-\frac12\frac{\bar{g}_{\varphi\varphi,\theta}}{\bar{g}_{\varphi\varphi}} \bar{g}_{r\varphi}\Big)\\ &=\frac{1}{\sqrt{\det \bar{g}}}\left(1+\mathcal{O}\left(\frac{1}{r^2}\right)\right)\,. \end{align*} This is clearly positive for sufficiently large $r$. \end{proof} \end{lemma} \begin{definition} Within a convexly foliated infinity, we say a closed geodesic $\gamma:\mathbb{S}^1\to\mathcal{S}$ is called outermost whenever a closed geodesic $\tilde{\gamma}:\mathbb{S}^1\to\mathcal{S}$ satisfying $r\circ\tilde{\gamma}\geq r\circ \gamma$ implies $\gamma=\tilde{\gamma}$. \end{definition} We refer the reader to \cite{A1,A2,G1,G2} for an in-depth study of curve shortening and highlight in the following the main facts needed in our analysis. Curve shortening is given by the flow $C:\mathbb{S}^1\times I \to \mathcal{S}$, $I\subseteq \mathbb{R}$, defined by $$\frac{\partial C_s}{\partial s} = \kappa N\,,$$ where $\kappa$ is the geodesic curvature of the curves $C_s$ and $N$ is the unit normal vector (density) field. This is the gradient flow for the length functional maximizing the decrease in length: \begin{equation} \frac{\mathrm{d} |C_s|}{\mathrm{d} s} = -\int_{C_s}\kappa^2\mathrm{d} t\,, \label{length} \end{equation} and the area change with respect to $C_s$ satisfies \begin{equation} \frac{\mathrm{d} |A_s|}{\mathrm{d} s}= -\int_{C_s} \kappa \mathrm{d} t\,. \label{area} \end{equation} For any simple closed embedded curve $C_0$ a maximal solution to curve shortening exists on a time interval $0\leq s<s_{\rm max}$. \begin{proposition} For $(\mathcal{S},\bar{g})$ such that the convex hull of any compact set is compact, if, $s_{\rm max}<\infty$, $C_s$ converges to a point. If, $s_{\rm max}=\infty$, then any tangential derivative of the curvature of $C_s$ satisfies: $$\lim_{s\to\infty}\sup_{C_s}|\kappa^{(n)}(s)|=0\,.$$ Moreover, any sequence $s_i\to\infty$ has a subsequence $s_{i_j}$ for which $C_{s_{i_j}}$ converges to some geodesic of $(\mathcal{S},\bar{g})$. In particular, if $(\mathcal{S},\bar{g})$ has isolated geodesics, then either $C_s$ converges to a point or a geodesic. \label{prop-csf} \end{proposition} \begin{proposition}\cite{H}(Avoidance Principle) Given any two disjoint curves $C_0$, $\tilde{C}_0$. Under curve shortening the evolving curves $C_s$, $\tilde{C}_s$ remain disjoint throughout the flow. \end{proposition} The Avoidance Principle is a very useful property that holds, roughly speaking, for the following reason. If any two curves evolving under curve shortening was to touch tangentially at an instant of time, then at the point of touching, one curvature would have to be greater than or equal the other. This means the two curves have to intersect if we run the flow parameter backwards. Therefore, a first instance of touching is avoided between two initially disjoint curves flowing under curve shortening. \begin{proposition}\cite{G2}(Corollary 2.6) The number of inflection points on the curve does not increase with time. \label{prop-csf2} \end{proposition} \subsection{Application to optical geometry} \begin{lemma} Assume $\gamma:\mathbb{S}^1\to\mathcal{S}$ bounds a convexly foliated infinity. Then, if $\gamma$ is outermost, all closed geodesics are bounded from infinity by $\gamma$. \begin{proof} Assume, up to a possible diffeomorphism of $\mathbb{S}^1$, $r\circ\tilde{\gamma}(\varphi) \geq r\circ \gamma(\varphi)$ for some $\varphi\in\mathbb{S}^1$. For sufficiently large $r$, we can choose a convex curve $\varphi\mapsto(r,\varphi)$ to initiate curve shortening, namely $C_s$. Since both $\gamma_s\equiv \gamma, \tilde{\gamma}_s\equiv \tilde{\gamma}$ under curve shortening we have, by the Avoidance Principle and Proposition \ref{prop-csf}, that some subsequence $C_{s_i}$ converges to a geodesic $C_\infty$ with $r\circ C_\infty\geq \max\{r\circ\tilde{\gamma},r\circ \gamma\}$. Therefore, $C_\infty = \gamma$, and $r\circ\tilde{\gamma}(\varphi)=r\circ \gamma(\varphi)$. \end{proof} \end{lemma} \begin{lemma} If the geodesic $\gamma$ is outermost, and $C$ is a piecewise smooth closed curve satisfying $r\circ C\geq r\circ \gamma$, then $|\gamma|\leq |C|$. \begin{proof} By smooth curve approximation, it suffices to assume $C$ is smooth. Therefore, flowing $C=C_0$ under curve shortening we know by the Avoidance Principle that any subsequence converging to a geodesic necessarily converges to $\gamma$. Since curve shortening decreases length, the result follows. \end{proof} \label{lem-csf} \end{lemma} Now this can be applied to gravitational lensing, for instance in the Schwarzschild optical geometry discussed previously, as illustrated schematically in Fig. \ref{fig2}. In this case, the piecewise smooth closed curve $C$ can, of course, be thought of as comprising two geodesics in the optical geometry which correspond to light rays connecting a light source and an observer. \\ \indent With this situation in mind, we shall now conclude this paper with a result that adapts the standard isoperimetric inequality (\ref{isoineq}) to this optical geometry context. \begin{figure}[h] \centering \def\svgwidth{0.95\textwidth} \input{curveshort3.pdf_tex} \caption{Curve shortening in optical geometry. Light source and observer (at vertices) are connected by two light rays (bold) enclosing $\gamma$ at $r=r_{\rm ph}$.} \label{fig2} \end{figure} \begin{theorem} With the hypotheses of Lemma \ref{lem-csf}, if $C$ is convex and the annulus $A$ with $\partial A = C\cup \gamma$ supports Gaussian curvature satisfying $K\leq -\delta^2$, then $$|C|^2\geq |\gamma|^2+\delta^2|A|^2.$$ \end{theorem} \begin{proof} We adapt an approach of Topping in \cite{T}. Namely, if $C_0$ is convex then by Proposition \ref{prop-csf2} the curve shortening flow $\{C_s\}$ remains convex for future times, bounding the annuli $A_s\subset A$. By the Gauss-Bonnet theorem and (\ref{area}), $$\int_{A_s}K\mathrm{d} A = -\int_{C_s}\kappa \mathrm{d} t = \frac{\mathrm{d}|A_s|}{\mathrm{d} s}\leq0.$$ As a result, \begin{align*} -\delta^2|A_s|\frac{\mathrm{d}|A_s|}{\mathrm{d} s}&\leq \Big(\int_{A_s}K\mathrm{d} A\Big) \frac{\mathrm{d}|A_s|}{\mathrm{d} s}=\Big(\int_{C_s}\kappa \mathrm{d} t\Big)^2\\ &\leq |C_s|\int_{C_s}\kappa^2\mathrm{d} t = -|C_s|\frac{\mathrm{d} |C_s|}{\mathrm{d} s}\,, \end{align*} where the last line follows from Jensen's inequality for integrals and (\ref{length}). Now integrating over the flow parameter yields the result. \end{proof} \section*{Acknowledgements} This material is based upon work supported by the National Science Foundation (US) under Grant No. 1641020.
\section{Introduction} \vspace{-0.5cm} Chiral molecules or artificial chiral nanostructures exhibit the inherent property of interacting differently with left-handed and right-handed circularly polarized light \cite{barron_book,gansel_2009,valev_2013,frank_2013,esposito_2015_2,wozniak_2018}. One of the possible manifestations of this spin-dependent interaction is circular dichroism (CD), i.e. the differential absorption of circular polarization states of opposite handedness, which is also utilized as an enabling feature in CD spectroscopy for enantiomeric distinction. This differential light-matter interaction is a direct consequence of the chiral geometry of the involved scatterers and a spinning light field. Artificial chiral structures have also been utilized for the conversion of incoming spin angular momentum (SAM) of light into orbital angular momentum (OAM) \cite{gorodetski_2013}. In a 3D chiral nanostructure or molecule, this phenomenon is caused by the excited chiral dipole \cite{hu_2017,wozniak_2018,eismann_2018}, consisting of parallely aligned electric and magnetic dipole moments oscillating with a phase-delay of $\pm \pi/2$, and directly resulting from the geometry of the system. The vorticity of the OAM-carrying light generated by a chiral entity illuminated with circularly polarized light depends on the relative phase between the aforementioned electric and magnetic dipoles, and hence, on the handedness of the chiral object itself \cite{wozniak_2018}. Along the same line it sounds reasonable that also the inversion of this scheme might be applicable. In other words, a chiral object illuminated with a light beam exhibiting a helical phase front (or equivalently, carrying OAM) may be able to couple to a chiral nanostructure based on the sign of the vorticity, partially converting OAM back into SAM with the helicity depending on the vorticity of the illuminating beam and the handedness of the structure. Although this concept appears consequential, it has been a common understanding that chiral media, especially when treated on the level of a pure dipolar response, are not capable of distinguishing the vorticity of the impinging light and hence, structural chirality cannot couple to OAM on the dipolar level \cite{andrews_2004,araoka_2005,loeffler_2011,giammanco_2017}. As a consequence, chiral media illuminated with linearly polarized Laguerre-Gaussian (LG) beams with an azimuthal index $l$ = 1 or $l$ = -1 would show the same transmission, reflection and absorption spectra, as opposed to the differential absorption (i.e., CD) observed for illumination with left- and right-handed circularly polarized light. A simple argument for this conclusion is the fact that OAM originates from the spatial phase distribution of a light beam or field. Thus, OAM could be labeled as a non-local property of a light beam, in contrast to SAM, which is a local feature related to the polarization. This poses an apparent contradiction with the simple idea of inverting the spin-to-orbit conversion mediated by a chiral nanostructure as described above.\\ Here, we show that an individual chiral dipolar nanostructure is in fact capable of sensing the vorticity of the impinging light beam. It can distinguish between light beams carrying phase vortices of opposite charges similar to its capability of sensing the handedness or sign of the SAM of a circularly polarized light beam (see, e.g., \cite{wozniak_2018} and references therein).\\ In the scheme discussed here, we take advantage of non-paraxial propagation to create non-zero optical chirality or helicity density \cite{tang_2010} from a linearly polarized LG beam of charge $l$ = 1 or $l$ = -1, which possesses no SAM before being focused (see Fig.~\ref{fig:_01_focal_fields}). Thus, a chiral nanostructure placed in the focal field indirectly interacts with the field's OAM through the relative phase between the electric and magnetic longitudinal field components. Specifically, we show that the sign of the phase-charge of an OAM-carrying light beam gets encoded in the phase delay between the longitudinal electric and magnetic field components on the optical axis in the focal plane and, equivalently, in the sign of the optical chirality of the field \cite{tang_2010} formed there. In turn, the dipole-like chiral nanostructure can interact differently with this optical chirality depending on its own geometrical handedness and the chiral dipole it supports at the fundamental resonance. In contrast to the well-known spin-to-orbit coupling in tightly focused circularly polarized light beams \cite{zhao_2007,bliokh2015}, we convert OAM to local non-zero optical chirality. \begin{figure*}[t] \centering \includegraphics[width=1\textwidth]{fig_01_focal_fields.pdf} \caption{\textbf{$\text{LG}_{0}^{\pm1}$ beams and their field components upon tight focusing.} \textbf{a} Intensity and phase distributions of the input $\text{LG}_{0}^{\pm1}$ beams. \textbf{b} Calculated distributions of focal electric ($|\textbf{E}|^2$) and magnetic ($|\textbf{H}|^2$) field intensities (and relative phases) of tightly focused (NA = 0.9) beams. The distributions are normalized to the maximum value of the total energy density ($\frac{\epsilon_{0}}{2}|\textbf{E}|^2+\frac{\mu_{0}}{2}|\textbf{H}|^2$). The on-axis focal field comprises of longitudinal electric and magnetic fields oscillating with a phase difference $\pm\pi/2$ which corresponds to the vorticity-sense of the incoming beam. \textbf{c} Linear and dephased oscillation of $\text{E}_{z}\pm i\text{H}_{z}$ generates optical chirality $C$ of opposite sign for both input beams, but no zero spin density $\textbf{s}$ on the optical axis. The dashed circles in first line of \textbf{b} (left column) outline the top-view of the nanohelix drawn to scale.} \label{fig:_01_focal_fields} \end{figure*} \section{Interaction of a dipolar chiral scatterer with tightly focused $\text{LG}_{0}^{\pm1}$ beams} \label{sec:_theory} We start by analyzing the above-mentioned phenomenon of OAM generation by a chiral object. In the interaction of circularly polarized light with a sub-wavelength-sized chiral structure (see Fig.~\ref{fig_02_spectra}a), a chiral dipole is excited as a consequence of the chiral geometry of the illuminated structure. A chiral dipole is formed by parallely aligned electric and magnetic dipole moments oscillating with a phase delay \cite{hu_2017,wozniak_2018,eismann_2018}. The emission of a chiral dipole is, therefore, ruled by the radiation of an out-of-phase superposition of parallel electric and magnetic dipole moments. The emission of an electric and a magnetic dipole moment observed around the dipole axis is radially and azimuthally polarized light, respectively. Hence, the aforementioned superposition is equivalent to a circularly polarized LG-beam of charge $|l|$ = 1 with the sign of the spin and OAM depending on the relative phase between the dipoles and the handedness of the chiral dipole. We consider tight focusing of linearly $x$-polarized LG beams of zero radial order and azimuthal order $l$ = $\pm$1 to exclude any possible influence of SAM from the input beam on the interaction between the field and the chiral nanostructure. We therefore start with a paraxial beam (propagating along the $z$-axis) carrying OAM only. The electric field distribution in the back focal plane of the focusing lens can be expressed as (see Fig.~\ref{fig:_01_focal_fields}): \begin{equation} \textbf{E} = \text{E}_{0}\frac{r}{w_{0}}e^{-\frac{r^{2}}{w_{0}^{2}}}e^{\pm i l\phi}\hat{\textbf{e}}_{x}\text{,} \label{eq:_lg_beam} \end{equation} where $r$ and $\phi$ are the radial and azimuthal coordinates, respectively, and $w_{0}$ is the equivalent beam waist. The focal fields can be calculated using vectorial diffraction theory \cite{richards_1959,novotny_2006}. Figure~\ref{fig:_01_focal_fields} shows the focal fields calculated for the parameters used in the experiment: $w_{0}$ = 2 mm, $NA$ = 0.9 $f$ = 2 mm and $\lambda$ = 1450 nm, with $f$ and $\lambda$ the focal length of the focusing system and the wavelength of the beam, respectively. In the following, we are mainly interested in the structure of the focal field on and near the optical axis in the focal plane. On the optical axis, the electromagnetic field is purely longitudinal (transverse components cross zero), with these axial electric and magnetic field components being dephased by exactly $\pm \pi/2$. A sub-wavelength-sized nanostructure placed at this position in the focal plane will be excited by these field components. This configuration resembles the structure of a chiral dipole as discussed above. We therefore expect efficient coupling to a chiral nanostructure, if the relative phase between the electric and magnetic field components matches the relative phase of the electric and magnetic dipole moments forming the chiral dipole mode. The latter is dictated by the geometrical handedness of the chiral nanostructure.\\ The aforementioned focal fields give rise to non-zero optical chirality, defined as (see Fig. \ref{fig:_01_focal_fields}c) \cite{lipkin_1964,tang_2010}: \begin{equation} C=-\frac{\omega}{2c^{2}}\Im\left[\textbf{E}^{*}\cdot\textbf{H}\right]\text{,} \label{eq:_optical_chirality} \end{equation} providing for a quantitative measure of how strongly chiral an electromagnetic field is. Importantly, the sign of the vorticity of the input beam is manifested by the phase relation between the longitudinal electric and magnetic fields as shown in Fig.~\ref{fig:_01_focal_fields}b. Thus, for incoming beams of opposite charge $l$ = $\pm$1, $C^{+1}$ = $-C^{-1}$ $\neq$ 0. In addition, the SAM (density) defining the local degree of circular polarization is zero on the optical axis, owing to the chosen symmetry (see Fig.~\ref{fig:_01_focal_fields}). It should be stressed here that the input beam (\eqref{eq:_lg_beam}) possesses neither a non-zero optical chirality nor SAM at any point in the back focal plane. Hence, the observed non-zero optical chirality on the optical axis in the focus can be solely attributed to the formation of electric and magnetic longitudinal fields with their relative phase ruled by the sign of the OAM.\\ In previous studies \cite{andrews_2004,araoka_2005,loeffler_2011,giammanco_2017} it was shown that a dipolar chiral object (e.g. a molecule) cannot show differential interaction with linearly polarized LG beams of opposite azimuthal index. More recently, it was proposed that the OAM of paraxially propagating LG modes can engage in chiral light-matter interactions via quadrupolar responses \cite{quinteiro_2017,forbes_2018,andrews_2018,kerber_2018}. Also, the role of longitudinal fields in chiral interactions was emphasized recently \cite{rosales_2012,quinteiro_2017}.\\ With our scheme we now show experimentally and theoretically that tightly focused linearly polarized $\text{LG}_{0}^{\pm1}$ beams provide the necessary condition for a dipole-like chiral particle to scatter differently for different vorticities of the input beam via the creation of longitudinal field components on the optical axis and the resulting optical chirality. Hence, we take advantage of non-paraxial propagation of structured light and the corresponding longitudinal field components created at the focal plane \cite{rosales_2012,eismann_2018}.\\ In our experiment, we utilize a plasmonic nanohelix as a prototypical chiral scatterer (see Fig.~\ref{fig_02_spectra}a). In our previous study \cite{wozniak_2018} it has been shown that the fundamental resonance of this single-loop (right-handed) plasmonic nanohelix can be approximated by the dominating longitudinal components of the electric and magnetic dipoles $\text{p}_{z}-i\text{m}_{z}$. In this context, $\text{p}_{z}$ and $\text{m}_{z}$ refer to the real and positive-valued amplitudes of the $z$-components of the electric and magnetic dipoles, respectively (see Fig.~\ref{fig_02_spectra}a). It can be therefore treated as a dipole-like chiral nanostructure. Since the nanohelix is optically chiral, it features a non-zero cross-polarizability $G''\propto -\Im\left[\textbf{p}^{*}\cdot\textbf{m}\right] \neq$ 0 \cite{barron_book,hu_2017}. We note that the phase delay of $-i$ and thereby also the handedness of the chiral dipole at the fundamental resonance is defined by the right-handed geometry of the structure studied here. Therefore, only one of the tightly focused $\text{LG}_{0}^{\pm1}$ beams will be able to interact with the helix by exciting the corresponding chiral dipole.\\ \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{fig_02_setup_transmission.pdf} \caption{\textbf{Measurement scheme and the results.} \textbf{a} Simplified sketch of the experimental setup \cite{banzer_2010,wozniak_2018} for probing the vorticity of the incoming beam with a chiral scatterer and scanning-electron micrograph of the utilized nanostructure. \textbf{b} Dimensions of the nanohelix. The strength of its chiroptical response can be described by the chiral dipole oscillating along the $z$-direction (helix axis). \textbf{c} Experimental and simulation spectra of the fundamental resonance of the nanohelix as a function of the vorticity of the incoming beam. The insets depict the focal optical chirality and the relative size and position of the nanohelix in the focal plane.} \label{fig_02_spectra} \end{figure*} \section{Experimental results} \label{sec:_expermient} To experimentally (and numerically) verify the concept outlined above, we use a gold nanohelix as a sub-wavelength-sized chiral dipolar scatterer (see Fig.~\ref{fig_02_spectra}a-b). It was fabricated by electron-beam-induced deposition \cite{hoeflich_2011} combined with a subsequent grazing incidence metal coating process, resulting in a core-shell gold nanohelix. Using plane-wave-like circularly polarized excitation, the fundamental optical properties of this nanostructure were studied in detail in an article published recently \cite{wozniak_2018}. The resonance wavelength of the fundamental resonance is 1450 nm. To prove differential interaction of the nanohelix with the incoming light field featuring opposite vorticities, we measured the transmittance spectra around the fundamental resonance using a custom-built optical setup (see simplified sketch in Fig.~\ref{fig_02_spectra}b, and more details in Refs.~\cite{banzer_2010,wozniak_2018}). The helix was excited with tightly focused linearly $x$-polarized $\text{LG}_{0}^{\pm1}$ beams ($NA$ = 0.9 and $w_{0}/f$ = 1). The linearly polarized LG modes were generated using right- and left-handed circularly polarized Gaussian beams transmitted through a $q$-plate of charge -1/2 \cite{bomzon_2001,marrucci_2006} and a linear polarizer. Subsequently, the spatial modes were cleaned with a Fourier filter and focused onto the sample. The nanohelix fabricated on a glass substrate was placed on a 3D piezo-stage, which allowed for precise positioning of the structure on the optical axis in the focal plane. The transmitted and forward-scattered light was collected by a second high-NA (1.3) objective and detected using a photo-diode. We note that for a proof-of-principle experimental demonstration we measured only the total transmitted power, which should differ for different signs of OAM of the input beams.\\ Figure~\ref{fig_02_spectra}c shows the transmittance ($T$) spectra of the nanohelix measured wavelength-by-wavelength in the vicinity of its fundamental resonance. As explained, the strength of the interaction depends critically on the vorticity of the incoming beam. The recorded spectra show that the tightly focused $\text{LG}_{0}^{-1}$ beam can couple more efficiently to the chiral dipole mode of the nanohelix at the fundamental resonance. This is a direct consequence of the longitudinal field components and their relative phase ($\text{E}_{z}- i\text{H}_{z}$) matching the chiral dipole handedness ($\text{p}_{z}-i\text{m}_{z}$; see Fig.~\ref{fig_02_spectra}b) of the right-handed structure investigated here. The corresponding simulations (based on finite-difference time-domain method) resemble the experimental results very well (see solid continuous lines in Figure~\ref{fig_02_spectra}c). The presented spectra provide experimental and numerical evidence that a dipolar chiral scatterer can distinguish the vorticity of an incoming beam carrying OAM via the generation of non-zero optical chirality by tight-focusing.\\ Additional simulations (not shown here) also verify that by changing the handedness of the nanohelix, also the transmission properties change accordingly and stronger coupling is observed for an $\text{LG}_{0}^{1}$ beam. To also make sure that the observed differential transmission is indeed a direct consequence of the sign of the on-axis optical chirality, and, hence, the OAM of the input beams, we also checked the influence of the rotation angle of the helix about the optical axis. We find that the relative orientation of the incoming linear polarization state (and corresponding off-axis transverse field components in the focus) with respect to the nanohelix of finite length twisting around the $z$-axis does not play an important role. Rotating the nanohelix about the $z$-axis only changes slightly the strength of the observed differential transmission (see Supplementary Material).\\ It is interesting to note here that also the first higher-order resonance of the nanohelix (at $\lambda$ = 840 nm) can be described as a system of coupled electric and magnetic dipoles with $G''\neq0$ \cite{wozniak_2018}. In this case, however, the chiroptical response of the helix, in first approximation, is dominated by transverse dipole moments $\text{p}_{x}+i\text{m}_{x}$ aligned orthogonal to the optical axis of the system. For the excitation scheme based on the on-axis longitudinal fields presented above, no efficient coupling at the wavelength of the first higher-order resonance can be achieved (see Supplementary Material for details). This is contrary to the response of the helix to plane-wave-like circularly polarized excitation, which has a better overlap with the $x$-polarized chiral dipole at the first higher-order resonance. \section{Conclusion} \label{sec:_conclusion} In summary, we have studied the role of OAM in chiral light-matter interactions on the level of an individual dipolar chiral nanostructure. The tight focusing of linearly polarized $\text{LG}_{0}^{\pm1}$ modes carrying no SAM but only OAM (of charge $|l|$ = 1) results in the creation of non-zero optical chirality peaking on the optical axis in the focal plane. The twisting sense of phase fronts, and, equivalently, the sign of the OAM of the incoming light field define the sign of the focal optical chirality. The corresponding field couples preferentially to the nanohelix's fundamental chiral mode if the sign of the optical chirality in the focal field (dictated by the vorticity of the input field) matches that of the relative phase between the electric and magnetic components of the nanohelix's chiral mode (dictated by the helix's handedness). In contrast to recent studies \cite{forbes_2018,andrews_2018}, the vorticity of the incoming beam was sensed via dipolar interactions not involving any higher order multipoles. To prove our concept experimentally, we investigated the differential transmission of $\text{LG}_{0}^{\pm1}$ beams tightly focused onto a single plasmonic nanohelix. Due to the sign relation between the incoming OAM and the focal optical chirality, the nanostructure was able to unambiguously recognize the vorticity of the incoming light field. Our study constitutes a new route for tailoring the chiral light-matter interactions at the nanoscale. In addition, this study sheds new light on the discussion of the role of OAM in chiral light-matter interactions. The polarization rearrangement of the focal fields caused by non-paraxial propagation is a straightforward way of engineering focal fields and optical chirality at the nanoscale, and for studying selectively the individual chiral modes of an arbitrary structure. \section*{Funding Information} Helmholtz Association, Helmholtz Postdoctoral Fellowship (PD140); CONACyT -- DAAD (Proalmex) grant under the project No. 267735; Project PPP Mexiko 2j16 (project-ID: 57274178) supported by DAAD with funds provided by the Federal Ministry of Education and Research (BMBF); Max Planck--University of Ottawa Centre for Extreme and Quantum Photonics. \section*{Acknowledgments} The authors thank Sergey Nechayev and Martin Neugebauer for fruitful discussion.
\section{Introduction} Object detection and localization has always been a hot topic of computer vision. Traditional methods, like YOLO[1], SSD[2] and Mask R-CNN[3], have experienced a tremendous success in 2D domain. However, those methods cant achieve accurate semantic understanding of the objective three-dimensional world. The ultimate goal of computer vision is to study the nature of the objective threedimensional world through images. To tackle this, more and more attention has been paid to object 6D pose estimation. Real-time 6D pose estimation is crucial for augmented reality, virtual reality and robotics. Currently, feature-based methods[4,5,6], template-based methods[7,8] and RGB-D methods[9,10,11,12,13] have achieved robust results to some extent. Feature-based methods tackled this task by matching feature points between 3D models and images. However, only when there are rich textures on the objects that those methods work. As a result, they are unable to handle texture-less objects[14]. Template-based methods use a rigid template to match different locations in the input image. Such methods are likely to be affected by occlusions. RGB-D methods use depth data as additional information, which simplifies the task. However, active depth sensors are power hungry, which makes 6D objective detection methods for passive RGB images more attractive for mobile and wearable cameras[15]. Besides, acquiring depth data needs additional hardware costs. Deep learning techniques have recently become mainstream to estimate 6D object pose, among which [15] and [21] are two typical examples. In [15, 21], CNNs are used to predict 2D projections of 3D bounding boxs corners (for the sake of simplification, we call the 2D projections pts), then 6D pose are obtained by PnP algorithm. The deficiency of the two methods is that PnP costs extra time, decreasing the efficiency. In this paper, we propose a generic framework which overcomes the shortcomings of existing methods to estimate 6D object pose. We extend YOLO V2[26] to perform 6D pose estimation from single RGB images. In the training phase, we feed images to the fully convolutional channels to output the 3D translation parameters (tu, tv, tw) and 3D rotation parameters (a, b, c). The special layer, Collinear Equation Layer, follows the meta-architecture of YOLO with architecture adaptation and tuning to predict the pts. Then we adjust the network with the pts error. Unlike [15] and [21], in the testing phase, we discard Collinear Equation Layer and directly predict 6D pose parameters. Our work has the following advantages and contributions: a) We propose a novel method for 6D pose estimation in a really end-to-end manner. We bring in Collinear Equation Layer to regress 2D projections of 3D bounding boxs corners to train our network. In the testing stage, we discard the last layer and directly obtain 6D pose, avoiding PnP algorithm, which makes the estimation fast and accurate. b) We introduce a brand new representation for 3D rotation. This representation is easy to regression. c) Extending YOLO V2 to directly predict 6D pose. The remainder of the paper is organized as follows. After the overview of related work, we introduce our method.Then we display the experimental results, followed by the final conclusion. \section{Related Work} The literature on 6D pose estimation is very large and we have mentioned some in the previous section, thus we will focus only on recent works based on deep learning. Most of recent works use CNN to solve 6D pose problems, including camera pose[16, 17] and object pose[15,18,19,20,21,22,23,24]. In [16,17], the authors train CNNs to directly regress 6D camera pose from a single RGB image. The camera pose estimation is much easier than the object pose estimation, for there is no need to detect any object. In [18,19], the authors use CNNs to regress 3D object pose directly, their works focus only on 3D rotation estimation while 3D translation is not included. In [20], SSD detection framework is extended to 6D pose estimation. The authors transform pose detection into two-stage classification tasks, view angle classification and in-plane rotation classification. However, wrong classification in either stage could cause an incorrect pose estimation. In [22], the authors first use a CNN to regress 3D object orientation, then combines these estimates with geometric constraints provided by a 2D object bounding box to produce a complete 3D bounding box. However, in general, this method needs to solve 4096 linear equations. In special circumstances, such as the KITTI dataset[25], object pitch and roll angles are both zero, there are still 64 equations to be solve, which makes the method computational costly. In [23], the pose parameters are decoupled into translation and rotation, then the rotation is regressed via a Lie algebra representation. This method assumes that the 2D projection of the objects origin is in the 2D boxs center, which makes the estimation of translation inaccuracy. In [24], a feedback loop consisting of deep networks are developed for 6D pose estimation. In this method, the inaccurate pose data is re-projected and compared with the original image for accurate correction. However, the preparation of sample is intricate. BB8[21] provides a precise method to estimation 6D pose. the authors firstly use a segmentation network to localize objects. Then another CNN is used to predict the 2D projections of the 3D bounding boxs corners around the object. The 6D pose is estimated through a PnP algorithm. Finally, a CNN is trained to refine the pose. The method is multi-stage, which increases their running time. Similar to BB8, [15] detects the 2D projections of the corners, too. But the authors use a direct way by propose a singleshot deep CNN architecture, then employ PnP algorithm to get the 6D pose. Both [21] and [15] achieve high accuracy. However, the two method employ PnP algorithm to attain 6D pose, which is not really end-to-end, and the PnP algorithm will cost extra time. Besides, the regression of each corner is independent and no constraint exists. This may result in that some corners are inaccurately predicted, which will have bad impact on the PnP algorithm. Compared to them, our method regresses the corners with constraint produced by Collinearity Equation Layer in the training stage, but directly predict 6D pose while testing. In this way, we avoid the shortcomings raised by PnP. \section{Method} \subsection{Position parameter} According to the small hole imaging equation we have the following formula: \begin{equation} \begin{split} {{t}} &= {{z}}{K^{ - 1}}\left[ {\begin{array}{*{20}{c}} u\\ v\\ 1 \end{array}} \right] \\ &= {\rm{z}}{K^{ - 1}}\left[ {\begin{array}{*{20}{c}} {W({c_0} + 0.5 + \Delta u)/w}\\ {H\left( {{r_0} + 0.5 + \Delta v} \right)/h}\\ 1 \end{array}} \right] \end{split} \end{equation} considering \begin{equation} {K^{ - 1}} = \left[ {\begin{array}{*{20}{c}} {\frac{1}{{{f_x}}}}&0&{ - \frac{{{c_x}}}{{{f_x}}}}\\ 0&{\frac{1}{{{f_y}}}}&{ - \frac{{{c_y}}}{{{f_y}}}}\\ 0&0&1 \end{array}} \right] \end{equation} we get \begin{equation} {\bf{t}} = {\bf{b}}{{\bf{e}}^{tw}}\left[ {\begin{array}{*{20}{c}} {\frac{1}{{{{\bf{f}}_x}}}\left( {\frac{{W({c_0} + 0.5 + s\sigma \left( {{t_u}} \right))}}{w} - {c_x}} \right)}\\ {\frac{1}{{{{\bf{f}}_y}}}\left( {\frac{{H({r_0} + 0.5 + s\sigma \left( {{t_v}} \right))}}{h} - {c_y}} \right)}\\ 1 \end{array}} \right] \end{equation} where $\sigma(.)$ is the loggy excitation function and s is an adjustable parameter. Considering that the object may be distributed over a large range, we take s=4.0. The neural network outputs three translation variables tu, tv, tw $\rightarrow$ [$\Delta$u, $\Delta$v, z]$\rightarrow$[X Y Z]=t. \subsection{Pose parameter} The rotation matrix R in the collinear equation can perfectly express the rotation of the camera relative to the object. However, the R matrix is not suitable for direct prediction using neural networks. Because R is a unit orthogonal matrix, there are too many redundancy, so we use abc conversion: \begin{equation} \begin{split} R &= \frac{1}{{1 + {a^2} + {b^2} + {c^2}}}\\&\left[\!\!\!\! {\begin{array}{*{20}{c}} {1 + {a^2} - {b^2} - {c^2}}&{2ab - 2c}&{2ac + 2b}\\ {2ab + 2c}&{1 - {a^2} + {b^2} - {c^2}}&{2bc - 2a}\\ {2ac - 2b}&{2bc + 2a}&{1 - {a^2} - {b^2} + {c^2}} \end{array}} \!\!\!\!\right] \end{split} \end{equation} The abc can be predicted by the neural network and then the (4) equation can be used to obtain the pose matrix. The abc transform does not need to worry about the angle loop problem, and there is no redundancy without worrying about the unitized constraint problem. Therefore, the abc is selected for network pose prediction. \subsection{Overall pipeline} The main idea of this paper is to propose a full convolution network that implements 6DPose. This idea is to add a collinear equation layer after the region layer of the deep network. In the training phase, the region layer predicts the position and rotation parameters R and t. The coordinates u, v are backpropagated by regression 2D pts to correct R and t. In the prediction phase, R and t are directly obtained by the region layer. Figure 1 shows the pipeline. \begin{figure*} \begin{center} \centerline{\includegraphics[width=16cm]{pipeline.jpg}} \end{center} \caption{Overall pipeline.} \end{figure*} The input of the neural network is a 3*416*416 color image, which are converted into a 13*13 array through a full convolutional network, and output 5*(4+3+3+1+c) channels through a 13x13 arrays region layer, in which 4 channels record 2D box coordinate information, three channels abc record rotation data, three channels tu,tv,tw are responsible for 3d translation. one channel is responsible for whether the object is near the cell, c channel softmax outputs the target category. In order to improve the detection accuracy, we have designed five anchors with reference to yolov2, which are used to extract objects of different scales. \begin{figure*} \begin{center} \centerline{\includegraphics[width=12cm]{regionlayer.jpg}} \end{center} \caption{Schematic diagram of the 3D position prediction of the region layer.} \end{figure*} \section{Collinear Equation Layer} As shown in Fig.1, The Collinear Equation Layer is responsible for adjusting the position and rotation parameters by pts error back propagation. \subsection{Forward propagation} \begin{equation} z\left[ {\begin{array}{*{20}{c}} u\\ v\\ 1 \end{array}} \right] = KR\left( {X - T} \right) = K\left( {RX + t} \right) \end{equation} The last layer in Figure 1 is a mapping operation that implements small hole imaging. Divide the first line of equation (5) by the third line, and divide the second line by the third line to get the collinear equation as follows: \begin{equation} \left\{ \begin{array}{l} u = {c_x} + {f_x}\frac{X}{Z} = {c_x} + {f_x}\frac{{{r_{11}}{X_x} + {r_{12}}{X_y} + {r_{13}}{X_z} + {{\rm{t}}_x}}}{{{r_{31}}{X_x} + {r_{32}}{X_y} + {r_{33}}{X_z} + {t_z}}}\\ v = {c_y} + {f_y}\frac{Y}{Z} = {c_y} + {f_y}\frac{{{r_{21}}{X_x} + {r_{22}}{X_y} + {r_{23}}{X_z} + {t_y}}}{{{r_{31}}{X_x} + {r_{32}}{X_y} + {r_{33}}{X_z} + {t_z}}} \end{array} \right\} \end{equation} Among them, $\text{r}_{11}$-$\text{r}_{33}$ are the 9 elements of the unit orthogonal matrix R, which can be expressed by abc in Eq.(4).The formula (6) can be regarded as the forward propagation formula of the collinear equation layer. Where R is obtained by abc output from the neural network region layer through the formula (4), and t is obtained by the formula (3). \begin{figure}[bh] \centerline{\includegraphics[width=8cm]{forward.jpg}} \vspace*{8pt} \caption{Forward propagation calculation process} \end{figure} \subsection{Backward propagation} The collinear equation layer is only used during the training phase in order to pass the error of the pts to the 6D pose parameters in region layer error, so that the error weights of the R and t parameters can be reasonably allocated. Defined according to the definition of error: \begin{equation} loss{\rm{ }} = {\rm{ }}{\rm{|pt}}{{\rm{s}}_{predict}} - (\overline {pts} ){|_2} \end{equation} \begin{equation} \frac{{\partial E_{qt}^2}}{{\partial u}} = \mathop \sum \limits_{i = 1}^n {\left( {{\rm{ui}} - \overline {{\rm{ui}}} } \right)^2} \end{equation} \begin{equation} \frac{{\partial E_{qt}^2}}{{\partial v}} = \mathop \sum \limits_{i = 1}^n {\left( {{\rm{vi}} - \overline {{\rm{vi}}} } \right)^2} \end{equation} Where n is the number of pts points. The figure below shows the backward propagation process. \begin{figure}[bh] \centerline{\includegraphics[width=8cm]{backward.jpg}} \vspace*{8pt} \caption{Collinear equation layer backward propagation process} \end{figure} \section{Overall network structure} \subsection{Network Design} In Figure 1, DeepCNN is a mapping from 3*416*416 to 13*13*5*(4+3+3+1+c). We designed two fully convolutional networks for 6DPose prediction. Network 6D Pose-linemod-13c for 3D mesh ply dataset for LineMod[7]. Network 6D Pose-voc-8c for 8 typical objects in the VOC2007+VOC2012 dataset. In network 6DPose-linemode-13c, we design a c=13 category object for linemode 3DMesh, conv layer29 output 5*(11+13)=120 channels. \begin{table} \begin{center} \begin{tabular}{|l|c|l|c|l|} \hline layer & filters & size & input & output\\ \hline\hline 0 conv & 32 & 3*3/1 & 416*416*3 & 416*416*32\\ 1 max & & 2*2/2 & 416*416*32 & 208*208*32\\ 2 conv & 64 & 3*3/1 & 208*208*32 & 208*208*64\\ 3 max & & 2*2/2 & 208*208*64 & 104*104*64\\ 4 conv & 128 & 3*3/1 & 104*104*64 & 104*104*128\\ 5 conv & 64 & 1*1/1 & 104*104*128 & 104*104*64\\ 6 conv & 128 & 3*3/1 & 104*104*64 & 104*104*128\\ 7 max & & 2*2/2 & 104*104*128 & 52*52*128\\ 8 conv & 256 & 3*3/1 & 52*52*128 & 52*52*256\\ 9 conv & 128 & 1*1/1 & 52*52*256 & 52*52*128\\ 10 conv & 256 & 3*3/1 & 52*52*128 & 52*52*256\\ 11 max & & 2*2/2 & 52*52*256 & 26*26*256\\ 12 conv & 512 & 3*3/1 & 26*26*256 & 26*26*512\\ 13 conv & 256 & 1*1/1 & 26*26*512 & 26*26*256\\ 14 conv & 512 & 3*3/1 & 26*26*256 & 26*26*512\\ 15 conv & 256 & 1*1/1 & 26*26*512 & 26*26*256\\ 16 conv & 512 & 3*3/1 & 26*26*256 & 26*26*512\\ 17 max & & 2*2/2 & 26*26*512 & 13*13*512\\ 18 conv & 1024 & 3*3/1 & 13*13*512 & 13*13*1024\\ 19 conv & 512 & 1*1/1 & 13*13*1024 & 13*13*512\\ 20 conv & 1024 & 3*3/1 & 13*13*512 & 13*13*1024\\ 21 conv & 512 & 1*1/1 & 13*13*1024 & 13*13*512\\ 22 conv & 1024 & 3*3/1 & 13*13*512 & 13*13*1024\\ 23 conv & 1024 & 3*3/1 & 13*13*1024 & 13*13*1024\\ 24 conv & 1024 & 3*3/1 & 13*13*1024 & 13*13*1024\\ 25 route & 16 & & & \\ 26 reorg & & /2 & 26*26*512 & 13*13*2048\\ 27 route & 26 & 24 & &\\ 28 conv & 1024 & 3*3/1 & 13*13*3072 & 13*13*1024\\ 29 conv & 220 & 1*1/1 & 13*13*1024 & 13*13*120\\ 30 region & & & & 13*13*5*(4+3+3+1+13)\\ \hline \end{tabular} \end{center} \caption{Structure of network 6DPose-linemode-13c} \end{table} \subsection{3D mesh sample training and augmentation} 3D augmentation is implemented using the document and the OpenGL rendering algorithm described in [20]. \subsection{VOC 2D image sample training and augmentation} We have built a VOC3D dataset. In order to improve the labeling speed, we use the mouse to pull out the XYZ three axes on the image to determine the target's posture R={r11,...,r33}. Suppose the user uses the mouse to mark the axis vector dx, dy, dz direction of the object on the image, and the linear equation au+bv+c=0 on the corresponding image satisfies the equation below: \begin{equation} \left[ {\begin{array}{*{20}{c}} a&b&c \end{array}} \right]KR\left[ {\begin{array}{*{20}{c}} {{d_x}}\\ {{d_y}}\\ {{d_z}} \end{array}} \right] = 0 \end{equation} That is, the rotation R is the solution of equation (10). The rotation data R can be solved by using the LM algorithm. Translation T is the solution to the equation below: \begin{equation} \begin{split} &\left[ {\tiny\begin{array}{*{20}{c}} {{u_{KiL}}{r_{31}} - {r_{11}}}&{{u_{KiL}}{r_{32}} - {r_{12}}}&{{u_{KiL}}{r_{33}} - {r_{13}}}\\ {{u_{KiR}}{r_{31}} - {r_{11}}}&{{u_{KiR}}{r_{32}} - {r_{12}}}&{{u_{KiR}}{r_{33}} - {r_{13}}}\\ {{v_{KiT}}{r_{31}} - {r_{21}}}&{{v_{KiT}}{r_{32}} - {r_{22}}}&{{v_{KiT}}{r_{33}} - {r_{23}}}\\ {{v_{KiB}}{r_{31}} - {r_{21}}}&{{u_{KiB}}{r_{32}} - {r_{22}}}&{{v_{KiB}}{r_{33}} - {r_{23}}} \end{array}} \right]{\small\rm{T}} \!\!=\!\!\\\ &\begin{bmatrix}\!\!\!\!\!\!\!\!\begin{smallmatrix} \begin{smallmatrix}\begin{smallmatrix} \begin{smallmatrix}{\tiny\begin{array}{*{20}{c}} {\left( {{u_{KiL}}{r_{31}} - {r_{11}}} \right){x_{iL}} + \left( {{u_{KiL}}{r_{32}} - {r_{12}}} \right){y_{iL}} + \left( {{u_{KiL}}{r_{33}} - {r_{13}}} \right){z_{iL}}}\\ {\left( {{u_{KiR}}{r_{31}} - {r_{11}}} \right){x_{iR}} + \left( {{u_{KiR}}{r_{32}} - {r_{12}}} \right){y_{iR}} + \left( {{u_{KiR}}{r_{33}} - {r_{13}}} \right){z_{iR}}}\\ {\left( {{v_{KiT}}{r_{31}} - {r_{21}}} \right){x_{iT}} + \left( {{u_{KiT}}{r_{32}} - {r_{22}}} \right){y_{iT}} + \left( {{u_{KiT}}{r_{33}} - {r_{23}}} \right){z_{iT}}}\\ {\left( {{v_{KiB}}{r_{31}} - {r_{21}}} \right){x_{iB}} + \left( {{u_{KiB}}{r_{32}} - {r_{22}}} \right){y_{iB}} + \left( {{u_{KiB}}{r_{33}} - {r_{23}}} \right){z_{iB}}} \end{array}} \end{smallmatrix}\end{smallmatrix}\end{smallmatrix}\end{smallmatrix}\!\!\!\!\!\!\!\!\end{bmatrix}\!\!\!\! \end{split} \end{equation} Thus, we can obtain the displacement data t of the labeled data only by solving only one linear equation. According to the pose data and the three values of the length, width and height of the target, 8 virtual feature point coordinates of the target can be obtained as the training data of our algorithm. The 2DImage data augmentation uses the affine transformation to perform a proportional translation, scaling and rotation transformation of the image and the virtual feature point coordinate synchronization. We selected 8 types of objects suitable for 6DPose from 20 categories of objects in VOC2007 and VOC2012 to create a small VOC3d data set as follows: aero plane, boat, bus, car, chair, motorbike, person, tv monitor. According to the discussion in Sec.5.1, the output of the last layer of the fully convolutional network is 13*13, 5*(11+c) channel data, where c=8, and the region layer accesses 95 from the 29 conv layer. From the VOC tag image, 500 image samples were taken for testing, and the remaining 6538 images were used for training. 6D Pose prediction is shown in next section. \section{Experiments} As described in Sec.5.1, we constructed two networks to train 3D mesh file recognition for linemode and 2D image data for VOC2007 and VOC2012, and then predict 6D Pose for the trained model. We then evaluated the accuracy and speed of 6DPose prediction. \subsection{Evaluation for LineMod dataset} Firstly, we use the object.xyz file in linemode to train the linemode-6DPose-c13 model. The linemode gives the rot file and the tra file corresponding to the target's pose and translation GroundTruth values. The 6DPose prediction projection cube and the GroundTruth projection cube are overlapping displayed as follows: \begin{figure*} \begin{center} \centerline{\includegraphics[width=12cm]{linemod.jpg}} \end{center} \caption{LineMod object 6D pose prediction demo, overlapping displayed.} \end{figure*} The white box in Figure 5 is the GroundTruth object cube, and the red+green+blue cube is the projection corresponding to the network predicted R-t, and the two Cubes can basically overlap. The direction of the red arrow is the positive X-axis of the object itself, the direction of the green arrow is the positive direction of the Y-axis, and the direction of the blue arrow is the positive direction of the Z-axis. To evaluate our method and compare it with state of the art method, we use two metrics, 2D projection error[30] and rotational and translational error[31]. \begin{table*}[htbp] \begin{center} \begin{tabular}{|l|c|l|c|l|c|} \hline Object & Average pixel projection error & 5 pixels accuracy & 5 pixels accuracy & 5 pixels accuracy\\ \hline\hline & Our method & Ours & SS6D[27] & BB8[21]\\ ape & 1.98 & 0.9894 & 0.9210 & 0.9530\\ cam & 2.64 & 0.9658 & 0.9324 & 0.809\\ glue & 2.67 & 0.9680 & 0.9653 & 0.890\\ box & 2.54 & 0.9457 & 0.9033 & 0.879\\ can & 3.17 & 0.9130 & 0.9744 & 0.841\\ lamp & 2.50 & 0.9347 & 0.7687 & 0.744\\ bench & 4.25 & 0.7152 & 0.9506 & 0.800\\ cat & 2.53 & 0.9826 & 0.9741 & 0.970\\ hole & 2.61 & 0.9352 & 0.9286 & 0.905\\ duck & 2.58 & 0.9534 & 0.9465 & 0.812\\ iron & 2.52 & 0.9015 & 0.8294 & 0.789\\ driller & 2.60 & 0.8985 & 0.7941 & 0.7941\\ phone & 2.69 & 0.9458 & 0.8607 & 0.776\\ \textbf{average} & 2.71 & 0.9268 & 0.9037 & 0.839\\ bowl & 2.67 & 0.9562 & & \\ cup & 2.98 & 0.9325 & & \\ \hline \end{tabular} \end{center} \caption{State of the art comparison of our method against SS6D and BB8 using 2D projection error.As in [28], we use the percentage of correctly predicted poses for each object. A pose is considered correct if the 2D projection pixel error is less than 5 pixels. The second column is the average pixel porjection error of our method. The last three columns are the comparison of our method against the state of art methods in 5 pixels manner.} \end{table*} \begin{table} \begin{center} \begin{tabular}{|l|c|l|c|l|c|} \hline Object & ours($\text{e}_{TE}$) & BB8($\text{e}_{TE}$) & ours($\text{e}_{RE}$) & BB8($\text{e}_{RE}$)\\ \hline\hline ape & 1.88 & 1.85 & 2.45 & 2.54\\ cam & 1.85 & 1.89 & 2.43 & 2.55\\ glue & 1.67 & 1.98 & 2.51 & 2.38\\ box & 1.54 & 1.78 & 2.10 & 2.40\\ can & 1.80 & 1.97 & 2.38 & 2.13\\ lamp & 1.50 & 1.67 & 2.26 & 2.10\\ bench & 1.82 & 1.78 & 3.03 & 2.83\\ cat & 1.53 & 1.56 & 2.25 & 2.43\\ hole & 1.61 & 1.65 & 2.31 & 2.76\\ duck & 1.58 & 1.72 & 2.65 & 2.53\\ iron & 1.52 & 1.55 & 2.59 & 2.94\\ driller & 1.60 & 1.66 & 2.34 & 2.39\\ phone & 1.69 & 1.70 & 2.29 & 2.41\\ \textbf{average} & 1.66 & 1.75 & 2.43 & 2.49\\ \hline \end{tabular} \end{center} \caption{State of the art comparison of our method against BB8 using rotational and translational error. The unit of $\text{e}_{TE}$ and $\text{e}_{RE}$ are cm and degree.} \end{table} From the above two tables, the performance of our method is better than that of BB8 and SS6D on both 2D project and 6D pose accuracy evaluation criteria. Experiments have found that for the BB8 algorithm, each pts is completely independent, and the error is determined by the max pts error of pts. For our Direct 6D Pose, pts is preceded by collinear equations, and the algorithm error depends on the overall error of pts. Therefore, Direct 6DPose is very suitable for stereo vision position and rotation prediction. \subsection{Evaluation for VOC3D 2D images} The prediction effect of the 6D pose-voc-8c network designed by Sec.5.3 for predicting 8 typical VOC targets is shown in Figure 6. The average pixel projection error (pixels) for 6D pose-voc-8c prediction is shown in Table 4. \begin{figure*} \begin{center} \centerline{\includegraphics[width=11cm]{voc.jpg}} \end{center} \caption{6D pose predicted by the 6D pose-voc-c8 network.} \end{figure*} \begin{table} \begin{center} \begin{tabular}{|l|c|l|} \hline Object & error(8pts) & error(27pts)\\ \hline\hline airplane & 8.38 & 6.26\\ boat & 9.89 & 8.65\\ bus & 11.10 & 7.67\\ car & 9.45 & 8.54\\ chair & 8.47 & 6.35\\ motorbike & 6.50 & 5.18\\ person & 9.25 & 8.93\\ tv monitor & 9.53 & 8.78\\ \hline \end{tabular} \end{center} \caption{Average pixel projection error (pixels) for 6D pose-voc-8c prediction} \end{table} The cause of the error: 1. The internal parameters of the camera are not accurate; 2. Without accurate point cloud data, the length, width and height of the object are not always accurate, but if the length, width and height ratio are correct, the projected coordinates of the object on the image can still be correct. The 6D pose R-t predicted by the network is used to draw the effect of the 3D object Cube on the image. The red arrow is the target's own X axis, and the green arrow is the target Y axis, the blue arrow is the target's Z axis. This 6Dose 2DProject error predicted by 6DPose-voc-8c is within the acceptable range of visual inspection. \subsection{Computation times} Our implementation takes 16-17ms for one object 6D pose prediction, on an Intel Core i7-5820K 3.30 GHz desktop with a GeForce 1080Ti. The table below shows the computation times comparsions between our method and other methods. \begin{table} \begin{center} \begin{tabular}{|l|c|} \hline Method & computation time (ms) \\ \hline\hline SSD-6D & 20 \\ BB8 & 130 \\ Brachmann et al. & 500\\ Rad and Lepetit & 333\\ 6D pose-linemode-13c & 18\\ 6D pose-voc-8c & 17\\ \hline \end{tabular} \end{center} \caption{Computation time comparison.} \end{table} \section{Conclusion} We designed an end-to-end 6D pose network which used the advantages of BB8 pts regression, but propagated the pts error back to the position and attitude error through the collinear equation layer, thus avoiding the post-processing pnp processing. In this way, the implementation consumption and additional errors caused by the Pnp algorithm are avoided. This algorithm can achieve 55 fps, the average 6dpose 5-pixel projection error is 0.928, the average translation error is less than 1.7cm, and the average rotation error is lessthan 2.5 degree. The algorithm does not require refinement or other post-processing post-processing. In the future, we will further extend the training data set from VOC data to COCO to achieve 6D pose prediction of large-scale 2D image data, so that 6D pose technology can be more practical for outdoor large-scale natural scenes. \section{Acknowledgement} This research was supported by Wuhan Xiongchugaojing Tech Company. We gratefully acknowledge the support of Wuhan Xiongchugaojing Tech Company with the donation of the GTX 1080Ti GPU used for this research.
\section{Introduction} This article aims at developing invariant-preserving integrators of second weak order that are robust with respect to the stiffness $\varepsilon$ both in accuracy and cost for the following class of highly-oscillatory $d$-dimensional SDEs driven by a one-dimensional Stratonovich noise \begin{equation} \label{equation:NLS} dX(t)=\frac{1}{\sqrt{\varepsilon}}A X(t)\circ dW(t)+F(X(t)) dt,\ t>0,\ X(0)=X_0, \end{equation} where $W$ is a standard one-dimensional Wiener process, the function $F:\R^d\rightarrow \R^d$ is a smooth non-linear map, the stiff parameter $\varepsilon>0$ is fixed and assumed small, and $A\in \R^{d\times d}$ is a given matrix satisfying $e^A=\Id$ (equivalently $A$ is diagonalizable and has all its eigenvalues in $2i\pi\Z$). In the deterministic setting, this last property yields that the solution $x(t)=\exp(\varepsilon At)x_0$ of $\frac{dx}{dt}=\varepsilon^{-1}A x$ is $\varepsilon$-periodic. For stochastic oscillations, it means that the solution $X(t)=\exp(\varepsilon^{-1/2}AW(t))X_0$ of $dX=\varepsilon^{-1/2}A X \circ dW$ satisfies $X(T)=X(0)$ for a random time $T=\inf\{t>0, \left|\varepsilon^{-1/2}W(t)\right|=1\}$ of mean $\varepsilon$. The class of SDEs \eqref{equation:NLS} includes in particular highly-oscillatory Kubo oscillators (see \cite{Cohen12otn}) \begin{equation} \label{equation:Kubo_oscillator} dX=\frac{2\pi}{\sqrt{\varepsilon}} \begin{pmatrix} 0&-1\\1&0 \end{pmatrix} X\circ dW+\begin{pmatrix} 0&-a\\a&0 \end{pmatrix} X dt,\ a\in\R, \end{equation} or equivalently, $dY=2i\pi\varepsilon^{-1/2} Y\circ dW+ia Y dt$ in the complex setting where $Y=X_1+i X_2$. Applying standard SDE integrators to solve equation \eqref{equation:NLS} requires in general a time stepsize $h\leq \varepsilon$ to be accurate, which makes these methods dramatically expensive when $\varepsilon$ is small. The goal of this paper is to create robust numerical methods, i.e.\thinspace numerical integrators whose cost and accuracy do not deteriorate when $\varepsilon$ becomes small. Several classes of methods have already been developed for highly-oscillatory SDEs with a deterministic fast oscillation (see for instance \cite{Cohen12cao,Vilmart14wso}), but not in the case where the stiff oscillatory part is applied to the noise itself. To numerically face this challenge, we introduce in this paper a new methodology to develop robust methods of any high weak order to approximate the solution of equation \eqref{equation:NLS}. In particular, we propose a method of weak order two, and a geometric modification of this algorithm that preserves quadratic invariants. Stochastic oscillations as defined in \eqref{equation:NLS} typically arise in fiber optics models (see \cite{Agrawal07nfo,Agrawal08aon,Garnier02sod}) with a spatial discretizations of the highly-oscillatory nonlinear Schr\"odinger equation (NLS) with white noise dispersion \begin{equation} \label{equation:NLS_WND_general} du(t)=\frac{i}{\sqrt{\varepsilon}}\Delta u(t)\circ dW(t)+F(u(t)) dt,\ u(t=0)=u_0. \end{equation} As described for instance in \cite{Garnier02sod}, in the case $\varepsilon=1$, the NLS equation \eqref{equation:NLS_WND_general} with a cubic nonlinearity $F(u)=|u|^2u$ is a model in dimension $d=1$ describing the propagation of a signal in optical fibers where $x$ corresponds to the retarded time, while $t$ corresponds to the distance along the fiber. Taking into account the inevitable chromatic dispersion effects of the signal, modeled by a random centered stationary process $m$ with a coefficient $\nu>0$, yields the following random PDE, $$ \frac{\partial v}{\partial x}(x,t)=\nu i m(x)\frac{\partial^2 v}{\partial t^2}(x,t)+\nu^2 F(v(x,t)),\ v(x=0,t)=u_0(t). $$ The perfect fiber would satisfy $m=0$, but in practice, engineers build fibers with a small varying dispersion coefficient. To limit the pulse broadening induced by random dispersion, specialists use a wide range of dispersion management techniques (see for instance \cite{Garnier02sod} and references therein). In \cite{Marty06oas,DeBouard10tns}, the authors show that if we denote $u^{\nu}(x,t)=v(x/\nu^2,t)$, then as $\nu$ tends to $0$ and under some ergodicity assumptions on $m$, $u^{\nu}$ converges to the solution $u$ of equation \eqref{equation:NLS_WND_general} with $\varepsilon=1$. The non-stiff counterpart of equation \eqref{equation:NLS_WND_general}, i.e.\thinspace for $\varepsilon=1$, has also been studied theorically in \cite{Debussche11qns} for a particular nonlinearity. The highly-oscillatory behaviour ($\varepsilon \ll 1$) appears naturally when observing the propagation in long time with a small nonlinearity (via the change of variable $t\leftarrow \varepsilon t$) or the propagation of a small initial data in an optical fiber with a polynomial nonlinearity (via the change of variable $u\leftarrow u/\varepsilon$). A goal of this article is to develop efficient and cheap numerical methods that can model the propagation of pulses in this context, in order to observe some specific behaviors and, ultimately, to build enhanced fibers. Models of the form \eqref{equation:NLS_WND_general} also appear in the recent work \cite{Faou18lwt} in the context of stochastic three-wave semi-linear systems. We emphasize that there is a growing interest in the recent litterature for stochastic models involving a fast Stratonovitch noise in the context of ergodic stochastic dynamics. In \cite{Abdulle19act}, it is shown for a class of overdamped Langevin equations that adding an appropriate fast Stratnovitch noise permits to increase the convergence rate to equilibrium, while reducing the asymptotic variance at infinity. This suggests that new efficient samplers for the invariant distribution of Langevin type models in context of large dimensional molecular dynamics models could be developed. We also mention the recent homogenization results on stochastic dynamics with fast Stratonovitch noises in \cite{Li18hoh} where our periodicity assumption is replaced by an ergodicity assumption on the fast component of the dynamics posed on manifolds. Numerous possibilities exist for numerically integrating equations \eqref{equation:NLS} or \eqref{equation:NLS_WND_general}. We highlight in particular the exponential integrators \cite{Cohen12otn,Erdogan18anc} for the SDE \eqref{equation:NLS}, and the exponential integrators \cite{Cohen17eif}, the Fourier split-step method \cite{Marty06oas} or the Crank-Nicholson scheme \cite{Belaouar15nao} for the SPDE \eqref{equation:NLS_WND_general}. These methods have the advantage that they preserve the $L^2$ invariant of the equation (that is $\norme{u(t)}_{L^2}=\norme{u_0}_{L^2}$ for all $t\geq 0$) for a class of polynomial nonlinearities. However they face a severe timestep restriction $h\leq \varepsilon$ when the stiff parameter $\varepsilon$ is small. Even in the case of deterministic oscillations, there are restrictions in general, though some robust algorithms exist (see \cite{Cohen12cao} for instance). The methods presented in this paper solve this issue of stepsize restriction. The idea is to approximate the solution of equation \eqref{equation:NLS} at random times called revolution times because they correspond to complete revolutions of the oscillatory part $dX=\varepsilon^{-1/2}A X \circ dW$. This is in the spirit of \cite{Hofmann00oao} which also approximates the solution of SDEs at random times. The article is organized as follows. Section \ref{section:multirevolution_integrators} is devoted to the presentation of the new integrators. In Section \ref{section:construction_algorithm}, we build an asymptotic expansion of the solution of \eqref{equation:NLS} and evaluate it at revolution times to derive the new integrators and a limit model for equation \eqref{equation:NLS}. Section \ref{section:convergence_theorem} is devoted to the weak convergence theorems and their proofs. In Section \ref{section:numerical experiments}, we present numerical experiments to confirm our theoretical error estimates, and we apply the new methods to solve numerically the Schrödinger equation \eqref{equation:NLS_WND_general}. \section{Multirevolution integrators for stochastic oscillators} \label{section:multirevolution_integrators} Initially created in \cite{Melendo97ana, Calvo04aco} in the context of celestial mechanics and later extended using geometric integration (see for instance \cite{Murua99ocf, Calvo07oem, Chartier14mrc}), multirevolution methods represent a class of numerical methods used for solving highly-oscillatory differential equations while reducing the cost of computation. \begin{figure}[t] \begin{center} \includegraphics[scale=0.47]{Images/Deterministic_oscillator} \caption{Exact solution evaluated at revolution times for the deterministic oscillator \eqref{equation:highly_oscillatory_ODE} with $F(y)=iy$ and $\varepsilon=10^{-1}$.} \label{figure:Comparison_revolution_time_deterministic} \end{center} \end{figure} \noindent In particular, they can approximate the solution of highly-oscillatory ODEs of the following form at stroboscopic times $\varepsilon N T$, where $T=1$ is the period of $\frac{dx}{dt}=Ax$, and $N$ is an integer, \begin{equation} \label{equation:highly_oscillatory_ODE} \frac{dx}{dt}=\frac{1}{\varepsilon}A x+F(x), \ x(0)=x_0. \end{equation} The solution $x$ of this equation at times $\varepsilon NT$ is a perturbation of identity, that is $x$ satifies $x(\varepsilon t)=x_0+\OO(\varepsilon t)$, thus the solution loses its highly-oscillatory feature when evaluated at stroboscopic times, as shown in Figure \ref{figure:Comparison_revolution_time_deterministic} for the first component of the solution of equation \eqref{equation:highly_oscillatory_ODE} with $F(x)=ix$ (respectively $F(y)=\begin{pmatrix} 0&-1\\1&0 \end{pmatrix}y$ in the real setting). The idea of multirevolution is to approximate $x(\varepsilon N)$ with $N=\OO(\varepsilon^{-1})$ with a cost independent of $\varepsilon$. \begin{figure}[t] \begin{center} \includegraphics[scale=0.47]{Images/Multirevolutions_W} \includegraphics[scale=0.47]{Images/Stochastic_oscillator} \caption{Revolution times \eqref{equation:definition_revolution_times} of a Brownian path (top) and exact solution evaluated at revolution times for the Kubo oscillator \eqref{equation:Kubo_oscillator} with $a=1$ and $\varepsilon=10^{-1}$ (bottom).} \label{figure:Comparison_revolution_time_stochastic} \end{center} \end{figure} For stochastic oscillations, the solution $X(t)=e^{\varepsilon^{-1/2}AW(t)}X_0$ of $dX=\varepsilon^{-1/2}AX\circ dW$ is not periodic, but satisfies $X(\varepsilon T_N)=X_0$ where the $T_N$ are random variable called revolution times and defined by \begin{align} \label{equation:definition_revolution_times} T_0&=0,\\ T_{N+1}&=\inf\left\{t>T_N, \varepsilon^{-1/2}\abs{W(\varepsilon t)-W(\varepsilon T_N)}\geq 1\right\}, \ N=0,1,2,\ldots \nonumber \end{align} If $X$ is the solution of \eqref{equation:NLS}, we show in Section \ref{section:asymptotic_expansion} that $X$ evaluated at times $\varepsilon T_N$ is a perturbation of identity (in a strong and weak sense). Figure \ref{figure:Comparison_revolution_time_stochastic} illustrates the definition of revolution times and shows the perturbation of identity property on the first component of a Kubo oscillator \eqref{equation:Kubo_oscillator} with $a=1$. We highlight that the revolutions times $T_N$ can be simulated without simulating the exact path $W$. Also we emphasize that the proposed algorithms do not require to simulate $W$ thanks to the use of appropriate discrete random variables. This will be detailed in Section \ref{section:stiff_integrators}. We show in Section \ref{section:limit_model} that the solution $X$ of \eqref{equation:NLS} evaluated at times $\varepsilon T_{t\varepsilon^{-1}}$ (when $t/\varepsilon\in\N$ is an integer) converges weakly when $\varepsilon\rightarrow 0$ to the solution $y_t$ of the deterministic ODE $$\frac{d y_t}{dt}=\langle g^0\rangle (y_t), \ y_{0}=X_0,$$ where $g_\theta^0(y) = e^{-A\theta} F(e^{A\theta}y)$ and $\langle g^0\rangle :=\int_0^1 g_\theta^0 d\theta$. This ODE is exactly the same one as the asymptotic model for deterministic oscillators of the form \eqref{equation:highly_oscillatory_ODE}. This asymptotic model naturally yields a weak order 1 deterministic integrator. We propose the two following new multirevolution methods of second weak order for integrating equation \eqref{equation:NLS} at the revolution times $\varepsilon T_{Nm}$ for $m=0, 1, 2,\ldots$ with cost in $H=N\varepsilon=\OO(1)$ independent of $\varepsilon$. Method \ref{algorithm:geometric_weak_order_2} is a geometric modification of Method \ref{algorithm:weak_order_2} to preserve quadratic invariants of the form $Q(y)=\frac{1}{2}y^T S y$ where $ S \in \R^{d\times d}$ is a given symmetric matrix. Methods A and B involve a Fourier decomposition of the following functions that are 1-periodic with respect to $\theta$, \begin{align} \label{equation:def_g_theta} g_\theta^0(y) &= e^{-A\theta} F(e^{A\theta}y)=\sum_{k\in\Z} c_k^0(y) e^{2i\pi k \theta}\\ g_\theta^1(y)(z) &= e^{-A\theta}F'(e^{A\theta}y)(e^{A\theta} z) =\sum_{p\in\Z} c_p^1(y)(z) e^{2i\pi p \theta}\nonumber \end{align} with respective Fourier coefficients $(c_k^0(y))_{k\in\Z}$ and $(c_p^1(y))_{p\in\Z}$. The series appearing in \eqref{equation:def_g_theta} have an infinite number of terms in general. For a practical implementation of the new methods, we truncate these series up to an even number of modes $K_t$, while inducing an exponentially small error (see Remark~\ref{rem:trunc}). For each timestep, we also introduce the bounded discrete random variables $(\widehat{\alpha}_k^N)_k$, and deterministic sequences $(\widehat{\beta}_{p,k}^N)_{p,k}$ and $(\widehat{\widetilde{\beta}}_{p,k}^N)_{p,k}$ that satisfy \vspace{-18pt} \begin{multicols}{2} $$ \begin{array}{rl} \E[\widehat{\alpha}_k^N]&=\left\{ \begin{array}{l} 1 \text{ if } k=0\\ 0 \text{ else} \end{array} \right.\\ \widehat{\beta}_{p,k}^N&=\left\{ \begin{array}{l} \frac{1}{2}+\frac{1}{3N} \text{ if } p=k=0\\ \frac{1}{2\pi^2k^2N} \text{ if } p=0,\: k\neq 0\\ \frac{-1}{2\pi^2p^2N} \text{ if } p\neq 0,\: k= 0\\ \frac{1}{2\pi^2p^2N} \text{ if } p+k= 0,\: p,k\neq 0\\ 0 \text{ else} \end{array} \right. \end{array} \hskip-0.5cm \begin{array}{rl} \E[\widehat{\alpha}_p^N\widehat{\alpha}_k^N]&=\left\{ \begin{array}{l} 1+\frac{2}{3N} \text{ if } p=k=0\\ \frac{1}{\pi^2p^2N} \text{ if } p+k= 0,\: p,k\neq 0\\ 0 \text{ else} \end{array} \right.\\ \widehat{\widetilde{\beta}}_{p,k}^N&=\left\{ \begin{array}{l} \frac{1}{2\pi^2k^2N} \text{ if } p=0,\: k\neq 0\\ \frac{-1}{2\pi^2p^2N} \text{ if } p\neq 0,\: k= 0\\ 0 \text{ else} \end{array} \right.\\ \end{array} $$ \end{multicols}% \noindent The definition and construction of these random variables is further discussed in Section \ref{section:probabilistic_properties} and Section \ref{section:stiff_integrators}. \begin{algorithm}[H] \renewcommand{\thealgorithm}{A} \caption{(Explicit integrator of weak order two in $H=N\varepsilon$ to approximate the solution of equation \eqref{equation:NLS} at times $\varepsilon T_{Nm}$ for $m=0, 1, 2,\ldots$) } \label{algorithm:weak_order_2} \begin{algorithmic} \STATE $Y_0=X_0$ \FOR{$m\geq 0$} \STATE \begin{equation} \label{equation:order_2_scheme} Y_{m+1} = Y_m +H \sum_{k=-K_t /2}^{K_t /2-1} c_k^0(Y_m) \widehat{\alpha}_k^N +H^2 \sum_{p,k=-K_t /2}^{K_t /2-1} c_p^1(Y_m) (c_k^0(Y_m)) \widehat{\beta}_{p,k}^N \end{equation} \ENDFOR \end{algorithmic} \end{algorithm} \begin{algorithm \renewcommand{\thealgorithm}{B} \caption{(Geometric integrator of weak order two in $H=N\varepsilon$ to approximate the solution of equation \eqref{equation:NLS} at times $\varepsilon T_{Nm}$ for $m=0, 1, 2,\ldots$ while preserving quadratic invariants) } \label{algorithm:geometric_weak_order_2} \begin{algorithmic} \STATE $Y_0=X_0$ \FOR{$m\geq 0$} \STATE \vspace{-5 mm} \begin{align} \label{equation:geometric_order_2_scheme} Y_{m+1} &= Y_m +H \sum_{k=-K_t /2}^{K_t /2-1} c_k^0\left(\frac{Y_m+Y_{m+1}}{2}\right) \widehat{\alpha}_k^N\\ &+H^2 \sum_{p,k=-K_t /2}^{K_t /2-1} c_p^1\left(\frac{Y_m+Y_{m+1}}{2}\right)\left(c_k^0\left(\frac{Y_m+Y_{m+1}}{2}\right)\right) \widehat{\widetilde{\beta}}_{p,k}^N \nonumber \end{align} \ENDFOR \end{algorithmic} \end{algorithm} \begin{remark} One could apply a Newton iteration to solve the implicit equation \eqref{equation:geometric_order_2_scheme} in Method \ref{algorithm:geometric_weak_order_2}. However a few fixed point iterations are sufficient (see discussion in \cite[Chap.\thinspace VIII]{Hairer06gni} for non-stiff implicit methods). Indeed, since the Lipschitz constant of the iterated map has size $\OO(H)$, the convergence rate of the fixed point iterations is independent of the smallness of $\varepsilon$. \end{remark} \begin{remark} We observe that $\widehat{\beta}_{p,k}^N$ and $\widehat{\widetilde{\beta}}_{p,k}^N$ are always zero except when $p=0$, $k=0$ or $p+ k=0$. Thus the computational cost of one step of Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2} grows linearly in the number of modes in \eqref{equation:def_g_theta}. \end{remark} \section{Analysis and asymptotic expansion of the exact solution} \label{section:construction_algorithm} In this section, we first obtain a local expansion of the solution of \eqref{equation:NLS} and then evaluate it at particular random times to deal with the highly-oscillatory patterns of the exact solution. Finally we derive from this expansion an asymptotic limit for equation \eqref{equation:NLS} when $\varepsilon\rightarrow 0$. \subsection{Asymptotic expansion of the exact solution} \label{section:asymptotic_expansion} Instead of studying directly equation \eqref{equation:NLS}, we apply the change of variable $t\leftarrow\varepsilon^{-1} t$ to obtain the following equation, whose solution satisfies $Y(t)=X(\varepsilon t)$ with $X$ solution of \eqref{equation:NLS}, \begin{equation} \label{equation:NLS_rescaled} dY(t)=A Y(t) \circ d\widetilde{W}(t)+\varepsilon F(Y(t)) dt, \ Y(0)=X_0, \end{equation} where we denote for simplicity the Brownian motion $\widetilde{W}(t)=\varepsilon^{-1/2} W(\varepsilon t)$ again by $W$. We introduce the following assumption which guaranties in particular global existence and uniqueness of the solution. \begin{ass} \label{assumption:F_Lipschitz} The function $F$ is globally Lipschitz continuous and lies in $\CC^3_P$, i.e.\thinspace there exists constants $L$, $C$, $K>0$ such that for all $y$, $y_1$, $y_2\in\R^d$ \begin{equation} \label{equation:regularity_F} \abs{F(y_1)-F(y_2)}\leq L\abs{y_1-y_2} \qquad \abs{F^{(i)}(y)}\leq C (1+\abs{y}^K),\ i\in \{0,1,2,3\}. \end{equation} Also the initial condition $X_0$ has bounded moments, that is $\E[\abs{X_0}^p]<\infty$ for $p\geq 0$. \end{ass} Therefore we denote $\varphi_{\varepsilon,t}(X_0)=Y(t)$ the solution of equation \eqref{equation:NLS_rescaled} and focus in the rest of the paper on the approximation of $\varphi_{\varepsilon,t}(y)$ at times $t=\OO(\varepsilon^{-1})$. The variation of constants formula yields \begin{equation} \label{equation:variation_constants} \varphi_{\varepsilon,t}(y)=e^{AW(t)}y+\varepsilon \int_0^t e^{A(W(t)-W(s))} F(\varphi_{\varepsilon,s}(y)) ds. \end{equation} We deduce the following regularity properties. \begin{lemma} \label{lemma:regularity_varphi} Under Assumption \ref{assumption:F_Lipschitz}, the following estimates hold for all $y$, $y_1$, $y_2\in\R^d$, where $C$ and $K$ are independent of $\varepsilon$ and $t$, \begin{enumerate} \item $\abs{\varphi_{\varepsilon,t}(y_1)-\varphi_{\varepsilon,t}(y_2)}\leq C\abs{y_1-y_2}e^{C\varepsilon t}$, \item $\abs{\varphi_{\varepsilon,t}(y)}\leq C(1+\abs{y})e^{C\varepsilon t}$, \item $\varphi_{\varepsilon,t}(y)$ is $\CC^3$ in $y$ and $\abs{\varphi_{\varepsilon,t}^{(i)}(y)}\leq C(\varepsilon t)^{i-1}(1+\abs{y}^K)e^{C\varepsilon t}$ for $i\in {1,2,3}$. \end{enumerate} \end{lemma} The proof is postponed to the appendices. It mainly relies on the Gronwall theorem and the boundedness of the one-periodic function $\theta \mapsto e^{\theta A}$. Using a local expansion of the solution of \eqref{equation:NLS_rescaled} in $\varepsilon$, we define the following first and second order approximations of $\varphi_{\varepsilon,t}(y)$, \begin{align} \label{equation:strong_Taylor_development} \psi_{\varepsilon,t}^1(y)&=e^{AW(t)}y+\varepsilon e^{AW(t)} \int_0^{t} e^{-AW(s)} F(e^{AW(s)}y) ds\\ \psi_{\varepsilon,t}^2(y)&=\psi_{\varepsilon,t}^1(y) + \varepsilon^2 e^{AW(t)} \int_0^{t} e^{-AW(s)} \nonumber \\ &\cdot F'(e^{AW(s)}y)\left( e^{AW(s)} \int_0^{s} e^{-AW(r)} F(e^{AW(r)}y) dr \right)ds. \nonumber \end{align} \begin{proposition}[Local expansion] \label{proposition:strong_Taylor_development} Under Assumption \ref{assumption:F_Lipschitz}, for all $y\in\R^d$, $j\in \{1,2\}$ and $t\geq 0$, there exists $C$ and $K$ two positive constants independent of $\varepsilon$ and $t$ such that $$\abs{\varphi_{\varepsilon,t}(y)-\psi_{\varepsilon,t}^j(y)}\leq C(1+\abs{y}^K)e^{C\varepsilon t}(\varepsilon t)^{j+1}.$$ \end{proposition} The functions $\psi_{\varepsilon,t}^j$ satisfy the following straightforward inequalities proved with similar arguments as for Lemma \ref{lemma:regularity_varphi}. \begin{lemma} With the assumptions and notations of Proposition \ref{proposition:strong_Taylor_development}, the following estimates hold for all $y\in\R^d$, where $C$ and $K$ are independent of $\varepsilon$ and $t$, \begin{align} \label{equation:Taylor_bound_1} \abs{\psi_{\varepsilon,t}^1(y)}&\leq C(1+\abs{y})e^{C\varepsilon t},\\ \label{equation:Taylor_bound_2} \abs{\psi_{\varepsilon,t}^2(y)}&\leq C(1+\abs{y}^K)e^{C\varepsilon t},\\ \label{equation:Taylor_bound_3} \abs{\psi_{\varepsilon,t}^2(y)-e^{AW(t)}y}&\leq C(1+\abs{y}^K)(\varepsilon t)e^{C\varepsilon t}. \end{align} \end{lemma} \begin{proof}[Proof of Proposition \ref{proposition:strong_Taylor_development}] Using Assumption \ref{assumption:F_Lipschitz}, we get $$\abs{\varphi_{\varepsilon,t}(y)-\psi_{\varepsilon,t}^1(y)}\leq L\varepsilon \int_0^{t} \abs{\varphi_{\varepsilon,s}(y)-e^{AW(s)}y} ds.$$ Then Lemma \ref{lemma:regularity_varphi} yields \begin{align*} \abs{\varphi_{\varepsilon,s}(y)-e^{AW(s)}y}&\leq C\varepsilon \int_0^{s} \abs{F(\varphi_{\varepsilon,r}(y))} dr \leq C\varepsilon \int_0^{s} (1+\abs{\varphi_{\varepsilon,r}(y)}) dr\\ &\leq C\varepsilon \int_0^{s} (1+C(1+\abs{y})e^{C\varepsilon r}) dr \leq C(1+\abs{y})e^{C\varepsilon s}(\varepsilon s). \end{align*} We deduce $\abs{\varphi_{\varepsilon,t}(y)-\psi_{\varepsilon,t}^1(y)}\leq C(1+\abs{y})e^{C\varepsilon t}(\varepsilon t)^2.$ For $j=2$, we first denote $$\widetilde{\psi}_{\varepsilon,t}^2(y)=e^{AW(t)}y+\varepsilon e^{AW(t)} \int_0^{t} e^{-AW(s)} F(\psi_{\varepsilon,s}^1(y)) ds.$$ With the same arguments we used for $j=1$ and inequality \eqref{equation:Taylor_bound_1}, we have $$\abs{\varphi_{\varepsilon,t}(y)-\widetilde{\psi}_{\varepsilon,t}^2(y)}\leq C(1+\abs{y}^K)e^{C\varepsilon t}(\varepsilon t)^3.$$ It is sufficient to prove that $\abs{\psi_{\varepsilon,t}^2(y)-\widetilde{\psi}_{\varepsilon,t}^2(y)}\leq C(1+\abs{y}^K)e^{C\varepsilon t}(\varepsilon t)^3$. A Taylor expansion of $F(\psi_{\varepsilon,s}^1(y))$ in $\varepsilon$ gives $$F(\psi_{\varepsilon,s}^1(y))=F(e^{AW(s)}y)+\varepsilon F'(e^{AW(s)}y)\left( e^{AW(s)} \int_0^{s} e^{-AW(r)} F(e^{AW(r)}y) dr \right) +R_{\varepsilon,s}.$$ The remainder $R_{\varepsilon,s}$ satisfies $$\abs{R_{\varepsilon,s}}\leq C \varepsilon^2 \sup_{x \in [e^{AW(s)}y , \psi_{\varepsilon,s}^1(y)]} \norme{F''(x)} \left| e^{AW(s)} \int_0^{s} e^{-AW(r)} F(e^{AW(r)}y) dr \right|^2.$$ Then, using the polynomial growth of $F''$ and inequality \eqref{equation:Taylor_bound_1}, we get $$\abs{R_{\varepsilon,s}}\leq C(1+\abs{e^{AW(s)}y}^K+\abs{\psi_{\varepsilon,s}^1(y)}^K) (\varepsilon s)^2 e^{C\varepsilon s} \leq C(1+\abs{y}^K) (\varepsilon s)^2 e^{C\varepsilon s}.$$ Hence the result. \end{proof} We shall prove in Section \ref{section:limit_model} that the function $\psi^2_{\varepsilon,t}$ in \eqref{equation:strong_Taylor_development} evaluated at the revolution times $T_N$ (defined in \eqref{equation:definition_revolution_times}) yields a strong order 2 approximation in $H=\varepsilon N$. \begin{remark} If we replace the Brownian motion $W$ in \eqref{equation:strong_Taylor_development} by a piecewise linear function $W_\tau$ defined by \begin{equation} \label{equation:W_piecewise_linear} W_\tau=\left(1-\frac{t}{\tau}+i\right)W_i+\left(\frac{t}{\tau}-i\right)W_{i+1} \text{ for } i \tau \leq t \leq (i+1)\tau, \end{equation} where $W_0=0$ and $W_{i+1}=W{i}+\sqrt{\tau}\xi_i$ with $(\xi_i)_i$ a family of independent standard Gaussian random variables, then it can be shown that we obtain an integrator of strong order two in $\varepsilon t$. However the cost of a standard method computing an approximation of the integrals of equation \eqref{equation:strong_Taylor_development} by replacing $W$ with $W_\tau$ is in $\OO(t^2/\tau^2)$, which makes this method tremendously expensive for $t=\OO(\varepsilon^{-1})$. This is why we develop in Section \ref{section:stiff_integrators} weak integrators based on a weak approximation of equation \eqref{equation:strong_Taylor_development} with a cost independent of $t$. We shall replace stochastic integrals by appropriate discrete random variables in order not to simulate any expensive Brownian path $W$. \end{remark} \subsection{Properties of the revolution times} \label{section:probabilistic_properties} In this section, we study some properties linked to the revolution times $T_N$ that will be useful for the analysis. \begin{proposition} \label{proposition:properties_T1} The revolution times $T_N$ defined in \eqref{equation:definition_revolution_times} are positive and finite almost surely. Their differences $(T_{N+1}-T_N)_{N\geq 0}$ are independent identically distributed random variables (same law as $T_1$). The Laplace transform $\E[e^{zT_1}]$ of $T_1$ exists and is analytic for $\Real(z)<\frac{\pi^2}{8}$. In addition, for $x\in\left[0,\frac{\pi^2}{8}\right[$, $\E[e^{xT_1}]=\frac{1}{\cos(\sqrt{2x})}$. The variable $T_1$ has bounded moments and they are given by \begin{equation} \label{equation:properties_T1_moments} \E[T_1^k]=\frac{(-2)^kk!}{(2k)!}\sum_{j=1}^p (-1)^j \sum_{\underset{n_i\in\N^*}{n_1+\cdots+n_j=p}} \binom{2p}{2n_1,\ldots,2n_j}. \end{equation} In particular, $\E[T_1]=1$, $\E[T_1^2]=\frac{5}{3}$ and $\Var(T_1)=\frac{2}{3}$. Finally, for a fixed $\varepsilon_0\in \left]0,\frac{\pi^2}{16}\right[$, for all $\varepsilon \in]0,\varepsilon_0]$ and $p\geq 0$, we have the estimate \begin{equation} \label{equation:properties_T1_exponential_estimate} \E[e^{\varepsilon T_N}(\varepsilon T_N)^p] \leq Ce^{C \varepsilon N}(\varepsilon N)^p. \end{equation} \end{proposition} The law of the first revolution time $T_1$ has an analytic density but there is no closed formula for it. It can be numerically approximated accurately by inverting the Laplace transform. In Figure \ref{figure:Law_TN}, we observe the convergence in law of $T_N$ to a Gaussian variable according to the central limit theorem. \begin{figure \begin{center} \includegraphics[scale=0.6]{Images/Law_TN} \caption{Convergence in law of $\frac{\sqrt{N}}{Var(T_1)}\left(\frac{T_N}{N}-\E[T_1]\right)$ to a standard Gaussian random variable.} \label{figure:Law_TN} \end{center} \end{figure} \begin{proof}[Proof of Proposition \ref{proposition:properties_T1}] The first properties can be deduced from \cite[Chap.\thinspace 2.3]{Revuz94cma}, where the Laplace transform formula is obtained with an analytic continuation of the equality $\E[e^{-xT_1}]=\frac{1}{\cosh(\sqrt{2x})}$ for $x>0$. Comparing the Taylor expansion of $\E[e^{xT_1}]$ and $\frac{1}{\cos(\sqrt{2x})}$ yields \eqref{equation:properties_T1_moments}. The estimate \eqref{equation:properties_T1_exponential_estimate} is proved as follows \begin{align*} \E[e^{\varepsilon T_N}(\varepsilon T_N)^p] &\leq \E[e^{2\varepsilon T_N}]^{1/2} \E[(\varepsilon T_N)^{2p}]^{1/2} = \E[e^{2\varepsilon T_1}]^{N/2} \varepsilon^p \E[T_N^{2p}]^{1/2}\\ &\leq \E[e^{2\varepsilon_0 T_1}]^{\varepsilon N/2\varepsilon_0} (\varepsilon N)^p \E[T_1^{2p}]^{1/2} \leq C e^{C \varepsilon N} (\varepsilon N)^p, \end{align*} where we used first the Cauchy-Schwarz inequality and then twice the Jensen inequality. \end{proof} For developing an algorithm for the weak error, it is useful to know the moments of the random variables appearing in the discretization, that are costly to simulate numerically, in order to replace them with cheap discrete approximations with the same first and second moments. This is the goal of the following proposition. \begin{proposition} \label{proposition:moments_alpha_beta} The following random variables $$ \begin{array}{rl} \alpha_k^N&=\frac{1}{N}\int_0^{T_N} e^{2i\pi k W(s)}ds\\ \beta_{p,k}^N&=\frac{1}{N^2} \int_0^{T_N} e^{2i\pi pW(s)}\int_0^{s} e^{2i\pi kW(r)} dr ds\\ \widetilde{\beta}_{p,k}^N&=\frac{1}{N^2} \int_0^{T_N} e^{2i\pi pW(s)} \left( \int_0^{s} e^{2i\pi kW(r)} -\frac{1}{2} \int_0^{T_N} e^{2i\pi kW(r)} dr \right) ds = \beta_{p,k}^N-\frac{\alpha_p^N\alpha_k^N}{2} \end{array} $$ satisfy \vspace{-18pt} \begin{multicols}{2} $$ \begin{array}{rl} \E[\alpha_k^N]&=\delta_k =\left\{ \begin{array}{l} 1 \text{ if } k=0\\ 0 \text{ else} \end{array} \right.\\ \E[\beta_{p,k}^N]&=\left\{ \begin{array}{l} \frac{1}{2}+\frac{1}{3N} \text{ if } p=k=0\\ \frac{1}{2\pi^2k^2N} \text{ if } p=0,\: k\neq 0\\ \frac{-1}{2\pi^2p^2N} \text{ if } p\neq 0,\: k= 0\\ \frac{1}{2\pi^2p^2N} \text{ if } p+k= 0,\: p,k\neq 0\\ 0 \text{ else} \end{array} \right. \end{array} \hskip-0.5cm \begin{array}{rl} \E[\alpha_p^N\alpha_k^N]&=\left\{ \begin{array}{l} 1+\frac{2}{3N} \text{ if } p=k=0\\ \frac{1}{\pi^2p^2N} \text{ if } p+k= 0,\: p,k\neq 0\\ 0 \text{ else} \end{array} \right.\\ \E[\widetilde{\beta}_{p,k}^N]&=\left\{ \begin{array}{l} \frac{1}{2\pi^2k^2N} \text{ if } p=0,\: k\neq 0\\ \frac{-1}{2\pi^2p^2N} \text{ if } p\neq 0,\: k= 0\\ 0 \text{ else} \end{array} \right.\\ \end{array} $$ \end{multicols} \end{proposition} \begin{proof} Let $k\neq 0$ (the case $k=0$ is straightforward using Proposition \ref{proposition:properties_T1}), then the Itô formula applied to $e^{2i\pi k W(s)}$ gives $$\frac{1}{2\pi^2 k^2 N} (e^{2i\pi k W(t)}-1) = \frac{i}{\pi k N} \int_0^{t} e^{2i\pi k W(s)} dW(s) -\frac{1}{N} \int_0^{t} e^{2i\pi k W(s)} ds,$$ which yields at time $t=T_N$, $$\alpha_k^N= \frac{i}{\pi kN} \int_0^{T_N} e^{2i\pi k W(s)} dW(s).$$ Then $t\mapsto \int_0^{t} e^{2i\pi k W(s)} dW(s)$ is a martingale, so by the Doob theorem, as $t\wedge T_N$ is finite, $\E[\int_0^{t\wedge T_N} e^{2i\pi k W(s)} dW(s)]=0$ for all $t$. The dominated convergence theorem for stochastic integrals allows to take the limit $t\rightarrow\infty$ and yields $\E[\alpha_k^N]=0$. For the coefficients $\beta_{p,k}^N$, let $(p,k)\neq (0,0)$ (the case $p=k=0$ is obtained straightforwardly using Proposition \ref{proposition:properties_T1}), we use the Itô formula on $e^{2i\pi p W(s)}$ and we integrate from $s$ to $T_N$, $$1-e^{2i\pi p W(s)} = 2i\pi p \int_s^{T_N} e^{2i\pi p W(r)} dW(r) -2\pi^2 p^2 \int_s^{T_N} e^{2i\pi p W(r)} dr.$$ Then, multiplying by $\frac{1}{N^2}e^{2i\pi k W(s)}$ and integrating from $0$ to $T_N$ yields \begin{align*} \frac{\alpha_k^N-\alpha_{p+k}^N}{N} &= \frac{2i\pi p}{N^2} \int_0^{T_N} e^{2i\pi k W(s)} \int_s^{T_N} e^{2i\pi p W(r)} dW(r) ds\\ &-\frac{2\pi^2 p^2}{N^2} \int_0^{T_N} e^{2i\pi k W(s)} \int_s^{T_N} e^{2i\pi p W(r)} dr ds. \end{align*} Using the stochastic Fubini theorem, we deduce $$\int_0^{T_N} e^{2i\pi k W(s)} \int_s^{T_N} e^{2i\pi p W(r)} dW(r) ds =\int_0^{T_N} e^{2i\pi p W(r)} \int_0^r e^{2i\pi k W(s)} ds dW(r),$$ which has zero average by the same arguments as before. Also by the Fubini theorem for stochastic integrals, $\beta_{p,k}^N=\frac{1}{N^2}\int_0^{T_N} e^{2i\pi k W(s)} \int_s^{T_N} e^{2i\pi p W(r)} dr ds$, so that we get if $p\neq 0$, $$\E[\beta_{p,k}^N]=\frac{\delta_{p+k}-\delta_k}{2\pi^2 p^2 N}.$$ The case $p = 0$ is obtained by integrating by parts and using the same arguments. Indeed, we find $$\beta_{0,k}^N=\frac{T_N}{N}\alpha_k^N-\beta_{k,0}^N =\frac{i}{\pi kN^2} \int_0^{T_N} T_N e^{2i\pi k W(s)} dW(s)-\beta_{k,0}^N,$$ and $\E[\beta_{0,k}^N]=-\E[\beta_{k,0}^N]$. Finally, the moments $\E[\alpha_p^N\alpha_k^N]$ are computed via the equality $\beta_{p,k}^N+\beta_{k,p}^N=\alpha_p^N\alpha_k^N$. Then we obtain $\E[\widetilde{\beta}_{p,k}^N]$ from the formula $\widetilde{\beta}_{p,k}^N=\beta_{p,k}^N-\frac{\alpha_p^N\alpha_k^N}{2}$. \end{proof} \begin{remark*}[Stochastic Fourier series] Let $f$ be a $L^2$ function on $]0,1[$ extended on $\R$ by 1-periodicity, whose Fourier coefficients are denoted as $(c_k)_{k\in\Z}$. Then we deduce from Proposition \ref{proposition:moments_alpha_beta} the following equalities, where the second one is the stochastic version of the Bessel-Parseval theorem, \begin{align*} \E\left[\int_0^{T_1} f(W(s)) ds\right]&=c_0=\int_0^1 f(\theta) d\theta,\\ \E\left[\int_0^{T_1} \abs{f(W(s))}^2 ds\right]&=\sum_{k\in \Z} \abs{c_k}^2,\\ \E\left[\abs{\int_0^{T_1} f(W(s)) ds}^2\right]&=\frac{5\abs{c_0}^2}{3}+\sum_{k\in\Z^*} \frac{\abs{c_k}^2}{\pi^2 k^2}. \end{align*} \end{remark*} \subsection{Asymptotic expansion at revolution times and limit model} \label{section:limit_model} With the results of Subsection \ref{section:probabilistic_properties}, it is now possible to evaluate the local expansions \eqref{equation:strong_Taylor_development} at revolution times. To approximate numerically the integrals appearing in equation \eqref{equation:strong_Taylor_development} without evaluating $F$ and $F'$ too many times, we first replace the 1-periodic functions $g_\theta^0(y)$ and $g_\theta^1(y)(z)$ defined in \eqref{equation:def_g_theta} by their associated Fourier series with Fourier coefficients $(c_k^0(y))_{k\in\Z}$ and $(c_p^1(y))_{p\in\Z}$. We define the following approximation of $\varphi_{\varepsilon,t}(y)$, \begin{align} \label{equation:Taylor_expansion_Fourier} \psi_{\varepsilon,t}(y)&=e^{AW(t)}y +\varepsilon \sum_{k\in \Z} e^{AW(t)} c_k^0(y) \int_0^t e^{2i\pi k W(s)} ds\\ &+\varepsilon^2 \sum_{p,k\in \Z} e^{AW(t)} c_p^1(y) \left( c_k^0(y) \int_0^t \int_0^s e^{2i\pi p W(s)} e^{2i\pi k W(r)} dr ds \right). \nonumber \end{align} Notice that $c_k^0(y)\in\C^d $ and $c_p^1(y)=(c_k^0)'(y)\in\C^{d\times d}$ but $\psi_{\varepsilon,t}(y)\in \R^d$. We now evaluate this function $\psi_{\varepsilon,t}(y)$ at time $t=T_N$ to get a second order strong approximation. \begin{proposition} \label{proposition:strong_Taylor_development_hitting_times} We define the following quantity $$ \psi_{\varepsilon,N}(y)=y+H\sum_{k\in\Z} c_k^0(y) \alpha_k^N+H^2\sum_{p,k\in \Z} c_p^1(y)(c_k^0(y)) \beta_{p,k}^N, $$ where $(c_k^0(y))_{k\in\Z}$ and $(c_p^1(y))_{p\in\Z}$ are the Fourier coefficients of the 1-periodic functions $g_\theta^0(y)$ and $g_\theta^1(y)$ defined in \eqref{equation:def_g_theta}, $\alpha_k^N$, $\beta_{p,k}^N$ are the random variables defined in Proposition \ref{proposition:moments_alpha_beta} and $y\in\R^d$ is deterministic. Under Assumption \ref{assumption:F_Lipschitz}, for all test function $\phi \in \CC^3_{P}$, there exists $H_0>0$ such that for all $H=N\varepsilon\leq H_0$, the following estimates hold, where $C$ and $K$ are independent of $\varepsilon$ and $N$, \begin{align} \label{equation:strong_local_order_2_estimate} \E\left[\abs{\varphi_{\varepsilon,T_N}(y)-\psi_{\varepsilon,N}(y)}^2\right]^{1/2}&\leq C(1+\abs{y}^K)H^3,\\ \label{equation:weak_local_order_2_estimate} \abs{\E[\phi(\varphi_{\varepsilon,T_N}(y))|y]-\E[\phi(\psi_{\varepsilon,N}(y))]}&\leq C(1+\abs{y}^K)H^3, \end{align} that is, $\psi_{\varepsilon,N}(y)$ is a numerical approximation of $\varphi_{\varepsilon,T_N}(y)$ of strong/weak local order two. \end{proposition} \begin{proof} Inequality \eqref{equation:strong_local_order_2_estimate} is a straightforward consequence of Proposition \ref{proposition:properties_T1} when evaluating the estimates of Proposition \ref{proposition:strong_Taylor_development} at time $T_N$. For the weak local estimate \eqref{equation:weak_local_order_2_estimate}, using inequality \eqref{equation:strong_local_order_2_estimate}, the mean value inequality, Lemma \ref{lemma:regularity_varphi} and equations \eqref{equation:Taylor_bound_1} and \eqref{equation:Taylor_bound_2}, we get \begin{align*} \E\Big[\Big|\phi(\varphi_{\varepsilon,T_N}(y))&-\phi(\psi_{\varepsilon,T_N}^j(y))\Big|\Big]\\ &\leq \E\left[\sup_{x \in [\varphi_{\varepsilon,T_N}(y) , \psi_{\varepsilon,T_N}^j(y)]} \abs{\phi'(x)} \abs{\varphi_{\varepsilon,T_N}(y)-\psi_{\varepsilon,T_N}^j(y)}\right]\\ &\leq C(1+\abs{y}^K)\E\left[e^{C\varepsilon T_N}(\varepsilon T_N)^{j+1} \sup_{x \in [\varphi_{\varepsilon,T_N}(y) , \psi_{\varepsilon,T_N}^j(y)]} (1+\abs{x}^p)\right]\\ &\leq C(1+\abs{y}^K)\E\left[(\varepsilon T_N)^{j+1} e^{C\varepsilon T_N} \left(1+\abs{\varphi_{\varepsilon,T_N}(y)}^p+\abs{\psi_{\varepsilon,T_N}^j(y)}^p\right)\right]\\ &\leq C(1+\abs{y}^K)\E\left[(\varepsilon T_N)^{j+1} e^{C\varepsilon T_N}\right]. \end{align*} Finally we obtain inequality \eqref{equation:weak_local_order_2_estimate} by taking $H$ small enough so that we can apply Proposition \ref{proposition:properties_T1}. \end{proof} For a fixed $T=N\varepsilon$, when $\varepsilon\rightarrow 0$ (or equivalently $N\rightarrow\infty$), the solution of \eqref{equation:NLS_rescaled} evaluated at stroboscopic times $T_N=T_{T\varepsilon^{-1}}$ converges weakly to the solution of a deterministic ODE, that involves only the first mode $c^0_0=\langle g^0 \rangle=\int_0^1 g^0_\theta d\theta$ of $g^0$. This asymptotic model is the same one as for the deterministic equation \eqref{equation:highly_oscillatory_ODE}. The proof is postponed to Subsection \ref{section:global_error_proof}. \begin{proposition}[Asymptotic model] \label{proposition:asymptotic_model} Under Assumption \ref{assumption:F_Lipschitz}, for $T>0$, the solution $\varphi_{\varepsilon,T_{T\varepsilon^{-1}}}(X_0)$ (for $\varepsilon$ such that $T\varepsilon^{-1}$ is an integer) of equation \eqref{equation:NLS} converges weakly when $\varepsilon\rightarrow 0$ to the solution at time $T$ of \begin{equation} \label{equation:NLS_asymptotic} \frac{d y_{t}}{dt}=\langle g^0 \rangle (y_{t}), \ y_{0}=X_0, \end{equation} that is, for all test function $\phi \in \CC^3_P$, $$\lim_{\varepsilon\rightarrow 0} \abs{\E[\phi(\varphi_{\varepsilon,T_{T\varepsilon^{-1}}}(X_0))]-\E[\phi(y_{T})]}=0.$$ \end{proposition} \begin{remark} It can be proven using the results of Section \ref{section:convergence_theorem} that the solution of the asymptotic model (Proposition \ref{proposition:asymptotic_model}) is an order one weak approximation of $X(\varepsilon T_{Nm})$ for $m\geq 0$ and $X$ solution of equation \eqref{equation:NLS}. We deduce the following simple one-step explicit deterministic integrator that corresponds to the Euler method applied to equation \eqref{equation:NLS_asymptotic}, \begin{equation} \label{algorithm:weak_order_1} y_0 = X_0,\ y_{m+1} = y_m + H c_0^0(y_m). \end{equation} Its cost is independent of $\varepsilon$ and $N$, and it has weak order one w.r.t.\thinspace $H$, that is for all $m\geq 0$, $\E[\phi(\varphi_{\varepsilon,T_{Nm}}(X_0))]-\E[\phi(y_m)]= \OO(H)$. \end{remark} \subsection{Construction of the second order integrators} \label{section:stiff_integrators} To obtain an integrator of weak order two with a cost independent of $\varepsilon$ and $N$, we truncate the local expansion of Proposition \ref{proposition:strong_Taylor_development_hitting_times}. We also replace the involved random variables with cheap discrete random variables with the same first and second moments. To simulate the random variable $\alpha_k^N$ with discrete random variables $\widehat{\alpha}_k^{N}$ with the same first and second moments, we introduce a set $(\xi_k)_{k\in\N}$ of independent random variables, such that $\P(\xi_k = \pm 1)=\frac{1}{2}$, the covariance matrix $(C_\alpha^N)_{p,k}$ such that $$(C_\alpha^N)_{2p-1:2p,2k-1:2k}=\begin{pmatrix} \Cov(\Real(\alpha_p^N),\Real(\alpha_k^N)) & \Cov(\Real(\alpha_p^N),\Imag(\alpha_k^N))\\ \Cov(\Imag(\alpha_p^N),\Real(\alpha_k^N)) & \Cov(\Imag(\alpha_p^N),\Imag(\alpha_k^N)) \end{pmatrix},$$ and $\Gamma^N$ its square root. Then, $\widehat{\alpha}_k^{N}$ is defined for $k\geq 0$ as $$\widehat{\alpha}_k^N=\delta_k+\sum_{l\in\N} (\Gamma^N_{2k-1,l}+i\Gamma^N_{2k,l}) \xi_l \quad \text{with} \quad \delta_k =\left\{ \begin{array}{l} 1 \text{ if } k=0\\ 0 \text{ else} \end{array} \right.$$ and we fix $\widehat{\alpha}_k^N=\overline{\widehat{\alpha}_{-k}^N}$ for $k<0$ (so that the solution stays real while still having the good moments). We also define $\widehat{\beta}_{p,k}^N=\E[\beta_{p,k}^N]$ with the values of Proposition \ref{proposition:moments_alpha_beta}. Doing so yields Method \ref{algorithm:weak_order_2}. For Method \ref{algorithm:geometric_weak_order_2}, we adapt Method \ref{algorithm:weak_order_2} in the spirit of the middle point scheme for ODEs (see \cite[Chap.\thinspace IV]{Hairer06gni}) so that it preserves any quadratic invariant. We also replace $\widehat{\beta}_{p,k}^N$ by $\widehat{\widetilde{\beta}}_{p,k}^N=\E[\widetilde{\beta}_{p,k}^N]$, using the values of Proposition \ref{proposition:moments_alpha_beta}. \begin{remark} The methodology presented in Section \ref{section:construction_algorithm} can be generalised to any order. Thus, under more regularity assumptions on $F$, it is possible to build algorithms similar to Method \ref{algorithm:weak_order_2} of any weak order and that are still robust with respect to the stiffness $\varepsilon$. For order 3, Method \ref{algorithm:weak_order_2} becomes \begin{align*} Y_{m+1} &= Y_m +H \sum_{k\in \Z} c_k^0(Y_m) \widehat{\alpha}_k^N +H^2 \sum_{p,k\in \Z} c_p^1(Y_m) (c_k^0(Y_m)) \widehat{\beta}_{p,k}^N\\ &+H^3 \sum_{l,p,k\in \Z} c_l^1 (c_p^1 (c_k^0))(Y_m) \widehat{\gamma}_{l,p,k}^{(1),N} +c_l^2 (c_p^0,c_k^0)(Y_m) \widehat{\gamma}_{l,p,k}^{(2),N} \end{align*} with the new random variables \begin{align*} \gamma_{l,p,k}^{(1),N}&=\frac{1}{N^2} \int_0^{T_N} e^{2i\pi qW(s)}\int_0^{s} e^{2i\pi pW(r)} \int_0^{r} e^{2i\pi kW(q)} dq dr ds\\ \gamma_{l,p,k}^{(2),N}&=\frac{1}{2 N^2} \int_0^{T_N} e^{2i\pi qW(s)}\int_0^{s} e^{2i\pi pW(r)} \int_0^{s} e^{2i\pi kW(q)} dq dr ds, \end{align*} and where the discrete random variables share the same moments up to order 3 for the $\widehat{\alpha}_k^N$, order 2 for the $\widehat{\beta}_{p,k}^N$, and order 1 for the $\widehat{\gamma}_{l,p,k}^{(i),N}$. It is also possible to generalise Method \ref{algorithm:geometric_weak_order_2} up to any order in the spirit of the middle-point scheme, but the construction of discrete random variables allowing the preservation of quadratic invariants is not obvious for higher orders (although backward error analysis guarantees the preservation of quadratic invariants for the exact random variables based on $W$). \end{remark} \section{Weak convergence analysis} \label{section:convergence_theorem} This section focuses on the proofs of the following two theorems, showing the order two convergence of Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2}. \begin{theorem} \label{theorem:convergence_algorithm_order_2} Assume that the Fourier coefficients $c_k^0$, $c_p^1$ of $g_\theta^0$ and $g_\theta^1$ in \eqref{equation:def_g_theta} are non-zero only for $-K_t /2\leq k,p< K_t /2$. Then, under Assumption \ref{assumption:F_Lipschitz}, Method \ref{algorithm:weak_order_2} has weak order two, that is, for all $T>0$, for all test function $\phi \in \CC^3_P$, there exists $H_0>0$ such that for all $H\leq H_0$, for all $m\geq 0$ such that $mN\varepsilon=mH\leq T$, there exists two positive constants $K$ and $C$ both independent of $\varepsilon$, $N$ and $K_t$ such that \begin{equation} \label{equation:theorem_cv_estimate} \abs{\E[\phi(\varphi_{\varepsilon,T_{Nm}}(X_0))]-\E[\phi(Y_m)]}\leq CH^2(1+\E[\abs{X_0}^{K}]). \end{equation} \end{theorem} \begin{theorem} \label{theorem:convergence_algorithm_order_2_geometric} Assume that the Fourier coefficients $c_k^0$, $c_p^1$ of $g_\theta^0$ and $g_\theta^1$ in \eqref{equation:def_g_theta} are non-zero only for $-K_t /2\leq k,p < K_t /2$. Then, under Assumption \ref{assumption:F_Lipschitz}, if $c_0^1(c_k^0)$ and $c_p^1(c_0^0)$ are Lipschitz continuous uniformly in $k$ and $p$, Method \ref{algorithm:geometric_weak_order_2} is well defined and has weak order two (i.e.\thinspace it satisfies an estimate of the form \eqref{equation:theorem_cv_estimate}). In addition, if for a fixed symmetric matrix $ S \in \R^{d\times d}$, the quantity $Q(y)=\frac{1}{2}y^T S y$ is preserved by equation \eqref{equation:NLS}, then Method \ref{algorithm:geometric_weak_order_2} also preserves the invariant $Q(y)=\frac{1}{2}y^T S y$, that is, the solution $Y_{m+1}$ of equation \eqref{equation:geometric_order_2_scheme} satisfies $Q(Y_{m+1})=Q(Y_m)$. \end{theorem} These two theorems focus on approximating the exact solution of equation \eqref{equation:NLS} at the revolution times $\varepsilon T_{Nm}$, $m=0,1,\dots$, but one could compute an approximation at different times by composing with other methods at the end of the integration. \begin{remark} \label{rem:trunc} Since the error constant $C$ in \eqref{equation:theorem_cv_estimate} is independent of the number $K_t$ of Fourier modes, we emphasize that Theorem \ref{theorem:convergence_algorithm_order_2} and Theorem \ref{theorem:convergence_algorithm_order_2_geometric} remain valid for infinitely many modes ($K_t\rightarrow \infty$). In addition, assuming that $F$ is of class $C^{s+1}_P$ yields a truncation error of the Fourier series in \eqref{equation:def_g_theta} of size $\OO((1+\abs{y}^K)K_t ^{-s})$ (see e.g.\thinspace \cite[Sect.\thinspace III.1.3]{Lubich08fqt}), and if $g_\theta^0$ is assumed analytic in $\theta$ (for example if $F$ is a polynomial), this error becomes exponentially small as $\OO((1+\abs{y})e^{-c K_t })$. For simplicity of the analysis, we thus assumed in Theorem \ref{theorem:convergence_algorithm_order_2} and Theorem \ref{theorem:convergence_algorithm_order_2_geometric} that $g_\theta^0$ and $g_\theta^1$ have a finite number $K_t $ on non-zero Fourier modes in \eqref{equation:def_g_theta}. If this assumption does not hold, the truncation errors $\OO((1+\abs{y}^K)K_t ^{-s})$ or $\OO((1+\abs{y})e^{-c K_t })$ should be added in the right-hand side of the error estimate \eqref{equation:theorem_cv_estimate}. Let us prove it in the analytic case. We first apply the change of variable $\widetilde{\varphi}_{\varepsilon,t}(y)=e^{-AW(t)}\varphi_{\varepsilon,t}(y)$ that has no effect at time $t=T_{Nm}$. We now have to compare the two solutions of the following integral formulations \begin{align*} \widetilde{\varphi}_{\varepsilon,t}(y)&=y+\varepsilon\int_0^t g_{W(s)}^0(\widetilde{\varphi}_{\varepsilon,s}(y))ds,\\ \widetilde{\varphi}_{\varepsilon,t}^{(K_t)}(y)&=y+\varepsilon\int_0^t \sum_{k=-K_t/2}^{K_t/2-1} c_k^0(\widetilde{\varphi}_{\varepsilon,s}^{(K_t)}(y))e^{2i\pi k W(s)}ds. \end{align*} Using the truncation estimates that we previously discussed and the Lipschitz property of $g_\theta^0$, one gets \begin{align*} \abs{\widetilde{\varphi}_{\varepsilon,t}-\widetilde{\varphi}_{\varepsilon,t}^{(K_t)}}(y) &\leq \varepsilon \int_0^t \abs{g_{W(s)}^0(\widetilde{\varphi}_{\varepsilon,s}(y))-g_{W(s)}^0(\widetilde{\varphi}_{\varepsilon,s}^{(K_t)}(y))} ds +C\varepsilon t e^{-c K_t} \sup_{[0,1]} \abs{g^0(y)}\\ &\leq C\varepsilon \int_0^t \abs{\widetilde{\varphi}_{\varepsilon,s}(y)-\widetilde{\varphi}_{\varepsilon,s}^{(K_t)}(y)} ds +C\varepsilon t (1+\abs{y})e^{-c K_t}. \end{align*} The Gronwall lemma and Proposition \ref{proposition:properties_T1} yield for $mN\varepsilon \leq T$, $$\E\left[\abs{\widetilde{\varphi}_{\varepsilon,T_{Nm}}(y)-\widetilde{\varphi}_{\varepsilon,T_{Nm}}^{(K_t)}(y)}^2\right]^{1/2} \leq C(1+\abs{y})e^{-c K_t}.$$ \end{remark} The structure of the convergence proof is similar to the one for standard SDE integrators, see e.g.\thinspace \cite[Chap.\thinspace 2]{Milstein04snf}, but one has to be cautious because our solution is evaluated at stochastic times and the error constants should not depend on $\varepsilon$ or $N$. \subsection{Boundedness of the numerical moments} \begin{proposition}[Bounded moments for the integrator \eqref{equation:order_2_scheme}] \label{proposition:bounded_moments} Assume that for $y\in\R^d$, the numerical integrator $\widehat{\psi}_{\varepsilon,N}(y)$ is given by \begin{equation} \label{equation:proof_integrator_order_2} \widehat{\psi}_{\varepsilon,N}(y) = y +H \sum_{k\in\Z} c_k^0(y) \widehat{\alpha}_k^{N} +H^2 \sum_{p,k\in\Z} c_p^1(y) (c_k^0(y)) \widehat{\beta}_{p,k}^N, \end{equation} where $\widehat{\alpha}_k^N$, $\widehat{\beta}_{p,k}^N$ are random variables defined such that for all $q>0$, $\E\left[\left(\sum_{k} \frac{\abs{\widehat{\alpha}_k^N}^2}{k^2}\right)^{q}\right]$ and $\E\left[\left(\sum_{p,k} \frac{\abs{\widehat{\beta}_{p,k}^N}^2}{k^2}\right)^{q}\right]$ are bounded uniformly in $N$. Then, under Assumption \ref{assumption:F_Lipschitz} and if $\abs{y}$ has bounded moments, for any $T>0$, for all $m$, $H$ such that $m\varepsilon N=mH\leq T$, for all $q>0$, we have $\E[\abs{\widehat{\psi}_{\varepsilon,N}^m(y)}^{2q}]\leq C_q(1+\E[\abs{y}^{2q}])$, where $C_q$ is independent of $m$, $\varepsilon$ and $N$. \end{proposition} \begin{proof} We first prove \begin{equation} \label{equation:inequality_bounded_moments} \abs{\widehat{\psi}_{\varepsilon,N}(y)-y}\leq CH(1+\abs{y})M_N, \end{equation} where $\E[(M_N)^{2q}]\leq C_q$ for all $q>0$. We have \begin{align*} \abs{\widehat{\psi}_{\varepsilon,N}(y)-y}&= H\abs{\sum_{k\in\Z} c_k^0(y) \widehat{\alpha}_k^N+H\sum_{p,k\in\Z} c_p^1(y)(c_k^0(y)) \widehat{\beta}_{p,k}^N}\\ &\leq C H \left(M_N^{(0)} \sqrt{\sum_{k\in\Z} k^2 \abs{c_k^0(y)}^2}+ M_N^{(1)} \sqrt{\sum_{p\in\Z} \abs{c_p^1(y)}^2} \sqrt{\sum_{k\in\Z} k^2 \abs{c_k^0(y)}^2} \right) \end{align*} where $M_N^{(0)}=\sqrt{\sum_k \frac{\abs{\widehat{\alpha}_k^N}^2}{k^2}}$ and $M_N^{(l)}=\sqrt{\sum_{p,k} \frac{\abs{\widehat{\beta}_{p,k}^N}^2}{k^2}}$ have moments bounded uniformly in $N$. Then using the Bessel-Parseval theorem, we get $\sum_k k^2 \abs{c_k^0(y)}^2=\int_0^1 \abs{\partial_\theta g_\theta(y)^0}^2 d\theta$. Assumption \ref{assumption:F_Lipschitz} yields $\abs{\partial_\theta g_\theta^0(y)}\leq C(1+\abs{y})$. Then, the Bessel-Parseval theorem applied on $g_\theta^1$ gives $\sqrt{\sum_p \abs{c_p^1(y)}^2}\leq C$, hence the result. We define $\Delta \psi_m=\widehat{\psi}_{\varepsilon,N}^{m+1}(y)-\widehat{\psi}_{\varepsilon,N}^{m}(y)=(\widehat{\psi}_{\varepsilon,N}-\Id)(\widehat{\psi}_{\varepsilon,N}^{m}(y))$, then $$(\widehat{\psi}_{\varepsilon,N}^{m+1}(y))^{2q}=(\widehat{\psi}_{\varepsilon,N}^{m}(y))^{2q} +\sum_{j=1}^{2q} \binom{2l}{j}(\widehat{\psi}_{\varepsilon,N}^{m}(y))^{2q-j} \Delta \psi_m^j . $$ Equation \eqref{equation:inequality_bounded_moments} and the bounded moments of $M_N$ give \begin{align*} \abs{\E\left[(\widehat{\psi}_{\varepsilon,N}^{m}(y))^{2q-j} \Delta \psi_m^j\right]} &\leq \E\left[\abs{\widehat{\psi}_{\varepsilon,N}^{m}(y)}^{2q-j} CH^j(1+\abs{\widehat{\psi}_{\varepsilon,N}^{m}(y)}^j)M_N^j\right]\\ &\leq C_q H\left(1+\E\left[\abs{\widehat{\psi}_{\varepsilon,N}^{m}(y)}^{2q}\right]\right). \end{align*} We deduce $$1+\E\left[\abs{\widehat{\psi}_{\varepsilon,N}^{m+1}(y)}^{2q}\right]\leq e^{C_q H} \left(1+\E\left[\abs{\widehat{\psi}_{\varepsilon,N}^{m}(y)}^{2q}\right]\right)$$ and by induction $\E\left[\abs{\widehat{\psi}_{\varepsilon,N}^{m}(y)}^{2q}\right]\leq e^{C_q mH} (1+\E[\abs{y}^{2q}])\leq e^{C_q T} (1+\E[\abs{y}^{2q}])$. \end{proof} \begin{proposition}[Bounded moments for the integrator \eqref{equation:geometric_order_2_scheme}] \label{proposition:bounded_moments_geometric} Assume that for $y\in\R^d$, the numerical scheme $\widehat{\psi}_{\varepsilon,N}(y)$ satisfies \begin{align} \label{equation:proof_geometric_integrator_order_2} \widehat{\psi}_{\varepsilon,N}(y) &= y +H \sum_{k\in\Z} c_k^0\left(\frac{y+\widehat{\psi}_{\varepsilon,N}(y)}{2}\right) \widehat{\alpha}_k^{N}\\ &+H^2 \sum_{p,k\in\Z} c_p^1\left(\frac{y+\widehat{\psi}_{\varepsilon,N}(y)}{2}\right) \left(c_k^0\left(\frac{y+\widehat{\psi}_{\varepsilon,N}(y)}{2}\right)\right) \widehat{\widetilde{\beta}}_{p,k}^N, \nonumber \end{align} where $\widehat{\alpha}_k^N$, $\widehat{\widetilde{\beta}}_{p,k}^N$ are random variables defined such that for all $q>0$, $\sum_{k} \abs{\widehat{\alpha}_k^N}$, $\sum_{p,k} \abs{\widehat{\widetilde{\beta}}_{p,k}^N}$, $\E\left[\left(\sum_k \frac{\abs{\widehat{\alpha}_k^N}^2}{k^2}\right)^{q}\right]$ and $\E\bigg[\bigg(\sum_{p,k} \frac{\abs{\widehat{\widetilde{\beta}}_{p,k}^N}^2}{k^2}\bigg)^{q}\bigg]$ are bounded uniformly in $N$. Then, under Assumption \ref{assumption:F_Lipschitz} and if $\abs{y}$ has bounded moments, for $H_0$ small enough and any $T>0$, for all $m$, $H$ such that $m\varepsilon N=mH\leq T$ and $H\leq H_0$, for all $q>0$, we have $\E[\abs{\widehat{\psi}_{\varepsilon,N}^m(y)}^{2q}]\leq C_q(1+\E[\abs{y}^{2q}])$, where $C_q$ is independent of $m$, $\varepsilon$ and $N$. \end{proposition} \begin{proof} We prove an equivalent of the estimate \eqref{equation:inequality_bounded_moments} for $\widehat{\psi}_{\varepsilon,N}(y)$. The growth properties of the Fourier coefficients yield \begin{align*} \abs{\widehat{\psi}_{\varepsilon,N}(y)-y} &\leq CH \left(\sum_k \abs{c_k^0}(y) \abs{\widehat{\alpha}_k^N}+\sum_{p,k} \abs{c_k^0}(y) \abs{\widehat{\widetilde{\beta}}_{p,k}^N}\right)\\ &+CH \left(\sum_k \abs{\widehat{\alpha}_k^N}+\sum_{p,k} \abs{\widehat{\widetilde{\beta}}_{p,k}^N}\right)\abs{\widehat{\psi}_{\varepsilon,N}(y)-y}, \end{align*} As $\sum_k \abs{\widehat{\alpha}_k^N}+\sum_{p,k} \abs{\widehat{\widetilde{\beta}}_{p,k}^N}$ is bounded, using the same estimates as in the proof of Proposition \ref{proposition:bounded_moments}, we get for all $H\leq H_0$ small enough, \begin{equation} \label{equation:inequality_bounded_moments_geometric} \abs{\widehat{\psi}_{\varepsilon,N}(y)-y} \leq CH(1+\abs{y})M_N, \end{equation} where $M_N$ has bounded moments. The remaining of the proof is the same as in the proof of Proposition \ref{proposition:bounded_moments}. \end{proof} \subsection{Local weak error} \begin{proposition}[Local error estimate] \label{proposition:local_weak_error} Assume that for $y\in\R^d$ deterministic, the numerical scheme can be written as $$ \widehat{\psi}_{\varepsilon,N}(y)=y+H\sum_{k\in\Z} c_k^0(y) \widehat{\alpha}_k^N+H^2\sum_{p,k\in\Z} c_p^1(y)(c_k^0(y)) \widehat{\beta}_{p,k}^N+R, $$ where $\E[\abs{R}]\leq C(1+\abs{y}^K)H^3$ and $\widehat{\alpha}_k^N\in\C$, $\widehat{\beta}_{p,k}^N\in\R$ are random variables such that $\widehat{\alpha}_k^N=\overline{\widehat{\alpha}_{-k}^N}$ and $$ \E[\widehat{\alpha}_k^N]=\E[\alpha_k^N],\ \E[\widehat{\beta}_{p,k}^N]=\E[\beta_{p,k}^N],\ \E[\widehat{\alpha}_{k_1}^N\widehat{\alpha}_{k_2}^N]=\E[\alpha_{k_1}^N\alpha_{k_2}^N]. $$ Under Assumption \ref{assumption:F_Lipschitz}, if $\widehat{\psi}_{\varepsilon,N}(y)$ satisfies the assumptions of Proposition \ref{proposition:bounded_moments} (or Proposition \ref{proposition:bounded_moments_geometric}), for all test function $\phi \in \CC^3_{P}$, there exists $H_0>0$ such that for all $H=N\varepsilon\leq H_0$, the following estimate holds, where $C$ and $K$ are independent of $\varepsilon$ and $N$, $$\abs{\E[\phi(\varphi_{\varepsilon,T_N}(y))]-\E[\phi(\widehat{\psi}_{\varepsilon,N}(y))]}\leq C(1+\abs{y}^K)H^3,$$ that is, the numerical scheme has weak local order two. \end{proposition} \begin{proof} Using Proposition \ref{proposition:strong_Taylor_development_hitting_times} and its notation $\psi_{\varepsilon,N}(y)$, it is enough to prove that $$\abs{\E[\phi(\psi_{\varepsilon,N}(y))]-\E[\phi(\widehat{\psi}_{\varepsilon,N}(y))]}\leq C (1+\abs{y}^K) H^3.$$ A local expansion gives $$\phi(\psi_{\varepsilon,N}(y))=\phi(y)+\phi'(y)(\psi_{\varepsilon,N}(y)-y)+\phi''(y)(\psi_{\varepsilon,N}(y)-y,\psi_{\varepsilon,N}(y)-y)+R_1.$$ As $\psi_{\varepsilon,N}(y)=\psi_{\varepsilon,T_N}^2(y)$ (see equation \eqref{equation:strong_Taylor_development}), using Inequalities \eqref{equation:Taylor_bound_2}, \eqref{equation:Taylor_bound_3} evaluated at $T_N$ and Proposition \ref{proposition:properties_T1} yield \begin{align*} \E[\abs{R_1}]&\leq \E\left[\sup_{x \in [y , \psi_{\varepsilon,N}(y)]} \abs{\phi^{(3)}(x)} \abs{\psi_{\varepsilon,N}(y)-y}^3\right]\\ &\leq \E\left[C(1+\abs{y}^K+\abs{\psi_{\varepsilon,N}(y)}^K) (1+\abs{y}^K) (\varepsilon T_N)^3 e^{C\varepsilon T_N} \right]\\ &\leq \E\left[C (1+\abs{y}^K) (\varepsilon T_N)^3 e^{C\varepsilon T_N} \right]\\ &\leq C (1+\abs{y}^K) H^3. \end{align*} We obtain a similar expansion for $\phi(\widehat{\psi}_{\varepsilon,N}(y))$: $$\phi(\widehat{\psi}_{\varepsilon,N}(y))=\phi(y)+\phi'(y)(\widehat{\psi}_{\varepsilon,N}(y)-y)+\phi''(y)(\widehat{\psi}_{\varepsilon,N}(y)-y,\widehat{\psi}_{\varepsilon,N}(y)-y)+\widehat{R_1},$$ where, using Inequality \eqref{equation:inequality_bounded_moments} (or \eqref{equation:inequality_bounded_moments_geometric}), \begin{align*} \E[|\widehat{R_1}|]&\leq \E\left[\sup_{x \in [y , \widehat{\psi}_{\varepsilon,N}(y)]} \abs{\phi^{(3)}(x)} \abs{\widehat{\psi}_{\varepsilon,N}(y)-y}^3\right]\\ &\leq C\E\left[(1+\abs{y}^K+\abs{\widehat{\psi}_{\varepsilon,N}(y)}^K) (1+\abs{y}^K) H^3 M_N^3 \right]\\ &\leq C(1+\abs{y}^K) H^3 \E\left[(1+M_N^K) \right]\\ &\leq C(1+\abs{y}^K) H^3. \end{align*} Making the difference of both equations gives \begin{align} \label{equation:proof_local_difference} \phi(\psi_{\varepsilon,N}(y))-\phi(\widehat{\psi}_{\varepsilon,N}(y))&=\phi'(y)(\psi_{\varepsilon,N}(y)-\widehat{\psi}_{\varepsilon,N}(y))-\phi''(y)(\psi_{\varepsilon,N}(y)-y)^2\\ &+\phi''(y)(\widehat{\psi}_{\varepsilon,N}(y)-y)^2+R,\nonumber \end{align} where $\E[\abs{R}]\leq C (1+\abs{y}^K) H^3$. For the first term of \eqref{equation:proof_local_difference}, we have \begin{align*} \E[\phi'(y)(\psi_{\varepsilon,N}(y)-\widehat{\psi}_{\varepsilon,N}(y))]&= H\sum_{k\in\Z} \E[\phi'(y)(c_k^0(y) (\alpha_k^N-\widehat{\alpha}_k^N))]\\ &+H^2\sum_{p,k\in\Z} \E[\phi'(y)(c_p^1(y)(c_k^0(y)) (\beta_{p,k}^N-\widehat{\beta}_{p,k}^N))]. \end{align*} Then, we get $$\E[\phi'(y)(c_k^0(y) (\alpha_k^N-\widehat{\alpha}_k^N))]=\E[\alpha_k^N-\widehat{\alpha}_k^N] \phi'(y)(c_k^0(y))=0.$$ We can do the same thing with the term in $\beta_{p,k}^N$ and obtain $$\E[\phi'(y)(\psi_{\varepsilon,N}(y)-\widehat{\psi}_{\varepsilon,N}(y))]=0.$$ Let us now study the second order term $Z=\phi''(y)(\widehat{\psi}_{\varepsilon,N}(y)-y)^2 -\phi''(y)(\psi_{\varepsilon,N}(y)-y)^2$ that appears in \eqref{equation:proof_local_difference}. We develop this expression and keep only the order one and two terms to obtain $Z=H^2 Y+R$ where $\E[\abs{R}]\leq C(1+\abs{y}^K)H^3$ (by the same arguments as before) and \begin{align*} Y&=\sum_{k_1,k_2} \left[ \phi''(y)(c_{k_1}^0(y) \widehat{\alpha}_{k_1}^N ,c_{k_2}^0(y) \widehat{\alpha}_{k_2}^N)-\phi''(y)(c_{k_1}^0(y) \alpha_{k_1}^N ,c_{k_2}^0(y) \alpha_{k_2}^N)\right]\\ &=\sum_{k_1,k_2} (\widehat{\alpha}_{k_1}^N \widehat{\alpha}_{k_2}^N-\alpha_{k_1}^N \alpha_{k_2}^N) \phi''(y)(c_{k_1}^0(y),c_{k_2}^0(y)) \end{align*} The condition on the moments of the $\widehat{\alpha}_k^N$ yields $\E[Y]=0$. Putting all these arguments together in \eqref{equation:proof_local_difference}, we finally get that $$\abs{\E[\phi(\psi_{\varepsilon,N}(y))]-\E[\phi(\widehat{\psi}_{\varepsilon,N}(y))]}\leq C(1+\abs{y}^K)H^3.$$ We deduce the local order two of the proposed numerical scheme. \end{proof} \begin{remark*} The constant $H_0$ in Proposition \ref{proposition:local_weak_error} depends on $F$, but also of the polynomial growth power of $\phi$ and its first three derivatives. This dependence is expected when trying to evaluate the solution of SDEs at random times. To make $H_0$ independent of the test functions, one can consider the following sets of test functions $$\CC^3_{P,K}=\{\phi \in \CC^3, \exists C>0,\exists k\leq K,\forall y, \abs{\phi^{(i)}(y)}\leq C(1+\abs{y}^k), i\in \{0,1,2,3\}\}.$$ \end{remark*} \subsection{Global error} \label{section:global_error_proof} \begin{theorem}[Global convergence] \label{theorem:global_convergence_theorem} Assume that the numerical scheme $\widehat{\psi}_{\varepsilon,N}$ satisfies equation \eqref{equation:proof_integrator_order_2} (respectively equation \eqref{equation:proof_geometric_integrator_order_2}) where $\widehat{\alpha}_k^N\in\C$, $\widehat{\beta}_{p,k}^N\in \R$ (respectively $\widehat{\widetilde{\beta}}_{p,k}^N\in \R$) are random variables such that $\widehat{\alpha}_k^N=\overline{\widehat{\alpha}_{-k}^N}$ and $$ \E[\widehat{\alpha}_k^N]=\E[\alpha_k^N],\ \E[\widehat{\beta}_{p,k}^N]=\E[\beta_{p,k}^N],\ \E[\widehat{\alpha}_{k_1}^N\widehat{\alpha}_{k_2}^N]=\E[\alpha_{k_1}^N\alpha_{k_2}^N]. $$ (respectively $\widehat{\alpha}_k^N$ satisfies the same conditions and $\widehat{\widetilde{\beta}}_{p,k}^N$ satisfies $\E[\widehat{\widetilde{\beta}}_{p,k}^N]=\E[\widetilde{\beta}_{p,k}^N]$). Under Assumption \ref{assumption:F_Lipschitz}, if for all $q>0$, $\E\left[\left(\sum_k \frac{\abs{\widehat{\alpha}_k^N}^2}{k^2}\right)^{q}\right]$ and $\E\left[\left(\sum_{p,k} \frac{\abs{\widehat{\beta}_{p,k}^N}^2}{k^2}\right)^{q}\right]$ are bounded uniformly in $N$ (respectively $\sum_{k} \abs{\widehat{\alpha}_k^N}$, $\sum_{p,k} \abs{\widehat{\widetilde{\beta}}_{p,k}^N}$, $\E\left[\left(\sum_k \frac{\abs{\widehat{\alpha}_k^N}^2}{k^2}\right)^{q}\right]$ and $\E\bigg[\bigg(\sum_{p,k} \frac{\abs{\widehat{\widetilde{\beta}}_{p,k}^N}^2}{k^2}\bigg)^{q}\bigg]$ are bounded uniformly in $N$), for all $T>0$, for all test function $\phi \in \CC^3_P$, there exists $H_0>0$ such that for all $H\leq H_0$, for all $M\geq 0$ such that $MN\varepsilon=MH\leq T$, there exists two positive constants $K$ and $C$ both independent of $\varepsilon$ and $N$ such that $$\abs{\E[\phi(\varphi_{\varepsilon,T_{NM}}(X_0))]-\E[\phi(\widehat{\psi}_{\varepsilon,N}^M(X_0))]}\leq CH^2(1+\E[\abs{X_0}^{K}]).$$ \end{theorem} \begin{proof} We denote $$e_M=\E[\phi(\varphi_{\varepsilon,T_{NM}}(X_0))]-\E[\phi(\widehat{\psi}_{\varepsilon,N}^{M}(X_0))]$$ and rewrite it with a telescopic sum \begin{align*} e_M&=\sum_{m=1}^M \E[\phi(\varphi_{\varepsilon,T_{N(m-1)}}(\widehat{\psi}_{\varepsilon,N}^{M-m+1}(X_0)))]-\E[\phi(\varphi_{\varepsilon,T_{Nm}}(\widehat{\psi}_{\varepsilon,N}^{M-m}(X_0)))]\\ &=\sum_{m=1}^M \E[\widetilde{\phi}_{m-1}(\widehat{\psi}_{\varepsilon,N}(\widehat{\psi}_{\varepsilon,N}^{M-m}(X_0)))]-\E[\widetilde{\phi}_{m-1}(\varphi_{\varepsilon,T_N}(\widehat{\psi}_{\varepsilon,N}^{M-m}(X_0)))] \end{align*} where $\widetilde{\phi}_{m-1}=\phi \circ \varphi_{\varepsilon,T_{N(m-1)}}$. Using Lemma \ref{lemma:regularity_varphi} and $\phi \in \CC^3_P$, we obtain for $0\leq i\leq 3$, $$\abs{\widetilde{\phi}_m^{(i)}(y)}\leq Ce^{C\varepsilon T_{Nm}}(1+\abs{y}^K).$$ Thus, knowing the hitting times involved, $\widetilde{\phi}_m\in \CC^3_P$. Using Assumption \ref{assumption:F_Lipschitz}, $(c_p^0)'=c_p^1$ and $\beta_{p,k}^N=\widetilde{\beta}_{p,k}^N+\frac{\alpha_p \alpha_k}{2}$, we deduce that $\widehat{\psi}_{\varepsilon,N}$ satisfies the assumptions of Proposition \ref{proposition:local_weak_error}. Applying Proposition \ref{proposition:local_weak_error} to each term of $e_M$ gives $$\abs{e_M}\leq \sum_{m=1}^M C\E\left[e^{C\varepsilon T_{Nm}}\right]H^3\left(1+\E\left[\abs{\widehat{\psi}_{\varepsilon,N}^{M-m}(X_0)}^K\right]\right).$$ Finally, the moments of $\widehat{\psi}_{\varepsilon,N}^{m}(X_0)$ are all bounded uniformly in $\varepsilon$, $N$ and $m$ according to Proposition \ref{proposition:bounded_moments} (respectively \ref{proposition:bounded_moments_geometric}). Thus $$\abs{e_M}\leq \sum_{m=1}^M CH^3(1+\E[\abs{X_0}^{K}]) \leq CH^2(1+\E[\abs{X_0}^{K}]).$$ We deduce the global weak order two. \end{proof} With the help of Theorem \ref{theorem:global_convergence_theorem}, we prove Proposition \ref{proposition:asymptotic_model} and the convergence of Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2}. \begin{proof}[Proof of Proposition \ref{proposition:asymptotic_model}] Rewriting Theorem \ref{theorem:global_convergence_theorem} for order one yields for all $H=N\varepsilon$ small enough and all $M\geq 0$, $$\abs{\E[\phi(\varphi_{\varepsilon,T_{NM}}(X_0))]-\E[\phi(y_{\varepsilon NM})]}\leq C(\varepsilon N)^2(1+\E[\abs{X_0}^{K}]).$$ Evaluating in $N=1$, $M=\frac{T}{\varepsilon}$ and taking the limit $\varepsilon\rightarrow 0$ yield the result. \end{proof} \begin{proof}[Proof of Theorem \ref{theorem:convergence_algorithm_order_2}] As $\widehat{\alpha}_k^N\leq C$ and $\sum_{p,k} \frac{\abs{\E[\beta_{p,k}^N]}^2}{k^2}$ converges by Proposition \ref{proposition:moments_alpha_beta}, Theorem \ref{theorem:global_convergence_theorem} applies and concludes the proof. \end{proof} \begin{proof}[Proof of Theorem \ref{theorem:convergence_algorithm_order_2_geometric}] The regularity assumptions yield the Lipschitzness of the $c_k^0(y)$ and the involved $c_p^1(y)(c_k^0(y))$ with constants independent of $k$ and $p$. As $\sum_{k} \abs{\widehat{\alpha}_k^N}$ and $\sum_{p,k} \abs{\widehat{\widetilde{\beta}}_{p,k}^N}$ are bounded, the right hand-side of equation \eqref{equation:geometric_order_2_scheme} is a contraction for all $H\leq H_0$ small enough and the constant does not depend on $Y_m$, so $H_0$ depends only of $F$ and $F'$. Thus, the integrator is well-posed for all $H\leq H_0$. The weak order two is obtained using Theorem \ref{theorem:global_convergence_theorem}. Indeed the use of discrete random variables and Proposition \ref{proposition:moments_alpha_beta} give the convergence of the involved series. For showing that Method \ref{algorithm:geometric_weak_order_2} preserves quadratic invariants, it is sufficient to prove that $Q'(y)(\sum_k c_k^0(y)\widehat{\alpha}_k^N)=0$ and $Q'(y)(\sum_{p,k} c_p^1(y)(c_k^0(y)) \widehat{\widetilde{\beta}}_{p,k}^N)=0$ (see \cite[Chap. IV]{Hairer06gni}). The preservation of $Q$ by equation \eqref{equation:NLS} yields $Q'(y)(Ay)=0$ and $Q'(y)(F(y))=0$. We deduce the following two equations, valid for all $y\in \R^d$, \begin{align} \label{equation:lemma_g_proof_preservation1} y^T S g_\theta^0(y) &=0,\\ \label{equation:lemma_g_proof_preservation2} y^T S g_\theta^1(y)(g_\nu^0(y)) &=-(g_\nu^0(y))^T S g_\theta^0(y), \end{align} where equation \eqref{equation:lemma_g_proof_preservation2} is obtained by differentiating equation \eqref{equation:lemma_g_proof_preservation1} in the direction $g_\nu^0$. Using equation \eqref{equation:lemma_g_proof_preservation1}, we have $$Q'(y)\left(\sum_k c_k^0(y)\widehat{\alpha}_k^N\right)=\int_0^1 Q'(y)(g_\theta^0(y)) \sum_k e^{-2i\pi k\theta}\widehat{\alpha}_k^N d\theta =0.$$ \pagebreak[2] For the second order term, equation \eqref{equation:lemma_g_proof_preservation2} and the values of Proposition \ref{proposition:moments_alpha_beta} yield \begin{align*} Q'(y)&\left(\sum_{p,k} c_p^1(y)(c_k^0(y)) \widehat{\widetilde{\beta}}_{p,k}^N\right)\\ &=\int_0^1\int_0^1 y^T S g_\theta^1(y)(g_\nu^0(y))\sum_{p,k} e^{-2i\pi p\theta}e^{-2i\pi k\nu} \widehat{\widetilde{\beta}}_{p,k}^N d\nu d\theta\\ &=-\int_0^1\int_0^1 (g_\nu^0(y))^T S g_\theta^0(y)\sum_{p,k} e^{-2i\pi p\theta}e^{-2i\pi k\nu} \widehat{\widetilde{\beta}}_{p,k}^N d\nu d\theta\\ &=-\frac{1}{2}\int_0^1\int_0^1 (g_\nu^0(y))^T S g_\theta^0(y)\sum_{p,k} [e^{-2i\pi p\theta}e^{-2i\pi k\nu} +e^{-2i\pi p\nu}e^{-2i\pi k\theta}]\widehat{\widetilde{\beta}}_{p,k}^N d\nu d\theta\\ &=0. \end{align*} Hence Method B is well-posed, has weak order 2 and preserves the invariant $Q$. \end{proof} \section{Numerical experiments} \label{section:numerical experiments} In this section, we first illustrate numerically the weak order two of Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2} with convergence curves. Then, we apply the new algorithms to solve the nonlinear Schrödinger equation with highly-oscillatory white noise dispersion \eqref{equation:NLS_WND_general}. \subsection{Weak order of convergence} To confirm the results of Theorem \ref{theorem:convergence_algorithm_order_2} and Theorem \ref{theorem:convergence_algorithm_order_2_geometric}, we check numerically if Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2} have weak order two of accuracy w.r.t.\thinspace $H$ uniformly in $\varepsilon$ and $N$. As the Euler-Maruyama method and the algorithms presented in \cite{Cohen12otn,Belaouar15nao,Cohen17eif} are completely innacurate if they do not satisfy the severe timestep restriction $h\ll \varepsilon$, we compare the performance of Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2} to the performance of the Euler method \eqref{algorithm:weak_order_1}. We first apply the algorithms on equation \eqref{equation:NLS} with the linearity $F(y)=iy$, $A=2i\pi$, $X_0=1$ and $\varepsilon=10^{-3}$. Equivalently we can write it in the real setting as $$dX=\frac{2\pi}{\sqrt{\varepsilon}} \begin{pmatrix} 0&-1\\1&0 \end{pmatrix} X\circ dW +\begin{pmatrix} 0&-1\\1&0 \end{pmatrix} X dt,\ X_0=\begin{pmatrix} 1\\0 \end{pmatrix}.$$ We plot on a logarithmic scale an estimate of the weak error for approximating $X$ at time $T=10^{-3} T_{2^8}$ where $\E[T]=0.256$. The exact solution $X(T)$ is approximated by the output of Method \ref{algorithm:geometric_weak_order_2} for $H=\varepsilon$. The parameters $N$ and $m$ are varying under the condition that $Nm=2^8$. The test function is $\phi(y)=2y_1+4y_2$ and the average is taken over $10^7$ trajectories. We choose the tolerance $10^{-13}$ for the fixed point. On the right picture of Figure \ref{figure:weak_convergence_curves}, we use a modification of a Kubo oscillator introduced in \cite{Cohen12otn} with the nonlinearity $F(y)=i(1+\Real(y)^3+\Imag(y)^5)y$. In the real setting, it yields the following two-dimensional SDE $$dX=\frac{2\pi}{\sqrt{\varepsilon}} \begin{pmatrix} 0&-1\\1&0 \end{pmatrix} X\circ dW +\begin{pmatrix} 0&-1\\1&0 \end{pmatrix} (1+X_1^3+X_2^5) X dt,\ X_0=\begin{pmatrix} 1\\0 \end{pmatrix}.$$ We take 8 modes for the Fourier decomposition and the same other parameters as before. The average is taken over $10^6$ trajectories. \begin{figure}[t] \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Weak_cv_curve_linear} \end{minipage} \hfill \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Weak_cv_curve_nonlinear} \end{minipage} \caption{Weak error versus the stepsize $H=N\varepsilon$ for approximating the solution of equation \eqref{equation:NLS} at time $\varepsilon T_{2^8}$ for the linear $F(y)=iy$ (left) and the non-linear $F(y)=i(1+\Real(y)^3+\Imag(y)^5)y$ (right) with $A=2i\pi$, $X_0=1$, $\varepsilon=10^{-3}$ and the test function $\phi(y)=2\Real(y)+4\Imag(y)$.} \label{figure:weak_convergence_curves} \end{figure} In both cases, we observe the weak order two of Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2}. The irregularities of the curve for a small $H$ come from Monte-Carlo errors. We repeated the same experiment on many other examples and we always observe the desired order two as long as $H$ is small enough. \subsection{Numerical experiments on NLS equation with white noise dispersion} We now apply the algorithms to solve on the torus $\T=[-\pi,\pi]$ the following SPDE of the form \eqref{equation:NLS_WND_general}, with a polynomial linearity and the stiffness parameter $\varepsilon=10^{-2}$, \begin{equation} \label{equation:polynomial_NLS_white_noise_dispersion} du=\frac{2\pi}{\sqrt{\varepsilon}}\begin{pmatrix} 0&-1\\1&0 \end{pmatrix} \Delta u\circ dW+\begin{pmatrix} 0&-1\\1&0 \end{pmatrix}\abs{u}^{2\sigma}u dt,\ x\in \T,\ t>0, \end{equation} where the unknown $u$ is a random process depending on $x\in \T$ and $t\geq 0$. We consider a spectral discretization in space of this equation with $K_x=2^7$ modes $u(x,t)\approx \sum_{\abs{l}\leq K_x} Y_l(t) e^{i l x}$. We obtain an equation of the desired form \eqref{equation:NLS} with a truncated nonlinearity and the block-diagonal matrix $$A=\Diag(-2\pi l^2 \begin{pmatrix} 0&-1\\1&0 \end{pmatrix}, \abs{l}\leq K_x).$$ Beginning with the initial condition $u_0(x)=\exp(-3x^4+x^2)$ on $\T$ that decreases fast enough, we apply Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2} in the two cases $\sigma=2$ and $\sigma=4$ with $K_t =2^6$ modes, $N=10$ revolutions, $m=150$ iterations and a tolerance of $10^{-13}$ for the fixed point iteration. Figure \ref{figure:Plot_NLS_WND} shows the evolution in time of one trajectory given by Method \ref{algorithm:geometric_weak_order_2} (with a 300 points evaluation grid in space). \begin{figure}[t] \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Plot_NLS_WND_sigma_2} \end{minipage} \hfill \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Plot_NLS_WND_D_sigma_2} \end{minipage} \vskip\baselineskip \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Plot_NLS_WND} \end{minipage} \hfill \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Plot_NLS_WND_D} \end{minipage} \caption{Approximation by Method \ref{algorithm:geometric_weak_order_2} of $\abs{u}$ and $\abs{\partial_x u}$ with $u$ solution of a spatial discretization with $K_x=2^7$ modes of the nonlinear Schrödinger equation with white noise dispersion \eqref{equation:polynomial_NLS_white_noise_dispersion} on the torus $\T=[-\pi,\pi]$ with the parameters $\varepsilon=10^{-2}$, $\sigma=2$ (top) and $\sigma=4$ (bottom).} \label{figure:Plot_NLS_WND} \end{figure} In Figure \ref{figure:Norms_NLS_WND}, we observe the discrete $L^2$ and $H^1$ norms behaviour of one trajectory given by our two algorithms and the Euler method \eqref{algorithm:weak_order_1} (the simulated $(\alpha_k)_k$ are the same for Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2}). The Euler method quickly blows up in both norms. The $L^2$ norm of Method \ref{algorithm:weak_order_2} is not conserved. In contrast, Method \ref{algorithm:geometric_weak_order_2} preserves the $L^2$ norm according to Theorem \ref{theorem:convergence_algorithm_order_2_geometric}. When $\sigma=4$, numerical simulations hint that a blow-up in the $H^1$ norm always happens for all considered methods at a certain time that increases as $\varepsilon$ goes to zero. We recall that in the optic fiber model \eqref{equation:NLS_WND_general}, $t$ represents the distance along the optic fiber and a cubic nonlinearity ($\sigma=2$) is typically considered \cite{Garnier02sod}. For $\sigma=2$, we do not observe any blow-up in the $H^1$ norm in Figure \ref{figure:Norms_NLS_WND}, suggesting the well-posedness of the model for all optic fiber distance. Also, the larger $\sigma$ is, the sooner the blow-up happens. These behaviors agree with the blow-up conjecture for $\varepsilon=1$ and $\sigma\geq 4$ presented in \cite{Belaouar15nao}, and suggest that the conjecture persists in the highly-oscillatory regime $\varepsilon \ll 1$. \begin{figure}[t] \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Norm_L2_NLS_WND_sigma_2} \end{minipage} \hfill \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Norm_H1_NLS_WND_sigma_2} \end{minipage} \vskip\baselineskip \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Norm_L2_NLS_WND} \end{minipage} \hfill \begin{minipage}[c]{.49\linewidth} \includegraphics[scale=0.5]{Images/Norm_H1_NLS_WND} \end{minipage} \caption{Evolution in long time of the quantities $\norme{U_t}_{L^2}-\norme{u_0}_{L^2}$ (left) and $\norme{U_t}_{H^1}-\norme{u_0}_{H^1}$ (right) with $U_t$ the approximation computed with Euler method and Methods \ref{algorithm:weak_order_2} and \ref{algorithm:geometric_weak_order_2} for one trajectory of equation \eqref{equation:polynomial_NLS_white_noise_dispersion} with $\varepsilon=10^{-2}$, $\sigma=2$ (top) and $\sigma=4$ (bottom).} \label{figure:Norms_NLS_WND} \end{figure} \bigskip \section*{Acknowledgments} The authors would like to thank Georg Gottwald for helpful and stimulating discussions. This work was partially supported by the Swiss National Science Foundation, grants No. 200020\_184614, No. 200021\_162404 and No. 200020\_178752. The computations were performed at the University of Geneva on the Baobab cluster using the Julia programming language. \bibliographystyle{abbrv}
\section{Introduction}\label{sec:intro} Active swarms are composed of individual self-propelled agents that are capable of converting energy into motion. Natural examples include bacterial swarms \cite{Lushi2014}, bird flocks \cite{Ballerini2008}, fish shoals \cite{Hager1991}, and mammalian herds \cite{King2012}. Anthropogenic examples include the behavior of crowds \cite{Silverberg2013,Karamouzas2014} and the flow of traffic \cite{Helbing2001}. In such systems the collective motion of a large number of simple individuals can result in complex nonequilibrium behavior. While such phenomena are responsible for some of the most beautiful displays in the natural world, such as the murmuration of starlings or the collective motion of fish shoals; it can also be the source of deep inconvenience, such as, for example, the frustration of being stuck in stop-go traffic. Recently, there has been considerable interest in the swarming of simple rodlike bacteria (for example, \emph{Bacillus subtilis}) confined to the surface of a two-dimensional interface \cite{Wioland2016, Wioland2013, Kaiser2014b, Cisneros2010}. Such swarms, captured within a free-standing film or between a solid-solid or solid-liquid interface, have the advantage that they can be imaged easily by real-space microscopy and provide an ideal environment for the study of active matter. In this paper we conduct numerical simulations of self-propelled rods on a (quasi-)two-dimensional [(quasi-)2D]surface. Such simulations provide an analogy for dense swarms of motile rodlike bacterial swarms on a flat interface. To prevent rods from overlapping we impose a simple steric interaction between rods: Each rod is divided into segments and segments from neighboring rods repel each other using a Hookean potential. The model we are using was first introduced by Peruani \textit{et al.} \cite{Peruani2006} to consider the effects of cell shape. It ignores hydrodynamic interactions due to the assumption that the cells are densely packed and move in a very viscous media. Myxobacteria gliding on a surface is an example of such a system \cite{Peruani2012}, where the lengths of the rodlike bacteria are distributed heterogeneously. Similar approaches may use a repulsive Yukawa force that has been restricted to only act on overlapping rod segments \cite{Wensink2008}. The use of a Hookean potential has two advantages --- first, the overlap energy between neighboring rods scales in a simple manner, and second, by varying the magnitude of the spring constant the interaction between rods can be tuned continuously from soft to hard. Self motility is imposed by introducing a constant propulsion force along the axis of the rod. Collisions between rods are resolved into a force acting on the center of mass and a torque that acts to change the orientation of the rod. The position and orientation of the rods, along with the center of mass forces and torques, are used to perform an overdamped molecular dynamics simulation. Despite the simplicity of the model it is capable of reproducing a wide range of behaviors commonly seen in dense bacterial swarms. Simulations of this type have provided insights into phenomena such as turbulence in active systems, corporative swarming, and alignment on long length scales \cite{Wensink2012a}. In addition, features, such as \textit{hedgehog}like formations (whereby rods near a wall jam together forming a fan-shaped cluster) and giant density fluctuations were also successfully reproduced \textit{in silico} \cite{Fily2014a,Wensink2008} and have been observed in real bacterial communities \cite{Mazza2016, Peruani2012} (and other active systems, e.g., Ref. \cite{Kudrolli2008}. The method has also been used to simulate directed bacterial transport of mesoscopic carriers \cite{Kaiser2014b}. We study a swarm of self-propelled rods in a (quasi-)2D channel between two narrowly separated parallel walls. A similar confining geometry has been studied experimentally (and by means of simulations) by Wioland \textit{et al.} \cite{Wioland2016}. We note that a key difference between the work of Wioland \textit{et al.} and the present study is the effect of hydrodynamic forces, which we do not consider. Nevertheless, it was found by Wioland \textit{et al.} that the nature of the flow could vary from turbulent to laminar depending on the width of the channel. We show that the presence of the channel boundaries leads to a layering effect whereby rods are densely packed along the channel boundaries, with subsequent internal layers forming behind the surface layer. Previous studies (e.g., Refs. \cite{Wioland2016, Weitz2015, Wensink2008}) have focused on the highly idealised case of a homogeneous active population. These, however, are in contrast with the heterogeneity of natural environments, where multispecies swarms have been likened to moving ecosystems \cite{Ben-Jacob2016}. Even within a single species swarm, the cell aspect ratio may change, and this can be important for the ability of bacteria to swarm efficiently \cite{Ilkanaiv2017}. To date, typical studies of active matter have involved fully homogeneous populations or at most binary mixtures (e.g., with different chiralities \cite{Chen2015, Mijalkov2013, Ai2015}, motilities \cite{Costanzo2014a, Mones2015}, or shapes \cite{Yang2014a, Allahyarov2018}). A notable exception is the study by active polydisperse disks which are found to form glassy states \cite{Fily2014a}. Here we directly consider the effect of heterogeneity in a population of active rods. We focus on the case where both the driving force for individual rods, and the nature of the steric interaction between any pair of rods, are chosen from a random distribution. The main finding is that the channel walls drive the segregation of a heterogeneous population, so that hard rods and strongly driven rods are found in greater concentrations at the channel boundaries. This finding may have consequences for developing passive systems that can sort or segregate bacterial populations by geometry alone. This paper is organised as follows. In Sec. \ref{sec:theory} we describe our model and numerical scheme. Section \ref{sec:hom_systems} contains an analysis of the behavior of homogeneous systems with various packing fractions and steric interactions. Following this, Secs. \ref{sec:hetero} and \ref{sec:full_hetero} are dedicated to heterogeneous active matter, where we define a heterogeneous system and investigate its properties by varying the self-propellant forces and steric interactions of the population. \section{Theory}\label{sec:theory} \subsection{Model} We consider a (quasi-) 2D system in which $N$ active rods are confined within a rectangular channel of length $L$, width $W,$ and area $A=LW$, where $L>W$. We define the origin of our coordinate system to lie in the middle of the strip and impose periodic boundary conditions on either side of the strip. In addition, distance is measured in units of diameter $d$, speed in units of $\mathcal{F}$, time in units of $d/\mathcal{F}$. For computational ease, the rods are represented as a series of $2M+1$ segments --- i.e., disks of diameter $d$ --- stacked along the long axis of the rod. The distance between neighboring segments is $l_o=d/2$ and in all our simulations we fix $M=1$. Thus all our rods are composed of three segments --- although clearly more segments can be included by increasing the value of $M$; see, for example, Refs. \cite{Wensink2012a, Weitz2015}. A given rod is specified by its center of mass point ${\bf C}_{\alpha}=(x_{\alpha}(t), y_{\alpha}(t))$ and by its orientation, given by the unit vector ${\bf{\hat{u}}}_\alpha=(\cos\theta_{\alpha}, \sin\theta_{\alpha})$ [see Fig. \ref{fig:segment}(a)]. In addition, we also define the unit vector ${\bf{\hat{v}}}_\alpha=(-\sin\theta_{\alpha}, \cos\theta_{\alpha})$ perpendicular to ${\bf{\hat{u}}_\alpha}$. Hence, the coordinates of the $i\text{th}$ segment from the $\alpha\text{th}$ rod is given by, \[ {\bf r}_{\alpha, i}={\bf C}_{\alpha}+i l_o{\bf{\hat{u}}_\alpha}, \] where $i$ is an integer ranging from $[-M, M]$ (so that if $M=1$ we have $i=-1,0,1$). Steric interactions between rods are implemented by pairwise interactions between {\it overlapping} segments from different rods; see Fig. \ref{fig:segment}(b). We define a repulsive interaction between segment $i$ from rod $\alpha$ with segment $j$ from rod $\beta$ as being given by, \begin{equation} U_{\alpha \beta}^{ij} = \left\{ \begin{array}{l l} \frac{1}{2}\kappa (d-\Delta r_{\alpha\beta, ij})^2 & \quad \mbox{if $\Delta r_{\alpha\beta,ij}\leq d$}\\ 0 & \quad \mbox{if $\Delta r_{\alpha\beta, ij} >d$},\\ \end{array} \right. \label{eq:spotential} \end{equation} where $\Delta r_{\alpha\beta, ij}=\left| {\bf r}_{\alpha, i}-{\bf r}_{\beta, j} \right|$ is the distance between the centers of the segments, $\kappa$ is the strength of the interaction and $d$ is the segment diameter. Note the interaction energy falls to zero when there is no overlap between the segments thus giving a short-range force. \begin{figure}[h] \begin{center} \centering \includegraphics[width=1.0\columnwidth]{fig_1_interaction} \caption{ (a) The diagram shows two rods $\alpha$ and $\beta$. Each rod is defined by a center of mass (crosses showing ${\bf C_{\alpha}}$ and ${\bf C_{\beta}}$, respectively) and a unit vector (${\bf{\hat{u}}_\alpha}$ and ${\bf{\hat{u}}_\beta}$, respectively) pointing along the forward direction of the rods. Each rod is composed of a series of $2M+1$ segments (of diameter $d$) stacked along the unit vector. The distance between successive segments is fixed to be $l_0=d/2$. A self-propellent force $\mathcal{F}_{\alpha}; \mathcal{F}_{\beta}$ is directed along the corresponding unit vector $\bf{\hat{u}}_\alpha; \bf{\hat{u}}_\beta$ and drives the rod forward. (b) If there is an overlap between segments from two different rods (as shown by the shaded (green) region) then there exists a repulsive force between segments where $\Delta r_{\alpha\beta, ij} < d$ between segments $i$ and $j$, as given by Eq. \ref{eq:spotential}. } \label{fig:segment} \end{center} \end{figure} The rods are prevented from escaping through the walls of the channel (located at $y=\pm W/2$) by a repulsive force as shown in Fig. \ref{boundarypotential}. This is modelled as a steric interaction between each segment in a given rod and the bounding walls of the channel. The bounding potential experienced by the $i\text{th}$ segment in the $\alpha\text{th}$ rod is, \begin{equation} U_{\alpha, i}^B (a,b)= \tanh(-a y_{\alpha, i} - b) + \tanh(a y_{\alpha, i} - b) +2 \label{eq:boundary} \end{equation} where the width of a channel is defined as $W = 2 b / a$ and both constants $a$ and $b$ define the slope as well. \begin{figure}[h] \begin{center} \centering \includegraphics[width=1.0\columnwidth]{fig_2_channel} \caption{ A plot of the the confining potential $U_{\alpha, i}^B(a,b)$ for selected values of $a$ and $b$. We plot only the cross-sections since scaling the length $L$ does not bring new effects. In our simulations we set $a=20.0$ and $b=120.0$. } \label{boundarypotential} \end{center} \end{figure} Thus, the total force acting on the rod is the sum of the steric forces and the self-propellant forces, and is given by, \begin{equation} {\bf F}_{\alpha} = - \sum_{i=-M}^{i=M} \nabla U_{\alpha, i} + \mathcal{F}_{\alpha}{\bf{\hat{u}}_\alpha}. \label{eq:tforce} \end{equation} Where the first term in Eq. (\ref{eq:tforce}) accounts for the potential acting on the $i\text{th}$ segment of the $\alpha\text{th}$ rod due to all the steric interactions, i.e., \begin{equation} U_{\alpha, i} = U_{\alpha, i}^B (a,b) + \sum_{\alpha \neq \beta}^{N} \sum_{j=-M}^{j=M} U_{\alpha \beta}^{ij}, \end{equation} The second term in Eq. (\ref{eq:tforce}) is the self-propellant force of magnitude $F_{\alpha}$ acting along the direction of the rod, which drives it forward. The total force ${\bf F}_{\alpha}$ can be decomposed into a component acting on the center of mass of the rod along the main axis and its orthogonal counterpart: \begin{equation} {\bf F}_{\alpha}^{\text{c.o.m.}}=({\bf F}_{\alpha}\cdot {\bf{\hat{u}}_\alpha}) {\bf{\hat{u}}_\alpha}+({\bf F}_{\alpha}\cdot {\bf{\hat{v}}_\alpha}) {\bf{\hat{v}}_\alpha}. \end{equation} In addition, due to asymmetric shape of active rods, forces acting on segments induce a torque: \begin{equation} \pmb{\tau}_{\alpha}= \sum_{i=-M}^{i=M} \left( {\bf r}_{\alpha, i}-{\bf C}_{\alpha} \right) \times {\bf F}_{\alpha, i}. \end{equation} \subsection{Numerical Scheme} We model the dynamics of the rods using overdamped Langevin equations for translational and rotational motion. Our systems have zero noise --- thus, the dynamics is purely deterministic. Moreover, since we are interested in collision-induced dynamics only, we omit all hydrodynamic interactions so that active matter is ``dry''. Given that, we have: \begin{eqnarray} &\eta_{\alpha}^{tr}\dfrac{d{\bf C}_{\alpha}}{dt} &= {\bf F}_{\alpha}^{\text{c.o.m.}},\\ &\eta_{\alpha}^{rot}\dfrac{d\bf{\hat{u}}_{\alpha}}{dt}&=\pmb{\tau}_{\alpha}\times\bf{\hat{u}}_{\alpha}, \label{eq:langevin} \end{eqnarray} where $\eta_{\alpha}^{tr}$ and $\eta_{\alpha}^{rot}$ are the translational and rotational damping constants (tensors) --- see Ref. \cite{Wensink2012a} for details. We obtain the rod dynamics by using a first-order Euler integration scheme. The initial conditions for all simulations is that the rods are placed and orientated randomly and uniformly (i.e., equally distributed) in the channel. We run each system for a period of $t_0=10^5$ iterations ($200$ time units, i.e. the transient phase of the simulation) so that initial effects have died away before continuing the simulation for a longer time period of $5\times 10^6$ over which we collect data and make measurements. By approximating each rod as a 2D spherocylinder, the packing fraction (i.e., the ratio of the total area of all rods relative to the channel area) is given as \cite{Wensink2012a}, \begin{equation} \label{eq:fraction} \phi = \frac{N}{A} \left( 2 d M l_0 + \frac{\pi d^2}{4} \right), \end{equation} when there is no overlap between segments from adjacent rods assumed. In the following simulations we use a channel of length $L = 120 d$ and width $W = 12 d$. The resulting area $A$ of a domain is thus given by $L*(W+d)$, where $d$ is a constant term introduced due to the pointlike nature of active rods. This choice provides us a channel which is sufficiently long for the rods to self-organize into a collective flow and sufficiently narrow as to prevent large scale vorticity from developing. In all simulations we consider dense ($\phi=1.1$ to have reliable statistics in every region of the channel) populations of active rods in periodic channels. \section{Homogeneous population of rods in a periodic rectangular channel} \label{sec:hom_systems} We consider a homogeneous population of rods. Every rod $\alpha$ has same driving force $\mathcal{F}_{\alpha}=\mathcal{F}$ (where we set $\mathcal{F}=1$), each rod segment has the same diameter $d=1$ and hardness $\kappa_{\alpha}=\kappa$. Hence, the properties of the system depend \textit{almost} solely on the ratio, \begin{equation} \gamma=\dfrac{ d\langle\kappa_{\alpha}\rangle}{\langle\mathcal{F}_{\alpha}\rangle}, \label{eq:gamma} \end{equation} (the exception to this is the confining potential used to simulate the wall boundaries, which does not depend on $\kappa$). Here we investigate the effect of $\gamma$ on the distribution of rods in the channel. \begin{figure}[h] \begin{center} \centering \includegraphics[width=1.0\columnwidth]{fig_3_hom_density} \caption{ Rod density averaged over 100 realizations for rods in a channel. The inset contains a magnification of the region $\lambda \in [0:2]$. } \label{fig:homogeneous_density} \end{center} \end{figure} For each realization, after the initial transient period we identify the center-of-mass ${\bf C}_{\alpha}$ for each rod and compute the rod density distribution (using the standard procedure \cite{allen2017computer, Heras2017}), given by: \begin{equation} \rho(\bf{r}) = \langle \sum_{\alpha=1}^{N} \delta(\bf{r} - \bf{C}_{\alpha})\rangle_t, \label{eq:density} \end{equation} To obtain an average density distribution we also average over a series of snapshots from a given run and over an ensemble of 100 realizations (where each realization is obtained by starting the system from a random initial configuration). This gives us an averaged distribution as plotted in Fig \ref{fig:homogeneous_density}, in terms of distance from the wall $\lambda= \frac{W}{2}-|y|$. The function is computed by dividing the channel into strips parallel to the channel axis and counting the number of rod centers within the strip. In addition, we normalize by $1/N$ to have comparable results in systems with different populations. We find that for soft steric interactions, i.e., $\gamma=1$, most of the rods are concentrated at the boundaries of the channel, with a few rods in the interior (see yellow line in Fig. \ref{fig:homogeneous_density}, and the top image in Fig \ref{fig:snapshots}). This is apparent as a large peak in the rod density close to the boundary wall followed by a second layer. After these surface layers the density is observed to drop rapidly. In the limiting case of ultrasoft interactions (such as $\gamma=0.01$, as shown by the red line in Fig. \ref{fig:homogeneous_density}), due to the extremely low repulsive forces almost all the rods are concentrated near the walls, tending to form a single boundary layer. When steric interactions dominate (i.e., $\gamma = 10.0$) the rods are distributed more uniformly throughout the channel (see Fig. \ref{fig:homogeneous_density}, orange line, and bottom image in Fig \ref{fig:snapshots}). In contrast to the soft systems, we observe a series of oscillations in the density going from the wall toward the interior indicating a layer like ordering. The differences between the soft ($\kappa=1.0$) and hard ($\kappa=10.0$) regimes can be readily observed in a typical snapshot of the system. As shown in Fig \ref{fig:snapshots}, in soft systems the rods pile up at the boundaries forming short lived structures called \textit{hedgehogs} \cite{Marx2011,Wensink2008, Wioland2016}, while in the hard regime the rods are spread more evenly throughout the system and \textit{hedgehogs} are not observed. \begin{figure}[h] \begin{minipage}[h]{0.785\columnwidth} \includegraphics[width=1.0\columnwidth]{fig_4_soft_large} \end{minipage} \hfill \begin{minipage}[h]{0.195\columnwidth} \includegraphics[width=1.0\columnwidth]{fig_4_soft_small} \end{minipage} \vfill \begin{minipage}[h]{0.785\columnwidth} \includegraphics[width=1.0\columnwidth]{fig_4_hard_large} \end{minipage} \hfill \begin{minipage}[h]{0.195\columnwidth} \includegraphics[width=1.0\columnwidth]{fig_4_hard_small} \end{minipage} \caption{ Top: $\gamma=1.0$ (soft regime) and bottom $\gamma=10.0$ (hard regime). \textit{Hedgehog} structures are highlighted with (red) ellipses. Right column contains magnified boundary regions with plotted segments. In the case of strong repulsive forces strong layering is observed. (See Movies 1 and 2 in the Supplemental Material for representative animations of these two systems \cite{het_suppl}.) } \label{fig:snapshots} \end{figure} \section{Heterogeneous populations in a periodic rectangular channel}\label{sec:hetero} Our approach for heterogenous systems is similar to that taken for the homogeneous cases described above in terms of simulation protocol, analysis, and numerical method. While in the case of homogeneous populations each rod in the system has the same hardness $\kappa$ and the same driving force $\mathcal{F}$, -- in the heterogeneous cases considered below we randomly assign one (or both) of these parameters for the population. The cases we consider are: (i) keeping the hardness $\kappa$ the same for every rod while choosing a random value $\mathcal{F}$ for the self-propellant force (picked from a uniform distribution for each rod); (ii) keeping the self-propellant force the same for each rod while assigning a random value $\kappa$ for the hardness. Following this, in Sec. \ref{sec:full_hetero} we explore the problem of assigning a random value for $\kappa$ \emph{and} $\mathcal{F}$ to each rod in the population. We call these latter mixtures \emph{doubly heterogeneous} populations. Our main finding is that in heterogeneous populations the presence of the channel boundaries leads to the demixing or segregation of rods. As in the homogeneous case where a strong layering effect is observed at the boundaries, so too in the heterogeneous populations we observe similar effects. However, here the rods are stratified into a sequence of layers, where the properties of the rods within a layer are roughly the same. While the problem of mixed populations has been studied by some authors, they have mostly examined the case of binary mixtures. Here, two species with different motilities have been found to demix in semiperiodic channels \cite{Costanzo2014a}: The fast moving rods are found in greater concentrations near the confining walls, while the slow rods are expelled to the interior. We show that this trend holds true even for populations where the motilities and hardness of the constituent rods are chosen from a continuous range of values. \subsection{Heterogeneous populations with randomly assigned self-propellant forces}\label{sec:spf} The first case is where the magnitude of the self-propellant force, for each rod, is assigned a random value picked from a uniform distribution $\mathcal{F}_{\alpha}\in [1,2)\quad\forall\alpha$. The hardness of all the rods in the population is assigned a single value $\kappa$, with sets of experiments generated with different values of $\kappa$. Figure \ref{fig:het_spf_example} shows a representative snapshot of a system (with $\kappa=10.0$ and randomly assigned self-propellant forces) after the transient phase of the simulation. Fast and slow moving rods are colored yellow and purple, respectively, a color bar shows the range of $\mathcal{F}_{\alpha} $ values between these two extremes. We refer to Secs. \ref{sec:theory} and \ref{sec:hom_systems} for general details of the simulation procedure. Here we note that every time we simulated the system each rod started with its own random initial configuration (position and orientation) \emph{and} a randomly assigned value for the self propellant force. In the first case we set $\kappa=1.0$ (i.e., soft interactions) and ran 100 simulations. This provided an ensemble on which we base our averaged results (as described below). Following this we ran the same experiment with $\kappa=10.0$ (i.e., hard interactions). The question we are interested in answering is the following: Do rods segregate so that the strongly driven rods are found in greater concentrations toward the boundaries? To answer this we split the channel into a series of narrow strips (along the length of the channel) and for some quantity of interest $\mathcal{A}$ (e.g., the self-propellant force of the rods $\mathcal{F}$, their orientation $\theta$, density $\rho$, and speed $|\vec{V}|$) we compute the average value of that quantity in the strip: \begin{equation} \langle\mathcal{A}\rangle(\bf{r})=\frac{\langle \sum_{\alpha=1}^{N}\mathcal{A}_{\alpha} \delta(\bf{r}-\bf{C}_{\alpha}) \rangle_t}{\langle \sum_{\alpha=1}^{N}\delta(\bf{r}-\bf{C}_{\alpha}) \rangle_t}. \label{eq:spf_distribution} \end{equation} An analysis of the systems with $\kappa=1.0$ and $\kappa=10.0$ is summarised in Fig. \ref{fig:spf_plots_combined}. \begin{figure}[!h] \centering \includegraphics[width=1.0\columnwidth]{fig_5_spf_snapshot} \caption{ A snapshot of a system with heterogeneous self-propellent forces. All active rods are represented by arrows colored according to the values of their assigned self-propellant forces; the color bar shows the range of $\mathcal{F}$ magnitudes, whilst $\kappa=10.0$ in this case. (See Movie 3 in the Supplemental Material for a representative animation of this system \cite{het_suppl}.) } \label{fig:het_spf_example} \end{figure} \begin{figure}[!h] \begin{center} \centering \includegraphics[width=1.0\columnwidth]{fig_6_spf_distr} \caption{ From top to bottom: average order parameter $\sin^2 \theta$, average speed $|\vec{V}|$, average self-propellant force $\mathcal{F}$, average density $\rho$; $\sin^2\theta=0$ means parallel to walls, whereas $\sin^2\theta=1$ means perpendicular. Red and yellow curves denote systems with $\kappa=10.0$ ($\gamma\approx 6.67$) and $\kappa=1.0$ ($\gamma\approx 0.67$), respectively. The self propellant force for each rod is picked from a uniform distribution as described in the text. The system consists of a dense layer of rods at the channel walls followed by subsequent layers in the interior (the second one is highlighted by a vertical dashed line). } \label{fig:spf_plots_combined} \end{center} \end{figure} We interpret Fig. \ref{fig:spf_plots_combined} as follows. The plot of the density distribution $\rho$ shows a large concentration of rods at the boundaries where $\lambda\approx 0$ regardless of the value of $\kappa$. These surface rods are orientated \textit{parallel} to the walls (as inferred from the the orientation parameter $\langle\sin^2 \theta \rangle$) and are on average more strongly driven than the rods in the interior (as shown by plotting $\langle \mathcal{F} \rangle$) --- similar to previous studies of mixed populations \cite{Fily2014a}. Thus, a universal feature of these systems is that strongly driven rods are found at the channel boundaries as the result of an \emph{expelling} process \cite{Fily2014a} whereby weakly driven rods are pushed out of the surface layer. However, the distribution of rods is also sensitive to the choice of $\kappa$, so that the layerlike ordering is less pronounced in softer systems. We also observe a slight decrease in the average motility of the rods, i.e., $\langle \mathcal{F} \rangle$, at the boundaries as we increase the steric forces between rods. Adjacent to the surface layer we observe a second spike in the density at $\approx0.5\lambda$ (blue dashed line in Fig. \ref{fig:spf_plots_combined}), which is particularly sharp when steric interactions are strong. This is generated by rods which are also in contact with the wall but are orientated \emph{perpendicular} to it (as inferred from the plot of the orientation parameter). This second layer consists of rods which are weakly driven (compared to first layer) and are trapped against the channel wall. Since they are perpendicular to the wall they do not contribute to actively pushing the surface layer of of rods. These rods are unable to reorientate themselves due to strong \emph{caging} \cite{Yang2014a} and are dragged along by the faster rods in the surface layer. Subsequent layers, particularly for hard systems, show some of the features of the two outer layers, but it becomes increasing difficult to distinguish distinct layers as we go into the interior of the system. \subsection{Heterogeneous populations with randomly assigned repulsive coefficients}\label{sec:kappa} \begin{figure}[h] \begin{center} \centering \begin{minipage}[h]{1\linewidth} \includegraphics[width=1.0\columnwidth]{fig_7_kappa_snapshot} \end{minipage} \caption{ A snapshot of a system with heterogeneous softness. All active rods are represented by arrows colored according to the values of their assigned hardness; the color bar shows the range of $\kappa$ magnitudes, while $\mathcal{F}=1.0$ in this case. (See Movie 4 in the Supplemental Material for a representative animation of this system \cite{het_suppl}.) } \label{fig:kappa_snap} \end{center} \end{figure} We now consider the inverse situation whereby every rod has its own randomly assigned value of $\kappa$ (taken from the uniform distribution, $\kappa\in[1.0,10.0)$, but the magnitude of the self propellant force $\mathcal{F}$ for each rod in the population is the same, with sets of experiments generated with different values of $\mathcal{F}$. \begin{figure} \begin{center} \centering \includegraphics[width=1.0\columnwidth]{fig_8_kappa_distr} \caption{ From top to bottom: average order parameter $\sin^2 \theta$, average speed $|\vec{V}|$, average hardness $\kappa$, average density $\rho$. Red curves denote systems with $\mathcal{F}=2.0$ ($\gamma=2.75$), yellow curves with $\mathcal{F}=1.0$ ($\gamma=5.5$). The hardness of the rods is picked from a uniform distribution as described in the text. The first of internal layers is indicated by the vertical dashed line.} \label{fig:kappa_plots_combined} \end{center} \end{figure} To compute the interaction between rods with different hardnesses we introduce a Lorentz-Berthelot \cite{Lorentz1881} combining rule for an effective potential. For any two rods $\alpha$ and $\beta$ the average $\kappa$ for the interaction between them, is given by, \begin{equation} \kappa_{\alpha\beta}=\sqrt{\kappa_{\alpha} \kappa_{\beta}}. \end{equation} Figure \ref{fig:kappa_snap} shows a representative snapshot for a system with $\kappa \in[1.0,10.0)$ and $\mathcal{F}=1.0$. Soft and hard rods are colored blue and yellow, respectively, while a color bar indicates rods with hardnesses intermediate between these two extremes. As before we plot the averaged quantities of the system in Fig. \ref{fig:kappa_plots_combined} and find that the system is composed of a series of layers. The outer layer with $\lambda\approx 0.0$ is composed on average of the hardest rods. Surprisingly, the average velocity of the rods in this layer is relatively high compared to the rest of the system. Next to the outermost layer is an internal layer of slower moving softer rods which are perpendicular to the walls. Immediately behind these surface layers is a region containing very soft rods which are locally trapped into dense clusters. \section{Doubly heterogeneous systems in a rectangular channel}\label{sec:full_hetero} The final case is where both the hardness and the self-propellant force for each rod is assigned from a random distribution. We use the same distributions as in the previous cases, that is $\kappa \in[1.0,10.0)$ and $\mathcal{F} \in [1,2)$, resulting in $\gamma\approx 3.67$. A representative snapshot of the system is shown in Fig. \ref{fig:full_snapshots}, where the top figure shows the rods colored according to their assigned self propellant force and the bottom figure shows the same rods colored according to hardness. \begin{figure}[!h] \begin{minipage}[h]{1\linewidth} \includegraphics[width=1.0\columnwidth]{fig_9_top_mixed} \end{minipage} \hfill \begin{minipage}[h]{1\linewidth} \includegraphics[width=1.0\columnwidth]{fig_9_bottom_mixed} \end{minipage} \caption{ Snapshots of a doubly heterogeneous system. Top: rods are colored according to their values of $\mathcal{F}$; bottom: rods are colored according to their values of $\kappa$. (See Movies 5 and 6 in the Supplemental Material for representative animations of this system \cite{het_suppl}.) } \label{fig:full_snapshots} \end{figure} \begin{figure}[!h] \begin{center} \centering \includegraphics[width=1.0\columnwidth]{fig_10_fully_mixed_distr} \caption{ Distributions in doubly mixed systems, from top to bottom: $\Gamma$ defined by Eq. (\ref{eq:Gamma}), average hardness $\kappa$, average order parameter $\sin^2 \theta$, average speed $|\vec{V}|$, average self-propellant force $\mathcal{F}$, and average density $\rho$. Values of $\kappa$ and $\mathcal{F}$ of the rods are picked from uniform distributions as described in the text. Red curves denote systems where rods are composed of three segments, yellow and orange stand for systems with five and seven segments, respectively. The first of the internal layers is indicated by the vertical dashed line of corresponding color. Subsequent layers are also highlighted by dashed lines. The disks at the top of the figure represent rods of different lengths aligned perpendicularly to the wall, corresponding to the peaks in the graphs. } \label{fig:mixed_distributions} \end{center} \end{figure} The behavior of the system can again be understood with reference to the various quantities plotted in Fig. \ref{fig:mixed_distributions}. This doubly mixed system shows features from both the previous cases. The system is again composed of dense layers at the boundaries, but this time we find that the outermost layer consists of rods which are on average highly motile in terms of $\mathcal{F}$ \emph{and} the hardest. In the particular case studied here, we observe evidence of subsequent layers but these decay quickly to give way to a disordered interior. To ensure that these results are not specific to a single aspect ratio (that is length of rod versus its width) we show the outcome for simulations for a range of rod lengths (specifically rods composed of three, five, and seven segments in length). In all cases we find there is an outer layer, composed of rods parallel to the walls, followed by a second layer at a distance half the length of the rod (i.e., composed of rods at the wall boundaries which are perpendicular to the walls). To show that active rods at the boundaries are \textit{both} motile and hard, we introduce a metric: \begin{equation} \Gamma(\bf{r}) = \frac{\langle \sum_{\alpha=1}^{N}(\mathcal{F}_{\alpha}-\bar{\mathcal{F}})(\kappa_{\alpha}-\bar{\kappa}) \delta(\bf{r}-\bf{r}_{\alpha})\rangle_t} {\bar{\mathcal{F}}\bar{\kappa} \langle \sum_{\alpha=1}^{N}\delta(\bf{r}-\bf{r}_{\alpha})\rangle_t}, \label{eq:Gamma} \end{equation} where $\bar{\mathcal{F}}$ and $\bar{\kappa}$ are the average motility and hardness of the rods, respectively. Thus, positive $\Gamma$ corresponds to rods that are either hard with high self-propellant forces or soft with low self-propellant forces. Figure \ref{fig:mixed_distributions} shows that $\Gamma$ has a strong peak right next to the wall. Furthermore, because both $\langle \kappa\rangle$ and $\langle \mathcal{F} \rangle$ are high in this region we deduce that the layer of surface rods is (on average) formed by hard rods with high self-propellant forces. \section{Conclusions} \label{sec:conclusions} We have studied the properties of a swarm of actively driven rods in a rectangular channel. We have compared the case of a homogeneous swarm to that of a heterogeneous swarm (whereby one or more of the dynamical features are randomly assigned). In the case of the heterogeneous systems our key finding is that the channel wall drives the segregation of the population. Thus rods which are hard and fast moving are more likely to be found at the edge of the system, while soft and less motile rods are pushed in to the interior. We have deliberately confined these simulations to narrow channels and it remains to be seen if these results apply to wider systems in which vortex type behavior is commonly seen. While these features have been hinted at by previous simulations of binary mixtures of rods, here we demonstrate that segregation is present even in systems where the dynamical properties are given by a continuous range --- as is the case for many bacterial communities. An important test case for these findings maybe the work of Ilkanaiv \textit{et al.} \cite{Ilkanaiv2017}, where swarming \textit{Bacillus subtilis} move on surfaces. In this experimental study the rodlike bacteria have their lengths and motilities distributed heterogeneously. For such populations we expect to see segregation if the bacteria are in the presence of a wall or confined within a channel. While the system studied here is idealised model of some active systems (e.g., bacterial populations), nevertheless we hope that these findings might hint at a passive means of sorting active populations according to their dynamical properties. Indeed, these findings already suggest that boundaries can be used to enhance the concentration of rods with high motilities and strong steric interactions. The design of channel geometries that can then syphoned off these rods from the rest of the population (and their efficiency as sorting devices) will be the subject of future publications. \begin{acknowledgments} Both V.K. and A.M. acknowledge support from MPNS COST (European Cooperation in Science and Technology) Action MP1305 ``Flowing matter''. Both V.K. and A.M. acknowledge numerous useful discussions with Hartmut L{\"o}wen and his group. We acknowledge the use of Supercomputing Wales. \end{acknowledgments}
\section{Introduction} The popular equivalent-circuit approach to battery modelling \cite{salameh1992mathematical} is efficient, but has limited physical detail and extrapolates poorly. Electrochemical models \cite{gu1987mathematical,alavyoon1991theoretical, bernardi1993two, gu1997numerical, bernardi1995mathematical, newman1997simulation, gu2002modeling, cugnet2011effect,boovaragavan2009mathematical} require far more computational power, but include detailed descriptions of physical mechanisms, which presumably enhances predictive capability. Battery management could be improved if there existed easily-solved models with greater mechanistic detail. To that end, this paper puts forward several reduced-order models of lead-acid battery discharge, each derived from a mechanistic description based on an extension of Newman's porous-electrode theory \cite{newman2012electrochemical}, which we developed in part I. Several authors have simplified mechanistic lead-acid-battery models to improve their computational efficiency. Newman and Tiedemann~\cite{newman1997simulation} recognise that spatial gradients can be ignored at low current; they state a `lumped parameter model' (LPM) that depends only on time, but do not show how it derives from a porous-electrode model. Gandhi \textit{et al.}~\cite{gandhi2009simplified} propose a LPM to underpin an analytical current/voltage relation. Knauff~\cite{knauff2013kalman} simplifies a porous-electrode model by assuming, without justification, that current is linear in space, and acid molarity, quadratic. We deploy perturbation methods~\cite{hinch1991perturbation} to produce a hierarchy of increasingly complex models. After nondimensionalization, a \emph{diffusional C-rate}, $\mathcal{C}_\text{d}$--the C-rate scaled with the diffusion time-scale---is found to control how simply the full model can be approximated. Three reduced-order models are derived, validated against the full model, and applied to experiments for parameter estimation. A leading-order expansion in the diffusional C-rate produces a LPM of the Newman--Tiedemann type, found to be accurate for C-rates below $0.1C$. The first-order expansion accounts for quasi-static spatial heterogeneity within the electrode sandwich. As well as improving the fit of the full model, this correction has a computationally efficient closed-form expression. Finally, the first-order solution is improved by accounting for diffusion transients. This composite model includes just one linear partial differential equation, but matches the full model well up to $5C$. \section{Dimensionless model} \label{sec:nondim} In part I, we proposed a general three-dimensional, thermodynamically consistent, isothermal porous-electrode model of a discharging lead-acid battery. The detailed model was simplified slightly on the basis of dimensional analysis to allow solution in a one-dimensional setting. After nondimensionalization, we obtained the following dimensionless system governing the electrolyte concentration $c$, porosity $\varepsilon$, current density ${i}$ and potential $\Phi$, electrode current density ${i}_\text{s}$ and potential $\Phi_\text{s}$, and interfacial current density $j$: \begin{subequations}\label{eq:summary} \begin{align} \pd{}{t}(\varepsilon c) &= \frac{1}{\mathcal{C}_\text{d}}\pd{}{x}\left(D^\text{eff}\pd{c}{x}\right) + sj, \label{eq:dcdt}\\ \pd{\varepsilon}{t} &= -\beta^\text{surf}j, \label{eq:depsdt}\\ \pd{i}{x} &= j, \label{eq:didx}\\ \mathcal{C}_\text{d}\,{i} &= \kappa^\text{eff}\left(\chi\pd{\ln(c)}{x} - \pd{\Phi}{x}\right), \label{eq:i}\\ \pd{i_{\text{s}}}{x} &= -j, \label{eq:disdx}\\ {i}_{\text{s}} &= -\iota_{\text{s}}\pd{\Phi_{\text{s}}}{x}, \label{eq:is}\\ j &= 2{j}_0\sinh\left(\Phi_\text{s}-\Phi-U(c)\right) + \gamma_{\text{dl}}\pd{}{t}\left(\Phi_\text{s}-\Phi\right), \label{eq:j} \end{align} with boundary conditions \begin{align} \Phi_{\text{s}} = \pd{c}{x} = i = 0, \quad i_\text{s} = \mathrm{i}_\text{cell} \quad &\text{ at } x = 0, 1, \label{eq:BCs_collectors}\\ i_\text{s} = 0 \quad &\text{ at } x = \ell_\text{n}, 1-\ell_\text{p},\label{eq:BCs_separator} \end{align} and initial conditions \begin{align}\label{eq:ICs} c &= q^0, \\ {\varepsilon} &= \varepsilon^\text{max}-\varepsilon^\Delta(1-q^0), \\ {\Phi} &= - {U}_{\ce{Pb}}(q^0), \\ {\Phi}_{\text{s}} &= \begin{cases} 0, \quad &0<{x}<\ell_\text{n}\\ {U}_{\ce{PbO_2}}\left({c}^0\right) - {U}_{\ce{Pb}}\left({c}^0\right), \quad &1-\ell_\text{p}<{x}<1. \end{cases} \end{align} Equation \eqref{eq:disdx} with the boundary conditions \eqref{eq:BCs_collectors} and \eqref{eq:BCs_separator} also implies the integral condition \begin{equation}\label{eq:j_BC} \myint{0}{\ell_\text{n}}{{j}_\text{n}}{\di{x}} = -\myint{1-\ell_\text{p}}{1}{{j}_\text{p}}{\di{x}} = i_\text{cell}, \end{equation} \end{subequations} where property values in the negative and positive electrode are designated with subscripts n and p, respectively. Typical values of the dimensionless parameters $\mathcal{C}_\text{d}$, $\iota_\text{s}$, $\beta^\text{surf}$, $\gamma_\text{dl}$, $\ell$, $s$, $q^0$, $\varepsilon^\text{max}$ and $\varepsilon^\Delta$ are given in Table~\ref{tab:dimless_params}, while concentration-dependent functions $D$, $\kappa$, $\chi$, $j_0$ and $U$ are given in Table~\ref{tab:functions}. The dimensionless applied current is $i_\text{cell}(t) = I_\text{circuit}(t)/8A_\text{cs}$, where $I_\text{circuit}(t)$ is the applied current in the external circuit and $A_\text{cs}$ is the electrode cross-sectional area. We define $\bar{i}$ to be the maximum value of $i_\text{cell}(t)$ with respect to time. The key parameter is the diffusional C-rate, $\mathcal{C}_\text{d}$, which is the C-rate as measured on the diffusion time-scale (or alternatively, the ratio of the applied current scale to the scale of the limiting current). In the Results section, we will take $q^0$ to be unity (the battery starts from a fully charged state) unless explicitly stated. \begin{table}[t] \centering \begin{tabular}{|c|c c c|} \hline \multirow{2}{*}{Parameter} & \multicolumn{3}{c|}{Value} \\ \cline{2-4} & n & sep & p \\ \hline $\mathcal{C}_\text{d}$ & \multicolumn{3}{c|}{$0.60\mathcal{C}$} \\ $\iota_\text{s}$ & $3.8\times10^4/\mathcal{C}$ & - & $55/\mathcal{C}$ \\ $\beta^\text{surf}$ & $0.084$ & - & $-0.064$ \\ $\gamma_\text{dl}$ & $2.1\times10^{-5}$ & - & $1.7\times10^{-4}$ \\ $\ell$ & $0.25$ & $0.41$ & $0.34$ \\ $s$ & $-0.2$ & - & $0.8$ \\ $q^0$ & \multicolumn{3}{c|}{$1$} \\ ${\varepsilon}^\text{max}$ & $0.53$ & $0.92$ & $0.57$ \\ ${\varepsilon}^\Delta$ & $0.24$ & - & $-0.13$ \\ \hline \end{tabular} \caption{Dimensionless parameters, relative to the C-rate, ${\mathcal{C} = I_\text{circuit}/Q}$. Further details and interpretations can be found in part I.} \label{tab:dimless_params} \end{table} \section{Solutions} \label{sec:solutions} We now derive three analytical, approximate solutions to the model system \eqref{eq:summary}, and compare these to the numerical solution of the full model computed in part I, which we treat as `ground truth'. To do this, we note that the diffusional C-rate, $\mathcal{C}_\text{d}$, is small for most practical (low C-rate) applications, and perform an asymptotic analysis near the limit of small $\mathcal{C}_\text{d}$. \subsection{Leading-order quasi-static solution} \label{sec:sol_O1} In this section, we will derive the quasi-static solution in the limit of small $\mathcal{C}_\text{d}$, $\gamma_\text{dl}$ and $1/\iota_\text{s}$. Since $\gamma_{\text{dl}}$ and $1/\iota_\text{s}$ are much smaller than one (Table~\ref{tab:dimless_params}), we only take the leading-order terms in their expansions. In contrast, $\mathcal{C}_\text{d}$ can sometimes be close to one, so we will consider both the leading order and first order in $\mathcal{C}_\text{d}$. To leading order in $1/\iota_\text{s}$, \eqref{eq:is} becomes \begin{equation}\label{eq:Phis_uniform} \pd{\Phi_{\text{s}}}{x} = 0 \end{equation} in each electrode, and so $\Phi_\text{s}$ can be approximated as a function of time only. Applying the boundary condition \eqref{eq:BCs_collectors} and defining $V(t) = \left.\Phi_\text{s}\right\rvert_{x=1}$, we can now replace \eqref{eq:is} with \begin{equation}\label{eq:Phis_largeiotas} \Phi_{\text{s},\text{n}} = 0, \qquad \Phi_{\text{s},\text{p}} = V(t). \end{equation} We use the integral condition \eqref{eq:j_BC} so that we do not need to solve for $i_\text{s}$ to find the voltage, $V(t)$. Hence \eqref{eq:is} is only necessary if we want to find $i_\text{s}$ having found $j$. We also take the leading order in $\gamma_\text{dl}$, so that the time derivatives in \eqref{eq:j} disappear. In summary, we simplify the system \eqref{eq:summary} to the following equations for $c(x,t)$, $\varepsilon(x,t)$, $j(x,t)$, $\Phi(x,t)$ and $V(t)$: \begin{subequations}\label{eq:summary_simplified} \begin{align} \pd{}{t}(\varepsilon c) &= \frac{1}{\mathcal{C}_\text{d}}\pd{}{x}\left(D^\text{eff}\pd{c}{x}\right) + sj, \label{eq:dcdt_simplified}\\ \pd{\varepsilon}{t} &= -\beta^\text{surf}j, \label{eq:depsdt_simplified}\\ \mathcal{C}_\text{d}\,{j} &= \pd{}{x}\left[\kappa^\text{eff}\left(\chi\pd{\ln(c)}{x} - \pd{\Phi}{x}\right)\right], \label{eq:i_simplified}\\ j_\text{n} &= 2{j}_{0,\text{n}}\sinh\left(-\Phi-U_{\ce{Pb}}(c)\right), \label{eq:jn_simplified} \\ j_\text{p} &= 2{j}_{0,\text{p}}\sinh\left(V-\Phi-U_{\ce{PbO_2}}(c)\right),\label{eq:jp_simplified} \end{align} with boundary conditions \begin{align} &\pd{c}{x} = \pd{\Phi}{x} = 0 \quad \text{ at } x = 0, 1,\\ &\myint{0}{\ell_\text{n}}{j_\text{n}}{x} = -\myint{1-\ell_\text{p}}{1}{j_\text{p}}{x} = \mathrm{i}_\text{cell}, \end{align} and initial conditions \eqref{eq:ICs}. \end{subequations} As shown in Table~\ref{tab:dimless_params}, the diffusional C-rate, $\mathcal{C}_\text{d}$, is equal to $0.6\mathcal{C}$, where $\mathcal{C}$ is the C-rate. Most practical applications have a C-rate below 0.25C, so the diffusional C-rate is usually small. Hence we perform an asymptotic expansion in the limit $\mathcal{C}_\text{d}\to0$ and assume that we can expand all variables in \eqref{eq:summary_simplified} in powers of $\mathcal{C}_\text{d}$: \begin{equation}\label{eq:Da_expansion} f(x,t) = f\pow{0}(x,t) + \mathcal{C}_\text{d} f\pow{1}(x,t)+ \mathcal{C}_\text{d}^2 f\pow{2}(x,t) + \mathcal{O}(\mathcal{C}_\text{d}^3), \end{equation} where $f = c, \varepsilon, \Phi, j$ and $V$. Hence \eqref{eq:summary_simplified} becomes to leading order \begin{subequations}\label{eq:summary_O1} \begin{align} 0 &= \pd{}{x}\left(D^{\text{eff},(0)}\pd{c\pow{0}}{x}\right), \label{eq:dcdt_O1}\\ \pd{\varepsilon\pow{0}}{t} &= -\beta^\text{surf}j\pow{0}, \label{eq:depsdt_O1}\\ 0 &= \pd{}{x}\left[\kappa^{\text{eff},(0)}\left(\chi\pow{0}\pd{\ln\left(c\pow{0}\right)}{x} - \pd{\Phi\pow{0}}{x}\right)\right], \label{eq:i_O1}\\ j\pow{0}_\text{n} &= 2{j}_{0,\text{n}}\pow{0}\sinh\left(-\Phi\pow{0}-U_{\ce{Pb}}\left(c\pow{0}\right)\right)\label{eq:jn_O1}\\ j\pow{0}_\text{p} &= 2{j}_{0,\text{p}}\pow{0}\sinh\left(V\pow{0}-\Phi\pow{0}-U_{\ce{PbO_2}}\left(c\pow{0}\right)\right).\label{eq:jp_O1} \end{align} The leading-order diffusivity is ${D^{\text{eff},(0)} = D\left(c\pow{0}\right)\left(\varepsilon\pow{0}\right)^{3/2}}$, and similarly for $\kappa^{\text{eff},(0)}$, $\chi\pow{0}$ and $c_\text{w}\pow{0}$, The boundary conditions are \begin{align} &\pd{c\pow{0}}{x} = \pd{\Phi\pow{0}}{x} = 0 \quad \text{ at } x = 0, 1, \label{eq:BCs_collectors_O1}\\ &\myint{0}{\ell_\text{n}}{j\pow{0}_\text{n}}{x} = -\myint{1-\ell_\text{p}}{1}{j\pow{0}_\text{p}}{x} = \mathrm{i}_\text{cell},\label{eq:j_BC_O1} \end{align} and the initial conditions are \begin{align}\label{eq:ICs_O1} &c\pow{0} = c^0, \qquad {\varepsilon}\pow{0} = \varepsilon^0. \end{align} \end{subequations} At first order, equating coefficients of $\mathcal{C}_\text{d}$ in \eqref{eq:summary_simplified} gives \begin{subequations}\label{eq:summary_ODa} \begin{align} \pd{}{t}&\left(\varepsilon\pow{0}c\pow{0}\right) = \pd{}{x}\left(D^{\text{eff},(0)}\pd{c\pow{1}}{x}\right) + sj\pow{0}, \label{eq:dcdt_ODa}\\ \pd{\varepsilon\pow{1}}{t} &= -\beta^\text{surf}j\pow{1}, \label{eq:depsdt_ODa}\\ j\pow{0} &= \pd{}{x}\left[\kappa^{\text{eff},(0)}\left(\frac{\chi\pow{0}}{c\pow{0}}\pd{c\pow{1}}{x} - \pd{\Phi\pow{1}}{x}\right)\right], \label{eq:i_ODa}\\ j\pow{1}_\text{n} &= 2\left({j}_{0,\text{n}}\pow{1}\sinh\left[{\eta}\pow{0}_\text{n}\right]+ {j}_{0,\text{n}}\pow{0}\eta\pow{1}_\text{n}\cosh\left[{\eta}\pow{0}_\text{n}\right]\right), \label{eq:jn_ODa}\\ j\pow{1}_\text{p} &= 2\left({j}_{0,\text{p}}\pow{1}\sinh\left[{\eta}\pow{0}_\text{p}\right] + {j}_{0,\text{p}}\pow{0}\eta\pow{1}_\text{p}\cosh\left[{\eta}\pow{0}_\text{p}\right]\right),\label{eq:jp_ODa} \end{align} where \begin{align} &\eta\pow{0}_\text{n} = -\left({\Phi}\pow{0} + {U}_{\ce{Pb}}(c\pow{0})\right), \\ &\eta\pow{0}_\text{p} = V\pow{0} - {\Phi}\pow{0} - {U}_{\ce{PbO_2}}\left(c\pow{0}\right), \\ &\eta\pow{1}_\text{n} = -\left({\Phi}\pow{1} + c\pow{1}{U}'_{\ce{Pb}}\left(c\pow{0}\right)\right), \\ &\eta\pow{1}_\text{p} = V\pow{1} - {\Phi}\pow{1} - c\pow{1}{U}'_{\ce{PbO_2}}\left(c\pow{0}\right), \end{align} with boundary conditions \begin{align} &\pd{c\pow{1}}{x} = \pd{\Phi\pow{1}}{x} = 0 \quad \text{ at } x = 0, 1, \label{eq:BCs_collectors_ODa}\\ &\myint{0}{\ell_\text{n}}{j\pow{1}}{x} = -\myint{1-\ell_\text{p}}{1}{j\pow{1}}{x} = 0, \label{eq:j_BC_ODa} \end{align} and initial conditions \begin{align}\label{eq:ICs_ODa} c\pow{1} = {\varepsilon}\pow{1} = 0&\quad \text{ at $t=0$}. \end{align} \end{subequations} \paragraph{Leading-order quasi-static solution} We now seek the solution to the lowest order problem. Integrating \eqref{eq:dcdt_O1} with boundary conditions \eqref{eq:BCs_collectors_O1}, then integrating again, gives $c\pow{0} = c\pow{0}(t)$. We then integrate \eqref{eq:i_O1}, use boundary conditions \eqref{eq:BCs_collectors_O1}, and integrate again, to find that $\Phi\pow{0} = \Phi\pow{0}(t)$. Hence $j\pow{0}_\text{n}$ and $j\pow{0}_\text{p}$ as defined by \eqref{eq:jn_O1} and \eqref{eq:jp_O1} are functions of time only; the boundary conditions \eqref{eq:j_BC_O1} give \begin{align}\label{eq:j0} j\pow{0}_\text{n} = \mathrm{i}_\text{cell}/\ell_\text{n}, \qquad j\pow{0}_\text{p} = -\mathrm{i}_\text{cell}/\ell_\text{p}. \end{align} Finally, by \eqref{eq:depsdt_O1}, $\varepsilon_\text{n}\pow{0}$, $\varepsilon_\text{sep}\pow{0}$ and $\varepsilon_\text{p}\pow{0}$ are functions of time only (in particular, $\varepsilon_\text{sep}\pow{0} \equiv \varepsilon_\text{sep}^\text{max}$). Hence to leading order, the whole problem is quasi-static. To determine $c\pow{0}$, we need to consider the first-order problem \eqref{eq:dcdt_ODa} for $c\pow{1}$. Integrating \eqref{eq:dcdt_ODa} from $x=0$ to $x=1$ and using \eqref{eq:j0} and the boundary conditions \eqref{eq:BCs_collectors_ODa} gives a solvability condition that determines $c\pow{0}$. We can combine this with \eqref{eq:depsdt_O1}, \eqref{eq:jn_O1} and \eqref{eq:jp_O1} to obtain a nonlinear differential-algebraic equation system governing $c\pow{0}$, $\varepsilon_\text{n}\pow{0}$, $\varepsilon_\text{p}\pow{0}$, $\Phi\pow{0}$ and $V\pow{0}$, \begin{subequations}\label{eq:O1_ODEs} \begin{align} \od{c\pow{0}}{t} &= \frac{1}{\ell_\text{n}\varepsilon_\text{n}\pow{0} + \ell_\text{sep}\varepsilon_\text{sep}^\text{max} + \ell_\text{p}\varepsilon_\text{p}\pow{0}}\nonumber \\ &\times\left[(s_\text{n}-s_\text{p})\mathrm{i}_\text{cell}\phantom{\pd{}{}}\right.\nonumber \\ & \left.- c\pow{0}\od{}{t}\left(\ell_\text{n}\varepsilon_\text{n}\pow{0} + \ell_\text{sep}\varepsilon_\text{sep}^\text{max} + \ell_\text{p}\varepsilon_\text{p}\pow{0}\right)\right], \\ \od{\varepsilon_\text{n}\pow{0}}{t} &= -\frac{\beta^\text{surf}_\text{n}\mathrm{i}_\text{cell}}{\ell_\text{n}}, \\ \od{\varepsilon_\text{p}\pow{0}}{t} &= \frac{\beta^\text{surf}_\text{p}\mathrm{i}_\text{cell}}{\ell_\text{p}}, \\ \mathrm{i}_\text{cell}/\ell_\text{n} &= 2{j}_{0,\text{n}}\pow{0}\sinh\left(-\Phi\pow{0}-U_{\ce{Pb}}\left(c\pow{0}\right)\right), \\ -\mathrm{i}_\text{cell}/\ell_\text{p} &= 2{j}_{0,\text{p}}\pow{0}\sinh\left(V\pow{0}-\Phi\pow{0}-U_{\ce{PbO_2}}\left(c\pow{0}\right)\right), \end{align} \end{subequations} with initial conditions \eqref{eq:ICs_O1}. Integrate (\ref{eq:O1_ODEs}a-c) and rearrange (\ref{eq:O1_ODEs}d,e) to find the final leading-order solution, \begin{subequations}\label{eq:O1_algebraic} \begin{align} &c\pow{0} = \frac{\left(\ell_\text{n}\varepsilon_{\text{n}}^0 + \ell_\text{sep}\varepsilon_\text{sep}^\text{max} + \ell_\text{p}\varepsilon_{\text{p}}^0\right)q^0 + (s_\text{n}-s_\text{p})\myint{0}{t}{\mathrm{i}_\text{cell}}{s}}{\ell_\text{n}\varepsilon_\text{n}\pow{0} + \ell_\text{sep}\varepsilon_\text{sep}^\text{max} + \ell_\text{p}\varepsilon_\text{p}\pow{0}}, \label{eq:c0}\\ &\varepsilon_\text{n}\pow{0} = \varepsilon^0_\text{n} -\frac{\beta^\text{surf}_\text{n}}{\ell_\text{n}}\myint{0}{t}{\mathrm{i}_\text{cell}}{s}, \\ &\varepsilon_\text{p}\pow{0} = \varepsilon^0_\text{p} + \frac{\beta^\text{surf}_\text{p}}{\ell_\text{p}}\myint{0}{t}{\mathrm{i}_\text{cell}}{s}, \\ &\Phi\pow{0} = - U_{\ce{Pb}}\left(c\pow{0}\right) - \sinh^{-1}\left(\frac{\mathrm{i}_\text{cell}}{2{j}_{0,\text{n}}\pow{0}\ell_\text{n}}\right), \\ &V\pow{0} = U_{\ce{PbO_2}}\left(c\pow{0}\right) - U_{\ce{Pb}}\left(c\pow{0}\right) \nonumber\\ &{\phantom{V\pow{0}=} } - \sinh^{-1}\left(\frac{\mathrm{i}_\text{cell}}{2{j}_{0,\text{n}}\pow{0}\ell_\text{n}}\right) - \sinh^{-1}\left(\frac{\mathrm{i}_\text{cell}}{2{j}_{0,\text{p}}\pow{0}\ell_\text{p}}\right).\label{eq:V0} \end{align} \end{subequations} \subsection{First-order quasi-static solution} \label{sec:sol_ODa} We now solve the first-order system, \eqref{eq:summary_ODa}, to find the $\mathcal{O}(\mathcal{C}_\text{d})$ correction to the voltage. We solve \eqref{eq:summary_ODa} as follows: \begin{enumerate*}[label=(\roman*)] \item find $c\pow{1}$ using \eqref{eq:dcdt_ODa}, up to an arbitrary constant, $k(t)$; \item find $k$ using a solvability condition on $c\pow{2}$, the $\mathcal{O}(\mathcal{C}_\text{d}^2)$ correction to $c$; \item find $\Phi\pow{1}$ using \eqref{eq:i_ODa} up to an arbitrary constant, $A_\text{n}(t)$; \item find $A_\text{n}$ using \eqref{eq:jn_ODa}; \item find $V\pow{1}$ using \eqref{eq:jp_ODa}. \end{enumerate*} Firstly, with known $c\pow{0}$ and $\varepsilon\pow{0}$, we can integrate \eqref{eq:dcdt_ODa} with respect to $x$ twice and use \eqref{eq:BCs_collectors_ODa} to find an explicit equation for $c\pow{1}$ (given in \ref{app:c1}). Having found $c\pow{1}$, we integrate \eqref{eq:i_ODa}, using \eqref{eq:j0} and continuity of $\Phi\pow{1}$, to find \begin{equation}\label{eq:Phi1} \begin{aligned} \Phi\pow{1} = &\frac{\chi\pow{0}c\pow{1}}{c\pow{0}}+ A_\text{n} \\ &- \begin{cases} \frac{\mathrm{i}_\text{cell}x^2}{2\ell_\text{n}\kappa^{\text{eff},(0)}_\text{n}} , \quad& 0<x<\ell_\text{n}, \\ {\mathrm{i}_\text{cell}}\left(\frac{\ell_\text{n}}{2\kappa^{\text{eff},(0)}_\text{n}} + \frac{x-\ell_\text{n}}{\kappa^{\text{eff},(0)}_\text{s}}\right), \quad& \ell_\text{n}<x<1 - \ell_\text{p}, \\ \mathrm{i}_\text{cell}\left(\frac{\ell_\text{n}}{2\kappa^{\text{eff},(0)}_\text{n}} + \frac{\ell_\text{sep}}{\kappa^{\text{eff},(0)}_\text{s}}\right.\\ \left. \hspace{1cm}+ \frac{\ell_\text{p}^2 - (1-x)^2}{2\ell_\text{p}\kappa^{\text{eff},(0)}_\text{p}}\right), \quad& 1 - \ell_\text{p}<x<1, \end{cases} \end{aligned} \end{equation} where $A_\text{n}$ is an arbitrary constant. We can now integrate \eqref{eq:jn_ODa} from $x=0$ to $x=\ell_\text{n}$ and integrate \eqref{eq:jp_ODa} from $x=1-\ell_\text{p}$ to $x=1$, using \eqref{eq:j_BC_ODa} each time, to find the correction term $V\pow{1}$: \begin{subequations}\label{eq:ODa_algebraic} \begin{multline} A_\text{n} = \frac{\bar{j}_{0,\text{n}}\pow{1}\tanh\left({\eta}_\text{n}\pow{0}\right)}{{j}_{0,\text{n}}\pow{0}} - \bar{c}_\text{n}\pow{1}{U}'_{\ce{Pb}}\left(c\pow{0}\right) \\ - \frac{\chi\pow{0}\bar{c}_\text{n}\pow{1}}{c\pow{0}} + \frac{\mathrm{i}_\text{cell}\ell_\text{n}}{6\kappa^{\text{eff},(0)}_\text{n}}, \end{multline} \begin{equation} V\pow{1} = \bar{\Phi}\pow{1}_\text{p} + \bar{c}_\text{p}\pow{1}{U}'_{\ce{PbO_2}}\left(c\pow{0}\right) - \frac{\bar{j}_{0,p}\pow{1}\tanh\left({\eta}_\text{p}\pow{0}\right)}{{j}_{0,\text{p}}\pow{0}}, \end{equation} \end{subequations} where we have introduced the averages \begin{equation} \bar{\cdot}_\text{n} = \frac{1}{\ell_\text{n}}\myint{0}{\ell_\text{n}}{\cdot}{x}, \qquad \bar{\cdot}_\text{p} = \frac{1}{\ell_\text{p}}\myint{1-\ell_\text{p}}{1}{\cdot}{x}. \end{equation} \subsection{Composite solution} \label{sec:sol_comp} The quasi-static solution developed in the `Leading-order quasi-static solution' and `First-order quasi-static solution' sections is valid when the current varies slowly, but fails to capture transient behaviour when the current changes more rapidly, such as a jump. To capture such transients, we could rescale time with $\tau = (t-t^*)/\mathcal{C}_\text{d}$, where $t^*$ is the time of the jump in the current, define $C(\tau) = c(t)$ (and likewise for other variables) and expand in powers of $\mathcal{C}_\text{d}$. We give the details of such an approach in \ref{app:transient}. Such a transient solution is valid at short times after a jump time $t^*$, but breaks down at times long after the jump time. To obtain a solution that is valid both at short times after a jump in current and at long times, without having to repeatedly `reset' the transient solution, we use a `composite' solution, which we now develop here. We consider the lowest order and first order correction for the concentration by taking $\tilde{c} = c\pow{0} + \mathcal{C}_\text{d}\,c\pow{1}$. We then consider the PDE \begin{equation}\label{eq:c_comp} \varepsilon\pow{0}\pd{\tilde{c}}{t} = \frac{D^{\text{eff},(0)}}{\mathcal{C}_\text{d}}\pds{\tilde{c}}{x} + \left(s + \beta^\text{surf}c\pow{0}\right)j\pow{0}, \end{equation} where $c\pow{0}$ and $\varepsilon\pow{0}$ are given by the quasi-static problem \eqref{eq:O1_algebraic} and $j\pow{0}$ is given by \eqref{eq:j0}. We note that for long times, $\mathcal{C}_\text{d}\,\partial c\pow{1}/\partial t$ is a higher-order term and we retrieve the quasi-static problem \eqref{eq:dcdt_ODa}, while for short times, re-scaling $\tau = (t-t^*)/\mathcal{C}_\text{d}$, $c\pow{0}$ is constant and we have the transient problem \eqref{eq:transient_ODa_c} for $c\pow{1}$. Hence \eqref{eq:c_comp} is valid uniformly at both short times and long times. The composite solution then consists of solving \eqref{eq:c_comp} for $\tilde{c}$, then computing \begin{equation}\label{eq:c1_comp} c\pow{1} = \frac{\tilde{c}-c\pow{0}}{\mathcal{C}_\text{d}}, \end{equation} and finally finding $V\pow{1}$ through \eqref{eq:Phi1} and \eqref{eq:ODa_algebraic} with $c\pow{1}$ given by \eqref{eq:c1_comp}. \section{Results} \label{sec:results} \begin{figure*}[t] \centering \includegraphics{compare_voltages} \caption{Comparing voltages for a constant-current discharge using the parameters from literature (Tables~\ref{tab:dimless_params} and \ref{tab:dim_params}), for a range of C-rates.} \label{fig:compare_voltages} \end{figure*} In the Solutions section we derived four systems that are approximately equivalent to the full dimensionless system \eqref{eq:summary} with varying degrees of accuracy: \begin{enumerate} \item Numerical -- part I \item Leading-order quasi-static (LOQS) -- \eqref{eq:O1_algebraic} \item First-order quasi-static (FOQS) -- \eqref{eq:c1}, \eqref{eq:Phi1} and \eqref{eq:ODa_algebraic} \item Composite -- \eqref{eq:c_comp}, \eqref{eq:Phi1} and \eqref{eq:ODa_algebraic} \end{enumerate} The code used to solve the models and generate the results below is available publicly on GitHub \cite{valentin_sulzer_2019_2554000}. Note that to obtain either the first-order quasi-static solution or the composite solution, we must first solve the leading-order quasi-static problem. \subsection{Reduced-order solutions} We now compare results from the four models. We treat the full numerical model as `ground truth', and investigate the speed and accuracy of the three other models compared to the numerical model. The most important output from the model is the voltage, since this is the variable that we can compare to experimental data (treating current as a known input). In Figure~\ref{fig:compare_voltages}, we compare the voltage during a complete constant-current discharge at a range of C-rates. The discharge is deemed to be finished either when the concentration reaches zero anywhere in the cell, or when the voltage reaches a cut-off voltage of $10.5$V. We observe that all three reduced-order solutions agree well with the numerical solution at very low C-rates (Figure~\ref{fig:compare_voltages}a). As we increase the C-rate (Figures\ref{fig:compare_voltages}b-d), only the first-order solutions (FOQS and composite) agree with the numerical solution; further, a discrepancy appears between the FOQS solution and the numerical solution at early times. Finally, for very high C-rates (Figures~\ref{fig:compare_voltages}e-f) the composite solution still agrees very well with the numerical solution, but the FOQS solution does not, and terminates early, for reasons that we explain below. \def 0.1C {0.1C} \def 0.5C {0.5C} \def 2C {2C} To explain the behaviour observed in the voltages, we investigate internal variables, such as the concentration at various states of charge (Figure~\ref{fig:compare_concentrations}). At a very low C-rate of 0.1C~(Figure~\ref{fig:compare_concentrations}a), the concentration remains almost uniform throughout the discharge; hence the LOQS solution, which does not take into account any spatial variations, provides a good fit to the numerical solution. At a higher C-rate of 0.5C~(Figure~\ref{fig:compare_concentrations}b), the concentration in the numerical solution is no longer spatially homogeneous; this is non-uniformity is captured well by the FOQS and composite solutions, but not by the LOQS solution. However, even with the FOQS and composite solutions, there is a discrepancy in the concentration profiles in the positive electrode (Figures~\ref{fig:compare_concentrations}b,c, right-hand side of the spatial domain). This is because the solutions from the asymptotic methods assume a uniform interfacial current density, but in the numerical solution the interfacial current density is non-uniform. Finally, at high C-rates (2C, Figure~\ref{fig:compare_concentrations}c), there is a diffusion transient at the start of the discharge; this is only captured by the composite solution, and not the FOQS solution. This initial diffusion transient also explains the discrepancy between the FOQS and numerical solutions at early times in Figure~\ref{fig:compare_voltages}d. In addition to this, we can now see that the FOQS solution terminates early in Figure~\ref{fig:compare_voltages}f because the concentration quickly reaches zero. \begin{figure*}[t] \centering \includegraphics{compare_concentrations} \caption{Comparing concentrations at various States of Charge (SOCs) for a constant-current discharge using the parameters from literature (Tables~\ref{tab:dimless_params} and \ref{tab:dim_params}), for a range of C-rates. Opacity increases with decreasing SOC. In (c), we only show the curves down to 50\% SOC, as the numerical, composite and LOQS solutions terminate before 25\% SOC.} \label{fig:compare_concentrations} \end{figure*} In Figure~\ref{fig:errors}, we show the relative errors of the voltage obtained from reduced-order models compared to the voltage obtained from the numerical model. \begin{figure} \centering \includegraphics{errors} \caption{Relative error of the reduced-order models compared to the numerical model, for a constant-current discharge using the parameters from literature (Tables~\ref{tab:dimless_params} and \ref{tab:dim_params}), for a range of currents.} \label{fig:errors} \end{figure} Then, in Table~\ref{tab:speed}, we compare the time taken to solve the various models. We see that the composite solution, leading-order quasi-static and first-order quasi-static solutions are roughly one, two and three orders of magnitude faster than the full numerical solution respectively. Coupled with the errors shown in Figure~\ref{fig:errors}, the speeds shown in Table~\ref{tab:speed} suggest that in order to solve the model accurately and as quickly as possible, we should use the LOQS model for C-rates below 0.1C, the FOQS model for C-rates of 0.1-1C, and the composite model for C-rates above 1C. The time taken for the leading-order quasi-static model is independent of grid size, while the time taken for the other models scales linearly with grid size. Note that we can expect to obtain a faster numerical solution by using a different spatial discretisation scheme than Finite Volumes, such as Chebyshev orthogonal collocation~\cite{bizeray2015lithium}, and the relative speed-up of the composite solution by using the same discretisation would be similar. \renewcommand{\arraystretch}{1} \begin{table*}[t] \centering \begin{tabular}{|c|cc|cc|cc|cc|} \hline & \multicolumn{2}{c|}{0.1C}& \multicolumn{2}{c|}{0.5C}& \multicolumn{2}{c|}{2C}& \multicolumn{2}{c|}{5C}\\ \cline{2-9} Solution Method & Time & Speed-up & Time & Speed-up & Time & Speed-up & Time & Speed-up \\ \hline Numerical & 0.643 & - & 0.265 & - & 1.3 & - & 1.19 & - \\ Composite & 0.050 & 13 & 0.048 & 5 & 0.051 & 26 & 0.292 & 4 \\ FOQS & 0.005 & 126 & 0.005 & 55 & 0.005 & 261 & 0.005 & 239 \\ LOQS & 0.002 & 407 & 0.001 & 183 & 0.001 & 887 & 0.001 & 805 \\ \hline \end{tabular} \caption{Speed comparison for the four models for a constant-current discharge using the parameters from literature (Tables~\ref{tab:dimless_params} and \ref{tab:dim_params}). Time is CPU time in seconds, obtained on an AMD FX(tm)-4350 Quad-Core Processor, and averaged over 100 runs; speed-up is ratio of numerical time to own time.} \label{tab:speed} \end{table*} \subsection{Voltage breakdown} \def 0.1C {0.1C} \def 0.5C {0.5C} \def 5C {5C} \begin{figure*}[t] \centering \includegraphics{voltage_breakdown} \caption{Split of voltage drop into dimensional components, as given by \eqref{eq:voltage_breakdown} and \eqref{eq:voltage_breakdown_details}, for a constant-current discharge using the parameters from literature (Tables~\ref{tab:dimless_params} and \ref{tab:dim_params}).} \label{fig:voltage_breakdown} \end{figure*} As well as obtaining a faster solution to the model, the composite solution allows us to identify the individual overpotentials that contribute to the total drop in voltage from full charge. We write the total dimensional voltage as the sum of the initial voltage, \begin{equation} \hat{V}^0 = U_{\ce{PbO_2}}^\ominus - U_{\ce{Pb}}^\ominus + \frac{RT}{F}\left(U_{\ce{PbO_2}}(c^0) - U_{\ce{Pb}}(c^0)\right), \end{equation} and individual voltage drops~\cite{daigle2013electrochemistry}, \begin{equation}\label{eq:voltage_breakdown} \hat{V} = \hat{V}^0 + \frac{RT}{F}\left(V_\text{U,n} + V_\text{U,p} + V_\text{k, n} + V_\text{k,p} + V_\text{c} + V_\text{o}\right), \end{equation} where $V_{\text{U},i}$, $i=\text{n},\text{p}$ are the open-circuit voltages; $V_{\text{k},i}$, ${i}=\text{n},\text{p}$ are the kinetic overpotentials, accounting for losses due to the reactions at the electrode-electrolyte interfaces; $V_\text{c}$ is the concentration overpotential, accounting for losses due to concentration gradients; and $V_\text{o}$ is the Ohmic overpotential in the electrolyte, accounting for losses due to the electric resistance of the electrolyte. Equation~\ref{eq:voltage_breakdown} would usually include a term to account for Ohmic losses in the solid electrodes, but in our reduced-order models this term is zero since $\iota_\text{s}$ is large (c.f. equation~\ref{eq:Phis_uniform}). Combining \eqref{eq:V0}, \eqref{eq:Phi1} and \eqref{eq:ODa_algebraic}, we identify \begin{subequations} \begin{align}\label{eq:voltage_breakdown_details} V_\text{U,n} &= - U_{\ce{Pb}}\left(c\pow{0}\right) - \mathcal{C}_\text{d}\,\bar{c}\pow{1}_\text{n}U'_{\ce{Pb}}\left(c\pow{0}\right), \\ V_\text{U,p} &= U_{\ce{PbO_2}}\left(c\pow{0}\right) + \mathcal{C}_\text{d}\,\bar{c}\pow{1}_\text{p} U'_{\ce{PbO_2}}\left(c\pow{0}\right), \\ V_\text{k,n} &= - \sinh^{-1}\left(\frac{\mathrm{i}_\text{cell}}{2{j}_{0,\text{n}}\pow{0}\ell_\text{n}}\right) + \frac{\mathcal{C}_\text{d}\,\bar{j}\pow{1}_{0,\text{n}}}{{j}_{0,\text{n}}\pow{0}}\tanh\left(\eta_\text{n}\pow{0}\right), \\ V_\text{k,p} &= - \sinh^{-1}\left(\frac{\mathrm{i}_\text{cell}}{2{j}_{0,\text{p}}\pow{0}\ell_\text{p}}\right) - \frac{\mathcal{C}_\text{d}\,\bar{j}\pow{1}_{0,\text{p}}}{{j}_{0,\text{p}}\pow{0}}\tanh\left(\eta_\text{p}\pow{0}\right), \\ V_\text{c} &= \frac{\mathcal{C}_\text{d}\,\chi\pow{0}}{c\pow{0}}\left(\bar{c}\pow{1}_\text{p}-\bar{c}\pow{1}_\text{n}\right), \\ V_\text{o} &= -\mathcal{C}_\text{d}\,\mathrm{i}_\text{cell}\left(\frac{\ell_\text{n}}{3\kappa^{\text{eff},(0)}_\text{n}}+\frac{\ell_\text{sep}}{\kappa^{\text{eff},(0)}_\text{s}}+\frac{\ell_\text{p}}{3\kappa^{\text{eff},(0)}_\text{p}}\right), \end{align} \end{subequations} Together with the quasi-static formulas \eqref{eq:c0} for $c\pow{0}$ and \eqref{eq:c1} for $c\pow{1}$, equations \eqref{eq:voltage_breakdown} and \eqref{eq:voltage_breakdown_details} give an exact formula for the voltage that is valid for most operating C-rates (below 0.5C). For higher C-rates, we must solve \eqref{eq:c_comp} and use \eqref{eq:c1_comp}, instead of \eqref{eq:c1}, to find $c\pow{1}$. In Figure~\ref{fig:voltage_breakdown}, we show the relative contribution from each of the terms in \eqref{eq:voltage_breakdown_details}. At low C-rates (Figure~\ref{fig:voltage_breakdown}a), the drop in voltage is almost entirely due to the change in the OCV of the two electrodes as the concentration changes, $V_\text{U,n}$; this is why the LOQS solution is accurate enough in this regime. As we increase the C-rate (Figure~\ref{fig:compare_voltages}b), the first non-OCV effects to become important are the kinetic overpotentials, $V_\text{k,n}$, with the kinetic overpotential in the positive electrode being greater. Finally, at very high C-rates (Figure~\ref{fig:compare_voltages}c), we see that the sharp initial drop in voltage is due to both kinetic overpotentials and the ohmic overpotential in the electrolyte in roughly equal measures. The breakdown of voltages given by \eqref{eq:voltage_breakdown} could be used to help guide any optimisation of a battery design. For example, the behaviour observed in Figure~\ref{fig:voltage_breakdown}b suggests that an effective way to improve the power capacity of the battery (by reducing the voltage drop) might be to target reduction of the kinetic overpotential in the positive electrode. Alternatively, this allows us to explore the trade-off between energy capacity and power capacity of the battery, and hence optimise the behaviour of the battery for specific applications. For example, increasing the total width, $L$, of an electrode pair would increase the energy capacity of the battery. However, increasing $L$ would also increase the diffusional C-rate (Table~\ref{tab:dimless_params}), and so increase the contributions to the voltage drop in \eqref{eq:voltage_breakdown_details}, decreasing the power capacity of the battery. It becomes evident that we need to consider first-order effects in order to fully understand the trade-off between energy capacity and power capacity; the LOQS model would naively suggest that increasing $L$ is always the optimal strategy. A third option could be to fix the total width $L$ (\textit{i.e.} fix the energy capacity) and optimise the relative widths of the negative electrode, separator and positive electrode in order to minimise the voltage drop given by \eqref{eq:voltage_breakdown}, and hence maximise the power capacity of the battery. In all three examples suggested, a quantitative optimisation could be done very efficiently using the formulas given in this paper. \subsection{Parameter fitting} \label{sec:fit} Another potential application for our reduced-order models is in parameter fitting. This is an important challenge when comparing models to experimental data, as many parameters in the model cannot be identified individually \textit{a priori}. To demonstrate how our model can be useful for parameter fitting, we fit each model to six constant-current discharges of a 17 Ah BBOXX Solar Home battery at intervals of 0.5 A from 3 A to 0.5 A. Each constant-current discharge is followed by a two-hour rest period during which the current is zero. In order to use as few fitting parameters as possible, we take standard values for all parameters (given in Tables~\ref{tab:dimless_params} and \ref{tab:dim_params}) except for the following: \begin{enumerate}[label=(\roman*)] \item the maximum electrode porosities, $\varepsilon_\text{n}^\text{max}$ and $\varepsilon_\text{p}^\text{max}$, which we assume to be equal; \item the separator porosity, $\varepsilon_\text{sep}^\text{max}$; \item the exchange current-density for the negative electrode, $j_\text{n}^\text{ref}$ (we assume that ${j_\text{p}^\text{ref} = j_\text{n}^\text{ref}/10}$); \item a `resistance in the wires', $R_\text{circuit}$, which accounts for ohmic losses outside the battery within the BBOXX Solar Home (we take away $I_\text{circuit}R_\text{circuit}$ from the voltage output by the model before fitting to data). \item an initial SOC, $q^0$, for five of the curves (we assume that the first discharge, at 3A, starts from full SOC); \end{enumerate} This gives a total of nine fitting parameters for six curves. To fit our model to the data, we minimise the sum-of-squares of the voltage prediction error. We do this in Python with both a derivative-based (\texttt{leastsquares}~\cite{scipy}) or derivative-free (DFO-GN~\cite{cartis2017derivative}) optimisation algorithm. \begin{figure} \centering \includegraphics{fits} \caption{Comparing data (dots) with results from full numerical model (lines) for a range of currents, with parameters fitted using DFO-GN (Tables~\ref{tab:dimless_params} and \ref{tab:dim_params}, except $\varepsilon^\text{max}$, $j^\text{ref}$ and $q^0$ from Table~\ref{tab:fit_params}).} \label{fig:fits} \end{figure} Since the highest discharge current is quite low (3A corresponds to a C-rate of 0.18C), both the first-order quasi-static model and composite model agree well with the full numerical model. These three models give a very good fit to the data except near the start of the discharge, and during the short rest period afterwards, as shown in Figure~\ref{fig:fits}. In Table~\ref{tab:fit_performance}, we compare the final sum-of-squares error, as well as the time taken to find the minimum when starting from the parameters from literature of Tables~\ref{tab:dimless_params} and \ref{tab:dim_params}, for each optimisation algorithm/model combination. As expected, the quasi-static models are faster than the composite model, with the numerical model being by far the slowest. However, this is compounded by the fact that the derivative-based algorithm from SciPy cannot find the best fit for the composite and numerical models, and so we must resort to derivative-free models. Thus optimising the first-order quasi-static model is thirty times faster than optimising the full numerical model. As shown in Table~\ref{tab:fit_params_selection}, the optimal parameters found by SciPy with the FOQS model are almost the same as those found by DFO-GN with the numerical model, with the exception of the exchange current-density, $j_\text{n}^\text{ref}$. Hence one could first fit all the parameters using SciPy and the FOQS model, and then only need to fit $j_\text{n}^\text{ref}$ with DFO-GN and the numerical model. \begin{table*}[t] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|} \hline & \multicolumn{2}{c|}{LOQS} & \multicolumn{2}{c|}{FOQS} & \multicolumn{2}{c|}{Composite} & \multicolumn{2}{c|}{Numerical} \\ \cline{2-9} Algorithm & Error & Time & Error & Time & Error & Time & Error & Time \\ \hline SciPy \texttt{leastsquares} & 14.03 & 36 & 13.43 & 48 & 328.72 & 122 & 351.52 & 1443 \\ DFO-GN & 14.03 & 74 & 13.43 & 184 & 17.04 & 96 & 9.93 & 1144 \\ \hline \end{tabular} \caption{Performance of fitting algorithms for each model. Error is the sum-of-squares of voltage prediction errors, in Volts; time is CPU time in seconds, obtained on an AMD FX(tm)-4350 Quad-Core Processor.} \label{tab:fit_performance} \end{table*} \begin{table*}[t] \centering \begin{tabular}{|c|c c|c|c|c c c c c|} \hline & $\varepsilon_\text{n,p}^\text{max}$ & $\varepsilon_\text{sep}^\text{max}$ & $j_\text{n}^\text{ref}$ & $R_\text{circuit}$ & $q^0_\text{2.5A}$ & $q^0_\text{2A}$ & $q^0_\text{1.5A}$ & $q^0_\text{1A}$ & $q^0_\text{0.5A}$ \\ \hline SciPy + FOQS & 0.55& 0.81& 0.19& 0.08& 1.00& 0.98& 0.95& 0.90& 0.89 \\ DFO-GN + Numerical & 0.74& 0.55& 0.24& 0.07& 1.00& 0.98& 0.95& 0.90& 0.89 \\ \hline \end{tabular} \caption{Parameters obtained from SciPy with the FOQS model, and DFO-GN with the Numerical model. All algorithms given Tables~\ref{tab:dimless_params} and \ref{tab:dim_params} as initial data. A full version of this table is given in \ref{app: fitted}.} \label{tab:fit_params_selection} \end{table*} The discrepancy at early times may be due to effects from charging: we assume that the discharge starts from equilibrium, but this might not be the case following a charge. The final relaxation timescale is much longer than the two timescales in our model -- the diffusion timescale ($\sim 15$ minutes) and the capacitance timescale ($\sim 5$ seconds) -- which suggests that there is an extra physical effect that we have not considered. In particular, non-uniformities in the $y$- and $z$-dimensions may be important for both early time and relaxation behaviour. \section{Conclusions} \label{sec:conc} The asymptotic methods developed in this paper allow us to simulate a discharge of a lead-acid battery with the low complexity and high speed of equivalent-circuit models, while retaining the accuracy and physical insights of electrochemical models. Further, these methods give important physical insight into the structure of the problem that is not obvious from numerical solutions of the full model. In particular, we observe that at low C-rates, the voltage drop from open-circuit potential is mainly due to kinetic effects; ohmic and concentration overpotentials are relatively very small. It is also important to note that our models are tunable: for discharges at low C-rate, we should choose the leading-order quasi-static model, while for high C-rates we can use the composite model, which still provides a significant speed-up compared to the full model. There are many exciting applications for the models resulting from our asymptotic methods. Firstly, these models can be used in Battery Management Systems to replace equivalent-circuit models without introducing the complexity of full electrochemical models. We expect to find significant advantages from doing this, as the parameters will be much more robust to different states of charge than less physically based resistances and capacitances. Secondly, as demonstrated in this paper, the asymptotic models can be used to estimate parameter values, and compare results to experimental data, much more quickly than using the full electrochemical models; we have found that models are often not compared to experimental data due to the prohibitively large cost of the full electrochemical models. Thirdly, since the voltage is given in an explicit form, we can easily perform a parameter sensitivity analysis. Fourthly, by analysing the individual voltage drops from open-circuit potential, we can optimise battery design for specific applications, for example trading off between power and capacity. An important extension for this work is to apply asymptotic methods to more complex models, for example including side reactions occurring during overcharge, or other long-term degradation mechanisms for lead-acid batteries such as corrosion and irreversible sulfation. We expect the ideas developed here to continue to apply in these more complex settings. Finally, the ideas explored in this paper can be applied to other battery chemistries. In particular, our leading-order quasi-static model is very similar to the Single-Particle Model for lithium-ion batteries~\cite{dey2014nonlinear, di2010lithium, moura2012adaptive, santhanagopalan2006online, wang2015adaptive}, and our composite model is very similar to the Single-Particle Model with electrolyte~ \cite{han2015simplification, kemper2013extended, moura2017battery, prada2012simplified, rahimian2013extension, tanim2015temperature}. However, different chemistries and geometries may lead to different parameter sizes, and hence different distinguished limits. \section*{Acknowledgements} \label{sec: ack} This publication is based on work supported by the EPSRC Centre For Doctoral Training in Industrially Focused Mathematical Modelling (EP/L015803/1) in collaboration with BBOXX. JC, CP, DH and CM acknowledge funding from the Faraday Institution (EP/S003053/1). \section*{List of symbols} \noindent\textbf{Variables} \begin{description}[leftmargin=!, labelwidth=1cm, font=\normalfont] \item[$c$] concentration \hfill mol m$^{-3}$ \item[$\varepsilon$] porosity \hfill - \item[$j$] interfacial current density \hfill A m$^{-2}$ \item[$\bm{i}$] current density (3D) \hfill A m$^{-2}$ \item[$i$] current density in $x$-direction \hfill A m$^{-2}$ \item[$\bm{v}$] velocity (3D) \hfill m s$^{-1}$ \item[$v$] velocity in $x$-direction \hfill m s$^{-1}$ \item[$\bm{N}$] ion flux (3D) \hfill mol m$^{-2}$ s$^{-1}$ \item[$p$] pressure \hfill Pa \item[$\Phi$] potential \hfill V \end{description} \noindent\textbf{Subscripts} \begin{description}[leftmargin=!, labelwidth=1cm, font=\normalfont] \item[n] in negative electrode \item[sep] in separator \item[p] in positive electrode \item[$+$] of cations \item[$-$] of anions \item[w] of solvent (water) \item[e] of electrolyte \item[s] of solid (electrodes) \end{description} \noindent\textbf{Superscripts} \begin{description}[leftmargin=!, labelwidth=1cm, font=\normalfont] \item[$0$] initial \item[max] maximum \item[$(0)$] leading-order \item[$(1)$] first-order \item[eff] effective \item[surf] surface \item[$\square$] convective \end{description} \noindent\textbf{Accents} \begin{description}[leftmargin=!, labelwidth=1cm, font=\normalfont] \item[$\di{}$] dimensional \item[$\bar{}$] averaged \end{description} \begin{appendix} \setcounter{table}{0} \section{Parameters} \label{sec:params} The concentration-dependent functions are given in Table~\ref{tab:functions}. \begin{table*}[t] \centering \begin{tabular}{|c|c|c|c|} \hline \multicolumn{2}{|c|}{Dimensional} & \multicolumn{2}{c|}{Dimensionless} \\ \hline $\di{D}\left(\di{c}\right)$ & $(1.75+2.6\times10^{-4}\di{c})\times10^{-9}$ & ${D}(c)$ & $\di{D}(c^\text{max}c)/\di{D}(c^\text{max})$ \\ $\di{\chi}\left(\di{c}\right)$ & $0.49 + 4.1\times10^{-4}\di{c}$ & ${\chi}(c)$ & $2(1-t_+^\text{w})\di{\chi}(c^\text{max}c)/(1-\alpha c)$ (\textdagger) \\ $\di{\kappa}\left(\di{c}\right)$ & \makecell[l]{$\di{c}\exp\left(6.23 - 1.34\times10^{-4}\di{c}\right.$\\\hspace{2cm}$\left. - 1.61\times10^{-8}\di{c}^2\right)\times10^{-4}$} & ${\kappa}(c)$ & $RT\di{\kappa}(c^\text{max}c)/F^2D^\text{max}c^\text{max}$ \\ $\di{c}_\text{w}\left(\di{c}\right)$ & $(1-\di{c}\bar{V}_\text{e})/\bar{V}_\text{w}$ & ${c}_\text{w}(c)$ & $\di{c}_\text{w}(c^\text{max}c)/\di{c}_\text{w}(c^\text{max})$\\ $\di{j}_0\left(\di{c}\right)$ & $j^{\text{ref}} \left( \frac{\di{c} }{c^{\text{ref}} } \right)^{ \left| \frac{s_+}{n_{\text{e}}} \right| + \left| \frac{s_-}{n_{\text{e}}} \right| } \left( \frac{\di{c}_{\text{w}} }{c_{\text{w}}^{\text{ref}} } \right)^{\left| \frac{s_\text{w}}{n_{\text{e}}} \right| }$ & ${j}_0(c)$ & $\mathcal{A}L\di{j}_0(c^\text{max}c)/287\mathcal{C}$ \\ $\di{U}_{\ce{Pb}}\left(\di{c}\right)$ & \makecell[l]{$U_{\ce{Pb}}^\ominus - 0.074\log m- 0.030\log^2m$ \\\hspace{.9cm}$- 0.031\log^3m - 0.012\log^4m$ (\textdaggerdbl)} & ${U}_{\ce{Pb}}(c)$ & $\frac{F}{RT}\left(\di{U}_{\ce{Pb}}(c^\text{max}\di{c}) - U_{\ce{Pb}}^\ominus\right)$ \\ $\di{U}_{\ce{PbO_2}}\left(\di{c}\right)$ & \makecell[l]{$U_{\ce{PbO_2}}^\ominus + 0.074\log m+ 0.033\log^2m$ \\\hspace{.9cm}$+ 0.043\log^3m + 0.022\log^4m$ (\textdaggerdbl)} & ${U}_{\ce{PbO_2}}(c)$ & $\frac{F}{RT}\left(\di{U}_{\ce{PbO_2}}(c^\text{max}\di{c}) - U_{\ce{PbO_2}}^\ominus\right)$ \\ \hline \end{tabular} \caption{Functions of concentration, ${c}$. References available in part I, and relevant parameters in Table~\ref{tab:dim_params}. (\textdagger) ${\alpha = -(2\bar{V}_\text{w} - \bar{V}_\text{e})c^\text{max}}$. (\textdaggerdbl) ${m(\di{c}) = \di{c}\bar{V}_\text{w}/[(1-\di{c}\bar{V}_\text{e})M_\text{w}]}$.} \label{tab:functions} \end{table*} \renewcommand{\arraystretch}{1} \begin{table}[t] \centering \begin{tabular}{|c|c c c|c|} \hline \multirow{2}{*}{Parameter} & \multicolumn{3}{c|}{Value} & \multirow{2}{*}{Units} \\ \cline{2-4} & n & sep & p & \\ \hline $L$ & \multicolumn{3}{c|}{$3.65\times 10^{-3}$} & m \\ $A_\text{cs}$ & \multicolumn{3}{c|}{$7.4\times 10^{-3}$} & m$^2$ \\ $s_{+}$ & $-1$ & - & $-3$ & - \\ $s_{-}$ & $1$ & - & $-1$ & - \\ $s_\text{w}$ & $0$ & - & $2$ & - \\ $n_\text{e}$ & $2$ & - & $2$ & - \\ $\bar{V}_\text{w}$ & \multicolumn{3}{c|}{$1.75\times 10^{-5}$} & m$^3$ mol$^{-1}$ \\ $\bar{V}_\text{e}$ & \multicolumn{3}{c|}{$4.50\times 10^{-5}$} & m$^3$ mol$^{-1}$ \\ $M_\text{w}$ & \multicolumn{3}{c|}{$1.8\times 10^{-2}$} & kg mol$^{-1}$ \\ $F$ & \multicolumn{3}{c|}{$96485$} & C mol$^{-1}$ \\ $R$ & \multicolumn{3}{c|}{$8.314$} & J mol$^{-1}$ K$^{-1}$ \\ $T$ & \multicolumn{3}{c|}{$298.15$} & K \\ $t^\text{w}_+$ & \multicolumn{3}{c|}{$0.72$} & - \\ $j^\text{ref}$ & $8\times10^{-2}$ & - & $6\times10^{-3}$ & A m$^{-2}$ \\ $c^\text{max}$ & \multicolumn{3}{c|}{$5.6\times10^{3}$} & mol m$^{-3}$ \\ $\mathcal{A}$ & $2.6\times10^6$ & - & $2.05\times10^7$ & m$^{-1}$ \\ $Q$ & \multicolumn{3}{c|}{$17$} & Ah \\ $U^\ominus$ & -0.295 & - & 1.628 & V \\ \hline \end{tabular} \caption{Relevant dimensional parameters from the literature, for Table~\ref{tab:functions}. Parameters with several values indicate different values in negative electrode (n), separator (sep) and positive electrode (p). References are available in part I.} \label{tab:dim_params} \end{table} \section{Concentration in the first-order quasi-static solution} \label{app:c1} \setcounter{table}{0} \begin{subequations}\label{eq:c1} \begin{equation} c\pow{1} = k(t)+\begin{cases} \tilde{c}\pow{1}_\text{n}, &\quad 0<x<\ell_\text{n}, \\%[2mm] \tilde{c}\pow{1}_\text{sep}, &\quad \ell_\text{n}<x<1-\ell_\text{p}, \\%[2mm] \tilde{c}\pow{1}_\text{p}, &\quad 1-\ell_\text{p}<x<1. \end{cases} \end{equation} where $k$ is an arbitrary function of $t$ and \begin{align} \tilde{c}\pow{1}_\text{n} =& \frac{x^2-\ell_\text{n}^2}{2D^{\text{eff},(0)}_\text{n}}\left(\od{\left(\varepsilon_\text{n}\pow{0}c\pow{0}\right)}{t} - \frac{s_\text{n}\mathrm{i}_\text{cell}}{\ell_\text{n}}\right), \\ \tilde{c}\pow{1}_\text{sep} =& \frac{(x-\ell_\text{n})^2}{2D^{\text{eff},(0)}_\text{sep}}\varepsilon_\text{sep}^\text{max}\od{c\pow{0}}{t} \nonumber \\ &+ \left(\od{\left(\varepsilon_\text{n}\pow{0}c\pow{0}\right)}{t} - \frac{s_\text{n}\mathrm{i}_\text{cell}}{\ell_\text{n}}\right)\frac{\ell_\text{n}(x-\ell_\text{n})}{D^{\text{eff},(0)}_\text{n}} \\ \tilde{c}\pow{1}_\text{p} =& \frac{(x-1)^2-\ell_\text{p}^2}{2D^{\text{eff},(0)}_\text{p}}\left(\od{\left(\varepsilon_\text{p}\pow{0}c\pow{0}\right)}{t} + \frac{s_\text{p}\mathrm{i}_\text{cell}}{\ell_\text{p}}\right) \nonumber \\%[2mm] &+\left(\frac{\varepsilon_\text{sep}^\text{max}\ell_\text{sep}}{2D^{\text{eff},(0)}_\text{sep}}\od{c\pow{0}}{t}\right. \nonumber \\ &+\left.\frac{\ell_\text{n}}{D^{\text{eff},(0)}_\text{n}}\od{\left(\varepsilon_\text{n}\pow{0}c\pow{0}\right)}{t} - \frac{s_\text{n}\mathrm{i}_\text{cell}}{D^{\text{eff},(0)}_\text{n}}\right)\ell_\text{sep} \end{align} \end{subequations} We note that the piece-wise quadratic form of \eqref{eq:c1} justifies the assumption of Knauff~\cite{knauff2013kalman}. To find $k(t)$, we expand \eqref{eq:dcdt} to second-order in $\mathcal{C}_\text{d}$: \begin{multline}\label{eq:dcdt_ODa2} \pd{}{t}\left(\varepsilon\pow{0}c\pow{1} + \varepsilon\pow{1}c\pow{0}\right) = \pd{}{x}\left( D^\text{eff,(1)}\pd{c\pow{1}}{x}\right)\\ + D^{\text{eff},(0)}\pds{c\pow{2}}{x}+ sj\pow{1}. \end{multline} Integrating \eqref{eq:dcdt_ODa2} from $x=0$ to $x=1$ and using the fact that ${\partial c\pow{1}/\partial x = \partial c\pow{2}/\partial x = 0}$ at $x=0,1$, together with \eqref{eq:depsdt_ODa} and \eqref{eq:j_BC_ODa}, we find that \begin{equation} \pd{}{t}\left(\myint{0}{1}{\varepsilon\pow{0}c\pow{1}}{x}\right) = 0, \end{equation} and so, by \eqref{eq:ICs_ODa}, $\myint{0}{1}{\varepsilon\pow{0}c\pow{1}}{x} \equiv 0$. Hence \begin{equation}\label{eq:k} k = -\frac{\myint{0}{\ell_\text{n}}{\varepsilon\pow{0}_\text{n}\tilde{c}\pow{1}_\text{n}}{x} + \myint{\ell_\text{n}}{1-\ell_\text{p}}{\varepsilon\pow{0}_\text{sep}\tilde{c}\pow{1}_\text{sep}}{x} + \myint{1-\ell_\text{p}}{1}{\varepsilon\pow{0}_\text{p}\tilde{c}\pow{1}_\text{p}}{x}} {\ell_\text{n}\varepsilon_\text{n}\pow{0} + \ell_\text{sep}\varepsilon_\text{sep}^\text{max} + \ell_\text{p}\varepsilon_\text{p}\pow{0}} \end{equation} \section{Transient solution} \label{app:transient} \setcounter{table}{0} Denoting the time of the jump by $t^*$, we rescale time with $\tau = (t-t^*)/\mathcal{C}_\text{d}$, and define $C(x, \tau) = c(x, t)$, $E(x, \tau) = \varepsilon(x, \tau)$, $J(x, \tau) = j(x, t)$, $P(x, \tau) = \Phi(x, t)$ and $\mathcal{V}(\tau) = V(t)$. Then \eqref{eq:summary_simplified} becomes \begin{subequations}\label{eq:summary_transient} \begin{align} \pd{}{\tau}(EC) &= \pd{}{x}\left(D^\text{eff}\pd{C}{x}\right) + \mathcal{C}_\text{d}\,sJ, \label{eq:dcdt_transient}\\ \pd{E}{\tau} &= -\mathcal{C}_\text{d}\,\beta^\text{surf}J, \label{eq:depsdt_transient}\\ \mathcal{C}_\text{d}\,{J} &= \pd{}{x}\left[\kappa^\text{eff}\left(\chi\pd{\ln(C)}{x} - \pd{P}{x}\right)\right], \label{eq:i_transient}\\ J_\text{n} &= 2{J}_{0,\text{n}}\sinh\left(-P-U_{\ce{Pb}}(C)\right), \label{eq:jn_transient}\\ J_\text{p} &= 2{J}_{0,\text{p}}\sinh\left(\mathcal{V}-P-U_{\ce{PbO_2}}(C)\right), \label{eq:jp_transient} \end{align} \end{subequations} We now expand the variables in powers of $\mathcal{C}_\text{d}$, as done in \eqref{eq:Da_expansion}. Then \eqref{eq:summary_transient} becomes, to leading order in $\mathcal{C}_\text{d}$, \begin{subequations}\label{eq:transient_O1} \begin{align} \pd{}{\tau}&\left(E\pow{0}C\pow{0}\right) = D^{\text{eff},(0)}\pds{C\pow{0}}{x}, \label{eq:transient_O1_c}\\ \pd{E\pow{0}}{\tau} &= 0, \label{eq:transient_O1_eps}\\ 0 &= \pd{}{x}\left[\kappa^{\text{eff},(0)}\left(\chi\pow{0}\pd{\ln\left(c\pow{0}\right)}{x} - \pd{P\pow{0}}{x}\right)\right], \label{eq:transient_O1_Phi}\\ J\pow{0}_\text{n} &= 2{J}_{0,\text{n}}\pow{0}\sinh\left(-P\pow{0}-U_{\ce{Pb}}\left(c\pow{0}\right)\right), \label{eq:transient_O1_jn} \\ J\pow{0}_\text{p} &= 2{J}_{0,\text{p}}\pow{0}\sinh\left(\mathcal{V}\pow{0}-P\pow{0}-U_{\ce{PbO_2}}\left(c\pow{0}\right)\right), \label{eq:transient_O1_jp} \end{align} \end{subequations} and to first order in $\mathcal{C}_\text{d}$, \begin{subequations}\label{eq:transient_ODa} \begin{align} &\pd{}{\tau}\left(E\pow{0}C\pow{1}\right) = D^{\text{eff},(0)}\pds{C\pow{1}}{x} + {sJ\pow{0}} - \pd{}{\tau}\left(C\pow{0}E\pow{1}\right), \label{eq:transient_ODa_c}\\ &\pd{E\pow{1}}{\tau} = -\beta^\text{surf}J\pow{0}, \\ &0 = \pd{}{x}\left[\kappa^{\text{eff},(0)}\left(\frac{\chi\pow{0}}{C\pow{0}}\pd{C\pow{1}}{x} - \pd{P\pow{1}}{x}\right)\right], \\ &J\pow{1}_\text{n} = 2\left({J}_{0,\text{n}}\pow{1}\sinh\left[{H}_\text{n}\pow{0}\right] + {J}_{0,\text{n}}\pow{0} H\pow{1}_\text{n}\cosh\left[H\pow{0}_\text{n}\right]\right) \\ &J\pow{1}_\text{p} = 2\left({J}_{0,\text{p}}\pow{1}\sinh\left[{H}_\text{p}\pow{0}\right] + {J}_{0,\text{p}}\pow{0} H\pow{1}_\text{p}\cosh\left[H\pow{0}_\text{p}\right]\right) \end{align} where \begin{align} &H\pow{0}_\text{n} = -P\pow{0}-U_{\ce{Pb}}\left(c\pow{0}\right), \\ &H\pow{0}_\text{p} = \mathcal{V}\pow{0}-P\pow{0}-U_{\ce{PbO_2}}\left(c\pow{0}\right), \\ &H\pow{1}_\text{n} = -\left({P}\pow{1} + C\pow{1}{U}'_{\ce{Pb}}\left(c\pow{0}\right)\right), \\ &H\pow{1}_\text{p} = {\mathcal{V}\pow{1} - P\pow{1} - C\pow{1}{U}'_{\ce{PbO_2}}\left(c\pow{0}\right)}. \end{align} \end{subequations} The boundary conditions follow from (\ref{eq:summary_O1}f,g) and (\ref{eq:summary_ODa}e,f): \begin{subequations}\label{eq:transient_BCs} \begin{align} &\pd{C\pow{0}}{x} = \pd{P\pow{0}}{x} = \pd{C\pow{1}}{x} = \pd{P\pow{1}}{x} = 0 \quad \text{ at } x = 0, 1, \label{eq:transient_BCs_flux}\\ &\myint{0}{\ell_\text{n}}{J\pow{0}_\text{n}}{x} = -\myint{1-\ell_\text{p}}{1}{J\pow{0}_\text{p}}{x} = \mathrm{i}_\text{cell}, \label{eq:transient_BCs_jO1}\\ &\myint{0}{\ell_\text{n}}{J\pow{1}_\text{n}}{x} = \myint{1-\ell_\text{p}}{1}{J\pow{1}_\text{p}}{x} = 0,\label{eq:transient_BCs_jODa} \end{align} and the initial conditions are given by the states at the jump time $t^*$. \end{subequations} Equations \eqref{eq:transient_O1} decouple: we first solve \eqref{eq:transient_O1_eps} for $E\pow{0}$, then \eqref{eq:transient_O1_c} with \eqref{eq:transient_BCs_flux} for $C\pow{0}$, then \eqref{eq:transient_O1_Phi} for $P\pow{0}$ up to an additive constant $A$, and finally use \eqref{eq:transient_O1_jn} and \eqref{eq:transient_BCs_jO1} to find $A$ and \eqref{eq:transient_O1_jp} and \eqref{eq:transient_BCs_jODa} to find $\mathcal{V}\pow{0}$. Similarly, having found the leading-order solution, equations \eqref{eq:transient_ODa} decouple and can be solved in the same order as \eqref{eq:transient_O1}. Hence we solve \eqref{eq:transient_O1} and \eqref{eq:transient_ODa} more easily than the full system \eqref{eq:summary_transient}. However, we note that \eqref{eq:transient_O1}, \eqref{eq:transient_ODa} and the boundary conditions \eqref{eq:transient_BCs} imply that $\myint{0}{1}{C\pow{0}}{x}$ is constant, but $\rvert C\pow{1}\rvert$ grows with time. Hence the asymptotic expansion breaks down for long times since, when $\tau \sim \mathcal{O}(1/\mathcal{C}_\text{d})$, $\rvert\text{$\mathcal{C}_\text{d}$}\,C\pow{1}\rvert \sim \rvert C\pow{0}\rvert$. \section{Parameters from fit to data} \label{app: fitted} \setcounter{table}{0} \begin{table*}[ht] \centering \begin{tabular}{|c|c c|c|c|c c c c c|} \hline & $\varepsilon_{\text{n},\text{p}}^\text{max}$ & $\varepsilon_\text{sep}^\text{max}$ & $j_\text{n}^\text{ref}$ & $R_\text{circuit}$ & $q^0_\text{2.5A}$ & $q^0_\text{2A}$ & $q^0_\text{1.5A}$ & $q^0_\text{1A}$ & $q^0_\text{0.5A}$ \\ \hline SciPy + LOQS & 0.55& 0.81& 0.19& 0.08& 1.00& 0.98& 0.95& 0.90& 0.89 \\ SciPy + FOQS & 0.55& 0.81& 0.19& 0.08& 1.00& 0.98& 0.95& 0.90& 0.89 \\ SciPy + Composite & 0.60& 0.90& 0.07& 0.13& 1.00& 1.00& 1.00& 0.98& 1.00 \\ SciPy + Numerical & 0.60& 0.90& 0.08& 0.15& 1.00& 1.00& 1.00& 1.00& 1.00 \\ \hline DFO-GN + LOQS & 0.75& 0.53& 0.19& 0.08& 1.00& 0.98& 0.95& 0.90& 0.89 \\ DFO-GN + FOQS & 0.51& 0.88& 0.32& 0.07& 1.00& 0.98& 0.95& 0.90& 0.89 \\ DFO-GN + Composite & 0.60& 0.78& 0.12& 0.06& 1.00& 0.98& 0.96& 0.90& 0.89 \\ DFO-GN + Numerical & 0.74& 0.55& 0.24& 0.07& 1.00& 0.98& 0.95& 0.90& 0.89 \\ \hline \end{tabular} \caption{Parameters obtained from optimisation algorithms/model combinations. All algorithms were given the values in Tables~\ref{tab:dimless_params} and \ref{tab:dim_params} as initial data for the parameters.} \label{tab:fit_params} \end{table*} The full list of parameters obtained from each combination of fitting algorithm (SciPy or DFOGN) and model (LOQS, FOQS, Composite or Numerical) is given in Table~\ref{tab:fit_params}. \end{appendix} \bibliographystyle{unsrt}
\section*{Appendix} \vspace{-0.1in} \bibliographystyle{IEEEtran} \section*{Proofs for Lemmas and Theorems} \noindent \textbf{Proof for Theorem~\ref{thm:idle}}: We first recall the following lemma from~\cite{zhang2017distributed}. \begin{lemma}\label{lem:idle} If an RTWN system is schedulable under a given static schedule, i.e., each packet completes all its transmissions before the deadline, for any node $V_j \neq V_c$ and task $\tau_i$ passing through $V_j$, there exists at least one idle slot at $V_j$ among any three consecutive transmissions of $\tau_i$ passing $V_j$. \end{lemma} \vspace{-0.1in} Since in our system model, sensors and actuators are connected via the controller node, every task follows a routing path with at least two hops corresponding to two transmissions. Suppose $\chi_{0,m}(h)$ {\color{brown} occurs at $t_1$} and is the transmission from which $V_j$ receives the disturbance information (If $V_j$ is the sensor, it detects the disturbance at $r_{0,m}$). There exists at least one transmission between $\chi_{0,m}(h)$ and $\chi_{0,m+1}(h)$ (the first transmission that $V_j$ is involved in the dynamic schedule, {\color{brown} occurring at $t_2$}). Then, according to Lemma~\ref{lem:idle}, $V_j$ has at least one idle slot between $\chi_{0,m}(h)$ and $\chi_{0,m+1}(h)$ {\color{brown} ({\em i.e.}, between $t_1$ and $t_2$).} Thus, the theorem holds. \hfill\QED \vspace*{1ex} \noindent \textbf{Proof for Lemma \ref{lem:np}}: We prove the lemma by reducing the set cover problem~\cite{karp1972reducibility} to a special case of the packet dropping problem. The set cover problem is defined as follows: Given a set of $n$ elements $X = \{x_1, x_2, \dots, x_n\}$ and a collection $C = \{C_1, C_2, \dots, C_m\}$ of $m$ nonempty subsets of $X$ where $\cup_{i=1}^m C_i = X$. The set cover problem is to identify a sub-collection $C_s \subseteq C$ whose union equals $X$ such that $|C_s|$ is minimized. Given a set cover problem, we can construct a special case of the packet dropping problem in polynomial time as follows: (1) Suppose that after utilizing the original transmission slots of $\tau_0$ and the idle slots in $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ to accommodate rhythmic transmissions in $\Psi(\ensuremath{t_{ep}})$, there still remain $n$ packets of $\tau_0$, denoted as $\{x_1, x_2, \dots, x_n\}$, to be scheduled. Each packet $x_i$ only needs one slot to transmit. (2) In the static schedule $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$, there are $m$ periodic packets, denoted as $\{C_1, C_2, \dots, C_m\}$. For each packet $C_j$, if there exists a transmission of $C_j$ falls into the time window of rhythmic packet $x_i$ ({\em i.e.}, $[r_{x_i}, d_{x_i})$), we have $x_i \in C_j$. Thus, one can determine the minimum number of dropped packet set $\rho[\ensuremath{t_{n\rightarrow r}}, t_{ep})$ that can accommodate all the rhythmic packets if and only if the smallest sub-collection $C_s$ whose union equals $X$ can be identified. The Lemma is proved. \hfill\QED \section*{ILP Solution} We introduce the following notation: \noindent $E_j = [\epsilon_j^1, \epsilon_j^2, \dots, \epsilon_j^n] (1 \leq j \leq m)$ denotes the transmission vector of periodic packet $\chi_j$ where each $\epsilon_j^i$ is the number of transmissions from $\chi_j$ in the static schedule that can be replaced by transmissions of rhythmic packet $\chi_{0,i}$ in the dynamic schedule. Specifically, transmission $\chi_{j}(h)$ of $\chi_j$ {\color{brown} can be replaced by $\chi_{0,i}$} if $\ensuremath{S}[t] = (j,h)$ and $r_{0,i} \leq t < d_{0,i}$. \noindent $w_j$ denotes the dropping decision of periodic packet $\chi_j$. $w_j = 1$ if $\chi_j$ is dropped. Otherwise, $w_j = 0$. \noindent $A = [a_1, a_2, \dots, a_n]$ denotes the available slot vector where each $a_i$ represents the total number of idle slots and rhythmic transmission slots in the static schedule that can be used by rhythmic packet $\chi_{0,i}$. To drop the minimum number of periodic packets to guarantee the deadlines of all rhythmic packets, we have the following objective function in the ILP formulation: \begin{equation}\label{eq:objective} \min \sum_{\chi_j \in \Phi} w_j \end{equation} Since rhythmic transmissions are at the highest priority, the deadline of each rhythmic packet $\chi_{0,i}$ can be guaranteed only if at least $H_{0,i}$ time slots are reserved for $\chi_{0,i}$ in the dynamic schedule. Also, both idle slots and rhythmic transmission slots in the static schedule can be used to satisfy $\chi_{0,i}$'s transmission demand. Therefore, objective function (\ref{eq:objective}) is subject to the following constraint. \begin{equation}\label{eq:constraint} \forall \chi_{0,i} \in \Psi, \hspace*{2em} \sum_{\chi_j \in \Phi} \epsilon_j^i \cdot w_j \geq H_{0,i} - a_i \end{equation} \vspace{-0.1in} \section*{Overview of the RTWN Testbed} \begin{figure}[t] \centering \includegraphics[width=0.8\columnwidth]{Figures/realtestbed.jpg} \caption{\small Overview of the testbed for {{FD-PaS}\xspace{}} functional validation} \label{fig:realtestbed} \vspace{-0.17in} \end{figure} \begin{figure}[t] \centering \resizebox{0.95\columnwidth}{!}{\input{Figures/latency.tikz}} \caption{Experiment setup for the measurement of latency} \label{fig:latencysetup} \vspace{-0.1in} \end{figure} Our testbed is based on OpenWSN stack~\cite{watteyne2012openwsn}. OpenWSN is an open source implementation of the 6TiSCH protocol~\cite{RFC7554}. OpenWSN enables IPv6 network over the TSCH mode of IEEE 802.15.4e MAC and PHY layers. A typical OpenWSN network consists of an OpenWSN Root and several OpenWSN devices, as well as an optional OpenLBR (Open Low-Power Border Router) to connect to IPv6 Internet. It serves as a perfect platform to experiment our proposed {{FD-PaS}\xspace{}} framework on both the data link and application layers of the stack. As shown in Fig.\ref{fig:realtestbed}, our testbed consists of 7 wireless devices (TI CC2538 SoC + SmartRF evaluation board). One of them is configured as the root node (controller node) and the rest are device nodes to form a multi-hop RTWN. A CC2531 sniffer is used to capture the packet. A 8-Channel Logic Analyzer is used to record device activities by physical pins, in order to accurately measure the timing information among different devices. Fig.~\ref{fig:latencysetup} shows the experiment setup for the measurement of APP layer performance in Section~\ref{sec:testbed}. \section*{Related Work} Network resource management in RTWNs in the presence of unexpected disturbances has drawn a lot of attention in recent years. Traditional static packet scheduling approaches ({\em e.g.}, \cite{Han_RTAS11, Leng_RTSS14, Saifullah_RTSS10}), where decisions are made offline or only get updated infrequently can support deterministic real-time communication, but either cannot properly handle unexpected disturbances or must make rather pessimistic assumptions. Many centralized dynamic scheduling approaches for handling internal disturbances have been proposed ({\em e.g.}, \cite{Crenshaw_TECS07, Shen_WN13, Sha_RTSS13, ferrari2012low}). Studies on addressing external disturbances are relatively few ({\em e.g.}, \cite{Li2015Incorporating, Chipara_ECRTS11}) and mostly rely on centralized decision making. In \cite{hong2015online}, a centralized dynamic approach, named OLS, to handle disturbances in RTWNs is proposed. OLS is built on a dynamic programming based approach which can be rather time consuming even for relatively small RTWNs. Moreover, OLS may drop more periodic packets than necessary due to the limited payload size of the packet in RTWNs and thus further degrade the system performance. To overcome the drawbacks of OLS, {D$^2$-PaS}\xspace{} in \cite{zhang2017distributed} proposes to offload the computation of the dynamic schedules to individual nodes locally by leveraging their local computing capabilities, that is, letting each node construct its own schedule so as to achieve better performance than OLS in terms of fewer dropped packets and lower time overhead. However, as observed from the motivating example presented in Section~\ref{ssec:motivation}, centralized approaches, including {{D$^2$-PaS}\xspace{}}, suffer from long DRT especially in large RTWNs. Most MAC layer designs for supporting packet prioritization are based on star topology. For example, the wireless arbitration (WirArb) method~\cite{zheng2016wirarb} is designed to use different frequencies to indicate different priorities. It only supports star topology where the gateway keeps sensing the arbitration signals and determines which user has a higher priority to access the channel. \cite{shao2014multi} studies a similar problem in the context of vehicular Ad Hoc networks. The proposed multi-priority MAC protocol has seven channels, among which one is the public control channel (CCH) for safety action messages and the others are service channels for non-safety applications. The protocol transmits packets of different priorities with optimal transmission probabilities in a dynamic manner. The PriorityMAC~\cite{prioritymac} proposes to add two very short sub-slots before each time slot to indicate the priority. Four priority levels are defined but only three levels of over-the-air preemption can be achieved. The last priority level is only used for buffer reordering. In PriorityMAC, a higher priority packet indicates the priority in the sub-slots to deter the transmissions of lower priority packets. PriorityMAC is also based on star topology so each device must be directly connected to the coordinator. \section{Introduction}\label{sec:intro} \eat{ 1. Why we study RTWN: discuss their applications, etc. 2. The challenges of studying RTWN including (i) the explosive growth of IoT applications especially in terms of their scale and complexity, and (ii) the fact that almost all RTWNs must deal with unexpected disturbances. 3. What have been done on tackling these challenges and what are their downsides. \begin{itemize} \item Static approach cannot handle unexpected disturbances or must make rather pessimistic assumptions. \item Centralized approach (the state-of-the-art OLS) has very high computation overhead and relatively low performance. \item Distributed approach ({D$^2$-PaS}\xspace{}) relies on at least one single point in the network to make on-line decisions and therefore has limited scalability. \end{itemize} 4. A big picture of what problem we studied in this work. 5. The contributions and organization of this paper. } Real-time wireless networks (RTWNs) are fundamental to many Industrial Internet-of-Things (IIoT) applications in a broad range of fields such as military, civil infrastructure and industrial automation~\cite{Hei_INFOCOM13, Gatsis_ACC13, Karbhari_Elsevier09}. These applications have stringent { timing and reliability requirements} to ensure timely collection of environmental data and { reliable} delivery of control decisions. The Quality of Service (QoS) offered by a RTWN is thus often measured by how well it satisfies the end-to-end (from sensors via controllers to actuators) deadlines of the real-time tasks executed in the RTWN. Packet scheduling in RTWNs plays a critical role in achieving the desired QoS. Though packet scheduling in RTWNs has been studied for a long time, the explosive growth of IIoT applications especially in terms of their scale and complexity has dramatically increased the level of difficulty in tackling this inherently challenging undertaking. The fact that most RTWNs must deal with unexpected disturbances { and the { lossy nature of} wireless links in industrial environments further aggravates the problem.} { Unexpected disturbances { in RTWNs in general} can be classified into {\em internal} disturbances within the network infrastructure ({\em e.g.}, link failure due to multi-user interference or weather related changes in channel signal to noise ratio (SNR)) and {\em external} disturbances from the environment being monitored and controlled ({\em e.g.}, detection of an emergency, sudden pressure or temperature changes). When an external disturbance is detected by a certain sensor node, the workload associated to this sensor node needs to be changed for a certain time duration to more frequently monitor the environment. Many centralized dynamic scheduling approaches have been proposed in the literature, but most of them are designed for handling changes in network resource supply ({\em e.g.}, \cite{Crenshaw_TECS07, Shen_WN13, ferrari2012low}). Studies on addressing external disturbances in RTWNs, the focus of this paper, are relatively few. {Most of those work rely on centralized decision making and assume reliable network environments. This motivates us to explore a fully distributed framework for handling external disturbances in lossy RTWNs.} In the rest of the paper, we simply refer to external disturbance as disturbance. The challenge of handling disturbances in RTWNs comes from the unpredictability of disturbance occurrence at run time. Specifically, it is generally unknown when/which disturbance { will occur} and what is the network status at that point ({\em e.g.}, how many packets have been delivered to their destinations). Since it is computationally infeasible to enumerate all possibilities before the network starts, on-line dynamic scheduling approaches is required to react { fast} to unexpected workload changes incurred by disturbances. } \eat{ Since it is computationally infeasible to enumerate all possibilities before network starts, people resort to using on-line dynamic scheduling approaches to react to unexpected workload changes incurred by disturbances ({\em e.g.},~\cite{Chipara_RTSS07, Li2015Incorporating, Sha_RTSS13, Chipara_ECRTS11, hong2015online, zimmerling2017adaptive}). The most recent dynamic method appears in \cite{zhang2017distributed} in which authors propose a distributed dynamic packet scheduling framework, referred to as {D$^2$-PaS}\xspace{}, to handle disturbances in RTWNs. The main idea of {D$^2$-PaS}\xspace{} is to rely on a centralized control point in the network, {\em e.g.} the gateway, to generate a dynamic schedule when a disturbance occurs and propagate a minimum amount of necessary information to the network. After all nodes receive such information, they are able to generate a consistent dynamic schedule in a distributed manner to start handling the disturbance. Though {D$^2$-PaS}\xspace{} can achieve good performance in terms of minimizing the number of dropped packets to guarantee real-time deadlines of critical packets when disturbance occurs, it suffers from limited scalability since a centralized control point is required. It becomes a significant limitation as RTWNs start to be deployed over large geographic area ({\em e.g.}, thousands of devices over an oil field). Moreover, {D$^2$-PaS}\xspace{} may need an extremely long response time to handle a disturbance especially for large-scale networks since the system cannot start to handle the disturbance until the dynamic schedule is disseminated to the whole network via broadcast packets. All these drawbacks lead to degraded system performance when disturbances occur. } { The existence of lossy wireless links in the industrial environments raises another challenge in handling disturbances in RTWNs. Specifically, the uncertainty of lossy links in the network introduces packet losses with a certain non-zero possibility. Packet loss in a sensing process can significantly degrade the data freshness, and packet loss in a feedback control may lead to system instability and cause safety concerns. Further, if a packet that delivers disturbance-related information is lost, it may cause catastrophe to the system. Thus, most industrial RTWNs require a desired end-to-end Packet Delivery Ratio (PDR), {\em e.g.} { $99\%$}, for all packets running in the system.} In this work, we introduce a fully distributed packet scheduling framework, referred to as {FD-PaS}\xspace{}, to handle disturbances in lossy RTWNs.\footnote{An earlier version of the paper appeared in \cite{fdpas}.} {FD-PaS}\xspace{} makes on-line decisions locally without {\em any} centralized control point when disturbances occur. This is achieved by sending the disturbance information only to a subset of all nodes via the routing paths of the tasks running in the network. In such a manner, a broadcast task is no longer needed in {FD-PaS}\xspace{} for notifying all nodes about the disturbance information, which significantly reduces the response time to handle the disturbance. To ensure this partial disturbance propagation scheme works properly, we need to overcome several challenges. For example, to avoid transmission collision among different nodes with inconsistent schedules, we propose a multi-priority wireless packet preemption mechanism called {MP-MAC{}} in the data link layer to ensure that high-priority packets can always be delivered by preempting the transmissions of low-priority packets. { Further, to minimize the timing and reliability degradation, we formulate a transmission dropping problem to determine a temporary dynamic schedule for individual nodes to handle the disturbance.} We prove that the transmission dropping problem is NP-hard, and introduce an efficient heuristic to be executed by individual nodes locally. Both the MP-MAC{} design and the dynamic schedule construction method (they jointly comprise the FD-PaS framework) are implemented on our RTWN testbed. Our extensive performance evaluation validates the correctness of the FD-PaS design and demonstrates its effectiveness in providing fast response for handling disturbances. { } The remainder of this paper is organized as follows. The related work is dicussed in Section~\ref{sec:related} and Section~\ref{sec:model} describes the system model. Section~\ref{sec:framework} gives an overview of the {FD-PaS}\xspace{} framework. We discuss how to propagate disturbances and avoid transmission collisions in Section~\ref{sec:propagating} and~\ref{sec:collisions}, respectively. { Section~\ref{sec:dropping} formulates the dynamic transmission dropping problem and presents the method to determine the time duration for handling disturbance. Section~\ref{sec:dynamic} discusses the dynamic schedule generation in both reliable and lossy RTWNs.} Performance evaluation are summarized in Section~\ref{sec:simulation}. We conclude the paper and discuss future work in Section~\ref{sec:conclusions}. \section{System Model} \label{sec:model} We adopt the system architecture of a typical RTWN, in which multiple sensors and actuators are wirelessly connected to a controller node directly or through relay nodes. (Note that the controller node is for initial network setup and performing control computations. {FD-PaS}\xspace{} does not need it for making any on-line decision and updating schedules.) {\color{brown} We refer to non-controller nodes as device nodes.} We assume that {\color{brown} all device nodes} have routing capability and are equipped with a single omni-directional antenna to operate on a single channel in half-duplex mode. The network is modeled as a directed graph $G = (V, E)$, where the node set $V = \{\{V_0, V_1, \dots\}, V_c \}$ and $V_c$ represents the controller node. { A direct link $e = (V_i, V_j)\in E$ represents a wireless link from node $V_i$ to $V_j$ with a Packet Delivery Ratio (PDR) $\lambda^L_e$, which represents the probabilistic transmission success rate on link $e$\footnote{Link PDR $\lambda^L_e$ is usually measured during the site survey and is stable during normal network operations. In case the value of $\lambda^L_e$ changes significantly, the new value is assumed to be broadcast to all the nodes in the network.}. $V_c$ connects to all the nodes via some routes and is responsible for executing relevant control algorithms. $V_c$ also contains a network manager which conducts network configuration and resource allocation. } We use the concept of task to describe packet transmission from sensor nodes to actuator nodes. Specifically, the system runs a fixed set of unicast tasks $\mbox{$\mathcal{T}$} = \{\tau_0, \tau_1, \dots, \tau_n\}$. Each task $\tau_i \; (0 \leq i \leq n)$ follows a designated single routing path with $H_i$ hops and we use $\overrightarrow{L}_i =[ L_i[0],L_i[1],\dots, L_i[H_i-1]]$ to represent the routing path of $\tau_i$. It periodically generates a packet which originates at a sensor node, passes through the controller node (not necessary for {FD-PaS}\xspace{} but to carry out control computations) and delivers a control message to an actuator. Fig.~\ref{fig:structure} depicts an example RTWN with three tasks running on 7 nodes and task parameters are given in Table~\ref{tab:example}. \begin{figure}[tb] \centering \resizebox{1\columnwidth}{!}{\input{Figures/example.tikz}} \caption{\small An example RTWN with three unicast tasks.} \label{fig:structure} \vspace{-0.1in} \end{figure} \begin{table}[tb] \renewcommand{\arraystretch}{1.3} \centering \caption{Task parameters for the example RTWN.}\label{tab:example} \vspace{-1ex} \begin{tabular}{|c|c|c|} \hline Task & Routing Path & $P_i$ ($ = D_i$) \\ \hline $\tau_0$ & $V_2 \rightarrow V_c \rightarrow V_5$ & 9 \\ $\tau_1$ & $V_0 \!\rightarrow\! V_1\! \rightarrow \! V_c \! \rightarrow\! V_5$ & 9 \\ $\tau_2$ & $V_2 \!\rightarrow\! V_c\! \rightarrow \! V_3 \! \rightarrow\! V_4$ & 10\\ \hline \end{tabular} \end{table} \begin{figure}[tb] \centering {\includegraphics[width=\columnwidth]{Figures/Rhythmic_model.pdf}} \caption \small Timing parameters of the rhythmic task $\tau_0$ in the system rhythmic mode. Top and bottom subfigures denote the nominal and actual release times and deadlines of $\tau_0$ respectively.} \label{fig:rhythmic} \vspace{-0.05in} \end{figure} When external disturbances ({\em e.g.}, sudden change in temperature or pressure) occur, many IIoT applications would require more frequent sampling and control actions, which in turn increase network resource demands. To capture such abrupt increase in network resource demands, we adopt the rhythmic task model~\cite{Kim_ICCPS12} which has been shown to be effective for handling disturbances in event-triggered control systems~\cite{hong2015online}. (Note that our {FD-PaS}\xspace{} framework is not limited to the rhythmic task model and is applicable to any task model that provides workload changing patterns for handling disturbances.) In the rhythmic task model, each unicast task $\tau_i$ has two states: {\em nominal state} and {\em rhythmic state}. In the nominal state, $\tau_i$ follows nominal period $P_i$ and nominal relative deadline $D_i (\leq P_i$), which are all constants. When a disturbance occurs, $\tau_i$ enters the rhythmic state in which its period and relative deadline are first reduced in order to respond to the disturbance, and then gradually return to their nominal values by following some monotonically non-decreasing pattern. We use vectors $\overrightarrow{P_i}=[P_{i,x},x=1,\dots,R]^{T}$ and $\overrightarrow{D_i}=[D_{i,x},x=1,\dots,R]^{T}$ to represent the periods and relative deadlines of $\tau_i$ when it is in the rhythmic state. As soon as $\tau_i$ enters the rhythmic state, its period and relative deadline adopt sequentially the values specified by $\overrightarrow{P_i}$ and $\overrightarrow{D_i}$, respectively. $\tau_i$ returns to the nominal state when it starts using $P_i$ and $D_i$ again. Here we assume that at most one task can be in the rhythmic state at any time during the network operation. To simplify the notation, we refer to any task currently in the rhythmic state{} as {\em rhythmic task} and denote it as $\tau_0$ while task $\tau_i \; (1 \leq i \leq n)${} is a {\em periodic task} which is currently not in the rhythmic state{}. As shown in Fig.~\ref{fig:rhythmic}, when $\tau_0$ enters the rhythmic state{}, we also say that the system switches to the {\em rhythmic mode{}}. The system returns to the {\em nominal mode{}} when the disturbance has been completely handled, typically some time after $\tau_0$ returns to the nominal state{}. Since disturbances may cause catastrophe to the system, the rhythmic task has a hard deadline when the system is in the rhythmic mode while periodic tasks can tolerate occasional deadline misses. Each task $\tau_{i}$ consists of an infinite sequence of instances. The $k$-th instance of $\tau_{i}$, referred to as packet $\chi_{i,k}$, is associated with release time $r_{i,k}$, deadline $d_{i,k}$ and finish time $f_{i,k}$. Without loss of generality, we assume that $\tau_0$ enters the rhythmic state{} at $r_{0,m+1}$ (denoted as $t_{n \rightarrow r}$) and returns to the nominal state{} at $r_{0,m+R+1}$ (denoted as $t_{r \rightarrow n}$). Thus, $\tau_0$ stays in its rhythmic state during $[t_{n \rightarrow r}, t_{r \rightarrow n})$, and $ t_{r \rightarrow n} = t_{n \rightarrow r} + \sum_{x=1}^R{P_{0,x}}$. Any packet of $\tau_0$ released in the system rhythmic mode{} is referred to as a {\em rhythmic packet} while the packets of task $\tau_i \; (1 \leq i \leq n)${} are {\em periodic packets}. The delivery of packet $\chi_{i,k}$ at the $h$-th hop is referred to as a transmission denoted as $\chi_{i,k}(h)\ (1 \leq h \leq H_i)$. { Traditionally, RTWNs employ Link-based Scheduling (LBS) to allocate time slots for individual tasks where each slot is allocated to a link by specifying the sender and receiver~\cite{de2014ieee}. If packets from different tasks share a common link and are both buffered at the same sender, their transmission order is decided by a node-specified policy (e.g., FIFO). This approach introduces uncertainty in packet scheduling and may violate the { end-to-end (e2e) timing constraints} on packet delivery. To tackle this problem, \emph{Transmission-based Scheduling (TBS)} and \emph{Packet-based Scheduling (PBS)} are proposed in~\cite{zhang2017distributed} and~\cite{flexible}, respectively, to construct deterministic schedules. Each of the two scheduling models has its own advantages and disadvantages and is preferred in different usage scenarios as discussed in~\cite{flexible}. Hence, we consider both models in our {FD-PaS}\xspace{} framework. In the TBS model, each time slot is allocated to the transmission of a specific packet $\chi_{i,k}$ at a particular hop $h$ or kept idle. Once the network schedule is constructed, packet transmission in each time slot is unique and fixed. In the PBS model, each time slot is allocated to a specific packet $\chi_{i,k}$ or kept idle. Within each time slot assigned to $\chi_{i,k}$, every node along $\chi_{i,k}$'s routing path decides the action to take (e.g., transmit, receive or idle), depending on whether the node has received $\chi_{i,k}$ or not. For example, consider a task $\tau_0$ with two slots being assigned in each period. In the TBS model, the first and second slots are dedicated for $\tau_0$'s first and second hops, respectively. In the PBS model, the two slots are allocated to each packet of $\tau_0$ and the second slot can be used to transmit $\tau_0$'s first hop if the transmission fails in the first slot. Since each link $e$ in the network may suffer packet losses, i.e., $\lambda^L_e <1$, packet transmissions may fail, which can significantly affect the timely delivery of real-time packets. To handle such cases, a retransmission mechanism is commonly employed in RTWNs~\cite{song2008wirelesshart,dujovne20146tisch}. Specifically, if a sender node does not receive any ACK from the receiver node within the current slot, it automatically retransmits the packet in the next possible time slot. To quantify the reliability requirement of the e2e packet delivery for each task, a \emph{required} e2e PDR for $\tau_i$, denoted as $\lambda^R_i$, is introduced. Based on $\lambda^R_i$, the transmission of any packet of $\tau_i$ is reliable if and only if the achieved e2e PDR of $\tau_i$ is larger than or equal to $\lambda^R_i$, i.e., $\lambda_{i,k} \geq \lambda^R_i$. To simplify presentation, we assume that all tasks in the network share a common required e2e PDR value, denoted as $\lambda^R$. However, our proposed approach can be easily extended to support different $\lambda^R$'s for different tasks. Table~\ref{tab:notation_table} summarizes the frequently used symbols in this paper. Based on the above system model, the problem that we aim to solve in this paper is presented as follows. \noindent {\bf Problem 1}: Assume that for a given RTWN, a static schedule is provided which can guarantee both the e2e timing and reliability requirements of all tasks when there are no disturbances. That is, required number of slots are assigned for each packet (either in the TBS model or PBS model) in the system nominal mode. Upon detection of a disturbance at $r_{0,m}$ (a release time of $\tau_0$'s packet\footnote{We assume that disturbances can be detected only at the time when the sensor samples the environment data, {\em i.e.}, the release time of a certain packet.}), determine the dynamic schedule in the system rhythmic mode such that (i) the system can start handling rhythmic packets no later than $r_{0,m+1}=r_{0,m}+P_0$, (ii) timing and reliability requirements of all the rhythmic packets are satisfied, and (iii) the system can safely return to the nominal mode after which all packets can be reliably delivered by their nominal deadlines. { The objective is to minimize the total reliability degradation on all packets from periodic tasks in the system rhythmic mode.} Constraint (i) ensures that disturbances can be handled in the earliest possible time ({\em i.e.}, before the nominal arrival time of the next packet). If Constraint (i) were violated, the corresponding control system could become unstable or suffer from severe performance degradation. The meaning of Constraints (ii) and (iii) are self explanatory. { It has been shown through a motivational example in \cite{fdpas} that centralized packet scheduling approaches ({\em e.g.} OLS and {D$^2$-PaS}\xspace{}) have two main drawbacks when solving the above problem. First, they rely on a single point ({\em e.g.} the controller) in the network to make on-line decisions for handling the disturbance. This is a significant roadblock in scaling up the packet scheduling framework to be deployed in large-scale RTWNs. Secondly, centralized approaches suffer from a considerably long response time to the disturbances especially for large RTWNs. This is because centralized approaches require to first send the disturbance information to the controller. After that, a broadcast packet is needed to disseminate the generated dynamic schedule to all nodes in the network to handle the disturbance. In this work, we propose a new approach to address these drawbacks.} } \begin{table*}[tb] \caption{Summary of important notations { and definitions}} \vspace{-0.1in} \label{tab:notation_table} \centering {\footnotesize \begin{tabular}{|c|c|c|c|} \hline Notation & Definition & Notation & Definition \\ \hline $V_{j}$ ($j = 0,1,\ldots$), $V_c$ & Device nodes and controller node & \ensuremath{t_{n\rightarrow r}}, & Slot when $\tau_{0}$ leaves its nominal state \\ \cline{1-2} $\tau_i (0 \leq i \leq n)$ & Unicast tasks & \ensuremath{t_{r\rightarrow n}} & and its rhythmic state, respectively \\ \hline $H_i$ & Number of hops of $\tau_{i}$ & $t_{sp}$, $t_{ep}$, & Start point, end point, end point candidate \\ \cline{1-2} $P_{i}$ ($D_{i}$) & Nominal period (deadline) of $\tau_i$ & $t_{ep}^c$, $t_{ep}^u$ & and end point upper bound \\ \hline {\rule{0pt}{1.35em}$\overrightarrow{P_i}$} ($\overrightarrow{D_i}$) & Rhythmic period (deadline) vector of $\tau_i$ & $S$, $\ensuremath{\tilde{S}}$ & Static schedule and dynamic schedule \\ \hline $\chi_{i,k}$ & The $k$-th released packet of task $\tau_i$ & $\mathbf{V}_{rhy}${} & Set of nodes receiving the disturbance information \\ \hline $\chi_{i,k}(h)$ & The {\em h}-th transmission of packet $\chi_{i,k}$ & $\Psi(t)$, $\Phi(t)$ & Set of active rhythmic and periodic packets \\ \hline $\lambda^R$ & Required e2e packet delivery ratio (for all tasks) & $\rho[t_{sp},t)$ & Set of dropped periodic packets \\ \cline{1-2} $\lambda_{i,j}$, $\overrightarrow{R}_{i,j}$ & E2e PDR value and retry vector of $\chi_{i,j}$ & $\rho^*[t_{sp},t)$ & and transmissions within $[t_{sp},t)$ \\ \hline $R_{i,j}[h]$ & Number of trials for $h$-th hop assigned by $\overrightarrow{R}_{i,j}$ & $\delta_{i,j}$ & PDR degradation of $\chi_{i,j}$ \\ \hline \end{tabular} } \vspace{-0.1in} \end{table*} \section{Overall Framework of {FD-PaS}\xspace{}} \label{sec:framework} \eat{ In this section, we first give a motivating example to show the deficiency of centralized packet scheduling approaches for handling rhythmic tasks. We then present an overview of the fully distributed packet scheduling framework, {FD-PaS}\xspace{}. \subsection{Drawbacks of Centralized Approaches}\label{ssec:motivation} In order to properly handle unexpected external disturbances, centralized dynamic scheduling approaches have been proposed, which can adapt to changes in on-line network resource demand. For example, OLS~\cite{hong2015online} can generate an on-line dynamic schedule based on a dynamic programming approach to handling disturbances modeled as rhythmic events. To further improve the performance in terms of { reducing the degradation on timing requirements of periodic packets},\footnote{Both OLS and {D$^2$-PaS}\xspace{} assume all links are reliable in the network and only consider the timing requirements of all tasks.} {D$^2$-PaS}\xspace{}~\cite{zhang2017distributed} leverages the network-wide synchronization in RTWNs and the computing capability of individual device nodes to generate consistent schedules locally. By effectively reducing the amount of schedule related information to be broadcast by the gateway, {D$^2$-PaS}\xspace{} significantly improves the scalability of the dynamic schedule construction and dissemination processes. Centralized approaches, however, incur long latency for handling disturbances, especially in large networks. Consider an RTWN (Fig.~\ref{fig:structure}) with 3 tasks ($\tau_0, \tau_1$ and $\tau_2$) running on 7 nodes ($V_0, \ldots, V_5$ and $V_c$) with $V_0$ and $V_2$ being sensors, $V_4$ and $V_5$ being actuators, $V_1$ and $V_3$ being relay nodes, and $V_c$ being the controller node and functioning as the gateway in centralized approaches. Note that since centralized approaches rely on the controller node to disseminate the dynamic schedule, broadcast task $\tau_3$ is needed. The tasks' routing paths, periods and relative deadlines are given in \prettyref{tab:example}. \begin{figure}[tb] \centering \resizebox{1\columnwidth}{!}{\input{Figures/example.tikz}} \caption{\small An example RTWN with three unicast tasks and one broadcast task running on 7 nodes.} \label{fig:structure} \end{figure} \eat{ \begin{table}[b] \renewcommand{\arraystretch}{1.3} \centering \caption{\small Task parameters for the motivational example}\label{tab:example} \begin{tabular}{|m{0.56cm}<{\centering}|m{2.5cm}<{\centering}|m{1.2cm}<{\centering}|m{.56cm}<{\centering}|m{.8cm}<{\centering}|m{0.8cm}<{\centering}|} \hline Task & Routing Path & $P_i$ ($ = D_i$) & $\overrightarrow{P_i}$ & \mbox{$\overrightarrow{D_i}$} \\ \hline $\tau_0$ & $V_2 \rightarrow V_g \rightarrow V_5$ & 9 & $[4, 6]^T$ & $[3, 5]^T$ \\ $\tau_1$ & $V_0 \!\rightarrow\! V_1\! \rightarrow \! V_g \! \rightarrow\! V_5$ & 9 & N/A & N/A \\ $\tau_2$ & $V_2 \!\rightarrow\! V_g\! \rightarrow \! V_3 \! \rightarrow\! V_4$ & 10 & N/A & N/A \\ $\tau_3$ & $V_g \rightarrow *$ & 18 & N/A & N/A \\ \hline \end{tabular} \end{table} } \begin{table}[tb] \renewcommand{\arraystretch}{1.3} \centering \caption{Task parameters for the motivational example}\label{tab:example} \vspace{-1ex} \begin{tabular}{|m{0.56cm}<{\centering}|m{2.5cm}<{\centering}|m{1.2cm}<{\centering}|m{.56cm}<{\centering}|} \hline Task & Routing Path & $P_i$ ($ = D_i$) \\ \hline $\tau_0$ & $V_2 \rightarrow V_c \rightarrow V_5$ & 9 \\ $\tau_1$ & $V_0 \!\rightarrow\! V_1\! \rightarrow \! V_c \! \rightarrow\! V_5$ & 9 \\ $\tau_2$ & $V_2 \!\rightarrow\! V_c\! \rightarrow \! V_3 \! \rightarrow\! V_4$ & 10\\ $\tau_3$ & $V_c \rightarrow *$ & 18\\ \hline \end{tabular} \end{table} Assume all tasks are synchronized and first released at time slot $0$, and each node employs an EDF scheduler to construct its local schedule (see Fig.~\ref{fig:example}). Suppose at time slot $9$, an external disturbance is detected and sensor $V_2$ sends a rhythmic event request via $\tau_0$ to the controller node. $V_c$ then determines the time slot $\ensuremath{t_{n\rightarrow r}}$ when $\tau_0$ is going to enter its rhythmic state. In order to achieve fast response to the disturbance, $\ensuremath{t_{n\rightarrow r}}$ should be set to be as early as possible, but later than the time slot when all nodes in the network receive the dynamic schedule. In this example, $V_c$ has to wait till time slot $26$ to broadcast the constructed dynamic schedule. Only after the broadcast packet reaches all nodes at $30$, $\tau_0$ can enter its rhythmic state at the nearest release time slot $36$. Therefore, for this example, though the disturbance is detected by the sensor at time slot $9$, the system cannot enter the rhythmic mode until slot $36$, which is three nominal periods later (instead of one nominal period as required in {\bf Problem 1}). From the above example, one can readily see that the centralized approaches suffer from a considerably long response time to the disturbances especially for large RTWNs. Moreover, centralized approaches rely on a single point (the gateway) in the network to make on-line packet scheduling decisions. These are the two main roadblocks in scaling up the packet scheduling framework to support handling disturbances in large-scale RTWNs. \eat{ when a disturbance is detected, the sensor sends a rhythmic event request via the packet of $\tau_0$ (referred to as $\chi_{0,m}$). $t'$ denotes the time slot that the gateway receives the disturbance from $\chi_{0,m}$. $V_g$ generates the dynamic schedule for handling $\tau_0$ before the upcoming broadcast packet $\chi_{n+1,k}$ after $t'$, then, propagates to the network via $\chi_{n+1,k}$. Suppose $t''$ is the time slot that $\chi_{n+1,k}$ reaches all nodes in the network. $\tau_0$ enters its rhythmic state at $\ensuremath{t_{n\rightarrow r}}$, {\em i.e.}, its first release time after $t''$. That is, $\tau_0$ raises the rhythmic event request at $r_{0,m}$ while enters the rhythmic state till $\ensuremath{t_{n\rightarrow r}}$ to wait at least one broadcast packet being transmitted to the network. \footnote{In OLS, if a feasible dynamic schedule cannot be generated by the dynamic programming based approach before the upcoming broadcast packet, it has to wait till the next broadcast packet.} Therefore, the response time to the rhythmic event request of both OLS and {D$^2$-PaS}\xspace{} can be extremely long especially in a large RTWN since a broadcast packet with longer routing path is necessary. Besides, centralized or hybrid approaches both rely on a single point in the network to make packet scheduling decisions. This is the main difficulty in scaling up to large RTWNs. All the drawbacks above will cause performance degradation to the system which motivates us to design a better framework in terms of quick response for dealing with disturbances and scalability of RTWNs. \begin{figure}[tb] \centering {\includegraphics[width=\linewidth]{Figures/Motivation.pdf}} \caption \small Overall frameworks of OLS and {D$^2$-PaS}\xspace{}.} \label{fig:motivation} \end{figure} } } In order to achieve fast response to disturbances in RTWNs, in this work we propose a fully distributed packet scheduling framework, referred to as {FD-PaS}\xspace{}. The key idea of {FD-PaS}\xspace{} is to make dynamic, local schedule adaptation at each node along the path of the rhythmic task while avoiding transmission collisions from other nodes that still follow their static schedules in the system rhythmic mode. \eat{ \begin{figure}[tb] \centering {\includegraphics[width=\linewidth]{Figures/Example.pdf}} \caption{\small Local EDF schedules of the tasks in the motivating example. The block with symbol $c$ denotes the transmission of the rhythmic event request. The shaded blocks denote the two transmissions of the broadcast task to propagate the dynamic schedule generated at the controller node to the whole network.} \label{fig:example} \end{figure} } Fig.~\ref{fig:overview} gives an overview of the execution model of {FD-PaS}\xspace{}. After network initialization, each node generates locally a static schedule, $S$, using the local schedule generation mechanism in {D$^2$-PaS}\xspace{} and follows $S$ to transmit packets. When a disturbance is detected by rhythmic task $\tau_0$ at $t'=r_{0,m}$, a notification is propagated to all the nodes responsible for handling the disturbance. Let these nodes be $V_j \in$ $\mathbf{V}_{rhy}${}. Upon receiving the notification, each node in $\mathbf{V}_{rhy}${} determines the time duration of the network being in the rhythmic mode and generates a dynamic schedule \ensuremath{\tilde{S}}{} for handling the disturbance. Starting from $r_{0,m+1}$, one nominal period of $\tau_0$ after detecting the disturbance, the nodes in $\mathbf{V}_{rhy}${} follow \ensuremath{\tilde{S}}{} while all other nodes keep using static schedule $S$ to transmit periodic packets. Thus, by not relying on a broadcast packet to disseminate the dynamic schedule generated by a centralized point in the network, {FD-PaS}\xspace{} is able to significantly reduce the response time of reacting to disturbances. For ease of discussion, in the rest of the paper, we refer to {\em disturbance response time} (DRT) as the time duration from $t'$ to the start time of system rhythmic mode and {\em disturbance handling latency} (DHL) as the time duration of system rhythmic mode (see Fig.~\ref{fig:overview}). To ensure that {FD-PaS}\xspace{} works properly, several challenges need to be tackled. First, when a disturbance occurs, only the sensor node that has detected it knows which task will enter the rhythmic state, while the rest of the nodes in $\mathbf{V}_{rhy}${} that are to handle the disturbance have no knowledge about this. Second, if the nodes in $\mathbf{V}_{rhy}${} follow the dynamic schedule while other nodes follow the static schedule $S$, transmission collisions would occur which may cause rhythmic packets to { violate their timing and reliability requirements ({\em e.g.} missing deadlines)}. Third, to properly handle disturbances, efficient methods are needed by the nodes in $\mathbf{V}_{rhy}${} to determine a dynamic schedule in which { the reliability degradation on periodic packets is minimized}. We discuss in detail how {FD-PaS}\xspace{} tackles these challenges in the following sections. \eat{ \begin{algorithm}[tb] \caption{Main function of {FD-PaS}\xspace{}} \label{alg:overview} \begin{algorithmic}[1] \small \WHILE {true} \STATE {Every node generates and follows the static schedule locally.} \IF {a disturbance is detected by the sensor $N_j$} \STATE{$N_j$ sends the disturbance to the node set $\mathbf{V}_{rhy}${}.} \STATE{Each node in $\mathbf{V}_{rhy}${} generates the dynamic schedule to follow.} \STATE{The rhythmic task enters its rhythmic state.} \ENDIF \ENDWHILE \end{algorithmic} \end{algorithm} } \eat{ To achieve this, there are several challenges to be tackled. \begin{itemize} \item When an unexpected disturbance occurs, how to let the necessary local nodes to know the disturbance. \item Since some nodes know the disturbance while others not, how to avoid transmission collisions occurred among these nodes. \item How to drop the minimum number of periodic packets to guarantee the deadlines of rhythmic packets. \end{itemize} In the following sections, we answer the three questions one by one. } \section{Propagating Disturbance Information} \label{sec:propagating} In centralized approaches, all nodes in the RTWN must know the disturbance information since a dynamic schedule must be deployed at each node. However, such a network-wide propagation mechanism does not scale and often violates constraint (i) in {\bf Problem 1}{} as shown by the motivating example. To overcome this drawback, we propose to disseminate the disturbance information to only a subset of all nodes, denoted as $\mathbf{V}_{rhy}${}, to minimize the DRT. This scheme requires the following three questions be answered: (1) which nodes in the network belong to $\mathbf{V}_{rhy}${}, (2) how to propagate the disturbance information to nodes in $\mathbf{V}_{rhy}${}, and (3) does each node in $\mathbf{V}_{rhy}${} have sufficient time to generate the dynamic schedule before the system enters the rhythmic mode? Below we present our answers to these questions. \begin{figure}[tb] \centering {\includegraphics[width=\linewidth]{Figures/Overview.pdf}} \caption{\small Overview of the execution model of {FD-PaS}\xspace{}.} \label{fig:overview} \end{figure} Consider questions (1) and (2) above. Recall that when a disturbance occurs, the rhythmic task $\tau_0$ will enter its rhythmic state following reduced periods and deadlines as specified in $\overrightarrow{P_0}$ and $\overrightarrow{D_0}$. An updated schedule is needed to accommodate the increased workload of $\tau_0$. To ensure that each (re)transmission $\chi_{0,k}(h)$ can be successful, both the sender and the receiver of $\chi_{0,k}(h)$ must follow the same schedule. Thus, all nodes along the routing path of $\tau_0$ must know the disturbance information to generate a consistent dynamic schedule, and should be included in $\mathbf{V}_{rhy}${}. For example, $\mathbf{V}_{rhy}${} $= \{V_2, V_c, V_5\}$ for the example in Fig.~\ref{fig:structure} when $\tau_0$ enters the rhythmic state. When a disturbance is detected at $r_{0,m}$, its information can be piggybacked onto $\chi_{0,m}$ and transmitted to all nodes in $\mathbf{V}_{rhy}${}. Propagating disturbance information in this manner guarantees that all nodes in $\mathbf{V}_{rhy}${} receive the disturbance information within one nominal period of $\tau_0$, {\em i.e.}, $P_0$, since the static schedule ensures that each task { is assigned with the required} number of transmission and retransmission slots along its routing path within $P_0$ in order to { meet the e2e timing and reliability requirements.} Now consider question (3). As required in Constraint (i) of {{\bf Problem 1}}, the system should start handling the rhythmic packets from $r_{0,m+1}$ after the disturbance is detected at $r_{0,m}$. This requires that (i) the disturbance information be successfully propagated to the relevant nodes before $\tau_0$ enters its rhythmic state at $r_{0,m+1}$, and (ii) each node in $\mathbf{V}_{rhy}${} completes the construction of the dynamic schedule before it starts receiving/transmitting the first rhythmic packet. The propagation scheme discussed above ensures that condition (i) is met. Regarding condition (ii), our prior work showed that one idle slot (10ms) is sufficient for a typical device node in RTWNs ({\em e.g.}, TI CC2538 SoC) to complete its local schedule computation~\cite{zhang2017distributed}. The theorem below establishes that such an idle slot indeed exists within the time frame specified in condition (ii). \eat{ Centralized approaches uses a broadcast packet to propagate update information to all nodes when disturbance occurs. This is also the most common way used in RTWNs. However, such a method suffers from long DRT as shown in the motivating example in Section \ref{ssec:motivation}. Since {FD-PaS}\xspace{} only disseminates disturbance information to nodes on the routing path of the rhythmic task, it is not necessary to use a broadcast packet that reaches all nodes in the network. We propose to piggyback disturbance information to a packets of the rhythmic task which passes through all nodes in $\mathbf{V}_{rhy}${}. Thus, when a disturbance is detected at $r_{0,m}$, the sensor sends a rhythmic event declaration via $\chi_{0,m}$ to nodes on the routing path of $\tau_0$ and $\tau_0$ can enter its rhythmic state from the next release time $r_{0,m+1}$. Instead of waiting for a broadcast packet reaching all nodes, the system can start handling the rhythmic event in one nominal period which significantly improve the DRT.} \begin{theorem}\label{thm:idle} If an RTWN system is schedulable under a given static schedule, any node $V_j$ ($V_j \neq V_c$) in $\mathbf{V}_{rhy}${} has at least one idle slot (neither receiving nor sending any transmission) between time $t_1$ ($t_1 \geq r_{0,m}$) when it receives the disturbance information and time $t_2$ ($t_2 \geq r_{0,m+1}$) when it is involved in the transmission of the first rhythmic packet after $\tau_0$ enters its rhythmic state at $r_{0,m+1}$. \end{theorem} \begin{IEEEproof} We first recall the following lemma from~\cite{zhang2017distributed}. \begin{lemma}\label{lem:idle} If an RTWN system is schedulable under a given static schedule, {\em i.e.} each packet completes all its transmissions before the deadline, for any node $V_j \neq V_c$ and task $\tau_i$ passing through $V_j$, there exists at least one idle slot at $V_j$ among any three consecutive transmissions of $\tau_i$ passing $V_j$. \end{lemma} Since in our system model, sensors and actuators are connected via the controller node, every task follows a routing path with at least two hops corresponding to two transmissions { (assigned with multiple transmission and retransmission slots)}. Suppose $\chi_{0,m}(h)$ occurs at $t_1$ and is the transmission from which $V_j$ receives the disturbance information\footnote{If $V_j$ is the sensor, it detects the disturbance at $r_{0,m}$.}. There exists at least one transmission between $\chi_{0,m}(h)$ and $\chi_{0,m+1}(h)$ (the first transmission that $V_j$ is involved in the dynamic schedule, occurring at $t_2$). Then, according to Lemma~\ref{lem:idle}, $V_j$ has at least one idle slot between $\chi_{0,m}(h)$ and $\chi_{0,m+1}(h)$ ({\em i.e.}, between $t_1$ and $t_2$). Thus, the theorem holds. \end{IEEEproof} Based on Theorem~\ref{thm:idle} and the disturbance propagation time bound, the proposed partial disturbance propagation scheme guarantees that any disturbance can be promptly responded within one nominal period of the rhythmic task and Constraint (i) in {{\bf Problem 1}} can be satisfied. \eat{Upon receiving the disturbance information, each node in $\mathbf{V}_{rhy}${} generates a dynamic schedule for handling rhythmic packets. Since schedule generation takes time, we need to guarantee that each device node $V_j$ \footnote{Since the gateway can handle complex computations even in a busy slot sending/receiving a transmission, here we only consider device nodes.} (any node in the network excluding the gateway) has enough time to complete the computation before $V_j$ transmitting its first rhythmic transmission in the dynamic schedule. As measured in \cite{zhang2017distributed}, one idle slot is sufficient for device nodes nowadays to complete local computation. Therefore, we must prove that at least one idle slot exists between $V_j$ receiving the disturbance information and sending/receiving the first rhythmic transmission in the dynamic schedule. To achieve this, we introduce the following lemma in \cite{zhang2017distributed}.} \eat{\begin{proof} See proof in \cite{zhang2017distributed}. \end{proof}} \eat{ When an unexpected disturbance occurs, to let the necessary nodes know it, the questions need to be answered include: \begin{itemize} \item which are the necessary nodes that must know the disturbance, \item without broadcast packets, how to let these nodes to know the disturbance, \item after receiving the disturbance, whether each node has enough time to generate the dynamic schedule before starting using it. \end{itemize} } \section{Avoiding Transmission Collisions} \label{sec:collisions} According to the disturbance propagation mechanism presented in Section~\ref{sec:propagating}, only the nodes on the path of the rhythmic task are included in $\mathbf{V}_{rhy}${}. Nodes in $\mathbf{V}_{rhy}${} construct their local schedules individually and employ them in the system rhythmic mode. All other nodes in the network follow the static schedule. With this execution model, unless the disturbance information is propagated to the entire RTWN, inconsistencies between the dynamic and static schedules in the system rhythmic mode may easily arise, which would result in transmission collisions. To ensure that the disturbances are handled appropriately, in the {FD-PaS}\xspace{} framework, the transmissions of rhythmic packets need to be always successful even in the presence of collision with other periodic packets. In conventional RTWNs such as WirelessHART~\cite{song2008wirelesshart} and 6TiSCH~\cite{dujovne20146tisch}, TDMA-based data link layer are widely adopted to provide synchronized and collision-free channel access. In addition, most of those protocols employ the Clear Channel Assessment (CCA) operation at the beginning of each transmission for collision avoidance. CCA, however, cannot prioritize packet transmissions. When multiple transmissions happen in the same time slot sharing the same destination, it cannot guarantee the more important packets ({\em e.g.}, rhythmic packets) are granted the access to the channel. \eat{In IEEE 802.15.4e standards, a timeslot is allocated for a single packet transmission from the sender to the receiver. Within a timeslot, the sender transmits the packet, while the receiver acknowledges the reception of the packet if it is valid. A transmission is considered successful only if the sender receives the correct acknowledgement. If multiple transmissions happen in one timeslot within the reception range, and the strongest signal can not exceed rated Signal-to-Interference-plus-Noise Ratio (SINR), all of them will fail due to the interference. Thus, in a normal network setup, a proper schedule is maintained so that no such interference will happen. When a dynamic schedule for handling the disturbance is generated by the necessary nodes (the nodes involved in rhythmic task), the challenge is how to avoid transmission collisions between that of the dynamic schedule running on the necessary nodes and the original schedule running on other nodes.} To tackle this challenge, we propose an enhancement to the IEEE 802.15.4e standard~\cite{de2014ieee}, called Multi-Priority MAC (MP-MAC{}), to support prioritization of packet transmissions in RTWNs. Several attempts have been made in the literature towards supporting this feature. For example, the PriorityMAC was proposed in~\cite{prioritymac} to prioritize critical traffic in RTWNs. It introduces the concept of subslots, in which the transmitter does a very short transmission to indicate the priority of the packet to be transmitted in the following time slot. By adding two subslots {\color{brown} before} each time slot, PriorityMAC is able to create three priority levels. Different from PriorityMAC, the design of the {MP-MAC{}} aims to be lightweight and scalable. In {MP-MAC{}}, the transmitter does not explicitly conduct a short transmission to indicate the priority. Instead it implicitly indicates the priority of the transmission by adjusting the Start-Of-Frame (SOF) time offset. Compared with PriorityMAC, {MP-MAC{}} is more energy efficient (by avoiding transmissions in the subslots), and able to support more priority levels. Fig.~\ref{fig:timeslot} gives a comparison of the slot timing of 802.15.4e (top) and {MP-MAC{} (bottom)}. In a 802.15.4e time slot, the sender transmits a packet and the receiver responds with an acknowledgement (ACK) if the packet is successfully received\footnote{No acknowledgement is provided for broadcast and multicast packets.}. The packet transmission starts at \emph{TxOffset} after the start of the time slot, while the ACK starts at \emph{TxAckDelay} after the completion of the packet transmission. A long Guard Time (LGT) and a short Guard Time (SGT) are used by the receiver and sender respectively to tolerate clock drift and radio/CPU operation delays. With this standard design of 802.15.4e, if multiple senders transmit packets in the same time slot, they are not aware of the other transmissions, and thus will cause interference. The slot timing of {MP-MAC{}} is presented at the bottom of Fig.~\ref{fig:timeslot}. In {MP-MAC{}}, instead of being set as a constant, \emph{TxOffset} is varied to implicitly indicate the priority of the packet (shown as red dashed lines). A packet with a higher priority is associated with a shorter \emph{TxOffset} to start the transmission earlier. In addition, a CCA operation will be performed before each transmission to ensure that there is no higher priority packet transmission present in the channel. This enhancement ensures that only the highest priority packet (with the shortest \emph{TxOffset}) is transmitted, and all lower priority transmissions yield to it. \eat{Note that the level of priorities that can be supported by {MP-MAC{}} is not limited to 4, but can be adjusted by adding or removing \emph{TxOffset}s.} \begin{figure}[t] \centering \resizebox{1\columnwidth}{!}{\input{Figures/timeslot0.tikz}} \resizebox{1\columnwidth}{!}{\input{Figures/timeslot1.tikz}} \caption{\small Slot timing of 802.15.4e (top) and MP-MAC (bottom)} \label{fig:timeslot} \end{figure} Similar to the guard times, the \emph{TxOffset} values for different priorities need to be set sufficiently apart so that different senders and receivers have consensus on the priorities. In {MP-MAC{}}, we define \emph{PriorityTick} as the difference between two consecutive \emph{TxOffset}s. To support $k$ different priorities in {MP-MAC{}}, the length of the time slot, compared to the standard design, needs be extended by $(k-1) \times PriorityTick$. A longer \emph{PriorityTick} can ensure successful packet prioritization, but either leads to longer SlotDuration and reduced network throughput, or smaller number of supported priorities if the size of the time slot is fixed. Since \emph{PriorityTick} is a hardware-dependent parameter, we will elaborate the selection of {\em PriorityTick} in our testbed experiments and demonstrate the effectiveness of {MP-MAC{}} in Section~\ref{sec:testbed}. \eat{ \Note{Han: this section can be moved to the testbed section. It talks about the details.} Moreover, radio synchronization is performed upon packet reception. The clock is adjusted by comparing the measured Start-Of-Frame (SOF) timestamp with the one expected (\emph{TxOffset}). Since the MP-MAC{} now varies \emph{TxOffset} for different priorities, the comparison needs to be adjusted, too. We introduce the following modifications to ensure time synchronization in MP-MAC{}: \begin{itemize}\itemsep0em \item Assign all beacon packets with fixed priority. \item Adjust the measured SOF timestamp by fixed beacon priority during initial time synchronization at a node, because only beacon packet is used at the moment. \item Synchronize SOF timestamp to the nearest \emph{TxOffset} during all other time synchronizations, because the priority of the coming packet is unknown at that time. \end{itemize} Here we assume that the clock drift is within $(-\frac{1}{2}PriorityTick, +\frac{1}{2}PriorityTick)$ range. As a result, the value of \emph{PriorityTick} needs to be larger than clock drift allowance, whose boundary can be calculated from clock source specification. When reducing \emph{PriorityTick} to extreme value, two phenomenons can be observed: because the clock drifts outside \emph{PriorityTick}, the child node fails to synchronize with parent (time master), and causes packet loss; two senders with different priorities have too close \emph{TxOffset}s that the later one is not able to detect earlier one, and cause interference. These observations are further discussed in Section \ref{sec:exp} and performance of different \emph{PriorityTick}s is measured.} \section{System Rhythmic Mode} \label{sec:dropping} {MP-MAC{}} ensures that once the dynamic schedules are generated locally, the nodes in $\mathbf{V}_{rhy}${} can follow those schedules to handle the disturbance without transmission collisions with other nodes in the network. Since all the nodes in $\mathbf{V}_{rhy}${} receive the same disturbance information, the dynamic schedules generated locally at these nodes are all consistent. The construction of a dynamic schedule must guarantee that { 1) all rhythmic packets meet their timing and reliability requirements, 2) the reliability degradation of periodic packets is minimized, and 3) the system can reuse the static schedule after the rhythmic mode ends and all packets can be reliably delivered by their nominal deadlines.} \subsection{Problem Formulation} \label{ssec:problem} In {FD-PaS}\xspace{}, the network starts operation by following a static schedule which guarantees that all tasks meet their { timing and reliability requirements} if no disturbance occurs. The static schedule is generated at each node locally using the local schedule generation technique proposed in \cite{zhang2017distributed}. { To satisfy the reliability requirement, the retransmission mechanism introduced in \cite{flexible, probabilistic} is employed for each task to achieve the desired PDR value, {\em i,e,}, $\lambda_{i,k} \geq \lambda^R$. In the following, we assume the network { adopts the} TBS model where additional time slots are assigned to individual transmissions. (The case is similar for the PBS model where slots are assigned to individual packets.)} We denote the static schedule as $\ensuremath{S} = \{(t, i, h)\}$, where $t$ is the slot ID, $i$ is the task ID and $h$ is the hop index. For any given time slot $t$, we have $\ensuremath{S}[t] = (i,h)$ if $t$ is assigned to the $h$-th transmission of $\tau_i$. Otherwise, $\ensuremath{S}[t] = (-1, -1)$ to indicate an idle slot. { Let $\overrightarrow{R}_{i,k} = [R_{i,k}[0], R_{i,k}[1], \dots, R_{i,k}[H_i-1]]$ be the {\em retry vector} of packet $\chi_{i,k}$ used in the static schedule in which $R_{i,j}[h]$ denotes the number of slots assigned to hop $h$ of $\chi_{i,k}$. We use $w_i^+$ to denote the number of slots assigned to $\tau_i$ ({\em i.e.}, $\overrightarrow{R}_{i,k}$) in the static schedule which guarantees the e2e PDR value $\lambda_{i,k}$ to be larger than $\lambda^R$ in the system nominal mode. } As shown in Fig. \ref{fig:rhythmic}, when a disturbance is detected at $r_{0,m}$, $\tau_0$ requires to enter its rhythmic state from the next release time $r_{0, m+1}$, {\em i.e.}, $\ensuremath{t_{n\rightarrow r}} = r_{0, m+1}$. Then, the system enters the rhythmic mode with an increased workload induced by $\tau_0$. A dynamic schedule $\ensuremath{\tilde{S}}$ is thus needed before the system switches back to the nominal mode and reuses static schedule $\ensuremath{S}$. $\ensuremath{\tilde{S}}$ starts from $\ensuremath{t_{n\rightarrow r}}$ and ends at a carefully chosen end point $\ensuremath{t_{ep}}$ of the system rhythmic mode. To achieve guaranteed fast disturbance handling, we further define $t_{ep}^u$ as a user specified parameter which bounds the maximum allowed DHL, and is often application dependent. Though it is natural to use idle slots in $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ to accommodate the increased rhythmic workload, they are not always sufficient to guarantee { the timing and reliability requirements} of all rhythmic packets. In this case, some periodic transmissions have to be dropped. Since any node $V_j \notin$ $\mathbf{V}_{rhy}${} keeps following the static schedule $\ensuremath{S}$ to transmit periodic packets, periodic transmissions cannot be adjusted in the dynamic schedule\footnote{Some periodic tasks may share common nodes with $\tau_0$ on their routing paths, which indicates that the periodic transmissions at these nodes can be adjusted in the dynamic schedule. Due to page limit, we leave this discussion to our future work and focus on the case that all periodic transmissions should not be adjusted in the dynamic schedule.}. { Therefore if any periodic transmission $\chi_{i,k}(h)$ in $\ensuremath{S}$ is replaced by a rhythmic transmission in $\ensuremath{\tilde{S}}$, the number of elements in $\overrightarrow{R}_{i,k}$ is reduced such that the reliability of packet $\chi_{i,k}$ is degraded. If the remaining number of assigned slots (denoted as $w_{i,k}$) is less than $H_i$, the timing requirement of $\chi_{i,k}$ is also violated since at least $H_i$ slots are needed to guaratee the delivery of $\chi_{i,k}$. To capture the reliability degradation for periodic packet $\chi_{i,k}$, let $\delta_{i,k}$ represent the difference between the required PDR $\lambda^R$ and the updated PDR value $\lambda_{i,k}$ in the dynamic schedule, {\em i.e.}, $\delta_{i,k} = \max\{0, \lambda^R - \lambda_{i,k}\}$. Note that the timing degradation of each packet can also be captured by $\delta_{i,k}$ where $\delta_{i,k} = \lambda^R$ if $\chi_{i,k}$ is dropped. Then, the question is which periodic transmissions should be replaced by rhythmic transmissions to generate dynamic schedule $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ such that (i) all rhythmic packets meet their timing and reliability requirements and (ii) the total reliability degradation of periodic packets is minimized.} Formally, to satisfy Constraints (ii), (iii) and (iv) in {\bf Problem 1}{}, we aim to solve the following two subproblems. \vspace{0.05in} \noindent {{\color{brown} {\bf Problem 1.1}}{} -- End Point Selection:} Given task set \mbox{$\mathcal{T}$}, $\ensuremath{t_{n\rightarrow r}}$, $t_{ep}^u$ and static schedule $\ensuremath{S}$, this subproblem determines the end point $\ensuremath{t_{ep}}$ that satisfies the following two constraints. \begin{constraint}\label{con:ep1} $f_{0,m+R} \leq \ensuremath{t_{ep}} \leq t_{ep}^u$ \end{constraint} \noindent Here, $f_{0,m+R}$ is the finish time of the last packet released in $\tau_0$'s rhythmic state. $f_{0,m+R} \leq \ensuremath{t_{ep}}$ ensures that the current rhythmic event can be completely handled before the system switches back to the nominal mode. \begin{constraint}\label{con:ep2} The system can switch back to the nominal mode and reuse the static schedule from $\ensuremath{t_{ep}}$ {\color{brown} and all packets after $\ensuremath{t_{ep}}$ { can be reliably delivered by their nominal deadlines}}. \end{constraint} \noindent {{\bf Problem 1.2}{} -- Dynamic Schedule Generation:} this subproblem generates the dynamic schedule $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ such that { the total reliability degradation of periodic packets is minimized and the following two constraints are satisfied.} \begin{constraint}\label{cons:rhy} All rhythmic packets meet their { timing and reliability requirements.} \end{constraint} \begin{constraint}\label{cons:peri} In the dynamic schedule $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$, any periodic transmission slot $S[t] = (i,h) (1 \leq i \leq n)$ can only either be replaced by a rhythmic transmission slot $S[t]=(0,h)$ or kept unchanged. \end{constraint} \noindent Below we first discuss how {FD-PaS}\xspace{} solves the first problem. \subsection{End Point Selection} \label{ssec:end_point} Determining the right end point for the dynamic schedule is vital since it impacts not only the DHL but also the number of dropped periodic packets. A concept similar to the end point is used by OLS and is referred to as switch point~\cite{hong2015online}. Since both OLS and {FD-PaS}\xspace{} require the system to reuse the static schedule after $\ensuremath{t_{ep}}$, to select the end point in {FD-PaS}\xspace, we borrow some ideas in OLS including aligning the actual release time of $\tau_0$ to its nominal one and reducing the number of end point candidates by only considering the actual release times of $\tau_0$. {FD-PaS}\xspace and OLS have two key differences for end point selection. First, to satisfy Constraint~\ref{con:ep2}, we need to determine which packets must be completed before the system reuses the static schedule at end point $\ensuremath{t_{ep}}$. Since OLS must obey a user-specified bound on the number of adjusted transmissions in dynamic schedule \ensuremath{\tilde{S}}, a {\em transmission set\/} containing all transmissions to be scheduled in $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ must be constructed. However, {FD-PaS}\xspace{} has no such requirement (due to its distributed nature), thus only needs to construct an \emph{active packet set} containing all packets to be scheduled. Second, according to Constraint \ref{cons:peri}, transmissions of periodic packets must not be adjusted and can only be replaced by rhythmic transmissions in the dynamic schedule. Thus, for the active packet set, we only need to consider rhythmic packets to be scheduled by $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$. These differences require modifications to the end point selection process, which are detailed below. \eat{ \begin{constraint}\label{con:ep1} $f_{0,m+R} \leq \ensuremath{t_{ep}} \leq t_{ep}^u$ \end{constraint} \begin{constraint}\label{con:ep2} The system can switch back to the nominal mode and reuse the static schedule from $\ensuremath{t_{ep}}$ with all packets meeting their nominal deadlines. \end{constraint} } Let $\Psi(\ensuremath{t_{ep}})$ denote the active packet set containing all rhythmic packets to be scheduled within $[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ { and $\Phi(\ensuremath{t_{ep}})$ denote the periodic packet set in which each periodic packet has at least one transmission slot in the static schedule $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$.} Naturally, any rhythmic packet with both release time and deadline in $[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ must be included in $\Psi(\ensuremath{t_{ep}})$. The question is how to treat the rhythmic packet released before $\ensuremath{t_{ep}}$ with a deadline after $\ensuremath{t_{ep}}$. As shown in Fig. \ref{fig:rhythmic}, let $\chi_{0, q^*}$ be such a packet. To ensure the system can reuse the static schedule from $\ensuremath{t_{ep}}$, the actual release time of $\tau_0$ must be aligned to its nominal release time after \ensuremath{t_{ep}}. Same as OLS, we shorten the time interval between $r_{0, q^*}$ and $r_{0, q^* + 1}$ by shifting $r_{0, q^* + 1}$ backward to the closest nominal release time of $\tau_0$, denoted as $r_{0, p^*}$. The more challenging part is adjusting the deadline and { execution time of $\chi_{0, q^*}$ since the assigned number of transmission slots} may vary depending on which hop occurs after \ensuremath{t_{ep}}. We construct $\chi_{0, q^*}$ by adjusting its execution time and deadline according to the position of $\ensuremath{t_{ep}}$ by considering the following two cases. \noindent {\bf Case 1:} If $\ensuremath{t_{ep}} < r_{0, p^*}$, $d_{0, q^*}$ is adjusted to $\ensuremath{t_{ep}}$. { Suppose the first transmission slot assigned to $\tau_0$ after $\ensuremath{t_{ep}}$ is at $t_{k_0}$ in the static schedule. If $t_{k_0} \geq r_{0, p^*}$, it indicates that $\ensuremath{S}[t_{k_0}]$ is the first assigned transmission slot for the first hop of $\chi_{0, p^*}$, {\em i.e.}, $\ensuremath{S}[t_{k_0}]=(0,1)$. Then the execution time of $\chi_{0, q^*}$ is set to $H_0$. If $t_{k_0} < r_{0, p^*}$ and suppose $\ensuremath{S}[t_{k_0}]$ is the $k_0$-th transmission slot assigned for $\chi_{0,p^*-1}$, the execution time is set to $k_0 - 1$ correspondingly.} \noindent {\bf Case 2:} If $\ensuremath{t_{ep}} \geq r_{0, p^*}$, { suppose the first assigned transmission slot for the first hop of $\chi_{0,p^*}$ is at $t_1$ in the static schedule,} {\em i.e.}, $\ensuremath{S}[t_1] = (0,1) (r_{0, p^*} \leq t_1 < d_{0, p^*})$. $d_{0, q^*}$ is adjusted to $\min(\ensuremath{t_{ep}}, t_1)$ to guarantee that the deadline of $\chi_{0, q^*}$ is smaller than or equal to the first transmission of $\chi_{0, q^*+1}$. Also the execution time of $\chi_{0, q^*}$ is set to be equal to $H_0$. Given $t_{ep}^u$, any time slot within $[f_{0,m+R}, t_{ep}^u]$ can be selected as end point $\ensuremath{t_{ep}}$. However, to avoid checking every time instant which is time consuming, we only need to consider the actual release times of $\tau_0$ within $[f_{0,m+R}, t_{ep}^u]$ as end point candidates, denoted as $t_{ep}^c$\footnote{Such a space reduction scheme is safe and can be proved in a similar way as Lemma 2 in~\cite{hong2015online} which is thus omitted due to page limit.}. That is, \begin{equation}\label{eq:endpoint} \{t_{ep}^c\} = \{r_{0,k}, \forall r_{0,k} \in [f_{0,m+R}, t_{ep}^u]\} \end{equation} \eat{ \begin{lemma}\label{lem:tep} Suppose $r_{0, q^*} < t^* < r_{0, q^*+1}$. It holds that $|\rho[\ensuremath{t_{n\rightarrow r}}, t^*)| \geq |\rho[\ensuremath{t_{n\rightarrow r}}, r_{0, q^*+1})|$ when selecting $t^*$ and $r_{0, q^*+1}$ to be the end points respectively. \end{lemma} \begin{proof}[Proof sketch] When setting $t^*$ and $r_{0, q^*+1}$ as the end points, the only difference between the active packet sets $\Psi(t^*)$ and $\Psi(r_{0, q^*+1})$ is the parameters of rhythmic packet $\chi_{0, q^*}$. However, if we let $\ensuremath{t_{ep}} = r_{0, q^*+1}$, we can always set the parameters of $\chi_{0, q^*}$ be the same as that of $\chi_{0, q^*}$ in $\Psi(t^*)$. Then, a dynamic schedule $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, r_{0, q^*+1})$ can be generated by concatenating the dynamic schedule $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, t^*)$ and the static schedule $\ensuremath{S}[t^*, r_{0, q^*+1})$. That is, the solution space for $\ensuremath{t_{ep}} = t^*$ is a subset of that of selecting $r_{0, q^*+1}$ as the end point. Thus, it always holds that $|\rho[\ensuremath{t_{n\rightarrow r}}, t^*)| \geq |\rho[\ensuremath{t_{n\rightarrow r}}, r_{0, q^*+1})|$. \end{proof} Lemma \ref{lem:tep} indicates that selecting any time slot within $(r_{0, q^*}, r_{0, q^*+1})$ as the end point is not better than using $r_{0, q^*+1}$ as $\ensuremath{t_{ep}}$ in terms of reducing the number of dropped packets. Therefore, we only consider each actual release time of $\tau_0$ within $[f_{0,m+R}, t_{ep}^u]$ as an end point candidate, denoted as $t_{ep}^c$. That is, \begin{equation}\label{eq:endpoint} \{t_{ep}^c\} = \{r_{0,k}, \forall r_{0,k} \in [f_{0,m+R}, t_{ep}^u]\} \end{equation} } Then the dynamic schedule generation subproblem can be refined as follow. \vspace{0.05in} \noindent {\bf Problem 1.2}{}: { Given the end point candidate $t_{ep}^c$, active packet set $\Psi(t_{ep}^c)$, periodic packet set $\Phi(t_{ep}^c)$ and static schedule $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, t_{ep}^c)$, determine the dynamic schedule $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, t_{ep}^c)$ in which the total reliability degradation of periodic packets is minimized, {\em i.e.},} \begin{equation}\label{eq:min} \forall \chi_{i,k} \in \Phi(t_{ep}^c), \min \sum \delta_{i,k}. \end{equation} and Constraint \ref{cons:rhy} and Constraint \ref{cons:peri} are satisfied. \section{Dynamic Schedule Generation} \label{sec:dynamic} { In this section, we discuss how {FD-PaS}\xspace{} determines the dynamic schedule to solve {\bf Problem 1.2}{}. For the sake of clarity, we first assume that all links in the network are reliable, i.e. $\forall e, \lambda^L_e = 100\%$. We then generalize the network model to { consider} lossy wireless links and extend {FD-PaS}\xspace{} to satisfy both the timing and reliability requirements of all tasks in Section~\ref{sec:reliability}.} \subsection{Reliable Network Setting}\label{ssec:drop} { For RTWNs in which all links are reliable, $H_i$ time slots are { required} for each packet $\chi_{i,k}$ to guarantee its { e2e delivery}. If any of the $H_i$ transmission slots in the static schedule is replaced by a rhythmic transmission in the dynamic schedule, $\chi_{i,k}$ cannot be delivered and { has to be dropped}. Thus, the objective in Eq. (\ref{eq:min}) is { reduced to minimize} the number of dropped periodic packets. We use $\rho[\ensuremath{t_{n\rightarrow r}}, t_{ep})$ to denote the dropped periodic packet set and in the following we illustrate that determining $\rho[\ensuremath{t_{n\rightarrow r}}, t_{ep})$ is a non-trivial problem by the following Lemma.} \begin{lemma}\label{lem:np} Given end point $\ensuremath{t_{ep}}$, an active packet set $\Psi(\ensuremath{t_{ep}})$ containing all rhythmic packets of $\tau_0$ to be scheduled and a static schedule $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$, determining the dropped packet set $\rho[\ensuremath{t_{n\rightarrow r}}, t_{ep})$ with the minimum number of dropped packets and satisfying both Constraint \ref{cons:rhy} and Constraint \ref{cons:peri} is NP-hard. \end{lemma} \eat{ Below, we show that this problem is NP-hard and thus the dynamic schedule generation problem {\bf Problem 1.2}{} is also NP-hard. \begin{lemma}\label{lem:np} Given end point $\ensuremath{t_{ep}}$, an active packet set $\Psi(\ensuremath{t_{ep}})$ containing all rhythmic packets of $\tau_0$ to be scheduled and a static schedule $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$, { the packet dropping problem to determine} the dropped packet set $\rho[\ensuremath{t_{n\rightarrow r}}, t_{ep})$ with the minimum number of dropped packets and satisfying both Constraint \ref{cons:rhy} and Constraint \ref{cons:peri} is {\color{brown} NP-hard}. \end{lemma} } \begin{IEEEproof} We prove the lemma by reducing the set cover problem~\cite{karp1972reducibility} to a special case of the packet dropping problem. The set cover problem is defined as follows: Given a set of $n$ elements $X = \{x_1, x_2, \dots, x_n\}$ and a collection $C = \{C_1, C_2, \dots, C_m\}$ of $m$ nonempty subsets of $X$ where $\cup_{i=1}^m C_i = X$. The set cover problem is to identify a sub-collection $C_s \subseteq C$ whose union equals $X$ such that $|C_s|$ is minimized. Given a set cover problem, we can construct a special case of the packet dropping problem in polynomial time as follows: (1) Suppose that after utilizing the original transmission slots of $\tau_0$ and the idle slots in $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ to accommodate rhythmic transmissions in $\Psi(\ensuremath{t_{ep}})$, there still remain $n$ packets of $\tau_0$, denoted as $\{x_1, x_2, \dots, x_n\}$, to be scheduled. Each packet $x_i$ only needs one slot to transmit. (2) In the static schedule $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$, there are $m$ periodic packets, denoted as $\{C_1, C_2, \dots, C_m\}$. For each packet $C_j$, if there exists a transmission of $C_j$ falls into the time window of rhythmic packet $x_i$ ({\em i.e.}, $[r_{x_i}, d_{x_i})$), we have $x_i \in C_j$. Thus, one can determine the minimum number of dropped packet set $\rho[\ensuremath{t_{n\rightarrow r}}, t_{ep})$ that can accommodate all the rhythmic packets if and only if the smallest sub-collection $C_s$ whose union equals $X$ can be identified. The Lemma is proved. \end{IEEEproof} After the dropped packet set is determined, the dynamic schedule can be obtained in linear time by assigning the transmissions of the rhythmic packets to the static schedule $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ using both idle slots and transmission slots of the dropped packets. Thus Lemma \ref{lem:np} readily leads to Theorem~\ref{thm:np} and the proof is omitted. \begin{theorem}\label{thm:np} { Generating a dynamic schedule with the minimum number of dropped packets in reliable RTWNs is NP-hard.} \end{theorem} \eat{ \begin{proof} According to Lemma \ref{lem:np}, { the packet dropping problem, a }sub-problem of {\bf Problem 1.2}{}, is already NP-hard. Thus {\bf Problem 1.2}{} is also NP-hard. \end{proof} } \eat{Below we focus on solving the { packet dropping problem by first giving an ILP solution and then a heuristic solution.} key sub-problem of {\bf Problem 1.2}{} that how to determine the dropped packet set with the minimum number of dropped packets. } \eat{ \subsubsection{ILP Solution} \label{ssec:ilp} In this section, we present the ILP formulation { to solve the packet dropping problem.} } Below we focus on solving the { packet dropping problem}. { An ILP based formulation can be derived by associating each periodic packet with a binary variable indicating whether the packet should be dropped or not. The objective is to minimize the number of dropped packets subject to the constraint that the total number of transmission slots freed from the dropped packets should be sufficient to meet the demand of all the rhythmic transmissions in $[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$. We introduce the following notation: \begin{itemize} \item $E_j = [\epsilon_j^1, \epsilon_j^2, \dots, \epsilon_j^n] \; (1 \leq j \leq m)$ denotes the transmission vector of periodic packet $\chi_j$ where each $\epsilon_j^i$ is the number of transmissions from $\chi_j$ in the static schedule that can be replaced by transmissions of rhythmic packet $\chi_{0,i}$ in the dynamic schedule. Specifically, transmission $\chi_{j}(h)$ of $\chi_j$ {\color{brown} can be replaced by $\chi_{0,i}$} if $\ensuremath{S}[t] = (j,h)$ and $r_{0,i} \leq t < d_{0,i}$. \item $l_j$ denotes the dropping decision of periodic packet $\chi_j$. $l_j = 1$ if $\chi_j$ is dropped. Otherwise, $l_j = 0$. \item $A = [a_1, a_2, \dots, a_n]$ denotes the available slot vector where each $a_i$ represents the total number of idle slots and rhythmic transmission slots in the static schedule that can be used by rhythmic packet $\chi_{0,i}$. \end{itemize} To drop the minimum number of periodic packets to guarantee the timing requirements of all rhythmic packets, we have the following objective function in the ILP formulation: \begin{equation}\label{eq:objective} \min \sum_{\chi_j \in \Phi} l_j \end{equation} Since rhythmic transmissions are at the highest priority, the deadline of each rhythmic packet $\chi_{0,i}$ can be guaranteed only if at least $H_{0,i}$ time slots are reserved for $\chi_{0,i}$ in the dynamic schedule. Also, both idle slots and rhythmic transmission slots in the static schedule can be used to satisfy $\chi_{0,i}$'s transmission demand. Therefore, objective function (\ref{eq:objective}) is subject to the following constraint. \begin{equation}\label{eq:constraint} \forall \chi_{0,i} \in \Psi, \hspace*{2em} \sum_{\chi_j \in \Phi} \epsilon_j^i \cdot l_j \geq H_{0,i} - a_i \end{equation} } Given that the packet dropping algorithm is to be deployed on resource-constrained device nodes and the sizes of both the rhythmic packet set ($|\Psi|$) and periodic packet set ($|\Phi|$) can become large as the network grows, we propose a greedy heuristic to { solve the packet dropping problem} which is time- and space-efficient to be deployed in practical RTWNs. The key idea of the greedy heuristic{} is to drop the periodic packet which contributes the maximum number of slots to all rhythmic packets. \eat{ \noindent $E_j = [\epsilon_j^1, \epsilon_j^2, \dots, \epsilon_j^n] (1 \leq j \leq m)$ denotes the transmission vector of periodic packet $\chi_j$ where each $\epsilon_j^i$ is the number of transmissions from $\chi_j$ in the static schedule that can be replaced by transmissions of rhythmic packet $\chi_{0,i}$ in the dynamic schedule. Specifically, transmission $\chi_{j}(h)$ of $\chi_j$ {\color{brown} can be replaced by $\chi_{0,i}$} if $\ensuremath{S}[t] = (j,h)$ and $r_{0,i} \leq t < d_{0,i}$. \noindent $A = [a_1, a_2, \dots, a_n]$ denotes the available slot vector where each $a_i$ represents the total number of idle slots and rhythmic transmission slots in the static schedule that can be used by rhythmic packet $\chi_{0,i}$. } \begin{algorithm}[tb] \caption{Greedy Heuristic for Dropping Packets} \label{alg:greedy} {\textbf{Input:} $\Psi(\ensuremath{t_{ep}})$, $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$}\\ {\textbf{Output:} $\rho[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$} \begin{algorithmic}[1] \small \STATE{ $\Phi \gets$ periodic packet set $\{\chi_j | 1 \leq j \leq m\}$;} \label{line:periodic} \STATE{ $E_j \gets$ transmission vector $[\epsilon_j^1, \epsilon_j^2, \dots, \epsilon_j^n]$ for each periodic packet $\chi_j$;} \label{line:vector} \STATE{ Construct $\Psi(\ensuremath{t_{ep}})$'s demand vector $[v_1, v_2, \dots, v_n]$ considering the idle slots and rhythmic transmission slots in $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$;} \label{line:demand} \IF {each $v_i$ equals $0$} \label{line:idles} \RETURN {$\emptyset$;} \ENDIF \label{line:idlee} \WHILE {true} \STATE{Add the periodic packet $\chi_{max}$ with the maximum $\sum_{i=1}^n \epsilon_j^i$ in $\Phi$ to $\rho[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$;} \label{line:max} \STATE{$\Phi \gets \Phi \setminus \{\chi_{max}\}$;} \label{line:remove} \FOR {$i \in \{1,\dots,n\}$} \label{line:demands} \STATE{$v_i \gets \max(0, v_i - \epsilon_{max}^i)$;} \ENDFOR\label{line:demande} \IF{each $v_i$ equals $0$}\label{line:returns} \RETURN{$\rho[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$;} \ENDIF\label{line:returne} \STATE{Update $E_j$ for each $\chi_j \in \Phi$;}\label{line:update} \ENDWHILE \end{algorithmic} \end{algorithm} \eat{ \begin{algorithm}[tb] \caption{Dynamic Schedule Generation} \label{alg:dynamic} \small {\textbf{Input:} $t_{ep}^u$, $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, t_{ep}^u)$}\\ {\textbf{Output:} $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$} \begin{algorithmic}[1] \STATE {Construct the end point candidate set $\{t_{ep}^c\}$ according to (\ref{eq:endpoint});} \FOR {($\forall t_{ep}^c \in \{t_{ep}^c\}$)} \STATE {Construct $\Psi(t_{ep}^c)$; // active packet set} \STATE Generate a dropped packet set $\rho[\ensuremath{t_{n\rightarrow r}},t_{ep}^c)$ based on $\Psi(t_{ep}^c)$ using the greedy heuristic{}; \STATE $\ensuremath{\mathcal{S}} \gets \ensuremath{\mathcal{S}} \bigcup \left\{\rho[\ensuremath{t_{n\rightarrow r}},\ensuremath{t_{ep}}^c)\right\}$; \ENDFOR \STATE{Select the $\rho[\ensuremath{t_{n\rightarrow r}},\ensuremath{t_{ep}}^*)$ with the minimum number of dropped packet in $\ensuremath{\mathcal{S}}$;} \STATE{Generate dynamic schedule $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}}^*)$ based on $\rho[\ensuremath{t_{n\rightarrow r}},\ensuremath{t_{ep}}^*)$ and $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}}^*)$;} \RETURN {$\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}}^*)$;} \end{algorithmic} \end{algorithm} } Alg. \ref{alg:greedy} describes how the greedy heuristic{} drops periodic packets. Given the static schedule $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$, a periodic packet set $\Phi = \{\chi_j | 1 \leq j \leq m\}$ in which each $\chi_j$ maintains a transmission vector $E_j = [\epsilon_j^1, \epsilon_j^2, \dots, \epsilon_j^n]$ is constructed (Lines \ref{line:periodic}$-$\ref{line:vector}). Considering the idle slots and rhythmic transmission slots in $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$, the greedy heuristic{} constructs a demand vector $[v_1, v_2, \dots, v_n]$ for all rhythmic packets in $\Psi(\ensuremath{t_{ep}})$ where $v_i$ captures the number of {\color{brown} additional} slots required by $\chi_{0,i}$ ($v_i = H_{0,i}-a_i$) (Line \ref{line:demand}). If all elements in the demand vector equal $0$, which means that the idle slots and rhythmic transmission slots in the static schedule are sufficient to accommodate all rhythmic packets in $\Psi(\ensuremath{t_{ep}})$, no packet needs to be dropped and an empty set is returned (Lines \ref{line:idles}$-$\ref{line:idlee}). Otherwise, the heuristic drops packets in a greedy fashion as follows. In each iteration, periodic packet $\chi_{max}$ with the maximum $\sum_{i=1}^n \epsilon_j^i$ in $\Phi$ is added into the dropped packet set and removed from $\Phi$ (Line \ref{line:max}$-$\ref{line:remove}). Then the algorithm updates $\Psi(\ensuremath{t_{ep}})$'s demand vector by subtracting $\epsilon_{max}^i$ for each $v_i$ (Lines \ref{line:demands}$-$\ref{line:demande}). If all rhythmic packets are schedulable, {\em i.e.}, each $v_i$ equals $0$, after dropping $\chi_{max}$, the dropped packet set $\rho[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ is returned (Lines \ref{line:returns}$-$\ref{line:returne}). Otherwise, the transmission vector of each periodic packet $\chi_j$ is updated according to the status of rhythmic packets (Line \ref{line:update}). Specifically, if rhythmic packet $\chi_{0,i}$ is already schedulable, {\em i.e.}, $v_i=0$, $\epsilon_j^i$ is set to $0$. If $0 < v_i < \epsilon_j^i$ which means dropping $\chi_j$ is redundant to schedule $\chi_{0,i}$, we have $\epsilon_j^i = v_i$. This process repeats until all rhythmic packets are schedulable and a dropped packet set is returned. { The time complexity of the packet dropping heuristic, Algorithm~\ref{alg:greedy}, is $O(n\cdot m)$ where $n$ and $m$ are the number of rhythmic and periodic packets in the dynamic schedule, respectively.} \subsection{Unreliable Network Setting}\label{sec:reliability} { { In the discussion above}, we have assumed that all links in the RTWN are reliable, i.e., $\forall e, \lambda^L_e = 100\%$. { With this assumption,} both timing and reliability requirements of each task can be directly satisfied when $H_i$ transmission slots are allocated for each packet and no retransmission slot is needed. Although this assumption simplifies the algorithm design and analysis, it is not realistic in real-life settings considering the lossy nature of wireless links. Thus, { in this subsection} we consider unreliable links and extend {FD-PaS}\xspace{} to handle disturbance considering both timing and reliability requirements for each task. For RTWNs containing unreliable links, a retransmission mechanism is required and each packet may be assigned multiple retransmission slots in the static schedule according to the link quality on the routing path. After the system enters the rhythmic mode, Alg. \ref{alg:greedy} can still be applied if we do not differentiate transmission and retransmission slots allocated for each packet. That is, if any assigned slot of a periodic packet is determined to be occupied by a rhythmic transmission in the dynamic schedule, all its associated transmissions and retransmissions along the routing path will be dropped as well. However, this causes the system performance, in terms of both timing and reliability, to drop significantly { since some of the dropped periodic transmissions may be kept to deliver this periodic packet. } Then, the challenge is to determine the dropped periodic transmission set, denoted as $\rho^*[\ensuremath{t_{n\rightarrow r}}, t_{ep})$, which leads to the minimum reliability degradation on periodic tasks ({\em i.e.}, solving the problem defined in Eq. (\ref{eq:min})). \eat{ {\color{red} Discuss the scenarios and notations used in the static mode (e.g. retry vector and PDR functions) and explain why we don't need to consider {FD-PaS}\xspace{} in the static case.} \noindent \textbf{Problem 1.2*}: Given the active packet set $\Gamma$, the static schedule \ensuremath{S}{}, the PDR function $\lambda^*_i(\cdot)${} and the retry vector function $\overrightarrow{R}^*_i(\cdot)${} of each task $\tau_i$, determine the dynamic schedule $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, t_{ep})$ in which the total reliability degradation is minimized, i.e., \begin{equation} \forall \chi_{i,j} \in \Gamma, \min \sum \delta_{i,j}. \end{equation} and Constraint \ref{cons:peri} and the following constraint are satisfied. \begin{constraint} All rhythmic packets are reliably delivered by their deadlines. \end{constraint} } Apparently, the packet dropping problem in Sec. \ref{ssec:drop}, where dropping any transmission leads the same reliability degradation $\lambda^R$, is a special case of the transmission dropping problem considering unreliable link. Thus, according to Lemma~\ref{lem:np}, the following theorem holds and the proof is { omitted}. \begin{theorem}\label{thm:np_reliable} { Generating a dynamic schedule with the minimum reliability degradation, {\em i.e.} solving {\bf Problem 1.2}{}, is NP-hard.} \end{theorem} Next we focus on solving the transmission dropping problem and propose another heuristic. Note that, a packet may still be delivered even if some retransmissions are replaced by rhythmic transmissions. Thus, instead of dropping the packet contributing the maximum number of slots in Alg. \ref{alg:greedy}, the key idea of the heuristic is to drop the periodic transmission which results in the minimum reliability degradation at each iteration. In the following we first describe the calculation of the reliability degradation for each transmission. Given the PDRs of all the links along the routing path of $\tau_i$ and the retry vector $\overrightarrow{R}_{i,k}$, the reliability value of $\chi_{i,k}$, $\lambda_{i,k}$, can be derived as: \begin{equation} \label{equ:pdr} \lambda_{i,k} = \prod_{h=0}^{H_i-1}1-(1-\lambda^L_{L_i[h]})^{R_{i,k}[h]}. \end{equation} If a retransmission of $\chi_{i,k}$ at $h$-th hop is dropped, the updated reliability value can be readily computed using Eq. (\ref{equ:pdr}) by updating $R_{i,k}[h]$ in the retry vector. The reliability degradation, then, is the difference between the two PDR values. Alg. \ref{alg:greedy_r} describes the generation of the dropped transmission set using the heuristic. In the initialization phase, the periodic packet set and the rhythmic demand vector are constructed (Lines \ref{line:periodic_r} - \ref{line:demand_r}), and in Lines \ref{line:idles_r} - \ref{line:idlee_r} we check whether any periodic transmission needs to be dropped in the dynamic schedule. If so, we drop periodic transmissions in a greedy manner. At each iteration, we select the periodic transmission $\chi_{j}(min)$ with the minimum reliability degradation according to the discussion above (Lines \ref{line:tran_min}). If any time slot of $\chi_{j}(min)$ falls into the time window of any rhythmic packet needing extra slot to transmit, it is added into the dropped transmission set and the rhythmic demand vector is updated correspondingly (Lines \ref{line:min_use}-\ref{line:vi}). Otherwise, $\chi_{j}(min)$ is kept and cannot be selected in the future. If all rhythmic packets are schedulable, the dropped transmission set $\rho^*[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$ is returned. \begin{algorithm}[tb] \caption{Transmission Dropping Heuristic} \label{alg:greedy_r} {\textbf{Input:} $\Psi(\ensuremath{t_{ep}})$, $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$}\\ {\textbf{Output:} $\rho^*[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$} \begin{algorithmic}[1] \small \STATE{ $\Phi \gets$ periodic packet set $\{\chi_j | 1 \leq j \leq m\}$;} \label{line:periodic_r} \STATE{ Construct $\Psi(\ensuremath{t_{ep}})$'s demand vector $[v_1, v_2, \dots, v_n]$ considering the idle slots and rhythmic transmission slots in $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$;} \label{line:demand_r} \IF {each $v_i$ equals $0$} \label{line:idles_r} \RETURN {$\emptyset$;} \ENDIF \label{line:idlee_r} \WHILE {true} \STATE{Select the periodic transmission $\chi_{j}(min)$ with the minimum reliability degradation from all $\chi_j$ in $\Phi$;}\label{line:tran_min} \IF{$\chi_{j}(min)$ can be utilized by any rhythmic packet $\chi_{o,i}$ with $v_i > 0$} \label{line:min_use} \STATE{Drop $\chi_{j}(min)$ and update $\chi_{j}$ in $\Phi$;} \STATE{$\rho^*[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}}) \gets \rho^*[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}}) \bigcup \{\chi_{j}(min)\}$;} \STATE{$v_i \gets v_i - 1$;}\label{line:vi} \ELSE \STATE{$\chi_{j}(min)$ cannot be selected;} \STATE{Continue;} \ENDIF \IF{each $v_i$ equals $0$}\label{line:returns_r} \RETURN{$\rho^*[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$;} \ENDIF\label{line:returne_r} \ENDWHILE \end{algorithmic} \end{algorithm} The time complexity of the dropped transmission determination is $O(n\cdot m \cdot w^+)$ where $n$ and $m$ are the numbers of rhythmic and periodic packets in the dynamic schedule, respectively. $w^+$ is the number of slots assigned to each periodic packet in the static schedule. Finally, with the dropped packet (transmission) set being determined, each node in $\mathbf{V}_{rhy}${} can readily generate the dynamic schedule to solve {\bf Problem 1.2}{} which is summarized in Alg.~\ref{alg:dynamic}. According to our testbed experiments in Sec. \ref{sec:testbed}, all nodes have runtime less than 1ms (within one time slot of 10ms) to complete the dynamic schedule generation. Note that the proposed {FD-PaS}\xspace{} framework can be readily modified to handle disturbances in networks that adopt the PBS model. The only difference appears at the selection of the periodic transmission with the minimum reliability degradation (Line \ref{line:tran_min} in Alg. \ref{alg:greedy_r}). Since time slots are allocated to each individual packet instead of transmission in the PBS model, we select the periodic {\em packet} with the minimum reliability degradation if one of the assigned slots is replaced by a rhythmic transmission. For computing the reliability value of each packet in the PBS model, readers can refer to \cite{flexible}. } \begin{algorithm}[tb] \caption{Dynamic Schedule Generation} \label{alg:dynamic} \small {\textbf{Input:} $t_{ep}^u$, $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, t_{ep}^u)$}\\ {\textbf{Output:} $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}})$} \begin{algorithmic}[1] \STATE {Construct the end point candidate set $\{t_{ep}^c\}$ according to (\ref{eq:endpoint});} \FOR {($\forall t_{ep}^c \in \{t_{ep}^c\}$)} \STATE {Construct $\Psi(t_{ep}^c)$; // active packet set} \IF{The network is reliable} \STATE { Generate dropped packet set $\rho[\ensuremath{t_{n\rightarrow r}},t_{ep}^c)$ using Alg.~\ref{alg:greedy};} \ELSE \STATE { Generate dropped transmission set $\rho^*[\ensuremath{t_{n\rightarrow r}},t_{ep}^c)$ using Alg.~\ref{alg:greedy_r};} \ENDIF \STATE { $\ensuremath{\mathcal{S}} \gets \ensuremath{\mathcal{S}} \bigcup \left\{\rho[\ensuremath{t_{n\rightarrow r}},\ensuremath{t_{ep}}^c) (\rho^*[\ensuremath{t_{n\rightarrow r}},\ensuremath{t_{ep}}^c)\right\}$;} \ENDFOR \STATE { Select the $\rho[\ensuremath{t_{n\rightarrow r}},\ensuremath{t_{ep}}^*)$ ($\rho^*[\ensuremath{t_{n\rightarrow r}},\ensuremath{t_{ep}}^*)$) with the minimum number of dropped packets (minimum reliability degradation) in $\ensuremath{\mathcal{S}}$;} \STATE { Generate dynamic schedule $\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}}^*)$ based on $\rho[\ensuremath{t_{n\rightarrow r}},\ensuremath{t_{ep}}^*)$ ($\rho^*[\ensuremath{t_{n\rightarrow r}},\ensuremath{t_{ep}}^*)$) and static schedule $\ensuremath{S}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}}^*)$;} \RETURN {$\ensuremath{\tilde{S}}[\ensuremath{t_{n\rightarrow r}}, \ensuremath{t_{ep}}^*)$;} \end{algorithmic} \end{algorithm} \section{Performance Evaluation} \label{sec:simulation} In this section, we present key performance results from both testbed experiments and simulation studies to evaluate the performance of the {FD-PaS}\xspace{} framework in RTWNs. { The testbed implementation is to validate the correctness of the proposed {FD-PaS}\xspace{} framework and to obtain overhead in real applications. Extensive simulations are for performance evaluation since they allow us to easily vary taskset and network specifications to study the trend. Below we first introduce the experiments from our testbed.} \subsection{Testbed Implementation and Evaluation}\label{sec:testbed} \begin{figure}[t] \centering \includegraphics[width=0.95\columnwidth]{Figures/realtestbed.jpg} \caption{\small Overview of the testbed for {{FD-PaS}\xspace{}} functional validation} \label{fig:realtestbed} \end{figure} \begin{figure}[t] \centering \resizebox{0.95\columnwidth}{!}{\input{Figures/latency.tikz}} \caption{Experiment setup for the measurement of latency} \label{fig:latencysetup} \end{figure} {{ Our testbed is based on OpenWSN stack~\cite{watteyne2012openwsn}, an open source implementation of the 6TiSCH protocol~\cite{RFC7554}. OpenWSN enables IPv6 network over the TSCH mode of IEEE 802.15.4e MAC layer. A typical OpenWSN network consists of an OpenWSN Root and several OpenWSN devices, as well as an optional OpenLBR (Open Low-Power Border Router) to connect to IPv6 Internet. It serves as a perfect platform to experiment our proposed {{FD-PaS}\xspace{}} framework on both the data link and application layers of the stack. We implemented {FD-PaS}\xspace{} on our RTWN testbed to validate the correctness of the design and evaluate its effectiveness for ensuring prompt response to unexpected disturbances. The MP-MAC{} was implemented by enhancing the MAC layer of the OpenWSN stack and the dynamic schedule generation algorithm (using the same code as in the simulation) was implemented in the application layer. In the following, we first present the implementation of MP-MAC{} and its performance evaluation, and then validate the correctness of {FD-PaS}\xspace{} in a multi-task multi-hop RTWN. As shown in Fig.\ref{fig:realtestbed}, our testbed consists of 7 wireless devices (TI CC2538 SoC + SmartRF evaluation board). One of them is configured as the root node (controller node) and the rest are device nodes to form a multi-hop RTWN. A CC2531 sniffer is used to capture the packet. A 8-Channel Logic Analyzer is used to record device activities by physical pins, in order to accurately measure the timing information among different devices. Fig.~\ref{fig:latencysetup} shows the experiment setup for the measurement of application layer performance. } } \begin{table}[t] \caption{\small Slot Timing Information of MP-MAC{}} \label{tab:time_const} \centering \begin{tabular}{|c|c|c|c|} \hline Parameters & Value ($\mu$s) & Parameters & Value ($\mu$s) \\ \hline SlotDuration & 10,000 & LongGT & 2,200 \\ TxOffset & 2,120 & ShortGT & 1,000 \\ TxAckDelay & 1,000 & PriorityTick & 30 to 400 \\ \hline Ext. SlotDuration & 10,800 & Extended LongGT & 3,000 \\ \hline \end{tabular} \end{table} \begin{figure}[t] \centering \includegraphics[width=0.8\columnwidth]{Figures/PriorityTick.pdf} \caption{\small Priorities and PER vs. PriorityTick.}\label{fig:PriorityTick} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.8\columnwidth]{Figures/latency.pdf} \caption{\small Measurement of latency and PDR.}\label{fig:latency} \end{figure} \subsubsection{Implementation and Evaluation of MP-MAC{}} For fair comparison with PriorityMAC~\cite{prioritymac}, we used the 10ms slot timing of 802.15.4e in the MP-MAC{} implementation. Since PriorityMAC adds two subslots (0.4ms each) before each time slot, we also extended the SlotDuration and LongGT of {MP-MAC{}} by 0.8ms each. Table~\ref{tab:time_const} summarizes the slot timing of {MP-MAC{}}, and the \emph{Adjusted TxOffset} is computed as follows: $$\text{\em Adjusted TxOffset} = \text{\em TxOffset} + \text{(Priority Level)} \times \text{\em PriorityTick};$$ \vspace{-0.2in} With a given extended SlotDuration, the number of priority levels that {MP-MAC{}} can support, denoted as $N$, is a function of {\em PriorityTick}. In our {MP-MAC{}} implementation, $N$ is computed by $N = \left \lfloor{\frac{0.8ms}{\text{\em PriorityTick}}}\right \rfloor +1$. Fig.~\ref{fig:PriorityTick}(a) shows how $N$ changes when the {\em PriorityTick} varies from 30$\mu$s to 400$\mu$s with a step size of 30$\mu$s (the timer resolution in the OpenWSN stack). Compared to PriorityMAC which can only support 3 effective priority levels, {MP-MAC{}} can support up to 14 priority levels in theory by extending the time slot with the same amount (0.8ms). {\color{brown} Fig.~\ref{fig:PriorityTick}(a) also illustrates the bandwidth improvement, defined as $\frac{10.8ms}{10ms + 2 \times PriorityTick} \times 100\%$, when MP-MAC{} only needs to maintain 3 priority levels. It can be seen that the bandwidth is improved by $7\%$ due to the reduction of the {\em PriorityTick} from $400\mu$s to $30\mu$s with 3 priority levels.} \begin{figure*}[t] \centering {{} \subfloat[Legends used in the figures\label{fig:final_validation:legend}]{ \includegraphics[width=0.99\textwidth,page=4]{Figures/waveform.pdf} }\\ \subfloat[Nominal mode { (time slot 1-60)}\label{fig:final_validation:a}]{ \includegraphics[width=0.99\textwidth,page=1]{Figures/waveform.pdf} }\\ \subfloat[Rhythmic mode using {FD-PaS}\xspace{} { (time slot 61-120)}\label{fig:final_validation:b}]{ \includegraphics[width=0.99\textwidth,page=2]{Figures/waveform.pdf} }\\ \subfloat[Rhythmic mode using r{FD-PaS}\xspace{} { (time slot 61-120)}\label{fig:final_validation:c}]{ \includegraphics[width=0.99\textwidth,page=3]{Figures/waveform.pdf} } \vspace{-0.05in} \caption{\small Slot information and radio activities in the test case captured by Logic Analyzer} \label{fig:final_validation} \vspace{-0.1in} } \end{figure*} \vspace{0.025in} \noindent {\bf Measurement of Packet Error Rate (PER):} Reducing the size of {\em PriorityTick} can support a larger number of priority levels in the RTWN system. Setting the {\em PriorityTick} too small, however, either causes nodes to lose synchronization, or make low priority senders unable to detect high priority packet transmissions and cause transmission collisions. It is thus important to identify safe {\em PriorityTick} values to make {MP-MAC{}} work appropriately. For this purpose, we set up a testing network with two senders talking directly to one receiver. We intentionally configure the senders to transmit in the same time slot and assign them with different priorities (using $D$ to denote the distance between the priority levels), and measure the number of correctly received packets on the receiver side. {{}We define Packet Error Rate (PER) as the number of the failed transmissions divided by the number of total transmissions.} During the test, each sender generates 10,000 packets. Fig.~\ref{fig:PriorityTick}(b) shows the PER of the high priority packets by varying the size of {\em PriorityTick} from $400\mu$s to $30\mu$s. The PER of the low priority packets are always 100\%, and are thus omitted in the figure. It can be observed that {MP-MAC{}} works properly under most of the {\em PriorityTick} settings. Its PER only increases when the {\em PriorityTick} is reduced to $30\mu$s. This indicates that the {MP-MAC{}} implementation on our device node (TI CC2538 SoC) can safely support up to 9 priority levels when the {\em PriorityTick} is set to be no less than $60\mu$s. When the {\em PriorityTick} is set at $30\mu$s, it also can be observed from Fig.~\ref{fig:PriorityTick}(b) that the PER will drop (from around 10\% to 5\%) when the distance between the two priority levels increases (from $D=1$ to $D=2$). \vspace{0.025in} \noindent {\bf Measurement of Application Layer {\color{brown} Performance}:} {\color{brown} To see how MP-MAC{} behaves in terms of packet transmission latency and packet drop rate (PDR) for different priority levels,} we set up a testing network with three senders and a controller node. The three senders are assigned with different priorities (high, medium and low). Their schedules are configured in a way that they transmit in the same time slot every slotframe (with a length of $165m$s). The retransmission mechanism is enabled on all the senders so that if collision happens, the failed transmission retries in the next slotframe until a maximum number of $5$ retries is reached, and the packet is then dropped. {{}We define packet drop rate (PDR) as the number of dropped packets divided by the number of total packets.} We connect the controller node to a STM32F103 MCU through a UART port to control the packet generation on the senders. This STM32F103 MCU connects to the GPIO of each sender, and uses a pulse signal to trigger the sender to generate a packet. In the experiments, the controller node initiates and timestamps the packet generation. By comparing it to the timestamp of the packet reception, the application layer latency is obtained. After a successful packet reception, the controller node waits for a randomly selected time interval, and then triggers the next packet generation. {\color{brown} To test latency and packet drop rate, w}e gradually reduce this time interval to increase the traffic volume. This will cause more transmission collisions in the network, which leads to more packet retransmissions and packet drop. Fig.~\ref{fig:latency}(a) and (b) show the PDR and application layer latency respectively for the three senders during the test. From the results, we observe that the packets from the high priority sender can always be transmitted in its first attempt while the medium and low priority senders have to yield upon collision by retransmission in future slotframes and suffer longer application layer latency. Similarly, when collision happens with the packets from the medium priority sender, the low priority sender has to yield again thus it is observed to have the longest latency. In Fig.~\ref{fig:latency}(a), we note that the high priority packets can always guarantee the delivery and thus its PDR is consistently 0. On the other hand, both the low priority sender and medium priority sender experience increasing packet losses when the volume of the network traffic grows, and the impact on the low priority sender is more severe. \subsubsection{Functional validation in a multi-task multi-hop RTWN} We validate the correctness and effectiveness of {FD-PaS}\xspace{} by deploying it on a 7-node multi-hop network as shown in Fig.~\ref{fig:structure}. The system running in the network consists of three tasks, {{} $\tau_0=\{\{V_0, V_1, V_c, V_3, V_4\}, 15, 8\}, \tau_1=\{\{V_2, V_c, V_3\}, 30, 6\}$ and $\tau_2=\{\{V_1, V_c, V_5\}, 20, 4\}$.} For each task, the first element denotes the routing path and the second one denotes its period (relative deadline). {{} The third element represents the number of slots assigned to $\tau_i$, {\em i.e.} $w^+_i$, in the static schedule. We further assume that $\tau_0$ is the rhythmic task and $\overrightarrow{P_0} (\overrightarrow{D_0}) = [12, 12, 12, 12, 12]$}. The system starts running in the nominal mode at slot 1 and then switches to the rhythmic mode from slot 61. We use a Logic Analyzer to capture the radio activities from a pin of each device during time slot 1 - 120. In order to validate the effectiveness of {FD-PaS}\xspace{} in both reliable and lossy RTWNs, we deploy the heuristic presented in Alg.~\ref{alg:greedy} to determine the dropped packet set and use the heuristic in Alg.~\ref{alg:greedy_r} to determine the dropped transmission set, respectively. For the sake of clarity, we denote the latter as r{FD-PaS}\xspace{}. \footnote{Both TBS and PBS models are tested. For simplicity, only the result from TBS is illustrated.} The captured results on our testbed are illustrated in Fig.~\ref{fig:final_validation}. Specifically, {{} Fig.~\ref{fig:final_validation:legend} summarizes the legends}. Fig.~\ref{fig:final_validation:a} shows the system nominal mode during time slot 1-60. Fig.~\ref{fig:final_validation:b} and Fig.~\ref{fig:final_validation:c} demonstrate the system rhythmic modes using {FD-PaS}\xspace{} and r{FD-PaS}\xspace{} during time slot 61-120, respectively. {{} In Fig.~\ref{fig:final_validation:a}, \ref{fig:final_validation:b}, and \ref{fig:final_validation:c}, 7 waveforms represent the radio activities (transmitting, receiving, or listening) for all the 7 nodes, as labeled on the left side of the figures. Each falling or rising edge of the waveform in the \emph{Slot} row (lower part of the figures) marks the start of a new slot. In the bottom \emph{Schedule} row, slot assignments are indicated using different colors and patterns. Each colored small block indicates the release time of the corresponding task at a certain node. Each transmission is denoted by a colored arrow of which the starting and ending points represent the sending and receiving nodes, respectively. In the rhythmic mode, a colored circle denotes a dropped periodic transmission preempted by a rhythmic one. For example, in Fig.~\ref{fig:final_validation:a}, $\tau_1$ releases its first packet at slot $1$ and is transmitted from $V_2$ to $V_c$ at slot 15. Fig.~\ref{fig:final_validation:a} illustrates radio activities of the system in the nominal mode (1-60 slots), after which the system switches to the rhythmic mode. Given by the static schedule, each packet $\chi_{i,k}$ is allocated with extra slots for retransmission in the system nominal mode. But according to our testbed result shown in Fig.~\ref{fig:final_validation:a}, each transmission successes in its first assigned time slot without using any retransmission slot. During the rhythmic mode (slot 61-120), task $\tau_0$ releases 5 packets as indicated in Fig.~\ref{fig:final_validation:b} and Fig.~\ref{fig:final_validation:c}. To accommodate the increased workload in the system rhythmic mode, {FD-PaS}\xspace{} determines to drop both two packets of $\tau_1$ released in the system rhythmic mode. Since the sender of $\tau_1$, {\em i.e.} $V_2$, does not receive the disturbance information, it still follows the static schedule to transmit $\tau_1$ at the assigned slots ({\em e.g.} 75). However, to ensure the transmission of the rhythmic packets, all these periodic transmissions are preempted under our designed MP-MAC{} mechanism (indicated by circles). By contrast, r{FD-PaS}\xspace{} chooses not to completely drop two packets of $\tau_1$ but to reduce the number of slots assigned to $\tau_1$'s packets both from 6 to 4. In this case, both packets of $\tau_1$ still have chances to be successfully transmitted to the destination as illustrated in Fig.~\ref{fig:final_validation:c}. This significantly increases the reliability of $\tau_1$ compared to that under the dropping decision made by {FD-PaS}\xspace{}. These results above match those from the simulation of {FD-PaS}\xspace{} and r{FD-PaS}\xspace{} under the same experiment settings.} \section{Performance Evaluation} \label{sec:simulation} \subsection{Simulation Studies} \subsubsection{Simulation Setup}\label{ssec:setup} In the simulation studies, we compare {{FD-PaS}\xspace{}} with both OLS and {D$^2$-PaS}\xspace{} approaches that are able to handle unexpected external disturbances in RTWNs. The following two key performance metrics are used in the studies. \noindent {\bf Success Ratio (SR)}: SR is defined as the fraction of feasible task sets over all the generated task sets. A task set is feasible only if a specified DRT can be achieved. { \noindent {\bf Degradation Rate (DR)}: DR is defined as the ratio between the sum of reliability degradation from all periodic packets ({\em i.e.} $\sum \delta_{i,k}$) and the total number of generated periodic packets in the system rhythmic mode. } For fair comparison, we use randomly generated task sets. Each random task set is generated according to a target nominal utilization $U^*$ and by incrementally adding random periodic tasks to an initially empty set $\mbox{$\mathcal{T}$}$. The generation of each random task $\tau_i$ is controlled by the following parameters: (i) the number of hops $H_i$ drawn from the uniform distribution over $\{2, 3, \dots, 16\}$, (ii) nominal period $P_i$ drawn from the uniform distribution over $\{H_i, \dots, 500\}$, and (iii) nominal relative deadline $D_i$ equal to period $P_i$\footnote{ The unit of $P_i$ and $D_i$ values is one time slot and the range of the parameters are determined according to realistic RTWN applications.}. { To guarantee reliable transmission, we use the TBS model to determine the number of slots assigned for each packet according to Eq. (\ref{equ:pdr}).} After all tasks in $\mbox{$\mathcal{T}$}$ are generated, we randomly select one of them as the rhythmic task $\tau_0$ and assume that the disturbance is detected at the $k$-th instance of $\tau_0$ where $k$ is randomly selected from $\{1, \dots, 20\}$. The period vector $\overrightarrow{P_0}$ ($\overrightarrow{D_0}=\overrightarrow{P_0}$) is generated by controlling the following parameters: (i) the number of elements in $\overrightarrow{P_0}$, $R$, and (ii) the initial rhythmic period ratio, $\gamma = P_{0,1} / P_0$. To better control the workload of the rhythmic task, we fix $\gamma$ to $0.2$ and tune $R$ which can be any integer in the set of $\{4,6,\dots,16\}$. Given $\gamma$ and $R$, the value of each rhythmic period $P_{0,k}$ can be computed by $P_{0,k} \, (1 \leq k \leq R) = \lfloor P_0 \times (\gamma + (k-1) \times \frac{1-\gamma}{R})\rfloor$. Additional parameters needed are summarized as follows: 1) the maximum allowed DRT $\alpha$ which is some integer multiple of the nominal period of the rhythmic task $P_0$; 2) the end point scaling factor $\beta$ which determines the upper bound of the end point $t_{ep}^u$ where $t_{ep}^u = \ensuremath{t_{r\rightarrow n}} + (\beta-1) \times P_0$. Naturally, a larger $\beta$ will lead to better performance in terms of { a lower reliability degradation} but may cause longer DHL. To keep $\beta$ as small as possible without performance degradation, we set $\beta = 4$ which means the disturbance must be completely handled within 3 nominal periods after the rhythmic task returns to its nominal state. Other parameters used in OLS and {D$^2$-PaS}\xspace{}, {\em e.g.} the payload size of a broadcast packet, are set to the same as that in \cite{zhang2017distributed} for fair comparison. \eat{ \begin{figure*}[t] \begin{minipage}[t]{0.33\textwidth} \centering \resizebox{0.9\columnwidth}{!}{\input{Simulations/Rrate.tikz}} \caption{\small Comparison of the average PDR degradation rate} \label{fig:dr} \end{minipage} \begin{minipage}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Figures/PriorityTick_PL.pdf} \caption{\small Priorities and PER vs. PriorityTick} \label{fig:PriorityTick} \end{minipage} \begin{minipage}[t]{0.35\textwidth} \includegraphics[width=\textwidth]{Figures/latency.pdf} \caption{\small Measurement of latency and PDR} \label{fig:latency} \end{minipage} \end{figure*} } \begin{figure} \centering \includegraphics[width=0.9\columnwidth]{Simulations/SR.pdf} \caption{\small Comparison of SR with a nominal utilization $U^*=0.5$ }\label{fig:sr} \end{figure} \subsubsection{Simulation Results} In the first set of experiments, we compare the SR of OLS, {D$^2$-PaS}\xspace{} and {FD-PaS}\xspace{} for randomly generated task sets with a nominal utilization $U^*=0.5$ (see Fig.~\ref{fig:sr}) by varying the maximum allowed DRT, $\alpha$, from $P_0$ to 6$P_0$, with a step size of $P_0$. The results with other target nominal utilization show similar behavior and thus are omitted. In the experiments, each data point is based on 10,000 randomly generated task sets. As can be observed from Fig.~\ref{fig:sr}, {D$^2$-PaS}\xspace{} and OLS have exactly the same SR because they both rely on a broadcast packet to propagate the disturbance information to the entire network. Under {D$^2$-PaS}\xspace{} and OLS, the task sets are all feasible only when $\alpha=6P_0$, {\em i.e.}, the maximum allowed DRT is set to be $6$ nominal periods of the rhythmic task. However, in most practical settings, the RTWN is required to provide fast response to the disturbance within one nominal period, {\em i.e.}, $\alpha=P_0$. In this case, the SR of both {D$^2$-PaS}\xspace{} and OLS drops to $25\%$. On the other hand, {FD-PaS}\xspace{} can always achieve $100\%$ SR since the RTWN can start handling disturbance from the beginning of the next nominal period as required by Constraint (i) of {\bf Problem 1}{} in {FD-PaS}\xspace{}. In the second set of experiments, we compare the average DR of OLS, {D$^2$-PaS}\xspace{} and {FD-PaS}\xspace{} by varying the nominal utilization $U^*$ of the randomly generated task sets and the number of rhythmic periods $R$ of the selected rhythmic task. { As both OLS and {D$^2$-PaS}\xspace{} do not consider unreliable links in packet scheduling, we first extend them to support reliable transmission. Specifically, all packets in OLS and {D$^2$-PaS}\xspace{} are reliably transmitted using $w_i^+$ slots in the static schedule. In the dynamic schedule, transmission and retransmission slots assigned to each packet are not differentiated, {\em i.e.}, each packet can either be reliably scheduled or dropped. For our proposed framework, both {FD-PaS}\xspace{} and r{FD-PaS}\xspace{} are simulated to determine the dropped packet and transmission sets in reliable and lossy RTWNs, respectively.} \begin{figure} \centering \includegraphics[width=0.8\columnwidth]{Simulations/DR_U.pdf} \caption{\small Comparison of DR with $R=10$.}\label{fig:dr_u} \vspace{-0.1in} \end{figure} \begin{figure} \centering \includegraphics[width=0.8\columnwidth]{Simulations/DR_R.pdf} \caption{\small Comparison of DR with a nominal utilization $U^*=0.9$.}\label{fig:dr_r} \end{figure} { Fig.~\ref{fig:dr_u} and Fig.~\ref{fig:dr_r} summarize the average DR as a function of $U^*$ and $R$, respectively, where each data point is the average value of $1,000$ trials. From the figures, we can observe that both {FD-PaS}\xspace{} and r{FD-PaS}\xspace{} have significantly lower average DR over OLS ($53\%$ on average and $82\%$ in the best case). The much higher DR of OLS is due to OLS's large broadcast overhead resulted from the centralized approach. Compared to {D$^2$-PaS}\xspace{}, {FD-PaS}\xspace{} drops around $12\%$ more periodic packets on average since {FD-PaS}\xspace{} makes local packet dropping decisions thus tends to drop more packets. On the other hand, r{FD-PaS}\xspace{} has slightly higher average DR over {D$^2$-PaS}\xspace{} ($1.4\%$ on average), which is contrary to our expectation since r{FD-PaS}\xspace{} has higher flexibility on adjusting the dynamic schedule. The main reason here is that the {FD-PaS}\xspace{} framework suffers from the possibility of infeasible end point selection since the system must reuse the static schedule { after a well-selected end point}. Nonetheless, with the significant improvement in the average success ratio ($75\%$ when the maximum allowed DRT is set to be $P_0$), the degradation in DR is acceptable. } { Another} observation from Fig.~\ref{fig:dr_r} is that the average DR of {FD-PaS}\xspace{} first drops when $R$ increases from $4$ to $10$, and then increases when $R$ keeps increasing from $10$ to $16$. One would expect that the average DR should monotonically increase when both $U^*$ and $R$ increase (as the case for both OLS and {D$^2$-PaS}\xspace). Through extensive simulation studies (detailed results are omitted due to page limit), we observe that the average DR of {FD-PaS}\xspace{} is highly dependent on {\em slot utilization} (fraction of number of slots contributed by the dropped periodic packets, used by rhythmic packets). When $R$ increases from a small value ({\em e.g.}, 4), the slot utilization also increases\footnote{For example, when $R$ is small, even if the rhythmic packet only needs one slot from a periodic packet, the whole periodic packet has to be dropped and all its other assigned slots are wasted.}. That is, though we need to drop more packets when the workload of the rhythmic task increases, the number of dropped packets grows more slowly than the number of packets in the system rhythmic mode. This explains why the DR of {FD-PaS}\xspace{} decreases when $R$ increases from $4$ to $10$. On the other hand, we found that when $R$ keeps increasing, the slot utilization starts decreasing, and the number of dropped packets grows faster than the total number of packets in the system rhythmic mode. This leads to the observation that the DR of {FD-PaS}\xspace{} starts to increase from $10$ to $16$. \section{Related Work}\label{sec:related} Network resource management in RTWNs in the presence of unexpected disturbances has drawn a lot of attention in recent years. Traditional static packet scheduling approaches ({\em e.g.}, \cite{Han_RTAS11, Leng_RTSS14, Saifullah_RTSS10}), where decisions are made offline or only get updated infrequently can support deterministic real-time communication, but either cannot properly handle unexpected disturbances or must make rather pessimistic assumptions. Many centralized dynamic scheduling approaches for handling internal disturbances have been proposed ({\em e.g.}, \cite{Crenshaw_TECS07, Shen_WN13, ferrari2012low}). Studies on addressing external disturbances are relatively few and mostly rely on centralized decision making. The approach in~\cite{Sha_RTSS13} stores a predetermined number of link layer schedules in the system and chooses the appropriate one when disturbances are detected. However, this approach is either incapable of handling arbitrary disturbances or needs to make some approximation. Both \cite{Chipara_ECRTS11} and \cite{zimmerling2017adaptive} support admission control in response to adding/removing tasks for handling disturbances in the network. They however do not consider scenarios when not all tasks can meet their deadlines. The protocol in~\cite{Li2015Incorporating} proposes to allocate reserved slots for occasionally occurring emergencies (i.e., disturbances), and allow regular tasks to steal slots from the emergency schedule when no emergency exists. However, how to satisfy the deadlines of regular tasks in the presence of emergencies is not considered. In recent years, a number of algorithms have been designed for packet scheduling in Time Slotted Channel Hopping (TSCH) networks, in both centralized ({\em e.g.} \cite{palattella2013optimal,soua2012modesa,soua2013musika}) and distributed manner ({\em e.g.} \cite{tinka2010decentralized,morell2013label,soua2016wave}). Most of those approaches, however, assume static network topologies and fixed network traffic which limit their applications in dynamic networks. To overcome this drawback, \cite{duquennoy2015orchestra} proposes Orchestra, a distributed scheduling solution that schedules packet transmissions in TSCH networks to support real-time applications. However, Orchestra does not consider real-time constraint, {\em i.e.}, ignores the hard deadlines associated with tasks running in the network. It only provides best effort but no guarantee on the end-to-end latency of each task. In \cite{hong2015online}, a centralized dynamic approach, named OLS, to handle disturbances in RTWNs is proposed. OLS is built on a dynamic programming based approach which can be rather time consuming even for relatively small RTWNs. Moreover, OLS may drop more periodic packets than necessary due to the limited payload size of the packet in RTWNs and thus further degrade the system performance. To overcome the drawbacks of OLS, {D$^2$-PaS}\xspace{} in \cite{zhang2017distributed,zhang2018distributed} proposes to offload the computation of the dynamic schedules to individual nodes locally by leveraging their local computing capabilities, that is, letting each node construct its own schedule so as to achieve better performance than OLS in terms of fewer dropped packets and lower time overhead. However, as observed from the motivating example presented in \cite{fdpas}, centralized approaches, including {{D$^2$-PaS}\xspace{}}, suffer from long disturbance response time especially in large RTWNs. Most MAC layer designs for supporting packet prioritization are based on star topology. For example, the wireless arbitration (WirArb) method~\cite{zheng2016wirarb} is designed to use different frequencies to indicate different priorities. It only supports star topology where the gateway keeps sensing the arbitration signals and determines which user has a higher priority to access the channel. \cite{shao2014multi} studies a similar problem in the context of vehicular Ad Hoc networks. The proposed multi-priority MAC protocol has seven channels, among which one is the public control channel (CCH) for safety action messages and the others are service channels for non-safety applications. The protocol transmits packets of different priorities with optimal transmission probabilities in a dynamic manner. The PriorityMAC~\cite{prioritymac} proposes to add two very short sub-slots before each time slot to indicate the priority. Four priority levels are defined but only three levels of over-the-air preemption can be achieved. The last priority level is only used for buffer reordering. In PriorityMAC, a higher priority packet indicates the priority in the sub-slots to deter the transmissions of lower priority packets. PriorityMAC is also based on star topology so each device must be directly connected to the coordinator. { A rich set of methods have been designed for RTWNs to improve the reliability of wireless packet transmission over lossy links in most RTWN solutions ({\em e.g.}, WirelessHART~\cite{song2008wirelesshart}, ISA 100.11a~\cite{isa10011a}, and 6TiSCH~\cite{dujovne20146tisch}). \cite{Han_RTAS11} proposed a set of reliable graph routing algorithms in WirelessHART networks to explore path diversity to improve reliability. \cite{probabilistic, flexible} proposed algorithms to allocate a necessary number of retransmision time slots to guarantee a desired success ratio of packet delivery. However, all aforementioned studies focus on packet scheduling in static RTWN settings over lossy links, and cannot be easily extended to handle abruptly increased network traffic caused by unexpected disturbances. } \section{Conclusion and Future Work} \label{sec:conclusions} In this paper, we propose {FD-PaS}\xspace{}, a fully distributed packet scheduling framework, to handle unexpected disturbances in lossy RTWNs. Unlike centralized approaches where dynamic schedules are generated in the controller node and disseminated to the entire network, {FD-PaS}\xspace{} makes on-line decisions to handle disturbances locally without any centralized control. Such a fully distributed framework not only significantly improves the scalability but also provides guaranteed fast response to external disturbances. Our {FD-PaS}\xspace{} framework including both the multi-priority data link layer design and the dynamic schedule construction method is implemented on our RTWN testbed. Extensive experiments have been conducted to validate its correctness and effectiveness. As future work, we will extend {FD-PaS}\xspace{} to support multi-channel settings and will explore how to handle concurrent disturbances in a fully distributed manner. \eat{Through this paper, we make the following contributions. (i) We propose a partial disturbance propagation scheme to achieve guaranteed fast disturbance response time. (ii) To avoid transmission collisions occurred between the dynamic and static schedules, we propose a multi-priority wireless packet preemption mechanism in the data link layer to guarantee that higher-priority rhythmic packets can always get delivered. (iii) To determine a temporary dynamic schedule for handling the disturbance, we formulate a packet scheduling problem to drop minimum number of packets. By proving that the packet dropping problem is NP-hard, we propose both an optimal ILP solution and an efficient heuristic to be executed by individual nodes locally.} \section{\@startsection{section}{1}{\z@}{1.5ex plus 1.5ex minus 0.5ex}% {0.7ex plus 1ex minus 0ex}{\bfseries\normalsize\centering\scshape}}% \def\subsection{\@startsection{subsection}{2}{\z@}{1.5ex plus 1.5ex minus 0.5ex}% {0.7ex plus .5ex minus 0ex}{\bfseries\normalsize\upshape}}% \def\subsubsection{\@startsection{subsubsection}{3}{\parindent}{0ex plus 0.1ex minus 0.1ex}% {0ex}{\bfseries\normalsize\itshape}}% \makeatother \newcommand{\stable}% {\textbf{$\lll$\underline{\textsc{Stable}}$\ggg$}\xspace% } \setlength{\textfloatsep}{0.3em} \setlength{\dblfloatsep}{0.3em} \newcommand{\sub}[2]{#1_{\mathit{#2}}} \newcommand{\sub{V}{DD}}{\sub{V}{DD}} \newcommand{$\mathcal{NP}$-hard\xspace}{$\mathcal{NP}$-hard\xspace} \newcommand{T_{\max}}{T_{\max}} \newcommand{t_{\max}}{t_{\max}} \newcommand{\mbox{$\hat T$}}{\mbox{$\hat T$}} \newcommand{\mathbf{T}}{\mathbf{T}} \newcommand{\mathit{MTTF}}{\mathit{MTTF}} \newtheorem{observation}{Observation} \newtheorem{definition}{Definition} \newtheorem{lem}{Lemma} \newtheorem{thm}{Theorem} \newtheorem{deff}{Definition} \newtheorem{Observation}{Observation} \def\equationautorefname{Eq.}% \def\figureautorefname{Fig.}% \def\tableautorefname{Tab.}% \def\algorithmautorefname{Alg.}% \def\sectionautorefname{Sec.}%
\section{Introduction} Renormalizable Quantum Field Theories (QFT) are the commonly used language to describe high-energy interactions in particle physics. They are considered as fundamental theories, in the sense that predictions can be obtained, at any desired perturbative order and scale, by consistently reabsorbing the ultraviolet (UV) infinities appearing in the intermediate stages of the calculation in the set $\{p_i\}$, $i= 1\div m$, of the free parameters of the Lagrangian \begin{eqnarray} {\cal L}(p_1,\ldots,p_m). \end{eqnarray} On the other hand, nonrenormalizable QFTs belong to a larger class of theories, namely the effective QFTs (EFT), and are extensively employed in cases when the fundamental renormalizable model is unknown, or not easily calculable. The problem of computing high-energy loop corrections in EFTs is usually dealt with by using the seminal Weinberg's approach \cite{Weinberg:1978kz}, in which higher dimensional operators $O_i$, compatible with the symmetries of the theory, are added to the lowest order Lagrangian $\cal L$ to reabsorb the UV infinities which remain after fixing the parameters of the model, \begin{eqnarray} {\cal L} \to {\cal L} + \sum_i C_i O_i := {\cal L} + {\cal L}_{\mbox{\tiny HD}}. \nonumber \end{eqnarray} By doing so order-by-order in the loop expansion, EFTs can be treated as ordinary renormalizable QFTs at the price of introducing a large set of Wilson coefficients $C_i$ (possibly, an infinite one) to be fixed by experiment. Of course, not all the $C_i$ are relevant at the energy scale under study. As a matter of fact, if $N$ is the number of independent kinematic invariants $s_n$, one organizes the EFT as a perturbative expansion in the ratios \begin{eqnarray} \label{eq:lambda} \lambda_n=s_n/{M^2_n},\hskip 10pt {n=1 \div N}, \end{eqnarray} where the $M_n$ are mass scales parameterizing the range of validity of the effective description \cite{Wilson:1971bg,Wilson:1971dh}. In this way, physical predictions can be obtained, order-by-order in the $\lambda_n$, in terms of a finite set of measurements. In \cite{Pittau:2013ica} a different way to include high-energy loop corrections in nonrenormalizable QFTs is presented based on FDR \cite{Pittau:2012zd}. In FDR UV divergences are eliminated by way of a redefinition of the loop integration that does not rely on an order-by-order renormalization. Hence, UV finite quantities are directly computed without adding ${\cal L}_{\mbox{\tiny HD}}$ to ${\cal L}$. The price of this is the appearance of an arbitrary renormalization scale $\mu_{\scriptscriptstyle R}$. In the case of renormalizable models, the dependence on $\mu_{\scriptscriptstyle R}$ disappears from physical predictions ${\cal O}^{\rm TH,\ell-loop}$, \begin{eqnarray} \label{eq:indmur} \frac{d {\cal O}^{\rm TH,\ell-loop}\big(\tilde p_1(\mu_{\scriptscriptstyle R}),\ldots,\tilde p_m(\mu_{\scriptscriptstyle R}),\mu_{\scriptscriptstyle R}\big) }{d \mu_{\scriptscriptstyle R}}= 0, \end{eqnarray} when they are expressed in terms of the set of parameters $\{\tilde p_i(\mu_{\scriptscriptstyle R})\}$ fixed by $m$ experiments ${\cal O}_i^{\rm EXP}$ determined up to the same perturbative order $\ell$ one is working, \begin{eqnarray} \label{eq:fit} \tilde p_i(\mu_{\scriptscriptstyle R}):= p_i^{\rm TH,\ell-loop}({\cal O}_1^{\rm EXP}\!,\ldots,{\cal O}_m^{\rm EXP}\!,\mu_{\scriptscriptstyle R}),\,i=1 \div m. \nonumber \\ \end{eqnarray} On the contrary, \eqref{eq:indmur} is not fulfilled, in general, by nonrenormalizable QFTs. However, in the procedure of \cite{Pittau:2013ica} $\mu_{\scriptscriptstyle R}$ is an adjustable parameter rather than a UV cutoff, \footnote{\label{foot:1} This means that, at any fixed value of $\mu_{\scriptscriptstyle R}$, the nonrenormalizable Lagrangian ${\cal L}$ describes a legitimate effective theory, even without adding ${\cal L}_{\mbox{\tiny HD}}$ to it.} so that an additional measurement ${\cal O}_{m+1}^{\rm EXP}$ can be used to fix it by imposing \begin{eqnarray} \label{eq:fix} {\cal O}_{m+1}^{\rm TH,\ell-loop}\big(\tilde p_1(\mu_{\scriptscriptstyle R}^\prime),\ldots,\tilde p_m(\mu_{\scriptscriptstyle R}^\prime),\mu_{\scriptscriptstyle R}^\prime\big)= {\cal O}_{m+1}^{\rm EXP}. \end{eqnarray} After this is done, observables different from those used to determine the model, \begin{eqnarray} {\cal O}_{i}^{\rm TH,\ell-loop}\big(\tilde p_1(\mu_{\scriptscriptstyle R}^\prime),\ldots,\tilde p_m(\mu_{\scriptscriptstyle R}^\prime),\mu_{\scriptscriptstyle R}^\prime\big),\hskip 10pt {i > m+1}, \end{eqnarray} can be predicted and tested experimentally. If in a given range of energy \begin{eqnarray} {\cal O}_{i}^{\rm TH,\ell-loop}\big(\tilde p_1(\mu_{\scriptscriptstyle R}^\prime),\ldots,\tilde p_m(\mu_{\scriptscriptstyle R}^\prime),\mu_{\scriptscriptstyle R}^\prime\big)= {\cal O}_{i}^{\rm EXP} \end{eqnarray} for a large class of observables ${i > m+1}$, the nonrenormalizable QFT can be used as a plausible effective model. In this work we study under which conditions a known renormalizable theory can be matched onto a low-energy nonrenormalizable effective model by means of the FDR approach. In this case, the matching condition \eqref{eq:fix} is replaced by \footnote{Here and in the following, amplitudes used to fix $\mu_{\scriptscriptstyle R}$ are denoted by the subscript $m+1$, while the label $i > m+1$ refers to processes different from those employed to determine the Lagrangian's parameters and the renormalization scale.} \begin{eqnarray} \label{eq:fix1} B_{m+1}^{\rm \ell-loop}(\lambda,\alpha,\mu_{\scriptscriptstyle R}^\prime)= A_{m+1}^{\rm \ell-loop}(\lambda,\alpha), \end{eqnarray} where $B_{m+1}$ and $A_{m+1}$ are amplitudes computed up to the $\ell^{th}$ order in the coupling constant $\alpha$ within the nonrenormalizable and renormalizable QFT, respectively, and $\lambda$ stands for all the $N$ ratios in \eqref{eq:lambda}. In particular, we derive the conditions to be obeyed by the coefficients of the perturbative expansion of equation \eqref{eq:fix1} for ensuring the independence of $\mu_{\scriptscriptstyle R}^\prime$ from kinematics. In addition, we conjecture that, when such a $\mu_{\scriptscriptstyle R}^\prime$ exists, additional independent amplitudes can be matched at $\lambda \ne 0$, \begin{eqnarray} \label{eq:matchtheo} B_i^{\rm \ell-loop}(\lambda,\alpha,\mu_{\scriptscriptstyle R}^\prime)= A_i^{\rm \ell-loop}(\lambda,\alpha),\hskip 10pt i> m+1, \end{eqnarray} if they coincide at $\lambda=0$, \begin{eqnarray} \label{eq:matchtheo0} B_i^{\rm \ell-loop}(0,\alpha,\mu_{\scriptscriptstyle R}^\prime)= A_i^{\rm \ell-loop}(0,\alpha),\hskip 10pt i> m+1. \end{eqnarray} At the present stage of our investigation we cannot prove this in general. However, it holds true when the $A_i$ are resummed one-fermion-loop amplitudes computed in the full electroweak theory and the $B_i$ are calculated in the four-fermion Fermi model. In such a case, if $\mu_{\scriptscriptstyle R}^\prime$ is fixed once for all as in \eqref{eq:fix1}, the Fermi theory reproduces, at any loop order, all the exact amplitudes describing any process involving fermion-loop mediated interactions between two massless fermions at arbitrary energy scales. This demonstrates that realistic low-energy nonrenormalizable QFTs exist that can be consistently uplifted to higher energies by FDR without modifying their Lagrangian, at least under special classes of loop corrections. Conversely, if nonrenormalizable and renormalizable amplitudes can be matched with a $\mu_{\scriptscriptstyle R}^\prime$ independent of kinematics, the coefficients of their expansions necessarily obey the same conditions which ensure the validity of \eqref{eq:fix1}. The structure of the paper is as follows. In section \ref{sec:fdr} we recall the essential principles of FDR. The conditions for the matching in \eqref{eq:fix1} are derived in section \ref{sec:matchingamp}. Section \ref{sec:effew} describes the one-fermion-loop matching of the high-energy electroweak corrections onto the Fermi model. Finally, the last section includes a comparison between our procedure and a customary EFT approach. \section{FDR integration and loop functions} \label{sec:fdr} Here we sketch out the basic axioms of FDR with the help of a simple one-dimensional example. The interested reader can find more details in the relevant literature \cite{Pittau:2012zd,Donati:2013iya,Pittau:2013qla,Donati:2013voa,Page:2015zca,Page:2018ljf}. Let's assume one needs to define the UV divergent integral \begin{eqnarray} \label{eq:integral} I = \lim_{\Lambda \to \infty}\int_0^\Lambda dx \frac{x}{x+P}, \end{eqnarray} where $P$ stands for a physical energy scale. FDR identifies the UV divergent pieces in terms of integrands independent of $P$, dubbed FDR vacua, and rewrites \begin{eqnarray} \label{eq:integrand} \frac{x}{x+P}= 1-\frac{P}{x}+\frac{P^2}{x(x+P)}. \end{eqnarray} Thus, the first term in the r.h.s. of \eqref{eq:integrand} is the vacuum responsible for the linear UV divergence, while $1/x$ generates the $\ln \Lambda$ behavior. By definition, the linearly divergent contribution is subtracted from \eqref{eq:integral} over the full integration domain $[0,\Lambda]$, while the logarithmic divergence over the interval $[\mu_{\scriptscriptstyle R},\Lambda]$ only. The arbitrary separation scale $\mu_{\scriptscriptstyle R} \ne 0$ is needed to keep a-dimensional and finite the arguments of the logarithms appearing in the subtracted and finite parts. Thus, \begin{eqnarray} \label{eq:fdrintegral1} I_{\scriptscriptstyle \rm FDR} := I-\lim_{\Lambda \to \infty}\!\left(\int_0^\Lambda dx- \int_{\mu_{\scriptscriptstyle R}}^\Lambda dx \frac{P}{x}\right)\!= P \ln\frac{P}{\mu_{\scriptscriptstyle R}}. \end{eqnarray} The advantage of this definition is twofold. Firstly, the UV cutoff $\Lambda$ is traded for $\mu_{\scriptscriptstyle R}$, which is interpreted as the renormalization scale. Secondly, other than logarithmic UV divergences do not contribute. The explicit appearance of $\mu_{\scriptscriptstyle R}$ in the interval of integration makes the use of \eqref{eq:fdrintegral1} inconvenient in practical calculations. An equivalent definition is obtained by adding an auxiliary unphysical scale $\mu$ to $x$, $x \to \bar x:= x+\mu$, \footnote{This replacement must be performed in both numerators and denominators of the integrated functions.} and introducing an integral operator $\int_0^\infty [dx]$ which annihilates the FDR vacua before integration. Hence, \begin{eqnarray} I_{\scriptscriptstyle \rm FDR} = \int_0^\infty [dx] \frac{\bar x}{\bar x+P} := \left.\lim_{\mu \to 0} \int_0^\infty dx \frac{P^2}{\bar x(\bar x+P)} \right|_{\mu = \mu_{\scriptscriptstyle R}}, \nonumber \end{eqnarray} where $\mu \to 0$ is an asymptotic limit. This strategy can be extended to more dimensions and to rational integrands depending on any number of variables, as those appearing in $\ell$-loop integrals $I^\ell_{\scriptscriptstyle \rm FDR}$. They are polynomials of degree $\ell$ in $\ln \mu_{\scriptscriptstyle R}^2$, \cite{Donati:2013voa} \begin{eqnarray} \label{eq:polLr} I^\ell_{\scriptscriptstyle \rm FDR}= \sum_{k=0}^\ell c_k L_{\scriptscriptstyle R}^k,\hskip 10pt L_{\scriptscriptstyle R}:= \ln(\mu_{\scriptscriptstyle R}^2). \end{eqnarray} For instance, at one loop one has \begin{subequations}\label{eq:loopint} \begin{eqnarray} \label{eq:loopint:1} &&\hskip -3pt \int [d^4 q] \frac{1}{(\bar q^2-m^2)(\bar q^2+p^2 +2 q \cdot p -m_1^2)} \nonumber \\ &&\hskip -3pt \hskip 10pt =I^1_{\scriptscriptstyle \rm FDR}(p^2,m^2,m^2_1) = -i \pi^2 \int_0^1 dy \ln\frac{\chi}{\mu_{\scriptscriptstyle R}^2}, \\ \label{eq:loopint:2} &&\hskip -3pt \int [d^4 q] \frac{q^\alpha}{(\bar q^2-m^2)(\bar q^2+p^2+2 q \cdot p -m_1^2)}\nonumber \\ &&\hskip -3pt \hskip 10pt =i \pi^2 p^\alpha \int_0^1 dy y \ln\frac{\chi}{\mu_{\scriptscriptstyle R}^2}, \\ \label{eq:loopint:3} &&\hskip -3pt \int [d^4 q] \frac{q^\alpha q^\beta}{(\bar q^2-m^2)(\bar q^2+p^2 +2 q \cdot p -m_1^2)}\nonumber \\ &&\hskip -3pt \hskip 10pt =\frac{i \pi^2}{2} g^{\alpha \beta} \int_0^1 dy \chi \left(1-\ln\frac{\chi}{\mu_{\scriptscriptstyle R}^2}\right) + {\cal O}(p^\alpha p^\beta), \end{eqnarray} \end{subequations} with $\bar q^2 := q^2-\mu^2$ and $\chi := m^2y+m^2_1(1-y)-p^2y(1-y)$. Finally, it is important to realize that internal consistency requires $\mu_{\scriptscriptstyle R}$ to be independent of kinematics and identical in all loop functions. This guarantees correct cancellations when combining integrals. \footnote{For example, the UV finite combination $ I^1_{\scriptscriptstyle \rm FDR}(p_1^2,m^2,m^2_1)-I^1_{\scriptscriptstyle \rm FDR}(p_2^2,m^2,m^2_1) $ is equal to the right result, $$ \int d^4 q \frac{2 q \cdot (p_2-p_1)+p^2_2-p^2_1}{(q^2-m^2)((q+p_1)^2-m^2_1)((q+p_2)^2-m^2_1)}, $$ only if $\mu_{\scriptscriptstyle R}^2$ in \eqref{eq:loopint:1} takes the same constant value in both $I^1_{\scriptscriptstyle \rm FDR}(p_1^2,m^2,m^2_1)$ and $I^1_{\scriptscriptstyle \rm FDR}(p_2^2,m^2,m^2_1)$. } \section{The conditions for matching two amplitudes} \label{sec:matchingamp} Our aim is determining the renormalization scale $\mu_{\scriptscriptstyle R}^\prime$ in \eqref{eq:fix1}. The all-order expansions of $A_{m+1}$ and $B_{m+1}$ read \begin{subequations}\label{eq:eqAB} \begin{eqnarray} \label{eq:eqABa} A_{m+1}(\lambda,\alpha)=&&\hskip -3pt K(\alpha) +K(\alpha) \sum_{j=1}^{\infty} A_{0j}^{\{m_j\}} \lambda^{\{m_j\}} \nonumber \\ &&\hskip -3pt + K(\alpha)\!\!\sum_{i,j=1}^{\infty} A_{ij}^{\{m_j\}} \alpha^i \lambda^{\{m_j\}}, \\ \label{eq:eqABb} B_{m+1}(\lambda,\alpha,\mu_{\scriptscriptstyle R})=&&\hskip -3pt K(\alpha) \nonumber \\ &&\hskip -3pt + K(\alpha)\!\!\sum_{\substack{i,j=1\\0 \leq k \leq i}}^{\infty}\! B_{ijk}^{\{m_j\}} \alpha^i \lambda^{\{m_j\}} L_{\scriptscriptstyle R}^k, \end{eqnarray} \end{subequations} where $K(\alpha)$ is defined by the constraint \begin{eqnarray} \label{eq:lemat} B_{m+1}(0,\alpha,\mu_{\scriptscriptstyle R}) = A_{m+1}(0,\alpha)= K(\alpha), \end{eqnarray} which states that the amplitudes computed in the exact theory and the effective model coincide when $\lambda \to 0$. $A_{0j}^{\{m_j\}}$, $A_{ij}^{\{m_j\}}$, $B_{ijk}^{\{m_j\}}$ are perturbative coefficients, in which $i$ refers to the $\alpha$ expansion, whereas $j$ denotes the power degree of the products of $\lambda_n$ multiplying the coefficients. The notation $${\{m_j\}}:=(m_{j1},m_{j2},\ldots,m_{jN})$$ symbolizes an assignment of integer numbers $m_{jn} \ge 0 $ fulfilling \begin{eqnarray} \sum_{n=1}^N m_{jn}= j, \end{eqnarray} and a sum over all possible assignments is understood when contracting with \footnote{For instance, if $N=2$, $ A_{02}^{\{m_2\}} \lambda^{\{m_2\}} = A_{02}^{(2,0)} \lambda_1^2 +A_{02}^{(0,2)} \lambda_2^2 +A_{02}^{(1,1)} \lambda_1 \lambda_2 $. } \begin{eqnarray} \lambda^{\{m_j\}} := \prod_{n=1}^N \lambda_n^{m_{jn}}. \end{eqnarray} The coefficients in \eqref{eq:eqAB} may involve functions of $s_n$ singular at $\lambda= 0$, such as $\ln s_n$ or ${s_n}^{-\frac{1}{2}}$, \footnote{For example, if the $\lambda_n \to 0$ asymptotic expansion of the loop functions produces a $\sqrt{\lambda_n}$, it is rewritten as $\sqrt{\lambda_n}= \lambda_n \left(M_n {s_n}^{-\frac{1}{2}} \right)$ in \eqref{eq:eqAB}.} but \eqref{eq:lemat} requires \begin{eqnarray} A_{0j}^{\{m_j\}} \lambda^{\{m_j\}} \to 0,\, A_{ij}^{\{m_j\}} \lambda^{\{m_j\}} \to 0,\, B_{ijk}^{\{m_j\}} \lambda^{\{m_j\}} \to 0 \nonumber \end{eqnarray} when $\lambda \to 0$. Furthermore, $B_{m+1}$ in \eqref{eq:eqABb} depends on $\lambda$ only through loop corrections, unlike $A_{m+1}$. Typically, the second term in the r.h.s. of \eqref{eq:eqABa} is generated by Taylor expanding the tree-level propagators $1/(s_n-M^2_n)$ of the exact theory, that are absent in the effective model, whose natural expansion parameters are, instead, dimensionful couplings of the type $\alpha^a/(M_n^2)^b$ with $a,b>0$. Note also that the dependence upon $\mu_{\scriptscriptstyle R}$ is driven by \eqref{eq:polLr}. Solutions to \eqref{eq:fix1} are found by replacing its two sides by \eqref{eq:eqABa} computed with $(i \le \ell, j \le \ell)$ and \eqref{eq:eqABb} truncated at $(i \le \ell+1,j \le \ell, k \ge i-\ell)$, and allowing $L_{\scriptscriptstyle R}$ in \eqref{eq:eqABb} to mix different perturbative orders, \begin{eqnarray} \label{eq:Lpert} L_{\scriptscriptstyle R}= \sum_{i= -1}^{\ell -1} X_i \alpha^i. \end{eqnarray} Equating the powers of $\alpha$ and $\lambda^{\{m_j\}}$ gives a system of equations to be fulfilled by the unknown coefficients $X_i$. We are interested in constant solutions, \begin{eqnarray} \label{eq:musol0} L_{\scriptscriptstyle R}^\prime := \ln\big({\mu_{\scriptscriptstyle R}^\prime}^2\big)= \sum_{i= -1}^{\ell -1} X^\prime_i \alpha^i, \end{eqnarray} in which the $X^\prime_i$ are independent of both the $\lambda_n$ and the $s_n$ contained in $A_{0j}^{\{m_j\}}$, $A_{ij}^{\{m_j\}}$, $B_{ijk}^{\{m_j\}}$. This requirement determines the conditions to be fulfilled by the coefficients of the two series in \eqref{eq:eqAB} to be compatible with the FDR treatment of the loop integrals outlined in section \ref{sec:fdr}. In what follows, we discuss the first two perturbative orders and delineate the structure of the general $\ell$-loop case. When $\ell= 1$, $L_{\scriptscriptstyle R}= X_{-1}/\alpha+ X_0$ and the system reads \begin{eqnarray} \label{eq:sis1} \left\{ \begin{tabular}{l} \!\!$A_{01}^{\{m_1\}}-B_{111}^{\{m_1\}} X_{-1}-B_{212}^{\{m_1\}} X^2_{-1}= 0,$ \\\\ \!\!$A_{11}^{\{m_1\}}-B_{110}^{\{m_1\}}-B_{111}^{\{m_1\}} X_0-B_{211}^{\{m_1\}} X_{-1}$ \\$-2 B_{212}^{\{m_1\}} X_{-1} X_0 = 0, \hskip 85pt \forall {\{m_1\}}$. \end{tabular} \right. \end{eqnarray} If $N=1$, only one assignment is possible, ${\{m_1\}}= (1)$, and a solution compatible with \eqref{eq:sis1} can always be found for nonexceptional values of the coefficients, \begin{eqnarray} &&{\hat X}^2_{-1} B_{212}^{(1)}+ {\hat X}_{-1} B_{111}^{(1)} -A_{01}^{(1)}= 0, \nonumber \\ && \hat X_{0}= \frac{A_{11}^{(1)}-B_{110}^{(1)} -B_{211}^{(1)} \hat X_{-1}}{B_{111}^{(1)}+2 B_{211}^{(1)} \hat X_{-1}}. \end{eqnarray} If, in addition, this solution is such that \begin{eqnarray} \label{eq:inds1} \frac{\partial \hat X_{i}}{\partial s_n}= 0\hskip 10pt\forall n, \hskip 5pt i=-1,0, \end{eqnarray} then \begin{eqnarray} \label{eq:solp1} X^\prime_{i}= \hat X_{i}, \hskip 5pt i=-1,0. \end{eqnarray} With $N$ invariants, there are $N$ possible assignments, $${\{m_1\}}= (1,0,\ldots,0),(0,1,\ldots,0),\ldots,(0,0,\ldots,1),$$ so that \eqref{eq:sis1} is a system of $2N$ equations and two unknowns, that admits solutions only if relations exist among the coefficients. In practice, one determines $\hat X_{-1}$ and $\hat X_0$ for a particular assignment and checks whether this solution obeys \eqref{eq:sis1} $\forall {\{m_1\}}$. After that, one also verifies the validity of \eqref{eq:inds1}. Thus, \eqref{eq:sis1} and \eqref{eq:inds1} give $4N$ conditions. If they are all obeyed, the matching \begin{eqnarray} \label{eq:1loopmatching} B_{m+1}^{\rm 1-loop}(\lambda,\alpha,\mu_{\scriptscriptstyle R}^\prime)= A_{m+1}^{\rm 1-loop}(\lambda,\alpha) \end{eqnarray} is realized by inserting \eqref{eq:solp1} in \eqref{eq:musol0} with $\ell= 1$. If $\ell= 2$, $L_{\scriptscriptstyle R}= X_{-1}/\alpha+ X_0+ X_1 \alpha$, and \begin{subequations}{\label{eq:sis2tot}} \begin{eqnarray} \label{eq:sis2} &&\left\{ \begin{tabular}{l} $A_{0j}^{\{m_j\}}-B_{1j1}^{\{m_j\}} X_{-1}-B_{2j2}^{\{m_j\}} X_{-1}^2$\\$-B_{3j3}^{\{m_j\}} X_{-1}^3= 0$, \\\\ $A_{1j}^{\{m_j\}}-B_{1j0}^{\{m_j\}}-B_{1j1}^{\{m_j\}} X_0-B_{2j1}^{\{m_j\}} X_{-1}$ \\ $-2 B_{2j2}^{\{m_j\}} X_{-1} X_0 -B_{3j2}^{\{m_j\}} X^2_{-1}$\\$-3 B_{3j3}^{\{m_j\}} X^2_{-1} X_0 = 0$, \\\\ $A_{2j}^{\{m_j\}}-B_{2j0}^{\{m_j\}}-B_{1j1}^{\{m_j\}} X_1-B_{2j1}^{\{m_j\}} X_0 $ \\ $-B_{2j2}^{\{m_j\}} (X_0^2+2 X_{-1} X_1)$\\ $-B_{3j1}^{\{m_j\}} X_{-1}-2 B_{3j2}^{\{m_j\}} X_{-1} X_0 $\\ $-3B_{3j3}^{\{m_j\}} (X_{-1} X_0^2+X^2_{-1} X_1)= 0$, \end{tabular} \right. \\\nonumber \\ \label{eq:asssis2} &&\hskip 14pt \forall {\{m_j\}},~{\rm with}~j= 1 \div 2. \end{eqnarray} \end{subequations} Values of $\hat X_{-1}$, $\hat X_{0}$ and $\hat X_1$ fulfilling \eqref{eq:sis2} can in general be found for a particular assignment. Subsequently, one checks if \begin{eqnarray} \label{eq:inds2} \frac{\partial \hat X_{i}}{\partial s_n}= 0\hskip 10pt\forall n, \hskip 5pt i=-1 \div 1, \end{eqnarray} and whether this very same solution holds for all the remaining assignments of \eqref{eq:asssis2}. Therefore, \eqref{eq:sis2tot} and \eqref{eq:inds2} give the conditions for the matching \begin{eqnarray} \label{eq:2loopmatching} B_{m+1}^{\rm 2-loop}(\lambda,\alpha,\mu_{\scriptscriptstyle R}^\prime)= A_{m+1}^{\rm 2-loop}(\lambda,\alpha). \end{eqnarray} If they are met, \eqref{eq:2loopmatching} is obeyed by setting $\ell= 2$ and $X^\prime_{i}= \hat X_{i}$ in \eqref{eq:musol0}. At $\ell$ loops and fixed assignment, $\hat X_{-1}$ is a solution of an algebraic equation of degree $(\ell+1)$. Once $\hat X_{-1}$ is known, the rest of the system is linear and triangular, so that the remaining coefficients $\hat X_{i}$, $i= 0 \div (\ell -1)$, can be easily determined. After that, one checks the validity of this solution for all the other assignments. If, in addition, \begin{eqnarray} \frac{\partial \hat X_{i}}{\partial s_n}= 0\hskip 10pt\forall n, \hskip 5pt i=-1 \div (\ell -1), \end{eqnarray} the matching is achieved by choosing $X^\prime_{i}= \hat X_{i}$ in \eqref{eq:musol0}. \section{An effective model for the high-energy electroweak fermion loops} \label{sec:effew} When the constraints derived in the previous section are fulfilled, the result predicted by $A_{m+1}$ is reproduced, order by order in $\alpha$ and $\lambda$, by the effective nonrenormalizable amplitude $B_{m+1}$. This allows one to determine $\mu_{\scriptscriptstyle R}^\prime$ from \eqref{eq:fix1} and use it in further amplitudes $B_i$ computed within the effective model. If, after fixing the Lagrangian's parameters as in \eqref{eq:fit}, the $B_i$ obey \eqref{eq:matchtheo0}, we argue that they can matched as in \eqref{eq:matchtheo}. Here we prove this in the case of the electroweak Fermi model when the coupling constant expansion is in terms of resummed one-fermion-loop corrections. In section \ref{sec:models} we detail the nonrenormalizable and renormalizable theories to be matched and the radiative corrections involved. The fitting procedure of \eqref{eq:fit} is discussed in section \ref{sec:renormalization} and the matching implied by \eqref{eq:fix1} and \eqref{eq:matchtheo} is the subject of section \ref{sec:matching}. \subsection{The models and the loop corrections} \label{sec:models} Our renormalizable theory is defined by the fermionic sector of the electroweak standard model interaction Lagrangian, namely \begin{eqnarray} \label{eq:Lren} {\cal L}^{\mbox{\tiny SM}}_{\mbox{\tiny INT}}= {\cal L}^{\mbox{\tiny QED}}_{\mbox{\tiny INT}}+{\cal L}^{\mbox{\tiny ZW}}_{\mbox{\tiny INT}}, \end{eqnarray} with \begin{eqnarray} {\cal L}^{\mbox{\tiny QED}}_{\mbox{\tiny INT}}=&&\hskip -3pt -g s_\theta A_\alpha \sum_f Q_f \bar f_j \gamma^\alpha f_j \end{eqnarray} and \begin{eqnarray} \label{eq:Lrenint} {\cal L}^{\mbox{\tiny ZW}}_{\mbox{\tiny INT}}=&&\hskip -3pt -\frac{g}{2 c_\theta} Z_\alpha\sum_f \bar f_j \gamma^\alpha (v_f+a_f \gamma_5) f_j \nonumber \\ &&\hskip -3pt -\frac{g}{2 \sqrt{2}} W^+_\alpha\sum_f \frac{2I_{3f}+1}{2} \bar f_j \gamma^\alpha (1-\gamma_5) f^\prime_j \nonumber \\ &&\hskip -3pt -\frac{g}{2 \sqrt{2}} W^-_\alpha\sum_f \frac{1-2I_{3f}}{2} \bar f_j \gamma^\alpha (1-\gamma_5) f^\prime_j. \end{eqnarray} The photon and the massive gauge boson fields are denoted by $A_\alpha$, $Z_\alpha$ and $W^{\pm}_\alpha$, respectively. The spinor associated with a fermion $f$ with color $j$ is denoted by $f_j$, with the convention that $j= 1\div 3$ for quarks and $j= 1$ for leptons. The sum runs over all fermions and $f^\prime$ is the isospin partner of $f$ in the limit of diagonal CKM quark-mixing matrix. The vector and axial couplings are \begin{eqnarray} \label{eq:Zcopulings} v_f = I_{3f}-2 s^2_\theta Q_f,\hskip 10pt a_f= -I_{3f}, \end{eqnarray} where $I_{3f}$ is the third isospin component, $Q_f$ the electric charge and $s_\theta$ ($c_\theta$) is the sine (cosine) of the weak mixing angle. The Feynman gauge is used, hence the gauge boson propagators read \begin{eqnarray} \label{eq:props} P_A^{\alpha \beta}(p^2) =&&\hskip -3pt -i g^{\alpha \beta}\frac{1}{p^2},\hskip 10pt P_W^{\alpha \beta}(p^2) = -i g^{\alpha \beta}\frac{1}{p^2-M^2},\nonumber \\ P_Z^{\alpha \beta}(p^2) =&&\hskip -3pt -i g^{\alpha \beta}\frac{1}{p^2-M^2/c^2_\theta}. \end{eqnarray} Our effective nonrenormalizable interaction Lagrangian reads \begin{eqnarray} \label{eq:Lnonren} {\cal L}^{\mbox{\tiny EFF}}_{\mbox{\tiny INT}}= {\cal L}^{\mbox{\tiny QED }}_{\mbox{\tiny INT}}+{\cal L}^{\mbox{\tiny FERMI }}, \end{eqnarray} with \begin{eqnarray} \label{eq:Lnonrenint} {\cal L}^{\mbox{\tiny FERMI}}= -\frac{g^2}{8 M^2} {J^\dag}_{\!\!\!c\alpha} J_{c}^\alpha -\frac{g^2}{8 M^2} J_{n\alpha} J_{n}^\alpha, \end{eqnarray} where the charged and neutral currents are given by \begin{eqnarray} J_{c}^\alpha=&&\hskip -3pt \sum_f \frac{2I_{3f}+1}{2} \bar f_j \gamma^\alpha (1-\gamma_5) f^\prime_j,\nonumber \\ J_{n}^\alpha=&&\hskip -3pt \sum_f \bar f_j \gamma^\alpha (v_f+a_f \gamma_5) f_j. \end{eqnarray} In \eqref{eq:Lnonrenint} the four-fermion coupling between currents is written in a form which reproduces the tree-level low-energy result obtained with ${\cal L}^{\mbox{\tiny SM}}_{\mbox{\tiny INT}}$ when using $P_{W,Z}^{\alpha \beta}(0)$. Massive gauge boson propagators are absent in the effective theory, while the photon propagator is as in \eqref{eq:props}. The main objects entering our calculation are the truncated one-fermion-loop contributions depicted in figure~\ref{fig:diagrams}. Fermion masses are neglected, when possible, except in the case of the top quark, for which the leading $m^2_t$ contribution is also included. The $p^\alpha p^\beta$ parts are omitted, because they do not contribute on-shell. \begin{figure}[t] \begin{center} \vspace{-3.8cm} \includegraphics[width=1.2\textwidth, angle= {0}]{diagrams.pdf} \vspace{-2.1cm} \caption{The parts of the truncated one-fermion-loop diagrams proportional to the metric tensor. The dots in the vertices denote that the external propagators are not included. } \label{fig:diagrams} \end{center} \end{figure} An FDR computation of the form factors requires the integrals in \eqref{eq:loopint}. The result is \begin{eqnarray} \Sigma_Z(p^2)=&&\hskip -3pt-\frac{p^2}{\pi^2} \left(1-2s^2_\theta+\frac{8}{3}s^4_\theta\right) \left(L_{\scriptscriptstyle R} -L +\frac{5}{3}\right) \nonumber \\ &&\hskip -3pt + \frac{3 m^2_t}{8 \pi^2} \left(L_{\scriptscriptstyle R} -\ln m^2_t\right), \nonumber \\ \Sigma_W(p^2)=&&\hskip -3pt-\frac{p^2}{\pi^2} \left(L_{\scriptscriptstyle R} -L +\frac{5}{3}\right) \nonumber \\ &&\hskip -3pt + \frac{3 m^2_t}{8 \pi^2} \left(L_{\scriptscriptstyle R} -\ln m^2_t +\frac{1}{2}\right), \nonumber \\ \Pi_A(p^2)=&&\hskip -3pt-\frac{2}{3\pi^2} \left(L_{\scriptscriptstyle R} -L +\frac{5}{3}\right), \nonumber \\ \Pi_A(0)=&&\hskip -3pt-\frac{2}{3\pi^2} \left(L_{\scriptscriptstyle R} -K_2\right), \nonumber \\ \Pi_{Z A}(p^2)=&&\hskip -3pt-\frac{1}{\pi^2} \left(\frac{1}{4}-\frac{2}{3} s^2_\theta \right) \left(L_{\scriptscriptstyle R} -L +\frac{5}{3}\right) \nonumber \\ =&&\hskip -3pt \Pi_{A Z}(p^2), \nonumber \\ \Pi_{Z A}(0)=&&\hskip -3pt-s^2_\theta \Pi_A(0) -\frac{1}{4\pi^2} \left(L_{\scriptscriptstyle R} -K_1\right) \nonumber \\ =&&\hskip -3pt \Pi_{A Z}(0), \end{eqnarray} with $L:= \ln(-p^2-i \epsilon)$. Furthermore \begin{eqnarray} \label{eq:k1k2} K_1:=&&\hskip -3pt \frac{1}{2} +\frac{\ln m^2_e +\ln m^2_\mu +\ln m^2_\tau}{12} \nonumber \\ &&\hskip -3pt +\frac{\ln m^2_u +\ln m^2_c +\ln m^2_t}{6} \nonumber \\ &&\hskip -3pt +\frac{\ln m^2_d +\ln m^2_s +\ln m^2_b}{12}, \nonumber \\ K_2:=&&\hskip -3pt \frac{1}{2} +\frac{\ln m^2_e +\ln m^2_\mu +\ln m^2_\tau}{8} \nonumber \\ &&\hskip -3pt +\frac{\ln m^2_u +\ln m^2_c +\ln m^2_t}{6} \nonumber \\ &&\hskip -3pt +\frac{\ln m^2_d +\ln m^2_s +\ln m^2_b}{24}, \end{eqnarray} where the light quark masses have to be considered as effective parameters adjusted to fit the dispersion integral defining the hadronic contribution to the vacuum polarization. \subsection{Fixing the free parameters of the models} \label{sec:renormalization} Both Lagrangians in \eqref{eq:Lren} and \eqref{eq:Lnonren} depend on the set of bare parameters $\{g^2,M^2,s^2_\theta\}$, which need to be fixed by experiment. As input data we choose the fine structure constant $\alpha_{\scriptscriptstyle E\!M}$, measured in the Thomson limit of the Compton scattering, the muon decay constant $G_F$, extracted from the muon lifetime, and the ratio $R_{\scriptscriptstyle e \nu}$ between the total $e^- \nu_\mu$ and $e^- \bar \nu_\mu$ elastic cross sections at zero momentum transfer. In the following, we determine and solve the fitting equations \cite{Veltman:1977kh,Bardin:1999ak} linking $\{\alpha_{\scriptscriptstyle E\!M},G_F,R_{\scriptscriptstyle e \nu}\}$ to $\{g^2,M^2,s^2_\theta\}$ in both renormalizable and nonrenormalizable models. In the renormalizable theory one constructs the fermion-loop dressed propagators, \begin{eqnarray} \label{eq:dressprop} D_V^{\alpha \beta}(p^2)= -i g^{\alpha \beta} \Delta_V(p^2),\hskip 8pt V = W,Z,A,ZA,AZ, \end{eqnarray} by Dyson resumming to all orders the self-energy contributions of figure~\ref{fig:diagrams}. The result reads \begin{eqnarray} \label{eq:dyson} \Delta_W(p^2) =&&\hskip -3pt \frac{1}{g^2} \frac{1}{P_W(p^2)}, \nonumber \\ \Delta_Z(p^2) =&&\hskip -3pt \frac{1}{g^2} \frac{1}{P_Z(p^2)} \frac{1}{{\cal Z}(p^2)},\nonumber \\ p^2 \Delta_A(p^2) =&&\hskip -3pt \frac{1}{P_A(p^2){\cal Z}(p^2)}, \nonumber \\ \Delta_{ZA}(p^2) =&&\hskip -3pt g^2\frac{s_\theta}{c_\theta}\frac{\Pi_{ZA}(p^2)}{P_A(p^2)} \Delta_Z(p^2) = \Delta_{AZ}(p^2), \end{eqnarray} with \begin{eqnarray} \label{eq:dyson1} P_W(p^2) =&&\hskip -3pt \frac{p^2}{g^2}-\frac{M^2}{g^2}-\frac{\Sigma_W(p^2)}{4}, \nonumber \\ P_Z(p^2) =&&\hskip -3pt \frac{p^2}{g^2}-\frac{M^2}{g^2c^2_\theta}-\frac{\Sigma_Z(p^2)}{4 c^2_\theta}, \nonumber \\ P_A(p^2) =&&\hskip -3pt 1-g^2 s^2_\theta \Pi_A(p^2), \nonumber \\ {\cal Z}(p^2)=&&\hskip -3pt 1-p^2 g^2 \frac{s^2_\theta}{c^2_\theta} \frac{\Pi^2_{ZA}(p^2)}{P_A(p^2) P_Z(p^2)}. \end{eqnarray} Using the propagators in \eqref{eq:dressprop} to compute the Thomson scattering, the muon lifetime and $R_{\scriptscriptstyle e \nu}$, gives the fitting equations \begin{subequations}\label{eq:fitting} \begin{eqnarray} \label{eq:fitting:1} 4 \pi \alpha_{\scriptscriptstyle E\!M}=&&\hskip -3pt \frac{g^2 s^2_\theta}{1-g^2 s^2_\theta \Pi_A(0)}, \\ \label{eq:fitting:2} \frac{G_F}{\sqrt{2}}=&&\hskip -3pt \frac{g^2}{8 \left[M^2+\frac{g^2}{4} \Sigma_W(0) \right]}, \\ \label{eq:fitting:3} R_{\scriptscriptstyle e \nu} = &&\hskip -3pt \frac{16 S^4-12 S^2+3}{16 S^4-4 S^2+1}, \end{eqnarray} \end{subequations} where \begin{eqnarray} S^2 := s^2_\theta \left\{ 1-\frac{g^2 \Pi_{ZA}(0)}{1-g^2 s^2_\theta \Pi_A(0)} \right\}. \nonumber \end{eqnarray} In the case of the nonrenormalizable model, it is easy to prove that \begin{theorem} \label{th:1} Computing $\{\alpha_{\scriptscriptstyle E\!M},G_F,R_{\scriptscriptstyle e \nu}\}$ in terms of \noindent $\{g^2,M^2,s^2_\theta\}$ produces the same fitting equations \eqref{eq:fitting} of the renormalizable theory. \end{theorem} \begin{proof} When resumming to all orders the interactions mediated by the fermion loops, one arrives at results which have the same form of transitions induced by the dressed propagators of \eqref{eq:dyson} computed at $p^2= 0$. Since the observables used as input data only involve zero momentum transfer, the equations \eqref{eq:fitting} are also valid in the nonrenormalizable theory. \end{proof} As an example, the diagram relevant in the case of charged currents is given in figure~\ref{fig:wloop}. That modifies the muon decay amplitude as depicted in figure~\ref{fig:mudecay}. One computes \begin{eqnarray} \label{eq:A0} A^{\mbox{\tiny EFF}}_W(0)= -\frac{i\Gamma}{8} \frac{g^2}{M^2} \frac{1}{1+\frac{g^2}{4 M^2} \Sigma_W(0)} = \frac{i \Gamma}{8} g^2 \Delta_W(0), \nonumber \\ \end{eqnarray} where $\Gamma$ is the result of the contraction of the two charged currents $ \Gamma := \gamma_\alpha (1-\gamma_5) \otimes \gamma^\alpha(1-\gamma_5) $, in which the symbol $\otimes$ understands multiplication by the relevant external spinors. Using \eqref{eq:A0} to define the combination $g^2/M^2$ leads to \eqref{eq:fitting:2}. \begin{figure}[t] \vskip -68pt \hskip -110pt \includegraphics[width=0.9\textwidth, angle= {-90}]{wloop.pdf} \vskip -330pt \caption{The diagram mediating fermion-loop induced interactions between charged currents in the nonrenormalizable theory.} \label{fig:wloop} \end{figure} \begin{figure}[t] \vskip -68pt \hskip -100pt \includegraphics[width=0.9\textwidth, angle= {-90}]{mudecay.pdf} \vskip -325pt \caption{The amplitude describing the muon decay in the nonrenormalizable theory. The interaction of figure~\ref{fig:wloop} is evaluated at $p^2= 0$ and resummed to all orders.} \label{fig:mudecay} \end{figure} \vspace{12pt} Finally, to solve the fitting equations we first introduce the tree-level solution to \eqref{eq:fitting:3}, namely $\hat s_\theta$ such that \begin{eqnarray} R_{\scriptscriptstyle e \nu} = \frac{16 {\hat s_\theta}^4-12 {\hat s_\theta}^2 +3}{16 {\hat s_\theta}^4-4 {\hat s_\theta}^2+1}. \end{eqnarray} Radiative corrections do not change $R_{\scriptscriptstyle e \nu}$ when $S^2= {\hat s_\theta}^2$, that gives \begin{subequations}\label{eq:sol} \begin{eqnarray} \label{eq:sol:1} s^2_\theta =&&\hskip -3pt {\hat s_\theta}^2 \frac{F_1}{F_2}, \\ \label{eq:sol:2} g^2 =&&\hskip -3pt \frac{4 \pi \alpha_{\scriptscriptstyle E\!M}}{{\hat s_\theta}^2F_1}, \\ \label{eq:sol:3} M^2 =&&\hskip -3pt \frac{{\hat M}^2}{F_1} \left(1- \sqrt{2}G_F \Sigma_W (0)\right), \end{eqnarray} \end{subequations} with \begin{eqnarray} \label{eq:def} {\hat M}^2:=&&\hskip -3pt \frac{\pi \alpha_{\scriptscriptstyle E\!M}}{\sqrt{2} G_F {\hat s_\theta}^2},\hskip 10pt F_1 := 1 -\frac{\alpha_{\scriptscriptstyle E\!M}}{\pi {\hat s_\theta}^2} \left(L_{\scriptscriptstyle R}-K_1 \right),\nonumber \\ F_2 :=&&\hskip -3pt 1 -\frac{8\alpha_{\scriptscriptstyle E\!M}}{3 \pi} \left(L_{\scriptscriptstyle R}-K_2 \right). \end{eqnarray} \subsection{Matching the exact theory onto the nonrenormalizable model} \label{sec:matching} The high-energy fermion-loop corrections computed with ${\cal L}^{\mbox{\tiny SM}}_{\mbox{\tiny INT}}$ are matched onto ${\cal L}^{\mbox{\tiny EFF}}_{\mbox{\tiny INT}}$ by comparing amplitudes induced by charged currents of virtuality $p^2$. In the renormalizable theory one has \begin{eqnarray} \label{eq:awsmp} A_W^{\mbox{\tiny SM}}(p^2) =&&\hskip -3pt \frac{i \Gamma}{8} g^2 \Delta_W(p^2) \nonumber \\ =&&\hskip -3pt \frac{i \Gamma}{8} \left\{\frac{p^2}{g^2}-\frac{M^2}{g^2}-\frac{\Sigma_W(p^2)}{4} \right\}^{-1}, \end{eqnarray} while resumming the interaction as in figure~\ref{fig:mudecay}, but with $p^2 \ne 0$, gives \begin{eqnarray} \label{eq:aweffp} A_W^{\mbox{\tiny EFF}}(p^2,L_{\scriptscriptstyle R})= \frac{i\Gamma}{8} \left\{-\frac{M^2}{g^2}-\frac{\Sigma_W(p^2)}{4} \right\}^{-1}. \end{eqnarray} Equations \eqref{eq:awsmp} and \eqref{eq:aweffp} differ by the term $p^2/g^2$, so that inserting the solution \eqref{eq:sol} produces a result independent of $L_{\scriptscriptstyle R}$ for $A_W^{\mbox{\tiny SM}}$, whilst $A_W^{\mbox{\tiny EFF}}$ still depends on $L_{\scriptscriptstyle R}$, \begin{eqnarray} \label{eq:asm} \frac{A_W^{\mbox{\tiny SM}}(p^2)}{K(\alpha_{\scriptscriptstyle E\!M})} = &&\hskip -3pt \Bigg\{1-\frac{p^2}{{\hat M}^2} \nonumber \\ &&\hskip -3pt -\frac{\alpha_{\scriptscriptstyle E\!M}}{\pi {\hat s_\theta}^2{\hat M}^2 } p^2 \left(K_1-L + {5}/{3}\right) \Bigg\}^{-1}, \\ \label{eq:aeff} \frac{A_W^{\mbox{\tiny EFF}}(p^2,L_{\scriptscriptstyle R})}{K(\alpha_{\scriptscriptstyle E\!M})}= &&\hskip -3pt \Bigg\{1 -\frac{\alpha_{\scriptscriptstyle E\!M}}{\pi {\hat s_\theta}^2{\hat M}^2 } p^2 \left(L_{\scriptscriptstyle R}-L + {5}/{3}\right) \Bigg\}^{-1} \\ K(\alpha_{\scriptscriptstyle E\!M}) = &&\hskip -3pt -\frac{i\Gamma}{2} \frac{\pi \alpha_{\scriptscriptstyle E\!M}}{{\hat s_\theta}^2{\hat M}^2}. \nonumber \end{eqnarray} At fixed $\ell$, the amplitudes in \eqref{eq:asm} and \eqref{eq:aeff} are the right and left sides of the matching equation \eqref{eq:fix1} needed to determine $\mu_{\scriptscriptstyle R}^\prime$. For instance, the conditions ensuring the validity of \eqref{eq:2loopmatching} can be verified by expanding up to the second order in $\lambda = {p^2}/{{\hat M}^2}$, \begin{eqnarray} \label{eq:12exp} &&\hskip -3pt\frac{A_W^{\mbox{\tiny SM}}(p^2)}{K(\alpha)}= 1 +\lambda \left(1 +\frac{\alpha}{\pi {\hat s_\theta}^2} \left(K_1-L + {5}/{3}\right)\right) \nonumber \\ &&\hskip -3pt \hskip 20pt +\lambda^2 \left(1 +\frac{\alpha}{\pi {\hat s_\theta}^2} \left(K_1-L + {5}/{3}\right)\right)^2 + {\cal O}(\lambda^3), \nonumber \\ &&\hskip -3pt \frac{A_W^{\mbox{\tiny EFF}}(p^2,L_{\scriptscriptstyle R})}{K(\alpha)}= 1 +\frac{\alpha \lambda}{\pi {\hat s_\theta}^2} \left(L_{\scriptscriptstyle R}-L + {5}/{3}\right) \nonumber \\ &&\hskip -3pt \hskip 20pt +\frac{\alpha^2 \lambda^2}{\pi^2 {\hat s_\theta}^4} \left(L_{\scriptscriptstyle R}-L + {5}/{3}\right)^2 +{\cal O}(\lambda^3), \end{eqnarray} where $\alpha= \alpha_{\scriptscriptstyle E\!M}$. From \eqref{eq:12exp} one reads off the nonzero coefficients \footnote{Since $N=1$, ${\{m_j\}}=(j)$.} \begin{eqnarray} \hskip -5pt \begin{tabular}{lll} $A^{(1)}_{01}=1$, & \hskip -9pt $A^{(2)}_{02}=1$, & \hskip -9pt $A^{(1)}_{11}=\frac{5/3-L+K_1}{\pi {\hat s_\theta}^2}$, \hskip -9pt \\ $A^{(2)}_{12}= 2 A^{(1)}_{11}$, & \hskip -9pt $A^{(2)}_{22}= \left(A^{(1)}_{11}\right)^2\!$, & \hskip -9pt $B^{(1)}_{110}=\frac{5/3-L}{\pi {\hat s_\theta}^2}$, \hskip -9pt \\ $B^{(2)}_{220}= \left(B^{(1)}_{110}\right)^2\!$, & \hskip -9pt $B^{(1)}_{111}=\frac{1}{\pi {\hat s_\theta}^2}$, & \hskip -9pt $B^{(2)}_{221}=\frac{2}{\pi {\hat s_\theta}^2} B^{(1)}_{110} $, \hskip -9pt \\ $B^{(2)}_{222}= \left(B^{(1)}_{111}\right)^2\!$, & \hskip -9pt & \hskip -9pt \end{tabular} \end{eqnarray} and the solution $X^\prime_{-1}= \pi {\hat s_\theta}^2$, $X^\prime_{0}= K_1$, $X^\prime_{1}= 0$, namely \begin{eqnarray} \label{eq:musol} L_{\scriptscriptstyle R}^\prime= \frac{\pi{\hat s_\theta}^2}{\alpha_{\scriptscriptstyle E\!M}}+K_1, \end{eqnarray} fulfills, for any value of $j$, all conditions stated by \eqref{eq:sis2} and \eqref{eq:inds2}. As a matter of fact, $L_{\scriptscriptstyle R}= L_{\scriptscriptstyle R}^\prime$ solves \eqref{eq:fix1} to all orders. In fact, this is the value for which the resummed amplitudes of \eqref{eq:asm} and \eqref{eq:aeff} coincide. Hence, choosing the renormalization scale as in \eqref{eq:musol} reproduces the effect of interchanging a one-fermion-loop dressed $W$ boson of arbitrary virtuality $p^2$. Now we consider a further amplitude $A_Z^{\mbox{\tiny EFF}}$ obtained by contracting two neutral currents. It obeys \eqref{eq:matchtheo0} by construction and \begin{theorem} \label{th:2} When computed at $L_{\scriptscriptstyle R} = L_{\scriptscriptstyle R}^\prime$, any effective amplitude involving two massless neutral currents reproduces, at any value of $p^2$, the exact all-order result predicted by ${\cal L}^{\mbox{\tiny SM}}_{\mbox{\tiny INT}}$. \end{theorem} So that, $A_Z^{\mbox{\tiny EFF}}$ fulfills \eqref{eq:matchtheo} at any $\ell$. \begin{proof} Consider the full amplitude \begin{eqnarray} \label{eq:smnfull} A_Z^{\mbox{\tiny SM}}(p^2)= \sum_{k=1}^4 A_k^{\mbox{\tiny SM}}(p^2,L_{\scriptscriptstyle R}) \end{eqnarray} describing the interaction between two massless fermions $f_1$ and $f_2$ in the renormalizable theory. A computation of the sub-amplitudes in figure~\ref{fig:subamplitudes} gives \begin{eqnarray} \label{eq:subamplitudes} A_1^{\mbox{\tiny SM}}(p^2,L_{\scriptscriptstyle R})=&&\hskip -3pt i g^2 s^2_\theta Q_{f_1} Q_{f_2} \Delta_A(p^2) \gamma_\alpha \otimes \gamma^\alpha, \nonumber \\ A_2^{\mbox{\tiny SM}}(p^2,L_{\scriptscriptstyle R})=&&\hskip -3pt i g^2 \frac{1}{4 c^2_\theta} \Delta_Z(p^2) \gamma_\alpha(v_{f_1}+a_{f_1} \gamma_5) \nonumber \\ &&\hskip -3pt \otimes \,\gamma^\alpha(v_{f_2}+a_{f_2} \gamma_5), \nonumber \\ A_3^{\mbox{\tiny SM}}(p^2,L_{\scriptscriptstyle R})=&&\hskip -3pt i g^2 \frac{s_\theta Q_{f_2}}{2 c_\theta} \Delta_{ZA}(p^2) \gamma_\alpha(v_{f_1}+a_{f_1} \gamma_5) \otimes \gamma^\alpha, \nonumber \\ A_4^{\mbox{\tiny SM}}(p^2,L_{\scriptscriptstyle R})=&&\hskip -3pt i g^2 \frac{s_\theta Q_{f_1}}{2 c_\theta} \Delta_{ZA}(p^2) \gamma_\alpha \otimes \gamma^\alpha(v_{f_2}+a_{f_2} \gamma_5). \nonumber \\ \end{eqnarray} \begin{figure}[t] \vskip -55pt \includegraphics[width=1.2\textwidth]{subamplitudes.pdf} \vskip -215pt \caption{The four sub-amplitudes in \eqref{eq:subamplitudes} induced by the fermion-loop dressed propagators of \eqref{eq:dressprop}. The external fermions are massless, so that diagrams involving the exchange of neutral scalars are absent.} \label{fig:subamplitudes} \end{figure} Since ${\cal L}^{\mbox{\tiny SM}}_{\mbox{\tiny INT}}$ is renormalizable, $A_Z^{\mbox{\tiny SM}}(p^2)$ does not depend on $L_{\scriptscriptstyle R}$. Therefore, one is allowed to choose $L_{\scriptscriptstyle R}= L_{\scriptscriptstyle R}^\prime$ in each of the four sub-amplitudes. But this implies $F_1= 0$ in \eqref{eq:def}, which means ${p^2}/{g^2}= 0$ inside the function $P_Z(p^2)$ contained in the definition of the dressed propagators $\Delta_A(p^2)$, $\Delta_Z(p^2)$ and $\Delta_{ZA}(p^2)$ in \eqref{eq:subamplitudes}. Since this is the only difference between the results computed within the nonrenormalizable and renormalizable models, one obtains \begin{eqnarray} \label{eq:aeffn} A_k^{\mbox{\tiny EFF}}(p^2,L_{\scriptscriptstyle R}^\prime)= A_k^{\mbox{\tiny SM}}(p^2,L_{\scriptscriptstyle R}^\prime)\hskip 10pt \forall k. \end{eqnarray} Thus, \begin{eqnarray} A_Z^{\mbox{\tiny EFF}}(p^2,L_{\scriptscriptstyle R}^\prime)=&&\hskip -3pt \sum_{k=1}^4 A_k^{\mbox{\tiny EFF}}(p^2,L_{\scriptscriptstyle R}^\prime) \nonumber \\ =&&\hskip -3pt\sum_{k=1}^4 A_k^{\mbox{\tiny SM}}(p^2,L_{\scriptscriptstyle R}^\prime) = A_Z^{\mbox{\tiny SM}}(p^2). \end{eqnarray} \end{proof} An interesting consequence is \begin{corollary} \label{cor:cor1} In the renormalizable theory of \eqref{eq:Lren} it is possible to rearrange the fermion-loop corrections in such a way that all fermions couple to $Z$ and $W$ bosons with the same V-A interaction. \end{corollary} \begin{proof} This is again obtained by choosing $\mu_{\scriptscriptstyle R}$ in \eqref{eq:subamplitudes} as in \eqref{eq:musol}, that implies $s_\theta^2= 0$ in \eqref{eq:sol:1} and $v_f= -a_f = I_{3f}$ in \eqref{eq:Zcopulings}. \end{proof} To summarize, any exact amplitude, in which two massless fermion lines are connected by a one-fermion-loop dressed $W$, $Z$ or $\gamma$ propagator of arbitrary virtuality, is reproduced by ${\cal L}^{\mbox{\tiny EFF}}_{\mbox{\tiny INT}}$ if the solution in \eqref{eq:musol} is used for the renormalization scale. Finally, it should be explicitly noticed that the choice of the interactions included in \eqref{eq:Lnonren} is ultimately driven by the requirement that the effective and the exact model coincide, when $\lambda \to 0$, for the class of processes and corrections under study. For example, ${\cal L}^{\mbox{\tiny EFF}}_{\mbox{\tiny INT}}$ is too poor to accommodate contributions not induced by fermion loops, e.g. the amplitudes $B_i$ in the l.h.s. of \eqref{eq:matchtheo0} would not match the $A_i$ if the latter would involve three-gauge-boson vertices. \section{Comparing with customary calculations} In what follows, we use the model of \eqref{eq:Lnonren} to compare our treatment with a more standard order-by-order renormalization approach based on Dimensional Regularization (DReg). Our formulae are converted to DReg by replacing \cite{Gnendiger:2017pys} \begin{eqnarray} \label{eq:FDRvsDREG} L_{\scriptscriptstyle R} \to L_{\scriptscriptstyle R}+\frac{1}{\epsilon_{\mbox{\tiny UV}}}, \end{eqnarray} where \begin{eqnarray} \frac{1}{\epsilon_{\mbox{\tiny UV}}} := \frac{2}{4-d}-\gamma_E -\ln \pi \hspace{7pt} {\rm with} \hspace{10pt} d \to 4. \end{eqnarray} Upon this substitution, the effective amplitudes in \eqref{eq:aeff} and \eqref{eq:aeffn} develop a dependence on the UV cutoff ${1}/{\epsilon_{\mbox{\tiny UV}}}$. To cancel it in the Weinberg's way, one adds to the effective Lagrangian interactions induced by higher dimensional operators, \begin{eqnarray} \label{eq:LCT} {\cal L}_{\mbox{\tiny HD}}=&&\hskip -3pt -c_w \frac{g^4}{32 M^4}(\partial_\nu {J}_{\!c\alpha})^\dag (\partial^\nu J_{c}^\alpha) \nonumber \\ &&\hskip -3pt -c_z \frac{g^4 c^2_\theta}{32 M^4}(\partial_\nu J_{n\alpha}) (\partial^\nu J_{n}^\alpha). \end{eqnarray} Matching the exact results of \eqref{eq:asm} and \eqref{eq:smnfull} onto a computation performed with ${\cal L}^{\mbox{\tiny EFF}}_{\mbox{\tiny INT}}+{\cal L}_{\mbox{\tiny HD}}$ fixes the unknown coefficients, \begin{eqnarray} c_w(L_{\scriptscriptstyle R}) = c_z(L_{\scriptscriptstyle R})= \frac{{\hat s_\theta}^2 }{\pi \alpha_{\scriptscriptstyle E\!M} }+ \frac{1}{\pi^2} \left(K_1-L_{\scriptscriptstyle R}-\frac{1}{\epsilon_{\mbox{\tiny UV}}} \right). \nonumber \end{eqnarray} Even when choosing $\mu_{\scriptscriptstyle R}$ as in \eqref{eq:musol} only the finite parts of $c_{w,z}$ are removed, \begin{eqnarray} c_{w,z}(L_{\scriptscriptstyle R}^\prime)= -\frac{1}{\pi^2\epsilon_{\mbox{\tiny UV}}}, \end{eqnarray} hence adding ${\cal L}_{\mbox{\tiny HD}}$ to ${\cal L}^{\mbox{\tiny EFF}}_{\mbox{\tiny INT}}$ is necessary to compensate the UV poles contained in the DReg variant of the one-loop functions of \eqref{eq:loopint}. Such poles are absent when defining UV divergent integrals as in \eqref{eq:fdrintegral1}. This explains why FDR circumvents the introduction of the counterterm Lagrangian ${\cal L}_{\mbox{\tiny HD}}$, which is instead needed in the standard method. \footnote{Note that FDR is not equivalent to DReg in which the loop integrals are redefined by dropping $1/\epsilon_{\mbox{\tiny UV}}$ terms. For instance, \cite{Donati:2013voa,tHooft:1973wag} when $\ell > 1$ \begin{eqnarray} &&\hskip -3pt {\rm Finite\,Part} \left\{ \int {d^dq}\, \frac{\mu_{\scriptscriptstyle R}^{(4-d)}}{(q^2-m^2)((q+p)^2-m^2_1)} \right\}^\ell \nonumber \\ &&\hskip -3pt \hskip 15pt \ne \left( I^1_{\scriptscriptstyle \rm FDR}(p^2,m^2,m^2_1) \right)^\ell, \nonumber \end{eqnarray} with $I^1_{\scriptscriptstyle \rm FDR}(p^2,m^2,m^2_1)$ given in \eqref{eq:loopint:1}. In DReg this mismatch is cured by the $1/\epsilon_{\mbox{\tiny UV}}$ pole contained in ${\cal L}_{\mbox{\tiny HD}}$. Hence, setting ${\cal L}_{\mbox{\tiny HD}}=0$ would give a wrong DReg result for the resummed propagators of \eqref{eq:dyson}. } It is also interesting to speculate about the FDR matching of \eqref{eq:musol} from the point of view of the sole EFT. In particular, would it be possible to guess the ``right'' value of $\mu_{\scriptscriptstyle R}$ without knowing ${\cal L}^{\mbox{\tiny SM}}_{\mbox{\tiny INT}}$? Requiring that ${\cal L}^{\mbox{\tiny EFF}}_{\mbox{\tiny INT}}$ describe as many processes as possible leads to the universal V-A interaction realized by the value $s^2_\theta= 0$ implied by \eqref{eq:musol}, as noted in corollary \ref{cor:cor1}. More than that, choosing $s^2_\theta= 0$ effectively reduces from three to two the number of free parameters in \eqref{eq:sol}. In summary, minimality could be used as a criterion to fix $\mu_{\scriptscriptstyle R}$ in nonrenormalizable QFTs whose UV completion is unknown. Note that, in any standard procedure based on DReg, $s^2_\theta$ would be a bare parameter containing ${1}/{\epsilon_{\mbox{\tiny UV}}}$ poles, which cannot be compensated by any finite value of $\mu_{\scriptscriptstyle R}$. Thus, setting $s^2_\theta= 0$ directly in \eqref{eq:sol} would not be possible. In the rest of this section we briefly outline the steps towards a possible generalization of our approach beyond the simple model of \eqref{eq:Lnonren}. Given the current interest in precise EFT analyses of collider data, we directly focus on a phenomenologically relevant problem by studying how new physics effects could be parameterized within the FDR framework at the NLO accuracy. \footnote{This means including all corrections ${\cal O}(g^2)$, ${\cal O}(\lambda_n)$ and ${\cal O}(g^2 \lambda_n)$ with respect to the lowest order standard model predictions.} To be definite, we consider the Lagrangian \begin{eqnarray} \label{eq:L6} {\cal L}_{\mbox{\tiny NP}}= {\cal L}^{(4)}_{\mbox{\tiny SM}}+\frac{g^2}{\Lambda^2}{\cal L}^{(6)}, \end{eqnarray} where ${\cal L}^{(4)}_{\mbox{\tiny SM}}$ is the full standard model bare Lagrangian and $g$ is the ${\rm SU(2)_L}$ coupling constant. ${\cal L}^{(6)}$ contains a set of gauge invariant dimension-six operators, multiplied by Wilson coefficients, which we want to determine, and $\Lambda$ is the new physics scale, with which all the $M_n$ in \eqref{eq:lambda} are identified. The reader should be aware of the fact that a systematic and detailed treatment of this problem is far beyond our scope. Here we simply want to point out the general qualitative differences with respect to more standard approaches. Equation \eqref{eq:L6} very much resembles the customary SMEFT \cite{Brivio:2017vri} dimension-six parameterization. However, in our case the operators in ${\cal L}^{(6)}$ are not necessarily closed under renormalization. For instance, they could be a sub-set of the operators of the Warsaw basis \cite{Grzadkowski:2010es}. Furthermore, ${\cal L}_{\mbox{\tiny NP}}$ remains the same at all loop orders (see footnote \ref{foot:1}). Before starting the calculation, one needs to expand ${\cal L}^{(6)}$ around the Higgs vacuum expectation value $v$. This gives rise to powers of $v/\Lambda$ that modify the relations connecting weak eigenstates to mass eigenstates and alter the gauge fixing needed to quantize ${\cal L}_{\mbox{\tiny NP}}$. An analogous problem is encountered in the SMEFT, and can be solved, for instance, as described in \cite{Helset:2018fgq}. \footnote{Alternatively, since our matching conditions only involve physical amplitudes, one can use any gauge expressed in terms of the bare fields in ${\cal L}^{(4)}_{\mbox{\tiny SM}}$, at the price of correcting the external particle wave functions such that propagators have residue one at their poles \cite{Passarino:2016saj}.} A difference arises when the $v/\Lambda$ terms generate contact interactions not present in ${\cal L}^{(4)}_{\mbox{\tiny SM}}$. In this case they should be included in the factor $K(\alpha)$ of \eqref{eq:lemat}. This is due to the fact that the expansion in \eqref{eq:eqABb} is in terms of the $\lambda_n$. The starting point to determine the Wilson coefficients and $\Lambda$ is a set of observables ${\cal O}_i$, $i \ge m+1$, for which there is an experimental agreement, when all $\lambda_n \to 0$, with the theoretical predictions obtained with ${\cal L}_{\mbox{\tiny NP}}$. \footnote{Adding real corrections might be needed at this stage to define infrared safe quantities.} This may require to fit different compositions of the dimension-six operators in ${\cal L}^{(6)}$ until this agreement is reached. After this is achieved, one measures one of the observables, say ${\cal O}_{m+1}$, at small values of the $\lambda_n$ and tries to determine $X^\prime_{-1,0}$ in \eqref{eq:musol0} such that the agreement persist also when $\lambda_n \ne 0$. Note that, when several $\lambda_n$ are involved, this may require measuring ${\cal O}_{m+1}$ in different phase-space regions. If the $\lambda_n \ne 0$ agreement is not reached, one is led to reconsider once again the combination of dimension-six operators in ${\cal L}^{(6)}$. When $X^\prime_{-1}$ and $X^\prime_0$ can be found, the theory is fixed and our conjecture states that all the other observables ${\cal O}_{i}$, $i > m+1$, are also reproduced by ${\cal L}_{\mbox{\tiny NP}}$. If necessary, this can be checked experimentally. \section{Conclusion} We have derived the order-by-order conditions which have to be fulfilled by effective amplitudes computed in FDR to reproduce exact high-energy predictions. In our procedure the Lagrangian of the effective model is not modified by the inclusion of higher dimensional operators. At the core of our analysis lies an expansion of the renormalization scale $\mu_{\scriptscriptstyle R}$ that mixes different perturbative orders. We have postulated that if there exist classes of amplitudes for which the effective and the exact theory coincide at low energies, and if a value of $\mu_{\scriptscriptstyle R}$ can be found, for one of them, that matches at higher energies the exact result onto the effective one, all the other effective amplitudes computed at $\mu_{\scriptscriptstyle R}$ reproduce the exact high-energy predictions. We have proven this explicitly to all loop orders by matching onto the Fermi model electroweak processes induced by the exchange of a one-fermion-loop dressed $W$, $Z$ or $\gamma$ propagator of arbitrary virtuality. In such a situation our approach is more direct than a standard EFT calculation, and gives some hints on how to handle nonrenormalizable models when more fundamental theories are not known. We plan to corroborate our conjecture by considering further classes of theories and corrections in future investigations. \begin{acknowledgements} I acknowledge the financial support of the MINECO project FPA2016-78220-C3-3-P and the hospitality of the CERN TH department during the completion of this work. I also thank Giampiero Passarino for informative discussions on the SMEFT. \end{acknowledgements} \bibliographystyle{spphys}
\section{Introduction} \label{sec:intro} Elastic anisotropy is widespread in the earth, and many papers discuss the influence of velocity anisotropy on traveltimes and amplitudes of seismic waves. A review of various anisotropic phenomena and an extensive list of references can be found in Crampin and Lovell\cite{CrampinLovell1991}. It is difficult to separate anisotropy from heterogeneity because their influences on seismic wavefields resemble each another. Even shear-wave splitting, commonly attributed to anisotropy, can be caused by strong heterogeneity\cite{GrechkaMcMechan1995}. One way of measuring seismic anisotropy is cross-well traveltime tomography\cite{PrattChapman1992, Michelena1993, Michelenaetal1993} that, under certain conditions, allows one to discriminate the effects of anisotropy and heterogeneity on recorded traveltimes. Because anisotropy is essentially a 3D phenomenon, anisotropic 3D ray tracing is an essential tool for its investigation. Most of the existing ray-tracing approaches fall into one of three groups: methods based on finite-difference solution of the eikonal equation\cite{Vidale1988, Dellinger1991, vanTrierSymes1991}, shooting methods\cite{CervenyMolotkovPsencik1977, Langanetal1985, GajewskiPsencik1987, VirieuxFarra1991, GuestKendall1993}, and bending methods\cite{UmThurber1987, Protheroetal1988, Schneideretal1992, FariaStoffa1994}, derived, respectively, from Huygens' principle, Snell's law, and Fermat's principle. Methods based on finite-difference solution of the eikonal equation have been applied to 2D anisotropic traveltime calculation\cite{Dellinger1991, QinSchuster1993}. Shooting and bending methods are used for 3D ray tracing\cite{UmThurber1987, Protheroetal1988, VirieuxFarra1991} in isotropic media; only shooting methods have currently been applied for ray tracing in 3D heterogeneous anisotropic media\cite{Cerveny1972, GajewskiPsencik1987, GuestKendall1993}. We develop a ray-bending technique because two-point ray tracing is more convenient for traveltime tomography than shooting methods. We use global Chebyshev approximation of a heterogeneous anisotropic model and curved rays that make the computations fast. \section{Methodology} \label{sec:intro} The main idea of the proposed ray-tracing method is that, in smoothly heterogeneous media, rays are smooth curves that can be approximated by smooth basis functions. We choose Chebyshev polynomials as the basis functions because series of these polynomials usually converge more rapidly to the approximated function than any other polynomial-based series\cite{Lanczos1988}. Fermat's principle is employed for two-point ray tracing. To parameterize smoothly heterogeneous media, we use a global 3D approximation of the medium, defined as a sum of Chebyshev polynomials and described by 3D Chebyshev polynomial coefficients or Chebyshev spectral components. The main advantage of this kind of parametrization is that it provides explicit expressions for traveltimes, and, if a ray has already been traced, explicit relations for variations of the traveltime as a function of Chebyshev spectral components of all model and ray parameters. Thus, the traveltime derivatives are obtained at almost no additional computation cost, allowing us to apply the conjugate gradient method\cite{Pressetal1987} to bend a ray path and minimize the traveltime along it. The absence of the derivatives would entail the use of slower converging minimization methods, such as the Nelder-Mead search\cite{Pressetal1987, Protheroetal1988}. The proposed technique possesses both the advantages and disadvantages of two-point ray tracing. In some models more than one ray (and traveltime) may exist between a source-receiver pair. Finding all valid solutions is generally difficult because they may correspond not only to minima but also to maxima or saddle points of the traveltime. The same pertains to anisotropy; cusps at the group velocity surfaces, as well as heterogeneity, can produce more than one ray path between the two end points. Although all these rays may be found by solving special equations\cite{GrechkaObolentseva1993} or by iteration for different initial guesses\cite{ObolentsevaGrechka1988}, we shall restrict our analysis to weakly transversely isotropic media to assure the absence of cusps and the presence of explicit relations for the group velocities\cite{Thomsen1986, Byunetal1989}. \section{Two-point Chebyshev ray-tracing} \label{sec:chebrt} \subsection{Model and ray parametrization} \label{sec:chebrt:subsec:mod} We study kinematics of wave propagation in a heterogeneous transversely isotropic (TI) model occupying a 3D rectangular volume, specified by the Cartesian coordinates of its corners ${\bm{a}} = (a_1, \, a_2, \, a_3)$ and ${\bm{b}} = (b_1, \, b_2, \, b_3)$. We define the functions \begin{subequations} \begin{align} m_1({\bm{x}}) & \equiv \alpha_0({\bm{x}}), \\ m_2({\bm{x}}) & \equiv \beta_0({\bm{x}}), \\ m_3({\bm{x}}) & \equiv \epsilon({\bm{x}}), \\ m_4({\bm{x}}) & \equiv \delta ({\bm{x}}), \end{align} and \begin{align} m_5({\bm{x}}) & \equiv \gamma ({\bm{x}}), \end{align} \end{subequations} corresponding to Thomsen's\cite{Thomsen1986} anisotropy parameters of TI model, and the directional cosines \begin{subequations} \begin{align} m_6({\bm{x}}) & \equiv c_1({\bm{x}}), \\ m_7({\bm{x}}) & \equiv c_2({\bm{x}}), \end{align} \end{subequations} defining the orientation of the unit vector of the symmetry axis \begin{subequations} \begin{align} {\bm{c}}({\bm{x}}) & \equiv [c_1({\bm{x}}), \, c_2({\bm{x}}), \, c_3({\bm{x}})], \end{align} where \begin{align} c_3({\bm{x}}) & = {\sqrt {1 - c_1^2({\bm{x}}) - c_2^2({\bm{x}})}}. \end{align} \end{subequations} Vector ${\bm{x}}$ in equations (1) and (2) denotes a point ${\bm{x}} \equiv (x_1, \, x_2, \, x_3)$, belonging to the model volume \begin{equation} {\bm{x}} \in [{\bm{a}}, \, {\bm{b}}]. \end{equation} Parameters $m_{\eta}, ~ (\eta = 1, \ldots, 7)$ specify a weakly TI medium inside the volume. For our objectives, however, it is more convenient to use the 3D Chebyshev spectral components $\mu_{\eta}$ (Appendix A) instead of the functions $m_{\eta} ({\bm{x}})$. \begin{figure} \includegraphics[width = 0.55\textwidth]{Fig1.eps} \caption{A model volume, a ray path (the heavy line) and its projections (the light lines) in 3D Cartesian coordinates.} \label{fig01} \end{figure} Consider the ray ${\bm{x}}(s)$ connecting a source at ${\bm{x}}^{source}$ and a receiver at ${\bm{x}}^{receiver}$ (Figure 1). The Cartesian coordinates $x_i$ of the ray are expanded in the series of Chebyshev polynomials $T_k(s)$ \begin{equation} {\bm{x}}(s) \equiv x_i(s) = \sum_{k=1}^{M_i} r_{i,k} \, T_{k-1}(s), \quad (s \in [0,1]; ~ i = 1, \, 2, \, 3), \end{equation} where $s$ is the normalized ray length, defined such that \begin{subequations} \begin{align} {\bm{x}}(0) & = {\bm{x}}^{source} \end{align} and \begin{align} {\bm{x}}(1) = {\bm{x}}^{receiver}, \end{align} \end{subequations} $r_{i,k}$ are the Chebyshev spectral components of the ray, and $M_i$ are the numbers of the polynomials used to approximate the ray in each direction $i = 1, \, 2, \, 3$ (Appendix B). Fermat's principle allows us to compute the Chebyshev spectral components $r_{i,k}$ of a ray. \subsection{Traveltime computation} \label{sec:chebrt:subsec:ttc} The traveltime along a curved ray connecting the source ${\bm{x}}^{source}$ and the receiver ${\bm{x}}^{receiver}$ is defined as an integral \begin{equation} t_{\rm Q} = \int_{{\bm{x}}^{source}}^{{\bm{x}}^{receiver}} p_{\rm Q}(m_{\eta} ({\bm{x}}),\, {\bm{x}}) \, d {\bm{x}}, \quad ({\rm Q = P, \, SV ~ or ~ SH}), \end{equation} where $p_{\rm Q}$ is the group slowness (reciprocal to the group velocity) of P, SV, or SH waves along the ray (Appendix~C), and $m_{\eta}$ are the model parameters [equations (1) and (2)]. Using the ray parametrization given by equations (5) and (6), we rewrite the integral (7) as \begin{equation} t_{\rm Q} = \int_0^1 {\cal T}_{\rm Q}(\mu_{\eta}, \, \bm{r}, \, s) ds, \end{equation} where the integrand \begin{equation} {\cal T}_{\rm Q}(\mu_{\eta}, \bm{r}, s) = p_{\rm Q} (m_{\eta}(\bm{r}, \, s), \, \bm{r}, \, s) \, R(\bm{r}, \, s), \end{equation} and \begin{equation} R(\bm{r}, \, s) = \left[ \, \sum_{i=1}^3 \, \dot x_i^2 (s) \right]^{1/2} \end{equation} is the length of an element of the ray arc. The dot over a function denotes a derivative with respect to its argument, and derivatives $\dot x_i$ are determined by equation (B8) in Appendix B, where the rays are described in terms of Chebyshev polynomials. Fermat's principle, \begin{equation} {\partial t_{\rm Q} \over {\partial r_{i,l} } } = \int_0^1 {\cal D}_{{\rm Q},i,l} (\mu_{\eta}, \, \bm{r}, \, s) \, ds = 0, \quad ({\rm Q = P, \, SV ~ or ~ SH}; ~ i = 1, \, 2, \, 3; ~ l = 3, \, \ldots, \, M_i), \end{equation} is used to find the unknown ray spectral coefficients $r_{i,l}$. The index $l$ starts from 3 because the known coordinates of the source and the receiver determine the linear components (for $l = 1, \, 2$) of the ray (see Appendix B for details). The integrand ${\cal D}$ is given by equation (D1) in Appendix D. Coefficients $r_{i,l}$ that satisfy equations (11) define rays corresponding to minima, maxima, or saddle points of traveltime. For complicated models, the solution of equations (11) is often nonunique and several rays, connecting the same source-receiver pair, may exist. Tracing all such rays is a complicated computational problem because there are no general methods of solving nonlinear systems like equations (11). However, if the solution of system (11) is unique or we want to find only the fastest ray, we can search for the traveltime minimum instead of solving nonlinear equations (11). The conjugate gradient method\cite{Pressetal1987} is applied to find the minimum traveltime. Partial derivatives (11) are the components of the traveltime gradient. To implement this approach we need to compute integrals (8) and (11). Again, the Chebyshev polynomials are helpful for doing this. Expanding the integrands ${\cal T}$ and ${\cal D}$ as functions of the ray length $s$ in Chebyshev series, we replace the integrals (8) and (11) by the dot products \begin{equation} t_{\rm Q} = {\bm{P}} \cdot {\bm{C}} ({\cal T}_{\rm Q}) \end{equation} and \begin{equation} {\partial t_{\rm Q} \over {\partial r_{i,l} } } = {\bm{P}} \cdot {\bm{C}} ({\cal D}_{{\rm Q},i,l}), \end{equation} where ${\bm{C}}(\cdot)$ denotes the direct Chebyshev transform of its argument, and vector ${\bm{P}}$ is defined by equation (E6) in Appendix E. \subsection{Numerical investigation of Chebyshev ray-tracing} \label{sec:chebrt:subsec:nec} We present two numerical examples to illustrate the features of the proposed technique. The efficiency of the method depends on the choice of the two numbers $M$ and $N$. The value of $M$ [equation (B7)] determines the number of unknown Chebyshev spectral coefficients of the ray to be found with the conjugate gradient method. The value of $N$ [equation (E1)] defines the number of points needed along each ray to compute traveltime with the required precision. These two quantities are to be determined by numerical experiments. First, we test the method for a model that has a known solution. Consider an isotropic medium with velocity \begin{equation} V(x_3) = V_0 \, \exp (g \, x_3) , \end{equation} increasing exponentially with depth $x_3$, for parameters $V_0 = 1.5$ km/s and $g = 1.5~{\rm km}^{-1}.$ Velocity function (14) was approximated by seven Chebyshev polynomials over the depth interval $x_3 \in [0,~ 1.2]$, and traveltimes were computed. Figure~\ref{fig02} displays the ray trajectories and calculated traveltimes for $M=4$, $N=7$ compared to the analytic solution \begin{equation} t(x_1, x_3) = { {\sqrt {2 \, ( \cosh g \, x_3 - \cos g \, x_1) } } \over { g \, V_0 \exp (g \, x_3 / 2) } } \end{equation} that exists for this velocity model\cite{Goldin1986}. We also performed computations for a set of values $M$ and $N$ listed in Table~\ref{tab1} to study the accuracy of the traveltime calculations and the time required to compute all 13 rays (Figure~\ref{fig02}) on a Sun-4 workstation. Only 1~--~2 iterations of the conjugate gradient method were needed to converge, starting from a straight ray as an initial guess. The number of iterations is found to be independent of $M$ and $N$. Table~\ref{tab1} shows that the computation time depends approximately linearly on $N$ and about quadratically on $M$. Increasing $M$ and $N$ beyond the values presented in Table~\ref{tab1} no longer increases the precision of traveltime calculations because of minor errors associated with the Chebyshev approximation of the velocity function (14). These errors can be made arbitrarily small by using more polynomials to approximate the exponential function in equation (14). \begin{figure} \includegraphics[width = 0.55\textwidth]{Fig2.eps} \caption{The ray trajectories (a) and traveltimes (b) for a source located at $x_i^{source} = (0, \, 0, \, 0)$ and receivers located at $x_i^{receiver} = (x_1, \, 0, \, x_3)$ in a heterogeneous medium described by velocity function $V(x_3) = 1.5 \, \exp (1.5 \, x_3)$ km/s. In (a), circles denote the source and receiver positions; in (b) asterisks denote computed traveltimes, and the solid line denotes the analytic solution computed with equation (15). } \label{fig02} \end{figure} \begin{table}[h] \caption{Computation times and accuracy of the traveltime calculations for the 13 rays in Figure 2 on a Sun-4 workstation, as a function of $M$ (the number of Chebyshev polynomials) and $N$ (the number of points used in integration).} \label{tab1} \def1.0{1.11} \begin{center} \begin{tabular}{||c|c|c|c||} \hline \hline ~ & ~ & Maximum error & Computation \\ ~ $M$ ~ & ~ $N$ ~ & in traveltime (ms) & time (s) \\ \hline 3 & 4 & 6.46 & 2.13 \\ & 5 & 2.80 & 2.79 \\ & 6 & 0.45 & 3.06 \\ & 7 & 0.12 & 3.76 \\ & 8 & 0.12 & 4.05 \\ & 9 & 0.12 & 4.90 \\ \hline 4 & 4 & 4.82 & 4.04 \\ & 5 & 1.41 & 4.50 \\ & 6 & 0.37 & 5.34 \\ & 7 & 0.10 & 6.01 \\ & 8 & 0.05 & 6.75 \\ & 9 & 0.02 & 7.65 \\ \hline 5 & 4 & 0.98 & 4.85 \\ & 5 & 0.81 & 6.75 \\ & 6 & 0.06 & 7.50 \\ & 7 & 0.04 & 9.16 \\ & 8 & 0.02 &10.20 \\ & 9 & 0.01 &11.27 \\ \hline \hline \end{tabular} \end{center} \def1.0{1.0} \end{table} The second example is ray tracing in a 3D heterogeneous TI model described by the anisotropy parameters\cite{Thomsen1986} \begin{subequations} \begin{align} \epsilon & = -0.03 + 0.3 \, x_3, \\ \delta & = 0.04 \, (x_1 + x_2), \end{align} and \begin{align} \gamma & = 0.05 + 0.02 \, x_1 + 0.03 \, x_2 + 0.04 \, x_3. \end{align} \end{subequations} The orientation of the symmetry axis is defined by \begin{subequations} \begin{align} c_1 & = 0.5 \, x_3, \\ c_2 & = 0.5 \, (x_1 - x_2). \end{align} \end{subequations} \begin{figure} \includegraphics[width = 0.75\textwidth]{Fig3.eps} \caption{Lateral velocity variations $V_P(x_1, \, x_2)$ (in km/s) in the model at depth levels $x_3 = 0.0$ km (a), $x_3 = 0.1$ km (b), $x_3 = 0.2$ km (c), and $x_3 = 0.3$ km (d). } \label{fig03} \end{figure} The 3D distribution of the P-wave velocity $\alpha_0({\bm{x}})$ is shown in Figure~\ref{fig03}, whereas the shear velocity is defined as \mbox{$\beta_0({\bm{x}}) = \alpha_0({\bm{x}})/2$} [equations (C1) and (C4)]. The other model functions, influencing the traveltimes to a lesser degree, are not shown. The source coordinates (in km) are ${\bm{x}}^{source} = [0.05, \, 0.05, \, 0.1]$, and 36 receivers are located at the coordinates ${\bm{x}}^{receiver} = [0.2 \, i, \, 0.2 \, j, \, 0.0], ~ (i, \, j = 0, \, \ldots, \, 5)$; these are displayed in Figures~\ref{fig04}a and~\ref{fig05}a. \begin{figure} \centerline{\begin{tabular}{c} \includegraphics[width=0.55\textwidth]{Fig4a.eps} \\ \includegraphics[width=0.55\textwidth]{Fig4b.eps} \\ \end{tabular}} \vspace{0mm} \caption{(a) The P-wave ray paths in the anisotropic medium (solid) and in the corresponding isotropic medium (dashed); (b)~computed traveltimes in the anisotropic ($\times$) and isotropic ($\circ$) media. } \label{fig04} \vspace{0mm} \end{figure} \begin{figure} \centerline{\begin{tabular}{c} \includegraphics[width=0.55\textwidth]{Fig5a.eps} \\ \includegraphics[width=0.55\textwidth]{Fig5b.eps} \\ \end{tabular}} \vspace{0mm} \caption{(a) SV (solid) and SH (dashed) ray trajectories; (b) traveltimes of SV ($\times$) and SH ($\circ$) waves. } \label{fig05} \vspace{0mm} \end{figure} We use $M_1 = M_2 = M_3 = 5$ polynomials to approximate the rays (i.\,e., 9 unknown spectral components for each ray are to be found) and $N=9$ points along the rays to perform integration. The conjugate gradient method converges after 2~--~3 iterations. Comparing the results with those in the first example, we expect the accuracy of our traveltime calculations to be around $10^{-4}$ s or better. Figure~\ref{fig04}a presents the P-wave ray trajectories in the specified TI medium and the trajectories in the related isotropic medium, for which $\epsilon = \delta = 0$ in equations (16a) and (16b). Corresponding traveltimes are shown in Figure~\ref{fig04}b. Although the ray paths differ substantially in the anisotropic and isotropic models, the traveltimes do not. A similar comparison of ray trajectories and traveltimes for SV and SH waves in the same TI model is given in Figure~\ref{fig05}. For this model, the heterogeneity influences traveltimes more than the anisotropy does. \section{Discussion} \label{sec:disc} Two-point ray tracing in 3D heterogeneous anisotropic media may be based on Chebyshev approximation of curved rays. The method is inexpensive in smoothly varying media because only a few polynomials are needed to approximate the ray paths. The global Chebyshev model parametrization provides explicit relations for partial derivatives of traveltimes as functions of the ray parameters. This allows us to use the rapidly converging conjugate gradient method to compute the traveltimes. The computing time depends directly on the values of $M$ (the number of Chebyshev polynomials approximating a ray) and $N$ (the number of integration points per ray). These quantities were determined in the first example by comparing the traveltimes to the known solution. Generally, when the solution is not known, $M$ and $N$ should be determined by numerical experiments. A few representative rays and traveltimes $t(M,N)$ are computed for a set of values $M$ and $N$. As $M$ and $N$ become greater traveltimes usually gradually decrease, whereas the computation time increases, as illustrated in Table~\ref{tab1}. We choose $M$ and $N$ that correspond to the minimum computation time for which traveltimes are about 0.05\% greater than the minimum $t(M,N)$ for all tested pairs of $M$ and $N$. The values of $M=5$ and $N=9$ were selected by this procedure for the second example. Although we applied only the conjugate gradient method to compute the ray trajectories and traveltimes, other methods of solving this problem are available. For example, one could compute the Hessian matrix $\partial^2 t / \partial \bm{r}^2$ and use the second order Newton method, which generally reduces number of iterations. The proposed technique is fast for weakly TI media, where the group velocity explicitly depends on a ray direction. If anisotropy is not weak, we would have to compute the group velocity for a given ray direction numerically. This can be done iteratively\cite{ObolentsevaGrechka1988} and involves searching for one phase angle for TI media and for two phase angles for more generally anisotropic media. This search, done for every evaluation of the group velocity, would significantly increase the computational time. On the other hand, the proposed technique applied to 3D isotropic media is faster by a factor of about five, as becomes clear from the examination of equations (C4) for the group velocities. To find the velocities, some of the quantities $m_j ~ (j = 1, \, \ldots, \, 7)$ have to be computed with equation (A4), which takes most of the computational effort. For an isotropic medium though, only the medium velocity itself needs to be computed. It is expected that increasing the complexity of the model (especially when functions describing the model parameters are discontinuous) would reduce the computational efficiency. Although Chebyshev ray tracing can be applied to models with discontinuities, the number of polynomials (and perhaps the number of required iterations) would no longer be small, and the technique loses its elegance. Another approach for discontinuous parameters is to separate the medium into blocks along surfaces of discontinuity (interfaces) and to construct rays as sequences of their smooth segments. This idea seems to be feasible but lies beyond the scope of this paper. \section{Acknowledgments} \label{sec:acknowl} The research leading to this paper was supported by a UT-Dallas graduate teaching assistantship (V.G.) and by the sponsors of the UTD Geophysical Consortium (G.A.M.). The computations were performed on a Sun-4 workstation in the Center for Lithospheric Studies at the University of Texas at Dallas. V.G. wishes to thank Sergey Fomel for the idea to perform the Chebyshev ray tracing in 3D rather than in 2D and Ilya Tsvankin for helpful discussions. We thank to Spyros Lazaratos, Reinaldo Michelena and an anonymous reviewer whose comments and suggestions improved the manuscript. This paper is Contribution No. 825 from the Department of Geosciences at the University of Texas at Dallas.
\section*{Acknowledgment} The authors thank the support from the Ministry of Science and Technology in Taiwan under Grants MoST 103-2112-M-007-017-MY3 and MoST 106-2112-M-007-004-MY3. F.C.L. and J.S.H. prepared the samples. C.B.H. and T.Y.C. designed and performed the experiments. J.O., T.S. and M.L. performed numerical simulations and data processing. C.B.H., J.O., T.S., and M.L. wrote the manuscript. All authors commented on the manuscript. T.Y.C. and J.O. contributed equally. \section*{Version \today} \section{Device fabrication and experimental setup} The plasmonic TWTL is fabricated by focused ion-beam milling (FEI Helios) out of a single crystalline gold flake with a height of 60~nm (Fig.~\ref{fig:FIBsetup}a). The flake is deposited on a glass substrate that is coated with a conductive indium tin oxide (ITO) layer of 40~nm. The width of both wires is set to 140~nm, while the gap separation is 100~nm. The linked input antenna has a width of 80~nm and is designed to allow the efficient excitation of both fundamental modes. A home-built dual-confocal transmission microscope is used to perform all measurements (Fig.~\ref{fig:FIBsetup}b). The excitation laser is a passively mode-locked fiber laser centered at 1560~nm, producing 60~fs transform-limited optical pulses at 80~MHz repetition rate with a maximum average power of 100~mW (Menlo Systems T-Light). The linearly polarized laser pulses are focused by a NIR long working distance 100x objective lens with NA=0.85 (Olympus LCPLN100XIR) to excite the plasmonic TWTL from the substrate side. Fundamental harmonic images are recorded in reflection by a NIR camera (Xenics Xeva-1.7-320). The SH signals are collected in transmission from the air side by a visible 100x objective with NA=0.9 (Olympus MPLFLN100X) and recorded by an electron-multiplied charge-coupled device (EMCCD, Andor iXon 897U-CS0-EXF). A short pass filter (Thorlabs FESH0900) and a band-pass filter (Thorlabs FL780-10) ensure that the recorded images show purely SH signals. \begin{figure} \includegraphics[width=\columnwidth]{fig_s0.pdf} \caption{\textbf{Fabricated TWTL and experimental setup.} (a) SEM image of a TWTL fabricated by focused ion-beam milling. For the top-down fabrication procedure single crystalin gold flakes are used. (b) The experimental setup is a home-built dual-confocal microscope that allows imaging of the fundamental and second harmonic signals. \label{fig:FIBsetup}} \end{figure} \section{Numerical simulation} To calculate the 2D modes of our plasmonic waveguide we use the commercial FEM software Comsol Multiphysics. Each of the two wires has a width of 140~nm and a height of 60~nm (edge rounding 25~nm, gap 100~nm). The optical properties of the waveguide consisting of gold are taken as interpolated data from Johnson and Christy \cite{JC:1972}. The homogeneous environment has the refractive index n=1. The environment was chosen homogeneous for a simplified representation but our argumentation is not affected or changed by adding a substrate. The mode analysis solves for the full vectorial fields. Since there are no resonances in the cross section of the TWTL the spatial shape of the modes is nearly independent of the wavelength. The subsequent calculation of the nonlinear polarization is performed in Matlab. \section{Full vectorial model} In general, the second order nonlinear polarization is defined as \begin{eqnarray} P^{(2)}_i(2\omega) &=& \epsilon_0 \sum\limits_{jk} \chi_{ijk}^{(2)} E_j(\omega)E_k(\omega) \quad \text{with} \quad i,j,k \in \{x,y,z\} \quad . \label{eq:e1} \end{eqnarray} with $\epsilon_0$ being the vacuum permittivity, $\chi_{ijk}^{(2)}$ the second order susceptibility, and $E_{j,k}(\omega) $ the electric field components at frequency $\omega$. However, due to the centro-symmetry of gold, the bulk contribution of the material vanishes and only surface nonlinearities have to be considered. Here, the $\chi^{(2)}$-tensor reduces to seven nonvanishing elements in a local coordinate system, at the surface of the structure under investigation \cite{Makitalo2011}. The transformation $(x,y,z) \rightarrow (t,n,s)$ is described by the rotation matrix \begin{eqnarray} \underline{\underline{D}} &=& \begin{pmatrix} \hat{\text{e}}_t \cdot \hat{\text{e}}_x & \hat{\text{e}}_t \cdot \hat{\text{e}}_y & 0\\ \hat{\text{e}}_n \cdot \hat{\text{e}}_x & \hat{\text{e}}_n \cdot \hat{\text{e}}_y & 0\\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} n_y & -n_x & 0 \\ n_x & n_y & 0 \\ 0 & 0 & 1\end{pmatrix} \quad , \end{eqnarray} where $n_x$ and $n_y$ are the vector components of the surface normal. The nonvanishing $\chi^{(2)}$ components are $\chi^{(2)}_1 \equiv \chi^{(2)}_{nnn}$, $\chi^{(2)}_2 \equiv \chi^{(2)}_{nss} = \chi^{(2)}_{ntt}$ and $\chi^{(2)}_3 \equiv \chi^{(2)}_{ssn} = \chi^{(2)}_{sns} = \chi^{(2)}_{ttn} = \chi^{(2)}_{tnt}$. After a local evaluation of $P^{(2)}$ at the surface and a back-transformation to Cartesian coordinates we obtain \begin{eqnarray} P^{(2)}_x &=& \epsilon_0 n_x \chi^{(2)}_1 (E_x n_x + E_y n_y)^2 \nonumber\\ & & +\,\epsilon_0 n_x \chi^{(2)}_2 \left[ E_z^2 + (E_x n_y - E_y n_x)^2\right] \nonumber\\ & & +\,2 \epsilon_0 n_y \chi^{(2)}_3 (E_x n_x + E_y n_y) (E_x n_y - E_y n_x) \\ P^{(2)}_y &=& \epsilon_0 n_y \chi^{(2)}_1 (E_x n_x + E_y n_y)^2 \nonumber\\ & & +\,\epsilon_0 n_y \chi^{(2)}_2 \left[ E_z^2 + (E_x n_y - E_y n_x)^2\right] \nonumber\\ & & -\,2 \epsilon_0 n_x \chi^{(2)}_3 (E_x n_x + E_y n_y) (E_x n_y - E_y n_x) \\ P^{(2)}_z &=& 2 \epsilon_0 \chi^{(2)}_3 E_z (E_x n_x + E_y n_y) \label{eq:e6} \end{eqnarray} Furthermore, we define the coupling efficiency $\eta$ of the nonlinear polarization $\mathbf{P}^{(2)}(2 \omega)$ to the waveguide modes $\mathbf{E}(2 \omega)$ similar to Ref. \cite{OBrien2015} as \begin{equation} \eta = \left| \int_{\partial A} \mathbf{P}^{(2)}(2 \omega)\, \cdot \, \mathbf{E}(2 \omega)^* \, ds \right |^2 \quad , \label{eq:eta} \end{equation} with $\partial A$ being the path along the 1D surface of the structure's cross section (see also main text). \newline \begin{figure} \includegraphics[width=\columnwidth]{fig_s2.pdf} \caption{\textbf{Spatially resolved complex integrands of the four coupling integrals.} In all graphs, the x-y-plane shows the cross section through the waveguide, the z-axis the integrand as amplitude and color-coded phase around the structure's surface. The amplitude of all four plots is normalized to the individual maximum since absolute magnitudes are not relevant for our purely symmetry based argumentation. \label{fig:overlap}} \end{figure} In the following we compute the coupling efficiency from the fundamental into the second harmonic waveguide modes, applying the full vectorial model. As given by Ref. \cite{Kauranen:2009}, we use the relative magnitudes $\chi^{(2)}_{1}=250$, $\chi^{(2)}_{2}=1$ and $\chi^{(2)}_{3}=3.6$ for the nonlinear susceptibility. With the nonlinear polarizations of the two fundamental modes and the two available second harmonic modes, we obtain four independent overlap integrals (eq.~\ref{eq:eta}). For visualization, the integrands of these integrals are shown in Fig.~\ref{fig:overlap}. It covers all four combination where the columns give the two nonlinear polarizations, the two rows the waveguide modes at the second harmonic frequency. In each plot, the x-y-plane shows the cross section through the waveguide and the z-direction the absolute value $|\mathbf{P}^{(2)}(2 \omega)\, \cdot \, \mathbf{E}(2 \omega)^*|$ of the integrand, evaluated at the surface of the structure. In each case, the amplitudes at the left and right waveguide branch show the same symmetry as the structure itself. Furthermore, the phase of the integrand is continuously color-coded from $-\pi/2$ (blue) over $0$ (white) to $\pi/2$ (red). We find, that either both branches have the identical phase or have a relative phase of $\pi$. In the later case, the integral over the whole surface and with it the coupling efficiency vanishes. In conclusion, we obtain the identical results as discussed in the main text by applying the symmetry argumentation. \newline Additional information such as the coupling efficiency can be extracted as well, by solving the integrals. However, we do not compare these computed values with the experimental data, since other parameters, such as the antenna coupling efficiency, propagation losses, or the phase matching influence the measured intensities as well, but are unknown and not implemented in this model. \section{Model for Fig.~4} \label{sec:ModelFIg4} Every field distribution at the fundamental frequency in the waveguide can be written as superposition of the symmetric ($\mathbf{E}_s$) and anti-symmetric ($\mathbf{E}_{as}$) mode: \begin{equation} \mathbf{E}_{tot} = a \, \mathbf{E}_s \, + \, b \, \mathbf{E}_{as} \quad , \end{equation} Rotating the linear polarization of the incoming fundamental laser beam results in \begin{equation} a = \cos \theta \quad \text{and} \quad b = r \exp(i \phi) \ \sin \theta \end{equation} $r$ and $\phi$ take into account that the excitation and coupling efficiencies of the antenna depend on polarization. We assume that only the normal component of the field plays an important role \cite{Makitalo2011}, i.e, \begin{equation} P^{(2)}_n = \epsilon_0 \, \chi^{(2)}_{nnn} \, E_n^2 \quad . \label{eq:p2_nnn} \end{equation} Putting everything together, we get \begin{equation} I_{s / as} = scaling_{s / as} \, \cdot \, \left| \int_{\partial A} \epsilon_0 \, \chi^{(2)}_{nnn} \, \cdot \, \left( a \, E_s \, + \, b \, \, E_{as} \right)^2 \cdot \, E_{s / as}(2 \omega)^* \, ds \right |^2 \end{equation} For each emitting mode $E_{s / as}(2 \omega)$ the full integral can be separated in 3 terms which are product of 3 field distributions each. For half of them the integral vanishes due to symmetry. The other three integrals depend in their value on the spatial shape of the modes and give the complex values $A,B,C$. \begin{center} \begin{tabular}{llll} \hline prefactor & fundamental \qquad & second-harmonic \qquad & result \\ \hline $ \cos^2 \theta$ & $ E_s \, E_s$ & $E_s$ & $A \, \cos^2 \theta$ \\ $ r^2 \exp(i 2 \phi) \, \sin^2 \theta$ & $ E_{as} \, E_{as}$ & $E_s$ & $B \, r^2 \, \exp(i 2 \phi ) \, \sin^2 \theta $ \\ $2 r \, \exp(i \phi) \, \cos \theta \, \sin \theta $ & $ E_s \, E_{as}$ & $E_s$ & 0 \\ \hline $ \cos^2 \theta$ & $ E_s \, E_s$ & $ E_{as}$ & 0 \\ $ r^2 \exp(i 2 \phi) \, \sin^2 \theta$ & $ E_{as} \, E_{as}$ & $ E_{as}$ & 0 \\ $2 r \, \exp(i \phi) \, \cos \theta \, \sin \theta $ & $ E_s \, E_{as}$ & $ E_{as}$ & $C \, 2 r \, \exp(i \phi) \, \cos \theta \, \sin \theta $ \\ \hline \end{tabular} \end{center} The values $A$ and $B$ of the integrals can be adsorbed into the fitting parameters $r$ and $\phi$. Moreover, as we need scaling parameters for the absolute values anyway, we can also absorb $C$ in the fitting parameters $r$ and $\phi$. Altogether we get \begin{eqnarray} I_s & = & scaling_s \, \cdot \, \left( \cos^4 \theta \, + \, r^4 \, \sin^4 \theta \, + \, 2 r^2 \, \cos( 2 \phi) \, \cos^2 \theta \, \sin^2 \theta \right) \\ I_{as} & = & scaling_{ as} \, \cdot \, 4 r^2 \, \cos^2 \theta \, \sin^2 \theta \, + \, offset \quad . \label{eq.i_AS} \end{eqnarray} In $I_{as}$ an additional $offset$ was added. Here, the model requires a decrease to zero at $\theta = 0\deg$ and $90\deg$ which cannot be fully achieved in the experiment due to structural imperfections, local SHG and a non-perfect mode detector. \section{Polar Plots} In order to validate our model for the second harmonic emission, resulting from a mixed fundamental mode, we perform excitation angle resolved measurements. This allows us to change the amplitude ratio between the two excited fundamental modes while keeping the relative phase constant. The polarization of the laser beam is tuned using a half wave plate. For each excitation polarization two images are aquired using a horizontal and a vertical analyzer. The fundamental harmonic images are taken in reflection, while the second harmonic images are recorded in transmission. For noise reduction all images are filtered by a 3-by-3 pixel median filter and the background is subtracted. In the second harmonic images the background is defined as the mean value from a dark area, while in the fundamental case a line correction is performed to correct artifacts of the NIR camera. Here, the images are additionally smoothed by a Gaussian filter ($\sigma=1.5\, \text{pixel}$, equal to $360\,\text{nm}$ (FWHM 960~nm)). In order to extract the fundamental and second harmonic emission intensities, we apply circular regions of interest to separate the antenna and each of both mode detector ends. The emitted signal from each region is determined by its maximum value. \newline \begin{figure} \includegraphics[width=\columnwidth]{fig_s1_b.pdf} \caption{\textbf{Excitation polarization resolved emission from the TWTL's antenna and a split ring resonator.} The fundamental as well as the second harmonic emission is shown for different excitation polarizations. The columns differentiate between wavelength respectively the structure. The rows mark the two analyzer positions. The dashed lines are guides to the eye. The point marked by a red cross represents an excluded data point. \label{fig:idea1}} \end{figure} We start by discussing the emission properties of the TWTL's antenna and compare them to those of a split ring resonator (SRR), which has a similar geometry. A design comparable in size (arm length 400~nm) ensures that linear and nonlinear scattering properties resemble the ones of the TWTL's antenna without waveguide and mode detector. In analogy to the polar plots presented in the main text (Fig.~4), the excitation polarization dependent emission from the SRR and the TWTL's antenna are shown in Fig.~\ref{fig:idea1}. The columns show the fundamental harmonic and second harmonic emission, the two rows defined the analyzer positions that were used in the detection path. In the fundamental data we see a strong similarity between the emission pattern from the SRR and the TWTL's antenna for both detection polarizations. Furthermore, the fundamental scattered light follows the polarization properties of the exciting laser beam. The second harmonic emission of both structures is also in good agreement. Under the vertical polarization detection, we observe an emission maximum for about $45 \deg$ excitation and minima for $0 \deg$ and $90 \deg$. The deviation in the aspect ratio for the horizontal analyzer position is caused by slightly differing emission properties of the structures, although the arm length of the SRR is chosen to be off-resonant at the fundamental and the second harmonic frequency.\\ \begin{figure} \includegraphics[width=\columnwidth]{fig_s1_a.pdf} \caption{\textbf{Excitation polarization resolved emission from the TWTL's mode detector.} The fundamental as well as the second harmonic emission is shown for different excitation polarizations. The columns differentiate between wavelength respectively the structure. The rows mark the two analyzer positions. The dashed lines are guides to the eye while the solid lines represent fitted physical models. The fundamental data with dashed lines was multiplied by a factor of ten for better visibility. \label{fig:idea2}} \end{figure} Finally we investigate the emission properties from the two mode detector ends, shown in Fig.~\ref{fig:idea2}. The fundamental emission from the mode detector shows the expected behavior as we already verified in the main text for unpolarized detection. As expected, the emission from the inner end of the mode detector is predominantly vertical polarized and the signal from the outer end horizontal. Furthermore, we find at the opposing ends the same emission behavior (shown with dashed lines), but with a factor of $1/10$ less intensity, what can be attributed to the limited mode-splitting quality of the mode detector. Moving to the second harmonic emission of the mode detector leads us to the right part of Fig.~\ref{fig:idea2}. The diagonal graphs show the SH emission from the anti-symmetric mode (upper left) and symmetric mode (lower right), as already discussed in the main text. Both pattern can be nicely described by our model, taking the SH mode-coupling during propagation into account. However, in contrast to the fundamental harmonic, the second harmonic emission properties of the opposing ends of the mode detector have no similarity with each other. In consequence, the signals shown in the off-diagonal graphs (shown with dashed lines) can not be attributed to the mode splitting properties of the mode detector. Our explanation is locally generated second harmonic light from the fundamental wave, scattered and depolarized at the mode detector ends. Here, the fundamental harmonic field locally generates a nonlinear polarization at the inner and outer end of the mode detector. Due to the curvature and imperfections of the mode-detector geometry, the emitted second harmonic light is strongly depolarized and mainly depends on the incoming fundamental field intensity. In consequence, we find a very good agreement between the overall fundamental harmonic distributions (solid red lines) and the second harmonic background signals (blue dashed lines). It has to be mentioned, that these background signals also underlay the fitted second harmonic data (solid blue lines). In case of the SH-antisymmetric mode (upper left) this background signal is part of the offset, implemented in the model for $ I_{as} $ (see equation~\ref{eq.i_AS}). For the SH-symmetric mode (lower right), an offset is not necessary or is fitted to almost zero, respectively. Based on the good agreement between model and experiment as well as the small background signals we can conclude, that the locally generated second harmonic plays an minor role and can be almost neglected in the overall measured signals.
\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex {2.3ex \@plus.2ex}% {\normalfont\large\bfseries}} \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\bfseries}} \renewcommand{\H}{\mathcal{H}} \newcommand{\mbox{SU}}{\mbox{SU}} \newcommand{\chi^{{\rm U}(\infty)}}{\chi^{{\rm U}(\infty)}} \newcommand{\rm f}{\rm f} \linespread{1.3} \unitlength = .8mm \begin{titlepage} \begin{center} \hfill \\ \hfill \\ \vskip 1cm \title{A Note on the Subleading Soft Graviton} \author{Elizabeth Himwich,$^1$ Zahra Mirzaiyan,$^{2,3}$ and Sabrina Pasterski$^1$} \address{ $^1$Center for the Fundamental Laws of Nature, Harvard University,\\ Cambridge, MA 02138, USA \\ $^2$Physics Department, Isfahan University of Technology,\\ 84156-83111, Isfahan, Iran\\ $^3$Erwin Schr\"odinger Institute for Mathematics and Physics, \\ Boltzmanngasse 9A, 1090 Wien, Austria } \end{center} \vspace{2.0cm} \begin{abstract} We show that the soft part of the charge generating infinitesimal superrotations can be expressed, in harmonic gauge, in terms of metric components evaluated at the boundaries of null infinity that are subleading in a large radius expansion. We then recast the spin memory observable in terms of these boundary values. \end{abstract} \vfill \end{titlepage} \eject \tableofcontents \section{Introduction} Recently,~\cite{Himwich:2019dug} identified a new celestial current corresponding to Low's subleading soft theorem in electromagnetism. There, the current could be expressed in terms of the boundary values of the gauge potential at null infinity, but at one order subleading in a large radius expansion compared to the current~\cite{He2014} corresponding to the leading soft theorem. In this note, we examine the analogous computations for gravity in harmonic gauge. We find that the subleading soft graviton mode that appears in the superrotation charge~\cite{Kapec2014}, the 2D stress tensor for 4D gravity~\cite{Kapec2017}, and the spin memory observable~\cite{Pasterski2016} can also be neatly recast in terms of a difference between boundary values of the metric. The relevant metric component is $h_{zz}^{(0)}$, which is subleading to the radiative data where the superrotation Goldstone mode appears, $h_{zz}^{(-1)}$. We hope that rewriting the generator of inhomogeneous shifts in the superrotation Goldstone mode in terms of a boundary difference of $h_{zz}^{(0)}$ will help to bridge the gap between our understanding of the leading supertranslation example~\cite{He:2014laa} and recent studies of the $\Delta=2$ Goldstone mode in~\cite{Donnay:2018neh}. \section{Setup} We consider linearized gravity in four dimensions. In this section we set up Einstein's equations in harmonic gauge, impose boundary conditions on the metric perturbations, and identify the residual symmetries allowed by these boundary conditions. \subsection{Linearized Gravity in Harmonic Gauge} We consider perturbations $g_{\mu \nu} = \eta_{\mu \nu} + h_{\mu \nu} - \frac{1}{2}\eta_{\mu\nu}\eta^{\alpha\beta}h_{\alpha\beta}$ around a flat background metric \begin{equation} \vspace*{-.1cm} ds^2 = \eta_{\mu\nu} dx^{\mu} dx^{\nu} = -du^2 - 2dudr + 2r^2 \gamma_{z\bar{z}}dz d\bar{z}, \vspace*{-.1cm} \end{equation} and impose the harmonic gauge condition \begin{equation}\label{eq:harga} \vspace*{-.1cm} \nabla^{\mu}h_{\mu\nu}=0, \vspace*{-.1cm} \end{equation} where $h_{\mu\nu}$ is the trace-reversed perturbation. In this gauge, the linearized Einstein equations are \begin{equation} \vspace*{-.1cm} \square h_{\mu\nu} = - 16 \pi G T_{\mu\nu} . \end{equation} Harmonic gauge leaves unfixed a set of residual diffeomorphisms $\xi$ that obey $\square \xi = 0$. Coordinate expansions of the Einstein equations, harmonic gauge condition, and residual diffeomorphisms are in Appendix A. \vspace*{-.1cm} \subsection{Boundary Conditions} We choose falloffs of the matter stress tensor $T_{\mu \nu}$ consistent with a massless scalar field (see also~\cite{Campiglia2017, Pate2018}). This corresponds to \begin{equation} \label{eq:Gfalloff} \vspace*{-.1cm} \begin{aligned} G_{uu} \sim \mathcal{O}(r^{-2}), \ \ \ \ \ G_{ur} \sim \mathcal{O}(r^{-4}), \ \ \ \ \ G_{rr} \sim \mathcal{O}(r^{-4}), \\ G_{uA} \sim \mathcal{O}(r^{-2}), \ \ \ \ \ G_{rA} \sim \mathcal{O}(r^{-3}), \ \ \ \ \ G_{AB} \sim \mathcal{O}(r^{-1}). \end{aligned} \vspace*{-.1cm} \end{equation} These asymptotics for the stress tensor can be consistently captured by a metric with the following boundary behavior \begin{equation} \label{eq:hfalloff} \begin{aligned} \vspace*{-.1cm} h_{uu} \sim \mathcal{O}(r^{-1}\log r), \ \ \ \ \ h_{ur} \sim \mathcal{O}(r^{-1} \log r), \ \ \ \ \ h_{rr} \sim \mathcal{O}(r^{-1} \log r), \\ h_{uA} \sim \mathcal{O}(\log r), \ \ \ \ \ h_{rA} \sim \mathcal{O}(\log r), \ \ \ \ \ h_{AB} \sim \mathcal{O}(r \log r). \end{aligned} \vspace*{-.1cm} \end{equation} Note that in harmonic gauge, logarithmic $r$-dependence is required for a consistent solution of the linearized Einstein equations with matter in four dimensions. We write a large-$r$ mode expansion and solve the Einstein equations and the harmonic gauge condition order-by-order in $r$. These expansions are written out in Appendix A. Throughout, we denote the term in the metric expansion with coefficient $\frac{1}{r^n}$ by the superscript $(n)$ and the term in the expansion with coefficient $\frac{\log r}{r^n}$ by a tilde with superscript $(n)$. We will use the same notation for the modes of other fields in what follows. The residual diffeomorphisms for harmonic gauge are parameterized by the free data \begin{equation}\label{eq:udata} \{\xi^{u(1)}(u,z,{\bar z}), \xi^{r(1)}(u,z,{\bar z}), \xi^{A(2)}(u,z,{\bar z}) \}. \end{equation} These are the modes of $\xi^\mu$ which can have arbitrary $u$-dependence, and solutions to $\Box \xi=0$ can be found by recursively solving~(\ref{eq:vec1}-\ref{eq:vec2}) starting from these modes. As detailed in Appendix B, we can use these arbitrary functions of $(u,z,{\bar z})$ in~(\ref{eq:udata}) to perform residual gauge fixing and arrive at the stronger falloffs \begin{equation} \begin{aligned}\label{eq:fixedfalloff} h_{uu} &= \sum_{n=2}^{\infty} \frac{h_{uu}^{(n)}}{r^n} + \sum_{n=1}^{\infty} \frac{ \tilde{h}_{uu}^{(n)} \log r}{r^n}, &h_{ur} = \sum_{n=2}^{\infty} \frac{h_{ur}^{(n)}}{r^n} + \sum_{n=2}^{\infty} \frac{ \tilde{h}_{ur}^{(n)} \log r}{r^n}, \\ h_{rr} &= \sum_{n=3}^{\infty} \frac{h_{rr}^{(n)}}{r^n} + \sum_{n=3}^{\infty} \frac{ \tilde{h}_{rr}^{(n)} \log r}{r^n}, &h_{uA} = \sum_{n=1}^{\infty} \frac{h_{uA}^{(n)}}{r^n} + \sum_{n=1}^{\infty} \frac{ \tilde{h}_{uA}^{(n)} \log r}{r^n}, \\ h_{rA} &= \sum_{n=1}^{\infty} \frac{h_{rA}^{(n)}}{r^n} + \sum_{n=2}^{\infty} \frac{ \tilde{h}_{rA}^{(n)} \log r}{r^n} , &h_{AB} = \sum_{n=-1}^{\infty} \frac{h_{AB}^{(n)}}{r^n} + \sum_{n=0}^{\infty} \frac{ \tilde{h}_{AB}^{(n)} \log r}{r^n}. \end{aligned} \end{equation} \subsection{Residual Symmetries} We now consider the full set of residual diffeomorphisms that preserve the gauge-fixed falloffs~(\ref{eq:fixedfalloff}). Since the arbitrary $u$ dependence of~(\ref{eq:udata}) has been removed by our residual gauge choice in Appendix B, we expect $\xi$ to be parameterized by functions of $(z,{\bar z})$. In Appendix C we show that the residual diffeomorphisms have the following large-$r$ behavior \begin{equation}\begin{array}{l}\label{eq:vect} \xi^u=\frac{u}{2}D^AY_A+f+\mathcal{O}(r^{-2}\log r)\\ \xi^r=-\frac{r}{2}D^AY_A-\frac{u}{2}D^AY_A+\frac{1}{2}D^2f+Hr^{-1}+(\frac{u}{4}D^2[D^2+2]f-E)r^{-1}\log r+\mathcal{O}(r^{-2}\log r)\\ \xi^B=Y^B-D^B(\frac{u}{2}D^AY_A+f)r^{-1}+(\frac{u}{2}D^B[D^2+2]f+V^B)r^{-2}+\mathcal{O}(r^{-3}\log r) . \end{array}\end{equation} Here the free data are \begin{equation}\label{eq:alldiff} \{f(z,{\bar z}), Y^z(z), H(z,{\bar z}), E(z,{\bar z}), V^A(z,{\bar z}),...\} \end{equation} with $Y^{\bar z}({\bar z})=\overline{Y^z}$ and the ellipsis denotes integration constants that appear at each subleading order when recursively solving~(\ref{eq:vec1}-\ref{eq:vec2}).\footnote{Since the residual diffeomorphisms are parameterized by $u$-independent functions, any further gauge fixing would only be able to fix certain metric components at one value of $u$, and will not further modify the large-$r$ falloffs in~(\ref{eq:fixedfalloff}).} The leading terms parameterized by $f(z,{\bar z})$ and $Y^z(z)$ correspond to supertranslations and superrotations, respectively. These are the only modes of $\xi^\mu$ that contribute to a non-zero charge at null infinity~\cite{Wald:1999wa}, with linear terms given by~\cite{Barnich2011} \begin{equation}\label{eq:charge1} \hat{Q}_\xi^{\mathcal{I}^+_-}= -\frac{1}{4\pi G}\int_{\mathcal{I}^+_-}d^2z\sqrt{\gamma} \left[(f+\frac{1}{2}uD_AY^A)\gamma^{z\bar{z}}C_{u\bar{z}zr}^{(1)}-\frac{1}{2}Y^z C_{zrru}^{(3)}-\frac{1}{2}Y^{\bar z} C_{{\bar z} rru}^{(3)}\right], \end{equation} where the leading modes of the Weyl tensor components are \begin{equation}\label{eq:weyl1} C_{u\bar{z}zr}^{(1)} =\lim\limits_{r\rightarrow\infty} r C_{u\bar{z}zr}~~~C_{zrru}^{(3)}=\lim\limits_{r\rightarrow\infty} r^3 C_{zrru}. \end{equation} These correspond to the Weyl scalars $\Psi_2^0$ and $\Psi_1^0$, respectively, in the Newman-Penrose formalism~\cite{Newman1962}, up to a rescaling due to tetrad normalization for our celestial sphere metric. For reference,~(\ref{eq:charge1}) is the linear part of (3.2) of~\cite{Barnich2011} (see (4.4) of~\cite{Kapec2014} and (2.4) of~\cite{Pasterski2016} for expressions for the Weyl tensor components in terms of the mass and angular momentum aspects appearing in~\cite{Barnich2011}). The above residual diffeomorphism~(\ref{eq:vect}) produces the following inhomogeneous shifts in the leading modes of the chiral part of the sphere metric \begin{equation}\label{eq:shift} \delta h_{zz}^{(-1)}=-uD_z^3Y^z-2D_z^2 f,~~~ \delta h_{zz}^{(0)}=u[D^2-2]D_z^2f+2D_zV_z . \end{equation} Note that the $u$-independent early and late time behavior of $h_{zz}^{(0)}$ both shift under the residual diffeomorphism parameterized by $V_A(z,{\bar z})$. As in the electromagnetic case~\cite{Himwich:2019dug}, the subleading soft theorem will correspond to a difference in the boundary values of this subleading-in-$r$ mode $h_{zz}^{(0)}$ of the sphere metric. \section{Conservation Law} In what follows, we will work in units where $8\pi G=1$. Using the Einstein equations and the harmonic gauge condition, we find that the Weyl tensor modes in~(\ref{eq:weyl1}) evaluate to \begin{equation} \begin{aligned} \gamma^{z\bar{z}}C_{u\bar{z}zr}^{(1)} & = \frac{1}{2}\tilde{h}_{uu}^{(1)} - \frac{1}{2} D^{\bar{z}}D^{\bar{z}} h_{\bar{z}\bar{z}}^{(-1)} + \frac{1}{6}\gamma^{z \bar{z}}T_{z\bar{z}}^{(1)} \end{aligned} \end{equation} and \begin{equation} \partial_u C_{zrru}^{(3)} = - T_{uz}^{(2)} - \frac{1}{2}D^{\bar{z}}T_{z\bar{z}}^{(1)} -\frac{1}{2} D_z \tilde{h}_{uu}^{(1)} + \frac{1}{2} D_z D^{\bar{z}}D^{\bar{z}} h_{\bar{z}\bar{z}}^{(-1)}. \end{equation} To investigate the superrotation charge in~(\ref{eq:charge1}), we consider the contribution at a fixed point on the celestial sphere\footnote{If we were not restricted to CKVs this would amount to setting $Y^z\rightarrow\delta^2(z-w), Y^{\bar z}\rightarrow0, f\rightarrow0$. Equating this to~(\ref{eq:charge1}) requires the boundary condition~(\ref{eq:vaccend}).} \begin{equation} \begin{aligned} \int du \partial_u ( C_{zrru}^{(3)} + u D^{\bar z} C_{u\bar{z}zr}^{(1)}) = &- \int du T_{uz}^{(2)} + \frac{1}{2} \int du D_z u \partial_u \tilde{h}_{uu}^{(1)} - \frac{1}{2} \int du D_z D^{\bar{z}}D^{\bar{z}} u \partial_u h_{\bar{z}\bar{z}}^{(-1)} \\ &- \frac{1}{2} \int du D^{\bar{z}}T_{z\bar{z}}^{(1)} + \frac{1}{6} \int du D^{\bar{z}}\partial_u(uT_{z\bar{z}}^{(1)}). \end{aligned} \end{equation} Stress tensor conservation gives \begin{equation} \partial_u T_{rr}^{(4)} = - \gamma^{AB}T_{AB}^{(1)}, \end{equation} and since $T_{rr}$ vanishes at the boundaries of $\mathcal{I}^+$, we find that the $u$-integral of the trace of $T_{AB}^{(1)}$ vanishes. Using $T_{uu}^{(2)} = \partial_u \tilde{h}_{uu}^{(1)}$ and evaluating the boundary terms gives \begin{equation} \begin{aligned} \label{eq:Mcharge} \big( C_{zrru}^{(3)} + u D^{\bar z} C_{u\bar{z}zr}^{(1)} \big) \Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-} = &- \int du \big(T_{uz}^{(2)} - \frac{1}{2} u D_z T_{uu}^{(1)} \big) - \frac{1}{2} \int du D_z D^{\bar{z}}D^{\bar{z}} u \partial_u h_{\bar{z}\bar{z}}^{(-1)} . \end{aligned} \end{equation} The Ward identity for the linearized superrotation charge~(\ref{eq:charge1}), which contains a convolution of the left-hand side of~(\ref{eq:Mcharge}) with a CKV $Y^z$, was demonstrated in~\cite{Kapec2014} using the subleading soft theorem. When this CKV is specified to the particular complexified form $Y^z=\frac{1}{w-z},~Y^{\bar z}=0$, the contribution from the second term on the right-hand side of~(\ref{eq:Mcharge}) is proportional to the 2D stress tensor for 4D gravity~\cite{Kapec2017}. In ${\cal S}$-matrix elements, this term inserts a subleading soft graviton. This subleading soft graviton mode also appeared in~\cite{Pasterski2016} as the spin memory observable. So far, we have only performed computations near $\mathcal{I}^+$ but an analogous story holds near $\mathcal{I}^-$, and the additional input of a matching condition and falloffs at the boundaries of null infinity is required to make statements about symmetries of the $\mathcal{S}$-matrix. The relevant matching conditions for the Weyl tensor components are given in (2.12)-(2.13) of~\cite{Pasterski2016} \begin{equation}\label{eq:matching} C_{u\bar{z}zr}^{(1)}\Big{|}_{\mathcal{I}^+_-}=C_{v\bar{z}zr}^{(1)}\Big{|}_{\mathcal{I}^-_+}~,~~~~\partial_{[z}C_{{\bar z}] rru}^{(3)} \Big{|}_{\mathcal{I}^+_-}=\partial_{[z}C_{{\bar z}] rrv}^{(3)} \Big{|}_{\mathcal{I}^-_+}. \end{equation} The analyses~\cite{Kapec2014,Pasterski2016} looked in particular at spacetimes that start and end in vacuum with massless matter that enters and exits through past and future null infinity. This amounts to setting \begin{equation}\label{eq:vaccend} \big( C_{zrru}^{(3)} + u D^{\bar z} C_{u\bar{z}zr}^{(1)} \big) \Big{|}_{\mathcal{I}^+_+} = \big( C_{zrrv}^{(3)} + v D^{\bar z} C_{v\bar{z}zr}^{(1)} \big) \Big{|}_{\mathcal{I}^-_-}=0. \end{equation} The matching of the Weyl scalars was used in~\cite{Kapec2014} to recast~(\ref{eq:Mcharge}) and its past null infinity counterpart as a conservation law. In the following section we recast the charge in terms of a difference in the boundary values of $h_{zz}^{(0)}$. Then, in section~\ref{sec:spinmem}, we recast the spin memory observable in the same terms. \subsection{Expression as a Boundary Difference} We now rewrite the subleading soft graviton mode in terms of a change in the boundary values of asymptotic data using the Einstein equations in harmonic gauge, which give \begin{equation} - 2 T_{\bar{z}\bar{z}}^{(1)} = [\square h_{\bar{z}\bar{z}}]^{(1)} = 2 \partial_u h_{\bar{z}\bar{z}}^{(0)} + [D^2 - 2] h_{\bar{z}\bar{z}}^{(-1)} . \end{equation} Recall from the previous subsection that stress tensor conservation implies that the $u$-integral of $D^{{z}}T_{z\bar{z}}^{(1)}$ vanishes. We note that stress tensor conservation also gives \begin{equation} \partial_uT_{r{\bar z}}^{(3)} = D^BT_{B{\bar z}}^{(1)}. \end{equation} Then, by taking $T_{r{\bar z}}^{(3)}$ to vanish at the boundaries of $\mathcal{I}^+$, the $u$-integral of $D^{{\bar z}}T_{{\bar z}\bz}^{(1)}$ vanishes as well. Using also that $D^{{\bar z}}T_{{\bar z}\bz}^{(1)}$ falls off faster than $u^{-1}$, we have \begin{equation} \int du~u\partial_u D^{\bar z} [D^2 - 2]h_{\bar{z}\bar{z}}^{(-1)} =-2\int du~u\partial_u^2 D^{\bar z} h_{\bar{z}\bar{z}}^{(0)} . \end{equation} A straightforward computation gives \begin{equation} \begin{aligned} [D^2 +1] D_zD^{\bar{z}}D^{\bar{z}} h_{\bar{z}\bar{z}}^{(-1)} &= D_zD^{\bar{z}}D^{\bar{z}} [D^2 - 2] h_{\bar{z}\bar{z}}^{(-1)} . \end{aligned} \end{equation} With this we can rewrite \begin{equation}\label{eq:shift1} \begin{aligned} \scalemath{0.9}{\big( C_{zrru}^{(3)}+ u D^{\bar{z}}C_{u\bar{z}zr}^{(1)} \big) \Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-}} = &\scalemath{0.85}{- \int du \big(T_{uz}^{(2)} - \frac{1}{2} u D_z T_{uu}^{(1)} \big) - [D^2 + 1]^{-1} D_zD^{\bar{z}}D^{\bar{z}}(1 - u \partial_u) h_{\bar{z}\bar{z}}^{(0)} \Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-}}. \end{aligned} \end{equation} Note the appearance of the operator $(1 - u \partial_u)$, as in electromagnetism~\cite{Himwich:2019dug}. This subtracts off the linear $u$-growth in $h_{{\bar z}\bz}^{(0)}$. At early and late times, the matter stress tensor vanishes and using~(\ref{eq:shift}) we can describe the asymptotic behavior of the metric perturbations near $\mathcal{I}^{+}_{\pm}$ as \begin{equation}\label{eq:latetime} h_{{\bar z}\bz,\pm}^{(-1)} =-uD_{\bar z}^3\hat{Y}^{\bar z}({\bar z}) -2 D_{\bar z}^2 \hat{f}^{\pm}(z,\bar{z}), \ \ \ h_{{\bar z}\bz,\pm}^{(0)} = u [D^2 - 2] D_{\bar z}^2 \hat{f}^{\pm}(z,\bar{z}) + 2D_{\bar z} \hat{V}_{\bar z}^{\pm}(z,\bar{z}). \end{equation} The notation is intended to reflect that used for the residual vector field $V^A$ and supertranslation Goldstone mode $f(z,\bar{z})$ of ~\cite{Strominger2016a} (denoted $C(z,{\bar z})$ there, see also~\cite{He:2014laa}), with the carat emphasizing the distinction that such a diffeomorphism would shift both the $\mathcal{I}^+_+$ and $\mathcal{I}^+_-$ values of the respective quantities but would not affect the difference between their boundary values. We have also allowed for a superrotation parameterized by $\hat{Y}^{\bar z}({\bar z})$, which is in the kernel of the differential operators acting on $h_{{\bar z}\bz}^{(-1)}$ in~(\ref{eq:Mcharge}) and so will not affect the conclusions that follow regarding the memory effect.\footnote{As long as we consider asymptotically flat solutions without snapping cosmic strings~\cite{Strominger:2016wns}, there will be no transition between differently superrotated vacua (hence we drop a $\pm$ superscript for $\hat{Y}^{\bar z}$).} We thus have \begin{equation}\label{eq:shift2} \begin{aligned} D_zD^{\bar{z}}D^{\bar{z}}(1 - u \partial_u)h_{\bar{z}\bar{z}}^{(0)}\Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-} &= [D^2 + 1]D_zD_z\hat{V}^z\Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-}, \end{aligned} \end{equation} which finally gives \begin{equation} \label{eq:Vcharge} \begin{aligned} \big( C_{zrru}^{(3)} + u D^{\bar z} C_{u\bar{z}zr}^{(1)} \big) \Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-} = &- \int du \big(T_{uz}^{(2)} - \frac{1}{2} u D_z T_{uu}^{(2)} \big) - D_zD_z\hat{V}^z\Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-}. \end{aligned} \end{equation} We have rewritten the soft part of the superrotation charge as a difference in the boundary values of in $\hat{V}_A$. As in the discussion following~(\ref{eq:Mcharge}), one can also use the matching~(\ref{eq:matching}) and boundary conditions~(\ref{eq:vaccend}) to recast the difference in $\hat{V}_A$ in terms of stress tensor fluxes. The soft part of the charge, given in (5.13) of~\cite{Kapec2014}, is \begin{equation} Q_S^+(Y^z,Y^{\bar z}=0)=\frac{1}{2}\int_{\mathcal{I}^+} \sqrt{\gamma}d^2z du Y^z D_z D^{\bar z} D^{\bar z} u\partial_u h_{{\bar z}\bz}^{(-1)}=\int \sqrt{\gamma}d^2z Y^z D_zD_z\hat{V}^z\Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-}, \end{equation} where we have complexified the superrotations. In particular we find \begin{equation} T^{CFT}_{ww}=2i Q_{S}^+(Y^z=\frac{1}{w-z},Y^{\bar z}=0) \end{equation} as mentioned above. This soft charge generates an inhomogeneous shift in the News tensor ($\partial_u h_{zz}^{(-1)}$ in our notation) \begin{equation}\label{eq:chargenews} [Q_S^+,h^{(-1)}_{zz}]=i u D_z^3Y^z. \end{equation} Acting on the vacuum, the soft charge inserts a soft graviton rather than leaving it invariant, providing a notion of Goldstone bosons within the context of asymptotic symmetries and soft theorems (see~\cite{Strominger:2013jfa}). For the supertranslation case, \cite{He:2014laa} introduced a symplectic pairing between the Goldstone mode and a conjugate soft mode, which~\cite{Donnay:2018neh} cast in the conformal basis~\cite{Pasterski:2017kqt}.~~\cite{Donnay:2018neh} also proposed the superrotation analog of the Goldstone mode, whose shift is parameterized by $Y^A$. From~(\ref{eq:chargenews}) we see that $\Delta \hat{V}_A$ is related to the conjugate of the Goldstone mode. In the supertranslation case, the symplectically paired modes are $C(z,{\bar z})$ and $N(z,{\bar z})$ of~\cite{He:2014laa}, where $C(z,{\bar z})$ parameterizes the supertranslation Goldstone mode and $N(z,{\bar z})$ parameterizes the difference in boundary values. Both are at radiative order. Here, in the superrotation case, the difference in boundary values of $h_{zz}^{(0)}$ and constant-in-$u$ Goldstone mode $\partial_u h_{zz}^{(-1)}$ are separated by an order of $r$. We leave the detailed study of the symplectic pairing to future work.\footnote{ Note that here the $\Delta \hat{V}_A$ that appears in our recasting of the soft graviton mode has a priori no restrictions, while the superrotated vacua are parameterized only by holomorphic $Y^z(z)$. It suggests that a thorough analysis of the appropriate symplectic pairing will connect to an ongoing question in the literature of whether superrotations should be enhanced to $\mathrm{Diff}(S^2)$~\cite{Campiglia2014} (see also~\cite{Conde:2016rom} for an alternate proposal). This involves a modification of the boundary falloffs but allows one to invert the soft theorem from the Ward identity. On the other hand there may be a more natural way of projecting onto the part of $\Delta \hat{V}_A$ that provides the natural symplectic partner to the superrotation Goldstone mode, which we hope to address in future work.} \subsection{Spin Memory}\label{sec:spinmem} In~\cite{Pasterski2016}, the spin memory observable was defined to be an accumulated time delay $\Delta^+u$ between two counter-propagating light beams for a BMS detector arranged in a ring with circumference $2\pi L$ \begin{equation}\label{eq:spindelay} \Delta^+u=\frac{1}{2\pi L}\int du \oint_{\mathcal{C}}(D^z h_{zz}^{(-1)}dz+D^{\bar z} h_{{\bar z}\bz}^{(-1)}d{\bar z}). \end{equation} By Stokes's theorem, this is proportional to a surface integral of the curl $\mathrm{Im}[D_z^2 h^{zz(-1)}]$ over the region bounded by $\mathcal{C}$. This curl has the nice feature of projecting out the linearly growing piece in the radiative metric~(\ref{eq:latetime}). The expression for $\Delta^+u$ was shown to be equal t \begin{equation} \Delta^+ u=-\frac{1}{\pi^2L}\mathrm{Im} \int_{D_\mathcal{C}}d^2w \gamma_{w{\bar w}}\int d^2 z \partial_{\bar z} \mathcal{G}(z;w)\left[C_{zrru}^{(3)}\Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-}+\int_{\mathcal{I}^+} du T_{uz}^{(2)}\right]\vspace*{.3cm} \end{equation} where we have introduced the Green's function~\cite{Pasterski2016} \vspace*{-.2cm}\begin{equation} \mathcal{G}(z;w)=\log \sin^2\frac{\Theta}{2},~~\sin^2\frac{\Theta(z,w)}{2}\equiv\frac{|z-w|^2}{(1+w{\bar w})(1+z{\bar z})} \vspace*{-.2cm} \end{equation} which obeys \vspace*{-.2cm} \begin{equation}\label{eq:source} \scalemath{1}{\partial_z\partial_{\bar z} \mathcal{G}(z;w)=2\pi\delta^2(z-w)-\frac{1}{2}\gamma_{z{\bar z}}} .\vspace*{-.2cm} \end{equation} Now from~(\ref{eq:Vcharge}), we have \begin{equation} \begin{aligned} \int_{\mathcal{I}^+} du ~2 D_{[{\bar z}} T_{z]u}^{(2)} =-2D_{[{\bar z}}C_{z]rru}^{(3)}-D_{\bar z} D_z D_z \hat{V}^z+D_z D_{\bar z} D_{\bar z} \hat{V}^{\bar z}\Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-}, \end{aligned} \end{equation} where the curl projects out the $\int u D_z T_{uu}^{(2)}$ in~(\ref{eq:Vcharge}). We thus have \begin{equation}\begin{aligned}\label{eq:delusimp} \Delta^+ u&=\frac{1}{\pi^2L}\mathrm{Im} \int_{D_\mathcal{C}}d^2w \gamma_{w{\bar w}}\int d^2 z\partial_z\partial_{\bar z} \mathcal{G}(z;w)D_z\hat{V}^z\Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-}\\ &=\frac{2}{\pi L}\mathrm{Im} \int_{D_\mathcal{C}}d^2w \gamma_{w{\bar w}}\left[D_w \hat{V}^w-\frac{1}{4\pi}\int d^2 z \gamma_{z{\bar z}} D_z\hat{V}^z\right]\Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-}\\ &=\frac{1}{i\pi L} \int_{D_\mathcal{C}}d^2w [D_w \hat{V}_{\bar w}-D_{\bar w} \hat{V}_w]\Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-} \\ \end{aligned} \end{equation} using the fact that the integral of a curl over the full $z$-sphere vanishes to kill the contribution from the second term in~(\ref{eq:source}). Using \begin{equation} d^2w=dx\wedge dy=\frac{i}{2}dw\wedge d{\bar w}, \end{equation} (\ref{eq:delusimp}) is beautifully recast as \begin{equation}\label{eq:spinresult} \Delta^+ u=\frac{1}{2\pi L} \oint_{\mathcal{C}} \hat{V}_A dx^A \Big{|}^{\mathcal{I}^+_+}_{\mathcal{I}^+_-} . \end{equation} We learn that spin memory measures the change between early and late time values of the the contour integral of the subleading soft mode $\hat{V}^A$ that we have identified in this note.\footnote{As in (5.9) of~\cite{Pasterski2016}, we could consider spacetimes that satisfy~(\ref{eq:vaccend}), and combine contributions from past and future null infinity $\Delta \tau\equiv \Delta^+ u-\Delta^- v$, so as to cancel the Weyl tensor contribution, and write $\Delta \tau$ as in terms of fluxes of $T_{uz}$ and $T_{vz}$. However, this additional restriction is not needed to equate the observable time delay identified in~\cite{Pasterski2016} to a difference in the boundary values of $\hat{V}_A$ via~(\ref{eq:spinresult}). } \vspace*{.5cm} \section*{Acknowledgements} We are grateful to Dan Kapec, Monica Pate, and Ana Raclariu for useful discussions, and in particular Andrew Strominger and Burkhard Schwab for collaboration at an early stage of this project. E.H. is funded by the National Science Foundation through a Graduate Research Fellowship under grant DGE-1745303. Z.M. is supported in part by the Erwin Schr\"odinger JRF fund. S.P. is supported by the National Science Foundation through a Graduate Research Fellowship under grant DGE-1144152 and by the Hertz Foundation through a Harold and Ruth Newman Fellowship.
\section{Introduction} Integer division often refers to two closely related concepts, the actual division and the modulus. Given an integer numerator $n$ and a non-zero integer divisor $d$, the integer division, written $\ourdiv$, gives the integer quotient ($n \ourdiv d = q$). The modulus, written $\bmod$, gives the integer remainder ($n \bmod d = r$). Given an integer numerator $n$ and an integer divisor $d$, the quotient ($q$) and the remainder ($r$) are always integers even when the fraction $n/d$ is not an integer. It always holds that the quotient multiplied by the divisor plus the remainder gives back the numerator: $n = q \ourtimes d + r$. Depending on the context, `integer division' might refer solely to the computation of the quotient, but might also refer to the computation of both the integer quotient and the remainder. The integer division instructions on x64 processors compute both the quotient and the remainder.\footnote{We use \emph{x64} to refer to the commodity Intel and AMD processors supporting the 64-bit version of the x86 instruction set. It is also known as x86-64, x86\_64, AMD64 and Intel~64.} In most programming languages, they are distinct operations: the C programming language uses \texttt{/} for division ($\ourdiv$) and \texttt{\%} for modulo ($\bmod$). \newcommand{items}{items} Let us work through a simple example to illustrate how we can replace an integer division by a multiplication. Assume we have a pile of 23~items, and we want to know how many piles of 4~items\ we can divide it into and how many will be left over ($n=23$, $d=4$; find $q$ and $r$). Working in base 10, we can calculate the quotient $23 \ourdiv 4 = 5$ and the remainder $23 \bmod 4 = 3$, which means that there will be 5~complete piles of 4~items\ with 3~items\ left over ($23 = 5 \ourtimes 4 + 3$). If for some reason, we do not have a runtime integer division operator (or if it is too expensive for our purpose), we can instead precompute the multiplicative inverse of 4 once ($\ensuremath{c}=1/d=1/4=0.25$) and then calculate the same result using a multiplication ($23 \ourtimes 0.25 = 5.75$). The quotient is the integer portion of the product to the left of the decimal point ($q = \ourfloor*{5.75} = 5$), and the remainder can be obtained by multiplying the fractional portion $f=0.75$ of the product by the divisor $d$: $r = f \ourtimes d = 0.75 \ourtimes 4 = 3$. The binary registers in our computers do not have a built-in concept of a fractional portion, but we can adopt a fixed-point convention. Assume we have chosen a convention where $1/d$ has 5~bits of whole integer value and 3~bits of `fraction'. The numerator 23 and divisor 4 would still be represented as standard 8-bit binary values (00010111 and 00000100, respectively), but $1/d$ would be 00000.010. From the processor's viewpoint, the rules for arithmetic are still the same as if we did not have a binary point---it is only our interpretation of the units that has changed. Thus we can use the standard (fast) instructions for multiplication ($00010111 \ourtimes 00000010 = 00101110$) and then mentally put the `binary point' in the correct position, which in this case is 3 from the right: 00101.110. The quotient $q$ is the integer portion (leftmost 5 bits) of this result: 00101 in binary ($q=5$ in decimal). In effect, we can compute the quotient $q$ with a multiplication (to get 00101.110) followed by a right shift (by three bits, to get 000101). To find the remainder, we can multiply the fractional portion (rightmost 3~bits) of the result by the divisor: $00000.110 \ourtimes 00000100 = 00011.000$ ($r = 3$ in decimal). To quickly check whether a number is divisible by 4 ($n \mod 4 = 0$?) without computing the remainder it suffices to check whether the fractional portion of the product is zero. But what if instead of dividing by 4, we wanted to divide by 6? While the reciprocal of 4 can be represented exactly with two digits of fixed-point fraction in both binary and decimal, $1/6$ cannot be exactly represented in either. As a decimal fraction, $1/6$ is equal to the repeating fraction 0.1666\ldots (with a repeating 6), and in binary it is 0.0010101\ldots (with a repeating 01). Can the same technique work if we have a sufficiently close approximation to the reciprocal for any divisor, using enough fractional bits? Yes! For example, consider a convention where the approximate reciprocal $\ensuremath{c}$ has 8 bits, all of which are fractional. We can use the value 0.00101011 as our approximate reciprocal of 6. To divide $23$ by 6, we can multiply the numerator (10111 in binary) by the approximate reciprocal: $n \ourtimes \ensuremath{c} = 00010111 \ourtimes 0.00101011 = 11.11011101$. As before, the decimal point is merely a convention, the computer need only multiply fixed-bit integers. From the product, the quotient of the division is 11 in binary ($q=3$ in decimal); and indeed $23\ourdiv 6=3$. To get the remainder, we multiply the fractional portion of the product by the divisor ($f \ourtimes d = 0.11011101 \ourtimes 00000110 = 101.00101110$), and then right shift by 8~bits, to get 101 in binary ($r=5$ in decimal). See Table~\ref{tab:example6} for other examples. \begin{table} \caption{\label{tab:example6} Division by 6 ($d=110$ in binary) using a multiplication by the approximate reciprocal ($\ensuremath{c}=0.00101011$ in binary). The numerator $n$ is an $N$-bit value, with $N=6$. The approximate reciprocal uses $F=8$~fractional bits. The integer portion of the product ($N$ bits) gives the quotient. Multiplying the fractional portion of the product ($F$ bits) by the divisor ($N$ bits) and keeping only the integer portion ($N$ bits), we get the remainder (two last columns). The integer portion in bold (column 2) is equal to the quotient (column 3) in binary. The integer portion in bold (column 4) is equal to the remainder (column 5) in binary. } \centering \begin{minipage}{\textwidth} \centering \begin{tabular}{clclc}\toprule $n$ & numerator times the approx.\ reciprocal ($n\ourtimes \ensuremath{c}$) & quotient & fractional portion $\ourtimes$ divisor ($f \ourtimes d$) & remainder \\ & $N$ bits $\ourtimes$ $F$ bits $\to$ $N+F$ bits & $N$ bits & $F$ bits $\ourtimes$ $N$ bits $\to$ $N+F$ bits & $N$ bits \\ \midrule 0 & $ 000000 \ourtimes 0.00101011 = \textbf{000000}.00000000$ & 0 & $ 0.00000000 \ourtimes 000110 = \textbf{000000}.00000000$ & 0 \\ 1 & $ 000001 \ourtimes 0.00101011 = \textbf{000000}.00101011$ & 0 & $ 0.00101011 \ourtimes 000110 = \textbf{000001}.00000010$ & 1 \\ 2 & $ 000010 \ourtimes 0.00101011 = \textbf{000000}.01010110$ & 0 & $ 0.01010110 \ourtimes 000110 = \textbf{000010}.00000100$ & 2 \\ 3 & $ 000011 \ourtimes 0.00101011 = \textbf{000000}.10000001$ & 0 & $ 0.10000001 \ourtimes 000110 = \textbf{000011}.00000110$ & 3 \\ 4 & $ 000100 \ourtimes 0.00101011 = \textbf{000000}.10101100$ & 0 & $ 0.10101100 \ourtimes 000110 = \textbf{000100}.00001000$ & 4 \\ 5 & $ 000101 \ourtimes 0.00101011 = \textbf{000000}.11010111$ & 0 & $ 0.11010111 \ourtimes 000110 = \textbf{000101}.00001010$ & 5 \\ 6 & $ 000110 \ourtimes 0.00101011 = \textbf{000001}.00000010$ & 1 & $ 0.00000010 \ourtimes 000110 = \textbf{000000}.00001100$ & 0 \\ $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ \\ 17 & $ 010001 \ourtimes 0.00101011 = \textbf{000010}.11011011$ & 2 & $ 0.11011011 \ourtimes 000110 = \textbf{000101}.00100010$ & 5 \\ 18 & $ 010010 \ourtimes 0.00101011 = \textbf{000011}.00000110$ & 3 & $ 0.00000110 \ourtimes 000110 = \textbf{000000}.00100100$ & 0 \\ 19 & $ 010011 \ourtimes 0.00101011 = \textbf{000011}.00110001$ & 3 & $ 0.00110001 \ourtimes 000110 = \textbf{000001}.00100110$ & 1 \\ 20 & $ 010100 \ourtimes 0.00101011 = \textbf{000011}.01011100$ & 3 & $ 0.01011100 \ourtimes 000110 = \textbf{000010}.00101000$ & 2 \\ 21 & $ 010101 \ourtimes 0.00101011 = \textbf{000011}.10000111$ & 3 & $ 0.10000111 \ourtimes 000110 = \textbf{000011}.00101010$ & 3 \\ 22 & $ 010110 \ourtimes 0.00101011 = \textbf{000011}.10110010$ & 3 & $ 0.10110010 \ourtimes 000110 = \textbf{000100}.00101100$ & 4 \\ 23 & $ 010111 \ourtimes 0.00101011 = \textbf{000011}.11011101$ & 3 & $ 0.11011101 \ourtimes 000110 = \textbf{000101}.00101110$ & 5 \\ 24 & $ 011000 \ourtimes 0.00101011 = \textbf{000100}.00001000$ & 4 & $ 0.00001000 \ourtimes 000110 = \textbf{000000}.00110000$ & 0 \\ $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ \\ 63 & $ 111111 \ourtimes 0.00101011 = \textbf{001010}.10010101$ & 10 & $ 0.10010101 \ourtimes 000110 = \textbf{000011}.01111110$ & 3 \\ \bottomrule \end{tabular} \end{minipage} \end{table} While the use of the approximate reciprocal $\ensuremath{c}$ prevents us from confirming divisibility by 6 by checking whether the fractional portion is exactly zero, we can still quickly determine whether a number is divisible by 6 ($n \bmod 6 = 0$?) by checking whether the fractional portion is less than the approximate reciprocal ($f < c$?). Indeed, if $n = q \ourtimes d + r$ then the fractional portion of the product of $n$ with the approximate reciprocal should be close to $r/d$: it makes intuitive sense that comparing $r/d$ with $\ensuremath{c} \approx 1/d$ determines whether the remainder $r$ is zero. For example, consider $n=42$ (101010 in binary). We have that our numerator times the approximate reciprocal of 6 is $101010 \ourtimes 0.00101011 = 111.00001110$. We see that the quotient is 111 in binary ($q=7$ in decimal), while the fractional portion $f$ is smaller than the approximate reciprocal $\ensuremath{c}$ ($0.00001110 < 0.00101011$), indicating that 42 is a multiple of 6. In our example with 6 as the divisor, we used 8~fractional bits. The more fractional bits we use, the larger the numerator we can handle. An insufficiency of fractional bits can lead to incorrect results when $n$ grows. For instance, with $n=131$ ($10000011$ in binary) and only 8~fractional bits, $n$ times the approximate reciprocal of 6 is $10000011 \ourtimes 0.00101011 = 10110.00000001$, or 22 in decimal. Yet in actuality, $131 \ourdiv 6 = 21$; using an 8~bit approximation of the reciprocal was inadequate. How close does the approximation need to be?---that is, what is the minimum number of fractional bits needed for the approximate reciprocal $\ensuremath{c}$ such that the remainder is exactly correct for all numerators? We derive the answer in \S~\ref{sec:remainderdirectly}. The scenario we describe with an expensive division applies to current processors. Indeed, integer division instructions on recent x64 processors have a latency of 26~cycles for 32-bit registers and at least 35~cycles for 64-bit registers~\cite{fog2016instruction}. We find similar latencies in the popular ARM processors~\cite{arma57}. Thus, most optimizing compilers replace integer divisions by constants $d$ that are known at compile time with the equivalent of a multiplication by a scaled approximate reciprocal $\ensuremath{c}$ followed by a shift. To compute the remainder by a constant ($n \bmod d$), an optimizing compiler might first compute the quotient $n \ourdiv d$ as a multiplication by $\ensuremath{c}$ followed by a logical shift by $F$~bits $( \ensuremath{c} \ourtimes n ) \ourdiv 2^F$, and then use the fact that the remainder can be derived using a multiplication and a subtraction as $n \bmod d = n - (n \ourdiv d) \ourtimes d$. Current optimizing compilers discard the fractional portion of the multiplication ($ ( \ensuremath{c} \ourtimes n ) \bmod 2^F$). Yet using the fractional bits to compute the remainder or test the divisibility in software has merit. It can be faster (e.g., by more than 25\%) to compute the remainder using the fractional bits compared to the code produced for some processors (e.g., x64 processors) by a state-of-the-art optimizing compiler. \section{Related Work} Jacobsohn\cite{jacobsohn1973combinatoric} derives an integer division method for unsigned integers by constant divisors. After observing that any integer divisor can be written as an odd integer multiplied by a power of two, he focuses on the division by an odd divisor. He finds that we can divide by an odd integer by multiplying by a fractional inverse, followed by some rounding. He presents an implementation solely with full adders, suitable for hardware implementations. He observes that we can get the remainder from the fractional portion with rounding, but he does not specify the necessary rounding or the number of bits needed. In the special case where we divide by 10, Vowels\cite{Vowels:1992:D} describes the computation of both the quotient and remainder. In contrast with other related work, Vowels presents the computation of the remainder directly from the fractional portion. Multiplications are replaced by additions and shifts. He does not extend the work beyond the division by~10. Granlund and Montgomery\cite{Granlund:1994:DII:773473.178249} present the first general-purpose algorithms to divide unsigned and signed integers by constants. Their approach relies on a multiplication followed by a division by a power of two which is implemented as an logical shift ($(\ourceiling*{2^F / d } \ourtimes n ) \ourdiv 2^F$). They implemented their approach in the GNU GCC compiler, where it can still be found today (e.g., up to GCC version 7). Given any non-zero 32-bit divisor known at compile time, the optimizing compiler can (and usually will) replace the division by a multiplication followed by a shift. Following Cavagnino and Werbrouck\cite{Cavagnino:2008:EAI:1388169.1388172}, Warren\cite{warr:hackers-delight-2e} finds that Granlund and Montgomery choose a slightly suboptimal number of fractional bits for some divisors. Warren's slightly better approach is found in LLVM's Clang compiler. See Algorithm~\ref{algo:gmwalgo}. \begin{algorithm} \begin{algorithmic}[1] \State \textbf{Require}: fixed integer divisor $d \in [1,2^{N})$ \State \textbf{Require}: runtime integer numerator $n \in [0,2^{N})$ \State \textbf{Compute}: the integer $n \ourdiv d$ \If{$d$ is a power of two ($d=2^K$)} \State return $n\ourdiv 2^K$ \hfill \Comment{Implemented with a bitwise shift} \ElsIf{for $L=\ourfloor*{\log_2(d)}$ and $\ensuremath{c}=\ourceiling*{2^{N+L}/d}$, we have $\ensuremath{c} \ourtimes (2^N- (2^N \bmod d) -1) < (2^N \ourdiv d) 2^{N+L} $ } \State return $(\ensuremath{c} \ourtimes n) \ourdiv 2^{N+L}$ \hfill\Comment{$\ensuremath{c}\in[0,2^N)$} \ElsIf{$d= 2^K d'$ for $K>0$} \State let $L=\ourceiling*{\log_2(d')}$ and $\ensuremath{c}=\ourceiling*{2^{N-K+L}/d'}$ \hfill\Comment{$\ensuremath{c}\in[0,2^N)$} \State return $ \ensuremath{c} \ourtimes (n \ourdiv 2^K) \ourdiv 2^{N-K+L}$ \Else \State let $L = \ourceiling*{\log_2 d }$ and $\ensuremath{c}=\ourceiling*{2^{N+L}/d }$ \hfill \Comment{$\ensuremath{c}>2^N$} \State let $\ensuremath{c}'$ be such that $\ensuremath{c}= 2^N + \ensuremath{c}'$ \hfill \Comment{$\ensuremath{c}'\in [0, 2^N)$} \State return $(\ourfloor*{\ensuremath{c}' \ourtimes n / 2^N } + ((n - \ourfloor*{\ensuremath{c}' \ourtimes n / 2^N }) \ourdiv 2))\ourdiv 2^{L-1}$ \EndIf \end{algorithmic} \caption{Granlund-Montgomery-Warren\cite{Granlund:1994:DII:773473.178249,warr:hackers-delight-2e} division algorithm by a constant using unsigned integers. \label{algo:gmwalgo}} \end{algorithm} Following Artzy et al.\cite{Artzy:1976:FDT:359997.360013}, Granlund and Montgomery\cite{Granlund:1994:DII:773473.178249} describe how to check that an integer is a multiple of a constant divisor more cheaply than by the computation of the remainder. Yet, to our knowledge, no compiler uses this optimization. Instead, all compilers that we tested compute the remainder $r$ by a constant using the formula $r= n - q\ourtimes d$ and then compare against zero. That is, they use a constant to compute the quotient, multiply the quotient by the original divisor, subtract from the original numerator, and only finally check whether the remainder is zero. In support of this approach, Granlund and Montgomery\cite{Granlund:1994:DII:773473.178249} state that \emph{the remainder, if desired, can be computed by an additional multiplication and subtraction}. Warren\cite{warr:hackers-delight-2e} covers the computation of the remainder without computing the quotient, but only for divisors that are a power of two $2^K$, or for small divisors that are nearly a power of two ($2^K +1$, $2^K -1$). In software, to our knowledge, no authors except Jacobsohn\cite{jacobsohn1973combinatoric} and Vowels\cite{Vowels:1992:D} described using the fractional portion to compute the remainder or test the divisibility, and neither of these considered the general case. In contrast, the computation of the remainder directly, without first computing the quotient, has received some attention in the hardware and circuit literature\cite{331617,Doran1995,7933010}. Moreover, many researchers\cite{Rutten:2010:EFP:1731022.1731026,moller2011improved} consider the computation of the remainder of unsigned division by a small divisor to be useful when working with big integers (e.g., in cryptography). \section{Computing the Remainder Directly} \label{sec:remainderdirectly} Instead of discarding the least significant bits resulting from the multiplication in the Granlund-Montgomery-Warren algorithm, we can use them to compute the remainder without ever computing the quotient. We formalize this observation by Theorem~\ref{theorem:crazyass}, which we believe to be a novel mathematical result. In general, we expect that it takes at least $N$~\emph{fractional bits} for the approximate reciprocal $\ensuremath{c}$ to provide exact computation of the remainder for all non-negative numerators less than $2^N$. Let us say we use $F=N+L$ fractional bits for some non-negative integer value $L$ to be determined. We want to pick $L$ so that approximate reciprocal $\ensuremath{c} =\ourceiling*{2^F/d} = \ourceiling*{2^{N+L}/d}$ allows exact computation of the remainder as $r = \left ( \left ( \left ( \ensuremath{c} \ourtimes n \right ) \bmod 2^F \right )\ourtimes d \right ) \ourdiv 2^F$ where $F=N+L$. We illustrate our notation using the division of $63$ by $6$ as in the last row of Table~\trimmedref{tab:example6}. We have that $63$ is 111111 in binary and that the approximate reciprocal $\ensuremath{c}$ of $6$ is $\ourceiling*{2^8/6}=00101011$ in binary. We can compute the quotient as the integer part of the product of the reciprocal by \begin{align*} n \ourtimes \ensuremath{c} = \overbrace{111111}^{N=6} \ourtimes 0.\underbrace{\overbrace{001010}^{N=6}\overbrace{11}^{L=2}}_{F=N+L=8} = \overbrace{0001010}^{\mathrm{quotient:~}N\mathrm{~bits}}.\overbrace{10010101}^{( \ensuremath{c} \ourtimes n ) \bmod 2^F }. \end{align*} Taking the $F$-bit fractional portion ($( \ensuremath{c} \ourtimes n ) \bmod 2^F$), and multiplying it by the divisor $6$ (110 in binary), we get the remainder as the integer portion of the result: \begin{align*} (( \ensuremath{c} \ourtimes n ) \bmod 2^F )\ourtimes d = \overbrace{10010101}^{( \ensuremath{c} \ourtimes n ) \bmod 2^F } \ourtimes \overbrace{000110}^{d: N\mathrm{~bits}}=\overbrace{0000011}^{\mathrm{remainder:~}N\mathrm{~bits}}.\cdots. \end{align*} The fractional portion $(\ensuremath{c} \ourtimes n) \bmod 2^{F}$ given by 10010101 is relatively close to the product of the reciprocal by the remainder ($00101011 \ourtimes 11$) given by 10000001: as we shall see, this is not an accident. Indeed, we begin by showing that the $F=N+L$~least significant bits of the product ($(\ensuremath{c} \ourtimes n) \bmod 2^{N+L}$) are approximately equal to the scaled approximate reciprocal $\ensuremath{c}$ times the remainder we seek ($\ensuremath{c} \ourtimes (n\bmod d)$), in a way made precise by Lemma~\ref{lemma:interval}. Intuitively, this intermediate result is useful because we only need to multiply this product by $d$ and divide by $2^F$ to \emph{cancel out} $\ensuremath{c}$ (since $\ensuremath{c} \ourtimes d \approx 2^F$) and get the remainder $n\bmod d$. \begin{lemma}\label{lemma:interval} Given $d\in [1,2^N)$, and non-negative integers $\ensuremath{c}, L $ such that \begin{eqnarray*}2^{N+L} \leq \ensuremath{c} \ourtimes d \leq 2^{N+L} +2^L\end{eqnarray*} then \begin{eqnarray*}\ensuremath{c} \ourtimes (n\bmod d) \leq (\ensuremath{c} \ourtimes n) \bmod 2^{N+L} \leq \ensuremath{c} \ourtimes (n\bmod d) + 2^{L} (n \ourdiv d) < 2^{N+L}\end{eqnarray*} for all $n \in [0,2^N)$. \end{lemma} \begin{proof} We can write $n$ uniquely as $n = q \ourtimes d + r$ for some integers $q$ and $r$ where $q\geq 0$ and $r \in [0,d)$. We assume that $2^{N+L} \leq \ensuremath{c} \ourtimes d \leq 2^{N+L} +2^L$. We begin by showing that $\ensuremath{c}\ourtimes r + 2^{L} q < 2^{N+L}$. Because $\ensuremath{c}\ourtimes d \leq 2^{N+L} +2^L$, we have that \begin{eqnarray*} \ensuremath{c} \ourtimes r + 2^{L} q & \leq & \frac{2^{N+L}}{d} r + \frac{2^L}{d} r + 2^{L} q \\ & = & \frac{2^L}{d}\left ( 2^N r + r + d \ourtimes q \right ) \\ & = & \frac{2^L}{d}\left(n + 2^N r \right ).\end{eqnarray*} Because $n<2^N$ and $r<d$, we have that $n + 2^N r < 2^N d$ which shows that \begin{equation} \ensuremath{c} \ourtimes r + 2^{L} q < 2^{N+L}. \label{eq:firstinequality} \end{equation} We can rewrite our assumption $2^{N+L}\leq \ensuremath{c} \ourtimes d \leq 2^{N+L} +2^L$ as $0\leq \ensuremath{c} \ourtimes d - 2^{N+L} \leq 2^L$. Multiplying throughout by the non-negative integer $q$, we get \begin{eqnarray*} 0 \leq \ensuremath{c} \ourtimes d \ourtimes q - 2^{N+L} q \leq 2^L q. \end{eqnarray*} After adding $\ensuremath{c} \ourtimes r$ throughout, we get \begin{eqnarray*} \ensuremath{c} \ourtimes r \leq \ensuremath{c} \ourtimes n - 2^{N+L} q \leq 2^L q + \ensuremath{c} \ourtimes r \end{eqnarray*} where we used the fact that $\ensuremath{c} \ourtimes d \ourtimes q + \ensuremath{c} \ourtimes r = \ensuremath{c} \ourtimes n$. So we have that $\ensuremath{c} \ourtimes n - 2^{N+L} q \in [\ensuremath{c} \ourtimes r, 2^L q + \ensuremath{c} \ourtimes r]$. We already showed (see Equation~\ref{eq:firstinequality}) that $2^L q + \ensuremath{c} \ourtimes r$ is less than $2^{N+L}$ so that $ \ensuremath{c} \ourtimes n - 2^{N+L} q \in [0,2^{N+L})$. Thus we have that $\ensuremath{c} \ourtimes n - 2^{N+L} q = ( \ensuremath{c} \ourtimes n )\bmod 2^{N+L}$ because (in general and by definition) if $ p - k Q \in [0, y)$ for some $y\leq Q$, then $p \bmod Q = p - k Q $. Hence, we have that $( \ensuremath{c} \ourtimes n )\bmod 2^{N+L} \in [\ensuremath{c} \ourtimes r, 2^L q + \ensuremath{c} \ourtimes r]$. This completes the proof. \end{proof} Lemma~\ref{lemma:interval} tells us that $(\ensuremath{c} \ourtimes n) \bmod 2^{N+L}$ is close to $\ensuremath{c} \ourtimes (n\bmod d)$ when $\ensuremath{c}$ is close to $2^{N+L}/d$. Thus it should make intuitive sense that $(\ensuremath{c} \ourtimes n) \bmod 2^{N+L}$ multiplied by $d/2^{N+L}$ should give us $n\bmod d$. The following theorem makes the result precise. \begin{theorem}\label{theorem:crazyass} Given $d\in [1,2^N)$, and non-negative integers $\ensuremath{c}, L $ such tha \begin{eqnarray*}\frac{1}{d} \leq \frac{\ensuremath{c}}{2^{N+L}} \leq \frac{1}{d} + \frac{1/d}{2^{N}}\end{eqnarray*} then \begin{eqnarray*}n \bmod d = \left (\left((\ensuremath{c} \ourtimes n) \bmod 2^{N+L}\right) \ourtimes d \right) \ourdiv 2^{N+L}\end{eqnarray*} for all $n \in [0,2^N)$. \end{theorem} \begin{proof} We can write $n$ uniquely as $n = q \ourtimes d + r$ where $q\geq 0$ and $r \in [0,d)$. By Lemma~\ref{lemma:interval}, we have that $\ensuremath{c} \ourtimes n \bmod 2^{N+L} \in [\ensuremath{c} \ourtimes r, \ensuremath{c} \ourtimes r +2^L q]$ for all $n \in [0,2^N)$. We want to show that if we multiply any value in $[\ensuremath{c} \ourtimes r, \ensuremath{c} \ourtimes r +2^L q]$ by $d$ and divide it by $2^{N+L}$, then we get $r$. That is, if $y\in [\ensuremath{c} \ourtimes r, \ensuremath{c} \ourtimes r +2^L q]$, then $d\ourtimes y \in [2^{N+L} r, 2^{N+L} (r+1))$. We can check this inclusion using two inequalities: \begin{itemize} \item ($d\ourtimes y \geq 2^{N+L} r$) It is enough to show that $\ensuremath{c} \ourtimes d \ourtimes r \geq 2^{N+L} r$ which follows since $\ensuremath{c} \ourtimes d \geq 2^{N+L}$ by one of our assumptions. \item ($d\ourtimes y < 2^{N+L} (r+1)$) It is enough to show that $d \ourtimes ( \ensuremath{c} \ourtimes r +2^L q) < 2^{N+L} (r+1)$. Using the assumption that $\ensuremath{c} \ourtimes d \leq 2^{N+L}+ 2^L$, we have that $d \ourtimes ( \ensuremath{c} \ourtimes r +2^L q) \leq 2^{N+L} r + 2^L r + 2^L d \ourtimes q = 2^{N+L} r + 2^L n$. Since $n < 2^N$, we finally have $d \ourtimes ( \ensuremath{c} \ourtimes r +2^L q)<2^{N+L} (r+1)$ as required. \end{itemize} This concludes the proof. \end{proof} Consider the constraint $2^{N+L} \leq \ensuremath{c} \ourtimes d \leq 2^{N+L} +2^L$ given by Theorem~\ref{theorem:crazyass}. \begin{itemize} \item We have that $\ensuremath{c}= \ourceiling*{2^{N+L}/d}$ is the smallest value of $\ensuremath{c}$ satisfying $2^{N+L} \leq \ensuremath{c} \ourtimes d $. \item Furthermore, when $d$ does not divide $2^{N+L}$, we have that $\ourceiling*{2^{N+L}/d} \ourtimes d = 2^{N+L} + d-(2^{N+L} \bmod d)$ and so $\ensuremath{c} \ourtimes d \leq 2^{N+L} +2^L$ implies $d \leq (2^{N+L} \bmod d)+2^L$. See Lemma~\ref{lemma:technicalstuff2}. \end{itemize} On this basis, Algorithm~\ref{algo:bigsummary} gives the minimal number of fractional bits $F$. It is sufficient to pick $F\geq N + \log_2(d)$. \begin{lemma}\label{lemma:technicalstuff2}Given a divisor $d\in [1,2^N)$, if we set $\ensuremath{c}=\ourceiling*{2^{N+L}/d}$, then \begin{itemize} \item $\ensuremath{c} \ourtimes d = 2^{N+L} +d -(2^{N+L} \bmod d) $ when $d$ is not a power of two, \item and $\ensuremath{c} \ourtimes d = 2^{N+L}$ when $d$ is a power of two. \end{itemize} \end{lemma} \begin{proof} The case when $d$ is a power of two follows by inspection, so suppose that $d$ is not a power of two. We seek to round $2^{N+L}$ up to the next multiple of $d$. The previous multiple of $d$ is smaller than $2^{N+L}$ by $2^{N+L} \bmod d$. Thus we need to add $d - 2^{N+L} \bmod d$ to $2^{N+L}$ to get the next multiple of $d$. \end{proof} \begin{example} Consider Table~\trimmedref{tab:example6} where we divide by $d=6$ and we want to support the numerators $n$ between 0 and $64 = 2^6$ so that $N=6$. It is enough to pick $F\geq N + \log_2(d) \approx 8.58 $ or $F=9$ but we can do better. According to Algorithm~\ref{algo:bigsummary}, the number of fractional bits $F=N+L=6+L$ must satisfy $d \leq (2^{6+L} \bmod d)+2^L$. Picking $L=0$ and $F=6$ does not work since $2^6 \bmod 6 + 1 = 5$. Picking $L=1$ also does not work since $2^7 \bmod 6 + 2 = 4$. Thus we need $L=2$ and $F=8$, at least. So we can pick $\ensuremath{c} = \ourceiling*{2^8 / 6} = 43$. In binary, representing 43 with 8 fractional bits gives $0.00101011$, as in Table~\ref{tab:example6}. Let us divide $63$ by $6$. The quotient is $(63 \ourtimes 43) \ourdiv 2^8 = 10$. The remainder is $( ( (63 \ourtimes 43) \bmod 2^8 ) \ourtimes 6) \ourdiv 2^8 = 3$. \end{example} It is not always best to use the smallest number of fractional bits. For example, we can always conveniently pick $F=2\ourtimes N$ (meaning $L=N$) and $\ensuremath{c}= \ourceiling*{2^{2 N}/d}$, since $d \leq 2^F \bmod d + 2^N$ clearly holds (given $d \leq 2^N$). \begin{algorithm} \begin{algorithmic}[1] \State \textbf{Require}: fixed integer divisor $d \in [1,2^{N})$ \State We seek the smallest number of fractional bits $F$ such that for any integer numerator $n \in [0,2^{N})$, the remainder is $r = \left ( \left ( \left ( \ensuremath{c} \ourtimes n \right ) \bmod 2^F \right )\ourtimes d \right ) \ourdiv 2^F$ for some scaled approximate reciprocal $\ensuremath{c}$. \State We can always choose the scaled approximate reciprocal $\ensuremath{c} \leftarrow \ourceiling*{2^F/d}$. \If{$d$ is a power of two} \State Let $F\leftarrow \log_2(d)$ and $\ensuremath{c}=1$. \Else \State Let $F\leftarrow N + L$ where $L$ is the smallest integer such that $d \leq (2^{N+L} \bmod d)+2^L$. \EndIf \end{algorithmic} \caption{Algorithm to select the number of fractional bits and the scaled approximate reciprocal in the case of unsigned integers. \label{algo:bigsummary}} \end{algorithm} \subsection{Directly Computing Signed Remainders} \label{sec:directlycomputingsignedremainders} Having established that we could compute the remainder in the unsigned case directly, without first computing the quotient, we proceed to establish the same in the signed integer case. We assume throughout that the processor represents signed integers in $[-2^{N-1}, 2^{N-1})$ using the two's complement notation. We assume that the integer $N\geq 1$. Though the quotient and the remainder have a unique definition over positive integers, there are several valid ways to define them over signed integers. We adopt a convention regarding signed integer arithmetic that is widespread among modern computer languages, including C99, Java, C\#, Swift, Go, and Rust. Following Granlund and Montgomery~\cite{Granlund:1994:DII:773473.178249}, we let $\trunc(v) $ be $v$ rounded towards zero: it is $\ourfloor*{v}$ if $v\geq 0$ and $\ourceiling*{v}$ otherwise. We use ``$\signeddiv$'' to denote the signed integer division defined as $n \signeddiv d \equiv \trunc(n/d)$ and ``$\signedmod$'' to denote the signed integer remainder defined by the identity $n \signedmod d \equiv n - \trunc(n/d) \ourtimes d$. Changing the sign of the divisor changes the sign of the quotient but the remainder is insensitive to the sign of the divisor. Changing the sign of the numerator changes the sign of both the quotient and the remainder: $(-n) \signeddiv d = -(n \signeddiv d)$ and $(-n) \signedmod d = -(n \signedmod d)$. Let $\lsb_K(n)$ be the function that selects the $K$~least significant bits of an integer $n$, zeroing others. The result is always non-negative (in $[0, 2^K)$) in our work. Whenever $2^K$ divides $n$, whether $n$ is positive or not, we have $\lsb_K(n) = 0 = n \bmod 2^K$. \begin{remark}\label{remark:clever} Suppose $2^K$ does not divide $n$, then $ n \bmod 2^K = 2^K - \lsb_K(n)$ when the integer $n$ is negative, and $ n \bmod 2^K = \lsb_K(n)$ when it is positive. Thus we have $\lsb_K(n)+\lsb_K(-n) = 2^K$ whenever $2^K$ does not divide $n$. \end{remark} We establish a few technical results before proving Theorem~\ref{theorem:bettersigned}. We believe it is novel. \begin{lemma}\label{lemma:moreclever}Given $d\in [1,2^{N-1})$, and non-negative integers $\ensuremath{c}, L $ such that \begin{eqnarray*}2^{N-1+L} < \ensuremath{c} \ourtimes d < 2^{N-1+L} +2^L,\end{eqnarray*} we have that $2^{N-1+L}$ cannot divide $\ensuremath{c} \ourtimes n$ for any $n\in [-2^{N-1},0)$. \end{lemma} \begin{proof} First, we prove that $2^{L}$ cannot divide $\ensuremath{c}$. When $2^L$ divides $\ensuremath{c}$, setting $\ensuremath{c}=\alpha 2^{L}$ for some integer $\alpha$, we have that $2^{N-1} < \alpha d < 2^{N-1} +1$, but there is no integer between $2^{N-1}$ and $2^{N-1} +1$. Next, suppose that $n\in [-2^{N-1},0)$ and $2^{N-1+L}$ divides $\ensuremath{c} \ourtimes n$. Since $2^{N-1+L}$ divides $\ensuremath{c} \ourtimes n$, we know that the prime factorization of $\ensuremath{c} \ourtimes n$ has at least $N-1+L$ copies of 2. Within the range of $n$ ($[-2^{N-1},0)$) at most $N-1$ copies of 2 can be provided. Obtaining the required $N-1+L$ copies of 2 is only possible when $n=-2^{N-1}$ and $\ensuremath{c}$ provides the remaining copies---so $2^L$ divides $\ensuremath{c}$. But that is impossible. \end{proof} \begin{lemma}\label{lemma:nofun} Given $d\in [1,2^{N-1})$, and non-negative integers $\ensuremath{c}, L $ such that \begin{eqnarray*}2^{N-1+L} < \ensuremath{c} \ourtimes d < 2^{N-1+L} +2^L,\end{eqnarray*} for all integers $n\in (0,2^{N-1}]$ and letting $y = \lsb_{N-1+L}(\ensuremath{c} \ourtimes n)$, we have that $ (y \ourtimes d) \bmod 2^{N-1+L} >0$. \end{lemma} \begin{proof} Write $n= q \ourtimes d + r$ where $r\in [0,d)$. Since $\ensuremath{c} \ourtimes n$ is positive we have that $y = (\ensuremath{c} \ourtimes n) \bmod 2^{N-1+L} = \lsb_{N-1+L}(\ensuremath{c} \ourtimes n)$. (See Remark~\ref{remark:clever}.) Lemma~\ref{lemma:interval} is applicable, replacing $N$ with $N-1$. We have a stronger constraint on $\ensuremath{c} \ourtimes d$, but that is not harmful. Thus we have $y \in [ \ensuremath{c} \ourtimes r, \ensuremath{c} \ourtimes r + 2^L q]$. We proceed as in the proof of Theorem~\ref{theorem:crazyass}. We want to show that $d\ourtimes y \in (2^{N-1+L} r, 2^{N-1+L} (r+1))$. \begin{itemize} \item ($d\ourtimes y > 2^{N-1+L} r$) We have $ y\geq \ensuremath{c} \ourtimes r$. Multiplying throughout by $d$, we get $d\ourtimes y \geq \ensuremath{c} \ourtimes d \ourtimes r> 2^{N-1+L} r$, where we used $ \ensuremath{c} \ourtimes d > 2^{N-1+L}$ in the last inequality. \item ($d\ourtimes y < 2^{N-1+L} (r+1)$) We have $ y\leq \ensuremath{c} \ourtimes r + 2^L q$. Multiplying throughout by $d$, we get $d\ourtimes y \leq \ensuremath{c} \ourtimes d \ourtimes r+ 2^L q \ourtimes d < 2^{N-1+L} r + 2^L n$. Because $n \leq 2^{N-1}$, we have the result $d\ourtimes y < 2^{N-1+L} (r+1)$. \end{itemize} Thus we have $d \ourtimes y \in (2^{N-1+L} r, 2^{N-1+L} (r+1))$, which shows that $ (y \ourtimes d) \bmod 2^{N-1+L} >0$. This completes the proof. \end{proof} \begin{lemma}\label{lemma:rarara} Given positive integers $a, b, d$, we have that $\ourfloor*{( b - a) \ourtimes d / b } = d - 1 - \ourfloor*{a \ourtimes d / b }$ if $b$ does not divide $a \ourtimes d $. \end{lemma} \begin{proof} Define $p = a \ourtimes d / b - \ourfloor*{a \ourtimes d / b }$. We have $p\in (0,1)$. We have that $\ourfloor*{( b - a) \ourtimes d / b } = \ourfloor*{d - a \ourtimes d / b } = \ourfloor*{d - \ourfloor*{a \ourtimes d / b } - p } = d - 1 - \ourfloor*{a \ourtimes d / b }.$ \end{proof} \begin{theorem}\label{theorem:bettersigned} Given $d\in [1,2^{N-1})$, and non-negative integers $\ensuremath{c}, L $ such that \begin{eqnarray*}2^{N-1+L} < \ensuremath{c} \ourtimes d < 2^{N-1+L} +2^L,\end{eqnarray*} let $\mu= \ourfloor*{( \lsb_{N-1+L}(\ensuremath{c} \ourtimes n) \ourtimes d ) / 2^{N-1+L} }$ then \begin{itemize} \item $n \signedmod d = \mu $ for all $n \in [0,2^{N-1})$ \item and $n \signedmod d = \mu -d + 1$ for all $n \in [-2^{N-1},0)$. \end{itemize} \end{theorem} \begin{proof} When $n$ is non-negative, then so is $\ensuremath{c} \ourtimes n$, and $\lsb_{N-1+L}(\ensuremath{c} \ourtimes n) $ is equal to $(\ensuremath{c} \ourtimes n) \bmod 2^{N-1+L}$; there is no distinction between signed and unsigned $\bmod$, so the result follows by Theorem~\ref{theorem:crazyass}, replacing $N$ by $N-1$. (Theorem~\ref{theorem:crazyass} has a weaker constraint on $\ensuremath{c} \ourtimes d$.) Suppose that $n$ is negative ($n \in [-2^{N-1},0)$). By Lemma~\ref{lemma:moreclever}, $2^{N-1+L}$ cannot divide $\ensuremath{c} \ourtimes n$. Hence, we have that $\lsb_{N-1+L}(\ensuremath{c} \ourtimes n) = 2^{N-1+L} - \lsb_{N-1+L}(\ensuremath{c} \ourtimes (-n))$ by Remark~\ref{remark:clever}. Thus we have \begin{eqnarray*}\mu & = &\ourfloor*{\lsb_{N-1+L}(\ensuremath{c} \ourtimes n) \ourtimes d / 2^{N-1+L} }\\ & = & \ourfloor*{\left( 2^{N-1+L} - \lsb_{N-1+L}(\ensuremath{c} \ourtimes (-n)) \right) \ourtimes d / 2^{N-1+L} } \text{\hspace{1cm} by Remark~\ref{remark:clever}}\\ & = & d - 1 - \ourfloor*{\lsb_{N-1+L}(\ensuremath{c} \ourtimes (-n)) \ourtimes d / 2^{N-1+L} }\text{\hspace{1cm}by Lemmata~\ref{lemma:nofun}~and~\ref{lemma:rarara}}\\ & = & d - 1 - \ourfloor*{\left((\ensuremath{c} \ourtimes (-n)) \bmod 2^{N-1+L}\right) \ourtimes d / 2^{N-1+L} }\\ & = & d - 1 - ((-n) \bmod d) \text{\hspace{5.3cm} by Theorem~\ref{theorem:crazyass}.}\\ \end{eqnarray*} Hence we have $\mu -d + 1 = - ((-n) \bmod d) = n \bmod d$, which concludes the proof. \end{proof} We do not need to be concerned with negative divisors since $n \signedmod d = n \signedmod -d$ for all integers $n$. We can pick $\ensuremath{c}, L$ in a manner similar to the unsigned case. We can choose $\ensuremath{c}= \ourfloor*{2^F/d} + 1$ and let $F= N - 1 + L$ where $L$ is an integer such that $2^{N-1+L} < \ensuremath{c} \ourtimes d < 2^{N-1+L} +2^L$. With this choice of $\ensuremath{c}$, we have that $\ensuremath{c} \ourtimes d = 2^{N-1+L} - (2^{N-1+L} \bmod d) + d$. Thus we have the constraint $-(2^{N-1+L} \bmod d) + d<2^L$ on $L$. Because $- (2^{N-1+L} \bmod d) + d \in [1,d]$, it suffices to pick $L$ large enough so that $2^L>d$. Thus any $L> \log_2 d $ would do, and hence $F> N + \log_2(d)$ is sufficient. It is not always best to pick $L$ to be minimal: it could be convenient to pick $L=N+1$. \subsection{Fast Divisibility Check with a Single Multiplication} \label{sec:fastdivcheck} Following earlier work by Artzy et al.\cite{Artzy:1976:FDT:359997.360013}, Granlund and Montgomery\cite{Granlund:1994:DII:773473.178249} describe how we can check quickly whether an unsigned integer is divisible by a constant, without computing the remainder. We summarize their approach before providing an alternative. Given an odd divisor $d$, we can find its (unique) multiplicative inverse $\bar d$ defined as $d \ourtimes \bar d \bmod 2^N = 1$. The existence of a multiplicative inverse $\bar d$ allows us to quickly divide an integer $n$ by $d$ when it is divisible by $d$, if $d$ is odd. It suffices to multiply $n=a\ourtimes d$ by $\bar d$: $n \ourtimes \bar d \bmod 2^N = a \ourtimes (d \ourtimes \bar d) \bmod 2^N = a \bmod 2^N = n \ourdiv d$. When the divisor is $2^K d$ for $d$ odd and $n$ is divisible by $2^K d$, then we can write $ n \ourdiv (2^K d) = (n \ourdiv 2^K) \ourtimes \bar d \bmod 2^N $. As pointed out by Granlund and Montgomery, this observation can also enable us to quickly check whether a number is divisible by $d$. If $d$ is odd and $n\in [0,2^N)$ is divisible by $d$, then $n \ourtimes \bar d \bmod 2^N \in [0, \ourfloor*{(2^N-1)/d }]$. Otherwise $n$ is not divisible by $d$. Thus, when $d$ is odd, we can check whether any integer in $[0,2^N)$ is divisible by $d$ with a multiplication followed by a comparison. When the divisor is even ($2^K d$), then we have to check that $n \ourtimes \bar d \bmod 2^N \in [0, 2^K \ourtimes \ourfloor*{(2^N-1)/d }]$ and that $n$ is divisible by $2^K$ (i.e., $n \bmod 2^K = 0$). We can achieve the desired result by computing $n \ourtimes \bar d$, rotating the resulting word by $K$~bits and comparing the result with $\ourfloor*{(2^N-1)/d }$. Granlund and Montgomery can check that an unsigned integer is divisible by another using as little as one multiplication and comparison when the divisor is odd, and a few more instructions when the divisor is even. Yet we can always check the divisibility with a single multiplication and a modulo reduction to a power of two---even when the divisor is even because of the following proposition. Moreover, a single precomputed constant ($\ensuremath{c}$) is required. \begin{proposition}\label{prop:divisibility}Given $d\in [1,2^N)$, and non-negative integers $\ensuremath{c}, L $ such that $2^{N+L} \leq \ensuremath{c} \ourtimes d \leq 2^{N+L} +2^L$ then given some $n \in [0,2^N)$, we have that $d$ divides $n$ if and only if $(\ensuremath{c} \ourtimes n) \bmod 2^{N+L} < \ensuremath{c}$. \end{proposition} \begin{proof} We have that $d$ divides $n$ if and only if $n \bmod d = 0$. By Lemma~\ref{lemma:interval}, we have that $\ensuremath{c} \ourtimes (n\bmod d) \leq (\ensuremath{c} \ourtimes n) \bmod 2^{N+L} \leq \ensuremath{c} \ourtimes (n\bmod d) + 2^{L} (n \ourdiv d)$. We want to show that $n \bmod d = 0$ is equivalent to $(\ensuremath{c} \ourtimes n) \bmod 2^{N+L} < \ensuremath{c}$. Suppose that $n \bmod d = 0$, then we have that $(\ensuremath{c} \ourtimes n) \bmod 2^{N+L} \leq 2^{L} (n \ourdiv d)$. However, by our constraints on $\ensuremath{c}$, we have that $\ensuremath{c} \geq 2^{N+L}/d>2^{L} (n \ourdiv d)$. Thus, if $n \bmod d = 0$ then $(\ensuremath{c} \ourtimes n) \bmod 2^{N+L} < \ensuremath{c}$. Suppose that $(\ensuremath{c} \ourtimes n) \bmod 2^{N+L} <\ensuremath{c}$, then because $\ensuremath{c} \ourtimes (n\bmod d) \leq (\ensuremath{c} \ourtimes n) \bmod 2^{N+L} $, we have that $\ensuremath{c} \ourtimes (n\bmod d)< \ensuremath{c}$ which implies that $n \bmod d = 0$. This completes the proof. \end{proof} Thus if we have a reciprocal $\ensuremath{c}= \ourceiling*{2^{F}/d}$ with $F=N+L$ large enough to compute the remainder exactly (see Algorithm~\ref{algo:bigsummary}), then $(\ensuremath{c} \ourtimes n) \bmod 2^{F} < \ensuremath{c}$ if and only if $n$ is divisible by $d$. We do not need to pick $F$ as small as possible. In particular, if we set $\ensuremath{c}= \ourceiling*{2^{2N}/d}$, then $(\ensuremath{c} \ourtimes n) \bmod 2^{2N} < \ensuremath{c}$ if and only if $n$ is divisible by $d$. \begin{remark}\label{remark:signeddivisibility} We can extend our fast divisibility check to the signed case. Indeed, we have that $d$ divides $n$ if and only if $|d|$ divides $|n|$. Moreover, the absolute value of any $N$-bit negative integer can be represented as an $N$-bit unsigned integer. \end{remark} \section{Software Implementation} \label{sec:softimpl} Using the C language, we provide our implementations of the 32-bit remainder computation (i.e., \texttt{a \% d}) in Figs.~\trimmedref{fig:codemod}~and~\trimmedref{fig:codesignedmod} for unsigned and signed integers. In both case, the programmer is expected to precompute the constant \texttt{c}. For simplicity, the code shown here explicitly does not handle the divisors $d\in\{-1,0,1,-2^{31}\}$. For the x64 platforms, we provide the instruction sequences in assembly code produced by GCC and Clang for computing $n \bmod 95$ in Fig.~\trimmedref{fig:codesample}; in the third column, we provide the x64 code produced with our approach after constant folding. Our approach generates about half as many instructions. In Fig.~\trimmedref{fig:codesample-arm}, we make the same comparison on the 64-bit ARM platform, putting side-by-side compiler-generated code for the Granlund-Montgomery-Warren approach with code generated from our approach. As a RISC processor, ARM does not handle most large constants in a single machine instruction, but typically assembles them from 16-bit quantities. Since the Granlund-Montgomery-Warren algorithm requires only 32-bit constants, two 16-bit values are sufficient whereas our approach relies on 64-bit quantities and thus needs four 16-bit values. The ARM processor also has a ``multiply-subtract'' instruction that is particularly convenient for computing the remainder from the quotient. Unlike the case with x64, our approach does not translate into significantly fewer instructions on the ARM platform. These code fragments show that a code-size saving is achieved by our approach on x64 processors, compared to the approach taken by the compilers. We verify in \S~\ref{sec:experiments} that there is also a runtime advantage. \begin{figure}\centering \begin{minipage}{0.8\textwidth} \begin{lstlisting} uint32_t d = ...;// your divisor > 0 // c = ceil( (1<<64) / d ) ; we take L = N uint64_t c = UINT64_C(0xFFFFFFFFFFFFFFFF) / d + 1; // fastmod computes (n mod d) given precomputed c uint32_t fastmod(uint32_t n /* , uint64_t c, uint32_t d */) { uint64_t lowbits = c * n; return ((__uint128_t)lowbits * d) >> 64; }\end{lstlisting} \end{minipage} \caption{\label{fig:codemod}C code implementing a fast unsigned remainder function using the \texttt{__uint128_t} type extension. } \end{figure} \begin{figure}\centering \begin{minipage}{0.8\textwidth} \begin{lstlisting} int32_t d = ...;// your non-zero divisor in [-2147483647,2147483647] uint32_t pd = d < 0 ? -d : d; // absolute value, abs(d) // c = floor( (1<<64) / pd ) + 1; Take L = N + 1 uint64_t c = UINT64_C(0xFFFFFFFFFFFFFFFF) / pd + 1 + ((pd & (pd-1))==0 ? 1 : 0); // fastmod computes (n mod d) given precomputed c int32_t fastmod(int32_t n /* , uint64_t c, uint32_t pd */) { uint64_t lowbits = c * n; int32_t highbits = ((__uint128_t) lowbits * pd) >> 64; // answer is equivalent to (n<0) ? highbits - 1 + d : highbits return highbits - ((pd - 1) & (n >> 31)); } \end{lstlisting} \end{minipage} \caption{\label{fig:codesignedmod}C code implementing a fast signed remainder function using the \texttt{__uint128_t} type extension. } \end{figure} \begin{figure}\centering { \begin{tabular}{c|c|c} \begin{lstlisting} // GCC 6.2 mov eax, edi mov edx, 1491936009 mul edx mov eax, edi sub eax, edx shr eax add eax, edx shr eax, 6 imul eax, eax, 95 sub edi, eax mov eax \end{lstlisting} & \begin{lstlisting} // Clang 4.0 mov eax, edi imul rax, rax, 1491936009 shr rax, 32 mov ecx, edi sub ecx, eax shr ecx add ecx, eax shr ecx, 6 imul eax, ecx, 95 sub edi, eax mov eax, edi \end{lstlisting} & \begin{lstlisting} // our fast version // + GCC 6.2 movabs rax, 194176253407468965 mov edi, edi imul rdi, rax mov eax, 95 mul rdi mov rax, rdx // // // // \end{lstlisting} \end{tabular} } \caption{\label{fig:codesample}Comparison between the x64 code generated by GCC 6.2 for unsigned $a \bmod 95$ (left) and our version (right). Clang 4.0 generated the middle code, and when compiling our version (not shown) used a \texttt{mulx} instruction to place the high bits of the product directly into the return register, saving one instruction over GCC\@.} \end{figure} \begin{figure}\centering \begin{tabular}{c|c} \begin{lstlisting} // GCC 6.2 for a mov w1, 8969 mov w3, 95 movk w1, 0x58ed, lsl 16 umull x1, w0, w1 lsr x1, x1, 32 sub w2, w0, w1 add w1, w1, w2, lsr 1 lsr w1, w1, 6 msub w0, w1, w3, w0 \end{lstlisting} & \begin{lstlisting} // our version of a mov x2, 7589 uxtw x0, w0 movk x2, 0x102b, lsl 16 mov x1, 95 movk x2, 0xda46, lsl 32 movk x2, 0x2b1, lsl 48 mul x0, x0, x2 umulh x0, x0, x1 // \end{lstlisting} \end{tabular} \caption{\label{fig:codesample-arm}Comparison between the ARM code generated by GNU GCC 6.2 for $a \bmod 95$ (left) and our word-aligned version (right). In both cases, except for instruction order, Clang's code was similar to GCC's.} \end{figure} \subsection{Divisibility} \label{sec:divisibility-impl} We are interested in determining quickly whether a 32-bit integer $d$ divides a 32-bit integer $n$---faster than by checking whether the remainder is zero. To the best of our knowledge, no compiler includes such an optimization, though some software libraries provide related fast functions.\footnote{\url{https://gmplib.com}} We present the code for our approach (LKK) in Fig.~\trimmedref{fig:lkk-unsigned-impl}, and our implementation of the Granlund-Montgomery approach (GM) in Fig.~\trimmedref{fig:gm-unsigned-impl}. \begin{figure}\centering \begin{minipage}{0.65\textwidth} \begin{lstlisting} // calculate c for use in lkk_divisible uint64_t lkk_cvalue(uint32_t d) { return 1 + UINT64_C(0xffffffffffffffff) / d; } // given precomputed c, checks whether n bool lkk_divisible(uint32_t n, uint64_t c) { // rhs is large when c==0 return n * c <= c - 1; } \end{lstlisting} \end{minipage} \caption{\label{fig:lkk-unsigned-impl} Unsigned divisibility test, our approach.} \end{figure} \begin{figure}\centering \begin{minipage}{0.6\textwidth} \begin{lstlisting} // rotate n by e bits, avoiding undefined behaviors // cf https://blog.regehr.org/archives/1063 uint32_t rotr32(uint32_t n, uint32_t e) { return (n >> e) | ( n << ( (-e)&31) ); } // does d divide n? // d = 2**e * d_odd; dbar = multiplicative_inverse(d_odd) // thresh = 0xffffffff / d bool gm_divisible(uint32_t n, uint32_t e, uint32_t dbar, uint32_t thresh) { return rotr32(n * dbar, e) <= thresh; } // Newton's method per Warren, // Hacker's Delight pp. 246--247 uint32_t multiplicative_inverse(uint32_t d) { uint32_t x0 = d + 2 * ((d+1) & 4); uint32_t x1 = x0 * (2 - d * x0); uint32_t x2 = x1 * (2 - d * x1); return x2 * (2 - d * x2); } \end{lstlisting} \end{minipage} \caption{\label{fig:gm-unsigned-impl} Unsigned divisibility test, Granlund-Montgomery approach.} \end{figure} \section{Experiments} \label{sec:experiments} Superiority over the Granlund-Montgomery-Warren approach might depend on such CPU characteristics as the relative speeds of instructions for integer division, 32-bit integer multiplication and 64-bit integer division. Therefore, we tested our software on several x64 platforms and on ARM\footnote{ With GCC~4.8 on the ARM platform we observed that, for many constant divisors, the compiler chose to generate a \texttt{udiv} instruction instead of using the Granlund-Montgomery code sequence. This is not seen for GCC~6.2. } and POWER8 servers, and relevant details are given in Table~\trimmedref{tab:test-cpus}. The choice of multiplication instructions and instruction scheduling can vary by compiler, and thus we tested using various versions of GNU GCC and LLVM's Clang. For brevity we primarily report results from the Skylake platform, with comments on points where the other platforms were significantly different. For the Granlund-Montgomery-Warren approach with compile-time constants, we use the optimized divide and remainder operations built into GCC and Clang. We sometimes need to repeatedly divide by a constant that is known only at runtime. In such instances, an optimizing compiler may not be helpful. Instead a programmer might rely on a library offering fast division functions. For runtime constants on x64 processors, we use the libdivide library\footnote{\url{http://libdivide.com}} as it provides a well-tested and optimized implementation. On x64 platforms, we use the compiler flags \texttt{-O3 -march=native}; on ARM we use \texttt{-O3 -march=armv8-a} and on POWER8 we use \texttt{-O3 -mcpu=power8}. Some tests have results reported in wall-clock time, whereas in other tests, the Linux \texttt{perf stat} command was used to obtain the total number of processor cycles spent doing an entire benchmark program. To ease reproducibility, we make our benchmarking software and scripts freely available.\footnote{\url{https://github.com/lemire/constantdivisionbenchmarks}} \begin{table} \caption{\label{tab:test-cpus} Systems Tested } \centering \begin{minipage}{\textwidth} \centering \begin{tabular}{cccc}\toprule Processor & Microarchitecture & Compilers\\ \midrule Intel i7-6700 & Skylake (x64) & GCC 6.2; Clang 4.0 & default platform \\ Intel i7-4770 & Haswell (x64) & GCC 5.4; Clang 3.8 & \\ AMD Ryzen 7 1700X & Zen (x64) & GCC 7.2; Clang 4.0 & \\ POWER8 & POWER8 Murano & GCC 5.4; Clang 3.8\\ AMD Opteron A1100 & ARM Cortex A57 (Aarch64) & GCC 6.2; Clang 4.0 & \\ \bottomrule \end{tabular} \end{minipage} \end{table} \subsection{Beating the Compiler} \label{sec:beating-compiler} We implement a 32-bit linear congruential generator\cite{knuth2} that generates random numbers according to the function $X_{n+1} = (a \ourtimes X_n +b) \bmod d$, starting from a given seed $X_0$. Somewhat arbitrarily, we set the seed to 1234, we use 31 as the multiplier ($a=31$) and the additive constant is set to 27961 ($b=27961$). We call the function 100~million times, thus generating 100~million random numbers. The divisor $d$ is set at compile time. See Fig.~\ref{fig:lcg-impl}. In the signed case, we use a negative multiplier ($a=-31$). \begin{figure}\centering \begin{minipage}{0.5\textwidth} \begin{lstlisting} uint32_t x = 1234; for(size_t i = 0; i < 100000000; i++) { // d may be set at compile time x = (32 * x + 27961) } \end{lstlisting} \end{minipage} \caption{\label{fig:lcg-impl} Code for a linear congruential generator used to benchmark division by a constant.} \end{figure} Because the divisor is a constant, compilers can optimize the integer division using the Granlund-Montgomery approach. We refer to this scenario as the \emph{compiler} case. To prevent the compiler from proceeding with such an optimization and force it to repeatedly use the division instruction, we can declare the variable holding the modulus to be volatile (as per the C standard). We refer to this scenario as the \emph{division instruction} case. In such cases, the compiler is not allowed to assume that the modulus is constant---even though it is. We verified that the assembly generated by the compiler includes the division instruction and does not include expensive operations such as memory barriers or cache flushes. We verified that our wall-clock times are highly repeatable\footnote{For instance, we repeated tests 20 times for 9 divisors in Figs.~\ref{fig:beatingthecompiler}abcd and~\ref{fig:beatingthecompilernotskylake}ab, and we observed maximum differences among the 20 trials of 4.8\,\%, 0.3\,\%, 0.7\,\%, 0.0\,\%, 0.8\,\% and 0.9\,\%, respectively. }. We present our results in Fig.~\trimmedref{fig:beatingthecompiler} where we compare with our alternative. In all cases, our approach is superior to the code produced by the compiler, except for powers of two in the case of GCC\@. The benefit of our functions can reach 30\%. The performance of the compiler (labelled as \emph{compiler}) depends on the divisor for both GCC and Clang, though Clang has greater variance. The performance of our approach is insensitive to the divisor, except when the divisor is a power of two. We observe that in the unsigned case, Clang optimizes very effectively when the divisor is a small power of two. This remains true even when we disable loop unrolling (using the \texttt{-fno-unroll-loops} compiler flag). By inspecting the produced code, we find that Clang (but not GCC) optimizes away the multiplication entirely in the sense that, for example, $X_{n+1} = (31 \ourtimes X_n +27961) \bmod 16$ is transformed into $X_{n+1} = \lsb_{4}(9 - X_n)$. We find it interesting that these optimizations are applied both in the \emph{compiler} functions as well as in our functions. Continuing with the unsigned case, we find that Clang often produces slightly more efficient compiled code than GCC for our functions, even when the divisor is not a power of two: compare Fig.~\ref{fig:beatingthecompilergcc} with Fig.~\ref{fig:beatingthecompilerclang}. However, these small differences disappear if we disable loop unrolling. Yet, GCC seems preferable in the signed benchmark: in Figs.~\ref{fig:signedbeatingthecompilergcc} and~\ref{fig:signedbeatingthecompilerclang}, Clang is slightly less efficient than GCC, sometimes requiring \SI{0.5}{\second} to complete the computation whereas GCC never noticeably exceeds \SI{0.4}{\second}. \begin{figure}\centering \subfloat[GNU GCC (unsigned) \label{fig:beatingthecompilergcc}]{ \includegraphics[width=0.49\columnwidth]{hashbenches-skylake-gcc.pdf} }\subfloat[GNU GCC (signed) \label{fig:signedbeatingthecompilergcc}]{ \includegraphics[width=0.49\columnwidth]{signedhashbenches-skylake-gcc.pdf} }\\ \subfloat[LLVM's Clang (unsigned) \label{fig:beatingthecompilerclang}]{ \includegraphics[width=0.49\columnwidth]{hashbenches-skylake-clang.pdf} }\subfloat[LLVM's Clang (signed) \label{fig:signedbeatingthecompilerclang}]{ \includegraphics[width=0.49\columnwidth]{signedhashbenches-skylake-clang.pdf} } \caption{\label{fig:beatingthecompiler}Wall-clock time to compute 100~million random integers using a linear congruential generator with various divisors set at compile time (Skylake x64)} \end{figure} \begin{figure}\centering \subfloat[Ryzen (GCC, unsigned) \label{fig:beatingthecompilergccryzen}]{ \includegraphics[width=0.49\columnwidth]{hashbenches-ryzen-gcc.pdf} }\subfloat[ARM (GCC, unsigned)\label{fig:beatingthecompilergccarm}]{ \includegraphics[width=0.49\columnwidth]{hashbenches-arm-gcc.pdf} }\\\subfloat[POWER8 (Clang, unsigned) \label{fig:beatingthecompilerclangpower}]{ \includegraphics[width=0.49\columnwidth]{hashbenches-power8-clang.pdf}} \subfloat[POWER8 (Clang, signed) \label{fig:beatingthecompilerclangpowersigned}]{ \includegraphics[width=0.49\columnwidth]{signedhashbenches-power8-clang.pdf}} \caption{\label{fig:beatingthecompilernotskylake} Ryzen, ARM and POWER8 results for small divisors.} \end{figure} For comparison, Fig.~\trimmedref{fig:beatingthecompilernotskylake} shows how the Ryzen, POWER8 and ARM processors perform on unsigned computations The speed of the hardware integer-division instruction varies, speeding up at $d=8$ and again at $d=32$ for Ryzen and $d=4$, 16, 64, 256 and 1024 for ARM\@. The gap between hardware integer division and Granlund-Montgomery (compiler) is less on Ryzen, POWER8 and ARM than on Skylake; for some divisors, there is little benefit to using \textit{compiler} on POWER8 and ARM\@. On x64 platforms, our approach continues to be significantly faster than hardware integer division for all divisors. On ARM, the performance is limited when computing remainders using our approach. Unlike x64 processors, ARM processors require more than one instruction to load a constant such as the reciprocal ($\ensuremath{c}$), but that is not a concern in this instance since the compiler loads $\ensuremath{c}$ into a register outside of the loop. We believe that the reduced speed has to do with the performance of the multiplication instructions of our Cortex~A57 processor~\cite{arma57}. To compute the most significant 64~bits of a 64-bit product as needed by our functions, we must use the multiply-high instructions (\texttt{umulh} and \texttt{smulh}), but they require six~cycles of latency and they prevent the execution of other multi-cycle instructions for an additional three~cycles. In contrast, multiplication instructions on x64 Skylake processors produce the full 128-bit product in three cycles. Furthermore, our ARM processor has a multiply-and-subtract instruction with a latency of three cycles. Thus it is advantageous to rely on the multiply-and-subtract instruction instead of the multiply-high instruction. Hence, it is faster to compute the remainder from the quotient by multiplying and subtracting ($r = n - (n \ourdiv d) \ourtimes d $). Furthermore, our ARM processor has fast division instructions: the ARM optimization manual for Cortex A57 processors indicates that both signed and unsigned division require between 4 and 20~cycles of latency~\cite{arma57} whereas integer division instructions on Skylake processors (\texttt{idiv} and \texttt{div}) have 26~cycles of latency for 32-bit registers~\cite{fog2016instruction}. Even if we take into account that division instructions on ARM computes solely the quotient, as opposed to both the quotient and remainder on x64, it seems that the ARM platform has a competitive division latency. Empirically, the division instruction on ARM is often within 10\% of the Granlund-Montgomery compiler optimization (Fig.~\ref{fig:beatingthecompilergccarm}) whereas the compiler optimization is consistently more than twice as fast as the division instruction on a Skylake processor (see Fig.~\ref{fig:beatingthecompilergcc}). Results for POWER8 are shown in Figs.~\ref{fig:beatingthecompilerclangpower}~and~\ref{fig:beatingthecompilerclangpowersigned}. Our unsigned approach is better than the compiler's; indeed the compiler would sometimes have done better to generate a divide instruction than use the Granlund-Montgomery approach. For our signed approach, both GCC and Clang had trouble generating efficient code for many divisors. As with ARM, code generated for POWER8 also deals with 64-bit constants less directly than x64 processors. If not in registers, POWER8 code loads 64-bit constants from memory, using two operations to construct a 32-bit address that is then used with a load instruction. In this benchmark, however, the compiler keeps 64-bit constants in registers. Like ARM, POWER8 has instructions that compute the upper 64~bits of a 64-bit product. The POWER8 microarchitecture\cite{power8uarch} has good support for integer division: it has two fixed-point pipelines, each containing a multiplier unit and a divider unit. When the multi-cycle divider unit is operating, fixed-point operations can usually be issued to other units in its pipeline. In our benchmark, dependencies between successive division instructions prevent the processor from using more than one divider. Though we have not seen published data on the actual latency and throughput of division and multiplication on this processor, we did not observe the divisor affecting the division instruction's speed, at least within the range of 3 to 4096. Our results suggest that the gap between multiplication and division performance on the POWER8 lies between that of ARM and Intel; the fact that our approach (using 64-bit multiplications) outperforms the compiler's approach (using 32-bit multiplications) seems to indicate that, unlike ARM, the instruction to compute the most significant bits of a 64-bit product is not much slower than the instruction to compute a 32-bit product. Looking at Fig.~\trimmedref{fig:hashbenches-large-d-arm-ryzen}, we see how the approaches compare for larger divisors. The division instruction is sometimes the fastest approach on ARM, and sometimes it can be faster than the compiler approach on Ryzen. Overall, our approach is preferred on Ryzen (as well as Skylake and POWER8), but not on ARM\@. \begin{figure}\centering \subfloat[Ryzen (GCC)] { \includegraphics[width=0.49\columnwidth]{hashbenches-wide-ryzen-gcc.pdf} }\subfloat[ARM (Clang)\label{fig:hashbenches-large-d-arm}] { \includegraphics[width=0.49\columnwidth]{hashbenches-wide-arm-clang.pdf} } \caption{\label{fig:hashbenches-large-d-arm-ryzen} Ryzen and ARM results for 28 larger divisors (using unsigned arithmetic). Our approach performed slightly worse when compiled by GCC on ARM, but the Ryzen results were not sensitive to the choice of the compiler. On Skylake (not shown), the division instruction behaved similarly for large and small divisors, as did compiler and our approach. } \end{figure} \subsection{Beating the libdivide Library} There are instances when the divisor might not be known at compile time. In such instances, we might use a library such as a libdivide. We once again use our benchmark based on a linear congruential generator using the algorithms, but this time, we provide the divisor as a program parameter. The libdivide library does not have functions to compute the remainder, so we use its functions to compute the quotient. It has two types of functions: regular "branchful" ones, those that include some branches that depend on the divisor, and branchless ones. In this benchmark, the invariant divisor makes the branches perfectly predictable, and thus the libdivide branchless functions were always slower. Consequently we omit the branchless results. We present our results in Fig.~\trimmedref{fig:beatinglibdivide}. The performance levels of our functions\footnote{ When 20 test runs were made for 9 divisors, timing results among the 20 never differed by more than 1\%. } are insensitive to the divisor, and our performance levels are always superior to those of the libdivide functions (by about 15\%), except for powers of two in the unsigned case. In these cases, libdivide is faster, but this is explained by a fast conditional code path for powers of two. \begin{figure}\centering \subfloat[GNU GCC (unsigned) \label{fig:beatinglibdividegcc}]{ \includegraphics[width=0.49\columnwidth]{dynhashbenches-skylake-gcc.pdf} } \subfloat[GNU GCC (signed) \label{fig:beatinglibdividegcc-signed}]{ \includegraphics[width=0.49\columnwidth]{signeddynhashbenches-skylake-gcc.pdf} } \\ \subfloat[LLVM's Clang (unsigned) \label{fig:beatinglibdivideclang}]{ \includegraphics[width=0.49\columnwidth]{dynhashbenches-skylake-clang.pdf} } \subfloat[LLVM's Clang (signed) \label{fig:beatinglibdivideclang-signed}]{ \includegraphics[width=0.49\columnwidth]{signeddynhashbenches-skylake-clang.pdf} } \caption{\label{fig:beatinglibdivide}Wall-clock time to compute 100~million random integers using a linear congruential generator with various divisors passed as a program parameter (Skylake x64).} \end{figure} \subsection{Competing for Divisibility} \label{sec:divisibility-experiments} We adapted a prime-counting benchmark distributed with libdivide, specialized to 32-bit operands. The code determines the number of primes in $[2,40000)$ using a simplistic approach: odd numbers in this range are checked for divisibility by any smaller number that has already been determined to be prime. See Fig.~\trimmedref{fig:divisibility-lkk-in-c}. When a number is identified as a prime, we compute its scaled approximate reciprocal ($\ensuremath{c}$) value, which is repeatedly used in future iterations. In this manner, the computation of $\ensuremath{c}$ is only done once per prime, and not once per trial division by the prime. A major difference from the benchmark using the linear-congruential generator is that we cycle rapidly between different divisors, making it much more difficult to predict branches in the libdivide functions. \begin{figure}\centering \begin{minipage}{0.6\textwidth} \begin{lstlisting} int count_primes_under_N() { int primectr=0; static uint64_t prime_cvals[N]; for (uint32_t n=3; n < N; n += 2) { bool isprime=true; for (int j=0; j < primectr; ++j) { if (lkk_divisible(n, prime_cvals[j])) { isprime = false; break; } } if (isprime) prime_cvals[primectr++] = lkk_cvalue(n); } return (1+primectr); // 2 is also prime. } \end{lstlisting} \end{minipage} \caption{\label{fig:divisibility-lkk-in-c} Prime-counting benchmark for the unsigned divisibility test. The code shown is for the LKK approach, similar code is used for other strategies.} \end{figure} In these tests, we compare libdivide against LKK and GM, the fast divisibility tests whose implementations are shown in \S~\ref{sec:divisibility-impl}; see Fig.~\trimmedref{fig:lkk-unsigned-impl} for LKK and Fig.~\trimmedref{fig:gm-unsigned-impl} for GM\@. Divisibility of a candidate prime is checked either using \begin{itemize} \item libdivide to divide, followed by multiplication and subtraction to determine whether the remainder is nonzero; \item the Granlund-Montgomery (GM) divisibility check, as in Fig.~\trimmedref{fig:gm-unsigned-impl}; \item the C \texttt{\%} operation, which uses a division instruction; \item our LKK divisibility check (Fig.~\trimmedref{fig:lkk-unsigned-impl}). \end{itemize} LKK stores 64 bits for each prime; GM requires an additional 5-bit rotation amount. The division-instruction version of the benchmark only needs to store 32~bits per prime. The libdivide approach requires 72~bits per prime, because we explicitly store the primes. Instruction counts and execution speed are both important. All else being equal, we would prefer that compilers emit smaller instruction sequences. Using a hardware integer division will yield the smallest code, but this might give up too much speed. In the unsigned case, our LKK has a significant code-size advantage over GM---approximately 3~arithmetic instructions to compute our $\ensuremath{c}$ versus about 11 to compute their required constant. Both fast approaches use a multiplication and comparison for each subsequent divisibility check. GM requires an additional instruction to rotate the result of the multiplication. Performance results for the unsigned case are shown in Table~\trimmedref{tbl:libdiv-primes-bench}, showing the total number of processor cycles on each platform from 1000~repetitions of the benchmark. On Skylake, 20~repeated computations yielded cycle-count results within 0.3\% of each other. For ARM, results were always within 4\%. Initially, Ryzen results would sometimes differ by up to 10\% within 20~attempts, even after we attempted to control such factors as dynamic frequency scaling. Thus, rather than reporting the first measurement for each benchmark, the given Ryzen results are the average of 11~consecutive attempts (the basic benchmark was essentially executed 11\,000~times). Our POWER8 results (except one outlier) were within 7\% of one another over multiple trials and so we averaged several attempts (3 for GCC and 7 for Clang) to obtain each data point. Due to platform constraints, POWER8 results are user-CPU times that matched the wall-clock times. LKK has a clear speed advantage in all cases, including the POWER8 and ARM platforms. LKK is between 15\% to 80\% faster than GM\@. Both GM and LKK always are much faster than using an integer division instruction (up to $7\times$ for Ryzen) and they also outperform the best algorithm in libdivide. \begin{table} \caption{\label{tbl:libdiv-primes-bench} Processor cycles (in gigacycles) to determine the number of primes less than 40000, 1000 times, using unsigned 32-bit computations. \emph{Branchful} and \emph{branchless} are libdivide alternatives. Note that libdivide was only available for the x64 systems as it uses platform-specific optimizations. POWER8 results are in user CPU seconds. Boldfacing indicates the fastest approach. } \begin{center} \begin{tabular}{ccccccccc|cc} \toprule \multirow{2}{*}{Algorithm} & \multicolumn{2}{c}{Skylake} & \multicolumn{2}{c}{Haswell} & \multicolumn{2}{c}{Ryzen} & \multicolumn{2}{c}{ARM} & \multicolumn{2}{c}{POWER8}\\ & GCC & Clang & GCC & Clang & GCC & Clang & GCC & Clang & GCC & Clang \\ \midrule division instruction & 72 & 72 & 107 & 107 & 131 & 131 & 65 & 65 & 18 & 17\\ branchful & 46 & 88 & 56 & 98 & 59 & 71 & -- & -- & -- & --\\ branchless & 35 & 35 & 36 & 37 & 34 & 37 & -- & -- & -- & --\\ LKK&\textbf{18} &\textbf{18} & \textbf{18} &\textbf{18}& \textbf{17} & \textbf{18} & \textbf{27}& \textbf{27} & \textbf{8.7} & \textbf{8.0} \\ GM & 24 & 27 & 27 & 28 & 27 & 32 & 36 & 37 & 10 & 11 \\\midrule GM/LKK & 1.33 & 1.50 & 1.50 & 1.55 & 1.59 & 1.77 & 1.33 & 1.37 & 1.15 & 1.38 \\\bottomrule \end{tabular} \end{center} \end{table} \section{Conclusion} To our knowledge, we present the first general-purpose algorithms to compute the remainder of the division by unsigned or signed constant divisors directly, using the fractional portion of the product of the numerator with the approximate reciprocal\cite{jacobsohn1973combinatoric,Vowels:1992:D}. On popular x64 processors (and to a lesser extent on POWER), we can produce code for the remainder of the integer division that is faster than the code produced by well regarded compilers (GNU GCC and LLVM's Clang) when the divisor constant is known at compile time, using small C functions. Our functions are up to 30\% faster and with only half the number of instructions for most divisors. Similarly, when the divisor is reused, but is not a compile-time constant, we can surpass a popular library (libdivide) by about 15\% for most divisors. We can also speed up a test for divisibility. Our approach (LKK) is several times faster than the code produced by popular compilers. It is faster than the Granlund-Montgomery divisibility check\cite{Granlund:1994:DII:773473.178249}, sometimes nearly twice as fast. It is advantageous on all tested platforms (x64, POWER8 and 64-bit ARM). Though compilers already produce efficient code, we show that additional gains are possible. As future work, we could compare against more compilers and other libraries. Moreover, various additional optimizations are possible, such as for division by powers of two. \section*{Acknowledgments} The work is supported by the Natural Sciences and Engineering Research Council of Canada under grant RGPIN-2017-03910. The authors are grateful to IBM's Centre for Advanced Studies --- Atlantic and Kenneth Kent for access to the POWER~8 system.
\section{Conclusion} \label{sec:conc} We have presented an algorithm for identity testing of markov chains which avoids any dependence on brittle connectivity properties like the hitting time resolving a open question from \cite{daskalakis2017testing}. However, there are several open questions potentially relating to identity testing and graph partitioning arising from this work: \begin{enumerate} \item The sample complexity of our approach $\widetilde{O}(n / \epsilon^4)$ is sub-optimal in its dependence on the error parameter $\epsilon$. Can our approach be improved to the $\Omega (n / \epsilon)$ lower bound for the problem established in \cite{daskalakis2017testing}. \item One reason for this dependence on $\epsilon$ is due to the graph partitioning algorithm which guarantees sets of low expansion. Is it possible to improve upon such graph partitioning algorithms or devise new graph partitioning algorithms to achieve improved error dependence? \item Markov chains are arguably the simplest possible model for sequential data analysis. How can we quantify distances between models for more complicated methods? What assumptions does one need to place on the model to ensure that statistical and computational efficiency is possible for such hypothesis testing tasks? \end{enumerate} \section{Introduction} Statistical hypothesis testing is the principal method for lending statistical validity to claims made about the real world and is a vital step in any scientific enterprise. In the framework of statistical hypothesis testing, an investigator subjects hypotheses made as part of their inquiry by testing it against data collected from the real world. While the abstract framework of hypothesis testing is very powerful, its usefulness is limited by the range of hypotheses for which statistically efficient procedures have been developed. Furthermore, these tests also need to be computationally viable with large datasets. Unfortunately, most cases for which efficient procedures are known are concerned with the setting where we have access to independent and identically distributed observations from some underlying distribution. This severely restricts the use of these procedures. Motivated by these considerations, recent work by \cite{daskalakis2017testing} studied the problem of identity testing of markov chains given a single trajectory where strong correlations may exist between successive samples. They propose an algorithm to test whether the transition matrix, $\bm{Q}$, underlying the observed trajectory is equal to a known transition matrix, $\bm{P}$, or sufficiently far from it. They propose a notion of difference between markov chains which takes into account the connectivity properties of the chain to ensure that the problem remains well posed. However, a major drawback of their approach is that their runtime depends on the hitting time of $\bm{P}$ and an open question from their work is whether this dependence is truly necessary and conjectured it was not. The approach of \cite{daskalakis2017testing} is to convert the identity testing problem on markov chains to the simpler problem of identity testing of distributions given iid samples. The main idea is to use the observed trajectory to simulate samples from the distribution characterized by $\frac{1}{n} \bm{P}$. To simulate one sample from this distribution, one first picks a row of $\bm{P}$ uniformly at random and sample from the row using the trajectory. However, to generate the number of samples required to distinguish the two chains via this method, one needs to sample every row of $\bm{P}$ at least once with high probability. This leads to the dependence on the hitting time in the length of the observed trajectory. In this work, we propose an algorithm for identity testing of markov chains that avoids the dependence on the hitting time of $\bm{P}$. That is, we would like to solve the identity testing problem even in settings where one may not even be able to observe all the states in the chain. Similar to \cite{daskalakis2017testing}, we reduce the identity testing problem on markov chains to simpler identity testing problems on distributions given iid samples. However, instead of a reduction to a single identity testing problem, we formulate several identity testing problems. Our main insight is that to distinguish two sufficiently different markov chains, it is sufficient to analyze the trajectory in subsets of states which are close to being disconnected from the rest of the state space but well connected within themselves. That is, we formulate for each such subset $S$, an identity testing problem whose solution also resolves the testing problem on markov chains. However, this approach is throttled by two main difficulties: \begin{enumerate} \item Computing these ``high-information'' subsets and \item Ensuring we have sufficiently many samples from these subsets \end{enumerate} Our first main requirement of these subsets is that they have enough information to distinguish two different markov chains. We use as a sufficient criterion the property that these sets are poorly connected to the rest of the state space. The next crucial property that we will require is that the identity testing problem defined by the set can be simulated given a small number of samples from the set. We show that this property too can be related to the expansion properties of the set. This is guaranteed for a candidate set, $S$ if for all subsets, $R \subset S$, $R$ is well-connected to the rest of the set. Given these two requirements, our goal is to compute sets well connected within themselves and poorly connected to the rest of the state space. To do so, we generalize classical approximation algorithms for the Sparsest-Cut problem. However, this only ensures the first required property. To ensure the second property of being well connected within the set, we combine this approach with a divide and conquer framework. We then recursively extract such ``high-information'' subsets to obtain a partitioning of the state space into several ``high-information'' sets and a single ``low-information'' set. To tackle the second problem of ensuring we have enough points from these ``high-information'' subsets in the observed trajectory, we use techniques from the spectral analysis of markov chains to show that the chain does not spend too much time in the ``low-information'' component of the chain. The failure of our graph partitioning algorithm to partition the ``low-information'' component means that all subsets of the ``low-information'' component are well connected to the rest of the state space. This ensures that the chain escapes from this component fairly quickly if it enters it. \textbf{Related Work: } In the statistics community, a variety of tests have been developed for distribution testing in the iid scenario: Cramer-von Mises (\cite{cramer1928composition}), $\chi^2$ (\cite{pearson1900x}), Kolmogorov-Smirnov (\cite{smirnov1939estimation}) and for more recent results, \cite{agresti2013categorical, d2017goodness}. However, the analysis of these methods pertains to the asymptotic distribution of the test statistic without finite sample guarantees. In the computer science community, there has been a flurry of recent work in this setting, with a focus on finite sample lower bounds and statistical and computational tractability: \cite{batu2004sublinear, acharya2015optimal, canonne2016testing, daskalakis2018distribution, daskalakis2017testing, valiant2011testing, chan2014optimal, diakonikolas2015testing, rubinfeld2009testing, valiant2011testing, valiant2013instance, valiant2017automatic, rubinfeld2012taming, blais2017distribution, batu2000testing, batu2001testing, paninski2008coincidence, acharya2015optimal, diakonikolas2016new, diakonikolas2016collision}. The problem of identity testing and estimation in markov chains was, to the best of our knowledge, first studied in the seminal works of \cite{bartlett1951frequency, anderson1957statistical, billingsley1961statistical}. However, the results obtained are in the asymptotic regime with the number of samples tending to infinity. Recent work by \cite{daskalakis2017testing} provide finite sample analysis for the identity testing of markov chains but the length of the trajectory required depends on delicate connectivity properties of the chain like hitting times which may be arbitrarily large. The sparsest cut problem has been intensely studied with the breakthrough result of \cite{leighton1999multicommodity} devising the first $O(\log n)$ approximation algorithm followed by a subsequent result by \cite{linial1995geometry} which interprets the algorithm from a metric embedding perspective (\cite{bourgain1985lipschitz}). The $O(\log n)$ barrier was subsequently improved to $O(\sqrt{\log n})$ in another beautiful result by \cite{arora2009expander}. These algorithms have been used in divide and conquer based approaches to several combinatorial problems (\cite{shmoys1997cut}) and constructing approximation algorithms for unique games (\cite{trevisan2005approximation}). While graph decomposition techniques have been studied previously (see, for example, \cite{spielman2004nearly, trevisan2005approximation, goldreich1999sublinear}), approaches based on spectral techniques yield weaker guarantees than those based on sparsest cut approximations. Graph decompositions based on \cite{leighton1999multicommodity} have been studied in \cite{trevisan2005approximation} however these results are not strong enough for our setting as they only imply the existence of internally well-connected partitions with potentially several ``low-information'' sets whereas, we crucially require that there exists at most one such set. The relationship between the sparsest cut value of a markov chain and its spectral properties are well known (\cite{cheeger1969lower, sinclair1989approximate}) and have numerous applications (\cite{chung1997spectral,kannan1997random,lee2018kannan}). In the analysis of our algorithm, we use these techniques to bound hitting times in markov processes restricted to subsets of the state space and escape times from subsets of the state space where we bound the top eigenvalue of sub-matrices of the transition matrix as opposed to the second eigenvalue of the transition matrix. \section{Proof} \label{sec:mpr} In this section, we will present the proof of Theorem~\ref{thm:mainth}. As mentioned before, the guarantees provided by conventional graph partitioning algorithms are not strong enough to ensure the small trajectory lengths required for the success of Theorem~\ref{thm:mainth}. In the first subsection, we will describe some key lemmas relating to the graph decomposition technique detailed in Algorithm~\ref{alg:pg}. \subsection{Markov Chain Decomposition} This first lemma, proved in Appendix~\ref{prf:pg}, describes the expansion properties of the partition of the markov chain state space obtained from Algorithm~\ref{alg:pg}. Intuitively, it decomposes the graph into a set of subsets $\mathcal{S}$ which consists of sets which are well connected within themselves but poorly connected to the rest of the state space and a single set $T$ in which every subset is well connected to the rest of the state space. The sets in $\mathcal{S}$ refer to the ``high-information'' sets alluded to previously while the set $T$ is the single ``low-information'' subset of the state space. \begin{lemma} \label{lem:pg} Algorithm~\ref{alg:pg} returns a tuple $(\mathcal{S}, T)$ such that we have for all $S \in \mathcal{S}$: \begin{equation*} \text{Claim 1: } \frac{\sum_{i, j \in S} \bm{P}_{ij}}{\abs{S}} \geq 1 - \beta \qquad \text{Claim 2: } \forall R \subset \S\ \frac{\sum_{i \in R, j \in (\S \setminus R)} \bm{P}_{ij}}{\min(\abs{R}, \abs{\S \setminus R})} \geq \Omega \lprp{\frac{\beta}{\log^2 n}} \end{equation*} And $T$ satisfies: \begin{equation*} \text{Claim 3: } \forall R \subseteq T\ \frac{\sum_{i \in R, j \in \bar{R}} \bm{P}_{ij}}{\abs{R}} \geq \Omega \lprp{\frac{\beta}{\log n}} \end{equation*} Furthermore, the subsets in $\mathcal{S}$ along with $T$ form a partition of $[n]$. \end{lemma} Our next lemma, proved in Appendix~\ref{prf:helbnd}, shows that the distributions from Definition~\ref{def:ddef} are far in Hellinger distance if the original markov chains are far. \begin{lemma} \label{lem:helbnd} Let $\bm{P}$ and $\bm{Q}$ be transition matrices of symmetric markov chains such that $\text{Dist}(\bm{P}, \bm{Q}) \geq \epsilon$. Suppose now, that $T \subseteq [n]$ satisfies: \begin{equation*} \frac{\sum_{i, j \in T} \bm{P}_{ij}}{\abs{T}} \geq 1 - \frac{\epsilon}{16} \end{equation*} Then, we have: \begin{equation*} d_{Hel}^2 \lprp{\text{Dist}(T, \bm{P}), \text{Dist}(T, \bm{Q})} \geq \frac{\epsilon^2}{32} \end{equation*} \end{lemma} In the next lemma, whose proof may be found in Appendix~\ref{prf:submc}, we analyze the spectral properties of the markov processes observed on a subset of states. This lemma will be crucial in bounding the number of samples we need to see from this subset in order to generate a large number of samples from the distribution corresponding to this subset. \begin{lemma} \label{lem:submc} Let $\bm{P}$ be a symmetric irreducible markov chain and $T \subset [n]$ be a subset of states. Let $\bm{Y} = Y_1, Y_2, \dots$ be a markov process with transition matrix $\bm{P}$ and let $\bm{X} = X_1, X_2, \dots$ be the markov process observed on the subset $T$. Then, $\bm{X}$ is also a symmetric markov process with transition matrix: \begin{equation*} \bm{Q} = \bm{P}_T + \sum_{i = 1}^\infty \bm{P}_{T, \bar{T}} \bm{P}_{\bar{T}}^i \bm{P}_{\bar{T}, T} \end{equation*} \end{lemma} The next corollary is an application of Lemma~\ref{lem:submc} to markov processes defined on the ``high-information'' sets by exploiting their good expansion properties within the set itself. Its proof may be found in Appendix~\ref{prf:expsmc}. \begin{corollary} \label{cor:expsmc} In the setting of Lemma~\ref{lem:submc}, suppose in addition that $T$ satisfies: \begin{equation*} \forall R \subset T\ \frac{\sum_{i \in R, j \in (T \setminus R)} \bm{P}_{ij}}{\min(\abs{R}, \abs{T \setminus R})} \geq \alpha \end{equation*} Then, the transition matrix $\bm{Q}$ of the chain $\bm{X}$ satisfies: \begin{equation*} \chi(\bm{Q}) \geq \alpha \end{equation*} \end{corollary} We now bound the hitting time of markov processes defined on ``high-information'' subsets. See Appendix~\ref{prf:htb} for the proof. \begin{lemma} \label{lem:htb} Let $\bm{P}$ be the transition matrix of a symmetric markov chain, over state space $[n]$, satisfying $\chi(\bm{P}) \geq \alpha > 0$. Then, the hitting time of $\bm{P}$ is bounded as follows: \begin{equation*} \text{HitT}(\bm{P}) \leq \widetilde{O} \lprp{\frac{n}{\alpha^2}} \end{equation*} \end{lemma} The next lemma, which is a consequence of Theorem~1 from \cite{daskalakis2018distribution} (Also stated in \cite{daskalakis2017testing}), bounds the number of samples required to distinguish two distributions over the same support given a lower bound on their Hellinger distance. \begin{lemma} \label{lem:idtst} Given a discrete distribution $p$ on $[n]$ and given access to i.i.d samples from a distribution $q$ with the same support, there is a tester which can distinguish whether $p = q$ or $d_{Hel}(p, q) \geq \epsilon$ with $O(\frac{\sqrt{n}}{\epsilon^2} \log 1 / \delta)$ samples and failure probability at most $\delta$. \end{lemma} In the next lemma, we show how the expansion properties of the ``low-information'' set obtained before can be used to obtain a guarantee on the number of samples observed from the ``High-information'' sets. To prove the below bound, we bound the spectral norm of $\bm{P}_T$ which controls the amount of time needed to escape from the set $T$. Our proof mirrors that of Lemma~3.3 in \cite{sinclair1989approximate} but we bound the first eigenvalue of a sub-matrix as opposed to the second eigenvalue of the whole transition matrix. The full details of the proof are deferred to Appendix~\ref{prf:tli}. \begin{lemma} \label{lem:tli} Let $\bm{P}$ be the transition matrix of a symmetric markov chain. Furthermore, let $T\subset [n]$ be such that: \begin{equation*} \forall R \subseteq T,\ \frac{\sum_{i \in R, j \in \bar{R}} \bm{P}_{ij}}{\abs{R}} \geq \alpha \end{equation*} Then, in a word of length $l \geq 16\frac{1}{\alpha^2} \log (n) \log (1 / \delta)$, we have: \begin{equation*} \sum_{i = 1}^l \bm{1}\{X_i \notin T\} \geq \frac{l}{8 \log n \alpha^2} \end{equation*} with probability at least $1 - \delta$. \end{lemma} The next lemma from \cite{daskalakis2017testing} lower bounds the number of times we observe a certain state in a suitably long trajectory of a markov chain. We will use the lemma below for sub-chains consisting of chains corresponding to the ``high-information'' sets. \begin{lemma} \label{lem:mxtb} Let $X_1, \dots, X_m$ be a word of length $m$ from an irreducible markov chain, over state space $[n]$ and transition matrix $\bm{P}$. Then for $m \geq \widetilde{O}(\text{HitT} (\bm{P})\log \text{HitT} (\bm{p}))$, we have: \begin{equation*} \bm{P} \lbrb{\exists i: \abs*{\{t: X_t = i\}} \leq \frac{m}{8en}} \leq \frac{\epsilon^2}{n} \end{equation*} where the probability is over the sampling of $X_1, \dots, X_m$. \end{lemma} \subsection{Sample Generation Phase} In this subsection, we will state and prove key lemmas relating to the sample generation phase of the algorithm. Here, we will assume that the observed word $\bm{w}$ is a subset of an infinite word $\bm{w}_\infty$ from a markov process with the same starting distribution and transition matrix. We will first analyze the sample generation process on the infinite word $\bm{w}_\infty$. Assuming that we have access to the infinite word $\bm{w}_\infty$, we see that the sample generation process will never fail as we see each state infinitely many times with probability $1$. In the first lemma, we show that given access to $\bm{w}_\infty$, we will be able to use any of the ``high-information'' sets to test between the two chains: \begin{lemma} \label{lem:infFail} Suppose $(\mathcal{S}, T)$ is a decomposition of a markov chain $\bm{P}$ obtained from Algorithm~\ref{alg:idtst} and that we are given an infinite word $\bm{w}_\infty$ from a markov process with transition matrix $\bm{Q}$ and we are guaranteed one of the following two cases: \begin{equation*} \text{Case 1: } \text{Dist} (\bm{P}, \bm{Q}) \geq \epsilon \qquad \text{Case 2: } \bm{P} = \bm{Q} \end{equation*} Now, for each set $S \in \mathcal{S}$, let $l_S = \widetilde{\Omega} (\abs{S} / \epsilon^2)$, let $\mathcal{R}_S = \text{Generate IID Samples} (\bm{w}_\infty, S, l_S)$. Then, we have: \begin{equation*} \mb{P} \lbrb{\exists S \in \mathcal{S}: \text{Identity Test} (\mathcal{R}_S, \text{Dist} (S, \bm{P}), \epsilon^2 / 32) \neq \bm{1} \lbrb{\bm{P} = \bm{Q}}} \leq \frac{1}{10} \end{equation*} \end{lemma} \begin{proof} We will first consider a single set $S \in \mathcal{S}$. In the case that $\bm{P} = \bm{Q}$, we have that $\mathcal{R}_S$ consists of $l_S$ samples from $\text{Dist}(S, \bm{P})$. Therefore, we have from the guarantees of $\text{Identity Test}$ from Theorem~\ref{lem:idtst} that \begin{equation*} \mb{P} \lbrb{\text{Identity Test}(\mathcal{R}_S, \text{Dist}(S, \bm{P})) = 1} \geq 1 - \frac{1}{10n} \end{equation*} In the alternate case where $\text{Dist}(\bm{P}, \bm{Q}) \geq \epsilon$, we have from Lemma~\ref{lem:helbnd} that $d_{Hel}^2 (\text{Dist}(S, \bm{P}), \text{Dist}(S, \bm{Q})) \geq \epsilon^2 / 32$. Therefore, we have again from Lemma~\ref{lem:idtst}: \begin{equation*} \mb{P} \lbrb{\text{Identity Test}(\mathcal{R}_S, \text{Dist}(S, \bm{P})) = 0} \geq 1 - \frac{1}{10n} \end{equation*} The above two inequalities imply that for a fixed $S \in \mathcal{S}$, we have: \begin{equation*} \mb{P} \lbrb{\text{Identity Test}(\mathcal{R}_S, \text{Dist}(S, \bm{P})) = \bm{1} \lbrb{\bm{P} = \bm{Q}}} \geq 1 - \frac{1}{10n} \end{equation*} We note that since each $S \in \mathcal{S}$ is non-empty and along with $T$, they form a partition of $[n]$, there are at most $n$ sets in $\mathcal{S}$. Taking an union bound over the at most $n$ sets in $\mathcal{S}$, we get: \begin{equation*} \mb{P} \lbrb{\exists S \in \mathcal{S}: \text{Identity Test} (\mathcal{R}_S, \text{Dist} (S, \bm{P}), \epsilon^2 / 32) \neq \bm{1} \lbrb{\bm{P} = \bm{Q}}} \leq \frac{1}{10} \end{equation*} \end{proof} The above lemma shows that if we are able to generate samples from even one of the subsets $S \in \mathcal{S}$, we will be able to correctly answer the identity testing problem with high confidence. Therefore, to ensure the correctness of Algorithm~\ref{alg:idtst}, we simply need to show that the probability of being able to generate enough samples from the distribution corresponding to at least one of the sets $S \in \mathcal{S}$ is large. The next lemma, proved in the Appendix~\ref{prf:mxk}, is used to bound the number of times we will sample a particular state in the running of Algorithm~\ref{alg:geniid}. \begin{lemma} \label{lem:mxk} Let $X_1, \dots, X_m$ be $m$ iid samples from $\text{Uniform}([k])$. Let $\bm{v} = \text{Histogram} (X_1, \dots, X_m)$. Suppose further that $m \geq 10 k \log (n / \epsilon)$ for some $n > k$. Then, we have: \begin{equation*} \max_{i \in [k]} v_i \leq 2 \frac{m}{k} \end{equation*} with probability at least $1 - \frac{\epsilon}{n^2}$. \end{lemma} In the following lemma, we show that the number of samples in a trajectory from $S \in \mathcal{S}$ we will need to observe to generate $l_S$ samples from $\text{Dist}(S, \bm{P})$ is small. \begin{lemma} \label{lem:subMcSamps} Suppose $(\mathcal{S}, T)$ is a decomposition of a markov chain $\bm{P}$ obtained in Algorithm~\ref{alg:idtst} and that $\bm{w}_\infty$ is an infinite length trajectory from a markov process with transition matrix $\bm{P}$. Now for each $S \in \mathcal{S}$, let $l_S = \widetilde{O}(\abs{S} / \epsilon^2)$ and let $w_{\tau^S_1}, w_{\tau^S_2}, \dots , w_{\tau^S_{N_S}}$ be the indices corresponding to the entries in $S$ encountered in the running of $\text{Generate IID Samples}(\bm{w}_\infty, S, l_S)$. Then we have: \begin{equation*} \mb{P} \lbrb{\forall S \in \mathcal{S}: N_S \leq \widetilde{O} (\abs{S} / \epsilon^2)} \geq \frac{9}{10} \end{equation*} \end{lemma} \begin{proof} As in the proof of Lemma~\ref{lem:infFail}, we first consider a single component $S \in \mathcal{S}$. Note that the trajectory $\bm{w}_\infty$ observed on the set of states in $S$, $\bm{w}^S_\infty$, is also a markov process. Furthermore, we know from Lemmas~\ref{lem:pg}, \ref{lem:htb} and Corollary~\ref{cor:expsmc} that the hitting time of $\bm{w}^S_\infty$ is $\widetilde{O} (\abs{S} / \epsilon^2)$. Therefore, we have from Lemma~\ref{lem:mxtb}, that in a trajectory of length $N_S$ from $\bm{w}^S_\infty$, we have: \begin{equation*} \mb{P} \lbrb{\exists i: \abs*{\{t: X_t = i\}} \leq \frac{N_S}{8e\abs{S}}} \leq \frac{1}{20 n} \end{equation*} Similarly, to generate $l_S$ samples from $\text{Dist}(S, \bm{P})$, the maximum number of times any a particular state in $S$ will be sampled in a run of Algorithm~\ref{alg:geniid}, denoted by $m_S$, is upper bounded by Lemma~\ref{lem:mxk}: \begin{equation*} \mb{P} \lbrb{m_S \geq 2 \frac{l_S}{\abs{S}}} \leq \frac{1}{20n} \end{equation*} Therefore, the probability that we succeed in generating $l_S$ samples from $\text{Dist}(S, \bm{P})$ is upper bounded by the probability that both the above events fail to occur as this implies the event ${\{\forall i: \abs{\{t: X_t = i\}} \geq m_S\}}$ ensuring the sample generation process succeeds. Therefore, we have: \begin{equation*} \mb{P} \lbrb{N_S \geq \widetilde{O} (\abs{S} / \epsilon^2)} \leq \frac{1}{10n} \end{equation*} By taking a union bound over the at most $n$ subsets $S \in \mathcal{S}$, we get: \begin{equation*} \mb{P} \lbrb{\forall S \in \mathcal{S}: N_S \leq \widetilde{O} (\abs{S} / \epsilon^2)} \geq \frac{9}{10} \end{equation*} \end{proof} \subsection{Proof of Theorem~\ref{thm:mainth}} We are now ready to prove Theorem~\ref{thm:mainth}. We will prove the theorem in two cases: \textbf{Case 1: } $\bm{P} = \bm{Q}$. In this case, we see that the Algorithm~\ref{alg:idtst} only outputs the wrong answer if the sample generation process in Algorithm~\ref{alg:geniid} fails for all subsets $S \in \mathcal{S}$ or if the sample generation process succeeds but \text{Identity Test}{} returns the wrong answer. We will first upper bound the probability that the sample generation process fails. To do this, we see from Lemma~\ref{lem:tli} that if we have a trajectory of length $m \geq \widetilde{\Omega}(m / \epsilon^4)$, then we have: \begin{equation*} \sum_{i = 1}^m \bm{1} \lbrb{X_i \notin T} \geq \widetilde{\Omega} \lprp{\frac{n}{\epsilon^2}} \end{equation*} with probability at least $0.9$. Therefore, we have with probability at least $0.9$, there exists at least one set $S \in \mathcal{S}$: \begin{equation*} \sum_{i = 1}^m \bm{1} \lbrb{X_i \in S} \geq \widetilde{\Omega} \lprp{\frac{\abs{S}}{\epsilon^2}} \end{equation*} Therefore, the probability that the sample generation process fails is at most: \begin{equation*} \mb{P} \lbrb{\exists S \in \mathcal{S}: N_S \geq \widetilde{\Omega}\lprp{\frac{\abs{S}}{\epsilon^2}}} + \mb{P} \lbrb{\forall S \in \mathcal{S}: \sum_{i = 1}^m \bm{1} \lbrb{X_i \in S} \leq \widetilde{\Omega} \lprp{\frac{\abs{S}}{\epsilon^2}}} \leq \frac{2}{10} \end{equation*} where $N_S$ and the bound on the first term are from Lemma~\ref{lem:subMcSamps}. We finally bound the probability of failure of the algorithm by the sum of the probabilities of the sample generation process failing and the probability of the \text{Identity Test}{} failing on samples generated from the infinite word, $\bm{w}_\infty$ from Lemma~\ref{lem:infFail}. Putting the two bounds together, we get that Algorithm~\ref{alg:idtst} fails with probability at most $0.7$ which is less than $2 / 3$. \textbf{Case 2: } $\text{Dist}(\bm{P}, \bm{Q}) \geq \epsilon$. In this case, we see that the Algorithm~\ref{alg:idtst} always returns the correct answer if the sample generation process fails. Therefore, the probability of failure is at most the probability that \text{Identity Test}{} failing on samples generated from the infinite word from $\bm{Q}$. From Lemma~\ref{lem:infFail}, we know that this is at most $0.1$. Therefore, the failure probability of the Algorithm in this case is at most $0.9$ which is less than $2/3$. The above two cases conclude the proof of the theorem. \qed \section{Decomposing a Markov Chain into Well Connected Components} \label{sec:mcd} \subsection{Sparsest Cut with Component Constraints} In this section, we will design and analyze an algorithm for decomposing the state space of a Markov Chain into components that are internally well connected but poorly connected to the rest of the state space. Our algorithm is based on generalizations to the classical linear programming relaxations of the Sparsest Cut problem which is known to be NP-Hard in general. We will start by stating some classical results used to analyze such relaxations and adapt them to our setting. Our first result is Bourgain's famous metric-embedding theorem: \begin{theorem}[\cite{bourgain1985lipschitz,linial1995geometry}] \label{thm:bme} Let $\mathcal{X}$ be a finite metric space of size $n$ endowed with a metric $d$. Then, there exists a function $f: \mathcal{X} \rightarrow \mb{R}^m$ and a constant $C > 0$ such that: \begin{equation*} \forall x,y \in \mathcal{X},\ d(x,y) \leq \norm{f(x) - f(y)}_1 \leq C \log n\, d(x,y) \end{equation*} And furthermore, $m$ is at most $O(\log^2 n)$ and can be found in randomized polynomial time. \end{theorem} We will now describe the linear programming relaxation to the Sparsest Cut problem. Before we describe the formulation, we first introduce the notion of a Cut Metric: \begin{definition}[Cut Metric] \label{def:cutmet} For a state space $[n]$, the Cut Metric associated with a subset $S \subset [n]$ is defined as follows: \begin{equation*} \delta_S (i, j) = \begin{cases} 0, &\text{if $i,j \in S$ or $i,j \in \bar{S}$} \\ 1, &\text{otherwise} \end{cases} \end{equation*} \end{definition} It follows that the Cut Value of a subset can be restated in terms of the cut metric corresponding to the subset as follows: \begin{equation*} g_{\bm{P}} (S) = \frac{\sum_{i,j \in [n]} \bm{P}_{ij} \delta_S (i,j)}{\sum_{i,j \in [n]} \delta_S (i,j)} \end{equation*} The Linear Programming relaxation to the Sparsest Cut problem, can now be seen naturally as broadening the class of metrics in the Sparsest Cut formulation from the set of cut metrics to the set of all metrics and is described below: \begin{gather*} \min \sum_{i, j \in [n]} \delta_{ij} \bm{P}_{ij} \\ \text{such that } \delta_{ii} = 0\, \forall i\\ \delta_{ij} \leq \delta_{ik} + \delta_{kj} \, \forall i,j,k \\ \sum_{i,j \in [n]} \delta_{ij} = 1 \\ \delta_{ij} \geq 0 \label{eq:lpcut} \tag{\textbf{LP-CUT}} \end{gather*} where the second constraint is a normalization factor. We will work with a natural variant of the sparsest cut problem where we are given a priori a subset $T$ of states all of which we require to be in the same component: \begin{question}{Sparsest Cut with Component Constraints (\textbf{SPCCC}):} \label{que:spccc} Given a non-negative matrix, $\bm{P}$ and a set of states $T$ that are all required to be in the same component, we define the Sparsest Cut Problem with Component Constraints as follows: \begin{equation*} S^* = \argmin_{T \subseteq S \subset [n]} \frac{\sum_{i, j \in [n]} \delta_S (i,j) \bm{P}_{ij}}{\sum_{i, j \in [n]} \delta_S (i,j)} \end{equation*} \end{question} Now, we give our Linear Programming relaxation of the \textbf{SPCCC}{} problem. As for the Sparsest Cut problem, we relax the class of metrics beyond Cut Metrics, but we include the constraint that the distance between vertices in $T$ is $0$ and all the vertices in $T$ have the same distance to every other vertex: \begin{gather*} \min \sum_{i, j \in [n]} \delta_{ij} \bm{P}_{ij} \\ \text{such that } \delta_{ii} = 0\, \forall i\\ \delta_{ij} \leq \delta_{ik} + \delta_{kj} \, \forall i,j,k \\ \sum_{i,j \in [n]} \delta_{ij} = 1 \\ \delta_{ij} \geq 0 \\ \delta_{ij} = 0 \, \text{if $i,j \in T$} \\ \delta_{ik} = \delta_{jk} \, \forall i,j \in T, k \in [n]\label{eq:lpccc} \tag{\textbf{LP-CCC}} \end{gather*} The last two constraints in the relaxation defined above ensure that there is no distance between any two states in $T$ and the distance from the states in $T$ to every other state is the same. We will now denote by $(\delta, v) = \textbf{LP-CCC}(\bm{P}, T)$ a pair of metric $\delta$ and a value $v$ returned by \textbf{LP-CCC}. We will now prove a lemma showing that the function $f$ guaranteed by Theorem~\ref{thm:bme} can be shown to have special structure. \begin{lemma} \label{lem:me} Given an instance of the \textbf{SPCCC}{} problem, $(\bm{P}, T)$ and solution $(\delta, v) = \textbf{LP-CCC}(\bm{P}, T)$, there exists a function $f: V \rightarrow \mb{R}^m$ and a constant $C > 0$ such that: \begin{equation*} \text{Claim 1}: \delta_{ij} \leq \norm{f(i) - f(j)}_1 \leq C \log n\, \delta_{ij}, \qquad \text{Claim 2}: f(i) = f(j)\ \forall i,j \in T \end{equation*} Furthermore, $m$ is at most $O(\log^2 n)$ and $f$ can be found in randomized polynomial time. \end{lemma} \begin{proof} Let $f$ be the function whose existence is guaranteed by Theorem~\ref{thm:bme}. Note that $f$ satisfies Claim 1 of the lemma. For Claim 2, let $i,j \in T$. We know from the constraints on \textbf{LP-CCC}{} that $\delta_{ij} = 0$. Therefore, from Theorem~\ref{thm:bme}, we may again conclude that: \begin{equation*} \norm{f(i) - f(j)}_1 = 0 \implies f(i) = f(j) \end{equation*} Thus proving Claim 2. \end{proof} The next lemma from \cite{linial1995geometry} shows that it is possible to express the $l_1$ metric defined by $f$ on the state space as a sum of cut metrics. \begin{lemma}[\cite{linial1995geometry}] \label{lem:l1cut} Given $f: [n] \rightarrow \mb{R}^m$, it is possible to find in time $poly(n,m)$ a polynomial number of subsets $S_1, \dots, S_r$ and associated constants $\alpha_{S_i} > 0$ such that: \begin{equation*} \norm{f(j) - f(k)}_1 = \sum_{i = 1}^r \alpha_{S_i} \delta_{S_i} (j, k) \ \forall j,k \in [n] \end{equation*} \end{lemma} Now, finally, we conclude that the integrality gap of the Linear Programming Relaxation \textbf{LP-CCC}{} is small and furthermore, a cut obtaining such a value can be found efficiently. \begin{theorem} \label{thm:spccc} Given an instance of the \textbf{SPCCC}{} problem $(\bm{P}, T)$, there exists a polynomial time algorithm, FindComp{} which returns a cut $S^*$ satisfying: \begin{equation*} \frac{\sum_{i, j \in [n]} \delta_{S^*} (i,j) \bm{P}_{ij}}{\sum_{i, j \in [n]} \delta_{S^*} (i,j)} \leq O(\log n) \min_{T \subseteq S \subset V} \frac{\sum_{i, j \in [n]} \delta_{S} (i,j) \bm{P}_{ij}}{\sum_{i, j \in [n]} \delta_{S} (i,j)} \end{equation*} Furthermore, we have that $T \cap S^* = \phi$ \end{theorem} \begin{proof} First, let $(\delta, v) = \textbf{LP-CCC}(\bm{P}, T)$ and let $f$ be the function whose existence is guaranteed by Lemma~\ref{lem:me}. Furthermore $S_1, \dots, S_r$ denote the cuts with the associated constants $\alpha_{S_r} > 0$ as obtained from Lemma~\ref{lem:l1cut}. Now, we have: \begin{align*} \min_{i \in [r]} \frac{\sum_{j,k \in [n]} \delta_{S_i} (j, k) \bm{P}_{jk}}{\sum_{j,k \in [n]}\delta_{S_i} (j,k)} &\leq \frac{\sum_{i = 1}^r \alpha_{S_i}\sum_{j,k \in [n]} \delta_{S_i} (j, k) \bm{P}_{jk}}{\sum_{i = 1}^r \alpha_{S_i}\sum_{j,k \in [n]}\delta_{S_i} (j,k)} \\ &= \frac{\sum_{j,k \in [n]} \norm{f(j) - f(k)}_1 \bm{P}_{jk}}{\sum_{j, k \in [n]} \norm{f(j) - f(k)}_1} \leq O(\log n) v \end{align*} where the first inequality follows from the fact that $\min_i \{\frac{a_i}{b_i}\} \leq \frac{\sum a_i}{\sum b_i}$ and the final inequality follows by applying the lower bound from Theorem~\ref{thm:bme} to the denominator and the upper bound to the numerator. But since $v$ is less than the optimal value of the sparsest cut as it is a relaxation of the problem, we have proved the first claim of the theorem as we simply return the cut which minimizes the above ratio. The final result of the theorem will follow from the claim that for all $i \in [r]$, we have either $T \subseteq S_i$ or $T \subseteq \bar{S}_i$ and we return whichever one does not contain $T$. To prove the claim, assume for the sake of contradiction that there exists $i \in [r]$ and $j,k \in T$ such that $j \in S_i$ and $k \in \bar{S}_i$. Then, we have: \begin{equation*} 0 = \norm{f(k) - f(j)}_1 = \sum_{h = 1}^r \alpha_{S_h} \delta_{S_h} (j, k) \geq \alpha_{S_i} \delta_{S_i} (j, k) = \alpha_{S_i} > 0 \end{equation*} which is a contradiction. This proves the claim and the second result of the theorem. \end{proof} \subsection{Extracting a Single Component} For the purposes of our algorithm, we will consider a slightly different version of the sparsest cut problem. We begin by restating the definition of the expansion of a subset of the state space $S$: \begin{definition}[Expansion] Given a matrix, $\bm{P}$, with non-negative entries, the expansion of a set $S$, denoted by $h_{\bm{P}}(S)$ is defined as: \begin{equation*} h_{\bm{P}} (S) = \frac{\sum_{i \in S, j \notin S} \bm{P}_{ij}}{\min (\abs{S}, \abs{\bar{S}})} \end{equation*} \end{definition} We will now re-state the definition of the Cheeger constant of a graph: \begin{definition}[Cheeger Constant] The Cheeger Constant of a Markov Chain with transition matrix, $\bm{P}$, is the minimum expansion of any subset of the state space. \begin{equation*} \chi(\bm{P}) = \min_{S \subset [n]} h_{\bm{P}} (S) \end{equation*} \end{definition} \begin{algorithm}[H] \caption{Extract Component} \label{alg:ec} \begin{algorithmic}[1] \STATE \textbf{Input}: Transition Matrix $\bm{P}$, Extracted States $T$, Tolerance $\beta$ \STATE $\S_0 \leftarrow FindComp ([n], \bm{P}, T),\ t \leftarrow 0$ \label{ec:s0} \STATE $v_0 \leftarrow h_{\bm{P}} (\S_0)$ \IF {$v_0 \geq \beta / 8$} \STATE $\S_0 \leftarrow [n] \setminus T$ \STATE $v_0 \leftarrow \abs{S_0}^{-1} \sum_{i,j \in S_0} \bm{P}_{ij}$ \IF {$v_0 \leq 1 - \beta / 8$} \label{ec:afail} \STATE \textbf{Return: }False \label{ec:fret} \ENDIF \ENDIF \label{ec:intowhile} \WHILE {$\abs{\S_t} > 1$} \STATE $S^\prime_t \leftarrow FindComp (S_t, \bm{P}_{S_t}, \phi)$ \STATE $v_t \leftarrow h_{\bm{P}_{S_t}} (S^\prime_t)$ \IF {$v_t \geq \beta / (8 \log n)$} \label{ec:stif} \STATE \textbf{break} \label{ec:stbreak} \ENDIF \STATE $u_{S^\prime_t} \leftarrow \frac{\sum_{i, j \in S^\prime_t} \bm{P}_{ij}}{\abs{S^\prime_t}},\ u_{\bar{S^\prime_t}} \leftarrow \frac{\sum_{i,j \in (S_t \setminus S^\prime_t)} \bm{P}_{ij}}{\abs{S_t \setminus S^\prime_t}}$ \IF {$u_{S^\prime_t} \leq u_{\bar{S^\prime_t}}$} \STATE $S_{t + 1} \leftarrow S^\prime_t$ \ELSE \STATE $S_{t + 1} \leftarrow S_t \setminus S^\prime_t$ \ENDIF \STATE $t \leftarrow t + 1$ \ENDWHILE \STATE \textbf{Return: } $S_t$ \end{algorithmic} \end{algorithm} Here, we state a short lemma relating the expansion of a subset to its cut value. \begin{lemma} \label{lem:expCut} For a matrix $\bm{P}$ with positive entries and a subset $S$, we have: \begin{equation*} \frac{n}{2} g_{\bm{P}} (S) \leq h_{\bm{P}} (S) \leq n g_{\bm{P}} (S) \end{equation*} Consequently, we have for the cut, $S^*$ returned by FindComp{} when run with input $(\bm{P}, T)$: \begin{equation*} h_{\bm{P}} (S^*) \leq O(\log n) \min_{T \subseteq S \subset [n]} h_{\bm{P}} (S) \end{equation*} \end{lemma} \begin{proof} We first consider the case that $S \leq n / 2$. In this case, we have that $n / 2 \leq \abs{\bar{S}} \leq n$ and consequently: \begin{equation*} \frac{n}{2} g_{\bm{P}} (S) \leq h_{\bm{P}} (S) \leq n g_{\bm{P}} (S) \end{equation*} The alternate case is proved similarly. For the second claim of the lemma, we will again assume that $\abs{S^*} \leq n / 2$. Now, have from Theorem~\ref{thm:spccc} and the equation above: \begin{equation*} h_{\bm{P}} (S^*) \leq ng_{\bm{P}} (S^*) \leq n \cdot O(\log n) \min_{T \subseteq S \subset [n]} g_{\bm{P}} (S) \leq O(\log n) \min_{T \subseteq S \subset V} n \cdot \frac{2}{n} \cdot h_{\bm{P}} (S) \end{equation*} This proves the second claim of the lemma. \end{proof} The next lemma is the main result of the subsection concerning the performance of Algorithm~\ref{alg:ec}. \begin{lemma} \label{lem:ep} Algorithm~\ref{alg:ec} runs in randomized polynomial time and either returns partition $S$ disjoint from $T$ satisfying: \begin{equation*} \text{Claim 1: } \frac{\sum_{i, j \in S} \bm{P}_{ij}}{\abs{S}} \geq 1 - \beta \qquad \text{Claim 2: } \forall R \subset \S\ \frac{\sum_{i \in R, j \in (\S \setminus R)} \bm{P}_{ij}}{\min(\abs{R}, \abs{\S \setminus R})} \geq \Omega \lprp{\frac{\beta}{\log^2 n}} \end{equation*} Or returns $False$ and certifies for all subsets $S \subset ([n] \setminus T)$, we have: \begin{equation*} \text{Claim 3: } h_{\bm{P}} (S) \geq \Omega \lprp{\frac{\beta}{\log n}}\qquad \text{Claim 4: } \frac{\sum_{i,j \in [n] \setminus T} \bm{P}_{ij}}{n - \abs{T}} \leq 1 - \frac{\beta}{8} \end{equation*} \end{lemma} \begin{proof} We will first prove the third claim of the lemma. Let $\tilde{S}$ be the set returned in Line~\ref{ec:s0} of the algorithm. The only way the algorithm returns $False$ is if Line~\ref{ec:fret} is executed. Therefore, we have from the second claim of Lemma~\ref{lem:expCut} and the fact that Line~\ref{ec:fret} is executed: \begin{equation*} \frac{\beta}{8} \leq h_{\bm{P}} (\tilde{S}) \leq O(\log n) \min_{T \subseteq S \subset [n]} h_{\bm{P}} (S) \end{equation*} This proves the third claim of the lemma. The fourth claim of the lemma follows trivially from the fact that the if condition in Line~\ref{ec:afail} evaluates to true. Now, we will assume that the Algorithm is in the case where a set $S$ is returned. For the second claim of the lemma, the algorithm either returns a set containing a single element in which case, the claim is trivially true. In the alternate case, the break statement in Line~\ref{ec:stbreak} was executed and we have again from Lemma~\ref{lem:expCut}: \begin{equation*} \frac{\beta}{8 \log n} \leq h_{\bm{P}_S} (S^\prime) \leq O(\log n) \min_{R \subset S} h_{\bm{P}_{S}} (S) \end{equation*} which implies the second claim of the Lemma. For the first claim of the lemma, assume that the inner loop runs for $K$ time steps. Now, consider the times $t_{0}, \dots, t_{k}$ defined as follows: \begin{equation*} t_{0} = 0, \qquad t_{k} = \min \{t \in [K]: \abs{S_{t}} \leq \abs{S_{t_{k - 1}}} / 2\}\ \forall k \in \{1, \dots, K - 1\},\qquad t_k = K \end{equation*} It is clear that $k$ is at most $\log n$. Now, we will prove the following claim: \begin{claim} \label{clm:ine} $\forall i \in \{0, \dots, k\}$, we have that $S_{t_i}$ satisfies: \begin{equation*} \frac{\sum_{i, j \in S_{t_i}} \bm{P}_{ij}}{\abs{S_{t_i}}} \geq 1 - \frac{\beta}{8} - \frac{i \beta}{4 \log n} \end{equation*} \end{claim} Instantiating Claim~\ref{clm:ine}, with $i = k$, proves the first claim of the Lemma by nothing that $k$ is at most $\log n$. Now, we will prove the claim via induction.\\ \textbf{Base Case: } $i = 0$: The base case is true as the algorithm only proceeds beyond Line~\ref{ec:intowhile} if: \begin{equation*} \frac{\sum_{i \in S_{0},j \in \bar{S_{0}}} \bm{P}_{ij}}{\abs{S_{0}}} \leq \frac{\beta}{8} \implies \frac{\sum_{i,j \in S_{0}} \bm{P}_{ij}}{\abs{S_{0}}} \geq 1 - \frac{\beta}{8} \end{equation*} \textbf{Inductive Step: } Suppose that the claim is true for $l$, we will verify the claim for $l + 1$. Let $R_{m}$ denote the sets $(S_{m} \setminus S_{m + 1})$ for $m \in \{t_l, \dots, t_{l + 1} - 1\}$. Now, for $m \in \{t_l, \dots, t_{l + 1} - 1\}$: \begin{equation*} \sum_{i, j \in S_m} \bm{P}_{ij} = \sum_{i, j \in S_{m + 1}} \bm{P}_{ij} + \sum_{i, j \in R_{m}} \bm{P}_{ij} + \sum_{i \in S_{m + 1}, j \in R_{m}} \bm{P}_{ij} \end{equation*} Therefore, we have: \begin{equation*} \sum_{i, j \in S_{m + 1}} \bm{P}_{ij} + \sum_{i, j \in R_{m}} \bm{P}_{ij} = \sum_{i, j \in S_m} \bm{P}_{ij} - \sum_{i \in S_{m + 1}, j \in R_{m}} \bm{P}_{ij} \geq \sum_{i, j \in S_m} \bm{P}_{ij} - \frac{\beta}{8\log n} \abs{R_{m}} \end{equation*} where the last inequality follows because the algorithm will only proceed to step $m + 1$ if the condition in Line~\ref{ec:stif} of the Algorithm~\ref{alg:ec} fails. Rewriting the above inequality in terms of the quantities $u_{S^\prime_m}, u_{\bar{S}^\prime_m}$, we get: \begin{equation*} \abs{S^\prime_{m}}u_{S^\prime_m} + \abs{\bar{S}^\prime_m}u_{\bar{S}^\prime_m} \geq \sum_{i, j \in S_m} \bm{P}_{ij} - \frac{\beta}{8\log n} \abs{R_{m}} \end{equation*} From the above inequality, we may conclude by dividing both sides by $\abs{S_m}$ that (As the average of two numbers is always smaller than the larger number): \begin{multline*} \frac{\sum_{i, j \in S_{m + 1}} \bm{P}_{ij}}{\abs{S_{m + 1}}} \geq \frac{\sum_{i, j \in S_{m}} \bm{P}_{ij}}{\abs{S_{m}}} - \frac{\beta\cdot \abs{R_{m}}}{8\log n\cdot \abs{S_{m}}} \\ \geq \frac{\sum_{i, j \in S_{m}} \bm{P}_{ij}}{\abs{S_{m}}} - \frac{\beta\cdot \abs{R_{m}}}{8\log n\cdot \abs{S_{t_{l}}} / 2} = \frac{\sum_{i, j \in S_{m}} \bm{P}_{ij}}{\abs{S_{m}}} - \frac{\beta\cdot \abs{R_{m}}}{4\log n\cdot \abs{S_{t_{l}}}} \end{multline*} where the second inequality follows from the fact that in the range of $m$, $\abs{S_m} \geq \abs{S_{t_l}} / 2$. By summing up the above inequality for $m$ ranging from $t_l$ to $t_{l + 1} - 1$, we get: \begin{equation*} \frac{\sum_{i, j \in S_{t_{l + 1}}} \bm{P}_{ij}}{\abs{S_{t_{l + 1}}}} \geq \frac{\sum_{i, j \in S_{t_l}} \bm{P}_{ij}}{\abs{S_{t_l}}} - \frac{\beta\cdot \sum_{m = t_l}^{t_l - 1}\abs{R_{m}}}{4\log n\cdot \abs{S_{t_{l}}}} \geq \frac{\sum_{i, j \in S_{t_l}} \bm{P}_{ij}}{\abs{S_{t_l}}} - \frac{\beta}{4\log n} \geq 1 - \frac{\beta}{8} - \frac{(l + 1) \beta}{4\log n} \end{equation*} where the second inequality follows from that fact that the $R_m$ are disjoint subsets of $S_m$ and the second inequality follows from the inductive hypothesis. This proves Claim~\ref{clm:ine} and as explained earlier, the claim implies the first claim of the lemma. \end{proof} \subsection{Partitioning the Markov Chain} \label{prf:pg} In this subsection, we will design an algorithm to partition the entire state space of the Markov Chain. Our graph partitioning algorithm is illustrated in Algorithm~\ref{alg:pg}. We recursively call Algorithm~\ref{alg:ec} and stop when no more components can be extracted from the state space. We then use the guarantees provided by Lemma~\ref{lem:ep} to prove Lemma~\ref{lem:pg}. \begin{algorithm}[H] \caption{Partition Graph} \label{alg:pg} \begin{algorithmic}[1] \STATE \textbf{Input}: Transition Matrix $\bm{P}$, Tolerance $\beta$ \STATE $\mathcal{S} \leftarrow \{\}$ \STATE $t \leftarrow 0$ \STATE $T_t \leftarrow \phi$ \STATE $S_t \leftarrow \text{Extract Component}(\bm{P}, T_t, \beta)$ \WHILE {$S_t \neq False$} \STATE $\mathcal{S} \leftarrow \mathcal{S} \cup \{S_t\}$ \STATE $T_{t + 1} \leftarrow T_{t} \cup S_{t}$ \STATE $t \leftarrow t + 1$ \STATE $S_t \leftarrow \text{Extract Component}(\bm{P}, T_t, \beta)$ \ENDWHILE \STATE \textbf{Return: } $(\mathcal{S}, [n] \setminus T_t)$ \end{algorithmic} \end{algorithm} We will now proceed with the proof of Lemma~\ref{lem:pg}. We first note that $T_t \neq \phi$ at the end of the algorithm as this would violate Claim 4 of Lemma~\ref{lem:ep}. Now, we have by induction that $T_0 = \phi$ and $T_t = \bigcup_{i = 0}^{t - 1} S_i$. We also have by Lemma~\ref{lem:ep}, that $S_t$ is disjoint with $T_{t}$ and is therefore disjoint with $S_{0}, \dots, S_{t - 1}$. This shows that the subsets in $\mathcal{S}$ are disjoint. Suppose the algorithm terminates with $t = l$, note that $T_l = \bigcup_{S \in \mathcal{S}} S$ and consequently $T = [n] \setminus T_l$ and this proves the final claim of the lemma that the subsets in $\mathcal{S}$ along with $T$ form a partition of $[n]$. For the first two claims of the lemma, we have for all $S \in \mathcal{S}$, $S$ is returned by Algorithm~\ref{alg:ec} and the first two claims follow from the first two claims of Lemma~\ref{lem:ep}. We now prove the third claim of the lemma. We first note that if $T \neq \phi$, then from Claim 4 of Lemma~\ref{lem:ep} for $T$ and Claim 1 of Lemma~\ref{lem:ep} for each $S \in \mathcal{S}$: \begin{equation*} \frac{\beta}{8} \cdot \abs{T} \leq \sum_{i \in T, j \in \bar{T}} \bm{P}_{ij} = \sum_{S \in \mathcal{S}} \sum_{j \in S, i \in T} \bm{P}_{ij} \leq \sum_{S \in \mathcal{S}} \beta \abs{S} \implies \abs{T} \leq \frac{8n}{9} \end{equation*} Now, let any $R \subset T$. In the case that $\abs{R} \leq n / 2$, Claim 3 follows from Claim 3 of Lemma~\ref{lem:ep}. For $\abs{R} \geq n / 2$, note that $\abs{R} \leq 8n / 9$. Therefore, we have from Claim 3 of Lemma~\ref{lem:ep}: \begin{equation*} \Omega \lprp{\frac{\beta}{\log n}} \leq h_{\bm{P}} (R) = \frac{\sum_{i \in R, j \in \bar{R}} \bm{P}_{ij}}{\abs{\bar{R}}} \leq 9 \frac{\sum_{i \in R, j \in \bar{R}} \bm{P}_{ij}}{n} \leq 9 \frac{\sum_{i \in R, j \in \bar{R}} \bm{P}_{ij}}{\abs{R}} \end{equation*} and Claim 3 follows. \qed \section{Markov Chain Properties} \label{sec:mcprop} Our first lemma concerns bounding the amount of time the trajectory of the Markov Chain spends in the component $T$. The proof of our lemma follows along the lines of Lemma~3.3 in \cite{sinclair1989approximate}. In our lemma, we bound the first eigenvalue of a sub-matrix of the transition matrix whereas in \cite{sinclair1989approximate}, the same techniques are used to bound the second eigenvalue of the whole transition matrix. \begin{lemma} \label{lem:tnb} Let $\bm{P}$ be the transition matrix of a symmetric markov chain. Let $T \subset [n]$ satisfy: \begin{equation*} \forall R \subseteq T\ \frac{\sum_{i \in R, j \in \bar{R}} \bm{P}_{ij}}{\abs{R}} \geq \alpha \end{equation*} Then, $\bm{P}_T$ has the following bound on its spectral norm: \begin{equation*} \norm{\bm{P}_T} \leq 1 - \frac{\alpha^2}{2} \end{equation*} \end{lemma} \begin{proof} Since $\bm{P}_T$ is symmetric and positive, its top eigenvalue, denoted by $\lambda$, is the same as its top singular value. Now, let $\abs{T} = m$ and let $\bm{u} \in \mb{R}^m$ be the eigenvector associated with the top eigenvalue. We will now suppose without loss of generality that $\bm{u}_1 \geq \bm{u}_2 \dots{} \bm{u}_{m-1} \geq \bm{u}_m \geq 0$ from the Perron-Frobenius Theorem. Now, we have: \begin{equation*} \bm{P}_T \bm{u} = \lambda \bm{u} \implies (\bm{I} - \bm{P}_T)\bm{u} = (1 - \lambda)\bm{u} \implies (1 - \lambda) = \bm{u}^\top (\bm{I} - \bm{P}_T) \bm{u} \end{equation*} We will now extend the vector $\bm{u}$ to a vector $\bm{v} \in \mb{R}^{m + 1}$. Such that $\bm{v}_i = \bm{u}_i$ for all $i \in \{1, \dots, m\}$ and $\bm{v}_{m + 1} = 0$. Similarly, we extend $\bm{P}_T$ to an matrix $\bm{R} \in \mb{R}^{(m + 1) \times (m + 1)}$. Such that: \begin{equation*} \bm{R}_{ij} = \begin{cases} (\bm{P}_T)_{ij}, &\text{for $i,j \in [m]$} \\ 1 - \sum_{k \in [m]} (\bm{P}_T)_{ik}, &\text{for $i \in [m],\ j = m+1$} \\ 1 - \sum_{k \in [m]} (\bm{P}_T)_{kj}, &\text{for $i = m+1,\ j \in [m]$} \\ 0, &\text{otherwise} \end{cases} \end{equation*} Notice that $\bm{u}^\top (\bm{I} - \bm{P}_T) \bm{u} = \bm{v}^\top (\bm{I} - \bm{R}) \bm{v}$. Now, we expand the right hand side as follows: \begin{equation} \label{eqn:qfbnd} \bm{v}^\top (\bm{I} - \bm{R}) \bm{v} = \sum_{i = 1}^{m + 1} v_i^2 - \sum_{i, j} (\bm{R})_{ij} v_i v_j = \sum_{i = 1}^{m + 1} (1 - \bm{R}_{ii})v_i^2 - 2 \sum_{i < j} \bm{R}_{ij} v_i v_j = \sum_{i < j} \bm{R}_{ij} (v_i - v_j)^2 \end{equation} Now, consider the equation: \begin{equation} \label{eqn:csbnd} \sum_{i < j} \bm{R}_{ij} (v_i + v_j)^2 \leq 2\sum_{i < j} \bm{R}_{ij} (v_i^2 + v_j^2) \leq 2\sum_{i, j \in [m + 1]} \bm{R}_{ij} v_i^2 = 2 \end{equation} Now, we get from Equations~\ref{eqn:qfbnd} and \ref{eqn:csbnd}: \begin{equation} \label{eqn:pcsb} \bm{v}^\top (\bm{I} - \bm{R}) \bm{v} \geq \sum_{i < j} \bm{R}_{ij} (v_i - v_j)^2 \cdot \frac{\sum_{i < j} \bm{R}_{ij} (v_i + v_j)^2}{2} \geq \frac{1}{2} \cdot \lprp{\sum_{i < j} \bm{R}_{ij} (v_i^2 - v_j^2)}^2 \end{equation} where the last inequality follows from Cauchy-Schwarz. Now, we will bound the term in the parenthesis in the final expression on the right hand side: \begin{align*} \sum_{i < j} \bm{R}_{ij} (v_i^2 - v_j^2) &= \sum_{i < j} \bm{R}_{ij} \sum_{k = i}^{j - 1} (v_{k}^2 - v_{k + 1}^2) = \sum_{k = 1}^{m} (v_k^2 - v_{k + 1}^2) \sum_{j > k, i \leq k} \bm{R}_{ij} \\ & \geq \sum_{k = 1}^{m} (v_k^2 - v_{k + 1}^2) \alpha k = \alpha \sum_{j = 1}^m \sum_{k = j}^m (v_k^2 - v_{k + 1}^2) = \alpha \sum_{j = 1}^m v_j^2 = \alpha \end{align*} where the first inequality follows from the assumption on $\bm{P}$ and $T$ and the subsequent equality from the fact that $v_{m + 1} = 0$. Substituting the inequality in Equation~\ref{eqn:pcsb}, we get the desired result. \end{proof} \section{Preliminaries} We denote scalar values by small letters such as $a$, vectors with bolded small letters such as $\bm{v}$ and matrices with bolded capital letters like $\bm{P}$. We use capital letters like $P,Q,R$ chiefly to denote subsets of $[n]$ and calligraphic capital letters $\mathcal{S}$ to denote sets of such subsets. For a vector $\bm{v}$, $v_i$ denotes the $i^{th}$ entry in the vector. For a matrix $\bm{P}$ and two subsets $R$ and $S$, $\bm{P}_i$ denotes the $i^{th}$ column of a matrix, $\bm{P}_{ij}$ denote the $j^{th}$ entry of the $i^{th}$ row of the matrix, $\bm{P}_{R,S}$ corresponds to the $\abs{R} \times \abs{S}$ sized sub-matrix corresponding to the rows in $R$ and columns in $S$ and $\bm{P}_R$ is used as shorthand for $\bm{P}_{R,R}$. We use $\widetilde{O}$ and $\widetilde{\Omega}$ to hide logarithmic factors in $n$ and $\epsilon$. We use $\rho(\bm{M})$ to denote the largest eigenvalue of the matrix $\bm{M}$. We restate the definitions of the Total Variation and Hellinger distances (as stated in \cite{daskalakis2017testing}): \begin{definition} \label{def:dheltv} For two distributions $\bm{p}$ and $\bm{q}$ over a support $[n]$, we have the Hellinger and Total Variation distances, denoted by $d_{Hel}$ and $d_{TV}$ respectively, defined by: \begin{equation*} d_{Hel}^2 (\bm{p}, \bm{q}) = \frac{1}{2} \sum_{i \in [n]} (\sqrt{\bm{p}_i} - \sqrt{\bm{q}_i})^2 = 1 - \sum_{i \in [n]} \sqrt{\bm{p}_i\bm{q}_i}, \qquad d_{TV} = \frac{1}{2} \sum_{i \in [n]} \abs{\bm{p}_i - \bm{q}_i} \end{equation*} Furthermore, the two distances enjoy the following relationship: \begin{equation*} \sqrt{2} d_{Hel}(\bm{p}, \bm{q}) \geq d_{TV} (\bm{p}, \bm{q}) \geq d_{Hel}^2 (\bm{p}, \bm{q}) \end{equation*} \end{definition} Now, we will introduce some notations for markov chains: \subsection{Markov Chains} In this paper, we are only concerned with finite-dimensional markov chains: \begin{definition} \label{def:fmc} A finite dimensional homogeneous markov chain is a stochastic process $\{X_t\}_{t \in \mb{N}}$ over a state space $[n]$ which satisfies the following property: \begin{equation*} \mb{P} \lbrb{X_{t + 1} = j | X_0 = i_0, \dots, X_{t - 1} = i_{t - 1}, X_t = i} = p_{i,j} \end{equation*} That is the probability of the state at time step $t + 1$ given the states from $X_{0}, \dots, X_t$ only depends on the previous time step and this transition probability does not depend on the specific time step $t$. \end{definition} We will use $\bm{w}$ to denote a finite sample from a markov chain and $\bm{w}_\infty$ to denote an infinite sample from the markov chain. We will denote the transition matrices of markov chains usually by $\bm{P}$ and $\bm{Q}$ and we will be concerned with the symmetric case where both matrices $\bm{P}$ and $\bm{Q}$ are symmetric. We will also assume that $\bm{P}$ and $\bm{Q}$ are irreducible. We will now, restate the distance measure between two transition matrices $\bm{P}$ and $\bm{Q}$ as stated in \cite{daskalakis2017testing}: \begin{definition}[Distance between Markov Chains] For two symmetric transition matrices $\bm{P}$ and $\bm{Q}$, the distance between them is defined by: \begin{equation*} \text{Dist} (\bm{P}, \bm{Q}) = 1 - \rho (\text{Sq} (\bm{P}, \bm{Q})) \end{equation*} where the function $\text{Sq}: \mb{R}_+^{n \times n} \times \mb{R}_+^{n \times n} \rightarrow \mb{R}_+^{n \times n}$ is defined by: \begin{equation*} (\text{Sq} (\bm{P}, \bm{Q}))_{ij} = \sqrt{\bm{P}_{ij} \bm{Q}_{ij}} \end{equation*} \end{definition} \begin{definition} \label{def:mcsub} Let $\bm{P}$ be a symmetric irreducible markov chain and $T \subset [n]$ be a subset of states. Now, let $\bm{Y} = Y_1, Y_2, \dots$ be a markov process with transition matrix $\bm{P}$ and let $\tau_1, \tau_2, \dots$ be defined such that: \begin{equation*} \tau_1 = \min \{j: Y_j \in T\},\qquad \tau_i = \min \{j: j > \tau_{i - 1} \wedge Y_j \in T\} \end{equation*} Then the sequence $\bm{X} = Y_{\tau_1}, Y_{\tau_2}, \dots $ is defined to be the markov process, $\bm{Y}$, observed on $T$. \end{definition} We will now state some definitions which we will relate to the spectral properties of the markov chain. The first definition is the notion of expansion of a set of states which intuitively measures how well the set of states is connected to the rest of the state space: \begin{definition}[Expansion] Given a matrix, $\bm{P}$, with positive entries, the expansion of a set $S$, denoted by $h_{\bm{P}}(S)$ is defined as: \begin{equation*} h_{\bm{P}} (S) = \frac{\sum_{i \in S, j \notin S} \bm{P}_{ij}}{\min (\abs{S}, \abs{\bar{S}})} \end{equation*} \end{definition} The Cheeger constant of a markov chain is defined as the minimum of the expansion over all subsets of the state space. \begin{definition}[Cheeger Constant] The Cheeger Constant of a Markov Chain with transition matrix, $\bm{P}$, is the minimum expansion of any subset of the state space. \begin{equation*} \chi(\bm{P}) = \min_{S \subset [n]} h_{\bm{P}} (S) \end{equation*} \end{definition} The following relationship between the Cheeger constant of a markov chain and the spectrum of its transition matrix is well known from the work of \cite{sinclair1989approximate}. \begin{lemma}[\cite{sinclair1989approximate}] \label{lem:sinc} Let $\bm{P}$ be the transition matrix of a symmetric markov chain with eigen values $1 = \lambda_1 > \lambda_2 \geq \dots \geq \lambda_n \geq -1$. Furthermore, assume that $\bm{P}$ satisfies $\chi (\bm{P}) \geq \alpha > 0$. Then, we have: \begin{equation*} \lambda_2 \leq 1 - \frac{\alpha^2}{2} \end{equation*} \end{lemma} Now, we define the hitting time of a markov chain. \begin{definition} \label{def:htt} Let $\bm{P}$ be the transition matrix of a markov chain, $\bm{X}$, over state space $[n]$. Let $\tau_j = \min\{t: X_t = j\}$. Then, the hitting time of $\bm{P}$, denoted by $\text{HitT} (\bm{P})$ is defined as follows: \begin{equation*} \text{HitT} (\bm{P}) = \max_{i, j \in [n]} \mb{E} [\tau_j | X_0 = i] \end{equation*} \end{definition} \subsection{Sparsest Cut} Here, we will state some definitions relating to the graph decomposition algorithm we use for partitioning the state space of our markov chain. Our first definition is one that is closely related to the notion of expansion defined previously: \begin{definition}[Cut Value] \label{def:cutVal} Given a non-negative matrix, $\bm{P}$, the Cut Value of a set $S$, is defined as: \begin{equation*} g_{\bm{P}} (S) = \frac{\sum_{i \in S, j \in \bar{S}} \bm{P}_{ij}}{\abs{S} \abs{\bar{S}}} \end{equation*} \end{definition} The Sparsest Cut problem is then defined as the problem of finding the set obtaining the minimum cut value over all subsets. \begin{question}[Sparsest Cut] \label{que:spcut} Given a non-negative matrix $\bm{P}$, the goal is to find a subset $S^*$: \begin{equation*} S^* = \argmin_{S \subset [n]} g_{\bm{P}} (S) \end{equation*} \end{question} The Sparsest Cut problem is well known to be NP-Hard in general. However, good polynomial-time approximation algorithms are known to give a subset whose Cut Value which is within logarithmic factors of the Sparsest Cut value. \section{Deferred Proofs from Section~\ref{sec:mpr}} \label{app:dptst} \subsection{Proof of Lemma~\ref{lem:helbnd}} \label{prf:helbnd} Let $l = \abs{T}$ and $v = \frac{1}{\sqrt{l}} \bm{1}_{T}$. Now, we consider two cases: \textbf{Case 1: } First, we consider the case where $\sum_{i, j \in T} \bm{Q}_{ij} \geq (1 - 5\epsilon / 16)l$. In this case, we have by the definition of $\text{Dist}$: \begin{align*} d_{Hel}^2 \lprp{\text{Dist}(T, \bm{P}), \text{Dist}(T, \bm{Q})} &= \frac{1}{2} \lprp{\sum_{i \in T, j \in T} \frac{1}{l} \lprp{\sqrt{\bm{P}_{ij}} - \sqrt{\bm{Q}_{ij}}}^2 + \lprp{\sqrt{\text{Dist}(T, \bm{P}) (\eta)} - \sqrt{\text{Dist}(T, \bm{Q}) (\eta)}}^2} \\ &\geq \frac{1}{2l} \sum_{i,j \in T} \lprp{\sqrt{\bm{P}_{ij}} - \sqrt{\bm{Q}_{ij}}}^2 \geq 1 - \frac{3 \epsilon}{16} - \sum_{i,j \in T} \frac{\sqrt{\bm{P}_{ij}\bm{Q}_{ij}}}{l} \\ &= 1 - \frac{3\epsilon}{16} - v^\top \text{Sq} (\bm{Q}, \bm{P}) v \geq \frac{\epsilon}{2} \end{align*} where the second inequality is from our assumption on $T$ and $\bm{P}$ and the final inequality is from our definition of $\text{Dist}(\bm{P}, \bm{Q})$. \textbf{Case 2: } For the alternative case, we have $s = \sum_{i, j \in T} \bm{Q}_{ij} \leq (1 - 5\epsilon / 16)l$. In this case, we have from the definition of $d_{TV}$: \begin{equation*} d_{TV} \lprp{\text{Dist}(T, \bm{P}), \text{Dist}(T, \bm{Q})} \geq \frac{1}{l} \sum_{i, j \in T} \bm{P}_{ij} - \bm{Q}_{ij} \geq \frac{\epsilon}{4} \end{equation*} Therefore, we have from the relationship between the Hellinger distance and Total Variation distance in Definition~\ref{def:dheltv}: \begin{equation*} d_{Hel}^2 \lprp{\text{Dist}(T, \bm{P}), \text{Dist}(T, \bm{Q})} \geq \frac{\epsilon^2}{32} \end{equation*} \qed \subsection{Proof of Lemma~\ref{lem:tli}} \label{prf:tli} We begin by partitioning the word into $l / k$ blocks of length $k = \frac{2\log n}{\alpha^2}$ and let $Y_j$ denote the random variable denoting whether there is an element $X_k \notin T$ in the $j^{th}$ block. That is: \begin{equation*} Y_j = \bm{1} \{\exists i \in [(j - 1)k + 1, jk]: X_i \notin T\} \end{equation*} We will now prove bound $\mb{P} \{Y_j = 1 | X_1, \dots, X_{(j - 1)k}\}$. We will consider two cases: \textbf{Case 1: } $X_{j(k - 1) + 1} \notin T$. In this case, we have $\mb{P} \{Y_j = 1 | X_1, \dots, X_{(j - 1)k}\} = 1$. \textbf{Case 2: } In this case assume $X_{(j - 1)k + 1} = x \in T$. Here, we have from the property of the Markov chain that: \begin{equation*} \mb{P} \{Y_j = 0 | X_1, \dots, X_{(j - 1)k}, X_{(j - 1)k + 1} = x\} = e_{x}^\top \bm{P}_T^{k - 1} \bm{1} \leq \sqrt{n} \norm{\bm{P}_T}^{k - 1} \leq \frac{1}{2} \end{equation*} where the first inequality follows form Cauchy-Schwarz and the second follows from Lemma~\ref{lem:tnb}. Therefore, by combining the two cases above we have $\mb{P} \{Y_j = 1 | X_1, \dots, X_{(j - 1)k}\} \geq 0.5$ and we get: \begin{equation*} \mb{P} \lbrb{\sum_{i = 1}^l \bm{1}\{X_i \notin T\} \geq \frac{l}{8 \log n \alpha^2}} \geq \mb{P} \lbrb{\sum_{i = 1}^{l / k} Y_{i} \geq \frac{l}{4k}} \geq 1 - \delta \end{equation*} via an application of Hoeffding's inequality (See, for example, \cite{boucheron2013concentration}) and using our bound on $l / k$. \qed \subsection{Proof of Lemma~\ref{lem:mxk}} \label{prf:mxk} We start by first fixing a particular element $i \in [k]$. Now, we have: \begin{equation*} \mb{E} [v_i] = \frac{m}{k} \end{equation*} Therefore, we have by an application of Theorem~1.1 in \cite{dubhashi_panconesi_2009} that: \begin{equation*} \mb{P} \lbrb{v_i \geq 2 \frac{m}{k}} \leq \exp \lprp{- \frac{m}{3k}} \leq \exp \lprp{-3\log \frac{n}{\epsilon}} \leq \lprp{\frac{\epsilon}{n}}^3 \end{equation*} Finally, we get via an application of the union bound: \begin{equation*} \mb{P} \lbrb{\max_{i \in [k]} v_i \geq 2 \frac{m}{k}} \leq k \lprp{\frac{\epsilon}{n}}^3 \leq \frac{\epsilon}{n^2} \end{equation*} \qed \subsection{Proof of Lemma~\ref{lem:submc}} \label{prf:submc} Since the chain $\bm{Y}$ is irreducible, we have that $\bm{X}$ is defined almost surely. Now, we will prove that $q_{ij} = \mb{P} \{X_{k + 1} = j | X_{k} = i\}$ is independent of $k$. We will do this by showing that $\bm{P} [X_{k + 1} = j| X_{k} = i, \tau_k = l]$ is independent of $l$ and $k$ as: \begin{align*} \mb{P} \{X_{k + 1} = j | X_{k} = i\} &= \sum_{l = 1}^\infty \mb{P} \{X_{k + 1} = j, \tau_k = l| X_{k} = i\} \\ &= \sum_{l = 1}^\infty \mb{P} \{\tau_k = l| X_{k} = i\} \mb{P} \{X_{k + 1} = j | \tau_k = l, X_{k} = i\} \end{align*} Now, we define $\mathcal{P}_k$ to be sequences of states of length $k$ that begin with $i$ and end with $j$ but the elements in between are not in $T$. That is, if $(i_1, i_2, \dots, i_k) \in \mathcal{P}_k$, then we have $i_1 = i, i_k = j$ and $i_l \notin T,\ \forall l \in \{2, \dots, k-1\}$. Therefore, we get by the markov property of $\bm{Y}$ and the definition of $\bm{X}$: \begin{align*} \mb{P} \{X_{k + 1} = j | \tau_k = l, X_{k} = i\} &= \mb{P} \{Y_{\tau_{k + 1}} = j | Y_l = i\} = \sum_{m = l+1}^\infty \mb{P} \{\tau_{k + 1} = m, Y_{m} = j | Y_l = i\} \\ &= \sum_{m = 2}^\infty \mb{P} \{\tau_{2} = m, Y_{m} = j | Y_1 = i\} = \sum_{r = 2}^\infty \sum_{\bm{i} \in \mathcal{P}_r} \prod_{s = 1}^{r - 1} \bm{P}_{i_si_{s+1}} \\ &= \bm{P}_{ij} + \bm{e}_{i}^\top \lprp{\sum_{t = 1}^\infty \bm{P}_{T, \bar{T}} \bm{P_{\bar{T}}}^{t} \bm{P}_{\bar{T}, T}} \bm{e}_j \end{align*} This is independent of $k$ and therefore, the process $\bm{X}$ is a markov process and the claim about the transition matrix follows from the above expression as, we have for all $i,j \in T$ and $k \in \mb{N}$ $\mb{P}[X_{k + 1} = j | X_k = i] = \bm{Q}_{ij}$. \qed \subsection{Proof of Corollary~\ref{cor:expsmc}} \label{prf:expsmc} The corollary is immediate as $\forall S \subset T, \abs{S} \leq \abs{T} / 2$: \begin{equation*} h_{\bm{Q}} (S) = \frac{\sum_{i \in S, j \in T \setminus S} \bm{Q}_{ij}}{\abs{S}} \geq \frac{\sum_{i \in S, j \in T \setminus S} \bm{P}_{ij}}{\abs{S}} \geq \alpha \end{equation*} where the last bound follows from the fact that $\bm{Q}_{ij} \geq \bm{P}_{ij}$ from Lemma~\ref{lem:submc}. \qed \subsection{Proof of Lemma~\ref{lem:htb}} \label{prf:htb} To start, consider the markov chain with transition matrix $\bm{Q} = 0.5 (\bm{P} + \bm{P}^2)$. Given a trajectory of length $2l$ from the transition matrix $\bm{P}$, it is easy to simulate a trajectory of length $l$ from $\bm{Q}$ by simply taking the next element in the trajectory with probability $0.5$ and skipping an element with probability $0.5$. It follows that $\text{HitT}(\bm{P})$ is upper bounded by $2\text{HitT}(\bm{Q})$. Now, let $1 = \lambda_1 \geq \lambda_2 \geq \dots \geq \lambda_n \geq -1$ be the eigenvalues of $\bm{P}$ and let $v_1, \dots, v_n$ be the eigenvectors. Note that we can take $v_1$ to be the vector $(1 / \sqrt{n}, 1 / \sqrt{n}, \dots, 1 / \sqrt{n})$ (The unit vector in the direction of the stationary distribution). Now, let $\pi$ be any distribution over the states $[n]$. Now, we have $\inp{\pi}{v_1} = 1 / \sqrt{n}$. And furthermore, we have $\forall i \in [n]$, $\inp{v_i}{\pi} \leq 1$. Now, note that since $\bm{P}$ and $\bm{Q}$ have the same set of eigenvectors $v_1, \dots, v_n$ and the corresponding eigenvalues for $\bm{Q}$ are $0.5 (\lambda_1 + \lambda_1^2), \dots, 0.5(\lambda_n + \lambda_n^2)$. Now, let $1 = \sigma_1 > \sigma_2 \dots \geq \sigma_n$ be the eigenvalues of $\bm{Q}$ with eigenvectors $v_1, u_2, \dots, u_n$. We have from the previous Lemma~\ref{lem:sinc} that: \begin{equation*} \abs{\sigma_i} \leq 1 - \frac{\alpha^2}{2} \end{equation*} as when $\lambda \leq 0$, the maximum absolute value of $0.5 (\lambda + \lambda^2)$ is $1 / 8$. Now, let $\pi_0$ be any starting distribution over states, then the distribution over the states at time $t$, $\pi_t$, is $\pi_0 \bm{Q}^t$ and $\pi^*$ be the stationary distribution. Therefore, we get: \begin{equation*} \norm{\pi_t - \pi^*} = \norm*{\frac{1}{\sqrt{n}} v_1 - \pi^* + \sum_{i = 2}^n \sigma_i^t \inp{u_i}{\pi_0}u_i} \leq \sum_{i = 2}^n \sigma_i^t \abs{\inp{u_i}{\pi_0}} \leq n \lprp{1 - \frac{\alpha^2}{2}}^t \leq n\exp\lprp{- \frac{\alpha^2}{2}\cdot t} \end{equation*} Therefore, we have at $t^* = 4\log(10n) / \alpha^2$, we have: \begin{equation} \label{eqn:pbnd} \norm{\pi_t - \pi^*} \leq \frac{1}{4n} \end{equation} Therefore, we have by Equation~\ref{eqn:pbnd}: \begin{equation*} \text{HitT}(\bm{Q}) \leq 4 \frac{\log (10n)}{\alpha^2} \cdot \frac{3}{4n} + \lprp{1 - \frac{3}{4n}} \lprp{4 \frac{\log (10n)}{\alpha^2} + \text{HitT}(\bm{Q})} \end{equation*} By rearranging the above inequality, we get: \begin{equation*} \text{HitT}(\bm{Q}) \leq 10 \frac{\log (10n)}{\alpha^2} \implies \text{HitT}(\bm{Q}) \leq \widetilde{O} \lprp{\frac{n}{\alpha^2}} \implies \text{HitT}(\bm{P}) \leq \widetilde{O} \lprp{\frac{n}{\alpha^2}} \end{equation*} \qed \section{Testing Markov Chains} \label{sec:test} In this section, we state and prove the main result of the paper. We introduce our algorithm for identity testing of markov chains and prove statistical and computational guarantees on its performance. As stated before, our algorithm follows the reduction framework of \cite{daskalakis2017testing} but instead of a reduction to a single distribution testing problem, we instead reduce the problem to multiple distinct distribution testing problems where each problem corresponds to a disjoint subset of the state space. The main insight of our algorithm is that to distinguish between two markov chains that are sufficiently far from each other, it is sufficient to perform a test in such ``high-information'' sets. Our algorithm proceeds along three main steps: \begin{enumerate} \item \textbf{State Partitioning: } Partition the states into $S_1, \dots, S_k, T$ where the subsets $S_1, \dots, S_k$ are the ``high-information'' sets and $T$ is a single ``low-information'' set. \item \textbf{Generate IID Samples: } Check whether we have enough samples from one of the $S_i$ to generate samples for the iid distribution problem corresponding to it. \item \textbf{Run Identity Tester: } If so, return the result of the test or declare $\text{Dist}(\bm{P}, \bm{Q}) \geq \epsilon$. \end{enumerate} The full algorithm is described in Algorithm~\ref{alg:idtst} with supplementary algorithms for graph partitioning in Algorithms~\ref{alg:ec} and \ref{alg:pg} and to simulate iid samples in Algorithm~\ref{alg:geniid}. The main result of our paper is the following performance guarantee on Algorithm~\ref{alg:idtst}: \begin{theorem} \label{thm:mainth} There is a polynomial time algorithm (Algorithm~\ref{alg:idtst}) which given access to $\widetilde{O}\lprp{n / \epsilon^4}$ samples from a markov process with transition matrix $\bm{Q}$ and a symmetric transition matrix $\bm{P}$ correctly distinguishes between the two cases: \begin{equation*} \text{Case 1: } \bm{Q} = \bm{P}, \qquad \text{Case 2: } \text{Dist}(\bm{Q}, \bm{P}) \geq \epsilon \end{equation*} with probability at least $2/3$. \end{theorem} We start by giving a description of the type of the distributions for which we will employ our iid distribution tester: \begin{definition} \label{def:ddef} Let $\bm{P}$ be the transition matrix of a symmetric markov chain and let $R$ be a subset of its states, then we have the distribution $\text{Dist}(R, \bm{P})$ defined over a support of size $\abs{R}^2 + 1$ composed of $\{(i,j): i,j \in R\} \cup \{\eta\}$ where $\eta$ denotes a element which is none of the elements $(i,j),\ i,j \in [n]$: \begin{equation*} \forall i,j \in R, (\text{Dist} (R, \bm{P})) ((i,j)) = \frac{\bm{P}_{ij}}{\abs{R}}, \qquad (\text{Dist} (R, \bm{P})) (\eta) = 1 - \frac{1}{\abs{R}} \sum_{i,j \in R} \bm{P}_{ij} \end{equation*} \end{definition} Therefore, given a partitioning of the state space such that distributions of the above type are sufficiently different, it suffices to have enough samples from any one of the partitions. However, there are two questions that need to be answered before we can proceed: \begin{enumerate} \item Which partitions of the state space should we use to define such distributions? \item How many samples does one need from each of the partitions? \end{enumerate} It turns out that answers to both questions depend on the expansion properties of the sets. However, for the first property, we would like to have sets of low expansion, that is, subsets of the state space that are poorly connected to the rest of the state space while for the second property, we would like sets which are well connected internally. We will see that the second property relates to the hitting time of the markov process defined on the specific subset of states which is small if the original subset is well connected within itself. Therefore, one would like decompositions of the state space which are poorly connected to the rest of the state space but are well connected within themselves. We would like to point out that conventional graph decomposition algorithms decompose the graph into subsets which are well connected internally while removing a very small number of edges which guarantees the first property for a large fraction of the subsets in terms of total number of states. However, for the remaining subsets, we have no such guarantees and therefore, it is unclear whether samples from such subsets can be used to distinguish the two markov chains. Even though one can guarantee that upon entering such subsets, the trajectory is likely to quickly leave the subset, one cannot guarantee that the next partition that the chain visits is a ``high-information'' subset. An alternate approach is to group all such ``low-information'' subsets into a single set but in this case, one loses the expansion guarantees of the individual sets which again makes it hard to bound the amount of time needed to escape from this set. In light of all the above mentioned difficulties, we devise a new graph partitioning algorithm which decomposes the graph into potentially several well connected ``high-information'' sets and a single well connected ``low-information'' set from which one can guarantee that we escape from quickly and therefore reach a ``high-information'' set. We generalize conventional linear programming relaxations for the sparsest cut problem to respect component constraints and then use the above generalization to recursively partition the graph into subsets while measuring sparsest cut values with respect to the original graph instead of sub-graphs formed after removing partitions. The full details of our algorithm are deferred to the Appendix (See Algorithms~\ref{alg:ec} and \ref{alg:pg}). Note that following the approach of \cite{daskalakis2017testing}, we can sample from $\text{Dist}(T, \bm{P})$ given access to an infinite word. Firstly, note that it is possible to sample from $\text{Dist}(T, \bm{P})$ by first sampling an element from $T$ and then sampling from the distribution corresponding to the sampled element in $\text{Dist}(T, \bm{P})$. Therefore, to obtain $l$ samples from $\text{Dist}(T, \bm{P})$, we start by first generating $l$ samples from $\text{Uniform}(T)$. Let the number of times we generated state $i\in T$ be denoted by $r_i$. Now, we simply scan the infinite word sequentially and each time we encounter an element $j \in T$ at position $t$, we reject the sample if $j$ has been encountered more than $r_j$ times or add the transition $j \rightarrow w_{t + 1}$ to our samples if $w_{t + 1} \in T$ or add $\eta$ to our samples if $w_{t + 1} \notin T$. The correctness of the described procedure follows from the markov property which ensures that all the transitions generated previously are independent of the ones generated after. The procedure is formally described in Algorithm~\ref{alg:geniid}. \begin{algorithm}[H] \caption{Generate IID Samples} \label{alg:geniid} \begin{algorithmic}[1] \STATE \textbf{Input}: Finite word $\bm{w} \in [n]^m$, Subset $T$, Number of samples $l$ \STATE $\bm{v} \leftarrow l\text{ samples from Uniform}(T)$ \STATE $\bm{r} \leftarrow \text{Histogram}(\bm{v})$ \STATE $\mathcal{S} \leftarrow \{\}$ \FOR {$i = 1:m-1$} \STATE $j \leftarrow w_i$ \IF {$\bm{r}_j > 0$ and $w_{i + 1} \in T$} \STATE $\mathcal{S} \leftarrow \mathcal{S} \cup (j, w_{i + 1})$ \ELSIF {$\bm{r}_j > 0$ and $w_{i + 1} \notin T$} \STATE $\mathcal{S} \leftarrow \mathcal{S} \cup \eta$ \ENDIF \STATE $\bm{r}_j \leftarrow \bm{r_j} - 1$ \ENDFOR \IF {$\exists i \in T: \bm{r}_i > 0$} \STATE \textbf{Return: } False \ENDIF \STATE \textbf{Return: } $\mathcal{S}$ \end{algorithmic} \end{algorithm} \begin{algorithm}[H] \caption{Identity Test of Markov Chains} \label{alg:idtst} \begin{algorithmic}[1] \STATE \textbf{Input}: Finite word $\bm{w} \in [n]^m$, Target Transition Matrix $\bm{P}$, Target Accuracy $\epsilon$ \STATE $(\mathcal{S}, T) \leftarrow \text{Partition Graph} (\bm{P}, \epsilon / 16)$ \FOR {$S \in \mathcal{S}$} \STATE $l^\prime \leftarrow O\lprp{\frac{\abs{S} \log (n)}{\epsilon^2}}$ \STATE $\mathcal{R}_S \leftarrow \text{Generate IID Samples} (\bm{w}, S, l^\prime)$ \IF {$\mathcal{R}_S \neq \text{False}$} \STATE \textbf{Return: } $\text{Identity Test} (\mathcal{R}_S, \text{Dist}(S, \bm{P}), \epsilon^2 / 32)$ \ENDIF \ENDFOR \STATE \textbf{Return: } False \end{algorithmic} \end{algorithm}
\section{Introduction and main results} Mutations of quivers were introduced by Fomin and Zelevinsky in~\cite{FZ1} in relation to cluster algebras. Mutations are involutive transformations decomposing the set of quivers into equivalence classes called {\em mutation classes}. Of special interest are quivers of {\em finite mutation type}, i.e. those whose mutation classes are finite, these quivers have shown up recently in various contexts. Most of such quivers are adjacency quivers of triangulations of marked bordered surfaces~\cite{FG,GSV,FST,FT}, the complete classification of mutation-finite was obtained in~\cite{FeSTu1}. In this paper, we consider a more general notion of a quiver -- we allow arrows of quivers to have {\em real weights} (and we refer to ¨usual¨ quivers as to {\em integer quivers}). Quivers with real weights of arrows have been studied in~\cite{BBH}, where the Markov constant was used to explore the mutation classes of quivers of rank $3$. Quivers originating from non-crystallographic finite root systems were also considered in~\cite{L}. In~\cite{FT-rk3} we constructed a geometric model for mutations of rank $3$ quivers with real weights and classified all finite mutation classes. The main result of this paper is a classification of all finite-mutation quivers. More precisely, we prove the following theorem. \begin{thmIntro \label{intro1} For every mutation-finite non-integer quiver $Q$ of rank $r\ge 3$ \begin{itemize} \item[-] either $Q$ arises from a triangulated orbifold; \item[-] or $Q$ is mutation-equivalent to one of the $F$-type quivers shown in Fig.~\ref{4}; \item[-] or $Q$ is mutation-equivalent to one of the $H$-type quivers shown in Fig.~\ref{5}; \item[-] or $Q$ is mutation-equivalent to a representative of one of the three series of quivers shown in Fig.~\ref{ser}. \end{itemize} \end{thmIntro} We list all non-orbifold mutation-finite classes and their sizes in Tables~\ref{table mut-fin} and~\ref{table sizes mut-fin} respectively. Notice that the list above includes the ``skew-symmetrizations'' of all mutation-finite diagrams from~\cite{FeSTu2}: quivers arising from triangulated orbifolds~\cite{FeSTu3} and $F$-type quivers are explicitly mentioned in Theorem~\ref{intro1}, and $G_2$-type quivers obtained from the diagrams $G_2^{(*,+)}$ and $G_2^{(*,*)}$ belong to the series mentioned in the last line of Theorem~\ref{intro1}. Our proof of Theorem~\ref{intro1} is based on the classification of mutation-finite rank $3$ quivers~\cite{FT-rk3} and the related geometry. In particular, all the weights of arrows of mutation-finite quivers should be of the form $2\cos({q\pi/d})$ for some integer $q$ and $d$, and every rank $3$ subquiver has to correspond to some spherical or Euclidean triangle (we recall the details in Section~\ref{3}). We first show that all mutation-finite quivers of sufficiently high rank originate from orbifolds, and then treat quivers in low ranks where we obtain three exceptional infinite families. Next, we construct a geometric realization for every finite mutation class of quivers except for mutation-cyclic ones originating from orbifolds (we conjecture though that mutation classes originating from unpunctured orbifolds also have geometric realizations by reflections). The realization by reflections gives rise to a notion of a $Y$-{\em{seed}}, and thus we can define quivers of finite type. As in the integer case (see~\cite{FZ2}), these correspond precisely to finite reflection groups. We say that a quiver has {\em affine} or {\em extended affine} type if its mutation class is realized in the semi-positive quadratic space of corank $1$ (at least $2$, respectively). The result can be then formulated in the following theorem. \begin{thmIntro \label{intro2} Every non-integer finite mutation class (except for the quivers originating from orbifolds) has a geometric realization by reflections. In particular, \begin{itemize} \item[-] quivers in the top row of Table~\ref{table mut-fin} are of finite type; \item[-] quivers in the middle row of Table~\ref{table mut-fin} are of affine type; \item[-] quivers in the bottom row of Table~\ref{table mut-fin} are of extended affine type. \end{itemize} \end{thmIntro} \begin{center} \begin{table} \caption{Mutation-finite non-integer non-orbifold type quivers} \label{table mut-fin} {\tabulinesep=1.2mm \begin{tabu}{|c|c|c|c|c|} \hline & rank $3$&rank $4$& rank $5$ &rank $6$\\ \hline && \epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-30,8){\tiny\color{blue} $\frac{1}{4}$}\ $F_4$ &&\\ &\epsfig{file=./pic/a3.eps,width=0.08\linewidth}\put(-30,8){\tiny\color{blue} $\frac{1}{5}$}\ $H_3$& \epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{1}{5}$}\ $H_4$&&\\ \raisebox{-6pt}[0pt][0pt]{\begin{tabular}{c}Finite\\ type\end{tabular}} &\epsfig{file=./pic/a3.eps,width=0.08\linewidth}\put(-30,8){\tiny\color{blue} $\frac{2}{5}$}\ $H_3'$& \epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{2}{5}$} \ $H_4'$& &\\ &\epsfig{file=./pic/a3.eps,width=0.08\linewidth}\put(-30,8){\tiny\color{blue} $\frac{1}{5}$}\put(-15,8){\tiny\color{blue} $\frac{2}{5}$}\ $H_3''$&\epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{2}{5}$}\put(-30,8){\tiny\color{blue} $\frac{1}{5}$}\ $H_4''$&&\\ &&\epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{2}{5}$}\put(-15,8){\tiny\color{blue} $\frac{1}{5}$}\ $H_4'''$&&\\ &&\epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{2}{5}$}\put(-30,8){\tiny\color{blue} $\frac{1}{5}$}\put(-15,8){\tiny\color{blue} $\frac{2}{5}$}\ $H_4''''$&&\\ \hline \raisebox{-15pt}[0pt][0pt]{\begin{tabular}{c} Affine\\ type\end{tabular}} & \raisebox{-25pt}[0pt][0pt]{\epsfig{file=./pic/aff3.eps,width=0.05\linewidth}\put(-18,-1){\tiny\color{blue} $\frac{1}{n}$}\put(-18,25){\tiny\color{blue} $\frac{1}{n}$} \ $\widetilde G_{2,n}$} & \epsfig{file=./pic/h3-aff1.eps,width=0.06\linewidth}\put(-35,14){\tiny\color{blue} $\frac{1}{5}$}\put(-17,-6){\tiny\color{blue} $\frac{2}{5}$}\ \ $\widetilde H_3$ & \epsfig{file=./pic/a5.eps,width=0.15\linewidth}\put(-45,8){\tiny\color{blue} $\frac{1}{4}$}\ $\widetilde F_4$ &\\ & & \epsfig{file=./pic/h3-aff2.eps,width=0.06\linewidth}\put(-18,-6){\tiny\color{blue} $\frac{1}{5}$}\put(0,14){\tiny\color{blue} $\frac{2}{5}$}\put(-35,14){\tiny\color{blue} $\frac{2}{5}$}\ \ $\widetilde H_3'$ & \epsfig{file=./pic/a5.eps,width=0.15\linewidth}\put(-60,8){\tiny\color{blue} $\frac{2}{5}$}\put(-45,8){\tiny\color{blue} $\frac{1}{5}$}\put(-15,8){\tiny\color{blue} $\frac{2}{5}$}\ $\widetilde H_4$ & \\ \hline && \epsfig{file=./pic/fam1.eps,width=0.06\linewidth}\put(-22,25){\tiny\color{blue} $\frac{n\!-\!1}{2n}$}\put(-2,14){\tiny\color{blue} $\frac{1}{2n}$}\put(-18,-6){\tiny\color{blue} $\frac{1}{2n}$}\quad $\widetilde G_{2,2n}^{(*,+)}$ & & \epsfig{file=./pic/rk6_2.eps,width=0.15\linewidth}\put(-33,-1){\tiny\color{blue} $\frac{1}{4}$}\put(-33,22){\tiny\color{blue} $\frac{1}{4}$}\ $ F_4^{(*,+)}$ \\ \begin{tabular}{c}Extended\\ affine\\ type\end{tabular} && \epsfig{file=./pic/fam2.eps,width=0.06\linewidth}\put(-20,31){\tiny\color{blue} $\frac{n\!-\!1}{2n}$}\put(-39,14){\tiny\color{blue} $\frac{n\!-\!1}{2n}$}\put(-2,14){\tiny\color{blue} $\frac{1}{2n}$}\put(-18,-6){\tiny\color{blue} $\frac{1}{2n}$}\quad $\widetilde G_{2,2n}^{(*,*)}$ & \epsfig{file=./pic/rk5.eps,width=0.13\linewidth}\put(-53,26){\tiny\color{blue} $\frac{1}{5}$}\put(-53,1){\tiny\color{blue} $\frac{1}{5}$}\put(-18,26){\tiny\color{blue} $\frac{2}{5}$}\put(-18,1){\tiny\color{blue} $\frac{2}{5}$}$H_3^{(1,1)}$ & \epsfig{file=./pic/rk6_1.eps,width=0.15\linewidth}\put(-47,-1){\tiny\color{blue} $\frac{1}{4}$}\put(-47,22){\tiny\color{blue} $\frac{1}{4}$}\ $ F_4^{(*,*)}$ \\ && \quad \raisebox{10pt}{\epsfig{file=./pic/fam3.eps,width=0.06\linewidth}\put(-20,31){\tiny\color{blue} $\frac{n}{2n\!+\!1}$}\put(-42,14){\tiny\color{blue} $\frac{n}{2n\!+\!1}$}\put(-2,16){\tiny\color{blue} $\frac{1}{2n\!+\!1}$}\put(-20,-6){\tiny\color{blue} $\frac{1}{2n\!+\!1}$} \put(-6,5){\large\color{blue} $\frown$}\put(3,2){\tiny\color{blue} $\frac{n}{2n\!+\!1}$}}\raisebox{-10pt}{$\widetilde G_{2,2n+1}^{(*,*)}$} & & \raisebox{10pt}{\epsfig{file=./pic/rk6_1.eps,width=0.15\linewidth}\put(-47,-1){\tiny\color{blue} $\frac{1}{5}$}\put(-47,22){\tiny\color{blue} $\frac{1}{5}$}\put(-15,18){\tiny\color{blue} $\frac{2}{5}$}\put(-62,18){\tiny\color{blue} $\frac{2}{5}$}}\ $ H_4^{(1,1)}$ \\ \hline \end{tabu}} \end{table} \end{center} \bigskip \begin{center} \begin{table} \caption{Sizes of mutation classes of type $H$ and type $F$ quivers} \label{table sizes mut-fin} {\tabulinesep=1.2mm \begin{tabu}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline $H_3$& $H_3'$& $H_3''$ & $H_4$ & $H_4'$ & $H_4''$ & $H_4'''$ & $H_4''''$ $\widetilde H_{3}$ & $\widetilde H_{3}'$ & $\widetilde H_{4}$ & $H_3^{(1,1)}$ & $H_4^{(1,1)}$ \\ 6 & 6 & 10 & 18 & 23 & 32 & 60 & 30 36 & 28 & 524 & 8 & 179 \\ \hline $F_4$ & $\widetilde F_{4}$ & $F_4^{(*,+)}$ & $F_4^{(*,*)}$ &&&&&&&&&\\ 8 & 60 & 49 & 35 &&&&&&&&& \\ \hline \end{tabu}} \end{table} \end{center} The paper is organized as follows. In Section~\ref{3} we recall some details from~\cite{FT-rk3} on the classification of mutation-finite quivers in rank $3$ which will be our main tool. In Section~\ref{sec-high} we show that in rank greater than $4$ the denominator $d$ in the weight $2\cos({q\pi/d})$ of an arrow of a mutation-finite quiver is bounded by $5$. Thus, we restrict our considerations to quivers with weights of arrows belonging to ${\mathbb Z}[\sqrt{2}]$ and ${\mathbb Z}[(1+\sqrt{5})/2]$ which we consider in Section~\ref{low denominator}, and to quivers of rank $4$ considered in Section~\ref{4high}. In Section~\ref{sec real} we show that mutations in finite mutation classes can be modelled by partial reflections in positive semi-definite quadratic spaces. Finally, in Section~\ref{sec acyclic} we explore the relations between acyclic representatives in finite mutation classes and acute-angled simplices bounded by mirrors of reflections. \section{Classification in rank $3$} \label{3} In this section we recall the results of~\cite{FT-rk3} this paper is based on, and deduce some straightforward corollaries we will use throughout the text. We start with reminding the notation we used in~\cite{FT-rk3} and introducing some new one. \begin{notation} \begin{itemize} \item[] \item Given a quiver $Q$ with vertices $1,\dots,n$, and a subset $I\subset \{1,\dots,n\}$, denote by $Q_I$ the subquiver of $Q$ spanned by vertices $\{ i\in I\}$. In particular, the vertex labeled $i$ will be denoted $Q_i$. For example, $Q_{124}$ will denote a subquiver spanned by vertices $Q_1,Q_2,Q_4$. \item While drawing quivers we will use the following conventions: \begin{itemize} \item given an arrow $Q_{ij}$ of weight $2\cos \frac{\pi m}{d}$, we will label this arrow by $\frac{m}{d}$; we will also say that $Q_{ij}$ is an arrow {\it marked $\frac{m}{d}$}; \item arrows of weight $1$ will be left unlabeled; \item we draw double arrows instead of arrows of weight $2$. \end{itemize} \item We say that an arrow $Q_{ij}$ {\em vanishes} if $Q_i$ and $Q_j$ are not joined in $Q$. \item By $(a,b,c)$, $a,b,c>0$ we denote a rank $3$ cyclic quiver with arrows of weights $a,b,c$. \item A rank $3$ acyclic quiver with arrows of weights $a,b$ looking in one direction and an arrow of weight $c$ in the opposite direction will be denoted by $(a,b,-c)$, where some weights may equal $0$. \item Given a quiver $Q$, we will denote by $Q^\mathrm{op}$ the quiver obtained from $Q$ by reversing all arrows. $Q^\mathrm{op}$ is also called a quiver {\em opposite} to $Q$. \end{itemize} \end{notation} \begin{theorem}[\cite{FT-rk3}, Theorem 6.11] \label{finite-thm} Let $Q$ be a connected rank $3$ quiver with real weights. Then $Q$ is of finite mutation type if and only if it is mutation-equivalent to one of the following quivers: \begin{itemize} \item[(1)] $(2,2,2)$; \item[(2)] $(2,2\cos\frac{\pi}{d},2\cos\frac{\pi}{d})$, $d\in {\mathbb Z}_+$; \item[(3)] $(1,1,0)$, $(1,\sqrt 2,0)$, $(1,2\cos\frac{\pi}{5},0)$, $(2\cos\frac{\pi}{5},2\cos \frac{2\pi}{5},0)$, $(1,2\cos \frac{2\pi}{5},0)$. \end{itemize} \end{theorem} Below we list some corollaries of Thm.~\ref{finite-thm} and related geometric constructions proved in~\cite{FT-rk3}. \begin{cor} \label{cor3} Let $Q$ be a connected mutation-finite rank $3$ quiver with real weights. Then \begin{itemize} \item[(1)] All weights of $Q$ are of the form $2\cos\frac{\pi m}{d}$ with $m,d\in {\mathbb Z}$, $m\le d/2$. \item[(2)] If $Q$ contains an arrow marked $\frac{m}{d}$ with $d>5$, $\mathrm{gcd}(m,d)=1$, then $Q$ is mutation-equivalent to $(2,2\cos\frac{\pi}{d},2\cos\frac{\pi}{d})$. \item[(3)] If $Q$ contains an edge of weight $2$ then $Q$ is a cyclic quiver which coincides with either $(2,2,2)$ or $(2,2\cos\frac{\pi m}{d},2\cos\frac{\pi m}{d})$, $d,m,\in {\mathcal N}$, $0<m\le d/2$. \item[(4)] If $Q=(a,b,-c)$, $a,b,c>0$ is an acyclic quiver, then \begin{itemize} \item[-] $Q=(2\cos\frac{\pi m}{d},2\cos\frac{\pi s}{d}, -2\cos\frac{\pi t}{d})$ for some $d,m,s,t\in {\mathcal N}$, $m,s,t\le d/2$ such that $\frac{ m}{d}+\frac{ s}{d}+\frac{ t}{d}\ge 1$; \item[-] if in addition at least one of $a,b,c$ equals $2\cos\frac{\pi m}{d}$ with $d>5$, $\mathrm{gcd}(m,d)=1$, \\ then $\frac{ m}{d}+\frac{ s}{d}+\frac{ t}{d}=1$. \end{itemize} \item[(5)] If $Q=(a,b,c)$, $a,b,c>0$ is a cyclic quiver then \begin{itemize} \item[-] $Q=(2\cos\frac{\pi m}{d},2\cos\frac{\pi s}{d}, 2\cos\frac{\pi t}{d})$ for some $d,m,s,t\in {\mathcal N}$, $m,s,t\le d/2$ such that $\frac{ m}{d}+\frac{ s}{d}+(1-\frac{ t}{d})\ge 1$ (up to permutation of $m,s,t$); \item[-] if in addition at least one of $a,b,c$ equals to $2\cos\frac{\pi m}{d}$ with $d>5$, $\mathrm{gcd}(m,d)=1$, \\ then $\frac{ m}{d}+\frac{ s}{d}+(1-\frac{ t}{d})=1$. \end{itemize} \end{itemize} \end{cor} The equalities $(4)$--$(5)$ in Corollary~\ref{cor3} have a geometric interpretation: for every mutation-finite quiver there is a spherical or Euclidean triangle with the corresponding angles (the triangle is acute-angled if $Q$ is acyclic, and has an obtuse angle otherwise). We also remind that the mutations can be modeled by partial reflections, see~\cite{FT-rk3}. \section{High denominators in ranks $5$ and higher} \label{sec-high} In this section we show that there are no high denominator quivers of rank higher than $4$ (Theorem~\ref{no big}). To prove the theorem, we start with several technical lemmas (Lemma~\ref{no markov}-\ref{no-ac-high}) about rank $3$ and $4$ quivers. \begin{definition} Given a quiver $Q$, we say that $d\in{\mathcal N}$ is the {\em highest denominator} in the mutation class of $Q$ if all weights of quivers in the mutation class of $Q$ are either $2$ or of the form $2\cos \frac{p'}{d'}$ with $d'\le d$, and there exists a quiver $Q'$ in the mutation class of $Q$ with an arrow of weight $2\cos \frac{p}{d}$, $\mathrm{gcd}(p,d)=1$. Abusing notation, we will say that $Q$ is a {\em denominator $d$ quiver}. \end{definition} \begin{lemma} \label{no markov} No connected mutation-finite quiver contains the Markov quiver $(2,2,2)$ as a proper subquiver. \end{lemma} \begin{proof} Suppose the contrary, i.e. $Q=Q_{1234}$ with $Q_{123}=(2,2,2)$ is a mutation-finite quiver. By Corollary~\ref{cor3}(3) all rank 3 subquivers of $Q$ should be cyclic, which is clearly impossible. \end{proof} \begin{figure}[!h] \psfrag{II}{\small $I\!I$} \psfrag{1}{\small $\frac{1}{2n}$} \psfrag{n-1}{\small $\frac{n-1}{2n}$} \psfrag{1_}{\small $\frac{1}{2n+1}$} \psfrag{n}{\small $\frac{n}{2n+1}$} \epsfig{file=./pic/4_candidates.eps,width=0.99\linewidth} \caption{Three infinite series of quivers. Following notation introduced in Section~\ref{3}, the arrows of weight $2\cos \frac{\pi p}{q}$ are labeled by $\frac{p}{q}$, and the arrows of weight $2$ are shown by double arrows. } \label{ser} \end{figure} \begin{lemma} \label{thm: ser} Let $Q$ be a connected mutation-finite quiver of rank $4$. Suppose that $d>5$ is the highest denominator of weights of arrows in the mutation class of $Q$. Then either $Q$ or $Q^\mathrm{op}$ is mutation-equivalent to one of the quivers listed in Fig.~\ref{ser}. \end{lemma} \begin{proof} Consider such a quiver $Q$. We can assume that $Q$ has an arrow of weight $2\cos\frac{\pi m}{d}$, $d>5$, and $m$ and $d$ are coprime. Let $Q_{123}$ be a rank $3$ connected subquiver of $Q$ containing an arrow of weight $2\cos\frac{\pi m}{d}$. Then $Q_{123}$ corresponds to a Euclidean triangle, and hence, the mutation class of $Q_{123}$ contains an oriented subquiver with weights $(2,2\cos\frac{\pi}{d},2\cos\frac{\pi}{d})$ (without loss of generality we can assume that this is the subquiver $Q_{123}$ itself, and $Q_{13}$ is the double arrow). Moreover, as a mutation-finite rank $3$ subquiver $Q_{134}$ with a double arrow cannot be a Markov quiver (see Lemma~\ref{no markov}), $Q_{134}$ should be a cyclic quiver with the weights $(2,2\cos\frac{\pi p}{d'},2\cos\frac{\pi p}{d'})$) for some $p\le d'/2$, $d'\le d$ (see Corollary~\ref{cor3}(4)). We conclude that $Q$ is the quiver shown in Fig.~\ref{pf1}, where the weight of $Q_{24}$ is $2\cos \frac{\pi q}{d''}$ with $q\le d''/2$, $d''\le d$ (note that the arrow $Q_{24}$ may be oriented in the opposite way -- this would mean the quiver in Fig.~\ref{pf1} is the opposite quiver $Q^\mathrm{op}$). \begin{figure}[!h] \psfrag{II}{\small $I\!I$} \psfrag{q}{\small $\frac{q}{d''}$} \psfrag{1_}{\small $\frac{1}{d}$} \psfrag{p}{\small $\frac{p}{d'}$} \psfrag{1}{\small $1$} \psfrag{2}{\small $2$} \psfrag{3}{\small $3$} \psfrag{4}{\small $4$} \epsfig{file=./pic/pf1.eps,width=0.3\linewidth} \caption{To the proof of Lemma~\ref{thm: ser}.} \label{pf1} \end{figure} Consider the acyclic subquiver $Q_{234}$: as it contains an arrow $Q_{23}$ of weight $2\cos\frac{\pi}{d}$ with $d>5$, Corollary~\ref{cor3}(4) implies \begin{equation} \label{formula} \frac{1}{d}+\frac{p}{d'}+\frac{q}{d''}=1. \end{equation} We will consider three cases: either $p/d'=1/2$ (i.e. the arrows $Q_{34}$ and $Q_{14}$ vanish), or $q/d''=1/2$ (the arrow $Q_{24}$ vanishes), or otherwise, all six arrows are present in $Q$. \noindent {\bf Case 1. } If $\frac{p}{d'}=\frac{1}{2}$, then $\frac{q}{d''}=\frac{1}{2}-\frac{1}{d}$. Since $d''\le d$, we conclude that $d=2n$ for some $n\in {\mathcal N}$, which implies $d''=2n$, $q=n-1$, and $Q$ is the quiver shown in the middle of Fig.~\ref{ser}. \noindent {\bf Case 2.} If $\frac{q}{d''}=\frac{1}{2}$, then $\frac{p}{d'}=\frac{1}{2}-\frac{1}{d}$, so that $d=d'=2n$, and $p=n-1$ (where $n\in {\mathcal N}$), which produces the quiver on the left of Fig.~\ref{ser}. \noindent {\bf Case 3.} Suppose that $\frac{p}{d'}\ne \frac{1}{2} \ne \frac{q}{d''}$. This implies that $\frac{p}{d'}< \frac{1}{2}$ and $\frac{q}{d''}< \frac{1}{2}$. Moreover, as $d'\le d$ and $d''\le d$, we see that $\frac{1}{2}-\frac{p}{d'}\ge \frac{1}{2d}$ and $\frac{1}{2}-\frac{q}{d''}\ge \frac{1}{2d}$. In view of~(\ref{formula}) this implies $\frac{1}{2}-\frac{p}{d'}= \frac{1}{2d}$ and $\frac{1}{2}-\frac{q}{d''}= \frac{1}{2d}$. Hence, $d=d'=d''=2n+1$ for some $n\in{\mathcal N}$, $p=q=n$, and $Q$ is the quiver shown on the right of Fig.~\ref{ser}. \end{proof} \begin{remark} \label{necessary} Notice that Lemma~\ref{thm: ser} gives a {\em necessary} condition for a quiver of rank $4$ with large denominator to be mutation-finite. We will show that this condition is also sufficient (i.e., all quivers in Fig.~\ref{ser} are indeed mutation-finite) in Section~\ref{4high}. \end{remark} The following lemma can be verified by a straightforward computation. \begin{lemma} \label{l-1,k} Let $d=2n+1$ where $n\ge 2$, $n\in {\mathcal N}$. Let $Q$ be an acyclic quiver of rank $3$ and $\mu$ be a non-sink/source mutation of $Q$. Then \begin{itemize} \item[(a)] if $Q=(2\cos\frac{\pi}{d},2\cos\frac{\pi n}{d},-2\cos\frac{\pi n}{d})$, then $\mu(Q)=(2\cos\frac{\pi n }{d},2\cos\frac{\pi n}{d},2\cos\frac{\pi (n-1)}{d})$; \item[(b)] if $Q=(2\cos\frac{\pi n}{d},2\cos\frac{\pi n}{d},-2\cos\frac{\pi }{d})$, then $\mu(Q)=(2\cos\frac{\pi n }{d},2\cos\frac{\pi n}{d},2)$. \end{itemize} \end{lemma} \begin{remark} The quiver $Q$ in Lemma~\ref{l-1,k} corresponds to an acute-angled Euclidean triangle $T$ with angles $(\frac{\pi}{d},\frac{\pi n}{d},\frac{\pi n}{d})$, so the statement can also be easily checked by applying partial reflections. \end{remark} \begin{lemma} \label{no-ac-high} Let $Q=Q_{1234}$ be an acyclic connected rank $4$ quiver. Suppose that the vertex $Q_3$ is not joined with $Q_1$ in $Q$. If the weight of $Q_{12}$ is $2\cos \frac{\pi m}{d}$ with $d>5$, $\mathrm{gcd}(m,d)=1$, then $Q$ is mutation-infinite. \end{lemma} \begin{proof} Suppose that $Q$ is mutation-finite, and assume first that $Q_3$ is neither a sink nor a source. In particular, it is connected to both $Q_2$ and $Q_4$. Then, as $Q$ is acyclic, the mutation $\mu_3$ at vertex $Q_3$ changes the weight of the arrow $Q_{24}$ but does not change its direction. Now, consider the subquiver $Q_{124}$. Since the arrow incident to $Q_{12}$ has the weight $2\cos \frac{\pi m}{d}$ with $d>5$, we conclude that the acyclic subquiver $Q_{124}$ can be modeled by an acute-angled Euclidean triangle, and moreover, the weight of the arrow $Q_{24}$ is uniquely determined by the weights of $Q_{12}$ and $Q_{14}$. Since $Q_3$ is not joined with $Q_1$, the mutation $\mu_3$ preserves the weights and directions of arrows $Q_{12}$ and $Q_{14}$. Since $\mu_3$ also preserves the direction of $Q_{24}$, this implies that the subquiver $Q'_{124}$ of the mutated quiver $Q'=\mu_3(Q)$ is still acyclic and satisfies the same properties as $Q_{124}$: it is modeled by an acute-angled Euclidean triangle. Hence, the weight of the new arrow $Q_{24}'$ should coincide with the weight of the old arrow $Q_{24}$. This contradicts the result of the paragraph above. The contradiction shows that $Q$ is mutation-infinite. Assume now that $Q_3$ is either a sink or a source. We will now show that applying sink/source mutations only we can make $Q_3$ neither a sink nor a source, and thus reduce the case to the one already being considered. Indeed, without loss of generality we can assume $Q_3$ is a sink. Applying, if necessary, a source mutation in $Q_1$, we can assume that $Q_1$ is not a source. Since $Q$ is acyclic, it contains a source, and thus either $Q_2$ or $Q_4$ is a source. After mutating at a source, the vertex $Q_3$ is neither a sink nor a source anymore, so we are in the assumptions of the first case. \end{proof} \begin{theorem} \label{no big} There is no rank $5$ connected mutation-finite quiver with an arrow of weight $2\cos \frac{\pi m}{d}$ with $d>5$, $m\le d/2$, $\mathrm{gcd}(m,d)=1$. \end{theorem} \begin{proof} Suppose that $Q$ is a mutation-finite connected rank $5$ quiver, and assume that $Q_{1234}$ is a connected subquiver containing an arrow of weight $2\cos \frac{\pi m}{d}$, $d>5$, $\mathrm{gcd}(m,d)=1$. We can assume that $d$ is the highest denominator in the mutation class of $Q$. Then by Lemma~\ref{thm: ser}, $Q_{1234}$ is mutation-equivalent to one of the quivers in Fig.~\ref{ser} or its opposite. Without loss of generality we may assume that the subquiver $Q_{1234}$ of $Q$ itself is one of the quivers in Fig.~\ref{ser}. We consider these three series of quivers separately. \medskip \noindent {\bf Case~1: Odd denominator $d=2n+1$.} Then $Q_{1234}$ is the subquiver shown in Fig.~\ref{ser} on the right (we can assume $Q_{13}$ is the double arrow and $Q_2$ is the vertex incident to two arrows marked $\frac{1}{d}$). By reasoning as in Case~3 of the proof of Lemma~\ref{thm: ser}, we see that the subquiver $Q_{1235}$ looks identical to $Q_{1234}$ modulo the direction of the arrow $Q_{25}$ which can point either way (see Fig.~\ref{5-odd}(a)~and~(b)). Applying Corollary~\ref{cor3}(4) to acyclic subquiver $Q_{145}$ we see that the arrow $Q_{45}$ should be marked $\frac{1}{d}$. In the case shown in Fig.~\ref{5-odd}(b) we also see that the arrow $Q_{45}$ is directed from $Q_4$ to $Q_5$ (as the weights of arrows in the subquiver $Q_{245}$ require this subquiver to be acyclic); in the case shown in Fig.~\ref{5-odd}(a) the vertices $Q_4$ and $Q_5$ are completely symmetric, so we can also assume $Q_{45}$ is directed from $Q_4$ to $Q_5$. Therefore, the quiver $Q$ is one of the two quivers shown on the left of Fig.~\ref{5-odd}. Applying mutation $\mu_5$ in vertex $Q_5$, we obtain the quiver $Q'=\mu_5(Q)$ shown on the right of Fig.~\ref{5-odd} (we use Lemma~\ref{l-1,k} to compute the new weights of arrows). However, the subquiver $Q_{234}'$ of $Q'$ is an acyclic subquiver with arrow of weight $2$, which is impossible by Corollary~\ref{cor3}(3). \begin{figure}[!h] \psfrag{a}{\small (a)} \psfrag{b}{\small (b)} \psfrag{1}{\scriptsize $1$} \psfrag{2}{\scriptsize $2$} \psfrag{3}{\scriptsize $3$} \psfrag{4}{\scriptsize $4$} \psfrag{5}{\scriptsize $5$} \psfrag{m5}{\scriptsize $\mu_5$} \psfrag{1k}{\scriptsize $\frac{1}{d}$} \psfrag{lk}{\scriptsize $\frac{n}{d}$} \psfrag{l-1}{\scriptsize $\frac{n\!-\!1}{d}$} \epsfig{file=./pic/5-odd.eps,width=0.8\linewidth} \caption{Quiver of rank $5$ with an arrow of weight $2\cos \frac{\pi m}{d}$ for odd $d=2n+1$.} \label{5-odd} \end{figure} \medskip \noindent {\bf Case~2: Even denominator $d=2n$.} In this case there are two possibilities for each of the subquivers $Q_{1234}$ and $Q_{1235}$ (see Fig.~\ref{ser}), which, up to symmetry and taking $Q^\mathrm{op}$ (and sink/source mutations), gives rise to four forms of the quiver $Q$ shown in Fig.~\ref{5-even}. In each of the four possibilities the weight of the arrow $Q_{45}$ is determined uniquely from subquivers $Q_{145}$ or $Q_{245}$. \begin{figure}[!h] \psfrag{a}{\small (a)} \psfrag{b}{\small (b)} \psfrag{c}{\small (c)} \psfrag{d}{\small (d)} \psfrag{1}{\scriptsize $1$} \psfrag{2}{\scriptsize $2$} \psfrag{3}{\scriptsize $3$} \psfrag{4}{\scriptsize $4$} \psfrag{5}{\scriptsize $5$} \psfrag{1k}{\scriptsize $\frac{1}{d}$} \psfrag{2k}{\scriptsize $\frac{2}{d}$} \psfrag{lk}{\scriptsize $\frac{n}{d}$} \psfrag{l-1}{\scriptsize $\frac{n\!-\!1}{d}$} \epsfig{file=./pic/5-even.eps,width=0.99\linewidth} \caption{Quiver of rank $5$ with an arrow of weight $2\cos \frac{\pi m}{d}$ for even $d=2n$.} \label{5-even} \end{figure} Notice that in cases (a), (b) and (c) the subquiver $Q_{2345}$ is acyclic, having a vertex ($Q_2$, $Q_3$ and $Q_3$ in the three cases respectively) which is not joined with $Q_4$ and incident to the arrow $Q_{23}$ of weight $2\cos \frac{\pi}{d}$, $d>5$. So, by Lemma~\ref{no-ac-high} $Q_{2345}$ (and, hence, $Q$) is mutation-infinite. We are left to consider the case (d). Applying mutations in vertices $Q_2$ and the $Q_1$, we obtain the quiver $Q'$ shown in Fig.~\ref{d}. Its subquiver $Q'_{245}$ is acyclic, has a denominator $d>5$ arrow $Q'_{25}$, but does not correspond to a Euclidean triangle, so it is mutation-infinite. \begin{figure}[!h] \psfrag{1}{\scriptsize $1$} \psfrag{2}{\scriptsize $2$} \psfrag{3}{\scriptsize $3$} \psfrag{4}{\scriptsize $4$} \psfrag{5}{\scriptsize $5$} \psfrag{1k}{\scriptsize $\frac{1}{d}$} \psfrag{2k}{\scriptsize $\frac{2}{d}$} \psfrag{lk}{\scriptsize $\frac{n}{d}$} \psfrag{l-1}{\scriptsize $\frac{n\!-\!1}{d}$} \psfrag{l-2}{\scriptsize $\frac{n\!-\!2}{d}$} \epsfig{file=./pic/d.eps,width=0.31\linewidth} \caption{A mutation of the quiver shown in Fig.~\ref{5-even}(d).} \label{d} \end{figure} \end{proof} \begin{remark} In view of Theorem~\ref{no big}, in rank $5$ and higher we only need to consider the quivers with arrows marked $\frac{p}{d}$, $p<d\le 5$. This will be done in Section~\ref{low denominator}. \end{remark} \section{Low denominator quivers} \label{low denominator} By {\it low denominator} quivers we mean quivers without arrows marked $\frac{m}{d}$, where $m\le d/2$, $\mathrm{gcd}(m,d)=1$ and $d> 5$. There are finitely many of low denominator quivers in each rank, so one can classify mutation-finite low denominator quivers of small ranks checking them case by case. \subsection{Denominator $4$ mutation classes} For every skew-symmetrizable integer matrix $B$ one can construct a skew-symmetrization $B'$ of it by putting $b'_{ij}=\mathrm{sgn }\,{b_{ij}}\sqrt{-b_{ij}b_{ji}}$. Matrix $B'$ gives rise to a (possibly non-integer) quiver $Q'$ whose mutations agree with mutations of the diagram of $B$ (see~\cite{FZ2}). Notice that not every non-integer denominator $4$ quiver corresponds to a diagram of an integer skew-symmetrizable matrix: to have a corresponding skew-symmetrizable matrix the number of arrows of weight $\sqrt{2}$ in every (not obligatory oriented) cycle must be even (cf.~\cite[Exercise 2.1]{K}). However, it is easy to check that any chordless cycle with odd number of arrows of weight $\sqrt{2}$ is mutation-infinite, and thus we can conclude that the finite mutation classes of denominator $4$ quivers are the same as the ones described in~\cite{FeSTu2}. \begin{remark} Denominator $3$ and $2$ quivers are actually integer, so we do not need to consider them. \end{remark} \begin{cor} \label{b} Any mutation-finite quiver with highest denominator $4$ is mutation-equivalent to a symmetrization of one of the integer diagrams, i.e. either it arises from a triangulated orbifold or is one of the exceptional quivers listed in Fig.~\ref{4} (we call these {\em $F$-type quivers}). \end{cor} \begin{figure}[!h] \psfrag{4}{\small $\frac{1}{4}$} \psfrag{6}{\small $\theta_6$} \psfrag{a}{\small $F_4$} \psfrag{b}{\small $\widetilde F_4$} \psfrag{c}{\small $F_4^{(*,+)}$} \psfrag{d}{\small $F_4^{(*,*)}$} \psfrag{e}{\small $G_2^{(*,+)}$} \psfrag{f}{\small $G_2^{(*,*)}$} \epsfig{file=./pic/4ex_.eps,width=0.993\linewidth} \caption{Exceptional denominator 4 quivers} \label{4} \end{figure} \begin{remark} Notice that the diagrams $G_2^{(*,+)}$ and $G_2^{(*,*)}$ from classification in~\cite{FeSTu2} correspond to denominator $6$ quivers and arise as elements of series shown in Fig.~\ref{ser} for $n=3$. \end{remark} \newpage \subsection{Denominator $5$: separating $4$ from $5$} \begin{prop} \label{separate 4 5} Let $Q$ be a quiver of finite mutation type with the highest denominator $d=5$ in the mutation class. Then no quiver in the mutation class of $Q$ contains a denominator $4$ arrow. \end{prop} \begin{proof} If some quiver in the mutation class of $Q$ does not contain arrows with denominators $4$, then the whole mutation class has no such arrows: this is immediate from the mutation rule (as $\sqrt 2\notin {\mathbb Q}(\sqrt 5)$). Therefore, we can assume that every quiver in the mutation class of $Q$ contains both denominator $5$ and denominator $4$ arrows. Without loss of generality we can also assume that $Q$ is of smallest possible rank with this property. Let $n$ be the rank of $Q$. In view of classification of mutation-finite rank $3$ quivers we see that $n\ge 4$. Suppose that $Q_{n,n-1}$ is a denominator $5$ arrow. By the minimality of $Q$, no of the arrows $Q_{i,n}$ has denominator $4$. This implies that a denominator $4$ arrow is contained in $Q_{1,\dots,n-2}$. Without loss of generality we can assume that the arrow $Q_{12}$ has denominator $4$. Consider the shortest path $\mathcal P$ connecting (one of the endpoints of) $Q_{12}$ to (one of the endpoints of) $Q_{n-1,n}$, we can assume that $\mathcal P$ connects $Q_2$ to $Q_{n-1}$. Since $Q$ is minimal and $\mathcal P$ is shortest, the support of $\mathcal P$ coincides with $Q_{2,\dots,n-1}$ and is a linear graph containing all vertices of $Q$ except for $Q_1$ and $Q_n$. Thus, we can assume that the subquiver $Q_{2,\dots,n-1}$ only contains arrows $Q_{i,i+1}$, and each of these arrows is of weight $1$ or $2$. Furthermore, besides the arrows in $Q_{2,\dots,n-1}$, denominator $4$ arrow $Q_{12}$ and denominator $5$ arrow $Q_{n,n+1}$, the quiver $Q$ may only contain two other arrows: $Q_{13}$ and $Q_{n-2,n}$. Notice that $Q_{13}$ cannot have denominator $4$ as this would contradict the minimality of $Q$. Also, $Q_{13}$ cannot have weight $1$ or $2$, as in that cases the subquiver $Q_{123}$ would not be mutation-finite. Thus, there is no arrow between vertices $Q_1$ and $Q_3$. If $Q_{23}$ has weight $2$ then $Q_{123}$ is already mutation-infinite, so we can assume that $Q_{23}$ has weight $1$. Applying (if needed) mutation $\mu_1$ we can assume that $Q_2$ is neither a sink nor a source, so applying mutation $\mu_2$ we will create a denominator $4$ arrow $Q_{13}'$ (and this will not affect the rest of the quiver). The subquiver spanned by all vertices but $Q_2$ will now contain both denominator $4$ and denominator $5$ arrows, which contradicts the minimality of $Q$. \end{proof} \subsection{Denominator $5$ mutation classes} In this section we classify denominator $5$ mutation classes (i.e. low denominator quivers containing arrows marked $\frac{1}{5}$ or $\frac{2}{5}$). In view of Proposition~\ref{separate 4 5}, such a quiver only contains arrows marked $\frac{1}{2}$ (such arrows are absent), $\frac{1}{3}$ (simple arrows), $\frac{1}{5}$, $\frac{2}{5}$ and $2$ (double arrows). The classification can be now achieved by a short (computer assisted) case-by-case study which we organize as follows. All rank $3$ mutation-finite classes are listed in Theorem~\ref{finite-thm} (there are only $3$ mutation classes containing arrows of denominator $5$). The fourth vertex may be added to a representative of each of these $3$ mutation classes in $9^3$ ways. Most of the obtained quivers are mutation-infinite, so this will produce $8$ mutation-finite classes listed in the left and middle columns of Fig.~\ref{5}. Then one can add the fifth vertex to get two mutation classes of rank $5$. Adding the sixth vertex we get exactly one mutation class, while adding one more vertex to that one does not give any new mutation-finite quivers. We can now summarize the results of the computation described above. \begin{theorem} \label{thm5} A denominator $5$ quiver of finite mutation type is mutation-equivalent to one of the quivers listed in Table~\ref{5}. \end{theorem} \begin{figure}[!h] \psfrag{15}{\small $\frac{1}{5}$} \psfrag{25}{\small $\frac{2}{5}$} \epsfig{file=./pic/mut-fin5.eps,width=0.993\linewidth} \caption{Denominator $5$ quivers of finite mutation type} \label{5} \end{figure} \section{Rank $4$ quivers with high denominators} \label{4high} In view of Theorems~\ref{no big} and~\ref{thm5} we are left to classify mutation-finite quivers of rank $4$ with the largest denominator $d> 5$. By Lemma~\ref{thm: ser} every such quiver is mutation-equivalent to one of the quivers shown in Fig.~\ref{ser}. In other words, we are left to study three infinite series of rank $4$ quivers. Below, we show that each mutation class in these three families is mutation-finite. Note that all three series in Fig.~\ref{ser} are infinite (as $n\in \{2,3,\dots\}$), and computing the mutations classes for relatively small $n$ one can observe the size of the mutation classes grows with $n$. We will show by induction that all quivers in each of these mutation classes satisfy certain conditions, which will imply mutation-finiteness as the conditions describe a finite set of quivers for every given $n$. The three types of quivers shown in Fig.~\ref{ser} will be treated separately (but in a very similar way). \begin{lemma} \label{odd family} The quiver shown on the right of Fig.~\ref{ser} is mutation-finite for every $n\in\{2,3,\dots \}$. \end{lemma} \begin{proof} We will show by induction (on the number of mutations applied) that every quiver in the mutation class can be presented in a standard form shown in Fig.~\ref{standard} with some parameters $k,q,m,s\in \{0,1,2,\dots n \}$ satisfying the following conditions: \begin{itemize} \item[(1)] $k+q\in\{n,n+1\}$; \item[(2)] $k>\frac{n}{2}\ge q$; \item[(3)] $s+m+k+q=2n+1$; \item[(4)] $q\le s,m \le n-q$ \ \ and \ \ $0<s,m$. \end{itemize} The mutation-finiteness then follows immediately. \begin{figure}[!h] \psfrag{11}{\scriptsize $1$} \psfrag{2}{\scriptsize $2$} \psfrag{3}{\scriptsize $3$} \psfrag{4}{\scriptsize $4$} \psfrag{k}{\normalsize $k$} \psfrag{q}{\normalsize $q$} \psfrag{m}{\normalsize $m$} \psfrag{s}{\normalsize $s$} \psfrag{m+q}{\normalsize $m+q$} \psfrag{s+q}{\normalsize $s+q$} \quad\epsfig{file=./pic/standard.eps,width=0.31\linewidth} \caption{Standard form for quivers in the mutation classes shown in Fig.~\ref{ser}. We label the arrow of weight $2\cos \frac{k\pi}{d}$ by $k$ (with $d=2n+1$ or $d=2n$ for all arrows). } \label{standard} \end{figure} \bigskip \noindent {\bf Base of induction.} Reordering the vertices, one can redraw the quiver shown on the right of Fig.~\ref{ser} as in Fig.~\ref{standard-base3}. In this case $q=0$, $k=m=n$ and $s=1$, which clearly satisfies conditions $(1)$--$(4)$. \begin{figure}[!h] \psfrag{11}{\scriptsize $1$} \psfrag{2}{\scriptsize $2$} \psfrag{3}{\scriptsize $3$} \psfrag{4}{\scriptsize $4$} \psfrag{II}{\small $I\!I$} \psfrag{1}{\small $\frac{1}{2n}$} \psfrag{n-1}{\small $\frac{n-1}{2n}$} \psfrag{1_}{\small $\frac{1}{2n+1}$} \psfrag{n}{\small $\frac{n}{2n+1}$} \quad\epsfig{file=./pic/standard-base3.eps,width=0.3\linewidth} \caption{Base of induction: the quiver from the right of Fig.~\ref{ser} in the standard form. } \label{standard-base3} \end{figure} \bigskip \noindent {\bf Step of induction.} Our aim is now to show that the class of quivers described in Fig.~\ref{standard} with the conditions (1)--(4) is closed under mutations. {\it A priori}, we need to check four mutations for that (one mutation in each of the four directions). However, taking into account the symmetry of the conditions above and considering the quivers up to the opposite allows us to reduce the work to checking the two mutations in the two vertices $Q_1$ and $Q_2$, see Fig.~\ref{standard}. Indeed, taking $Q$ to $Q^\mathrm{op}$ and renumbering vertices according to permutation $(14)(23)$ results in the same quiver $Q$ with the label $m$ swapped with $s$ (and $m+q$ swapped with $s+q$). Now observe that taking the opposite commutes with mutations, and $Q^\mathrm{op}$ satisfies the conditions (1)--(4) if and only if $Q$ does. Therefore, checking the mutation in, say, $Q_3$ is equivalent to checking the mutation in $Q_1$. \medskip \noindent {\bf 1. Mutation in $Q_1$.} We will first check the mutation $\mu_1(Q)$. Depending on various values of $k,q,m,s$ and $n$, the quiver obtained is of one of the two forms shown in Fig.~\ref{mu_1} (in the figure we first show the mutation and then redraw the same quiver in the standard form). In computing the new weights of arrows we apply parts (4) and (5) of Corollary~\ref{cor3} and use the assumption $s+m+k+q=2n+1$. Notice also that we obtain a weight $s-q$ (and not $q-s$) as $s\ge q$ in view of assumption (4). \begin{figure}[!h] \psfrag{k}{\normalsize $k$} \psfrag{q}{\normalsize $q$} \psfrag{m}{\normalsize $m$} \psfrag{s}{\normalsize $s$} \psfrag{m+q}{\small $m+q$} \psfrag{m+q.}{\scriptsize $m+q$} \psfrag{s+q}{\normalsize $s+q$} \psfrag{m+2q>=n+1}{\normalsize $m+2q\ge n+1$} \psfrag{m+2q<=n}{\normalsize $m+2q\le n$} \psfrag{mu1}{\normalsize $\mu_1$} \psfrag{s+k-q}{\small $s\!+\!k\!-\!q$} \psfrag{s+k-q.}{\scriptsize $s\!+\!k\!-\!q$} \psfrag{m+2q}{\small $m+2q$} \psfrag{m+2q.}{\scriptsize $m+2q$} \psfrag{s-q}{\small $s\!-\!q$} \psfrag{s-q.}{\scriptsize $s\!-\!q$} \epsfig{file=./pic/mut1.eps,width=0.99\linewidth} \caption{First mutation. } \label{mu_1} \end{figure} \smallskip \noindent {\it \underline{Case 1a}: $m+2q\le n$.} As follows from Fig.~\ref{mu_1}, the result of this mutation is still a quiver having the standard form shown in Fig.~\ref{standard} with the new values of labels $$ k'=k, \qquad q'=q, \qquad s'=s-q, \qquad m'=m+q. $$ We now need to check properties (1)--(4) for $k',q',s',m'$ (using the ones for $k,q,s,m$). We denote by (1)', (2)' etc the corresponding conditions for the mutated quiver. The properties (1)'--(3)' for $k',q',s',m'$ follow immediately from the ones for $k,q,s,m$. Now, we need to check (4)'. First, $s',m'>0$ (otherwise $s=q$, so $m+2q=m+s+q=2n+1-k> n$ which contradicts the assumption of the Case 1a). Next, we rewrite (4)' for $k',q',s',m'$ in terms of the old values: $$q\le s-q,\ m+q\le n-q$$ and prove these four inequalities. It is clear that $q\le m+q$ and $s-q\le n-q$. The inequality $m+q\le n-q$ also holds as $m+2q\le n$ by the assumption of Case 1a. Finally, to prove $q\le s-q$, assume the contrary, i.e. $s-q<q$, and hence $s<2q$. This implies $s+m<2q+m\le n$ (again, by the assumption of Case 1a), i.e. $s+m<n$. However, (1) and (3) imply that $s+m=2n+1-(k+q)=n$ or $n+1$, so we come to a contradiction. \smallskip \noindent {\it \underline{Case 1b}: $m+2q\ge n+1$.} The new values of the labels are $$ k'=m+q, \qquad q'=s-q, \qquad s'=k, \qquad m'=q. $$ Now, we verify properties (1)'--(4)' for $k',q',s',m'$: \begin{itemize} \item[(1)':] $k'+q'=m+s=2n+1-(k+q)$, and hence is equal to either $n$ or $n+1$. \item[(2)':] We need to check that $m+q>\frac{n}{2}\ge s-q$. The first of these inequalities follows from $$m+q=m+2q-q\ge n+1-q\ge n+1-\frac{n}{2}=\frac{n}{2}+1,$$ while the second one follows from $$s-q=(s+m)-(m+q)\le n+1-(\frac{n}{2}+1)=\frac{n}{2}. $$ \item[(3)':] $s'+m'+q'+k'=m+s+q+k=2n+1.$ \item[(4)':] First, $s',m'>0$ as $q>0$ in view of the assumption $m+2q\ge n+1$ and property (4) for $k,q,s,m$. Next, we check that $$ s-q\le k,q \le n-(s-q) $$ as follows: \begin{itemize} \item[($\alpha$)] As shown in the proof of (2)', $s-q\le \frac{n}{2}$. Thus, $s-q\le\frac{n}{2}\le k$. \item[($\beta)$] If $s-q>q$ then $s>2q$, which implies $m+s>m+2q\ge n+1$ in contradiction to (3). Hence, $s-q\le q$. \item[($\gamma$)] To show $k\le n-(s-q)$ consider two cases: $k=n-q$ and $k=n+1-q$ (one of them holds by (1)). If $k=n-q$ then $k+2q= n+q$ and hence $k+s\le k+2q = n+q$ (as $s\le 2q$ in view of part ($\beta$) above), which implies $k\le n-(s-q)$. If $k=n+1-q$ then $s< 2q$ (otherwise, $m+s\ge m+2q\ge n+1$ by the assumption of the case 1b, this would imply $k+q=n$ in contradiction to the assumption $k=n+1-q)$). Therefore, $k+s<k+2q= n+1+q$. This means $k<n-(s-q)+1$, and thus $k\le n-(s-q)$ as required. \item[($\delta$)] The inequality $q\le n-(s-q)$ follows from $(\gamma)$ and $q\le k$. \end{itemize} \end{itemize} \medskip \noindent {\bf 2. Mutation in $Q_2$.} Now, we need to check the mutation $\mu_2(Q)$. We follow the same scheme as before: consider two cases as shown in Fig.~\ref{mu_2} (again, we apply Corollary~\ref{cor3} and the assumption that $s+m+k+q =2n+1$ to compute the new weights of some arrows). Notice also that we obtain a weight $k-m$ (rather than $m-k$) as otherwise $m>k$ would by (1) imply $m+q>k+q\ge n$, and hence $m>n-q$ which contradicts (4). \begin{figure}[!h] \psfrag{k}{\normalsize $k$} \psfrag{q}{\normalsize $q$} \psfrag{m}{\normalsize $m$} \psfrag{s}{\normalsize $s$} \psfrag{s+q}{\small $s+q$} \psfrag{m+q}{\small $m+q$} \psfrag{m+q.}{\scriptsize $m\!+\!q$} \psfrag{k-m}{\normalsize $k\!-\!m$} \psfrag{k-m.}{\scriptsize $k\!-\!m$} \psfrag{2m+q>=n+1}{\normalsize $2m+q\ge n+1$} \psfrag{2m+q<=n}{\normalsize $2m+q\le n$} \psfrag{mu2}{\normalsize $\mu_2$} \psfrag{s+k-q}{\small $s\!+\!k\!-\!q$} \psfrag{s+k-q.}{\scriptsize $s\!+\!k\!-\!q$} \psfrag{2m+q}{\small $2m+q$} \psfrag{m+2q.}{\scriptsize $m+2q$} \psfrag{s+k-m}{\small $s\!+\!k\!-\!m$} \psfrag{s-q.}{\scriptsize $s\!-\!q$} \epsfig{file=./pic/mut2.eps,width=0.99\linewidth} \caption{Second mutation. } \label{mu_2} \end{figure} \smallskip \noindent {\it \underline{Case 2a}: $2m+q\le n$.} The new weights of arrows in the standard form are $$k'=s, \qquad q'=m, \qquad s'=m+q, \qquad m'=k-m.$$ The conditions (1)'--(4)' are verified as follows: \begin{itemize} \item[(1)'] $k'+q'=s+m=n+1-(k+q)$ equals either $n$ or $n+1$ as it should. \item[(2)'] We need to show $s>\frac{n}{2}\ge m$. We start with the latter by noticing that the assumption of Case 2a implies $2m\le n-q$, and hence $2m\le n$, i.e. $m\le \frac{n}{2}$. Now, $s+m\ge n$ (see the proof of (1)'), so we see that $s\ge n-m\ge \frac{n}{2}$ (where the second inequality makes use of $m\le \frac{n}{2}$ shown above). If $s> \frac{n}{2}$ we are done, otherwise, $s=\frac{n}{2}$ which implies $m=\frac{n}{2}$ and $q=0$ (as $2m\le n-q$). Hence, $k=n$, which by (3) means $s+m=n+1$ in contradiction to $s+m=\frac{n}{2}+\frac{n}{2}=n$. \item[(3)'] $s'+m'=k+q$ equals either $n$ or $n+1$ by (1). \item[(4)'] The conditions $s',m'>0$ hold as $s'=m+q\ge m>0$ by (4) and $m'=k-m>0$ as $k>n/2$ by (1) and $m\le n/2$ by (2)'. Another set of inequalities rewrites as $$ m\le m+q,k-m\le n-m$$ and can be proved as follows: \begin{itemize} \item[($\alpha$)] Clearly, $m\le m+q$. \item[($\beta$)] By the assumption of Case 2a, $2m+q\le n$, hence, $m+q\le n-m$. \item[($\gamma$)] $k-m\le n-m$ as $k\le n$. \item[($\delta$)] We need to show $m\le k-m$ which is equivalent to $2m\le k$. Suppose the contrary, i.e. $k<2m$, then applying (1) and the assumption of Case 2a we have $n\le k+q< 2m+q\le n$ which is impossible. \end{itemize} \end{itemize} \smallskip \noindent {\it \underline{Case 2b}: $2m+q\ge n+1$.} The new weights of arrows in the standard form are $$k'=m+q, \qquad q'=k-m, \qquad s'=m, \qquad m'=s.$$ The computations in this case are a bit more involved than before: \begin{itemize} \item[(1)'] $k'+q'=k+q$, hence, it is still equal to either $n$ or $n+1$. \item[(2)'] We need to show $m+q>\frac{n}{2}\ge k-m$. The first of these inequalities is obtained (using the assumption of Case~2b) as follows: $$m+q=\frac{2m+2q}{2}\ge \frac{2m+q}{2}\ge \frac{n+1}{2}>\frac{n}{2}. $$ To prove the second inequality, we apply the assumption of Case~2b again and compute \begin{multline*} \phantom{asdasdasd} k-m\le k-\frac{n+1-q}{2}=k+\frac{q}{2} -\frac{n+1}{2}=\\=k+q -\frac{n+1}{2}- \frac{q}{2}\le n+1 -\frac{n+1}{2}- \frac{q}{2} =\frac{n}{2}+\frac{1}{2}-\frac{q}{2}, \end{multline*} which gives the required inequality if $q>0$. If $q=0$ then by (1) we have $k=n$. Also, the assumption of Case~2b then reads as $m\ge \frac{n+1}{2}$. Therefore, $$k-m\le n- \frac{n+1}{2}= \frac{n-1}{2}< \frac{n}{2},$$ as required. \item[(3)'] $(m+q)+(k-m)+m+s=k+q+m+s=2n+1$ as required. \item[(4)'] The inequalities $s',m'>0$ hold as $s'=m>0$, $m'=s>0$. The inequalities $$ k-m\le m,s \le n-k+m$$ can be checked as follows: \begin{itemize} \item[($\alpha$)] $m\le n-k+m$ as $k\le n$. \item[($\beta$)] $k-m\le m$ as otherwise $k>2m$ which (together with the assumption of Case~2b) implies $k+q>2m+q\ge n+1$ which contradicts (1). \item[($\gamma$)] $k-m\le s$ as otherwise $s<k-m$, implying $s+m<k$; by (1) and (3) this means $n\le s+m<k$, i.e. $n<k$ which is impossible. \item[($\delta$)] To show $s\le n-k+m$ assume the contrary, i.e. $k> m+n-s$, then $$\phantom{asdasdaaa} k+q>m+n+q-s=(2m+q)-m+n-s\ge n+1-(m+s)+n, $$ which implies that $k+q+m+s>2n+1$ in contradiction to (3). \end{itemize} \end{itemize} As no of the two mutations takes the quiver away from the (finite) set of quivers having the standard form described by Fig.~\ref{standard} and conditions (1)--(4), we conclude that the mutation class is finite. \end{proof} Using very similar computations we prove the following lemma. \begin{lemma} \label{even families} The quivers shown on the left and in the middle of Fig.~\ref{ser} are mutation-finite for every $n \in\{2, 3, . . . \}$. \end{lemma} To prove this lemma we use exactly the same standard form of the quivers (see Fig.~\ref{standard}) together with a marginal variation of the set of conditions (see Table~\ref{conditions}). These variations (as well as different shapes of quivers) are due to different parity of the denominator: there is one mutation class for every $n\ge 2$ with odd denominator $2n+1$, while in the case of the even denominator $2n$ the set of quivers splits into two mutation classes for every $n$ (see also Proposition~\ref{ser:classes}). \begin{center} \begin{table} \caption{Conditions for three families} \label{conditions} {\tabulinesep=1.2mm \begin{tabu}{|l||c|c|c|} \hline &\multicolumn{2}{c|}{denominator=$2n$} & denominator= $2n+1$\\ & \epsfig{file=./pic/fam1.eps,width=0.05\linewidth} & \epsfig{file=./pic/fam2.eps,width=0.05\linewidth}& \epsfig{file=./pic/fam3.eps,width=0.05\linewidth}\\ \hline \hline (1) &$k+q\in \{n-1,n+1\}$ & $k+q=n$& $k+q\in \{n,n+1\}$ \\ \hline (2) &$k\ge [\frac{n}{2} ]\ge q $& $k\ge [\frac{n}{2}]\ge q$& $k> \frac{n}{2}\ge q$ \\ \hline (3) &$s+m+k+q=2n$ & $s+m+k+q=2n$& $s+m+k+q=2n+1$\\ \hline (4) &$q\le s,m\le n-q$ & $q\le s,m\le n-q$ &$q\le s,m\le n-q$ \\ &$0<s,m$ & $0<s,m$ & $0<s,m$ \\ \hline \end{tabu}} \end{table} \end{center} \begin{prop} \label{ser:classes} If $Q$ is a quiver in the standard form (as in Fig.~\ref{standard}) satisfying the conditions as in Table~\ref{conditions}, then $Q$ is mutation-finite. Moreover, two such quivers belong to the same mutation class if and only if they have the same denominator and satisfy the same set of conditions. \end{prop} \begin{proof} From the proof of Lemmas~\ref{odd family} and~\ref{even families} we see that applying mutations to any quiver $Q$ represented in the standard form and satisfying one of the three versions of the conditions we always obtain quivers of the same family. As each family is finite for any given $n$, this shows mutation-finiteness of $Q$. We are left to discuss which quivers belong to the same class. It is clear that quivers with different denominators (or with the same even denominator but different sets of conditions) belong to different mutation classes. On the other hand, by Theorem~\ref{thm: ser} every mutation-finite high denominator quiver is mutation equivalent to one of the quivers in Fig.~\ref{ser}. So, quivers with the same invariants (i.e. the same denominator and the same set of conditions) are mutation-equivalent, while quivers with different invariants are not. \end{proof} This concludes the proof of Theorem~\ref{intro1}. \section{Geometric realization for finite mutation classes} \label{sec real} In this section we will show that every non-integer mutation-finite mutation class (except, possibly, for ones of the orbifold type) admits a geometric realization by reflections in some positive semi-definite quadratic space $V$. This will allow us to define a notion of a $Y$-seed and the finite, affine and extended affine types of quivers. First, we briefly recall the necessary details from~\cite{FT-rk3,roots}. \begin{definition} Let $B$ be an $n\times n$ skew-symmetric matrix corresponding to a quiver $Q$, and let $V$ be a real quadratic space. We say that a tuple of vectors ${\bf v}=(v_1,\dots,v_n)$ is a {\it geometric realization} of $Q$ if the following conditions hold: \begin{itemize} \item[(1)] $(v_i,v_i)=2$ for $i=1,\dots,n$, $|(v_i,v_j)|=|b_{ij}|$ for $1\le i<j\le n$; \item[(2)] if $Q_{i_1,i_2,i_3}$ is a cycle, then the number of pairs $(j,k)$ such that $(v_{i_j},v_{i_k})>0$ is even if $Q_{i_1,i_2,i_3}$ is acyclic and odd if $Q_{i_1,i_2,i_3}$ is cyclic. \end{itemize} A {\em mutation} $\mu_k$ of ${\bf v}$ is defined by partial reflection: $$ \mu_k(v_j)=\begin{cases} v_j-(v_j,v_k)v_k & \text{if $b_{jk}>0$,}\\ -v_k & \text{if $j=k$,}\\ v_j& \text{otherwise.}\end{cases} $$ We say that $\bf v$ provides a {\it realization by reflections} of the mutation class of $Q$ if the mutations of $\bf v$ agree with the mutations of $Q$, i.e. if conditions $(1)$--$(2)$ are satisfied after every sequence of mutations. \end{definition} We recall that every acyclic integer quiver admits a realization by reflections~\cite{S2,ST}. Following~\cite{S}, we give the following definition. \begin{definition} A geometric realization of a quiver $Q$ by vectors ${\bf v}=\{v_1,\dots,v_n\}$ is {\it admissible} if for every chordless oriented cycle $Q_{i_1},\dots, Q_{i_s}$ of $Q$ the number of positive scalar products $(v_{i_j},v_{i_{j+1}})$ is odd, while in every chordless non-oriented cycle such a number is even. A geometric realization of a mutation class is admissible if the realization of every quiver is admissible. \end{definition} We will start by showing that every non-orbifold finite mutation class of non-integer quivers has a representative possessing an admissible geometric realization. \begin{lemma} \label{initial} Every quiver shown in Table~\ref{table mut-fin} has an admissible geometric realization. \end{lemma} \begin{proof} Every quiver listed in Table~\ref{table mut-fin} is of one of the following three types: \begin{itemize} \item[-] either the rank is $3$ (and then it is $\widetilde G_{2,n}$ or $H_3$) \item[-] or it is acyclic; \item[-] or it has a double arrow, and by removing either end of the double arrow we obtain an acyclic quiver (the two acyclic quivers are the same up to one source/sink mutation). \end{itemize} Quiver $\widetilde G_{2,n}$ is mutation-acyclic of rank $3$, and thus has an admissible realization by~\cite{FT-rk3}. For an acyclic quiver $Q$, we define inner product on vectors $v_1,\dots,v_n$ by $(v_i,v_i)=2$, $(v_i,v_j)=-w_{ij}$, where $w_{ij}$ is the weight of the arrow $Q_{ij}$. Clearly, ${\bf v}=\{v_1,\dots, v_n\}$ is an admissible realization of $Q$. For the last type of quivers, assume that the ends of the double arrow are $Q_1$ and $Q_n$. We take the acyclic subquiver $Q'$ obtained by removing $Q_n$, define inner product on vectors $v_1,\dots,v_{n-1}$ for the acyclic subquiver $Q'$ as described above, and then define $(v_n,v_n)=2$, $(v_n,v_i)=(v_1,v_i)$ for $i<n$. Then ${\bf v}=\{v_1,\dots, v_n\}$ is an admissible realization of $Q$. \end{proof} \begin{remark} \label{rem x5} The condition that $Q$ is not of orbifold type is necessary for Lemma~\ref{initial}: it is easy to check that already the surface quiver shown in Fig.~\ref{x5}(a) has no admissible geometric realization. This quiver defines a triangulation of a once punctured annulus, another representative of the same mutation class is shown in Fig.~\ref{x5}(b). \end{remark} \begin{figure}[!h] \psfrag{a}{\small (a)} \psfrag{b}{\small (b)} \epsfig{file=./pic/x5.eps,width=0.55\linewidth} \caption{The surface quiver (a) has no admissible geometric realization.} \label{x5} \end{figure} \begin{theorem} \label{realisation} Let $Q$ be a real mutation-finite quiver of rank higher than $3$ not originating from an orbifold. Then the mutation class of $Q$ admits a geometric realization by reflections in a positive or semi-positive quadratic space $V$. In particular, the quadratic from has the kernel of dimension \begin{itemize} \item[-] zero for quivers in the top row of Table~\ref{table mut-fin}; \item[-] one for quivers in the middle row of Table~\ref{table mut-fin}; \item[-] two for quivers in the bottom row of Table~\ref{table mut-fin}. \end{itemize} \end{theorem} \begin{proof} In Lemma~\ref{initial} we have constructed geometric realizations for representatives of required mutation classes, so we only need to show that these geometric realizations can be extended to the whole mutation classes. For rank $3$ mutation classes we know the result from~\cite{FT-rk3}. For the three series in rank $4$ this will be done in Section~\ref{geom for ser}. Other mutation classes are treated case-by-case. The case-by-case check is done via a code which verifies that the realization of the initial quiver propagates as a realization of the whole mutation class. The algorithm is the following: we apply a mutation to a quiver and the partial reflections to the corresponding set of vectors (i.e., mutate the Gram matrix according to the rules prescribed in~\cite{BGZ}), and then verify that the mutated Gram matrix provides an admissible realization of the mutated quiver. Notice that the mutated Gram matrix only depends on the initial Gram matrix and the directions of arrows in the corresponding quiver before the mutation, but does not depend on the actual vectors $v_1,\dots, v_n$. The code checks that in each of the (non-serial) finite mutation classes the pair (Gram matrix; exchange matrix) takes only finitely many values and the entries in the Gram matrix and the exchange matrix agree, i.e. $|(v_i,v_j)|=|b_{ij}|$ for $i\ne j$. The values of the dimension of the kernel can be easily seen from the initial construction in Lemma~\ref{initial}. \end{proof} \begin{remark} \label{unpunctured} It follows from Remark~\ref{rem x5} that already the mutation class of a quiver originating from a punctured annulus (see Fig.~\ref{x5}) does not have an admissible realization by reflections. This implies that any non-acyclic mutation class of a punctured surface or orbifold does not possess an admissible realization by reflections. However, there is a strong evidence for the following conjecture. \end{remark} \begin{conjecture} Every mutation class originating from an unpunctured surface or orbifold admits a realization by reflections. \end{conjecture} \subsection{Geometric realizations for rank $4$ series} \label{geom for ser} In rank $4$ we have infinitely many finite mutation classes whose sizes are not uniformly bounded, so we are not able to apply a computer verification. We start with proving the following technical lemma. \begin{lemma} \label{empty arrow} Let $Q$ be a quiver mutation-equivalent to one of the quivers in Fig.~\ref{ser}. If $Q$ has a vanishing arrow then $Q$ is one of the quivers shown in Fig.~\ref{f_empty_arrows}. \end{lemma} \begin{proof} $Q$ can have a vanishing arrow in the only case when the highest denominator of $Q$ is even, and hence $Q$ is mutation-equivalent to the quiver on the left or in the middle of Fig.~\ref{ser}. For each of these quivers (considered in the standard form) we check which arrows can vanish (we use the conditions shown in Table~\ref{conditions} for that; an arrow marked $x/2n$ vanishes if and only if $x=n$). In particular, condition (2) implies that $q\ne n$. Further, if $k=n$ then the conditions imply that no other arrow vanish, and moreover, the quiver is as on Fig.~\ref{f_empty_arrows}(a) or (e). If $k\ne n$ we check the case $m=n$ and get the quiver on Fig.~\ref{f_empty_arrows}(b) (there are no such quivers in the other mutations class). The same (up to symmetry) will happen if $s=n$. Finally, if $k,m,s\ne n$ and $m+q=n$ we obtain the quivers in Fig.~\ref{f_empty_arrows}(c) and (f). If, in addition, we require $s+q=n$, we get the quivers shown in Fig.~\ref{f_empty_arrows}(d) and (g). \end{proof} \begin{figure}[!h] \psfrag{a}{\small (a)} \psfrag{b}{\small (b)} \psfrag{c}{\small (c)} \psfrag{d}{\small (d)} \psfrag{e}{\small (e)} \psfrag{f}{\small (f)} \psfrag{g}{\small (g)} \psfrag{s<m}{\scriptsize $s<m$} \psfrag{s+m=n+1}{\scriptsize $s+m=n+1$} \psfrag{s+m=n}{\scriptsize $s+m=n$} \psfrag{s+m=n-1}{\scriptsize $s+m=n-1$} \psfrag{n-1/2}{\scriptsize $\frac{n-1}{2}$} \psfrag{n+1/2}{\scriptsize $\frac{n+1}{2}$} \psfrag{n/2}{\scriptsize $\frac{n}{2}$} \psfrag{n-m+s}{\scriptsize $n-m+s$} \psfrag{n-m}{\scriptsize $n-m$} \psfrag{n-s}{\scriptsize $n-s$} \psfrag{1}{\scriptsize $1$} \psfrag{n-1}{\scriptsize $n-1$} \psfrag{2s}{\scriptsize $2s$} \psfrag{m}{\scriptsize $m$} \psfrag{s}{\scriptsize $s$} \psfrag{m+1}{\scriptsize $m+1$} \psfrag{s+1}{\scriptsize $s+1$} \epsfig{file=./pic/empty-arrows.eps,width=0.99\linewidth} \caption{Quivers with vanishing arrows: (a)--(d) and (e)--(g) belong to two different mutation classes respectively, cf. Table~\ref{conditions}. } \label{f_empty_arrows} \end{figure} \begin{lemma} \label{series-geom} Let $Q$ be a quiver in its standard form (see Fig.~\ref{standard}) and $\mathbf v\!=\!\{v_1,\dots,v_4\}\!\subset\! V$ its admissible geometric realization. Then for every $i\in\{1,\dots,4 \}$ the collections of vectors $ \mu_i(\mathbf v)$ provide geometric realizations of $\mu_i(Q)$. \end{lemma} \begin{proof} The proof is by induction on the number of mutations needed to reach a given quiver $Q$ from the initial quiver $\hat Q$ shown in Fig.~\ref{ser}. We start with a quiver shown in Fig.~\ref{ser} and consider its admissible geometric realization $\hat{\bf v}$ constructed in Lemma~\ref{initial}. Given a quiver $Q$ in the mutation class and its admissible realization $\bf v$, we will apply all four possible mutations (mutating the set of vectors using partial reflections) and check that the mutated set of vectors $\bf v'=\mu(\bf v)$ provides an admissible geometric realization for the mutated quiver $Q'=\mu(Q)$ (note that, as in Lemma~\ref{odd family}, we actually need to check only two mutations, the other two follow from a symmetry of the quiver provided by taking $Q^\mathrm{op}$ with a permutation of vertices). Since $\bf v$ is an admissible realization for $Q$, we conclude that $\bf v'$ is a geometric realization for $Q'$ (see~\cite[Proposition 3.2]{BGZ}), and we only need to show that $\bf v'$ is an {\it admissible} geometric realization for $Q'$. We start checking the admissibility of $\bf v'$ by considering the case of odd denominator: this will be the easiest case as no quiver in the mutation class has vanishing arrows. \medskip \noindent {\bf Case 1: odd denominators.} We label an arrow $Q_{ij}$ of $Q$ by ``$+$'' (resp. ``$-$'') if $(v_i,v_j)$ is positive (resp. negative). Applying a mutation $\mu_i$ we compute the new sign labels as follows. First, we compute the new labels of all arrows $Q_{ij}'$ incident to $Q_i$: these labels easily follow from the mutation rule (which says that either both vectors are reflected in $v_i$ and, hence, the sign is preserved, or only $v_i$ is substituted by its negative, and then the sign changes to the opposite). The label for an arrow $Q_{lj}'$ non-incident to $i$ is computed from the triangle $Q_{ijl}'$: namely, the number of arrows labeled by ``$+$'' in $Q_{ijl}'$ should be even if and only if $Q_{ijl}'$ is cyclic by~\cite{FT-rk3}. When all labels are computed, we check the rank $3$ subquiver $Q'\setminus Q_i'$ and see that the labeling is also admissible on this rank $3$ subquiver, see Fig.~\ref{signs}. This implies that $\bf v' $ is an admissible realization for $Q'$ (indeed, in the assumption of odd denominator we only need to check cycles of length $3$). Notice that as all quivers in the mutation class are ones in the standard form and no arrow vanishes from it, mutations considered in Fig.~\ref{signs} exhaust all possibilities for the case of odd denominator (here, we use the two possible forms of mutated quiver explored in the proof of Lemma~\ref{odd family}, see Figs.~\ref{mu_1} and~\ref{mu_2}) \begin{figure}[!h] \psfrag{-}{\color{red} $\mathbf -$} \psfrag{+}{\color{red} $\mathbf +$} \psfrag{1}{\scriptsize $1$} \psfrag{2}{\scriptsize $2$} \psfrag{3}{\scriptsize $3$} \psfrag{4}{\scriptsize $4$} \psfrag{mu1}{\small $\mu_1$} \psfrag{mu2}{\small $\mu_2$} \epsfig{file=./pic/signs.eps,width=0.99\linewidth} \caption{Mutating signs for odd denominators. For each mutation we consider two cases (depending on the weights of arrows, see Figs.~\ref{mu_1} and~\ref{mu_2}). } \label{signs} \end{figure} \medskip \noindent {\bf Case 2: even denominators.} We follow exactly the same plan as for odd denominator, however, we need to consider the quivers with some vanishing arrows separately (as in this case we need to take additional care while mutating the sign labels). In Lemma~\ref{empty arrow} we list the quivers with vanishing arrows appearing in the considered mutation classes. Given a quiver $Q$ from one of the two series, we need to do the following: \begin{itemize} \item[(1)] if $Q$ has no vanishing arrows and ${\bf v}$ is an admissible geometric realization of $Q$, then we need to check the admissibility of the realization $\mu({\bf v})$; \item[(2)] if $Q$ has vanishing arrows, $\bf v$ is an admissible geometric realization of $Q$ and $Q'=\mu(Q)$, then we need to check whether ${\bf v'}=\mu(\bf v)$ is a geometric realization of $Q'$, and whether it is admissible. \end{itemize} In the first of these checks the condition for cycles of length $3$ is verified by the same computation as before, however, we need to check also cycles of length $4$ (as $\mu(Q)$ may have vanishing arrows). As we can see from the list in Fig.~\ref{f_empty_arrows}, a length $4$ chordless cycle is always oriented (for quivers in these mutation classes). As one can check in Fig.~\ref{signs}, an oriented cycle of length $4$ always receives an odd number of labels ``$+$'', even when this cycle is not a chordless one. This verifies the condition for cycles of length $4$, and hence we can assume that $Q$ has at least one vanishing arrow. To complete the second check above, we need to mutate the quiver. As before, we label the arrows of $Q$ with ``$+$'' and ``$-$'' in an admissible way (which exists by the induction assumption). Note that for each of the quivers in the list there is a unique way to choose such a labeling (up to changing signs of some of vectors $v_1,\dots,v_4\in \bf v$). We will only need to look at the mutations in the directions of vertices incident to some vanishing arrows (all other mutations are treated in exactly the same way as before). Also, we do not need to check the mutations with respect to sink or source as they do not change signs in any oriented cycle and change exactly two signs in a non-oriented one. Furthermore, we will use symmetries of quivers (and the symmetry up to taking $Q^\mathrm{op}$) to reduce the computations. This reduces the list of cases to the one in Fig.~\ref{signs-even}. To compute the signs after mutation $\mu_i$ we do the following. First, we compute the signs of all arrows incident to $Q_i$ as before. Then, we compute the signs of all arrows $Q'_{jl}$ where both $Q_j$ and $Q_l$ are connected to $Q_i$ by a non-vanishing arrow. All the other signs remain intact (indeed, if both $Q_j$ and $Q_l$ are not joined to $Q_i$ then $v_j=v'_j$ and $v_l=v'_l$; if the arrow $Q_{ij}$ vanishes and $Q_{il}$ does not, then $v_j=v'_j$, while $v_l'$ may either coincide with $v_i$ or computes as $v_l'=v_l-(v_i,v_l)v_i$, in both cases we have $(v_j',v_l')=(v_j,v_l)$). The computation shows that $\bf v'$ is an admissible realization of $Q'$. \end{proof} \begin{figure}[!h] \psfrag{-}{\color{red} \tiny $\mathbb -$} \psfrag{+}{\color{red} \tiny $\mathbb +$} \psfrag{1}{\scriptsize $1$} \psfrag{2}{\scriptsize $2$} \psfrag{3}{\scriptsize $3$} \psfrag{4}{\scriptsize $4$} \psfrag{mu1}{\small $\mu_1$} \psfrag{mu2}{\small $\mu_2$} \epsfig{file=./pic/signs-even_.eps,width=0.99\linewidth} \caption{Mutating signs: additional mutations for even denominators. } \label{signs-even} \end{figure} \begin{remark} \label{seeds} Once we have geometric realization of a mutation class by reflections, we can introduce a $Y$-seed as a collection of mirrors of reflections together with the corresponding quiver (as in~\cite{FT-rk3,roots}). Then the notion of {\em finite type} makes sense, and it is easy to see that a quiver is of finite type if and only if the corresponding reflection group is finite. \end{remark} \section{Acyclic quivers and acute-angled simplices } \label{sec acyclic} For non-integer quivers of finite or affine type, geometric realization constructed in Lemma~\ref{initial} defines an acute-angled simplex bounded by the mirrors of reflections of the corresponding finite or affine Coxeter group ($B_n$, $F_4$, $H_{2}$, $H_3$, $H_4$ or $G_2^{n}$ and affine versions of them). It is natural to ask the following two questions: \begin{itemize} \item[(1)] Given a mutation-finite acyclic quiver, does it always correspond to an acute-angled simplex defined by the geometric realization (up to a change of signs of some of the vectors $v_i$)? \item[(2)] Given an acute-angled simplex defined by some roots of a root system in $V$, does it give rise to a realization of a mutation-finite quiver? \end{itemize} Notice that in rank $3$ the answers to both of these questions are positive, see~\cite{FT-rk3}. Moreover, for integer quivers this also holds: in finite (respectively, affine) types $A$, $B$, $C$, $D$, $E$, $F$ and $G$ every acyclic quiver defines an acute-angled spherical (respectively, Euclidean) Coxeter simplex, and any acyclic orientation of a Coxeter diagram of a Coxeter simplex gives rise to a mutation-finite quiver. We will now see that the situation in the general case is more involved. \subsection{Acute-angled simplices for all acyclic representatives} The answer to the first question is positive also in the general non-integer case. We have checked it case-by-case (but we have no conceptual proof at the moment). In Table~\ref{t acyclic} we list all acyclic quivers (up to sink-source mutations) in the mutation classes containing more than one acyclic representative. \begin{center} \begin{table} \caption{Acyclic quivers in finite mutation classes containing more than one acyclic representative (up to sink/source mutations)} \label{t acyclic} {\tabulinesep=1.2mm \begin{tabu}{|ccc|ccc|} \hline \multicolumn{3}{|c|}{Finite type} & \multicolumn{3}{c|}{Affine type} \\ \hline \raisebox{10pt}[0pt][0pt]{$H_3'$}& \raisebox{10pt}[0pt][0pt]{\epsfig{file=./pic/a3.eps,width=0.08\linewidth}\put(-30,8){\tiny\color{blue} $\frac{2}{5}$}} & \epsfig{file=./pic/ac1.eps,width=0.05\linewidth}\put(-19,24){\tiny\color{blue} $\frac{2}{5}$}\put(-19,0){\tiny\color{blue} $\frac{2}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}& \raisebox{10pt}[0pt][0pt]{ $\widetilde H_3$}& \epsfig{file=./pic/h3-aff1.eps,width=0.06\linewidth}\put(-35,14){\tiny\color{blue} $\frac{1}{5}$}\put(-17,-6){\tiny\color{blue} $\frac{2}{5}$} & \epsfig{file=./pic/ac3.eps,width=0.09\linewidth}\put(-10,1){\tiny\color{blue} $\frac{2}{5}$}\put(-10,25){\tiny\color{blue} $\frac{2}{5}$}\put(-19,12){\tiny\color{blue} $\frac{2}{5}$}\\ \hline \raisebox{10pt}[0pt][0pt]{ $H_3''$}&\raisebox{10pt}[0pt][0pt]{\epsfig{file=./pic/a3.eps,width=0.08\linewidth}\put(-30,8){\tiny\color{blue} $\frac{1}{5}$}\put(-15,8){\tiny\color{blue} $\frac{2}{5}$} }& \epsfig{file=./pic/ac1.eps,width=0.05\linewidth}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$} & \raisebox{10pt}[0pt][0pt]{$\widetilde H_3'$}& \epsfig{file=./pic/h3-aff2.eps,width=0.06\linewidth}\put(-18,-6){\tiny\color{blue} $\frac{1}{5}$}\put(0,14){\tiny\color{blue} $\frac{2}{5}$}\put(-35,14){\tiny\color{blue} $\frac{2}{5}$} & \epsfig{file=./pic/ac3_.eps,width=0.09\linewidth}\put(-10,1){\tiny\color{blue} $\frac{2}{5}$}\put(-10,25){\tiny\color{blue} $\frac{2}{5}$}\put(-19,12){\tiny\color{blue} $\frac{2}{5}$}\\ \hline \hline \raisebox{12pt}[0pt][0pt]{ $H_4'$}&\raisebox{12pt}[0pt][0pt]{\epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{2}{5}$}} & \epsfig{file=./pic/ac2.eps,width=0.09\linewidth}\put(-19,23){\tiny\color{blue} $\frac{2}{5}$}\put(-19,0){\tiny\color{blue} $\frac{2}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}& \raisebox{12pt}[0pt][0pt]{ $\widetilde H_4$}& \raisebox{13pt}[0pt][0pt]{\epsfig{file=./pic/a5.eps,width=0.15\linewidth}\put(-60,8){\tiny\color{blue} $\frac{2}{5}$}\put(-45,8){\tiny\color{blue} $\frac{1}{5}$}\put(-15,8){\tiny\color{blue} $\frac{2}{5}$}} &\epsfig{file=./pic/ac4.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{2}{5}$}\put(-19,0){\tiny\color{blue} $\frac{2}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-37,20){\tiny\color{blue} $\frac{1}{5}$}\put(-57,20){\tiny\color{blue} $\frac{2}{5}$}\\ \hhline{|---|~~~|} \raisebox{12pt}[0pt][0pt]{ $H_4''$}&\raisebox{12pt}[0pt][0pt]{ \epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{2}{5}$}\put(-30,8){\tiny\color{blue} $\frac{1}{5}$} }& \epsfig{file=./pic/ac2.eps,width=0.09\linewidth}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}& & \epsfig{file=./pic/ac5.eps,width=0.14\linewidth}\put(-55,19){\tiny\color{blue} $\frac{2}{5}$}\put(-22,10){\tiny\color{blue} $\frac{2}{5}$}& \epsfig{file=./pic/ac4.eps,width=0.14\linewidth}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-57,20){\tiny\color{blue} $\frac{2}{5}$} \\ \hhline{|---|~~~|} $\ H_4'''$&\epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{2}{5}$}\put(-15,8){\tiny\color{blue} $\frac{1}{5}$} & & & & \\ & \epsfig{file=./pic/ac2.eps,width=0.09\linewidth}\put(-35,19){\tiny\color{blue} $\frac{1}{5}$}\put(-19,23){\tiny\color{blue} $\frac{2}{5}$}\put(-19,0){\tiny\color{blue} $\frac{2}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}& \epsfig{file=./pic/ac2.eps,width=0.09\linewidth}\put(-19,0){\tiny\color{blue} $\frac{2}{5}$} & & \raisebox{11pt}[0pt][0pt]{\epsfig{file=./pic/ac6.eps,width=0.09\linewidth}\put(-19,24){\tiny\color{blue} $\frac{2}{5}$}\put(-19,0){\tiny\color{blue} $\frac{2}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-45,10){\tiny\color{blue} $\frac{2}{5}$}} & \raisebox{10pt}[0pt][0pt]{\epsfig{file=./pic/ac7.eps,width=0.13\linewidth}\put(-37,13){\tiny\color{blue} $\frac{2}{5}$}\put(-3,13){\tiny\color{blue} $\frac{2}{5}$}\put(-18,34){\tiny\color{blue} $\frac{2}{5}$}\put(-18,-6){\tiny\color{blue} $\frac{2}{5}$}\put(-26,13){\tiny\color{blue} $\frac{2}{5}$}\put(-13,13){\tiny\color{blue} $\frac{2}{5}$}}\\ \hhline{|---|~~~|} \raisebox{10pt}[0pt][0pt]{\ $H_4''''$}&\raisebox{11pt}[0pt][0pt]{\epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{2}{5}$}\put(-30,8){\tiny\color{blue} $\frac{1}{5}$}\put(-15,8){\tiny\color{blue} $\frac{2}{5}$}} & \epsfig{file=./pic/ac2.eps,width=0.09\linewidth}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-35,20){\tiny\color{blue} $\frac{2}{5}$} && \raisebox{-7pt}[0pt][0pt]{ \epsfig{file=./pic/ac9.eps,width=0.115\linewidth}\put(-13,1){\tiny\color{blue} $\frac{2}{5}$}\put(-13,25){\tiny\color{blue} $\frac{2}{5}$}\put(-22,12){\tiny\color{blue} $\frac{2}{5}$}} &\raisebox{-7pt}[0pt][0pt]{\epsfig{file=./pic/ac8.eps,width=0.13\linewidth}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}} \\ &\epsfig{file=./pic/h3-aff2.eps,width=0.06\linewidth}\put(-33,14){\tiny\color{blue} $\frac{2}{5}$}&\epsfig{file=./pic/ac4-all.eps,width=0.06\linewidth}\put(-33,10){\tiny\color{blue} $\frac{2}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-18,30){\tiny\color{blue} $\frac{2}{5}$}\put(-18,-6){\tiny\color{blue} $\frac{2}{5}$}\put(-22,8){\tiny\color{blue} $\frac{2}{5}$}\put(-13,8){\tiny\color{blue} $\frac{2}{5}$}& && \\ \hline \end{tabu}} \end{table} \end{center} \subsection{Not all acute-angled simplices give rise to mutation-finite acyclic quivers} It turns out that the answer to the second question is negative. By a {\em diagram} of a simplex we will mean a counterpart of a Coxeter diagram, i.e. a weighted graph, where vertices correspond to the facets of the simplex, and the weights $m/d$ of the edges denote the dihedral angles $\pi m/d$ (the edges with label $1/2$ are omitted, the edges corresponding to $\pi/3$ are unlabeled). We have written out the complete list of diagrams of acute-angled simplices in root systems $\widetilde H_3$, $H_4$ and $\widetilde H_4$ and checked that most of these simplices appear as geometric realizations of some mutation-finite acyclic mutation classes. However, there is a number of exceptions: in Table~\ref{acute} we list all (up to sink/source mutations) mutation-infinite acyclic quivers appearing as orientations of diagrams of acute-angled simplices in $\widetilde H_3$, $H_4$ and $\widetilde H_4$. It is currently not clear to us what distinguishes the acute-angled simplices appearing in Tables~\ref{acute} from ones defining mutation-finite quivers, and we think it would be an interesting question to understand the source of this difference. \begin{center} \begin{table} \caption{Mutation-infinite acyclic quivers from acute-angled $H$-simplices (up to sink/source mutations)} \label{acute} {\tabulinesep=1.2mm \begin{tabu}{|lc|lcc|} \hline $H_3$ \qquad &n/a& $\widetilde H_3$ \qquad &\epsfig{file=./pic/ac10.eps,width=0.06\linewidth}\put(-18,-6){\tiny\color{blue} $\frac{1}{5}$}\put(0,14){\tiny\color{blue} $\frac{2}{5}$}\put(-35,14){\tiny\color{blue} $\frac{2}{5}$} &\\ \hline $H_4$ &\epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{1}{5}$}\put(-30,8){\tiny\color{blue} $\frac{2}{5}$}\put(-10,8){\tiny\color{blue} $\frac{1}{5}$} \qquad & $\widetilde H_4$ &\epsfig{file=./pic/a5.eps,width=0.15\linewidth}\put(-60,8){\tiny\color{blue} $\frac{1}{5}$}\put(-15,8){\tiny\color{blue} $\frac{2}{5}$} \qquad &\raisebox{-14pt}{\epsfig{file=./pic/ac4.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{2}{5}$}\put(-19,0){\tiny\color{blue} $\frac{2}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-57,20){\tiny\color{blue} $\frac{1}{5}$}} \qquad\\ &\epsfig{file=./pic/a4.eps,width=0.12\linewidth}\put(-50,8){\tiny\color{blue} $\frac{1}{5}$}\put(-30,8){\tiny\color{blue} $\frac{2}{5}$} & &\epsfig{file=./pic/a5.eps,width=0.15\linewidth}\put(-60,8){\tiny\color{blue} $\frac{1}{5}$}\put(-47,8){\tiny\color{blue} $\frac{2}{5}$}\put(-30,8){\tiny\color{blue} $\frac{1}{5}$}\put(-15,8){\tiny\color{blue} $\frac{2}{5}$} &\raisebox{-14pt}{\epsfig{file=./pic/ac4.eps,width=0.14\linewidth}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-37,20){\tiny\color{blue} $\frac{2}{5}$}\put(-57,20){\tiny\color{blue} $\frac{1}{5}$}}\\ &\raisebox{-4pt}[0pt][0pt]{\epsfig{file=./pic/ac10.eps,width=0.06\linewidth}\put(-18,-6){\tiny\color{blue} $\frac{2}{5}$}} & &\raisebox{-7pt}{\epsfig{file=./pic/ac5.eps,width=0.14\linewidth}\put(-55,19){\tiny\color{blue} $\frac{1}{5}$}\put(-22,10){\tiny\color{blue} $\frac{2}{5}$}\put(-38,-1){\tiny\color{blue} $\frac{2}{5}$}\put(-38,24){\tiny\color{blue} $\frac{2}{5}$}} &\raisebox{-7pt}{\epsfig{file=./pic/ac4.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{2}{5}$}}\\ & \epsfig{file=./pic/h3-aff2.eps,width=0.06\linewidth}\put(-18,-6){\tiny\color{blue} $\frac{2}{5}$} & & \raisebox{8pt}[0pt][0pt]{\epsfig{file=./pic/a5.eps,width=0.15\linewidth}\put(-47,8){\tiny\color{blue} $\frac{1}{5}$}\put(-30,8){\tiny\color{blue} $\frac{2}{5}$}} &\raisebox{8pt}[0pt][0pt]{\epsfig{file=./pic/a5.eps,width=0.15\linewidth}\put(-60,8){\tiny\color{blue} $\frac{1}{5}$}\put(-30,8){\tiny\color{blue} $\frac{2}{5}$}\put(-15,8){\tiny\color{blue} $\frac{1}{5}$}}\\ & & &\raisebox{-20pt}[0pt][20pt]{\epsfig{file=./pic/ac11.eps,width=0.11\linewidth}\put(-17,25){\tiny\color{blue} $\frac{2}{5}$}\put(-40,31){\tiny\color{blue} $\frac{1}{5}$}\put(-54,13){\tiny\color{blue} $\frac{2}{5}$}} &\raisebox{-20pt}[0pt][20pt]{\epsfig{file=./pic/ac12.eps,width=0.11\linewidth}\put(-17,25){\tiny\color{blue} $\frac{2}{5}$}\put(-40,31){\tiny\color{blue} $\frac{1}{5}$}\put(-54,13){\tiny\color{blue} $\frac{2}{5}$}}\\ \hline \end{tabu}} \end{table} \end{center} \begin{remark} Finally, we list some observations concerning the acute-angled simplices and the corresponding quivers. \begin{itemize} \item[(a)] Every acute-angled simplex in $H_3$, $\widetilde H_3$, $H_4$ or $\widetilde H_4$ either is decomposable (i.e., its diagram is disconnected), or is a spherical Coxeter simplex of the type $H_3$ or $H_4$, or has a diagram whose orientation appears either in Table~\ref{t acyclic} or in Table~\ref{acute} (or in both: two distinct acyclic orientations of the same simplex diagram may not be simultaneously mutation finite/infinite). \item[(b)] Notice that when a diagram of a simplex has a cycle of length more than $3$, there are two acyclic orientations of such a diagram up to sink/source mutations. All other diagrams arising from acute-angled simplices have a unique acyclic orientation up to sink/source mutations. \item[(c)] Some of the $\widetilde H_4$-quivers in Table~\ref{acute} are mutation-equivalent. In particular, this is the case for the two quivers shown in the first, second and the third rows (see Fig.~\ref{mut} for the sequences of mutations). \item[(f)] Acute-angled simplices in finite types are also listed in~\cite{F}. \item[(g)] The affine extensions of Coxeter groups of type $H$ were described in~\cite{PT}. In particular, the diagram of the simplex giving rise to the top left $\widetilde H_4$ quiver in Table~\ref{acute} was used to define the group $\widetilde H_4$. We note that one can start with any of the simplices whose diagrams are listed in the $\widetilde H_4$ parts of Tables~\ref{t acyclic} and~\ref{acute} to get the same group. \end{itemize} \end{remark} \begin{figure}[!h] \epsfig{file=./pic/ac4-1.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{2}{5}$}\put(-19,0){\tiny\color{blue} $\frac{2}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-57,20){\tiny\color{blue} $\frac{1}{5}$} \qquad \raisebox{15pt}{\epsfig{file=./pic/arrow.eps,width=0.05\linewidth}} \qquad \epsfig{file=./pic/ac4-2.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{2}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-57,20){\tiny\color{blue} $\frac{1}{5}$} \qquad \raisebox{15pt}{\epsfig{file=./pic/arrow.eps,width=0.05\linewidth}} \qquad \epsfig{file=./pic/ac4-3.eps,width=0.14\linewidth}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-57,20){\tiny\color{blue} $\frac{1}{5}$} \vspace{15pt} \epsfig{file=./pic/ac4-4.eps,width=0.14\linewidth}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-57,20){\tiny\color{blue} $\frac{1}{5}$}\put(-38,20){\tiny\color{blue} $\frac{2}{5}$} \qquad \raisebox{15pt}{\epsfig{file=./pic/arrow.eps,width=0.05\linewidth}} \qquad \epsfig{file=./pic/ac4-5.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{1}{5}$}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-57,20){\tiny\color{blue} $\frac{1}{5}$}\put(-38,20){\tiny\color{blue} $\frac{2}{5}$} \qquad \raisebox{15pt}{\epsfig{file=./pic/arrow.eps,width=0.05\linewidth}} \qquad \epsfig{file=./pic/ac4-6.eps,width=0.14\linewidth}\put(-2,10){\tiny\color{blue} $\frac{2}{5}$}\put(-57,20){\tiny\color{blue} $\frac{1}{5}$}\put(-38,20){\tiny\color{blue} $\frac{2}{5}$}\put(-19,25){\tiny\color{blue} $\frac{1}{5}$} \vspace{15pt} \epsfig{file=./pic/ac4-1.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{2}{5}$} \quad \raisebox{15pt}{\epsfig{file=./pic/arrow.eps,width=0.05\linewidth}} \quad \epsfig{file=./pic/ac4-7.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{1}{5}$}\put(-19,0){\tiny\color{blue} $\frac{2}{5}$} \quad \raisebox{15pt}{\epsfig{file=./pic/arrow.eps,width=0.05\linewidth}} \quad \epsfig{file=./pic/ac4-8.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{1}{5}$}\put(-12,11){\tiny\color{blue} $\frac{2}{5}$}\put(-28,-1){\tiny\color{blue} $\frac{2}{5}$} \quad \raisebox{15pt}{\epsfig{file=./pic/arrow.eps,width=0.05\linewidth}} \quad \epsfig{file=./pic/ac4-9.eps,width=0.14\linewidth}\put(-19,25){\tiny\color{blue} $\frac{1}{5}$}\put(-12,11){\tiny\color{blue} $\frac{2}{5}$}\put(-28,-1){\tiny\color{blue} $\frac{2}{5}$}\put(-33,20){\tiny\color{blue} $\frac{2}{5}$} \caption{Mutation equivalences between exceptional mutation-infinite quivers } \label{mut} \end{figure}
\section{Benchmarking Krylov subspace dynamics} In this section we study the error of the Krylov subspace method by comparing it against exact diagonalization (ED) at small system size. For each system size $L \in \{4,6,8,10\}$, we consider a random initial product state of spins aligned in the $\hat{z}$ direction. We then compute the evolution of the system under driving frequencies $\omega/J \in \{5,6,7,8,9,10\} $. In Fig.~\ref{fig:Krylov_bench}, we show the difference between the two numerical methods for the quantities of interest in our study. In particular we consider energy density $H_{\mathrm{static}}/L$, second R\'{e}nyi Entropy $S_2$, onsite operators ($\sigma^{\{x,y,z\}}_i$) and two-site operators ($\sigma_i^x \sigma^x_{i+1}$ and $\sigma^z_i\sigma^z_{i+1}$). In the top row of plots of Fig.~\ref{fig:Krylov_bench}, we consider the maximum error observed in the first $600/J$ time units of the evolution. Errorbars correspond to the standard deviation of the maximum error observed over 6 different initial states. We note that the maximum error in this regime is not substantially affected by the system size. It is perhaps more enlightening to estimate the rate of error growth: for a given simulation parameters, Krylov subspace dynamics should induce a small constant error per timestep. This observation is borne out by the data for $t<600/J$. In the bottom row of Fig.~\ref{fig:Krylov_bench} we show the maximal rate of error growth for several quantities $O$: \begin{align}\label{eq:rate_error} R = \max_{t\le 600/J} \frac{|O_{\mathrm{ED}}(t)-O_{\mathrm{Krylov}}(t)|}{t}~. \end{align} This provides an estimate of the error growth as a function of the simulation time. Since the rate of growth is $\lesssim 2\times 10^{-7}$, we believe that Krylov subspace methods are suitable for benchmarking DMT, even at the times $t \sim 10^{3}$ we reach in this work. \begin{figure}[h] \includegraphics[width = \textwidth]{HeatingRates_otherstates.pdf} \caption{ Difference of measured quantities between exact diagonalization and Krylov subspace methods for $t\le 600/J$. In particular, we consider energy density $H_{\mathrm{static}}/L$, second R\'{e}niy Entropy $S_2$, single body operators ($\sigma^{\{x,y,z\}}_i$) and two body operators ($\sigma_i^x \sigma^x_{i+1}$ and $\sigma^z_i\sigma^z_{i+1}$), in their respective columns. In the top row we consider the largest difference observed within the elapsed time. In the lower row, we consider the largest rate of error growth, as defined in Eq.~\eqref{eq:rate_error}. } \label{fig:Krylov_bench} \end{figure} \section{Effect of Trotter step size on DMT numerics} In the main text, we considered the convergence of DMT with respect to the bond dimension $\chi$ and the size of preserved operators $\ell$. Here we complement that analysis by considering the convergence in the size of the Trotter step. We quantify the error by measuring the average error $\delta_{\langle\hat{O_i}\rangle} \equiv\sqrt{L^{-1}\sum_i\big( \langle\hat{O_i}\rangle_\text{DMT}-\langle\hat{O_i}\rangle_\text{Krylov} \big)^2}$, i.e., the error of a local observable averaged over all sites. In Fig.~\ref{SuppFigB}, we take $\hat{O_i} \in \{\sigma^z_i \sigma^z_{i+1},\sigma^x_i \sigma^x_{i+1}, \sigma^x_i\} $, the three local observables that contribute to energy $H_{\mathrm{static}}$. By decreasing the Trotter step size from $\frac{1}{4J}$ to $\frac{1}{10J}$, we observe an improvement of results, especially during the late-time heating. However, the simulation does not benefit from further decreasing the step size from $\frac{1}{10J}$ to $\frac{1}{20J}$. While the very early time dynamics shows an improvement, the late time discrepancy increases; when we apply the truncation too frequently, the long-range correlators are destroyed more severely and the heating process is suppressed. Since we are interested in the late-time dynamical properties of the system, we use Trotter step $10/J$ throughout this work. \begin{figure}[h!] \includegraphics[width=3.2in]{SuppFigB.pdf} \centering \caption{Convergence of local observables with respect to Trotter steps ($L=20$, $\omega=8$, $\chi=128$, $\ell=3$). (a) $\langle\sigma^z_i\sigma^z_{i+1}\rangle$, (b) $\langle\sigma^x_i\sigma^x_{i+1}\rangle$, and (c) $\langle\sigma^x_i\rangle$ are the three terms that have non-zero contribution to energy density.} \label{SuppFigB} \end{figure} \section{Entropy in DMT} \label{app:entropy} In the main text, we show the evolution of the entropy of the leftmost three sites. Here we motivate that choice with additional details on the evolution of the entropy of different subsystems. \subsection{Page-like correction at late time} For a subsystem with size $L_\text{sub} \sim L/2$, the bipartite entanglement entropy approaches the maximal value of $L_{\text{sub}}$ bits in DMT simulations, but approaches a smaller value in Krylov subspace simulations (see Fig.~\ref{SuppFigCLate}). This discrepancy arises because the Krylov method considers a pure state, while DMT considers an MPDO, which can be entangled with a notional bath via the truncation procedure. The difference between the two corresponds to a Page-like correction: at $L_\text{sub}=L/2$ and infinite temperature, this correction is exactly $\log 2$ (1 bit), in agreement with the theoretical prediction~\cite{lubkin_entropycorrection_1993}. As one decreases $L_{\text{sub}}$, the correction decreases exponentially, and the two methods agree in their late-time entanglement. \begin{figure}[h!] \includegraphics[width=3.2in]{SuppFigCLate.pdf} \centering \caption{Late-time second R\'{e}nyi entropy of subsystems with different sizes ($L=20, \omega=6$). The subsystem sizes $L_\text{sub}$ for the curves from the bottom to top are \{1,2,3,4,5,6,7,8,9,10\}. } \label{SuppFigCLate} \end{figure} \begin{figure}[h!] \includegraphics[width=3.2in]{SuppFigCEarly.pdf} \centering \caption{Early-time second R\'{e}nyi entropy of subsystems with different sizes ($\omega=10$). (a) Small system with $L=20$, and the subsystem sizes $L_\text{sub}$ for the curves from the bottom to top are \{1,2,3,4,5,6,7,8,9,10\}. (b) Large system with $L=100$, and the subsystem sizes $L_\text{sub}$ for the curves from the bottom to top are \{1,9,17,25,33,41,49\}. The black straight line sets the upper bound of the entropy, of which the rate is extracted from Krylov data with $L=20$. } \label{SuppFigCEarly} \end{figure} \subsection{Early-time behaviors} For $t<\tau_{D_\mathrm{eff}}$, the system is well described by the time-independent interacting Hamiltonian $D_{\mathrm{eff}}$. For an initial product state, the entropy of a subsystem is expected to increase linearly with time. Using Krylov subspace methods, we indeed observe the linear increase of entropy at early time, and extract the early-time entropy production rate $\Gamma^S_{early}$. Importantly, $t\cdot\Gamma^S_{early}$ gives an upper bound on the entropy (black line in Fig.~\ref{SuppFigCEarly}). Nevertheless, $S_2$ can exhibit some non-monotonic behaviors before it approaches the prethermal value at $\tau_{D_\mathrm{eff}}$ (Fig.~\ref{SuppFigCEarly}a), indicating some resonance-like effects in the system. In particular, the dips emerging in $S_2$ (marked by arrows in Fig.~2c in the maintext) reflect the coherent revival of local operators. However, DMT fails to capture both the effect of the many-body coherences, as well as the aforementioned bound in entropy growth. On the one hand, the truncation destroys the long-range correlations necessary to capture the coherent revivals, resulting in a smoother entropy curve. On the other hand, at subsystem sizes greater than the preservation diameter $\ell$, the entropy in DMT can exceed the upper bound $t\cdot\Gamma^S_{early}$ (Fig.~\ref{SuppFigCEarly}b). This is because the truncation via DMT can convert some entanglement entropy to thermal entropy, which does not care about the subsystem boundary: the entropy of a subsystem can increase with the number of bonds truncated and, thus, in larger subsystems we observe a higher rate of entropy growth, Fig.~\ref{SuppFigCEarly}b. However, if the subsystem size is at most $\ell$, the truncation will preserve the reduced density matrix. Thus, the truncation will not affect the $\ell$-site entropy. Nevertheless, errors in $\ell$-site entropy can still occur via the propagation of errors in longer range operators. DMT fails to accurately capture the $\ell$-site entropy to the extent that errors in longer ranged operators propagate down to the three-site density operators via the system's dynamics. \section{Approach to Gibbs Ensemble} To show that the system approaches a Gibbs ensemble at late time, we compare the expectation value of local observables of late-time Floquet evolution and the Gibbs state of the static Hamiltonian $H_{\mathrm{static}}$ (such Hamiltonian being the zeroth order approximation to $D_\mathrm{eff}$). By performing imaginary-time evolution with DMT, we obtain the Gibbs states of the $H_{\text{static}}/L$ at different temperatures. The inset of Fig.~\ref{SuppFigD} shows the averaged energy density $\langle H_{\text{static}}\rangle$ at different temperatures; similarly we can obtain other physical quantities as a function of temperature. This provides a map between energy density and the expectation value of other observables in the Gibbs state. Using this map, we can directly compare the late-time Floquet evolution (where we lack a direct measure of the temperature) to the Gibbs state \emph{at the same averaged energy density}. As shown in Fig.~\ref{SuppFigD}, given the same energy density, the two states exhibit the same entropy and local observables, indicating that the Floquet system can be described by a Gibbs ensemble with respect to the prethermal Hamitonian (for local observables). \begin{figure}[h!] \includegraphics[width=3.2in]{SuppFigD.pdf} \centering \caption{Physical quantities as a function of the averaged energy density for imaginary-time evolved Gibbs states and late-time Floquet evolution ($L=20,$ $\omega=6$). (a) second R\'{e}nyi entropy of the half chain, (b) a two-site local observable, and (c) an one-site local observable. Inset: The averaged energy density as a function of inverse temperature. } \label{SuppFigD} \end{figure} How can these results be consistent with our claim in the main text that the relationship between effective temperature and (e.g.) the energy density of $H_{\mathrm{static}}$ is itself frequency dependent? Essentially, consistency requires that the particular local observables of Fig.~\ref{SuppFigD} depend weakly on frequency. We find that they depend on frequency only at second order or higher in $\omega^{-1}$, because those observables and $H_{\mathrm{static}}$ are even under global spin flip, while our drive is odd. To see how these symmetry considerations play out, suppose the system is in a Gibbs state \begin{equation} \rho(t; \omega) = \frac 1 Z e^{-\beta(t) D_\mathrm{eff}(\omega^{-1})} \end{equation} where the effective temperature $ T(t) = 1/\beta(t)$ is determined by the energy density as \begin{equation} \expct{D_\mathrm{eff}(t)} \equiv Z^{-1} \operatorname{Tr} [ D_\mathrm{eff} (\omega^{-1})~ e^{-\beta(t) D_\mathrm{eff}(\omega^{-1})} ]\; \end{equation} with $Z = \operatorname{Tr} [ e^{- \beta(t) D_\mathrm{eff}(\omega^{-1})} ]$. For compactness we drop the time dependence of the temperature. Expanding $D_\mathrm{eff}$ in powers of $\omega^{-1}$: \begin{equation} D_\mathrm{eff} = H_{\mathrm{static}} + \omega^{-1} D'\; + O(h^2\omega^{-2}). \end{equation} As per Ref.~\cite{machado_exponentially_2017}: \begin{align} \begin{split} \omega^{-1} D' &= \frac 1 T \int_0^T dt\, i \int_0^t dt' [H_{\mathrm{drive}}(t'), H_{\mathrm{static}}]\\ &= \frac 1 T \int_0^T dt\, i \int_0^t dt' v(t) \sum_{jk}[h_z \sigma^z_j + h_y \sigma^y_j, J\sigma^z_k \sigma^z_{k+1} + J_x \sigma^x_k \sigma^x_{k+1} + h_x \sigma^x_k] \\ &= i \frac{\pi\omega^{-1}}{2} \sum_{jk}[h_z \sigma^z_j + h_y \sigma^y_j, J\sigma^z_k \sigma^z_{k+1} + J_x \sigma^x_k \sigma^x_{k+1} + h_x \sigma^x_k]\\ &= \pi\omega^{-1} \sum_{k}\left[-h_z J_x (\sigma^y_k\sigma^x_{k+1} + \sigma^x_k \sigma^y_{k+1}) - h_zh_x \sigma^y_k -h_y J (\sigma^x_k\sigma^z_{k+1} +\sigma^z_k\sigma^x_{k+1})\right.\\ &\hspace{3.5cm}\left.+ h_yJ_x(\sigma^z_k \sigma^x_{k+1} + \sigma^x_k \sigma^z_{k+1}) + h_yh_x \sigma^z_k\right]~. \end{split} \end{align} It is immediately apparent that $D'$ is odd under a $\pi$ rotation about the $x$ axis, while $H_{\mathrm{static}}$ is even---more specifically, if \begin{equation} X = \prod_j \sigma^x_j \end{equation} then \begin{align} \begin{split} X H_{\mathrm{static}} X &= H_{\mathrm{static}}\\ X D' X &= - D'\;, \end{split} \end{align} so \begin{equation} 0 = \operatorname{Tr} [D' H_{\mathrm{static}}^n]\;. \end{equation} Then the partition function is \begin{align} \begin{split} Z &= \operatorname{Tr} \left[e^{-\beta (H_{\mathrm{static}} + \omega^{-1} D')}\right] + O(\omega^{-2})\\ &\approx \operatorname{Tr} \left[e^{-\frac{\beta \omega^{-1}}{2}D'}e^{-\beta H_{\mathrm{static}}} e^{-\frac{\beta \omega^{-1}}{2}D'} \right] + O(\omega^{-2})\\ &\approx \operatorname{Tr} \left[\left(1 - \frac{\beta \omega^{-1}}{2} D'\right)e^{-\beta H_{\mathrm{static}}} \left(1 - \frac{\beta \omega^{-1}}{2} D'\right)\right] + O(\omega^{-2})\\ &\approx \operatorname{Tr} \left[e^{-\beta H_{\mathrm{static}}} (1 - \beta \omega^{-1}D') \right] + O(\omega^{-2})\\ &= \operatorname{Tr} \left[e^{-\beta H_{\mathrm{static}}}\right] + O(\omega^{-2})\\ &= Z_0 + O(h^2\omega^{-2}) \end{split} \end{align} with $Z_0 = \operatorname{Tr}\left[e^{-\beta H_{\mathrm{static}}}\right]$ the partition function of the static Hamiltonian. Consider now some (local) operator $O_j$. Its expectation value in the Gibbs state $\rho$ is \begin{align} \begin{split} \operatorname{Tr} O_j \rho &= Z_0^{-1} \operatorname{Tr}\left[ e^{-\frac{\beta \omega^{-1}}{2}D'}e^{-\beta H_{\mathrm{static}}} e^{-\frac{\beta \omega^{-1}}{2}D'} \times O_j \right] + O(\omega^{-2})\\ &= Z_0^{-1} \operatorname{Tr}\left[ \left(1 - \frac{\beta \omega^{-1}}{2}D'\right)e^{-\beta H_{\mathrm{static}}} \left(1 - \frac{\beta \omega^{-1}}{2}D'\right) \times O_j \right] + O(\omega^{-2})\\ &= Z_0^{-1} \operatorname{Tr}\left[e^{-\beta H_{\mathrm{static}}} O_j\right] - \frac{\beta \omega^{-1}}{2} Z_0^{-1}\operatorname{Tr}\left[e^{-\beta H_{\mathrm{static}}}\{D',O_j\} \right] + O(\omega^{-2})\;, \end{split} \end{align} where $\{\cdot, \cdot\}$ corresponds to the anti-commutator. If $O_j$ is even under $X$, as the operators of Fig.~\ref{SuppFigD} are, $\operatorname{Tr}\left[e^{-\beta H_{\mathrm{static}}}D'O_j \right] = 0$ and, to first order in $\omega^{-1}$, $O_j$ takes the same expectation value as in the $H_{\mathrm{static}}$ Gibbs state: \begin{equation} \operatorname{Tr} \left[ \rho~ O_j^{\mathrm{even}}\right] = Z_0^{-1} \operatorname{Tr}\left[e^{-\beta H_{\mathrm{static}}} O_j^{\mathrm{even}}\right] + O(\omega^{-2})\;. \end{equation} If $O_j$ is odd under $X$, then \begin{equation} \operatorname{Tr}\left[ \rho~ O_j^{\mathrm{odd}}\right] = - Z_0^{-1} \frac{\beta \omega^{-1}}{2} \operatorname{Tr}\left[e^{-\beta H_{\mathrm{static}}} \{D',O_j^{\mathrm{odd}}\} \right] + O(\omega^{-2})\;. \end{equation} Here we note that $Z_0^{-1} \operatorname{Tr}\left[e^{-\beta H_{\mathrm{static}}}\{D',O_j^{\mathrm{odd}}\} \right]$ corresponds to the sum of expectation values of one and two-body operators. Taking $O_j^{\mathrm{odd}} = \sigma^y_k$, the significant terms in $D'$ are $h_zJ_x(\sigma^x_{k+1}\sigma^y_{k}+\sigma^y_k\sigma^x_{k+1}) + h_zh_x \sigma^y_k$. Using, $\beta \sim 0.2, h_z =0.13, h_x=0.21, J_x=0.75,\omega = 6$ and the data from Fig.~\ref{SuppFigD}, we estimate $\operatorname{Tr} \rho \sigma^y_k \sim \beta \pi \omega^{-1} (2 h_z J_x \langle \sigma^x_k\rangle+h_zh_x) \sim 2.2\times 10^{-3}$. In fact when we consider our half-driven chain and compare $\sigma^y$ for a site in the undriven part ($D_\mathrm{eff} = H_{\mathrm{static}}$) to a site in the driven part ($D_\mathrm{eff} = H_{\mathrm{static}} + \omega^{-1}D' + \mathcal{O}(\omega^{-2})$), we find that in the driven part $\expct{\sigma^y} \sim 3 \times 10^{-3}$ whereas in the undriven region $\expct{\sigma^y} \sim 0$ (Fig.~\ref{fig:sigmay}), in agreement with our estimate. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{SuppFigD1.pdf} \caption{ Comparison of the expectation value of $\sigma^y$ for different sites on the half-driven chain, at frequency $\omega=6$ and using the parameters of the main text. In red, the site is located within the driven side of the chain, where the effective Hamiltonian is modified by the drive. In blue, the site is located within the undriven side of the chain, where the effective Hamiltonian is only modified by the drive at very large order. } \label{fig:sigmay} \end{figure} \section{Preservation of \texorpdfstring{$l$}{l}-site operators} Here we present the preservation of $\ell$-site operators within DMT for any $\ell$ as a simple generalization of the preservation of $3$-site operators focused in the original DMT paper \cite{White_2017}. Suppose we are making a truncation at the bond between site $i$ and $i+1$. Then the reduced density matrix of the whole system can be written in the following form: \begin{equation} \rho = \sum^{\chi-1}_{\alpha=0} \hat{x}_{L\alpha} s_{\alpha} \hat{x}_{R\alpha} \end{equation} in which \begin{equation} \begin{split} \hat{x}_{L\alpha}&=\sum_{\{\mu\}} [A_1^{\mu_1}\dots A_i^{\mu_i}]_\alpha \hat{\sigma}_1^{\mu_1}\dots \hat{\sigma}_i^{\mu_i}\\ \hat{x}_{R\alpha}&=\sum_{\{\mu\}} [B_{i+1}^{\mu_{i+1}}\dots B_L^{\mu_L}]_\alpha \hat{\sigma}_{i+1}^{\mu_{i+1}}\dots \hat{\sigma}_L^{\mu_L}. \end{split} \end{equation} As in the preservation of $3$-site operators, we perform a basis transformation before SVD decomposition and truncation: \begin{equation} \begin{split} \hat{y}_{L\beta}&=\sum^{\chi_1}_{\alpha=0}\hat{x}_{L\alpha}Q^*_{L\alpha\beta}\\ \hat{y}_{R\beta}&=\sum^{\chi_1}_{\alpha=0}Q^*_{R\alpha\beta}\hat{x}_{R\alpha}. \end{split} \end{equation} However, the tranformations $Q_{L,R}$ in our method are given by \begin{equation} \begin{split} Q_{L\alpha\beta}R_{L\beta}^\lambda&= \operatorname{Tr}[\hat{x}_{L\alpha}\hat{O}^\lambda_{i+1-n,i}]\in \mathbf{C}^{\chi\times 4^n}\\ Q_{R\alpha\beta}R_{R\beta}^\lambda&= \operatorname{Tr}[\hat{x}_{R\alpha}\hat{O}^\lambda_{i+1,i+n}]\in \mathbf{C}^{\chi\times 4^n}. \end{split} \end{equation} where $n$ is an integer controlling the size of the preserved operators, and the $\hat{O}^\lambda_{j,k}$ form a basis for operators on the subsystem $[i+1-n, i]$ indexed by $\lambda$. After the transformation, we follow the same method as the original DMT, which means we do not change the first $4^n$ rows and $4^n$ columns during the truncation. This procedure can preserve the reduced density matrices of the subsystem $[1,i+n]$ and the subsystem $[i+1-n,L]$ (the proof is almost the same as in \cite{White_2017}). We remark that to guarantee this requires the bond dimension $\chi\ge\chi^{preserve}=2\times4^n$, where $4^n$ is the number of all possible $\hat{O}^\lambda_{i+1-n,i}$ (or $\hat{O}^\lambda_{i+1,i+n}$), i.e. the number of operators living in the subsystem $[1,i+n]$ (or the subsystem $[i+1-n,L]$). \begin{figure}[h!] \includegraphics[width=4.8in]{SuppFigE.pdf} \centering \caption{The operators preserved during the truncation. (a) $2n+1$ is the maximum size of the operators that can be preserved. (b) A truncation can change the expectation of a $(2n+2)$-site operator.} \label{SuppFigE} \end{figure} For an operator on $\ell$ consecutive sites, we only need to consider the case when the truncation seperates it into two parts. Let $\ell_{left}$ and $\ell_{right}$ denote the size of the left and the right parts (relative to the truncation) of this operator respectively. Since $\ell_{left}+\ell_{right}=\ell$, we have $\mathrm{min}\{\ell_{left},\ell_{right}\}\le \lceil \ell/2\rceil$. If $\ell_{right}\le n$, the $\ell$-site operator will live in the subsystem $[1,i+n]$, and is thus preserved (the marginal case is the blue frame in Fig.~\ref{SuppFigE}a). Similarly, if $\ell_{left}\le n$, the $\ell$-site operator will also be preserved (the marginal case is shown by the red frame in Fig.~\ref{SuppFigE}a). Therefore, any $l$-site operator with $\lceil \ell/2\rceil \le n$ is preserved during a truncation on any bond $i$, which means for a given $n$, we can preserve all $(2n+1)$-site operators. However, a $(2n+2)$-site operator can be changed by the truncation at the middle of it (Fig.~\ref{SuppFigE}b). Combining the previous expression for $\chi^{preserve}$ and $\ell=2n+1$, we prove that to preserve all $\ell$-site operators requires bond dimension $\chi^{preserve}=2^\ell$. \section{Details for Heating Timescales} \subsection{Comparison of rates of energy and entropy growth} \label{sec:DiffInTauStar} Before describing in detail the extraction of $\tau^*$ from the dynamics of $\langle H_{\text{static}}\rangle$ and $S_2$, we would like to highlight the slightly different definition of heating timescales for these two quantities. To be specific, we define the heating timescales $\tau^*$ as \begin{equation} \begin{split} \frac{d}{dt}\langle H_{\text{static}}\rangle &= -\frac{1}{\tau^*_E}\langle H_{\text{static}}\rangle\\ \frac{d}{dt} \Delta S_2 &= -\frac{2}{\tau^*_S} \Delta S_2 \end{split}, \end{equation} where $\Delta S_2=S_2^{T=\infty}-S_2$. Here, we justify that with this factor of 2 difference, $\tau^*_E$ and $\tau^*_S$ measure the same heating timescale. For a Gibbs ensemble of $H$ at temperature $T$, the probability $p_i$ assigned to the $i$'th eigenstate (with $\epsilon_i$ being its eigenenergy) can be approximated to the first order as \begin{equation} p_i =\frac{e^{-\beta\epsilon_i}}{\operatorname{Tr}[e^{-\beta H}]} \approx \frac{1-\beta\epsilon_i}{\operatorname{Tr}[1-\beta H]} = 2^{-L}(1-\beta\epsilon_i), \end{equation} where $\beta=1/T$, $2^{L}$ is the dimension of the Hilbert space, and we use the fact that $\operatorname{Tr} H = 0$. The energy is then: \begin{equation} E=\sum_i p_i\epsilon_i\approx 2^{-L}\sum_i (1-\beta\epsilon_i)\epsilon_i = -2^{-L}\sum_i\beta \epsilon_i^2 \propto \beta. \end{equation} A similar estimate can be made for the second R\'{e}nyi entropy of the entire system: \begin{gather} \begin{split} S_{\mathrm{entire}} &=-\log_2\sum_i p_i^2\\ &\approx -\log_2 \left[2^{-2L} \sum_i (1-\beta\epsilon_i)^2\right]\\ &= L -\beta^2 2^{-L}\sum_i\epsilon^2_i. \end{split} \end{gather} Hence, \begin{equation} \Delta S_{\mathrm{entire}}\equiv L-S_{\mathrm{entire}} \simeq \beta^2 2^{-L}\sum_i\epsilon^2_i\propto \beta^2. \end{equation} Since the entropy is an extensive quantity for a Gibbs state, one expects this behavior to hold for any subsystem; thus $\Delta S\propto \beta^2$. Therefore, using our definition for $\tau^*_E$ and $\tau^*_S$: \begin{gather} \begin{split} \frac{1/\tau^*_E}{1/\tau^*_S}&=\left(\frac{1}{E}\frac{dE}{dt}\right) /\left(\frac{1}{2}\frac{1}{\Delta S}\frac{d\Delta S}{dt}\right)\\ &=\left(\frac{d\log |E|}{dt}\right)/\left(\frac{1}{2}\frac{d\log \Delta S}{dt}\right)\\ &=\left(\frac{d\log |E|}{d\log \beta}\right)/\left(\frac 1 2 \frac{d\log \Delta S}{d\log \beta}\right)\\ &= 1 \,. \end{split} \end{gather} \subsection{Extracting the heating timescale \texorpdfstring{$\tau^*$}{tau*}} \label{sec:taustarExt} We observed that both the averaged energy density $\langle H_{\text{static}}\rangle$ and the entropy $S_2$ decay exponentially to their infinite-temperature values (Fig.~\ref{SuppFigF}). Therefore, $\tau^*_E$ and $\tau^*_S$ can be naturally defined by the equations $|\langle H_{\text{static}}\rangle|\propto e^{-t/\tau^*_E}$ and $(S_2^{T=\infty} - S_2) \propto e^{-2t/\tau^*_S}$ respectively. The existence of the factor of $2$ ensures that $\tau^*_E$ and $\tau^*_S$ are consistent, as described in the previous section. We obtain their values by fitting to the inverse of the slope of the logarithm of the two quantities, as plotted in Fig.~\ref{SuppFigF}. We estimate the errors by fitting to different ranges of time (after prethermalization), and taking the standard deviation of the obtained rates. \begin{figure}[h!] \includegraphics[width=3.2in]{SuppFigF.pdf} \centering \caption{The averaged energy density $\braket{ H_{\text{static}} }/L$ and the entropy $\Delta S_2 = S_2^{T=\infty}-S_2(t)$ decay exponentially zero. } \label{SuppFigF} \end{figure} \section{Classical diffusion equation} \label{sec:heat_eq} \subsection{Derivation and approximation} In general, the equations governing the heat transport in classical systems are: \begin{align} \partial_t \epsilon(x,t) &= \partial_x j(x,t) + q(x,t) \\ j(x,t) &\propto \partial_x T(x,t)\;. \end{align} The first equation encodes energy conservation, while the second equation reflects that the energy density current $j(x,t)$ arises from an inhomogeneity in temperature $T(x,t)$ across the chain. Since we drive only the right half of the chain, the mapping from energy density $\epsilon(x,t)$ to temperature $T(x,t)$, as well as the energy absorption $q(x,t)$, varies explicitly in position along the chain. In particular, the lowest order $\epsilon(x,t)$ correction to $T(x,t)$ yields a heat current $j(x,t)\propto \partial_x T(x,t) \propto \partial [(1+\eta g_1(x))\epsilon(x,t)]$, in which $g_1(x)$ captures this inhomogeneity in the mapping from $\epsilon$ to $T$, and the small parameter $\eta$ characterizes its magnitude. Motivated by the heating term in the global drive case, we expect the local heating $q(x,t) = -g_2(x) \epsilon /\tau^*$, where $g_2(x)$ is a spatial function charaterizing where the heating happens. Combining all above, the diffusion equation then reads: \begin{equation} \partial_t \epsilon = D \partial_x^2 [(1+\eta g_1(x))\epsilon] - q(x,t) = D \partial_x^2 [(1+\eta g_1(x))\epsilon] - \frac{\epsilon}{\tau^*} g_2(x). \end{equation} In our model, both $g_1(x)$ and $g_2(x)$ should resemble the step function $\Theta(x-L/2)$. In practice, we use the same smoothed-out step function $g(x) = \frac{1}{2}+ \frac{1}{2}\tanh [(x-L/2)/\xi]$ with $\xi=5$ to approximate the two, and our results are not sensitive to the exact form of $g(x)$. In general, the diffusion coefficient $D$ depends on the temperature of the system, or equivalently, depends on the energy density $\epsilon$. This $\epsilon$-dependence comes into the diffusion equation via two ways: 1) as the system is heated up, $\epsilon$ increases globally, leading to a temporally varying $D$; 2) at any time slice, $\epsilon$ changes across the spin chain, leading to a spatially varying $D$. We remark that the latter effect is less important, because the spatial inhomogeneity of $\epsilon$ is relatively small, compared to the change of $\epsilon$ over the entire evolution. Indeed in Fig.~\ref{SuppFigApproxD}, no significant error is observed when we replace the spatially varying $D$ with a globally averaged value. Thus in practice, we only consider the former effect, making it easier to solve the diffusion equation (see the formal solution in the next section). Being very clear, in the main text and the following discussion, we treat $D$ as a spatially homogeneous constant, depending on the instantaneous average energy density of the system. Moreover, we remark that a spatially varying effective Hamiltonian $D_\mathrm{eff}$ may also lead to another two modifications in the heat equation: a spatially dependent definition of $\epsilon$, and spatially dependent diffusion constant $D$. A heat equation including all these modifications can be written as: \begin{equation} \partial_t [(1+\lambda g(x))\epsilon] = \partial_x \{ [D+\delta D g(x)]\partial_x [(1+\eta g(x))\epsilon]\} - \frac{\epsilon}{\tau^*} g(x) \end{equation} where $\lambda$, $\delta D$ and $\eta$ are all small numbers. We find that the dynamics in our experiment is not sensitive to the inclusion of these terms, as they do not lead to qualitatively different terms in the equation. In fact, we find that the $\eta$ correction is the most meaningful. At early times, before the heating occurs ($\tau_{D_\mathrm{eff}}<t<\tau^*$), we already observe a non-homogenous spatial profile of energy density, due to the temperature inhomogeneity induced by $\eta$. Moreover, since the spatial profile $g(x)$ is close to the step function $\Theta(x-L/2)$, a higher derivative of it will contribute to larger correction. These considerations are both captured by the $\eta$ term. \begin{figure}[h!] \includegraphics[width=3.2in]{SuppFigApproxD.pdf} \centering \caption{The evolutions of the energy density solved by diffusion equation, with the diffusion coefficient $D$ varying across the spin chain or approximated by its instantaneous global average. We set the lowest curve as the initial state, and observed no significant difference between the two cases during the following evolution. } \label{SuppFigApproxD} \end{figure} \subsection{Solving the Heat Equation} Since no energy can flow out of the boundary of the system, we require $0 = j(t)|_{x=0,L} \approx\left.\partial_x [(1+\eta g(x)) \epsilon] \right|_{x = 0,L}$. Considering that $g(x)$ remains constant deeply inside the driven and undriven parts, we can simplify the boundary condition as $\left.\partial_x \epsilon \right|_{x = 0,L} = 0$. This can be immediately achieved by considering the cosine series of the problem: \begin{align} \epsilon(x,t) =\sum_{n=0}^\infty f_n(t)\cos\frac{n\pi x}{L} \end{align} The differential equation then becomes: \begin{equation} \sum_{n=0}^\infty \cos\frac{n\pi x}{L} \partial_t f_n(t) = -D\sum_{n=0}^\infty \left[\frac{n\pi}{L}\right]^2 \cos\frac{n\pi x}{L} f_n(t) + D\eta\sum_{n=0}^\infty \partial_x^2 \left[ g(x)\cos\frac{n\pi x}{L}\right] f_n(t) - \frac{1}{\tau^*}\sum_{n=0}^\infty g(x)\cos\frac{n\pi x}{L} f_n(t). \end{equation} Integrating both sides with the kernel of $\cos \frac{k\pi x}{L}$ for $k\in \mathbb{N}$ yields (the second term on the right-hand side is integrated by parts): \begin{align} \partial_t f_k(t) = - f_k(t) D\left[\frac{k\pi}{L}\right]^2 - \frac{2}{L(1+\delta_{k0})}\sum_{n=0}^\infty f_n(t) \left\{ D\eta \left[\frac{k\pi}{L}\right]^2 + \frac{1}{\tau^*}\right\} \int_{0}^{L}dx~g(x) \cos \frac{k \pi x}{L} \cos \frac{n \pi x}{L} \label{eq:diff_fn} \end{align} \iffalse The solution for the different $f_k(t)$ becomes very simple to compute as long as the integrals can be obtained. At the lowest order of approximation, we consider the case of $g(x) = \Theta(x-L/2)$, and can get an analytical expression for these integral: \begin{align} &\int_{0}^{L}dx~\Theta(x-L/2) \cos \frac{k \pi x}{L} \cos \frac{n \pi x}{L}\\ &= \begin{cases} \hspace{5cm}L/2 & n=k = 0\\ \hspace{5cm}L/4 & n=k \neq 0\\ -\dfrac{L}{\pi} \dfrac{1}{(k-n)(k+n)} \left\{ k\sin \dfrac{k\pi}{2} \cos\dfrac{n\pi}{2} - n \sin\dfrac{n\pi}{2} \cos\dfrac{k\pi}{2}\right\}& \text{otherwise} \end{cases} \end{align} \fi The resulting equations can be cast in a vectorial form as: \begin{align} \partial_t \vec{f}(t) = M \vec{f}(t) \end{align} where $\vec{f}$ is the vector of the Fourier components and $M$ describes the coupling between the modes in the right-hand side of Eq.~\eqref{eq:diff_fn}. In general, $M$ is time dependent, since it contains $D$. Hence, the formal solution for $\vec{f}$ becomes: \begin{equation}\label{eq:solution} \vec{f}(t) = \mathcal{T}\exp\left\{ \int_{t_0}^t M(t') dt'\right\} \vec{f}(t_0), \end{equation} where $\mathcal{T}$ indicates that the exponential is time-ordered. In practice, the magnitude of the Fourier modes decays very quickly with $n$, so we can consider only the first $n=40$ and not incur significant error. \subsection{Dynamics of the energy density} We now describe the procedure by which we can obtain the dynamics of the energy density at late times in the $L=100$ system. The hydrodynamical description holds only for systems near a local equilibrium. As such to ensure we have a meaningful initial state, we choose some initial time $t_0$ and Fourier transform the energy density profile at that time. \begin{figure}[h!] \includegraphics[width = \linewidth]{Evolution.pdf} \centering \caption{ Time evolution of the energy density profile starting with the lowest energy density state as the initial state. We observe great agreement with the DMT results. The extracted values of $\eta$ are shown in Fig.~\ref{fig:eta}. } \label{fig:energydensityevolution} \end{figure} We chose a set of times $\{t_n\}$ to compare the hydrodynamical evolution with DMT. Here, the heating timescale $\tau^*$ and the diffusion coefficient $D(\epsilon)$ are obtained from our previous analysis of the global heating rate and the diffusion under static Hamiltonian, respectively. For the energy-independent parameter $\eta$, we optimize its value to minimize the discrepency between the two evolutions (DMT and hydrodynamical model). In particular, we charaterize the discrepency by the standard deviation averaged over all time slices, namely, $\sum_{t_n}\sqrt{\sum_x |\epsilon(x,t_n)_\text{DMT}-\epsilon(x,t_n)_\text{Hydro}|^2/L}$. In Fig.~\ref{fig:energydensityevolution}, we compare the energy density profile from the simulation with that arising from Eq.~\eqref{eq:solution}. Using the lowest energy density state as the initial state, we can then apply the above procedure to obtain the energy density dynamics for later times across a large frequency range. We also observe that $\eta$ has a negative dependence on frequency $\omega$ as expected (Fig.~\ref{fig:eta}), since its value is determined by the higher order corrections to $D_\mathrm{eff}$ in $\omega^{-1}$, which decreases when the driving frequency increases. Moreover, by increasing bond dimension $\chi$ in DMT, we check the convergence of the energy density (Fig.~\ref{HydroConvergence1}). \begin{figure}[h!] \includegraphics[width = 0.32\linewidth]{Diffusion.pdf} \centering \caption{Extracted $\eta$ decreases as the driving frequency increases. } \label{fig:eta} \end{figure} \begin{figure}[h!] \includegraphics[width = 0.7\linewidth]{HydroConvergence1.pdf} \centering \caption{Convergence of energy density. (a) Direct comparison between different bond dimension $\chi$. (b) The error of local energy density $\delta\epsilon=\epsilon_{\chi}-\epsilon_{\chi=180}$. We chose $\omega=6$ and averaged energy density $\bar{\epsilon}=-0.2$ as an illustration. For other choice of parameters, we observe similar trends. } \label{HydroConvergence1} \end{figure} \section{Extracting diffusion coefficients of a spatially uniform static Hamiltonian} In this section we discuss the method used to extract the diffusion constant for a spatially uniform Hamiltonian $H$, which is a sum of local terms (with wave length $\frac{2(L-1)}{k}$): \begin{align} H = \sum_{\text{site}~i=0}^{L-1} h_i \end{align} We present the numerical experiment performed using DMT and Krylov subspace methods, and how the diffusion constant can be extracted from the obtained data. \subsection{Numerical Experiment} To properly probe diffusive behavior, it is imperative that the system is perturbed around an equilibrium (i.e. thermal) state of $H$. More specifically, we want to initialize the system in a thermal state of $H + \eta H_{\mathrm{perturb}}$, where the form of $H_{\mathrm{perturb}}$ controls the type of perturbation imposed, while $\eta$ controls its strength. Since we are interested in studying the diffusion of energy when evolved $H$, we want the perturbations to correspond to the eigenmodes of the diffusion equation, spatial oscilations of the energy density. We then consider a family of $H_{\mathrm{perturb}}^{[k]}$ which generate the k-th mode: \begin{align} H_{\mathrm{perturb}}^{[k]} = \sum_{\text{site}~i=0}^{L-1} h_i \cos \frac{k i \pi}{L-1} \end{align} In DMT, the thermal state can be straighforwardly generated by performing imaginary time evolution on the infinite temperature state $\rho_{T=\infty} \propto \mathds{1}$: \begin{equation} \rho_{\beta} = Z^{-1} \exp\left\{-\beta \left[H + \eta H_{\mathrm{perturb}}\right]\right\}\;. \end{equation} In contrast, because Krylov subspace methods can only treat pure states, it is impossible to directly compute expectations of the thermal state. Nevertheless, expectation values over the thermal density matrix $\rho_\beta$ can be obtained by averaging over initial states, which are then imaginary time evolved: \begin{equation} \operatorname{Tr}{O \rho_{\beta}} = \frac{1}{D} \sum_{i=1}^D \left\langle \psi_i \left|\rho_\beta^{1/2} ~ O~ \rho_{\beta}^{1/2}\right| \psi_i\right \rangle\approx \frac{1}{N_{ave}} \sum_{i=1}^{N_{ave}} \left[\left\langle \psi_i \left|\rho_\beta^{1/2}\right] O \left[\rho^{1/2}_\beta \right| \psi_i \right\rangle\right]~. \end{equation} Due to the large size $D$ of the Hilbert space, we cannot perform the entire calculation. Instead we approximate it by averaging over $N_{ave}$ number of \emph{random} initial states $\ket{\psi_i}$: \begin{equation} \ket{\psi_i} \propto \sum_{i=1}^D c_i \ket{i}, \quad c_i~\text{normal distributed complex variables} \end{equation} Due to quantum typicality, such random states behave as infinite temperature states (for local operators) \cite{Reimann_2007}, and so the number of $N_{ave}$ need not be very large (we use $N_{ave} = 50$). Once the initial state is generated, the system is time evolved with $H$, and the local energy $\langle h_i\rangle$ is calculated as a function of time evolved. We observed that the initial spatial profile of the local energy quickly decays and the system becomes spatially uniform due to the diffusion of the energy density. \subsection{Extraction of the diffusion constant} Consider a system with some conserved quantity $S = \sum_j s_j$ such that $s_j$ are local operators. Moreover let $\dot{s}_j = i [H,s_j]$ be also local (as is guaranteed in for a local Hamiltonian). We call $s_j$ local conserved quantities. In our case, $S = H$ and $s_j=h_j$, the local energy. When $H$ is spatially uniform and the system is at equilibrium, $s_j(t)$ will be constant for all sites (up to edge effects). As a result, we can measure the distance from equilibrium by: \begin{equation} \label{eq:dist} \mathcal P(t) = \sqrt{\sum_j (\expct{s_j(t)} - \bar s)^2} \end{equation} where $\bar s\equiv S/L $ is independent of time. The decay of this quantity provides a proxy for the diffusion coefficient: if the system is diffusive with diffusion coefficient $D$, then the decay rate of this quantity is given by the decay rate of the slowest non-zero diffusive mode. For a generic initial state, this corresponds to: \begin{equation} \mathcal P(t) \propto \exp[-\pi^2 t D / (L-1)^2 ] \end{equation} for $t \gg L^2/(4\pi^2 D)$ (the decay rate of the second-slowest mode). The diffusion coefficient is extracted by fitting this long-time behavior of $\mathcal{P}(t)$. Alternatively, we can probe that slowest mode directly, by exciting a particular diffusive mode and measuring its magnitude. This is most straightforwardly implemented by preparing the lowest diffusive mode $k=1$, $s_j(t=0) \approx \cos(j\pi/L) + C$ as the initial state and measuring the amplitude of the corresponding Fourier mode: \begin{equation} s_{q = \pi/L}(t) = \frac{2}{L} \sum_{j=0}^{L-1} \cos\frac{j\pi}{L-1} s_j(t)~. \end{equation} In this, the decay of $s_{q=\pi/L}(t)$ will be $\propto e^{-\pi^2 t D /L^2}$, from where $D$ can be extracted. We note that the profile of $s_j(t)$ can also be fitted, with a least-square method, to the lowest Fourier mode. Both methods yield the same results. Fig.~\ref{relaxation}a,b illustrate both methods, investigating $\mathcal{P}(t)$ and $s_{q=\pi/L}(t)$ for $H = H_{\mathrm{static}}$. We see both the slowest mode and the sum over all modes decay exponentially with time at the same decay rate. Here we note that, at early times, we observe non-exponential behavior in the decay of $s_{q=\pi/L}(t)$ until a timescale $\sim 1/h_x$, the integrability breaking term of our system. It is at this timescale that we expect the interactions to induce the appropriate diffusive behavior. Moreover, we can study the decay of higher Fourier modes by using the same methodology. In Fig.~\ref{relaxation}c, we observe the quadratic dependence of the decay rate on the wavevector, supporting that the dynamics of local energy density is diffusive in our system. \begin{figure}[t] \includegraphics[width = 1.0\linewidth]{relaxation.pdf} \centering \caption{(a) The evolution of the first Fourier mode under $H_{\mathrm{static}}$. (b) Decay of Fourier modes at large system size. $\beta$ is chosen such that the averaged energy density is set to be $\bar{\epsilon}=-0.1$. (c) The decay rate of Fourier modes depends quadratically on the wavevector. The system size $L=100$.} \label{relaxation} \end{figure} \subsection{Accuracy of extracted diffusion coefficients} The work of Kloss, Bar Lev and Reichman~\cite{kloss_time-dependent_2018} and ongoing (unpublished) work of Leviatan~et~al.\ find that TDVP shows ``false convergence'': it can converge very quickly in bond dimension---but to dynamics with an unphysical diffusion coefficient. We must therefore check that DMT shows the \emph{correct} diffusive dynamics. In this section we compare the diffusion constant extracted between DMT and Krylov-space dynamics. \begin{figure}[t] \includegraphics[width = 0.7\linewidth]{relaxation_benchmark.pdf} \centering \caption{Decay of Fourier modes at small system size ($L=20$) for (a) our model $H_{\mathrm{static}}$ near integrability, with the parameters used in the bulk of the paper, and for (b) our model far from integrability (b). The average energy density is set to be $\bar{\epsilon}=-0.1$. } \label{relaxation_benchmark} \end{figure} Consider our static Hamiltonian \begin{equation} H_{\mathrm{static}} = \sum^{L-1}_{i=1}[J\sigma^z_i \sigma^z_{i+1}+J_x \sigma^x_i \sigma^x_{i+1}] + h_x\sum_{i=1}^L\sigma^x_i~. \end{equation} In the main text we used $\{J,J_x, h_x\} = \{1, 0.75, 0.21\}$, similar to previous work \cite{machado_exponentially_2017}. Because we are considering nearest neighbor interactions, the only integrability breaking term is $h_x$, leading to a na\"ive estimate for the scattering length of $\lambda \sim J/h_x \simeq 5$. As a result, observing diffusion at small system sizes is difficult. Fig.~\ref{relaxation_benchmark} (left) highlights this difficulty. Nevertheless, we observe good agreement between DMT and Krylov in the dynamics. We note that we expect DMT to artificially increase the dephasing rate for the model's quasiparticles; this explains the gradually increasing discrepancy between the DMT and Krylov simulations. To check how well DMT can capture diffusion, we increase $h_x = 1.03$, decreasing the scattering lengthscale and making small system sizes more amenable to studies of diffusion. Indeed, Fig.~\ref{relaxation_benchmark} clearly demonstrates the agreement between the two methods, and as a result, the ability of DMT to probe the diffusive physics.
\section{Introduction} Extensive theoretical studies over the past few decades have proposed the existence of gravitational-wave (GW) sources arising from the mergers of two compact objects, and provided a wide range of predicted production rates of such sources \citep[e.g.][and more]{Belczynski2002,Belczynski2004,Belczynski2007,Belczynski2008,Belczynski2016,deMink2015,Dominik2012,Antonini2012,Antonini2014,Antognini2014,Petrovich2017}. Observationally, eleven confirmed GW mergers have been detected by aLIGO and VIRGO since their initial operation. These include $9$ mergers of binary black-holes (BBHs) and a single merger from a binary neutron-star (NS)\citet{TheLIGOScientificCollaboration2018}. The currently inferred BBH-merger rate from these observations (in the local Universe) is $\mathscr{R_{{\rm BBH}}}=9.7-101{\rm Gpc^{-3}yr^{-1}}$; while the merger rates of binary neutron-star is $\mathscr{R_{{\rm BNS}}}=110-3840{\rm Gpc^{-3}yr^{-1}}$; and the upper limit of BH-NS merger is $\mathscr{R_{{\rm BHNS}}}<600{\rm Gpc^{-3}yr^{-1}}$. Three main evolutionary channels were proposed in the context of GW mergers. The first deals with merger in dense environments such as galactic centers or globular clusters \citep[e.g.][]{Rodriguez2016,Rodriguez2018,Leigh2018}, where binary mergers are catalyzed by strong interactions with stars in these dense environment. In such environments, strong three-body interactions lead to harden compact binaries (drive them to shorter periods) and excite their eccentricities. Such models predict GW-production rates in the range of $\sim2-20{\rm Gpc^{-3}yr^{-1}}.$ The second evolutionary channel deals with the isolated evolution of initially massive close binary stars \citep[e.g.][]{Belczynski2008,Belczynski2016,Dominik2012,Dominik2015,Mandel2016}. Some of the massive close binaries strongly interact through one or two common envelope phases \citep[e.g.][]{Dominik2012} in which the interaction of a star with the envelope of an evolved companion leads to its inspiral in the envelope and the production of a short period binary. A fraction of the post-CE binaries are sufficiently close to merge via GW emission within Hubble time. The large uncertainties in the initial conditions of the binaries, the evolution in the common-envelope phase, the natal-kick experienced by NS/BHs at birth; and the mass-loss processes of massive stars give rise to a wide range of expected GW-sources production rates in the range $\sim10^{-2}-10^{3}{\rm Gpc^{-3}yr^{-1}}.$ The third evolutionary channel deals with mergers induced by secular evolution of triple systems either in the field \citep{Antonini2017} or in dense environments \citep[e.g.][]{Samsing2018,Samsing2018a,Petrovich2017,Antonini2018,Antonini2012}. In this channel the secular perturbations by a third companion (Lidov-Kozai evolution \citep{Lidov1962,Kozai1962} ) can drive BBHs into high eccentricities such that they merge within a Hubble-time; the rates expected in this channel are $\sim0.5-15{\rm Gpc^{-3}yr^{-1}.}$ Here we present a fourth channel of binary evolution, in which we focus of wide (SMA >$1000{\rm AU})$ BBHs in the field perturbed by random fly-by interactions of field stars in their host galaxy. \citet{Kaib2014} and \citet{Michaely2016} showed that although evolution of stars and binaries in the low-density environment in the field is typically thought to be collisionless, wide binary systems can be significantly affected by fly-by interactions of field stars stars, and effectively experience a collisional evolution. In particular, \citet{Kaib2014} calculated the probability of a head-on collision between two main-sequence stars in the Milky-Way Galaxy due to interaction with random stellar perturbers. \citet{Michaely2016} followed these directions and suggested a novel formation scenario for low-mass X-ray binaries from wide-binaries in the field. Here we show that collisional evolution in the field could also be highly important for the formation of GW-sources. We analyze the evolution of wide-orbit BBHs and show that a fraction of these can be driven into high eccentricities and close pericenter distances due to interaction with stellar perturbers. In cases where the pericenter distance of a given binary is driven into a sufficiently small distance GW-emission becomes significant and the binary rapidly loses angular momentum and energy due to GW emission, and eventually inspirals and merges as a GW-sources detectable by aLIGO/VIRGO. This paper is organized as follows. In section \ref{sec:Analytic-model} we present the analytic model, the basic assumptions and the calculations. In section \ref{sec:Numerical-calculation} we present the numerical verification to the analytic model. We discuss the results and summarize in section \ref{sec:Discussio}. The numerical procedure, the equations we integrate and the data analysis are described at length at appendix \ref{sec:Appendix-I} and \ref{sec:Appendix-II}. \section{\label{sec:Analytic-model}Analytic model} \subsection{Formation Scenario \label{subsec:Basic-Formation-Scenario}} We consider a wide BBH with semi-major axis (SMA) $a>10^{3}{\rm AU}$. The binary resides in the field of the host galaxy and therefore be affected by short duration dynamical interactions with field stars. The dynamical encounters can typically be modeled through the impulse approximation, i.e. in the regime where the interaction timescale $t_{{\rm int}}\equiv b/v_{{\rm enc}}$(where $b$ is the closest approach to the binary and $v_{{\rm enc}}$ is the velocity of the perturbing mass) is much shorter than the BBH orbital period time, $P$. These perturbations can torque the system and exchange orbital energy thereby decreasing/increasing the binary semi-major axis $a$ and the binary eccentricity $e$. If these interactions drive the system to a sufficiently small pericenter passage, $q$, then the system can merge via GW emission within Hubble time. There are four relevant timescales for this impulsive treatment: the interaction timescale $t_{{\rm int}}\equiv b/v_{{\rm enc}}$; the binary orbital period $P$; the merger time from a specific binary configuration via GW emission $T$; and the time between two consecutive encounters of the system and a fly-by perturber, $t_{{\rm enc}}=1/f=\left(n_{*}\sigma v_{{\rm enc}}\right)^{-1}$ where $n_{*}$ is the stellar number density, $\sigma$ is the geometric cross-section of the binary and the stellar fly-by. We restrict our model to the impulsive regime, namely $t_{{\rm int}}\ll P$. This gives upper bound to the closest approach distance $b$ and hence limits the average time between encounters. For example, for a BBH with a total mass of $20M_{\odot}$, SMA of $a\sim10^{4}{\rm AU}$ (hence $P\approx3\times10^{5}{\rm yr}$) and a typical velocity encounter of $v_{{\rm enc}}=50{\rm kms^{-1}}$(velocity dispersion in the field) we can restrict $b$ such that $t_{{\rm int}}=P/10$ $\left(P/100\right)$. Hence we get $b=t_{{\rm int}}\times v_{{\rm enc}}=3\times10^{5}{\rm AU}\;\left(3\times10^{4}{\rm AU}\right)$. Farther out flybys can also perturb the system and further excite the system, but at very large separations the interaction become adiabatic and the effects become small. We neglect the intermediate regime in which the perturbation time and the orbital times are comparable, which are likely to somewhat enhance the perturbation rates explored here. \subsection{\label{subsec:Analytic-Description}Analytic Description} We consider the evolution of an ensemble of wide BBH binaries with initial separations $a>10^{3}{\rm AU}$ and comparable component masses $m_{1}\sim m_{2}=m_{{\rm BH}}$. For simplicity we assume all binaries to have the same SMA, and a thermal distribution of orbital eccentricities, $f(e)de=2ede$. In the following we derive the fraction of merging systems within this ensemble and find its dependence on the SMA of the binaries, $a$ and the environmental conditions, namely the stellar density $n_{*}$ and velocity dispersion $\sigma_{v}=v_{{\rm enc}}$. The timescale for a GW-merger of an isolated binary is given by \citet{Pet64} \begin{equation} t_{{\rm merger}}\approx\frac{a^{4}}{\beta'}\times\left(1-e^{2}\right)^{7/2}\label{eq:t_merger} \end{equation} with \[ \beta'=\frac{85}{3}\frac{G^{3}m_{1}m_{2}\left(m_{1}+m_{2}\right)}{c^{5}}, \] where $G$ is Newton's constant and $c$ is the speed of light and $m_{1}=m_{2}=m_{{\rm BH}}$. Given a binary with SMA $a$ we can solve equation (\ref{eq:t_merger}) for the critical eccentricity $e_{c}$ required for the binary to merger within some merger time ${\rm T}=t_{{\rm merge}}$ \[ e_{c}=\left[1-\left(\frac{\beta'T}{a^{4}}\right)^{2/7}\right]^{1/2}. \] All systems with eccentricities equal or greater than $e_{c}$ would therefore merge within this time-frame $T$. Hence, given a thermal distribution of eccentricities we find the fraction of system that merge within a time $T$ and lost from the ensemble to be: \begin{equation} F_{q}=\int_{e_{c}}^{1}2ede=1-e_{c}^{2}=\left(\frac{\beta'T}{a^{4}}\right)^{2/7}.\label{eq:F_q} \end{equation} Following previous studies we term this ``loss'' region the ``loss-cone'' (see e.g. \citep{Hills1981}); after time $T$ all binaries in the loss-cone merge via GW-emission and this phase-space region become empty. However, binaries outside the loss-cone which do not merge within this timescale, can be perturbed by a flyby encounter as to change their angular momentum, and thereby enter and replenish the loss cone. The average size of the phase-space region into which stars are perturbed during a single orbital period is termed the smear cone, defined by \begin{equation} \theta=\frac{\left\langle \Delta v\right\rangle }{v_{k}}\label{eq:theta-1} \end{equation} where $v_{k}$ is the Keplerian velocity of the binary. The value of $v_{k}$ can be calculated given that the average separation of a Keplerian orbit is $\left\langle r\right\rangle =a\left(1+1/2e^{2}\right)$ and we approximate $e\rightarrow1$, namely \[ v_{k}=\left(\frac{Gm_{b}}{3a}\right)^{1/2}. \] $\left\langle \Delta v\right\rangle $ is the average change in the velocity over an orbital period due to perturbations \citep{Hills1981}. Let us consider fly-by interactions using the impulse approximation. \citet{Hills1981} showed that on average the velocity change (for a binary with SMA, $a$), to the binary components is of the order of \begin{equation} \left\langle \Delta v\right\rangle \simeq\frac{3Gam_{p}}{v_{{\rm enc}}b^{2}}\label{eq:Delta_V} \end{equation} where $v_{{\rm enc}}$ is the velocity of the fly-by star with respect to the binary center of mass, $m_{p}$ is the perturber mass and $b$ is the closest approach distance of a fly-by. Therefore, the square of the angular size of the smear cone cause by the impulse of the fly-by on the binary is \begin{equation} \theta^{2}=\frac{9G^{2}a^{2}m_{p}^{2}}{\left(v_{{\rm enc}}b^{2}\right)^{2}}\frac{3a}{Gm_{b}}=\frac{27Ga^{3}m_{p}^{2}}{m_{b}\left(v_{{\rm enc}}b^{2}\right)^{2}}\label{eq:theta_calc} \end{equation} and for $\theta\ll1$ we get the fractional size of the smear-cone velocity space over the $4\pi$ sphere to be after a single passage of the perturber \begin{equation} F_{s}=\frac{\pi\theta^{2}}{4\pi}=\frac{27}{4}\left(\frac{m_{p}}{m_{b}}\right)^{2}\left(\frac{Gm_{b}}{av_{{\rm enc}}^{2}}\right)\left(\frac{a}{b}\right)^{4}.\label{eq:F_s} \end{equation} It is evident from (\ref{eq:F_s}) that for a given binary the size of the smear cone depends on the perturber quantities, i.e. mass, velocity and the closest approach. The ratio of $F_{s}$ to $F_{q}$ indicates the fraction of the loss cone filled after a single fly-by. \begin{equation} \frac{F_{s}}{F_{q}}=\frac{27}{4}\left(\frac{m_{p}}{m_{b}}\right)^{2}\left(\frac{Gm_{b}}{av_{{\rm enc}}^{2}}\right)\left(\frac{a}{b}\right)^{4}\left(\frac{a^{4}}{\beta'T}\right)^{2/7}\label{eq:Fs/Fq} \end{equation} In the case where the loss cone is continuously full ($F_{s}=F_{q}$) the depletion rate only depends on the loss cone size, $F_{q}$ and the merger time , $T$. Hence the loss rate for the full lose cone is given by: \begin{equation} \dot{L}_{q}=\frac{F_{q}}{T}.\label{eq:Loss_rate-1} \end{equation} Note that the loss rate is independent of the stellar density in the field, i.e. once the stellar density is sufficiently large as to fill the loss-cone, the loss rate is saturated, and becomes independent of the perturbation rate. Furthermore, one can see from Eq. (\ref{eq:Loss_rate-1}) that the full loss-cone rate scales like $\dot{L}\propto F_{q}\propto a^{-8/7}$, i.e. the full loss-cone rate decreases with increasing SMA. On the other hand, tighter binaries are less susceptible for change due to a fly-by, this is evident from equation (\ref{eq:F_s}). Therefore closer from a critical SMA we expect that the loss cone will not be full all the time, in this ``empty loss cone'' case the loss rate depends on the rate of orbits being kicked into the loss cone: \begin{equation} f=n_{*}\sigma v_{{\rm enc}}.\label{eq:f fly_by rate} \end{equation} where $n_{*}$ is the stellar density, $\sigma=\pi b^{2}$ is the geometric cross-section. The condition for the loss cone to be continuously full is that the loss-cone orbits are replenished at least as fast as they are depleted due to the GW emission. This occurs when the rate of fly-by's that enter orbits to the loss cone,$f$ is equal to the rate of which orbits are depleted from the loss cone, $1/T$: \begin{equation} n_{*}\pi b^{2}v_{{\rm enc}}=\frac{1}{T}.\label{eq:condition_equilibirum} \end{equation} Furthermore, the condition for the loss cone to be continuously full is that the sizes of the lose-cone and the smear-cone are equal. This equilibrium occurs when \begin{equation} \frac{F_{s}}{F_{q}}=\frac{27}{4}\left(\frac{m_{p}}{m_{b}}\right)^{2}\left(\frac{Gm_{b}}{av_{{\rm enc}}^{2}}\right)\left(\frac{a}{b}\right)^{4}\left(\frac{a^{4}}{\beta'T}\right)^{2/7}=1.\label{eq:F_s/F_q} \end{equation} A stellar fly-by is sufficiently strong as to replenish the loss cone if \begin{equation} \left(v_{{\rm enc}}b^{2}\right)^{2}\leq\frac{27}{4}\frac{Gm_{p}^{2}a^{29/7}}{m_{b}\left(\beta'T\right)^{2/7}} \end{equation} Plugging this to equation (\ref{eq:condition_equilibirum}) we get an equation for the critical SMA that separates the empty and full loss-cone regimes: \begin{equation} a_{{\rm crit}}=\left[\frac{4}{27}\frac{m_{b}\beta'^{2/7}T^{-12/7}}{Gm_{p}^{2}n_{*}^{2}\pi^{2}}\right]^{7/29}. \end{equation} Using the critical SMA we can calculate the merger probability in each of these regimes, $a<a_{{\rm crit}}$ (empty) and $a>a_{{\rm crit}}$ (full). We denote $F_{q}$ as the fraction of wide binaries destroyed after time $T$, and therefore $\left(1-F_{q}\right)$ represents the fraction of binaries that survive as wide binaries at the relevant timescale. For the empty loss-cone regime ($a<a_{{\rm crit}})$ the relevant timescale is $1/f$; for the full loss-cone regime ($a>a_{{\rm crit}})$ the relevant timescale is $T$. Therefore, $\left(1-F_{q}\right)$ is a monotonically decreasing function of time, and the probability for a merger of a wide binary is \begin{equation} L_{a<a_{{\rm crit}}}=1-\left(1-F_{q}\right)^{t\cdot f}\label{eq:empty_Prob} \end{equation} where $t$ is the time since birth of the binary. As one can expect the probability only depends on the size of the loss cone and the rate of interactions. For the limit of $t\cdot f\cdot F_{q}\ll1$ we can expand equation (\ref{eq:empty_Prob}) and take the leading term, to find the loss probability to be approximated by \begin{equation} L_{a<a_{{\rm crit}}}=tfF_{q}.\label{eq:empty_prop_approx} \end{equation} given that \begin{equation} f=n_{*}\pi\left(\frac{27}{4}\frac{Gm_{p}^{2}a^{29/7}}{m_{b}\left(\beta'T\right)^{2/7}}\right)^{1/2} \end{equation} together with equation (\ref{eq:F_q}) we get: \begin{equation} L_{a<a_{{\rm crit}}}=tn_{*}m_{*}a^{13/14}\times\left(\frac{27G\left(\beta'T\right)^{2/7}}{4m_{b}}\right)^{1/2}\label{eq:empty_propb_express} \end{equation} In the full loss-cone regime the limiting factor is not the value of $f$, but the merger timescale $T$. Therefore, the full expression for the loss probability for $a>a_{{\rm crit}}$ is \begin{equation} L_{a>a_{{\rm crit}}}=1-\left(1-F_{q}\right)^{t/T}.\label{eq:full_prob} \end{equation} In the limit of $F_{q}\cdot t/T\ll1$ we can approximate the probability by \begin{equation} L_{a>a_{{\rm crit}}}=tF_{q}\frac{1}{T}=t\left(\frac{\beta'T}{a^{4}}\right)^{2/7}\frac{1}{T}=ta^{-8/7}\times T^{-5/7}\beta'^{2/7}.\label{eq:full_prob_apx_express} \end{equation} \begin{figure} \includegraphics[width=0.9\columnwidth]{Probability_both} \caption{\label{fig:The-merger-probability}The merger probability of BBH with $m_{b}=20M_{\odot}$ with fly-by mass $m_{p}=0.6M_{\odot}$ and $v_{{\rm enc}}=50{\rm kms^{-1}}$. The stellar density number is $n_{*}=0.1{\rm pc^{-3}}$. The probability it calculated after $t=10{\rm Gyr}$ since the BBH was formed. The peak probability is achieved at $a=a_{{\rm crit}}$. The merger time $T=1{\rm Myr}$, this value is chosen to ensure that the binary will merge between two consecutive encounters with stellar fly-bys. Blue solid line without accounting for ionization; red dashed line accounting for ionization.} \end{figure} The above treatment neglects the fact that perturbations may also ``ionize'' a binary and destroy it, namely, the binary is disrupted by the random fly-bys. Such ionization process decreases the available number of wide binaries. To account for the ionization process we consider the finite lifetime of wide binaries due to fly-bys using the approximate relation given by \citep{Bahcall1985} for $t_{1/2}$, the half-life time of a wide binary evolving through encounters \begin{equation} t_{1/2}=0.00233\frac{v_{{\rm enc}}}{Gm_{p}n_{*}a}.\label{eq:t_half_life} \end{equation} Taking this into account we can correct for eq. (\ref{eq:empty_propb_express}) and eq. (\ref{eq:full_prob_apx_express}) to get \begin{equation} L_{a<a_{{\rm crit}}}=\tau n_{*}m_{*}a^{13/14}\times\left(\frac{27G\left(\beta'T\right)^{2/7}}{4m_{b}}\right)^{1/2}\left(1-e^{-t/\tau}\right)\label{eq:ionization empty} \end{equation} and \begin{equation} L_{a>a_{{\rm crit}}}=\tau a^{-8/7}\times T^{-5/7}\beta'^{2/7}\left(1-e^{-t/\tau}\right),\label{eq:ionization full} \end{equation} where $\tau=t_{1/2}/\ln2$ is the mean-lifetime of the binary. In order to estimate the number of systems observable within a year in aLIGO we first calculate the number of systems merging in a Milky-Way (MW)-like galaxy per unit time. In order to do that we need to integrate over all SMA in a given stellar density and over all stellar densities in the galaxy we model. We follow a similar calculation from \citet{Michaely2016}. We model the Galaxy in the following way, let $dN\left(r\right)=n_{*}\left(r\right)\cdot2\pi\cdot r\cdot h\cdot dr$ be the the number of stars in a region $dr$ (and scale height $h$), located at distance $r$ from the center of the Galaxy. Following \citep{Kaib2014} and references within we model the Galactic stellar density in the Galactic disk as follows \begin{equation} n_{*}\left(r\right)=n_{0}e^{\left(-\left(r-r_{\odot}\right)/R_{l}\right)}, \end{equation} where $n_{0}=0.1{\rm pc^{-3}}$ is the stellar density near our sun, $R_{l}=2.6{\rm kpc}$ \citep{Juric2008} is the galactic length scale and $r_{\odot}=8{\rm kpc}$ is the distance of the sun from the galactic center. Integrating over the stellar densities throughout the Galaxy we can obtain the total number of mergers through this process. Next we account for the fraction of wide BBH systems from the entire population of starts in the Galaxy. We use the following standard values. Given a Kropa initial mass function \citep{Kroupa2001}, the fraction of the stars that evolve to become BHs is $f_{{\rm primary}}\approx10^{-3}$. If we assume most BHs form without any natal-kick ( similar assumptions were taken in other works \citep[e.g.][]{Mandel2016a,Belczynski2016}), we can expect all BHs to be in binary (or higher multiplicity) systems and the fraction $f_{{\rm bin}}=1$, consistent with the binary fraction inferred for the O-stars progenitors of BHs \citep{Moe2016,Duchene2013,Sana2014}. Next we assume a uniform distribution of the mass ratios, $Q\in\left(0.1,1\right)$ \citep{Moe2016,Duchene2013}, to get a fraction of secondaries that evolve into BHs of $f_{{\rm secondary}}\approx0.4$. We also assume that the SMA has a log-uniform distribution (Opik law) and therefore the fraction of systems with SMA larger than $10^{3}{\rm AU}$ is $f_{{\rm wide}}\approx f_{{\rm bin}}\times0.2$. This value is actually a lower limit for massive binaries, recently \citet{Igoshev2019} found that a wide binary fraction for massive B-stars to be $f_{{\rm wide}}\approx0.5$, and theoretical models suggest that the fraction of wide binary O-stars and BHs could be close to unity \citep{Perets2012a}, $f_{{\rm wide}}=1$, and we therefore expect a wide-binary fraction in the range $0.2-1$, in the following we use $f_{{\rm wide}}=0.5$. \[ f_{{\rm BBH}}\approx f_{{\rm primary}}\times f_{{\rm secondary}}\times f_{{\rm wide}}\approx \] \begin{equation} 2\times10^{-4}\left(\frac{f_{{\rm primary}}}{10^{-3}}\right)\left(\frac{f_{{\rm seoncdary}}}{0.4}\right)\left(\frac{f_{{\rm wide}}}{0.5}\right). \end{equation} The number of merging BBH per ${\rm Myr}$ from this channel for a MW-like Galaxy is \begin{equation} \Gamma=\int\int L\left(a,r\right)\times f_{{\rm BBH}}{\rm \times\left(\frac{1Myr}{10{\rm Gyr}}\right)dadr\approx0.42Myr^{-1}}. \end{equation} Following \citet{Belczynski2016} we calculate the merger rate, $\mathscr{R}$ per ${\rm Gpc^{3}}$ by using the following estimate \[ \mathscr{R}=10^{3}\rho_{{\rm gal}}\times\Gamma\approx \] \begin{equation} 4.9\left(\frac{f_{{\rm primary}}}{10^{-3}}\right)\left(\frac{f_{{\rm seoncdary}}}{0.4}\right)\left(\frac{f_{{\rm wide}}}{0.5}\right){\rm Gpc^{3}yr^{-1}} \end{equation} while $\rho_{{\rm gal}}$ is local density of the MW-like galaxies with the value of $\rho_{{\rm gal}}=0.0116{\rm Mpc^{-3}}$(e.g. \citet{Kopparapu2008}) and $\Gamma$ is given in the units of ${\rm Myr^{-1}.}$ \section{\label{sec:Numerical-calculation}Numerical calculation} In this section we describe the numerical calculation we preform. We simulate the evolution of a binary BH with masses of $m_{1}=m_{2}=10M_{\odot}$ for $10{\rm Gyr}.$ We treat the evolution by considering both the evolution of the binary between encounters, and in-particular the effects of GW-emission, as well as the change of the binary orbital elements due to the impulsive fly-by encounters with field stars. In order to calculate the average time between encounters we use the rate $f=n_{*}\sigma\left\langle v_{{\rm enc}}\right\rangle $, where $n_{*}$ is the stellar number density, taken to be the solar neighborhood value of $n_{*}=0.1{\rm pc^{-3}}$; $\left\langle v_{{\rm enc}}\right\rangle $ is the velocity of the perturber as measured from the binary center of mass, where we set $\left\langle v_{{\rm enc}}\right\rangle =50{\rm kms^{-1}}$ similar to the velocity dispersion in the solar neighborhood; and $\sigma$ is the interaction cross-section. We focus on the impulsive regime, namely $t_{{\rm int}}\ll P$ (see subsection \ref{subsec:Basic-Formation-Scenario}). With these values the largest closest approach distance $b$ for which an encounter can be considered as impulsive is \textbf{$b_{{\rm max}}=5\times10^{4}{\rm AU}.$ }The average time between such impulsive encounters is given by $t_{{\rm enc}}=1/f\approx1{\rm Myr}$. Therefore we randomly sample the time between encounters from an exponential distribution with a mean $f$ (due to the Poisson distribution of encounter times). We initialize the wide binary with a SMA $a$ and eccentricity $e$. At each step we first find the next encounter time $t_{{\rm enc}}$, and evolve the binary for $t_{{\rm enc}}$ through the equations of motion given by \citet{Pet64}, \begin{equation} \frac{da}{dt}=-\frac{64}{5}\frac{G^{3}m_{1}m_{2}\left(m_{1}+m_{2}\right)}{c^{5}a^{3}\left(1-e^{2}\right)^{7/2}}\left(1+\frac{73}{24}e^{2}+\frac{37}{96}e^{4}\right) \end{equation} \begin{equation} \frac{de}{dt}=-e\frac{304}{15}\frac{G^{3}m_{1}m_{2}\left(m_{1}+m_{2}\right)}{c^{5}a^{4}\left(1-e^{2}\right)^{5/2}}\left(1+\frac{121}{304}e^{2}\right) \end{equation} where $G$ is Newton's constant and $c$ is the speed of light. If the binary did not merge through GW-emission by the time of the next encounter we simulate the impulsive interaction with a perturber with velocity of $v_{{\rm enc}}$ drawn from a Maxwellian distribution with velocity dispersion $\left\langle v_{{\rm enc}}\right\rangle $ and a mass of $m_{p}=0.6M_{\odot}$, typical for stars in the field. After changing the binary orbital parameters due to the encounter we continue to evolve the binary until the next encounter and so on, until the binary merges, disrupts or the maximal simulation time of 10 Gyrs is reached. The numerical results are presented in Figure \ref{fig:Numerical-verification-of}; the numerical result are highly consistent with the result of the analytic model. A more detailed technical description of the numerical procedure, equations and analysis is given in the appendix \ref{sec:Appendix-I} and \ref{sec:Appendix-II}. \begin{figure} \includegraphics[width=0.9\columnwidth]{numerical_varification}\caption{\label{fig:Numerical-verification-of}Numerical verification of the analytic model. Red dashed line (same as Fig. (\ref{fig:The-merger-probability})) is the theoretical probability for a merger as a function of initial SMA. The black circles are the estimated probabilities from the numerical simulation (see section (\ref{sec:Numerical-calculation}) for details). The error-bar represent one standard deviation from the estimated value. } \end{figure} \section{\label{sec:Discussio}Discussion and summary} In this paper we explore a novel channel for the production of BBH GW-sources from wide ($>10^{3}$AU) binaries in the field. Such binaries are sensitive to perturbations by stellar-fly-bys even in the low density environment in the field. We find that a fraction of all wide-binaries attain sufficiently close-approaches (as their orbits are excited to very high eccentricities) as to inspiral and eventually merge through GW-emmision before any consecutive encounter can change the orbit. The merger rate strongly depends on the natal-kicks given to BHs at birth, which are poorly constrained \citep[e.g.][]{Repetto2012,Repetto2017}. In particular, it is still unknown whether a BH receives a momentum kick at birth like a NS, or forms without any natal-kick following a failed supernova or a large amount of fallback \citep[e.g.][]{Ertl2015,Belczynski2004,Belczynski2008}. Previous models that were able to produce rates comparable to the rate inferred from observations had typically taken similar assumptions of zero kick velocities (for all BHs, or at least for all BHs more massive than 10 ${\rm M}_{\odot}$), while models assuming higher natal kicks produced significantly lower rates \citep{Belczynski2008,Dominik2015}. In our case low natal-kicks can unbind the wide binaries, lowering their fraction. In principle, in models where wide-binaries form following the dispersal of their birth-cluster on longer time-scales \citep{Kouwenhoven2010,Perets2012a}, BH may acquire wide companions well after their formation. Nevertheless, even in these cases the BHs need to be retained in the cluster until its dispersal, and therefore the natal kick needs to be sufficiently low for a BH not to escape the cluster. We conclude that adapting similar no-kick assumptions for BHs (as done by other potentially successful scenarios) suggests the wide-binary channel explored here can give rise to a high production rate of GW-sources from BBH mergers of perturbed ultra-wide binaries. Beside the rate estimate, $\sim10\times f_{{\rm wide}}{\rm \,yr^{-1}}{\rm Gpc^{-3}}$, our proposed evolutionary channel gives rise to specific characteristics of the BBH mergers, which together can provide a distinct signature for this channel, as we discuss in the following. Eqs. (\ref{eq:ionization empty}) and (\ref{eq:ionization full}) describe the probability dependency for a given environment, namely the stellar density $n_{*}$ and the encounter velocity $v_{{\rm enc}}.$ We note the in both equations there is a $\tau\left(1-e^{-t/\tau}\right)$ dependency. Hence following eq. (\ref{eq:t_half_life}) the merger probability increases with the encounter velocity. For example, taking the same environment as assumed in section \ref{subsec:Analytic-Description} but with $v_{{\rm enc}}=200{\rm kms^{-1}}$ gives a factor of $\sim1.92$ higher rate of BBH GW-sources. We therefore expect a preference for host galaxies with higher velocity dispersion. This model is sensitive to extreme mass ratio. The equations that govern the rates depend on $\beta'$. When the binary mass is kept constant but the mass ratio $Q$ is varied we get the following dependence on $Q$ \begin{equation} \beta'=\frac{85}{3}\frac{G^{3}m_{1}m_{2}\left(m_{1}+m_{2}\right)}{c^{5}}\propto\frac{Q}{\left(1+Q\right)^{2}}, \end{equation} and since $Q$ is a monotonically increasing function, equal mass components have the highest probability to merge. Moreover, the merger rate also has a monotonic dependence on the total binary mass, due to the complex mass dependence in the loss-cone analysis and the effects of ionization (see Eqs. \ref{eq:ionization empty} and \ref{eq:ionization full}). Hence overall we expect a preference towards GW-sources from more massive binaries and higher mass-ratios. Furthermore, in this channel the spins of the BHs are likely uncorrelated given the origin of the BH components from very wide separations (or a random capture) and we therefore expect the spins of the merging BBH components to be randomly (mis-)alligned, in contrast with e.g. the isolated binary evolution channel; \citep[e.g.]{Mandel2016}. Given the long time-scale for inspiral from large separations we also expect BBHs to fully circularize by the time they reach the aLIGO band and to not produce any eccentric binaries at these frequencies, in contrast with some of the dynamical channels. Finally, unlike the isolated binary channel, which predicts a delay time dependence of $\propto t^{-1}$ \citep{Dominik2015} our model, which have no time dependency on the merger probability, generally predicts a uniform delay time distribution. In summary, the wide-binary origin for BBH GW mergers can give rise to a potential rate of $\sim10\times f_{{\rm wide}}$ ${\rm yr}^{-1}$${\rm Gpc^{-3}}$ (where $f_{{\rm wide}}$ can plausibly reside in the range $0.2-1$), comparable to (the lower range of) the observationally inferred rate of $\sim10-110$ ${\rm yr}^{-1}$${\rm Gpc^{-3}}$ from aLIGO/VIRGO detection, and is strongly dependent on the natal-kicks imparted to BHs at birth. It can be characterized by the following signatures: (1) A slight preference for high mass ratio BBH GW-sources. (2) A preference for more massive BBH. (3) Typically randomly misaligned spin-orbits BHs. (4) Circular orbits in the aLIGO band. (5) Preference for high velocity dispersion host galaxies/environments. (6) A uniform delay-time distribution. We acknowledge support from the ISF-ICORE grant 1829/12. The authors acknowledge the University of Maryland supercomputing resources (http://hpcc.umd.edu) made available for conducting the research reported in this paper. EM would like to thank Coleman Miller and Johan Samsing for stimulating discussions regarding this work. \bibliographystyle{plainnat}
\section{Introduction} Our concerns in this paper are treatments of blow-up solutions for the ODE \begin{align} \notag u_1' &= N^2 (-2u_1 + u_2) + \lambda e^{{u_1^m}},\quad u_{N-1}' = N^2 (u_{N-1}-2u_{N-2}) + \lambda e^{{u_{N-1}^m}},\\ \label{main-eq} u_i' &= N^2 (u_{i-1} -2u_i + u_{i+1}) + \lambda e^{{u_i^m}},\quad (i=2,\cdots, N-2) \end{align} for some positive integer $m$, where ${}' = \frac{d}{dt}$ and $\lambda > 0$, from the viewpoint of dynamical systems and their numerical validations. This system is considered as the finite-difference discretization of the following (initial-)boundary value problem: \begin{equation} \label{PDE-original} \begin{cases} u_t = u_{yy} + \lambda e^{u^m}, & (t,y)\in (0,T)\times (0,1), \\ u(0,y) = u_0(y), & y\in (0,1), \\ u(t,y) = 0 & \text{at }y=0,1,\quad t\in [0,T) \end{cases} \end{equation} with uniformly grid $y_i = i/N$ and $u_i =u_i(t) \approx u(t,y_i)$. Dynamics with exponential nonlinearity arises in physico-chemical processing models such as solid fuel ignition and thermal runaway in reaction kinetics \cite{D1985, URP1974} for $m=1$. In particular, {\em the Arrhenius law} in the theory of reaction kinetics associates the exponential nonlinearity in vector fields. The treatment of exponential nonlinearity is therefore a crucial problem when we consider dynamics in realistic scientific arguments. \par In preceding works, the authors and collaborators \cite{Mat, MHY2016, MT2017, TMSTMO} have proposed numerical validations of blow-up solutions for {\em polynomial} vector fields as well as their theoretical treatments from the viewpoint of dynamical systems. The {\em quasi-homogeneity} of vector fields in an asymptotic sense and the {\em time-scale desingularization} are essential tools for geometric treatment of blow-up solutions. The {\em Lyapunov tracing} technique \cite{MHY2016} realizes the validation of upper and lower bounds of rigorous blow-up times. However, exponential nonlinearity is against the previous mathematical settings. Nevertheless, a {\em homogeneous} presence of exponential growth can be reduced to a regular case near infinity as in previous studies, which will give an essence for treating exponential nonlinearity concerning with blow-up behavior both mathematically and numerically. We believe that the present study is a trigger to treat finite-time singularities including blow-up solutions for vector fields other than polynomial (or rational) ones and their numerical validations. \par The organization of this paper is the following. In Section \ref{section-desing}, we derive a vector field associated with (\ref{main-eq}) appropriate with treatments of blow-up solutions. The overcome of the presence of exponential nonlinearity is presented there. In Section \ref{section-procedure}, we show a numerical validation algorithm of blow-up solutions. The concrete validation results with various aspects in the presence of exponential terms are shown in Section \ref{section-result}. We end this paper with discussions about future directions in Section \ref{section-discussion}. \begin{rem} As for the problem of global existence of solutions for (\ref{PDE-original}) with $m=1$, we can see the classical result in, e.g., \cite{F1969, PV1995}, which shows the existence and non-existence of bounded solutions depending on $\lambda$ and geometry of $\Omega$. Note that our present study focuses on blow-up computations of spatially discretized problem of PDEs only as a part of ODE problems (cf. \cite{MT2017, TMSTMO}), and this does not directly lead to related results to the original PDEs such as (\ref{PDE-original}) because of difficulties of the present argument in infinite dimensional settings. Nevertheless, we believe that the present study gives partial aspects of solution structures in associated infinite dimensional problems (i.e., PDEs). \end{rem} \section{Desingularized vector field at infinity} \label{section-desing} Preceding studies \cite{Mat, MT2017, TMSTMO} begin with choosing appropriate {\em compactifications} for theoretical and numerical studies of blow-up solutions, which embed the phase space into compact manifolds or their tangent spaces. Typically, compactifications are chosen so that the asymptotically dominant terms at infinity are selected appropriately. Such operations can be done for asymptotically {\em polynomial} vector fields and a geometric treatment of blow-up solutions is derived (e.g., \cite{Mat}). However, the present vector field (\ref{main-eq}) contains exponential nonlinearity, and the general treatment of asymptotic behavior of vector fields at infinity is nontrivial. Nevertheless, we know that the term $e^{u^m}$ is dominant in (\ref{main-eq}) as $u\to +\infty$ and that exponential terms $\{e^{u_i^m}\}_{i=1}^{N-1}$ are homogeneous in the sense that \begin{equation} \label{homogeneity-exp} e^{(ru_i)^m} = (e^{u_i^m})^{r^m}\quad \text{ for all }r\in \mathbb{R}\quad \text{ and }\quad i=1,\cdots, N-1. \end{equation} Therefore, the similar treatment to the polynomial case can be applied to the present problem. \par According to the previous works, we choose an appropriate compactification of phase space so that we can treat the infinity with specific direction. In the present situation, introduce the following {\em directional compactification} (e.g., \cite{Mat}) $\{u_i\}_{i=1}^{N-1}\mapsto \{s, \{x_i\}_{i\in \{1,\dots, N-1 \}\setminus \{N/2\}}\}$ given by \begin{equation} \label{compactification} u_{N/2} = s^{-1},\quad u_i = s^{-1}x_i\quad (i=1,\cdots, N-1,\ i\not =N/2). \end{equation} In this case, the infinity corresponds to the subspace $\{s=0\}$ in $(x_1,\cdots, x_{\frac{N}{2}-1}, s, x_{\frac{N}{2}+1, \cdots, x_{N-1}})$-coordinate. Following \cite{Mat}, we shall call the subspace $\{s=0\}$ {\em the horizon} throughout the paper. The infinity (in $u_{N/2}$-component) then corresponds to $\{s=0\}$. \begin{rem} The choice \eqref{compactification} of directional compactification follows from the (numerical) blow-up behavior of \eqref{PDE-original}. Typical numerical example shows that the solution seems to blow up at the center point $y=\frac{1}{2}$, as seen in Figure \ref{fig_rigorous}, p.8 below. \end{rem} Let \begin{equation*} h_{k,\alpha;m}(s) := s^{-k}e^{-\alpha / s^m} \end{equation*} for integer $k$ and nonnegative real number $\alpha$, and \begin{equation*} \begin{cases} \Delta_{i} := N^2(x_{i-1}-2x_i + x_{i+1}) \quad (i=2,\cdots, N-2, i\not = N/2) & \\ \Delta_{N/2} := N^2(x_{N/2-1}-2 + x_{N/2+1}), \quad \Delta_{1} := N^2(-2x_1 + x_2), \quad \Delta_{N-1} := N^2(x_{N-2}-2x_{N-1}). & \end{cases} \end{equation*} Before our concrete arguments, we check basic properties of $h_{k,\alpha;m}$. \begin{lem} \label{lem-h} For any positive integers $k$, $m$ and nonnegative real number $\alpha$, we have the following properties. \begin{enumerate} \item The function $h_{k,\alpha;m}(s)$ is $C^1$ for $s > 0$, and $\lim_{s\to 0+} h_{k,\alpha;m}(s) = 0$. \item Let \begin{equation*} \overline{h_{k,\alpha;m}}(s) := \begin{cases} h_{k,\alpha;m}(s), & s > 0,\\ 0, & s\leq 0. \end{cases} \end{equation*} Then, $\overline{h_{k,\alpha;m}}$ is a $C^1$-extension of $h_{k,\alpha;m}$ over $\mathbb{R}$. \item We have $\frac{d}{ds}h_{k,\alpha;m}(s) = h_{k+1,\alpha;m}(s) \left(m\alpha s^{-m}-k\right)$ \item The function $h_{k,\alpha;m}(s)$ is monotonously increasing over $(0,(m\alpha/k)^{1/m})\subset \mathbb{R}$. \end{enumerate} \end{lem} The proof can be done by direct calculations and l'H$\hat{o}$pital's theorem, and we leave it in the supplemental material \cite{MT_Supp}. \par The transformed vector field is \begin{align*} s' &= - s \Delta_{N/2} - \lambda (h_{2,1;m}(s))^{-1},\\ x_i' &= - x_i \Delta_{N/2} - x_i \lambda (h_{1,1;m}(s))^{-1} + \Delta_i + \lambda (h_{1,x_i^m;m}(s))^{-1}\quad (i\not = N/2) \end{align*} Further introducing the following {\em time-scale desingularization}: \begin{equation}\label{eqn:timescaling} \frac{d\tau}{dt} = h_{1,1;m}(s)^{-1}, \end{equation} we have the following vector field in $\tau$-timescale, which turns out to be regular including $\{s=0\}$: \begin{align} \notag \dot s &= - e^{-1/s^m} \Delta_{N/2} - \lambda s \equiv f_{N/2}(s,x),\\ \label{eqn:desing} \dot x_i &= - x_i h_{1,1;m}(s)\Delta_{N/2} - x_i \lambda + h_{1,1;m}(s) \Delta_{i} + \lambda h_{0,1-x_i^m;m}(s) \equiv f_{i}(s,x)\quad (i\not = N/2) \end{align} where $\dot {} = \frac{d}{d\tau}$. We shall call it the {\em desingularized vector field} of (\ref{main-eq}). \begin{rem} We have chosen the time-scale desingularization $\frac{d\tau}{dt} = T(s)$ so that the following requirements are achieved as in preceding studies \cite{MT2017, TMSTMO}: \begin{itemize} \item The desingularized vector field in $\tau$-timescale is smooth (at least $C^1$ in the present argument) on $\{s\geq 0\}$; \item $T(s)$ is positive for $s>0$ (for orbital equivalence among vector fields); \item Equilibria on the horizon for the desingularized vector field are non-degenerate (in other words, hyperbolic); \item $T(s)$ is independent of the remaining $x_i$-components (for simplicity); \end{itemize} Note that time-scale desingularizations in preceding studies satisfy all such requirements, which can be proved or verified in theoretical studies \cite{Mat}, although the third requirement depends on problems. Finally, the smoothness of (\ref{eqn:desing}) including $\{s=0\}$ is ensured by the existence of $C^1$-extensions of $h_{k,\alpha;m}(s)$ over $s\in \mathbb{R}$, as shown in Lemma \ref{lem-h}. \end{rem} The Jacobian matrix of the vector field (\ref{eqn:desing}) is given by \begin{align} \notag \frac{\partial f_{N/2}}{\partial s} &= -mh_{m+1,1;m}(s) \Delta_{N/2} - \lambda ,\\ \notag \frac{\partial f_{N/2}}{\partial x_j} &= -(\delta_{j,N/2-1} + \delta_{j,N/2+1})N^2 h_{0,1;m}(s) \quad (j\not = N/2),\\ \notag \frac{\partial f_i}{\partial s} &= (1-ms^{-m}) h_{2,1;m}(s) (x_i \Delta_{N/2} - \Delta_{i}) - \lambda m(x_i^m-1) h_{m+1,1-x_i^m;m}(s)\quad (i\not = N/2), \\ \notag \frac{\partial f_i}{\partial x_j} &= - h_{1,1;m}(s) \Delta_{N/2} \delta_{ij} -N^2 x_i h_{1,1;m}(s) (\delta_{j,N/2-1} + \delta_{j,N/2+1}) - \lambda \delta_{ij}\\ \notag &\quad + N^2 h_{1,1;m}(s) \{(1-\delta_{i-1, N/2}) \delta_{i-1, j}(1-\delta_{i-1, 0}) -2\delta_{i,j}\\ \label{Jacobi} &\quad + (1-\delta_{i+1, N/2}) \delta_{i+1,j} (1-\delta_{i+1, N}) \} - m\lambda x_i^{m-1} \delta_{i,j} h_{m,1-x_i^m;m}(s)\quad (i,j\not = N/2), \end{align} where we have used the (formal) convention $x_{N/2} \equiv 1$ and $\delta_{j,k}$ denotes the Kronecker delta. Note that exponential nonlinearities appear as {\em exponential decay effects on off-diagonal terms}. Also, the inequality $x_i \leq 1$ is required for $i=1,\cdots, N-1$ for the boundedness of exponential terms $h_{1,1-x_i^m;m}(s)$. In the same argument as \cite{Mat}, we can prove that divergent solutions of (\ref{main-eq}) correspond to global trajectories of (\ref{eqn:desing}) in $\{s>0\}$ asymptotic to equilibria (or general invariant sets) on the horizon $\{s=0\}$. If, moreover, we can prove that maximal existence times $t_{\max}$ of calculated solutions shown below are finite, then the corresponding divergent solutions are actually blow-up solutions. Therefore, the following procedure can realize rigorous computations of blow-up solutions. \section{Numerical validation procedure} \label{section-procedure} Here, we explain how we validate the rigorous blow-up solutions for \eqref{main-eq} as well as their blow-up times. As mentioned before, our present methodology is essentially same as that in the preceding works \cite{MT2017, TMSTMO}. It proceeds in the following steps: \begin{description} \item[Step 1.] Determine an equilibrium on the horizon $p_\ast = (0, x_\ast)$. \item[Step 2.] Validate a \emph{Lyapunov function} $L = L(s,x)$ with $L(0, x_\ast) = 0$ by the procedure given in \cite{MHY2016} as well as its \emph{Lyapunov domain} including $\Omega:=\{(s,x)\in \mathbb{R}_{\ge 0}\times\mathbb{R}^{N-2}\mid L(s,x)\le\epsilon\}$. \item[Step 3.] Validate $(s(\bar{\tau}),x(\bar{\tau}))\in\mathrm{Int}~\Omega\cap \{s>0\}$. \item[Step 4.] Obtain rigorous inclusion of the blow-up time. \end{description} Firstly, in {\bf Step 1}, an equilibrium on the horizon is obtained by some elementary calculations. Such a point is the origin of $(s,x)$-coordinate, which is an equilibrium of the desingularized vector field (\ref{eqn:desing}). Moreover, the equilibrium is asymptotically stable because the Jacobian matrix of the desingularized vector field (\ref{Jacobi}) becomes $\mathrm{diag}([-1,-1,\dots,-1])$ as $s\to 0$. \par Secondly, in {\bf Step 2}, we validate the Lyapunov function in the neighborhood of the equilibrium $(s_\ast,x_\ast)=(0,0,\dots,0)$. From \cite{MHY2016}, the Lyapunov function is given by \begin{equation} \label{Lyapunov} L(s,x)=(s,x)^T(s,x):=s^2+\sum_{i\neq N/2}x_i^2 \end{equation} with a certain compact set $\bar{\Omega}\subset\mathbb{R}_{\ge 0}\times\mathbb{R}^{N-2}$. Letting $Df(s,x)$ be the Jacobian matrix of the desingularized vector field at $(s,x)$, such a $\bar{\Omega}$ is validated by checking whether \[ A(s,x):=Df(s,x)^T+Df(s,x),\quad (s,x)\in\bar{\Omega} \] is strictly negative definite with \emph{interval arithmetic}. In practical implementation, we set $\epsilon$ as an upper bound of $L$ so that $\Omega_\epsilon \equiv \{L\leq \epsilon\}\subset\bar{\Omega}$. \par Thirdly, in {\bf Step 3}, we rigorously integrate the desingularized ODE until $\tau=\bar{\tau}$ so that $(s(\bar{\tau}),x(\bar{\tau}))\in\mathrm{Int}~\Omega_\epsilon\cap\{s>0\}$ holds. Finally, in {\bf Step 4}, we rigorously compute the maximal existence time from \eqref{eqn:timescaling}. It follows \begin{align*} t_{\max}&\equiv\int_{0}^{\infty}s^{-1}e^{-1/s^m}d\tau % =\int_{0}^{\bar{\tau}}s^{-1}e^{-1/s^m}d\tau+\int_{\bar{\tau}}^{\infty}s^{-1}e^{-1/s^m}d\tau\\ &\equiv \bar{t}+\int_{\bar{\tau}}^{\infty}s^{-1}e^{-1/s^m}d\tau. \end{align*} Because we already obtain the trajectory $(s,x)$ until $\tau=\bar{\tau}$, $\bar{t}$ is rigorously computable by \emph{interval arithmetic}. The second term is estimated by the \emph{Lyapunov tracing} discussed in \cite{MHY2016,TMSTMO}. The basic idea is that a fundamental property of Lyapunov function follows \begin{align}\label{eqn:LT} \left.\frac{dL}{d\tau}\left(s(\tau),x(\tau)\right)\right|_{\tau=\bar{\tau}}\le -c_{\bar{\Omega}}L(s(\bar{\tau}),x(\bar{\tau})), \end{align} which is strictly negative as long as $(s(\bar{\tau}),x(\bar{\tau}))\not =(s_\ast,x_\ast)$. Here, $c_{\bar{\Omega}}$ is a positive constant involving eigenvalues of $A(s, x)$ whose details are shown in \cite{TMSTMO}. From $s\le L(s,x)^{1/2}(\le 1)$ and \eqref{eqn:LT}, we have \begin{align} \notag \int_{\bar{\tau}}^{\infty}s^{-1}e^{-1/s^m}d\tau \notag &\le \int_{\bar{\tau}}^{\infty}L(s,x)^{-1/2}e^{-1/L(s,x)^{m/2}}d\tau \le -\int_{L(s(\bar{\tau}),x(\bar{\tau}))}^{0}L^{-1/2}e^{-1/L^{m/2}}\frac{dL}{c_{\bar{\Omega}}L^{(m+1)/2}}\\ \notag &=\frac{2}{c_{\bar{\Omega}}m}\int_0^{L(s(\bar{\tau}),x(\bar{\tau}))} \frac{m}{2}L^{-(m/2)-1}e^{-1/L^{m/2}}dL \notag =\frac{2}{c_{\bar{\Omega}}m}e^{-1/L(s(\bar{\tau}),x(\bar{\tau}))^{m/2}}\\ \label{eqn:final_extimate} &\le\frac{2}{c_{\bar{\Omega}}m}e^{-1/\epsilon^{m/2}}. \end{align} Now $\bar t$ also has a non-trivial error bound $[\bar{t}_{{\rm low}}, \bar{t}_{{\rm up}}]$ so that $\bar{t}\in [\bar{t}_{{\rm low}}, \bar{t}_{{\rm up}}]$, which is mainly due to rigorous enclosure estimates and rounding errors for validating $\bar{t}$. The computable bound of $t_{\max}$ is thus given as follows: \begin{align} \label{eqn:blowuptime} t_{\max}\in \left[\bar{t}_{{\rm low}}, \bar{t}_{{\rm up}}+\frac{2}{c_{\bar{\Omega}}m}e^{-1/\epsilon^{m/2}}\right]. \end{align} \begin{rem} \label{rem-Lyap} Our construction methodology of Lyapunov functions (e.g. \cite{MHY2016}) are based on an appropriate choice of coordinates around equilibria (on the horizon). The choice can be typically realized by computing eigenvectors of the Jacobian matrices at equilibria, which works successfully {\em if all eigenvalues are simple}. On the other hand, if there is an eigenvalue with non-trivial multiplicity, we cannot apply the above procedure to Lyapunov function validations because candidates of coordinate transformation can be singular with ordinary numerical procedures. We easily know that we face this difficulty in the present situation. Indeed, $-1$ is the only eigenvalue of the Jacobian matrix with multiplicity $N-1$, as seen in (\ref{Jacobi}). An alternative way for constructing Lyapunov functions is to apply Schur decomposition of squared matrices, which can be applied regardless of multiplicity of eigenvalues. Details are shown in \cite{MT2017}. \end{rem} The above procedure provides the direct proof of blow-ups for validated solutions {\em in a quantitative way}. If we only aim at proving that the validated solution blows up, namely without any concrete data for $t_{\max}$, the asymptotic study around equilibria on the horizon based on arguments in \cite{Mat} is applied. Using the asymptotic method, we can also calculate the blow-up rate of blow-up solutions (see \cite{MT_Supp} for details). The series of studies reveals {\em a qualitative nature} of validated blow-up solutions. \section{Numerical validation results} \label{section-result} In this section, we show numerical results of our numerical validation procedure. All computations are carried out on \emph{Bash on Ubuntu on Windows} (ver.\ 16.04), Intel(R) Core(TM) i7-6700K CPU @ 4.00 GHz, using the \emph{kv library} \cite{kv} (ver.\ 0.4.44) to rigorously compute the trajectories of ODEs. All codes used to produce the results in this section are freely available from \cite{bib:codes}. We consider \eqref{main-eq} with the following initial values: \begin{equation} \label{initial-1} u_i(0)=2.5(1-\cos(2\pi y_i))\quad (i=1,2,\dots,N-1) \end{equation} for $m=1$, while \begin{equation} \label{initial-2} u_i(0)= 1-\cos(2\pi y_i)\quad (i=1,2,\dots,N-1) \end{equation} for $m=2$. The corresponding initial data of the desingularized vector field is obtained by \begin{align*} s(0)&=\frac{1}{u_{N/2}(0)},\quad x_i(0)=\frac{u_i(0)}{u_{N/2}(0)}~\quad (i=1,\cdots, N-1,\ i\neq N/2). \end{align*} Our concerning blow-up solutions are trajectories of desingularized vector fields asymptotic to equilibria on the horizon $\{s=0\}$. As shown in Section \ref{section-procedure}, such equilibria are located at the origin of $(s,x)$-coordinate. We validate global trajectories of desingularized vector fields asymptotic to the above equilibria with various $N$. Validated results are collected in Tables \ref{Tab:Ex1} and \ref{Tab:Ex1-m2}. \begin{table}[t] \caption{Validated results with $m=1, \lambda = 1$.} Numerical validations prove that $x(\bar{\tau})\in \mathrm{Int}~\Omega_\epsilon \cap \{s>0\}$. Furthermore, the rigorous inclusion of the blow-up time $t_{\max}$ is given by the estimate \eqref{eqn:blowuptime} derived in Section \ref{section-procedure}. \centering \begin{tabular}{ccccc} \hline $N$ & $\epsilon$ & $\bar{\tau}$ & $t_{\max}$ & Exec. time\\ \hline\\[-2mm] $6$ & $8.02\times 10^{-4}$ & $7.84$ & $0.01223337668427_{7321}^{9155}$ & 4.62 sec.\\[1mm] $8$ & $4.11\times 10^{-4}$ & $8.91$ & $0.01384523095580_{1453}^{4485}$ & 9.19 sec.\\[1mm] $16$ & $2.81\times 10^{-4}$ & $9.91$ & $0.016198636686_{697263}^{705484}$ & 55 sec.\\[1mm] $32$ & $2.32\times 10^{-4}$ & $10.69$ & $0.0167435816193_{27058}^{4389}$ & 8 min. 33 sec.\\[1mm] $64$ & $2.32\times 10^{-4}$ & $11.03$ & $0.016874700587_{695561}^{743364}$ & 206 min.\\[1mm] $128$ & $2.32\times 10^{-4}$ & $11.44$ & $0.016907356858_{239547}^{428993}$ & 11975 min.\\[1mm] \hline \end{tabular}% \label{Tab:Ex1} \end{table} \begin{table}[t] \caption{Validated results $m=2, \lambda = 1$.} \centering \begin{tabular}{ccccc} \hline $N$ & $\epsilon$ & $\bar{\tau}$ & $t_{\max}$ & Exec. time\\ \hline\\[-2mm] $6$ & $7.74\times 10^{-2}$ & $2.97$ & $0.00802832814043_{64432}^{80097}$ & 4.75 sec.\\[1mm] $8$ & $7.74\times 10^{-2}$ & $3.33$ & $0.00957793313008_{01847}^{33888}$ & 9.48 sec.\\[1mm] $16$ & $2.53\times 10^{-2}$ & $5.11$ & $0.0143478876488_{81462}^{99567}$ & 1 min. 9 sec.\\[1mm] $32$ & $2.53\times 10^{-2}$ & $5.69$ & $0.0158714079811_{16483}^{61379}$ & 10 min. 58 sec.\\[1mm] $64$ & $1.48\times 10^{-2}$ & $6.61$ & $0.01623711832_{0909481}^{1036679}$ & 242 min. 44 sec. \\[1mm] $128$ & $1.48\times 10^{-2}$ & $7.01$ & $0.016328860059_{168021}^{672886}$ & 19049 min. 2 sec.\\[1mm] \hline \end{tabular}% \label{Tab:Ex1-m2} \end{table} \begin{figure}[htbp] \centering \begin{minipage}{0.45\hsize} \centering \includegraphics[width=5.5cm]{figs/rigorous_N=128.png}\\ (i \end{minipage} \begin{minipage}{0.45\hsize} \centering \includegraphics[width=5.5cm]{figs/profile_m=2_N=128.png}\\ (ii \end{minipage} \caption{Validated blow-up solution profiles for \eqref{main-eq} with $N=128$: $(t,y,u)$-plot. (i) $m=1$. (ii) $m=2$.} \label{fig_rigorous} \end{figure} Applying asymptotic studies of solutions for (\ref{eqn:desing}) to the present blow-up solutions, we obtain the following result. This result characterizes both quantitative and qualitative natures of validated blow-up solutions. See \cite{MT_Supp} for details of asymptotic behavior of validated solutions. \begin{car} Consider (\ref{main-eq}) with $m=1$, $\lambda = 1$, fixed $N$ and initial data (\ref{initial-1}). Then, for $N=6,8,16,32,64,128$, the solution $\{u_i(t)\}_{i=1}^{N-1}$ blows up at $t = t_{\max} < \infty$, where the $t_{\max}$ is a value inside intervals listed in Table \ref{Tab:Ex1}. Similarly, replacing $m$ by $2$ and (\ref{initial-1}) by (\ref{initial-2}), we have blow-up validation results with information listed in Table \ref{Tab:Ex1-m2}. Moreover, all blow-up solutions have the following asymptotic behavior: $u_{N/2}(t) \sim C\left[\ln\{(t_{\max} - t)^{-1}\}\right]^{1/m}$ as $t\to t_{\max}$ for positive $C$. \end{car} Validated blow-up profiles with $N=128$ and $m=1,2$, respectively, are shown in Figure \ref{fig_rigorous}. \subsection{Practical implementation of enclosures for exponential terms} In practical computations, we have to care about the treatment of functions of the form $h_{k,\alpha;m}(s) = s^{-k}e^{-\alpha / s^m}$ near $s=0$. Actually, the result of numerical computation for $h_{k,\alpha;m}(s)$ becomes infinity near $s=0$, which is due to {\em zero division}, while the function originally goes to zero as $s\to 0$ for appropriate positive values $(k,\alpha,m)$. In order to overcome this difficulty, we have applied the monotonous behavior of $h_{k,\alpha;m}(s)$ to implementations for rigorous computations of functions of the form $h_{k,\alpha;m}(s)$ as $s\to 0$. Observe that, for a positive integers $k, m$ and a real number $\alpha$, $h_{k,\alpha;m}(s)$ is monotonously increasing for sufficiently small but computable $\bar s$ and all $s\in (0,\bar s)$ from Lemma \ref{lem-h}. Therefore, the function $h_{k,\alpha;m}(s)$ over $[0, \bar{s}]$ is included in the interval $[0, \overline{h_{k,\alpha;m}(\bar{s})}]$ provided $s \in [0,\bar{s}]$, where $\overline{h_{k,\alpha;m}(\bar{s})}$ denotes a computable upper bound of $h_{k,\alpha;m}(\bar{s})$ via interval arithmetic. As seen below, the exact value of $\overline{h_{k,\alpha;m}(\bar{s})}$ is extremely small for relatively small $\bar{s}$, which helps us with validating targeting objects with very high accuracy. \subsection{Origin of error bounds for $t_{\max}$} The value of $e^{-1/\epsilon^{m/2}}$ in the rightmost-hand side of \eqref{eqn:final_extimate} becomes extremely small. For example, if we put $N = 6$, $m=1$ and $\epsilon = 8.02\times 10^{-4}$, then the upper bound of $t_{\max} - \bar{t}$ is $5.5795557144609417\times 10^{-309}$. Several typical values of $h_{1,1;m}(\bar s)$ are listed in Table \ref{Tab:Ex2}. The listed data indicate that $h_{1,1;m}(\bar s)$ is, even for relatively large value $\bar s = 0.02$ in our validations, much less than the machine epsilon $\epsilon_{\rm double} \equiv 2^{-52} \approx 2.22 \times 10^{-16}$ in double-precision arithmetics. Even in quadruple precision arithmetics, $h_{1,1;m}(\bar s)$ is much less than the corresponding machine epsilon $\epsilon_{\rm quad} \equiv 2^{-112} \approx 1.926 \times 10^{-34}$ for $\bar s = 0.01$. Therefore, the bound (\ref{eqn:final_extimate}) results in multiples of the machine epsilon and the main error of $t_{\max}$ is the difference $\bar t_{\rm up} - \bar t_{\rm low}$; the maximal numerical error of \begin{equation*} \bar{t} = \int_0^{\bar{\tau}} s(\tau)^{-1}e^{-1/s(\tau)^m}d\tau \end{equation*} along the component $s(\tau)$ of solution trajectories. Note that, in previous studies \cite{MT2017, TMSTMO}, the lower bound of constant $c_{\bar{\Omega}}$ or fractional power of $\epsilon$ corresponding to the rightmost term in (\ref{eqn:final_extimate}) have also caused expansion of error bounds for $t_{\max}$. In the present case, on the other hand, the exponential decay term drastically decreases such effects. \begin{table}[t] \caption{Values of function $h_{1,1;1}(s)$.} \centering \begin{tabular}{cc} \hline $s$ & $h_{1,1;1}(s)$\\ \hline\\[-2mm] $0.1$ & $4.539992\times 10^{-4}$ \\[1mm] $0.05$ & $4.12230724\times 10^{-8}$ \\[1mm] $0.02$ & $9.6437492\times 10^{-21}$ \\[1mm] $0.01$ & $3.720076\times 10^{-42}$ \\[1mm] \hline \end{tabular}% \label{Tab:Ex2} \end{table} \begin{rem} Here, we discuss the potential for validating solutions depending on the form of original problems. In the previous studies, finite-difference discretization of PDEs with polynomial nonlinearity are treated as test examples. In examples shown in \cite{MT2017, TMSTMO}, validations are failed around $N \leq 20$. On the other hand, we have succeeded validating blow-up solutions until (at least) $N=128$ in the present study. We think of the reason very briefly. The function $h_{k,\alpha;m}(s)$ achieves sufficiently small values for relatively small $s$, in which case the vector field (\ref{eqn:desing}) is approximately governed by \begin{equation} \label{eqn:desing-approx} \dot s \approx - s,\quad \dot x_i \approx - x_i\quad (i\not = N/2), \end{equation} and the errors are at most on the order of machine epsilon. Therefore, there are little overestimation due to interval arithmetic, i.e. wrapping effects and any other expanding effects of enclosures due to interactions by other variables during integration of vector fields. This observation reveals another essence of successful validations in wide range of $N$, which is a good choice of coordinates (or compactifications). The equation (\ref{eqn:desing-approx}) is almost diagonal and linear. According to preceding results in \cite{MT2017, TMSTMO}, if we choose other compactifications (such as Poincar\'{e} type), very limited validation results are obtained. It is also shown in \cite{MT2017} that, if we choose directional-type compactificaitons like (\ref{compactification}), wider range of validation results are obtained. Typically, directional-type compactifications and appropriate change of coordinates simplify vector fields near equilibria on the horizon. The vector field (\ref{eqn:desing-approx}) can be approximately the simplest one in the sense that {\em dynamics of all components are decoupled from each other}, at least near equilibria on the horizon, although it is {\em not} the case of studies in \cite{MT2017}. Summarizing these observations, {\em good choice of coordinates or compactifications} so that dynamics around equilibria on the horizon becomes as simple as possible, and {\em rapid decay effects} of error terms like exponential decay can extend the range of applicability of proposing blow-up validation methodology. \end{rem} \section{Conclusion and Discussions} \label{section-discussion} In this paper, we have discussed numerical validations of blow-up solutions for ordinary differential equations with exponential nonlinearity. The present system is dominated by exponential terms near infinity which treatments in preceding studies (e.g. \cite{Mat, MT2017, TMSTMO}) cannot be directly applied. Nevertheless, the special homogeneity enables us to apply the similar approach to asymptotically homogeneous cases to studying blow-up behavior of solutions. A fundamental guideline presented in \cite{Mat, TMSTMO} leads to an appropriate choice of desingularization to the present problem and numerical validation of blow-up solutions. In the present case, exponential nonlinearity is transformed into exponential {\em decays} for transformed vector fields, which enables us to operate accurate validations. From the viewpoint of numerical validations, computations of the form $s^{-k}e^{-\alpha/s^m}$ have to be dealt with carefully because of the presence of zero division. We have applied the monotonous behavior of the function to obtaining the rigorous computable enclosure, which validates various objects effectively. In particular, our present study has revealed that the theoretical error bound $t_{\max}-\bar t$, presented in (\ref{eqn:final_extimate}), is extremely small because of the exponential decay properties of a priori error bounds. Exponential decay effects also give a potential to increase the number of discretization $N$ such that numerical validation of blow-up solutions is successful with relatively large $\epsilon$. \section*{Acknowledgement} KM was partially supported by World Premier International Research Center Initiative (WPI), Ministry of Education, Culture, Sports, Science and Technology (MEXT), Japan, and JSPS Grant-in-Aid for Young Scientists (B) (No.\ 17K14235). AT was partially supported by JSPS Grant-in-Aid for Early-Career Scientists (No.\ 18K13453). \bibliographystyle{plain}
\section{Introduction} Stable looptrees are a class of random fractal objects indexed by a parameter $\alpha \in (1,2)$ and can informally be thought of as the dual graphs of stable trees. Motivated by \cite{LeGMiermontScalingLimitsLargeFaces}, they were originally introduced by Curien and Kortchemski in \cite{RSLTCurKort}, and along with their discrete counterparts have been shown to be of increasing significance in the study of statistical mechanics models on random planar maps. For example, the same authors showed in \cite{CurKortUIPTPerc} that a stable looptree arises as the scaling limit of the boundary of a critical percolation cluster on the UIPT, and Richier showed in \cite{RichierIICUIHPT} that the incipient infinite cluster of the UIHPT has the form of an infinite discrete looptree. Further results along these lines can be found in \cite{CurKortUIPTPerc}, \cite{CurKortDuqMan}, \cite{StefStufBolzOuterplanar}, \cite{BaurRichUIPQSkew}, \cite{CurRichDualityRPMPerc} and \cite{KortRichBoundaryRPMLooptrees}, though this is a very non-exhaustive list. More generally, they also arise as the scaling limits of boundaries of stable maps \cite{RichierMapBoundaryLimit}, and are emerging as an important tool in the programme to reconcile the theories of random planar maps and Liouville quantum gravity, demonstrated for example in \cite{MillSheff}, \cite{GwynnePfefferConnectivitySLE} and \cite{BernardiHoldenSun}. \begin{figure}[h] \includegraphics[width=14cm]{loopdiscretee-eps-converted-to} \centering \caption{A tree $T$ and the looptree $\textsf{Loop} (T)$.}\label{fig:disc looptree intro} \end{figure} Given a discrete tree $T$, the corresponding discrete looptree ${\textsf{Loop}}(T)$ as defined in \cite{RSLTCurKort} is constructed by replacing each vertex $u \in T$ with a cycle of length equal to the degree of $u$ in $T$, and then gluing these cycles along the tree structure of $T$. This is illustrated in Figure \ref{fig:disc looptree intro}. This operation can also be applied in the case where $T$ is an infinite tree. If $T$ is rooted, we will take the convention that the root of $\textsf{Loop} (T)$ is the vertex of $\textsf{Loop} (T)$ corresponding to the edge of $T$ joining the root of $T$ to its first child. In this article we will mainly be interested in the case where our tree $T$ has a critical offspring distribution in the domain of attraction of an $\alpha$-stable law, by which we mean that there exists an increasing sequence $a_n \uparrow \infty$ such that, if $(\xi^{(i)})_{i=1}^{\infty}$ are i.i.d. copies of $\xi$, then \begin{equation*}\label{eqn:dom of att def} \frac{\sum_{i=1}^n \xi^{(i)} - n}{a_n} \overset{(d)}{\rightarrow} Z_{\alpha} \end{equation*} as $n \rightarrow \infty$, where $Z_{\alpha}$ is an $\alpha$-stable random variable (and can be normalised so that $\E{e^{-\lambda Z_{\alpha}}} = e^{-\lambda^{\alpha}}$ for all $\lambda > 0$). It is shown in \cite[Section 8.3.2]{BGTRegVariation} that necessarily $a_n = n^{\frac{1}{\alpha}}L(n)$ for some slowly-varying function $L$, where we recall that slowly varying means that $L(x) > 0$ for all sufficiently large $x$, and $\lim_{x \rightarrow \infty} \frac{L(tx)}{L(x)} = 1$ for all $t>0$. Equivalently, $\xi([n, \infty)) = k^{-\alpha} L(n)$. In the case where $\xi([n, \infty)) \sim cn^{-\alpha}$ as $n \rightarrow \infty$, we can take $a_n = (c |\Gamma(-\alpha)|n)^{\frac{1}{\alpha}}$. Throughout the article we will make the assumption that $\alpha \in (1,2)$. In \cite[Theorem 4.1]{RSLTCurKort}, it is shown that if $T_n$ is a Galton Watson tree conditioned to have $n$ vertices with offspring distribution $\xi$ in the domain of attraction of an $\alpha$-stable law, then we can define the $\alpha$-stable looptree (which we denote by $\L_{\alpha}$) to be the random compact metric space such that \[ a_n^{-1} {\textsf{Loop}}(T_n) \overset{(d)}{\rightarrow} \L_{\alpha} \] in the Gromov-Hausdorff topology as $n \rightarrow \infty$. A simulation is shown in Figure \ref{fig:stable looptree intro}. In the case $\alpha = 2$, the looptrees instead rescale to the Brownian Continuum Random Tree \cite[Theorem 2]{KortRichCondensationCritical}. \begin{figure}[h] \includegraphics[width=10cm]{loop.pdf} \centering \caption{Simulation of a stable looptree, by Igor Kortchemski.}\label{fig:stable looptree intro} \end{figure} The main purpose of this paper is to give a construction of infinite stable looptrees. The construction is similar in spirit to Duquesne's construction of stable sin-trees in \cite{DuqSinTree}, which is the continuum analogue of Kesten's discrete construction of an infinite critical tree. Additionally, infinite discrete looptrees have been defined by Bj\"ornberg and Stef\'ansson in \cite{BjornStef} by applying a related loop operation to Kesten's infinite critical tree $T_{\infty}$, and similarly by Richier in \cite{RichierIICUIHPT} by applying a similar operation to a two-type version of Kesten's tree. As is done for stable sin-trees in \cite{DuqSinTree}, we define the infinite stable looptree $\L^{\infty}_{\alpha}$ from two independent stable L\'{e}vy processes, each of which is used to code the looptree on one side of its singly infinite loopspine. This is the construction suggested in \cite[Section 6]{RichierIICUIHPT} and is the natural extension of the coding mechanism used to define stable looptrees from stable L\'{e}vy excursions. The construction is given in Section \ref{sctn:construction of infinite stable looptrees}. The remainder of the article is devoted to proving various limit theorems to justify the definition, and then using these to make deductions about Brownian motion on compact stable looptrees, which is explored more deeply in the companion paper \cite{ArchBMCompactLooptrees}. In particular, we prove a local limit theorem showing that $\L^{\infty}_{\alpha}$ can be characterised as the local limit of compact stable looptrees, and also as the scaling limit of infinite discrete looptrees. When combined with earlier results of Curien and Kortchemski, Bj\"ornberg and Stef\'ansson, and Richier, this shows that the diagram of Figure \ref{fig:commuting diag intro} commutes as indicated. \begin{figure}[h] \begin{center} \includegraphics[width=13cm]{commutinglooptreediagramsmalll-eps-converted-to} \caption{Commuting Diagram.}\label{fig:commuting diag intro} \end{center} \end{figure} We start by giving the local limit result. In what follows, we let $\L^{\l}_{\alpha}$ be a compact stable looptree conditioned to have total volume $\l$, and let $\L_{\alpha}^{\infty}$ be as above. We recall from \cite{RSLTCurKort} that $\L^{\l}_{\alpha}$ is endowed with a measure $\nu^{\l}$ which can be thought of as the natural analogue of uniform measure on $\L^{\l}_{\alpha}$. We will define a similar measure on $\L^{\infty}_{\alpha}$ in Section \ref{sctn:construction of infinite stable looptrees}, and denote it by $\nu^{\infty}$. We also recall from \cite{RSLTCurKort} (respectively \cite{ArchBMCompactLooptrees}) that there is a natural way to define shortest-distance metric (respectively a resistance metric) on $\L^{\l}_{\alpha}$, and we will define analogous metrics for $\L^{\infty}_{\alpha}$ in Section \ref{sctn:construction of infinite stable looptrees}. \begin{theorem}\label{thm:LLT} Let $\L^{\l}_{\alpha}$ be a compact stable looptree conditioned to have mass $\l$, and let $\L_{\alpha}^{\infty}$ be as above. Then, \begin{equation*} (\L^{\l}_{\alpha}, \d^{\l}, \nu^{\l}, \rho^{\l}) \overset{(d)}{\rightarrow} (\L_{\alpha}^{\infty}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \end{equation*} as $\l \rightarrow \infty$, with respect to the Gromov-Hausdorff-vague topology. Here $\d^{\l}$ and $\d^{\infty}$ can denote either the geodesic metrics, or the effective resistance metrics on the respective spaces. \end{theorem} Similarly, we prove the following scaling result. \begin{theorem}\label{thm:main scaling lim} Let $T_{\alpha}^{\infty}$ denote Kesten's tree with critical offspring distribution in the domain of attraction of an $\alpha$-stable law. Also let $\nu^{\text{disc}}$ denote the measure that gives mass $1$ to every vertex of \textsf{Loop}($T_{\alpha}^{\infty}$). Then \[ (\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1} \d, n^{-1} \nu^{\text{disc}}, \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff vague topology as $n \rightarrow \infty$. Here $\d$ and $\d^{\infty}$ can denote either the geodesic metrics, or the effective resistance metrics on the respective spaces. \end{theorem} We will see in Section \ref{sctn:scaling lims} that similar results hold for the infinite discrete looptrees defined in \cite{BjornStef} and \cite{RichierIICUIHPT}. Given these two theorems, we are also in the right setting to apply results of \cite{DavidResForms} regarding limits for stochastic processes on these spaces. In particular, we obtain the following results. Note that we formally define Brownian motion on stable looptrees in the article \cite{ArchBMCompactLooptrees} by defining it to be the stochastic process naturally associated with the effective resistance metric on them. In Section \ref{sctn:construction of infinite stable looptrees}, we similarly define an effective resistance metric on $\L^{\infty}_{\alpha}$ and in Section \ref{sctn:RW consequences} we define Brownian motion on $\L^{\infty}_{\alpha}$ to be the associated stochastic process. We denote it by $B^{\infty}$. For convenience, we restrict to the case where $\l$ takes integer values below, but the result holds along any countable subsequence diverging to infinity. \begin{theorem}\label{thm:main RW LLT conv} Let $(B^{\l}_t)_{t \geq 0}$ be Brownian motion on $\L^{\l}_{\alpha}$, and let $(B^{\infty}_t)_{t \geq 0}$ be Brownian motion on $\L^{\infty}_{\alpha}$. Then there exists a probability space $(\Omega', \mathcal{F}', \mathbf{P}')$ on which we can almost surely define a metric space $(M, R_M)$ in which the spaces $(\L^{\l}_{\alpha}, R^{\l}, \nu^{\l}, \rho^{\l})$ and $(\L_{\alpha}^{\infty}, R^{\infty}, \nu^{\infty}, \rho^{\infty})$ can all be embedded and such that \[ (\L^{\l}_{\alpha}, R^{\l}, \nu^{\l}, \rho^{\l}) \rightarrow (\L_{\alpha}^{\infty}, R^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff-vague topology as $\l \rightarrow \infty$, and the required Hausdorff convergence specifically holds in the metric space $(M, R_M)$. Letting $(B^{\l})_{\l \geq 1}$ and $B^{\infty}$ be as above, we have that \[ (B^{\l}_t)_{t \geq 0} \overset{(d)}{\rightarrow} (B^{\infty}_t)_{t \geq 0} \] as $\l \rightarrow \infty$, considered on the space $C(\mathbb{R}^+, M)$ endowed with the topology of uniform convergence on compact time intervals. \end{theorem} \begin{theorem}\label{thm:RW conv infinite intro} Let $(\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1}\d, n^{-1} \nu^{\text{disc}}, \rho)$ be as in Theorem \ref{thm:main scaling lim}. Then there exists a probability space $(\Omega'', \mathcal{F}'', \mathbf{P}'')$ on which we can almost surely define a metric space $(M, R_M)$ in which the spaces $(\textsf{Loop}(T_{\alpha}^{\infty}), Ca_n^{-1} \d, n^{-1} \nu^{\text{disc}}, \rho)$ and $(\L_{\alpha}^{\infty}, {\d}^{\infty}, \nu^{\infty}, \rho^{\infty})$ can all be embedded and such that \[ (\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1} \d, n^{-1} \nu^{\text{disc}}, \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff-vague topology as $n \rightarrow \infty$, and the required Hausdorff convergence specifically holds on the metric space $(M, R_M)$. Letting $Y$ be a simple random walk on $\textsf{Loop}(T_{\alpha}^{\infty})$, and $B^{\infty}$ be as above, we have that \[ (a_n^{-1} Y_{\lfloor 4n a_n t \rfloor})_{t \geq 0} \overset{(d)}{\rightarrow} (B^{\infty}_t)_{t \geq 0} \] on the space $D(\mathbb{R}^+, M$) endowed with the Skorohod-$J_1$ topology as $n \rightarrow \infty$. \end{theorem} Again, we will prove a similar result for random walks on the other infinite discrete looptrees in Section \ref{sctn:RW consequences}, along with annealed versions, but the one above is easiest to state as all vertices have degree $4$ in \textsf{Loop}($T_{\infty}$). The process $B^{\infty}$ is considered further in Section \ref{sctn:RW consequences} where we prove the following results about the spectral dimension of $\L^{\infty}_{\alpha}$. Recall that the spectral dimension of $\L^{\infty}_{\alpha}$ is defined as \begin{equation}\label{eqn:trans dens def} d_S(\L^{\infty}_{\alpha}) = \lim_{t \rightarrow \infty} \frac{-2\log( p^{\infty}_t(\rho^{\infty}, \rho^{\infty}))}{\log t}, \end{equation} where $p^{\infty}_t(\cdot, \cdot)$ is the transition density of the Brownian motion $B^{\infty}$ defined above, i.e. a symmetric $\nu^{\infty} \times \nu^{\infty}$-measurable function on $\L^{\infty}_{\alpha} \times \L^{\infty}_{\alpha}$ such that \[ \estartb{f(B_t)}{x} = \int_{\L^{\infty}_{\alpha}} f(y) p_t(x,y) \nu^{\infty} (dy) \] for all bounded, $\nu^{\infty}$-measurable functions $f$ on $\L^{\infty}_{\alpha}$ and $\nu^{\infty}$-almost every $x \in \L^{\infty}_{\alpha}$. We assume that $\L^{\infty}_{\alpha}$ is defined on the probability space $(\Omega, \mathcal{F}, \mathbf{P})$, and let $\mathbf{E}$ denote expectation on this space. \begin{theorem}\label{thm:main spec dim quenched} $\mathbf{P}$-almost surely, $d_S(\L^{\infty}_{\alpha}) = \frac{2\alpha }{\alpha + 1}$. \end{theorem} In light of Theorem \ref{thm:main spec dim quenched}, we call $d_S(\L^{\infty}_{\alpha})$ the \textit{quenched} spectral dimension. We also define the \textit{annealed} spectral dimension as \[ d^a_S(\L^{\infty}_{\alpha}) = \lim_{t \rightarrow \infty} \frac{-2\log( \Eb{p^{\infty}_t(\rho^{\infty}, \rho^{\infty})})}{\log t}. \] For a general space, the annealed heat kernel is trickier to bound than the quenched one defined above, since the expected transition density may not be finite. This is the case, for example, for the trees with heavy-tailed offspring distributions considered in \cite{CroyKumRWGWTreeInfiniteVar}. In the case of stable looptrees however we are able to bound this using the volume and resistance estimates of Section \ref{sctn:vol bounds and spectral dim infinite}, and then utilise scaling invariance of $\L^{\infty}_{\alpha}$ to prove the following (more precise) result. \begin{theorem}\label{thm:main spec dim annealed} We have that \[ d^a_S(\L^{\infty}_{\alpha}) = \frac{2\alpha }{\alpha + 1}. \] Moreover, there exists a constant $c_1 \in (0, \infty)$ such that $\Eb{p^{\infty}_t(\rho^{\infty}, \rho^{\infty})} = c_1 t^{\frac{-\alpha}{\alpha + 1}}$. \end{theorem} Both the quenched and annealed spectral dimensions match those obtained for the infinite discrete looptrees defined from offspring distributions in the domain of attraction of an $\alpha$-stable law in \cite{BjornStef}. The results of this paper and in particular Theorem \ref{thm:LLT} are applied in the paper \cite{ArchBMCompactLooptrees} to prove various limit results for volumes of small balls in compact stable looptrees, and also to obtain limiting heat kernel estimates in the regime $t \downarrow 0$. We refer the reader directly to \cite{ArchBMCompactLooptrees} for more details. Moreover, Richier showed in \cite{RichierIICUIHPT} that the incipient infinite cluster (IIC) of the Uniform Infinite Half-Planar Triangulation has the structure of an infinite discrete looptree, but where each of the loops are filled with independent critically percolated Boltzmann triangulations. The size of the loops of this looptree are given by a distribution in the domain of attraction of a $\frac{3}{2}$-stable law and Theorem \ref{thm:Rich looptree conv} will imply that the boundary of this cluster converges after rescaling to the infinite stable looptree $\L_{3/2}^{\infty}$. The question of the scaling limit of the whole cluster is more subtle but is conjectured to be the $\frac{7}{6}$-stable map \cite[Section 5.4]{BerCurMierPerconTriang}, and we hope the methods used in this article will be a good starting point for studying random walks on the IIC. In particular, we anticipate that such a random walk might fall into a framework similar to the discussions of \cite{AlRuiFreiKigSSG}, in that the looptree forming the boundary of the IIC may play a role somewhat analogous to that of the classical Sierpinski gasket in \cite{AlRuiFreiKigSSG}. If this is the case, then understanding Brownian motion on $\L_{\alpha}$ and $\L^{\infty}_{\alpha}$ is an important preliminary step to understanding the scaling limit of a random walk on the IIC. This paper is organised as follows. In Section \ref{sctn:prelim} we go over some preliminaries on L\'{e}vy processes and stochastic processes associated with resistance forms. In Section \ref{sctn:tree looptree def} we give some background on random trees and looptrees and explain how the stable versions can be coded by L\'{e}vy excursions. In Section \ref{sctn:construction of infinite stable looptrees} we give our construction of $\L^{\infty}_{\alpha}$, which essentially involves replacing the L\'{e}vy excursion used to code a compact looptree by two independent L\'{e}vy processes. In Section \ref{sctn:vol bounds and spectral dim infinite} we prove some precise volume and resistance bounds for $\L^{\infty}_{\alpha}$ by making comparisons with arguments of \cite{ArchBMCompactLooptrees}. We then proceed to prove Theorems \ref{thm:LLT} and \ref{thm:main scaling lim} in Section \ref{sctn:LLT}, and explain how these are applied to study compact stable looptrees in \cite{ArchBMCompactLooptrees}. Finally, we conclude with a study of stochastic processes in Section \ref{sctn:RW consequences}, where we use Theorems \ref{thm:LLT} and \ref{thm:main scaling lim} to prove Theorems \ref{thm:main RW LLT conv} and \ref{thm:RW conv infinite intro}, and also prove Theorems \ref{thm:main spec dim quenched} and \ref{thm:main spec dim annealed}. Throughout this paper, $C, C', c$ and $c'$ will denote constants, bounded above and below, that may change on each appearance. We will use the notation $B^{\infty} (x, r)$ to denote the open ball of radius $r$ around $x$ in $\L^{\infty}_{\alpha}$, and $\bar{B}^{\infty} (x, r)$ its closure. We will instead use the superscript $\l$ to denote the corresponding quantities on a compact looptree conditioned to have mass $\l$. \textbf{Acknowledgements.} I would like to thank my supervisor David Croydon for suggesting the problem and for useful discussions, and two anonymous referees for their helpful comments on the original version of this work. I would also like to thank the Great Britain Sasakawa Foundation for supporting a trip to Kyoto during which some of this work was completed, and Kyoto University for their hospitality during this trip. \section{Preliminaries}\label{sctn:prelim} \subsection{Gromov-Hausdorff-Prohorov topologies} In order to prove convergence results for measured metric spaces such as looptrees we will work in the pointed Gromov-Hausdorff-Prohorov topology. To define this, let $\mathbb{F}$ denote the set of quadruples $(F,R,\mu,\rho)$ such that $(F,R)$ is a boundedly finite Heine-Borel metric space, $\mu$ is a locally finite Borel measure of full support on $F$, and $\rho$ is a distinguished point of $F$, which we call the root. Let $\mathbb{F}^c \subset \mathbb{F}$ denote the subset of spaces where $(F,R)$ is compact. Suppose $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$ are elements of $\mathbb{F}^c$. Given a metric space $(M, d_M)$, and isometric embeddings $\phi, \phi'$ of $(F,R)$ and $(F', R')$ respectively into $(M, d_M)$, we define $d^{GHP}_{M}\big((F,R,\mu,\rho, \phi), (F',R',\mu',\rho', \phi')\big)$ to be equal to \begin{align*}\label{eqn:GHP def} d_M^H(\phi (F), \phi' (F')) + &d_M^P(\mu \circ \phi^{-1}, \mu' \circ {\phi'}^{-1} ) + d_M(\phi (\rho), \phi' (\rho')). \end{align*} Here $d_M^H$ denotes the Hausdorff distance between two sets in $M$, and $d_M^P$ the Prohorov distance between two measures, as defined in \cite[Chapter 1]{BillsleyConv}. The pointed Gromov-Hausdorff-Prohorov distance between $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$ is given by \begin{align} \begin{split} \dGHPp{(F,R,\mu,\rho), (F',R',\mu',\rho')} = \inf_{\phi, \phi', M} d^{GHP}_{M}\big((F,R,\mu,\rho, \phi), (F',R',\mu',\rho', \phi')\big)\end{split} \end{align} where the infimum is taken over all isometric embeddings $\phi, \phi'$ of $(F,R)$ and $(F', R')$ respectively into a common metric space $(M, d_M)$. It is well-known (for example, see \cite[Theorem 2.3]{AbDelHoschNoteGromov}) that this defines a metric on the space of equivalence classes of $\mathbb{F}^c$, where we say that two spaces $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$ are equivalent if there is a measure and root preserving isometry between them. The pointed Gromov-Hausdorff distance $d_{GH}(\cdot, \cdot)$, which is defined by removing the Prohorov term from (\ref{eqn:GHP def}) above, can also be helpfully defined in terms of \textit{correspondences}. A correspondence $\mathcal{R}$ between $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$ is a subset of $F \times F'$ such that for every $x \in F$, there exists $y \in F'$ with $(x,y) \in \mathcal{R}$, and similarly for every $y \in F'$, there exists $x \in F$ with $(x,y) \in \mathcal{R}$. We define the \textit{distortion} of a correspondence by \[ \textsf{dis} (\mathcal{R}) = \sup_{(x,x'), (y, y') \in \mathcal{R}} |R(x,y) - R(x',y')|. \] It is then straightforward to show that \begin{align*} \dGH{(F,R,\mu,\rho), (F',R',\mu',\rho')} = \frac{1}{2} \inf_{\mathcal{R}} \textsf{dis}(\mathcal{R}), \end{align*} \sloppy{where the infimum is taken over all correspondences $\mathcal{R}$ between $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$~that contain the point $(\rho, \rho')$.} In this article, we will prove pointed Gromov-Hausdorff-Prohorov convergence by first proving pointed Gromov-Hausdorff convergence using correspondences, and then show Prohorov convergence of the measures on the resulting metric embedding. For non-compact elements of $\mathbb{F}$, we will need a generalised notion of Gromov-Hausdorff-Prohorov convergence. This is provided by the Gromov-Hausdorff vague topology of \cite{AthLohrWinGromovGap}. To define it, suppose that $(F,R,\mu,\rho)$ and $(F_n,R_n,\mu_n,\rho_n)$ for each $n \geq 0$ are elements of $\mathbb{F}\setminus \mathbb{F}^c$. For $r>0$, we let $\mathcal{B}_r(F)$ denote the quadruple $(\bar{B}_F(\rho, r),R|_{\bar{B}_F(\rho, r)},\mu|_{\bar{B}_F(\rho, r)},\rho)$, where $\bar{B}_F(\rho, r)$ denotes the closed ball of radius $r$ around the root $\rho$ in $F$; similarly for $\mathcal{B}_r(F_n)$. Recall that we are restricting to Heine-Borel metric measure spaces of full support, so that weak convergence is metrized by the Prohorov metric. Following \cite[Definition 5.8]{AthLohrWinGromovGap}, we say that $(F_n,R_n,\mu_n,\rho_n)$ converges to $(F,R,\mu,\rho)$ in the Gromov-Hausdorff-vague topology if \[ d_{GHP} \big( \mathcal{B}_r(F_n), \mathcal{B}_r(F) \big) \rightarrow 0 \] for Lebesgue almost every $r>0$. The following proposition will be useful, as it will allow us to apply the Skorohod Representation Theorem later in Sections \ref{sctn:LLT} and \ref{sctn:RW consequences}. \begin{proposition}\cite[Proposition 5.12]{AthLohrWinGromovGap}.\label{thm:GH vague separable HB} The space of Heine-Borel boundedly finite measure spaces equipped with the Gromov-Hausdorff-vague topology is a Polish space. \end{proposition} \subsection{Stochastic processes associated with resistance metrics}\label{sctn:res forms} To study Brownian motion and random walks on metric spaces we will be using the theory of resistance forms and resistance metrics, developed by Kigami in \cite{AOF} and \cite{KigamiResistanceFormsMono}. Let $G = (V,E)$ be a discrete graph equipped with non-negative symmetric edge conductances $c(x,y)_{(x,y) \in E}$ and a measure $(\mu(x))_{x \in V}$. Effective resistance on $G$ is a function $R$ on $V \times V$ defined by \begin{equation}\label{eqn:resistance def variational} R(x,y)^{-1} = \inf \{ \mathcal{E}(f,f)| f: V \rightarrow \mathbb{R}, f(x)=1, f(y)=0 \}, \end{equation} where we take the convention that $\inf \emptyset = \infty$, and $\mathcal{E}(f,f)$ is an energy functional given by \begin{equation*}\label{eqn:energy def} \mathcal{E}(f,g) = \frac{1}{2} \sum_{x, y \in V} c(x,y) (f(y)- f(x))(g(y) - g(x)). \end{equation*} $R(x,y)$ corresponds to the usual physical notion of electrical resistance between $x$ and $y$ in $G$. It can be shown (e.g. see \cite{Tetali}) that $R$ is a metric on $G$, so we call it the \textit{resistance metric} The notion of a resistance metric can be extended to the continuum as follows. \begin{definition}\label{def:eff resistance metric}\cite[Definition 2.3.2]{AOF}. Let $F$ be a set. A function $R : F \times F$ is a \textit{resistance metric} on $F$ if and only if for every finite subset $V \subset F$, there exists a weighted graph with vertex set $V$ such that $R|_{V \times V}$ is the effective resistance on $V$, i.e. is given by (\ref{eqn:resistance def variational}). \end{definition} A resistance metric on a set $F$ can be naturally associated with a stochastic process on $F$ via the theory of resistance forms. Roughly speaking, a resistance form is a pair $(\mathcal{E}, \mathcal{F})$ where $\mathcal{E}$ is an energy functional as above, and $\mathcal{F}$ is a subspace of real-valued functions on $F$ with finite energy (additionally it must satisfy the so-called Markov property, see \cite[Definition 3.1]{KigamiResistanceFormsMono}). \begin{definition}(\cite[Definition 6.2]{KigamiResistanceFormsMono}).\label{def:reg res form} A resistance form $(\mathcal{E}, \mathcal{F})$ is \textit{regular} if $\mathcal{F} \cup C_0(F)$ is dense in $C_0(F)$ with respect to the supremum norm, where $C_0(F)$ represents the space of continuous functions on $F$ with compact support. \end{definition} By \cite[Theorems 2.3.4 and 2.3.6]{AOF}, there is a one-to-one correspondence between resistance metrics and resistance forms on $F$, given analogously to (\ref{eqn:resistance def variational}). Moreover, if the corresponding resistance form is regular, then it induces a regular Dirichlet form on the space $L^2(F, \mu)$, which in turn is naturally associated with a Hunt process on $F$ as a consequence of \cite[Theorem 7.2.1]{FOT}. This is automatically the case when $(F,R)$ is a compact resistance metric space endowed with a finite Borel measure $\mu$ of full support, for example, but in the case of infinite looptrees we will have to put some extra work into proving that the resistance form associated with $\L^{\infty}_{\alpha}$ is regular. This is done in Proposition \ref{prop:regular DF}. We have tried to keep background on resistance forms and Dirichlet forms to a minimum in this article, but see \cite{KigamiResistanceFormsMono} for more on this. The key point is that, under appropriate regularity conditions on the underlying space (which will always be fulfilled in this paper), there is a one-to-one correspondence between resistance metrics and stochastic processes. The reader should feel free to skip the proof of Proposition \ref{prop:regular DF}, which proves the required regularity in our setting, and merely use this correspondence as a black box throughout the rest of this article. This correspondence allows us to use results about scaling limits of measured resistance metric spaces to prove results about scaling limits of stochastic processes as detailed in the following result of \cite{DavidResForms}. Before stating it, we note that the notion of effective resistance between points given in (\ref{eqn:resistance def variational}) can be extended to that of effective resistance between two sets $A, B \subset F$ by setting \begin{equation*} R(A,B)^{-1} = \inf \{ \mathcal{E}(f,f)| f: F \rightarrow \mathbb{R}, f(x)=1 \ \forall \ x \in A, f(y)=0 \ \forall \ y \in B \}. \end{equation*} \begin{theorem}\cite[Theorem 1.2]{DavidResForms}.\label{thm:scaling lim RW resistance} Suppose that $(F_n, R_n, \mu_n, \rho_n)_{n \geq 0}$ is a sequence in $\mathbb{F}$ such that \[ (F_n, R_n, \mu_n, \rho_n) \rightarrow (F, R, \mu, \rho) \] Gromov-Hausdorff-vaguely for some $(F, R, \mu, \rho) \in \mathbb{F}$, and $R, (R_n)_{n \geq 1}$ are resistance metrics on the respective spaces. Assume further that \begin{equation}\label{eqn:nonexplosion} \lim_{r \rightarrow \infty} \liminf_{n \rightarrow \infty} R_n (\rho_n, B_n (\rho_n, r)^c) = \infty. \end{equation} Let $(Y_t^n)_{t \geq 0}$ and $(Y_t)_{t \geq 0}$ be the stochastic processes respectively associated with $(F_n, R_n, \mu_n, \rho_n)$ and $(F, R, \mu, \rho)$ as described above. Then it is possible to isometrically embed $(F_n, R_n)_{n \geq 1}$ and $(F,R)$ into a common metric space $(M, d_M)$ so that \[ \prnstart{(Y_t^n)_{t \geq 0} \in \cdot}{\rho_n}{n} \rightarrow \prstart{(Y_t)_{t \geq 0} \in \cdot}{\rho} \] weakly as probability measures as $n \rightarrow \infty$ on the space $D(\mathbb{R}_+, M)$ equipped with the Skorohod $J_1$-topology. \end{theorem} For more on the Skorohod-$J_1$ topology, see \cite[Chapter 3]{BillsleyConv}. The intuition behind the result above is that the convergence of metrics and measures respectively give the appropriate spatial and temporal convergences of the stochastic processes. We will apply it several times in this paper to take limits of stochastic processes on looptrees. By isometrically embedding into the universal Urysohn space $(U, d_U)$, we can get similar results in the annealed setting. This is quite abstract, and we do not give a full background on the Urysohn space, but instead recall that it is a Polish space with the property that any separable metric space can be isometrically embedded into $U$. Moreover, it has a distinguished point $u_0$ and in the case of trees and looptrees we can always assume that the root is mapped to this canonical point. These are the only two properties of $U$ that we will use in this article, but its existence and further properties are discussed in \cite{HuvekUrysohn}. Suppose that $(F_n, R_n, \mu_n, \rho_n, \psi_n)_{n \geq 0}$ is a sequence such that $(F_n, R_n, \mu_n, \rho_n)_{n \geq 0} \in \mathbb{F}$ and $\psi_n$ is an isometric embedding of $(F_n, R_n, \mu_n, \rho_n)_{n \geq 0}$ into $U$ for all $n$. Similarly for $(F, R, \mu, \rho, \psi)$. For the purposes of this paper, if $(F,R,\mu,\rho,\psi)$ is compact we will say that $(F_n, R_n, \mu_n, \rho_n, \psi_n) \rightarrow (F, R, \mu, \rho, \psi)$ in the spatial Gromov-Hausdorff topology if \[ d_U^{sp} \big( (F, R, \mu, \rho, \psi), (F_n, R_n, \mu_n, \rho_n, \psi_n)\big) \rightarrow 0 \] as $n \rightarrow \infty$, where $d_U^{sp} \big( (F, R, \mu, \rho, \psi), (F_n, R_n, \mu_n, \rho_n, \psi_n)\big)$ is defined to be equal to \begin{align}\label{eqn:spat U dist} d_U^H(\psi (F), \psi_n (F_n)) + d_U^P(\mu \circ \psi^{-1}, \mu_n \circ {\psi_n}^{-1} ) + d_U(\psi (\rho), \psi_n (\rho_n)). \end{align} In the non-compact case, we will say that $(F_n, R_n, \mu_n, \rho_n, \phi_n) \rightarrow (F, R, \mu, \rho, \phi)$ in the spatial Gromov-Hausdorff vague topology if the closed balls of radius $r$ along with their appropriate restrictions converge for Lebesgue-almost every $r>0$. This definition is a special case of the spatial Gromov-Hausdorff vague topology used in \cite[Section 7]{DavidResForms}, and it follows from the results there that $d_U^{sp}$ is a metric and induces a separable topology on the space of elements of $\mathbb{F}$ isometrically embedded into $U$. The definition can be made more general (and is more meaningful) in the case when we embed non-isometrically into a space other than $U$. In fact the point of restricting to $U$ above is that, in our setting, Gromov-Hausdorff-Prohorov convergence will automatically imply existence of isometries givingconvergence in the spatial topology introduced above, and that $U$ therefore provides a metric space on which we can consider the annealed law for random walks, defined as follows. Given a sequence of random spaces $(F_n, R_n, \mu_n, \rho_n, \phi_n)_{n \geq 0}$ such that $(F_n, R_n, \mu_n, \rho_n) \in \mathbb{F}$ for all $n$ and $\phi_n: F_n \rightarrow U$ is an isometric embedding, we define the annealed law of the corresponding stochastic process by \[ \prtilnstart{\phi_n(Y_t^n)_{t \geq 0} \in \cdot}{\phi_n(\rho_n)}{n} = \int \prnstart{\phi_n(Y_t^n)_{t \geq 0} \in \cdot}{\phi_n(\rho_n)}{n} d\mathbf{P}^n, \] i.e. as the law of the stochastic process averaged over realisations of the underlying random metric space. (We define this analogously when there is no dependence on $n$). \begin{theorem}\cite[Theorem 7.2]{DavidResForms}.\label{thm:scaling lim RW resistance annealed} Suppose that $(F_n, R_n, \mu_n, \rho_n, \phi_n)_{n \geq 0}$ is a sequence such that \[ (F_n, R_n, \mu_n, \rho_n, \phi_n) \overset{(d)}{\rightarrow} (F, R, \mu, \rho, \phi) \] in the spatial Gromov-Hausdorff-vague topology, and $R, (R_n)_{n \geq 1}$ are resistance metrics on the respective spaces. Assume further that \begin{equation}\label{eqn:nonexplosion annealed} \lim_{r \rightarrow \infty} \liminf_{n \rightarrow \infty} \pr{R_n (\rho_n, B_n (\rho_n, r)^c) \geq \lambda} = 1 \end{equation} for all $\lambda > 0$. Let $(Y_t^n)_{t \geq 0}$ and $(Y_t)_{t \geq 0}$ be the stochastic processes respectively associated with $(F_n, R_n, \mu_n, \rho_n)$ and $(F, R, \mu, \rho)$ as described above. Then \[ \prtilnstart{\phi_n(Y_t^n)_{t \geq 0} \in \cdot}{\rho_n}{n} \rightarrow \prtilstart{\phi(Y_t)_{t \geq 0} \in \cdot}{\rho} \] weakly as probability measures as $n \rightarrow \infty$ on the space $D(\mathbb{R}_+, U)$ equipped with the Skorohod $J_1$-topology. \end{theorem} \subsection{Stable L\'{e}vy excursions}\label{sctn:Levy background} Following the presentations of \cite{DuqContourLimit} and \cite{RSLTCurKort}, we now introduce stable L\'{e}vy excursions, which will be used to code stable trees and looptrees in Section \ref{sctn:tree looptree def}. Given intervals $I,J \subset \mathbb{R}$, we first recall that $D(I, J)$ represents the space of c\`{a}dl\`{a}g functions from $I$ to $J$. For an interval $[0, \l] \subset \mathbb{R}$, we also define the c\`{a}dl\`{a}g excursion space $D^{\text{exc}}([0,\l], \mathbb{R}^{\geq 0})$ by \[ D^{\text{exc}}([0,\l], \mathbb{R}^{\geq 0}) = \{ e \in D([0,\l], \mathbb{R}^{\geq 0}): e(0)=e(\l)=0, e(t) > 0 \text{ for all } t \in (0, \l) \}. \] Throughout this article, we take $\alpha \in (1,2)$, and $X$ will be an $\alpha$-stable spectrally positive L\'{e}vy process as in \cite[Section VIII]{BertoinLevy}, normalised so that \[ \E{e^{-\lambda X_t}} = e^{-{\lambda}^{\alpha}t} \] for all $\lambda > 0$. $X$ takes values in the space $D([0, \infty), \mathbb{R})$ of c\`{a}dl\`{a}g functions, which we endow with the Skorohod-$J_1$ topology, and satisfies the scaling property that for any constant $c>0$, $(c^{-\frac{1}{\alpha}} X_{ct})_{t \geq 0}$ has the same law as $(X_t)_{t \geq 0}$. Moreover $X$ has L\'{e}vy measure \[ \Pi(dx) = \frac{\alpha(\alpha - 1)}{\Gamma(2-\alpha)} x^{-\alpha - 1} \mathbb{1}_{(0, \infty)}(x) dx. \] To define a normalised excursion of $X$, we follow \cite{Chaumont} and let $\underline{X}_t = \inf_{s \in [0,t]} X_s$ denote its running infimum process, and set \begin{align*} g_1 = \sup \{ s \leq 1: X_s = \underline{X}_s \}, \hspace{10mm} d_1 = \inf \{ s > 1: X_s = \underline{X}_s \}. \end{align*} Note that $X_{g_1} = X_{d_1}$ almost surely, since $X$ is spectrally positive. As in \cite[Proposition 1]{Chaumont}, we define the normalised excursion $X^{\text{exc}}$ of $X$ above its infimum at time $1$ by \[ X_s^{\text{exc}} = (d_1 - g_1)^{\frac{-1}{\alpha}} (X_{g_1 + s(d_1 - g_1)} - X_{g_1}) \] for every $s \in [0,1]$. Note that $X^{\text{exc}}$ is almost surely an $\alpha$-stable c\`{a}dl\`{a}g function on $[0,1]$ with $X^{\text{exc}}(s)>0$ for all $s \in (0,1)$, and $X_0^{\text{exc}}=X_1^{\text{exc}}=0$. \subsubsection{It\^o excursion measure}\label{sctn:Ito exc} We can alternatively define $X^{\text{exc}}$ using the {It\^o excursion measure}. For full details, see \cite[Chapter IV]{BertoinLevy}, but the measure is defined by applying excursion theory to the process $X - \underline{X}$, which is strongly Markov and for which the point $0$ is regular for itself. We normalise local time so that $-\underline{X}$ denotes the local time of $X - \underline{X}$ at its infimum, and let $(g_j, d_j)_{j \in \mathcal{I}}$ denote the excursion intervals of $X - \underline{X}$ away from zero. For each $i \in \mathcal{I}$, the process $(e^i)_{0 \leq s \leq d_i-g_i}$ defined by $e^i(s) = X_{g_i + s} - X_{g_i}$ is an element of the excursion space \[ E = \bigcup_{\l > 0} D^{\text{exc}}([0,\l], \mathbb{R}^{\geq 0}). \] We let $\zeta (e) = \sup \{s>0: e(s)>0\}$ denote the \textit{lifetime} of the excursion $e$. It was shown in \cite{ItoPP} that the measure \[ N(dt, de) = \sum_{i \in \mathcal{I}} \delta (-\underline{X}_{g_i}, e^i) \] is a Poisson point measure of intensity $dt N(de)$, where $N$ is a $\sigma$-finite measure on the set $E$ known as the \textit{It\^o excursion measure}. Moreover, the measure $N(\cdot)$ inherits a scaling property from the $\alpha$-stability of $X$. Indeed, for any $\lambda > 0$ we define a mapping $\Phi_{\lambda}: E \rightarrow E$ by $\Phi_{\lambda}(e)(t) = \lambda^{\frac{1}{\alpha}} e(\frac{t}{\lambda})$, so that $N \circ \Phi_{\lambda}^{-1} = \lambda^{\frac{1}{\alpha}} N$ (e.g. see \cite{WataIto}). It then follows from the results in \cite[Section IV.4]{BertoinLevy} that we can uniquely define a set of conditional measures $(N_{(s)}, s>0)$ on $E$ such that: \begin{enumerate}[(i)] \item For every $s > 0$, $N_{(s)}( \zeta=s)=1$. \item For every $\lambda > 0$ and every $s>0$, $\Phi_{\lambda}(N_{(s)}) = N_{(\lambda s)}$. \item For every measurable $A \subset E$ \[ N(A) = \int_0^{\infty} \frac{N_{(s)}(A)}{\alpha \Gamma(1 - \frac{1}{\alpha}) s^{\frac{1}{\alpha}+1}} ds. \] \end{enumerate} $N_{(s)}$ is therefore used to denote the law $N( \cdot | \zeta = s)$. The probability distribution $N_{(1)}$ coincides with the law of $X^{\text{exc}}$ as constructed above. \subsubsection{Relation between $X$ and $X^{\text{exc}}$} It is easier to analyse an unconditioned L\'{e}vy process rather than an excursion, so throughout this paper we will use the following two tools to compare the probability of an event defined in terms of $X^{\text{exc}}$ to that of the same event defined in terms of $X$. The first tool is the Vervaat transform of the following proposition, which allows us to compare to a stable bridge $X^{\text{br}}$ as an intermediate step. This is particularly useful as we will at times consider our looptrees to be rooted at a uniform point. \begin{theorem}\cite[Th\'eor\`eme 4]{Chaumont}. Vervaat Transform.\label{thm:Vervaat} \begin{enumerate} \item Let $X^{\text{exc}}$ be as above, and take $U \sim$ \textsf{Uniform}$([0,1])$. Then the process $(X^{\text{br}}_t)_{0 \leq t \leq 1}$ defined by \[ X^{\text{br}}_t = \begin{cases} X^{\text{exc}}_{U+t} & \text{ if } U+t \leq 1,\\ X^{\text{exc}}_{U+t-1} & \text{ if } U+t > 1. \end{cases} \] has the law of a spectrally positive stable L\'{e}vy bridge on $[0,1]$. \item Now let $X^{\text{br}}$ be a spectrally positive stable L\'{e}vy bridge on $[0,1]$, and let $m$ be the (almost surely unique) time at which it attains its minimum. Define an excursion $X^{\text{exc}}$ by \[ X^{\text{exc}}_t = \begin{cases} X^{\text{br}}_{m+t} & \text{ if } m+t \leq 1,\\ X^{\text{br}}_{m+t-1} & \text{ if } m+t > 1. \end{cases} \] Then $X^{\text{exc}}$ has the law of a spectrally positive stable L\'{e}vy excursion. \end{enumerate} \end{theorem} An event defined for the stable bridge on the interval $[0,T]$ can then be transferred to the unconditioned process using the fact that the law of the bridge is absolutely continuous with respect to the law of the process, with Radon-Nikodym derivative \begin{equation}\label{eqn:RN deriv levy bridge} \frac{p_{1-{T}}(-X_{T})}{p_{1}(0)} \end{equation} for $T \in (0,1)$ (see \cite[Section VIII.3, Equation (8)]{BertoinLevy}). Here the transition density $p_t(\cdot, \cdot)$ for the L\'{e}vy process $X$ is defined analogously to that in (\ref{eqn:trans dens def}), but with respect to Lebesgue measure on the real line. We note here that $||p_1||_{\infty} < \infty$ for all $\alpha \in (1,2)$ since $p_1(\cdot)$ is continuous and vanishes at infinity (e.g. see \cite[Section VIII.1]{BertoinLevy}). \subsubsection{Descents}\label{sctn:Useful results} Next, we introduce the notion of a descent of a L\'{e}vy process, following the presentation of \cite[Section 3.1.3]{RSLTCurKort}. Let $X^1$ and $X^2$ be two independent spectrally positive $\alpha$-stable L\'{e}vy processes as defined above, and define a two-sided process $X$ by setting \[ X_t = \begin{cases} X^1_t & \text{ if } t \geq 0 \\ -X^2_{-t^-} & \text{ if } t < 0. \end{cases} \] For every $s, t \in \mathbb{R}$, we write $s \preceq t$ if and only if $s \leq t$ and $X_{s^-} \leq \inf_{[s,t]}X$, and in this case we set \begin{align*} \Delta X_s = X_s - X_{s^-}, \hspace{2mm} x_s^t(X) = \inf_{[s,t]}X - X_{s^-}, \text{ and } u_s^t(X) = \frac{x_s^t(X)}{\Delta X_s}. \end{align*} We write $s \prec t$ if $s \preceq t$ and $s \neq t$. As in \cite{RSLTCurKort}, for any $t \in \mathbb{R}$, we will call the collection $\{x_s^t(X), u_s^t(X): s \preceq t \}$ the \textit{descent} of $t$ in $X$. The next proposition describes the law of descents from a typical point of $X$, and will be useful in the proofs of the limit theorems. We let $\overline{X}_t = \sup\{X_s: 0 \leq s \leq t\}$ denote the running supremum process of $X$. The process $\overline{X} - X$ is strong Markov and $0$ is regular for itself, allowing the use of excursion theory. Let $(L_t)_{t \geq 0}$ denote the local time of $\overline{X} - X$ at 0. Note that, by \cite[Chapter VIII, Lemma 1]{BertoinLevy}, $L^{-1}$ is a $(1 - \frac{1}{\alpha})$-stable subordinator, and $( \overline{X}_{L^{-1}(t)})_{t \geq 0}$ is an $(\alpha - 1)$-stable subordinator, so we can normalise local time so that $\E{\exp (-\lambda \overline{X}_{L^{-1}(t)}} = \exp (-t\lambda^{\alpha - 1})$ for all $\lambda > 0$. Finally, if $\overline{X}_s > \overline{X}_{s^{-}}$, set \begin{align*} x_s = \overline{X}_s - \overline{X}_{s^{-}}, \hspace{10mm} u_s = \frac{\overline{X}_s - \overline{X}_{s^{-}}}{\overline{X}_s - {X}_{s^{-}}}. \end{align*} \begin{proposition}(\cite[Proposition 3.1]{RSLTCurKort}, \cite[Corollary 1]{BertoinPitmanExt}).\label{prop:descent PP} Let $X$ be a two-sided spectrally positive $\alpha$-stable process as above. Then \begin{enumerate}[(i)] \item \begin{align*} \{(-s, x_s^0(X), u_s^0(X)): s \preceq 0 \} \overset{(d)}{=} \{s,x_s, u_s: s \geq 0 \text{ such that } \overline{X}_s > \overline{X}_{s^-} \}. \end{align*} \item The point measure \begin{align*} \sum_{\overline{X}_s > \overline{X}_{s^-}} \delta \big(L_s, \frac{x_s}{u_s}, u_s \big) \end{align*} is a Poisson point measure with intensity $dl \cdot x\Pi(dx) \cdot \mathbb{1}_{[0,1]}(u) du$. \end{enumerate} \end{proposition} We also give a technical lemma which will be used at various points in the paper. This appeared previously in \cite[Section 3.3.1]{RSLTCurKort} and uses an argument from \cite{BertoinLevy}. The final claim follows by bounded convergence. First recall that for a function $f: [0, \infty) \rightarrow \mathbb{R}$ and $[a,b] \subset [0, \infty)$, we define \[ \textsf{Osc}_{[a,b]} f := \sup_{s, t \in [a,b]} |f(t) - f(s)|. \] \begin{lemma}\label{lem:osc} Let $\mathcal{E}$ be an exponential random variable with parameter $1$, and let $X$ be a spectrally positive $\alpha$-stable L\'{e}vy process conditioned to have no jumps of size greater than $1$ on $[0, \mathcal{E}]$. Let $\tilde{\textsf{Osc}} = \textsf{Osc}_{[0, \mathcal{E}]} X$. Then there exists $\theta > 0$ such that $\E{e^{\theta \tilde{\textsf{Osc}}}} < \infty$. Moreover, $\E{e^{\theta \tilde{\textsf{Osc}}}} \downarrow 1$ as $\theta \downarrow 0$. \end{lemma} \begin{remark}\label{rmk:osc deterministic} The same results holds if $\mathcal{E}$ is set to be deterministically equal to $1$ rather than an exponential random variable. The proof is almost identical to the proof of the result above, with one minor modification \end{remark} \section{Background on stable trees and looptrees}\label{sctn:tree looptree def} \subsection{Discrete Trees}\label{sctn:trees background discrete} Before defining stable trees and looptrees, we briefly recap some notation for discrete trees, following the formalism of \cite{Neveu}. Firstly, let \[ \mathcal{U}=\bigcup_{n=0}^{\infty} {\mathbb{N}}^n \] be the Ulam-Harris tree. By convention, ${\mathbb{N}}^0=\{ \emptyset \}$. If $u=(u_1, \ldots, u_n)$ and $v=(v_1, \ldots, v_m) \in \mathcal{U}$, we let $uv= (u_1, \ldots, u_n, v_1, \ldots, v_m)$ be the concatenation of $u$ and $v$. \begin{definition} A plane tree $T$ is a finite subset of $\mathcal{U}$ such that \begin{enumerate}[(i)] \item $\emptyset \in T$, \item If $v \in T$ and $v=uj$ for some $j \in \mathbb{N}$, then $u \in T$, \item For every $u \in T$, there exists a number $k_u(T) \geq 0$ such that $uj \in T$ if and only if $1 \leq j \leq k_u(T)$. \end{enumerate} \end{definition} We let $\mathbb{T}$ denote the set of all plane trees. A plane tree $T \in \mathbb{T}$ with $n+1$ vertices labelled according to the lexicographical order as $u_0, u_1, \ldots, u_n$ can be coded by its \textit{height function}, \textit{contour function}, or \textit{Lukasiewicz path}, defined as follows. \begin{itemize} \item The height function $(H^{T}_i)_{0 \leq i \leq n}$ is defined by considering the vertices $u_0, u_1, \ldots, u_n$ in lexicographical order, and then setting $H^{T}_i$ to be the generation of vertex $u_i$. \item The contour function $(C^{T}_t)_{0 \leq t \leq 2n}$ is defined by considering a particle that starts at the root $\emptyset$ at time zero, and then continuously traverses the boundary of ${T}$ at speed one, respecting the lexicographical order where possible, until returning to the root. $C^{T}(t)$ is equal to the height of the particle at time $t$. \item The Lukasiewicz path $(W^{T}_m)_{0 \leq m \leq n}$ is defined by setting $W^{T}_0 = 0$, then by considering the vertices $u_0, u_1, \ldots, u_n$ in lexicographical order and setting $W^T_{m+1} = W^T_m + k_{u_m}(T)-1$. \end{itemize} These are illustrated in Figure \ref{fig:contourheightfns}, together with points corresponding to specific vertices in the tree, and the part of each excursion coding the subtree rooted at the red vertex, which we denote by $\theta_1(T)$. For further details, see \cite[Section 0.1]{LeGDuqMono}. \begin{figure}[h] \includegraphics[width=15cm, height=5.6cm]{contourheight1} \centering \caption{Example of contour function, height function and Lukasiewicz path for the given tree.}\label{fig:contourheightfns} \end{figure} These functions all uniquely define the tree $T$. This can be written particularly conveniently in the case of the contour function, since for any $s, t \in \{0, \ldots, 2(n-1)\}$, we can write the tree distance as a function on $\{0, \ldots, 2(n-1)\} \times \{0, \ldots, 2(n-1)\}$ by setting \[ d^T(s,t) = C^T(s) + C^T(t) - 2\inf_{s \leq r \leq t} C^T(r). \] We will work mainly with the Lukasiewicz path $(W^{T}_m)_{0 \leq m \leq n}$ in this paper. It is not too hard to see that $W^{T}_m \geq 0$ for all $0 \leq m \leq n-1$, and $W^T_n = -1$. Moreover, the height function can be defined as a function of the Lukasiewicz path (see \cite[Equation (1)]{LeGDuqMono}) by setting \begin{equation}\label{eqn:height Luk def} H^T(m) = \Big|\Big\{ k \in \{0, 1, \ldots, m-1\}: W^T_k = \inf_{k \leq l \leq m} W^T_l \Big\}\Big|. \end{equation} \subsubsection{Multi-type Galton-Watson trees}\label{sctn:GW multi} We will consider scaling limits of looptrees defined from both one and two-type Galton-Watson trees in Section \ref{sctn:LLT}. Accordingly, let $\xi, \xi_{\circ}$ and $\xi_{\bullet}$ be probability distributions on $\mathbb{Z}^{\geq 0}$. \begin{definition} A Galton-Watson tree with offspring distribution $\xi$ is a random plane tree $\mathcal{T}$ with law $\mathbb{P}_{\xi}$ satisfying the following properties. \begin{enumerate}[(i)] \item $\prstart{k_{\emptyset}=j}{\xi}=\xi(j)$ for all $j \in \mathbb{Z}^{\geq 0}$, \item For every $j \geq 1$ with $\xi(j)>0$, the shifted trees $\theta_1(\mathcal{T}), \ldots, \theta_j(\mathcal{T})$ are independent under the conditional probability $\prcond{\cdot}{k_{\emptyset}=j}{\xi}$, with law $\mathbb{P}_{\xi}$, where $\theta_i(\mathcal{T}) = \{v \in \mathcal{U}: iv \in \mathcal{T} \}$. \end{enumerate} \end{definition} We say that $\mathcal{T}$ is \textit{critical} if $\E{\xi}=1$. Additionally, we say a random plane tree is an alternating two-type Galton-Watson tree with offspring distribution $(\xi_{\circ}, \xi_{\bullet})$ if all vertices at even (respectively odd) height have offspring distribution $\xi_{\circ}$ (respectively $\xi_{\bullet}$). We say that the tree is \textit{critical} if $\E{\xi_{\circ}}\E{\xi_{\bullet}}=1$. \subsection{Stable trees} We now introduce stable trees. These are closely related to stable looptrees, and were introduced by Le Gall and Le Jan in \cite{LeGLeJanExploration} then further developed by Duquesne and Le Gall in \cite{LeGDuqMono,DuqLeGPFALT}. For $\alpha \in (1,2)$ we define the stable tree $\T_{\alpha}$ from a spectrally positive $\alpha$-stable L\'{e}vy excursion, which plays the role of the Lukasiewicz path introduced above. By analogy with (\ref{eqn:height Luk def}), given such an excursion $X^{\text{exc}}$, we define the height function $H^{\text{exc}}$ to be the continuous modification of the process satisfying \begin{equation*}\label{eqn:height def} H^{\text{exc}}(t) = \lim_{\epsilon \rightarrow 0} \frac{1}{\epsilon} \int_0^t \mathbb{1} \{X^{\text{exc}}_s < I_s^t + \epsilon \} ds, \end{equation*} where $I_s^t = \inf_{r \in [s,t]} X^{\text{exc}}_r$ for $s \leq t$, and the limit exists in probability (e.g. see \cite[Lemma 1.1.3]{LeGDuqMono}). We define a distance function on $[0,1]$ by \[ d(s,t) = H^{\text{exc}}(s) + H^{\text{exc}}(t) - 2 \inf_{s \leq r \leq t} H^{\text{exc}}(r), \] and an equivalence relation on $[0,1]$ by setting $s \sim t$ if and only if $d(s,t) = 0$. $\mathcal{T}_{\alpha}$ is the quotient space $([0,1]/ \sim, d)$, and we let $\pi$ denote the canonical projection from $[0,1]$ to $\T_{\alpha}$. If $u, v \in \T_{\alpha}$, we let $[[u,v]]$ denote the unique geodesic between $u$ and $v$ in $\T_{\alpha}$. This construction also provides a natural way to define a measure $\mu$ on $\mathcal{T}_{\alpha}$ as the image of Lebesgue measure on $[0,1]$ under the quotient operation. Stable trees arise naturally as scaling limits of discrete plane trees with appropriate offspring distributions. More specifically, let $T_n$ be a discrete tree conditioned to have $n$ vertices and with critical offspring distribution $\xi$ in the domain of attraction of an $\alpha$-stable law, and such that $\xi$ is aperiodic. It is shown in \cite[Theorem 3.1]{DuqContourLimit} that \begin{equation}\label{eqn:stable tree scaling limit def} a_n n^{-1} T_n \rightarrow \mathcal{T}_{\alpha} \end{equation} in the Gromov-Hausdorff topology as $n \rightarrow \infty$, where $a_n$ is as defined in (\ref{eqn:dom of att def}). \subsection{Random looptrees}\label{sctn:looptree def} Discrete looptrees are best described by Figure \ref{fig:disc looptree intro} in the introduction. Moreover, as outlined there, stable looptrees can be defined as scaling limits of their discrete counterparts. That is, if $T_n$ is a Galton Watson tree conditioned to have $n$ vertices with critical offspring distribution $\xi$ in the domain of attraction of an $\alpha$-stable law, then \[ a_n^{-1} {\textsf{Loop}}(T_n) \overset{(d)}{\rightarrow} \L_{\alpha} \] with respect to the Gromov-Hausdorff topology as $n \rightarrow \infty$ \cite[Theorem 4.1]{RSLTCurKort}, where again in the case that $\xi([n, \infty)) \sim cn^{-\alpha}$, we can take $a_n = (c |\Gamma(-\alpha)|n)^{\frac{1}{\alpha}}$. By comparison with (\ref{eqn:stable tree scaling limit def}), $\L_{\alpha}$ can therefore be thought of as the looptree version of the L\'{e}vy tree $\mathcal{T}_{\alpha}$. We now explain how this intuition can be used to code $\L_{\alpha}$ from a stable L\'{e}vy excursion, in such a way that $\L_{\alpha}$ can be heuristically obtained from the corresponding stable tree $\mathcal{T}_{\alpha}$ by replacing each branch point by a loop with length proportional to the size of the branch point, gluing these loops together along the tree structure of $\mathcal{T}_{\alpha}$, and then taking the closure of the resulting metric space. The following construction was introduced in \cite[Section 2.3]{RSLTCurKort}. The L\'{e}vy excursion itself plays the role of a continuum Lukasiewicz path. It was shown in \cite[Proposition 2]{MiermontSplittingNodes} that if we define the width of a branch point in $\mathcal{T}_{\alpha}$, coded by a jump at $t \in [0,1]$ of size $\Delta_t$, by \[ \lim_{\epsilon \downarrow 0} \frac{1}{\epsilon} \mu (\{v \in \T_{\alpha}, d(\pi(t), v) \leq \epsilon\}), \] then the limit almost surely exists and is equal to $\Delta_t$. It is therefore natural that a jump of size $\Delta$ in $X^{\text{exc}}$ should code a loop of length $\Delta$ in $\L_{\alpha}$. Accordingly, using the notation of Section \ref{sctn:Useful results}, for every $t \in [0,1]$ with $\Delta_t > 0$, the authors in \cite[Section 2.3]{RSLTCurKort} equip the segment $[0, \Delta_t]$ with the pseudodistance \begin{equation}\label{eqn:delta def} \delta_t(a,b) = \min \{|a-b|,(\Delta_t - |a-b|) \}, \ \ \ \ \ \ \ \ \ \text{for} \ a, b \in [0, \Delta_t], \end{equation} and define a distance function on $[0,1]$ by first setting \begin{equation*} d_0(s,t) = \sum_{s \prec u \preceq t} \delta_u(0, x_u^t) \end{equation*} whenever $s \preceq t$, and \begin{equation} \label{eqn:d} d(s,t) = \delta_{s \wedge t}(x_{s \wedge t}^s,x_{s \wedge t}^t) + d_0(s \wedge t, s) + d_0(s \wedge t, t) \end{equation} for arbitrary $s, t \in [0,1]$. They show that $d$ as defined above is almost surely a continuous pseudodistance on $[0,1]$, and define an equivalence relation $\sim$ on $[0, 1]$ by setting $s \sim t$ if $d(s,t)=0$. They then define the stable looptree $\L_{\alpha}$ as the quotient space \[ \mathcal{L}_{\alpha} = ([0,1]/ \sim, d) \] in \cite[Definition 2.3]{RSLTCurKort}. We let $p:[0,1] \rightarrow \L_{\alpha}$ denote the canonical projection under the quotient operation, and let $\nu$ denote the image of Lebesgue measure on $[0,1]$ under $p$. $\nu$ therefore denotes the natural analogue of uniform measure on $\L_{\alpha}$. In \cite{ArchBMCompactLooptrees}, we also define a resistance metric $R$ on stable looptrees. By analogy with the construction above, this is done by first replacing $\delta_t$ with the quantity $r_t$ defined by \begin{equation}\label{eqn:r def} r_t(a,b) = {\Big( \frac{1}{|a-b|}+\frac{1}{\Delta_t - |a-b|} \Big) }^{-1}= \frac{|a-b|(\Delta_t - |a-b|)}{\Delta_t}, \ \ \ \ \ \ \ \ \ \text{for} \ a, b \in [0, \Delta_t]. \end{equation} Note that this corresponds to the effective resistance across two parallel edges of lengths $|a-b|$ and $\Delta_t - |a-b|$. For $s, t \in [0,1]$ with $s \preceq t$, we then set \begin{equation}\label{eqn:R0} R_0(s,t) = \sum_{s \prec u \preceq t} r_u(0, x_u^t). \end{equation} For arbitrary $s, t \in [0,1]$, we set \begin{equation} \label{eqn:R} R(s,t) = r_{s \wedge t}(x_{s \wedge t}^s,x_{s \wedge t}^t) + R_0(s \wedge t, s) + R_0(s \wedge t, t). \end{equation} We show in \cite[Proposition 4.4]{ArchBMCompactLooptrees} that $R$ defined in this way is a resistance metric on $\L_{\alpha}$ in the sense of Definition \ref{def:eff resistance metric}. Moreover, in \cite[Lemma 4.1]{ArchBMCompactLooptrees} we show that for any $s,t \in [0,1]$, we have that $\frac{1}{2}d(s,t) \leq R(s,t) \leq d(s,t)$, and define the resistance looptree $\L_{\alpha}^R$ (which we will often denote $(\L_{\alpha}, R)$) as \[ \mathcal{L}^R_{\alpha} = ([0,1]/ \sim, R). \] As a consequence, we also show in \cite[Corollary 4.2]{ArchBMCompactLooptrees} that the looptrees $(\L_{\alpha}, d)$ and $(\L_{\alpha}, R)$ are homeomorphic. The construction above is such that a jump of size $\Delta$ corresponds naturally to a cycle of length $\Delta$ in $\L_{\alpha}$, which we will call a ``loop". A key result of \cite{RSLTCurKort} is a Gromov-Hausdorff invariance principle. We extended the result to include convergence of measures in \cite[Proposition 4.6]{ArchBMCompactLooptrees}. Moreover, the Gromov-Hausdorff convergence of \cite[Theorem 4.1]{RSLTCurKort} was originally stated with the geodesic metric $d$ in place of the resistance metric $R$, but equally holds for $R$. This results in the following proposition. \begin{proposition}(cf \cite[Theorem 4.1]{RSLTCurKort}, \cite[Proposition 4.6]{ArchBMCompactLooptrees}).\label{thm:compact disc inv princ res} Let $(\tau_n)_{n=1}^{\infty}$ be a sequence of trees with $|\tau_n| \rightarrow \infty$ and corresponding Lukasiewicz paths $(W^n)_{n = 1}^{\infty}$, and let $R_n$ denote the effective resistance metric on $\textsf{Loop}(\tau_n)$ obtained via (\ref{eqn:resistance def variational}) by letting an edge between any two adjacent vertices have conductance $1$. Additionally let $\nu_n$ be the uniform measure that gives mass $1$ to each vertex of $\textsf{Loop}(\tau_n)$, and let $\rho_n$ be the root of ${\textsf{Loop}}(\tau_n)$, defined to be the vertex representing the edge joining the root of $\tau_n$ to its first child. Suppose that $(C_n)_{n=1}^{\infty}$ is a sequence of positive real numbers such that \begin{enumerate}[(i)] \item $\Big( \frac{1}{C_n} W^n_{\lfloor |\tau_n| t \rfloor} (\tau_n) \Big)_{0 \leq t \leq 1} \overset{(d)}{\rightarrow} X^{\text{exc}}$ as $n \rightarrow \infty$, \item $\frac{1}{C_n} \textsf{Height}(\tau_n) \ \overset{\mathbb{P}}{\rightarrow} \ 0$ as $n \rightarrow \infty$. \end{enumerate} Then \[ \Big({\textsf{Loop}}(\tau_n), \frac{1}{C_n}R_n, \frac{1}{|\tau_n|} \nu_n, \rho_n \Big) \overset{(d)}{\rightarrow} \Big( \L_{\alpha}, R, \nu, \rho \Big) \] as $n \rightarrow \infty$ with respect to the Gromov-Hausdorff-Prohorov topology. \end{proposition} We now state a continuous version of this convergence. More generally, if $f$ is a function in $D^{\text{exc}}([0,\l])$ for some $\l \in (0, \infty)$, with only positive jumps, we can replace $X^{\text{exc}}$ with $f$ in the construction above to define the associated continuum looptree $\L_f$. Moreover, if $f_n$ is a sequence in $D^{\text{exc}}([0,\l])$ converging to $f$, also all with only positive jumps, then we can prove a similar invariance principle for the sequence of corresponding continuum looptrees. There are minor differences in the assumptions required for the continuum convergence. In particular, note that the second condition of Proposition \ref{thm:compact disc inv princ res} that $\frac{1}{C_n} \textsf{Height}(\tau_n) \ {\rightarrow} \ 0$ in probability as $n \rightarrow \infty$ is important there because it ensures that in the limit, distances in the rescaled discrete looptrees come from the loop structure and not from distances in the corresponding tree. More formally, in the proof of \cite[Theorem 4.1]{RSLTCurKort} it is used to make a comparison between the expressions $\frac{1}{C_n} \sum_{u_n \preceq v_n} x_{u_n}^{v_n}$ and $\sum_{u \preceq v} x_u^v$ for the discrete and continuum trees respectively, where $x_{u_n}^{v_n}$ is the discrete analogue of $x_{u}^{v}$. For a sequence of trees $\tau_n$ with $\frac{1}{C_n} W^n \rightarrow f$ in the setting of Proposition \ref{thm:compact disc inv princ res}, we have for any $v_n \in \textsf{Loop} (\tau_n)$ and $v \in \L_f$ that \begin{align}\label{eqn:height correction exp} \sum_{u_n \preceq v_n} x_{u_n}^{v_n} = \textsf{Height}(v_n) + W^n(v_n), \hspace{10mm} \sum_{u \preceq v} x_{u}^{v} = f(v). \end{align} If $v$ and $v_n$ are in correspondence with each other, after being careful with left and right limits we can essentially apply the result that $\frac{1}{C_n} W^n(v_n) \rightarrow f(v)$ to deduce that the $\frac{1}{C_n} \sum_{u_n \preceq v_n} x_{u_n}^{v_n}$ also converges to $\sum_{u \preceq v} x_u^v$ in the limit to prove the invariance. To obtain this result, it is therefore crucial that the contribution from the rescaled height function goes to zero. If, however, we replace the sequence of rescaled discrete looptrees with a sequence of continuum looptrees, say coded by the functions $(f_n)_{n=1}^{\infty}$ each with support $[0,1]$ and such that $f_n \rightarrow f$ in the Skorohod-$J_1$ topology as $n \rightarrow \infty$, then the height function won't appear in any of the new terms in (\ref{eqn:height correction exp}) and so the continuum analogue of condition $(ii)$ of Proposition \ref{thm:compact disc inv princ res} is not required for convergence of the corresponding looptrees. In this sense, condition $(ii)$ reflects the fact the looptree $\textsf{Loop} (\tau_n)$ isn't quite the same as the looptree $\L_{W^n}$. Condition $(ii)$ is precisely what is required to say that the difference between $\textsf{Loop} (\tau_n)$ and $\L_{W^n}$ becomes negligible in the limit. Hence, in the continuum, the same proof gives the following result. \begin{proposition}\label{thm:compact cont inv princ} Let $(f_n)_{n \geq 1}$ be a sequence in $D^{\text{exc}}([0,1], \mathbb{R}^{\geq 0})$, and $f \in D^{\text{exc}}([0,1], \mathbb{R}^{\geq 0})$ be such that $f_n \rightarrow f$ as $n \rightarrow \infty$ with respect to the Skorohod-$J_1$ topology. Additionally let $\nu$ and $\nu_n$ be the projections of Lebesgue measure via $p_f$ and $p_{f_n}$ onto the spaces $\L_f$ and $\L_{f_n}$ respectively. Then \[ d_{\text{GHP}} \Bigg( \Big(\L_{f_n}, \d_n, \nu_n, \rho_n \Big), \Big( \mathcal{L}_f, \d_f, \nu_f, \rho_f \Big) \Bigg) \rightarrow 0 \] as $n \rightarrow \infty$. Here $\d$ can denote either the shortest-distance metric of \cite{RSLTCurKort}, or the resistance metric of (\ref{eqn:R}), but defined using the function $f$ in place of $X^{\text{exc}}$. Similarly for $\d_n$ and $f_n$. \end{proposition} The result follows exactly as in the proof of \cite[Theorem 4.1]{RSLTCurKort} by defining a correspondence between $\L_f$ and $\L_{f_n}$ to consist of all pairs $(t, \lambda_n (t))$, where $\lambda_n$ is the Skorohod homeomorphism that minimises the Skorohod distance between $f_n$ and $f$. The extension to include convergence of measures can be obtained exactly as in \cite[Proposition 4.6]{ArchBMCompactLooptrees}. Clearly the result of the proposition will hold for functions defined on any compact time interval, not just $[0,1]$. We will use this in Section \ref{sctn:LLT} to prove Theorem \ref{thm:LLT}. Moreover, by extending the coding functions to be constant beyond endpoints where necessary, the result also holds providing the supports of the functions $f_n$ converge to that of $f$. At some points in this paper, we will refer to the ``corresponding" or ``underlying" stable tree of $\L_{\alpha}$, by which we mean the stable tree $\T_{\alpha}$ coded by the same excursion that codes $\L_{\alpha}$. We let $\L_{\alpha}$ denote a compact stable looptree conditioned on $\nu(\L_{\alpha})=1$, but at various points we will let $\tilde{\L_{\alpha}}$ denote a generic stable looptree coded by an excursion under the It\^o measure but without any conditioning on its total mass. We will also let $\L_{\alpha}^{1}$ denote a stable looptree but conditioned so that its underlying tree has height $1$. However, we will make this notation explicit at the time of writing. The height of a stable tree $\tilde{\T_{\alpha}}$ is defined as $H_{\text{max}} = \sup_{u \in \tilde{\T_{\alpha}}} d_{\tilde{\T_{\alpha}}}(\rho, u)$. As the height process is almost surely continuous, this maximum is almost surely realised by at least one $u \in \tilde{\T_{\alpha}}$. Moreover, we see from \cite[Equation (23)]{DuqWangDiameter} (and references therein) that there is almost surely a unique $u \in \tilde{\T_{\alpha}}$ that attains this maximum, which we denote by $u_H$. If $\tilde{\L_{\alpha}}$ is the corresponding stable looptree, we define two notions of its height: \begin{enumerate}[(i)] \item We define its $L^W$-Height to be the looptree distance from $\rho$ to $u_H$, \item We define its $L$-Height to be $\sup_{u \in \tilde{\L_{\alpha}}} d_{\tilde{\L_{\alpha}}}(\rho, u)$. \item We define its $L^m$-Height to be $\max \tilde{X}_s^{\text{exc}}$, where $\tilde{X}^{\text{exc}}$ is the L\'{e}vy excursion coding $\tilde{\L_{\alpha}}$. \end{enumerate} In general, these are not the same. Note however that the $L^m$-Height is at least as big as the $L$-Height, since $\tilde{X}_s^{\text{exc}}$ gives the distance to the point in $\tilde{\L_{\alpha}}$ represented by $s$ but going ``clockwise" around all loops. At times, we will also use the notation $T^W$-Height and $T^m$-Height to denote the length of the corresponding spine in the underlying tree, which we respectively denote by W-spine or m-spine. \subsubsection{Uniform re-rooting invariance for stable trees and looptrees} We will also use re-rooting invariance properties of stable trees and looptrees in our arguments. In particular, Duquesne and Le Gall proved in \cite[Proposition 4.8]{DuqLeGPFALT} that stable L\'{e}vy trees are invariant under re-rooting at a uniform point. Following on from this, they also proved the stronger result of invariance under re-rooting at a deterministic point $u \in [0,1]$ in \cite[Theorem 2.2]{DuqLeGRerooting}. In \cite{HPWSpinPart}, the authors provide an alternative proof of uniform re-rooting invariance by considering a spinal decomposition of stable trees and using exchangeability properties of the resulting mass partition. This additionally allows them to show that stable trees are the only fragmentation trees for which this property holds. As a result, we obtain a similar uniform re-rooting invariance property for stable looptrees. This is stated precisely as \cite[Remark 4.6]{RSLTCurKort}, and the principles there show that looptrees are invariant under re-rooting at a uniform leaf, which is an equivalent statement in the limiting case. We will exploit this in the proof of Theorem \ref{thm:LLT} where we will in fact prove the convergence result for compact stable looptrees rooted at a uniform point. \subsubsection{Williams' decomposition of stable looptrees}\label{sctn:Williams Decomp} The Williams' Decomposition for stable trees was given in \cite{AbDelWilliamsDecomp}. There, the authors show that if we define the W-spine of a stable L\'{e}vy tree $\tilde{\T_{\alpha}}$ to be the unique path from its root to $u_H$, then $\tilde{\T_{\alpha}}$ can be broken along this W-spine and that the resulting fragments form a collection of smaller L\'{e}vy trees. As a consequence, we immediately have a similar decomposition result for looptrees. The Williams' Decomposition for stable trees given in \cite{AbDelWilliamsDecomp} encodes this decomposition of $\tilde{\T_{\alpha}}$ along its W-spine in a Poisson process. In the Brownian case of $\alpha = 2$, this corresponds to Williams' decomposition of Brownian motion. Letting $H_{\text{max}}$ and $u_H$ be as above, we define the Williams' spine (or W-spine) of $\tilde{\T_{\alpha}}$ to be the segment $[[\rho, u_H]]$, and define the Williams' loopspine (or W-loopspine) in the corresponding looptree $\tilde{\L_{\alpha}}$ to be the closure of the set of loops coded by points in $[[\rho, u_H]]$. One of the main results of \cite{AbDelWilliamsDecomp} is a theorem which firstly gives the distribution of the loop lengths along the W-loopspine, and additionally the distribution of the fragments obtained by decomposing along it. Given the spine from $\rho$ to $u_H$, and conditional on $H_{\text{max}} = H$, the loops along the W-loopspine can be represented by a Poisson point measure $\sum_{j \in J} \delta (l_j, t_j, u_j)$ on $\mathbb{R}^+ \times [0, H] \times [0,1]$ with a certain intensity. A point $(l,t,u)$ corresponds to a loop of length $l$ in the W-loopspine, occurring on the W-spine at distance $t$ from the root in the underlying tree $\tilde{\T_{\alpha}}$, and such that a proportion $u$ of the loop is on the ``left" of the W-loopspine, and a proportion $1-u$ is on the ``right". In \cite{AbDelWilliamsDecomp}, this is written in terms of the exploration process on $\tilde{\T_{\alpha}}$, but we interpret their result below in the context of looptrees. We note that when stating this result, we are not conditioning on the total mass of $\tilde{\T_{\alpha}}$: only the maximal height. The mass of $\tilde{\T_{\alpha}}$ will depend on its height via the joint laws for these under the It\^o excursion measure. \begin{theorem}(Follows directly from \cite[Lemma 3.1 and Theorem 3.2]{AbDelWilliamsDecomp}).\label{thm:AbDel Williams Decomp} \begin{enumerate}[(i)] \item Conditionally on $H_{\text{max}}=H$, the set of loops in the W-loopspine forms a Poisson point process $\mu_{\textsf{W-loopspine}} = \sum_{j \in \mathcal{J}} \delta (l_j, t_j, u_j)$ on the W-spine in the underlying tree with intensity \[ \mathbb{1}_{\{ [0,1] \}}(u) \mathbb{1}_{\{[0,H]\}}(t) l \exp \{ -l (H-t)^{\frac{-1}{\alpha - 1}} \} du \ dt \ \Pi (dl), \] where $\Pi$ is the underlying L\'{e}vy measure, with $\Pi(dl) = \frac{1}{|\Gamma(-\alpha)|} l^{-\alpha - 1} \mathbb{1}_{(0, \infty)}(l) dl$ in the stable case. We will denote the atom $\delta (l_j, t_j, u_j)$ by $\textsf{Loop}_j$. \item Let $\delta (l, t, u)$ be an atom of the Poisson process described above. The set of sublooptrees grafted to the W-loopspine at a point on the corresponding loop can be described by a random measure $M^{(l)} = \sum_{i \in I} \delta^{(l)} (\mathcal{E}_i, D_i)$, where $\mathcal{E}_i$ is a L\'{e}vy excursion that codes a looptree in the usual way, and $D_i$ represents the distance going clockwise around the loop from the point at which this sublooptree is grafted to the loop, to the point in the loop that is closest to $\rho$. This measure has intensity \begin{align*} N( \cdot, H_{\text{max}} \leq H-t) \times \mathbb{1}_{\{[0,l]\}} dD. \end{align*} In particular, since the sublooptrees are coded by the It\^o excursion measure, they are just rescaled copies of our usual normalised compact stable looptrees, and each of these is grafted to the loop on the W-loopspine at a uniform point around the loop lengths. \end{enumerate} \end{theorem} \begin{remark} Point $(ii)$ is a slight extension of the results of \cite{AbDelWilliamsDecomp} since the authors of that paper are only concerned with stable trees, and consequently are not interested in how the sublooptrees are distributed around each loop in the W-loopspine. Instead they write that the subtrees incident to the W-spine at the node corresponding to the atom $\delta(l,t,u)$ are described by a Poisson random measure with intensity $l N( \cdot, H_{\text{max}} \leq H-t)$. In fact, in our proofs we will only be counting sublooptrees grafted to entire loops so the distribution of these around each individual loop will not matter. However, it should be clear from equation (11) and the paragraph following it in \cite{DuqLeGPFALT} that the sublooptrees are actually distributed uniformly around each loop. \end{remark} In Proposition \ref{prop:resistance results infinite}, we will have to decompose along the loopspine from the root to a point attaining the distance of the $L^m$-Height from the root. By analogy with the notation above, we will call this the $m$-loopspine, and the corresponding spine in the underlying tree the $m$-spine. We do not prove a specific distribution for the decomposition along this m-loopspine, but note that by similar principles to the Williams' case, the Poisson measure describing the loop lengths along the m-loopspine (analogous to that in Theorem \ref{thm:AbDel Williams Decomp}(i)) will have the form \begin{equation*} C_{\alpha} \mathbb{1}_{\{ [0,1] \}}(u) \mathbb{1}_{\{[0,H^m]\}}(t) l^{-\alpha} \textsf{pen}(l,H^m,t) du \ dt \ dl, \end{equation*} where $C_{\alpha} = \frac{\alpha (\alpha - 1)}{\Gamma (2-\alpha)}$, as before, $H^m = T^m\text{-Height}(\tilde{\L_{\alpha}})$, and \textsf{pen} is a lower order penalty term. In particular, by considering only loops on incident on the first half of the m-spine, it can be bounded above and below by a constant. Moreover, the sublooptrees grafted to the m-loopspine will be coded by a thinned version of the It\^o excursion measure. This can be proved rigorously by applying Proposition \ref{prop:descent PP} for an unconditioned L\'{e}vy process and transferring to the excursion via the Vervaat transform (Theorem \ref{thm:Vervaat}) and absolute continuity relation (\ref{eqn:RN deriv levy bridge}). \subsection{Infinite critical trees and looptrees}\label{sctn:infinite trees bckgrnd} In this section we introduce Kesten's tree $T_{\infty}$ for a given critical offspring distribution $\xi$. In light of Theorem \ref{thm:Kesten LLT}, it is the natural way to construct such an infinite tree. \begin{definition}\label{def:Kesten's tree}(\cite[Definition 2.9]{AbDelGWIntro}, adapted from \cite{KestenIICtree}). Let $\xi$ be a critical offspring distribution, and define its size biased version $\xi^*$ by \[ \xi^*(n) = {n \xi (n)}. \] The \textbf{Kesten's tree} $T_{\infty}$ associated to the probability distribution $\xi$ is a two-type Galton-Watson tree distributed as follows: \begin{itemize} \item Individuals are either normal or special. \item The root of $T_{\infty}$ is special. \item A normal individual produces only normal individuals according to $\xi$. \item A special individual produces individuals according to the size-biased distribution $\xi^*$. Of these, one of them is chosen uniformly at random to be special, and the rest are normal. \end{itemize} \end{definition} Almost surely, the special vertices form a unique infinite backbone of $T_{\infty}$. Note that this is one-ended. Aldous in \cite{AldousFringeSinTree} coined the term \textit{sin-trees} for such trees, since they have a single infinite spine. The following local limit theorem was originally proved by Kesten in \cite{KestenIICtree} under a second moment condition, but was proved with the stated assumptions in \cite[Theorem 7.1]{JansonSurvey}, and demonstrates that this construction is the right one to take. \begin{theorem}\label{thm:Kesten LLT}(\cite[Lemma 1.14]{KestenIICtree}, \cite[Theorem 2.1.1]{AbDelGWIntro}, \cite[Theorem 7.1]{JansonSurvey}). Let $\xi$ be a critical offspring distribution with $\xi(0) + \xi(1) < 1$ and define $T_{\infty}$ as in Definition \ref{def:Kesten's tree}. Let $T_n$ be a Galton-Watson tree with offspring distribution $\xi$ conditioned on having height at least $n$. Then \[ T_n \overset{(d)}{\rightarrow} T_{\infty} \] with respect to the Gromov-Hausdorff-vague topology as $n \rightarrow \infty$. \end{theorem} The convergence is actually stated in a stronger topology in the original literature, but we are mainly interested in Gromov-Hausdorff-vague convergence in this paper. Kesten's construction has been imitated in the continuum by Duquesne in \cite{DuqSinTree}, who constructs continuum sin-trees and shows that these arise as the appropriate local limit of compact continuum trees conditioned on being large. By analogy with the compact continuum case, Duquesne's construction involves defining two height functions from two independent L\'{e}vy processes in the same way as done with the excursion in (\ref{eqn:height def}). These respectively code the tree structure on the left and right sides of the spine in the usual way. The construction was further extended to infinite discrete looptrees in \cite{BjornStef}, where the authors define the infinite looptree associated with a critical offspring distribution $\xi$ to simply be $\textsf{Loop}'(T_{\infty})$, where $T_{\infty}$ is constructed as in Definition \ref{def:Kesten's tree}, and $\textsf{Loop}'$ is an operation very close to \textsf{Loop}, as defined in \cite[Section 4]{RSLTCurKort} and which we will introduce later in Section \ref{sctn:scaling lims}. This infinite looptree inherits the structure of having a loopspine with loop sizes determined by a size-biased version of $\xi$, to which usual compact discrete looptrees are grafted. The local limit theorem of Theorem \ref{thm:Kesten LLT} thus passes directly to the looptree case by continuity of the $\textsf{Loop}$ operation (see \cite[Corollary 2.3]{BjornStef}, the proof of which can easily be adapted to \textsf{Loop} rather than $\textsf{Loop}'$). Finally, Kesten's construction of Definition \ref{def:Kesten's tree} was extended to critical multi-type Galton Watson trees in \cite[Theorem 3.1]{StephensonLocal} along with an analogous local limit theorem. Richier in \cite{RichierIICUIHPT} then used this to define an infinite two-type looptree and showed in \cite[Lemma 5.5]{RichierMapBoundaryLimit} that this arises as a similar local limit under appropriate conditions. The concept of an infinite stable looptree has thus left a gap in the literature and the purpose of this paper is to fill that gap. The construction is the one suggested in \cite[Section 6]{RichierIICUIHPT} and extends the construction of infinite discrete looptrees in the same way that Duquesne's continuum sin-trees extend the construction of their discrete counterparts. The resulting local limit theorem allows us to prove various volume and heat kernel convergence results for compact stable looptrees in \cite{ArchBMCompactLooptrees}. \section{Construction of infinite stable looptrees}\label{sctn:construction of infinite stable looptrees} Our construction uses two stable L\'{e}vy processes to code each side of the loopspine, in place of the excursion. This is the approach suggested in \cite[Section 6]{RichierIICUIHPT} and our construction is merely the continuum version of the discrete construction of \cite[Section 3]{RichierIICUIHPT}, except that we have essentially turned this construction ``upside down" to match the original coding mechanism for compact looptrees. We start by giving an equivalent construction of compact stable looptrees. We give the construction for a looptree of mass $\l$. \begin{tcolorbox}[colback=white] \textbf{Two-sided Construction of Compact Stable Looptrees} \begin{enumerate} \item Let $X^{\text{br},\ell}$ be a spectrally positive, $\alpha$-stable L\'{e}vy bridge of lifetime $\l$. Let $m = m_{\l}$ be the (almost surely unique) time at which $X^{\text{br},\ell}$ attains its infimum. \item Let $(X^{(2, \l)}_t)_{t \geq 0}$ be the pre-infimum process, and $(X^{(1, \l)}_t)_{t \geq 0}$ be the time-reversed post-infimum process, extended to stay constant after times $m$ and $1-m$ respectively. That is, \begin{align*} X^{(2, \l)}_t = \begin{cases} X^{\text{br}}_{t} \text{ for } t \in [0,m], \\ X^{\text{br}}_{m} \text{ for } t > m; \end{cases} \hspace{10mm} X^{(1, \l)}_t = \begin{cases} X^{\text{br}}_{\l-t} \text{ for } t \in [0, 1-m], \\ X^{\text{br}}_{m} \text{ for } t > \l-m. \end{cases} \end{align*} \item Define a function ${X}^{\l}: \mathbb{R} \rightarrow \mathbb{R}$ by \[ {X}^{\l}_t = \begin{cases} X^{(2, \l)}_{t} & \text{ if } t \geq 0, \\ X^{(1, \l)}_{-t} & \text{ if } t < 0. \end{cases} \] It should be clear from the Vervaat transform that ${X}^{\l}$ is just a shifted L\'{e}vy excursion. \item For $s, t \in \mathbb{R}$, we define resistances $r^{\l}, R^{\l}_0$ and $R^{\l}$ from ${X}^{\l}$ exactly as in (\ref{eqn:r def}), (\ref{eqn:R0}) and (\ref{eqn:R}), but with the superscript $\l$ on all the quantities involved. We can similarly define distances $\delta^{\l}$, $d^{\l}_0$ and $d^{\l}$ exactly as in (\ref{eqn:d}). Analogously to the normalised case, we then set $\L^{\l}_{\alpha} = (\mathbb{R} / \sim, d^{\l})$, and ${\L^{\l}_{\alpha}}^R = (\mathbb{R} / \sim, R^{\l})$, and let $p^{\l}: \mathbb{R} \rightarrow \L^{\l}_{\alpha}$ denote the canonical projection. \end{enumerate} \end{tcolorbox} Before giving the infinite construction, we give a brief outline of the strategy for proving Theorem \ref{thm:LLT}, which exploits uniform rerooting invariance of stable looptrees. By taking a stable looptree coded by an excursion $X^{\text{exc},\l}$ of length $\l$, and taking the root to be a uniform point in $U \in [0,\l]$, it follows from the Vervaat transformation that the processes $(X^{\text{exc},\l}_t)_{0 \leq t \leq U}$ and $(X^{\text{exc},\l}_t)_{U \leq t \leq \l}$ are distributed respectively as the post- and pre-minimum parts of a stable L\'{e}vy bridge. Standard convergence results then imply that on any compact interval, these converge in distribution to stable L\'{e}vy processes as $\l \rightarrow \infty$. Moreover, if we think of the loopspine as the sequence of loops coded by jump points at times $0 \preceq t \preceq U$, then $(X^{\text{exc},\l}_t)_{0 \leq t \leq U}$ codes for the loopspine along with everything grafted to the left hand side of it, and $(X^{\text{exc},\l}_t)_{U \leq t \leq \l}$ codes for everything grafted to the right hand side of it. It is therefore natural to replace each of these by unconditioned L\'{e}vy process in the infinite volume limit. Due to the Vervaat transformation, this construction is entirely equivalent to the original construction of looptrees using the L\'{e}vy excursion, but we have now split the coding into two functions which define each side of the loopspine. To code the infinite looptree, we will take limits of each of these functions and use these to code each side of the infinite loopspine. We first give the construction, and then prove Theorem \ref{thm:LLT} in Section \ref{sctn:LLT}. \begin{tcolorbox}[colback=white] \textbf{Construction of Infinite Stable Looptrees} \begin{enumerate} \item Let $X$ be an $\alpha$-stable, spectrally positive L\'{e}vy process, and let $X'$ be an $\alpha$-stable, spectrally negative L\'{e}vy process. \item Define a function $\Xi: \mathbb{R} \rightarrow \mathbb{R}$ by \[ \Xi_t = \begin{cases} X_{t} & \text{ if } t \geq 0, \\ X'_{-t^-} & \text{ if } t<0. \end{cases} \] \item Analogously to the compact construction above, if $t$ is a jump point of $\Xi$ with jump size $\Delta_t$ and $a, b \in [0, \Delta_t]$, set \begin{align*} {\delta}^{\infty}_t(a,b) &= \text{min} \{|a-b|, \Delta_t - |a-b| \}, \\ {r}^{\infty}_t(a,b) &= {\Big( \frac{1}{|a-b|}+\frac{1}{\Delta_t - |a-b|} \Big) }^{-1}= \frac{|a-b|(\Delta_t - |a-b|)}{\Delta_t}. \end{align*} Additionally, as before, for $s, t \in \mathbb{R}$ with $s \leq t$ set ${I}^{\infty}_{s,t} = \inf_{r \in [s,t]} \Xi_r$, and ${x}^{\infty}_{s,t} = {I}^{\infty}_{s,t} - \Xi_{s^-}$. For $s, t \in \mathbb{R}$ we again write $s \prec t$ if $s \preceq t$ (meaning that ${x}^{\infty}_{s,t} \geq 0$) and $s \neq t$. Then, if $s \preceq t$ set \begin{align*} {d}^{\infty}_0(s,t) &= \sum_{s \prec u \preceq t} {\delta}^{\infty}_u(0, x_u^t), \\ {R}^{\infty}_0(s,t) &= \sum_{s \prec u \preceq t} {r}^{\infty}_u(0, x_u^t). \end{align*} Then, for general $s, t \in \mathbb{R}$, set \begin{align}\label{eqn:infinite d R def} \begin{split} {d}^{\infty}(s,t) &= {\delta}^{\infty}_{s \wedge t}(x^{\infty}_{s \wedge t,s},x^{\infty}_{s \wedge t,t}) + {d}^{\infty}_0(s \wedge t, s) + {d}^{\infty}_0(s \wedge t, t),\\ {R}^{\infty}(s,t) &= {r}^{\infty}_{s \wedge t}(x^{\infty}_{s \wedge t,s},x^{\infty}_{s \wedge t,t}) + {R}^{\infty}_0(s \wedge t, s) + {R}^{\infty}_0(s \wedge t, t). \end{split} \end{align} Finally, define an equivalence relation $\sim$ on $\mathbb{R}$ by setting $s \sim t$ if and only if ${d}^{\infty}(s,t)=0$. We define the infinite looptrees $\L^{\infty}_{\alpha}$ and $\L^{\infty, R}_{\alpha}$ by \begin{align*} \L^{\infty}_{\alpha} &= (\mathbb{R} / \sim, {d}^{\infty}), \\ \L^{\infty, R}_{\alpha} &= (\mathbb{R} / \sim, {R}^{\infty}). \end{align*} \end{enumerate} \end{tcolorbox} For ease of notation and intuition, we will focus on $\L^{\infty}_{\alpha}$ rather than $\L^{\infty, R}_{\alpha}$ in Sections \ref{sctn:vol bounds and spectral dim infinite} and \ref{sctn:LLT}, but the results will hold in the resistance setting by exactly the same arguments. As in the compact case, we can define the projection $p^{\infty}: \mathbb{R} \rightarrow \L_{\alpha}^{\infty}$, which is almost surely continuous, and endow $\L_{\alpha}^{\infty}$ with the measure $\nu^{\infty}$ which is defined to be the pushforward of Lebesgue measure on the real line to $\L_{\alpha}^{\infty}$ via $p^{\infty}$. We also have the following proposition, as a direct consequence of the scale invariance of the stable L\'{e}vy process. \begin{proposition}[Scale invariance of $\L^{\infty}_{\alpha}$]\label{prop:Lai scale inv} For any $c>0$, \[ (\L^{\infty}_{\alpha}, c\d, \rho^{\infty}, c^{\alpha} \nu^{\infty}) \overset{(d)}{=} (\L^{\infty}_{\alpha}, \d, \rho^{\infty}, \nu^{\infty}), \] where $\d$ here can be equal to either $d^{\infty}$ or $R^{\infty}$. \end{proposition} We also record the following result, which arises as a direct consequence of Theorem \ref{thm:LLT}, \cite[Corollary 4.4]{RSLTCurKort} (which gives the same result in the compact case), and \cite[Theorem 8.1.9]{Burago} (which implies that this property is preserved in the limit). \begin{corollary}\label{cor:length space} Almost surely, $\L^{\infty}_{\alpha}$ is a length space. \end{corollary} \section{Limit theorems}\label{sctn:LLT} In this Section we prove Theorems \ref{thm:LLT} and \ref{thm:main scaling lim}, and other similar results. \subsection{Proof of Theorem \ref{thm:LLT}} Theorem \ref{thm:LLT} is proved by applying Proposition \ref{thm:compact cont inv princ} to the following convergence result. The L\'{e}vy processes are all normalised as in Section \ref{sctn:Levy background}. \begin{proposition}\label{prop:bridge conv} Let $X^{\text{br},\ell}$ be a spectrally positive, $\alpha$-stable L\'{e}vy bridge of lifetime $\l$, let $X$ be an $\alpha$-stable, spectrally positive L\'{e}vy process, and let $X'$ be an independent $\alpha$-stable, spectrally negative L\'{e}vy process. Also let $m_{\l}$ be the (almost surely unique) time at which $X^{\text{br},\ell}$ attains its minimum. Then, for any $T_1, T_2>0$, letting $f$ and $g$ be any bounded continuous functions $D([0,T_i], \mathbb{R}) \rightarrow \mathbb{R}$, we have that \begin{align*} \E{ f\Big( (X^{\text{br},\ell}_{t \wedge m_{\l}})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{((\l-t) \vee m_{\l})^-})_{t \in [0,T_2]}\Big)} &\rightarrow \E{f\Big((X_t)_{t \in [0,T_1]}\big)} \E{g\Big((X_t')_{t \in [0,T_2]}\Big)} \end{align*} as $\l \rightarrow \infty$. \end{proposition} Before we prove the proposition, we show how we can apply Proposition \ref{thm:compact cont inv princ} to the functions $X$ and $X'$ on compact time intervals to prove Theorem \ref{thm:LLT}. \begin{proof}[Proof of Theorem \ref{thm:LLT}, assuming Proposition \ref{prop:bridge conv}] We need to show that for Lebesgue almost every $r>0$, \begin{equation}\label{eqn:R ball LLT} \mathcal{B}_r(\L^{\l}_{\alpha}) \overset{(d)}{\rightarrow} \mathcal{B}_r(\L_{\alpha}^{\infty}). \end{equation} To this end, take some $r>0$. We define two times $t_g(r)$ and $t_d(r)$ by \begin{align*} t_g(r) = \inf \{ s \geq 0: \Delta_{-s} \geq 4r, \delta^{\infty}_{-s}(x^{\infty}_{-s,0}) \geq r \}, \hspace{10mm} t_d(r) = \inf \{s \geq 0: \Xi_s \leq \Xi_{{-t_g(r)}^-} \}. \end{align*} The purpose of defining $t_g(r)$ and $t_d(r)$ like this is that $X^{\infty}$ codes a compact looptree on the interval $[-t_g(r), t_d(r)]$, and that $\mathcal{B}_r(\L_{\alpha}^{\infty})$ is contained in this. Note that $t_g(r)$ is $\mathbf{P}$-almost surely finite, since letting $L_s$ denote the local time spent by $(\Xi_{-t^+})_{t \geq 0}$ at its infimum by time $s$, normalised so that $\E{e^{\lambda \Xi_{L^{-1}(t)}}} = e^{-\lambda^{\alpha - 1}t}$, we have from Proposition \ref{prop:descent PP} that the measure \[ \sum_{s \in J} \delta_{(L_s, \Delta_s)} \] is a Poisson point measure of intensity $dl \cdot x \mathbb{1} \{ x^{-\alpha} \geq 4r \} dx$, where $J$ is the set $\{ s \geq 0: \Delta_{-s} \geq 4r, \delta^{\infty}_{-s}(x^{\infty}_{-s,0}) \geq r \}$. Moreover, by \cite[Chapter VIII, Lemma 1]{BertoinLevy} we know that $L^{-1}$ is a stable subordinator of parameter $1-\frac{1}{\alpha}$, and hence $L_t \rightarrow \infty$ $\mathbf{P}$-almost surely as $t \rightarrow \infty$. It follows that $t_g(r)$ is $\mathbf{P}$-almost surely finite for all $r>0$. Similarly, since $\liminf_{t \rightarrow \infty} \Xi_t = -\infty$ $\mathbf{P}$-almost surely, $t_d(r)$ is also $\mathbf{P}$-almost surely finite for all $r>0$. For notational convenience, we write $t_g = t_g(r)$ and $t_d = t_d(r)$ from now on. The compact looptree $\L^{\l}_{\alpha}$ is coded by an excursion $X^{\text{exc},\ell}$ of length $\l$. To write this as a two-sided construction as described in the previous section, choose $U_{\l}$ uniform on $[0, \l]$, and define a function $X^{\text{br},\ell}: [-U_{\l}, \l-U_{\l}]$ by \[ X^{\text{br},\ell}_t = X^{\text{exc},\ell}_{t+U_{\l}} - X^{\text{exc},\ell}_{U_{\l}} \] for all $t \in [-U_{\l}, \l-U_{\l}]$. Then $X^{\text{br},\ell}$ codes $\L^{\l}_{\alpha}$. Moreover, we can extend $X^{\text{br},\ell}$ to $\mathbb{R}$ by taking it to be constant outside of $[-U_{\l}, \l-U_{\l}]$, and by Proposition \ref{prop:bridge conv}, it is then the case that $(X^{\text{br}, \l}_t)_{t \in [-t_g - 1, t_d + 1]} \overset{(d)}{\rightarrow} (X^{\infty}_t)_{t \in [-t_g - 1, t_d + 1]}$. Since the interval $[-t_d-1, t_g+1]$ is $\mathbf{P}$-almost surely compact, and the space of c\`{a}dl\`{a}g functions with compact support endowed with the Skorohod-$J_1$ topology is separable, it follows by the Skorohod Representation Theorem and Proposition \ref{prop:bridge conv} that there exists a probability space $(\Omega, \mathcal{F}, \mathbb{P})$ on which $(X^{\text{br}, \l}_t)_{t \in [-t_g - 1, t_d + 1]} \rightarrow (X^{\infty}_t)_{t \in [-t_g - 1, t_d + 1]}$ almost surely. We henceforth work in this space. For each $\l>0$, let $\lambda_{\l}$ be the Skorohod homeomorphism (defined pointwise on $\Omega$) from $[-t_g - 1, t_d + 1] \rightarrow [-t_g - 1, t_d + 1]$ that minimises the Skorohod distance between these $X^{\text{br}, \l}$ and $X^{\infty}$ on this interval. Then set $t_d^{\l} = \lambda_{\l}(t_d)$, and similarly $t_g^{\l} = \lambda_{\l}(t_g)$. The correspondence consisting of all pairs $[t, \lambda_{\l}(t)]$ for $t \in [-t_g, t_d]$ is a subset of the correspondence used to minimise the Gromov-Hausdorff distance in the proof of Proposition \ref{thm:compact cont inv princ}, so letting $\L_{\alpha}^{\l,r} = p^{\l}((X^{\text{br}, {\l}}_t)_{t \in [-t^{\l}_g, t^{\l}_d]})$ for each $\l>0$ and $\L^{\infty, r}_{\alpha} = p^{\infty}((X_t)_{t \in [-t_g, t_d]})$, it follows from Proposition \ref{thm:compact cont inv princ} that $d_{GHP} (\L_{\alpha}^{\l,r}, \L^{\infty, r}_{\alpha}) \rightarrow 0$ as $\l \rightarrow \infty$. Since $\mathcal{B}_r(\L^{\l}_{\alpha}) \subset \L_{\alpha}^{\l,r}$ and $\mathcal{B}_r(\L_{\alpha}^{\infty}) \subset \L^{\infty, r}_{\alpha}$, it thus follows that $\mathcal{B}_r(\L^{\l}_{\alpha}) \overset{(d)}{\rightarrow} \mathcal{B}_{r'}(\L_{\alpha}^{\infty})$ for Lebesgue almost every $r'<r$. By taking a countable sequence $r_n \rightarrow \infty$ we therefore deduce the result for Lebesgue almost-every $r>0$, and the theorem follows. \end{proof} We now conclude the proof of Theorem \ref{thm:LLT} by proving Proposition \ref{prop:bridge conv}. \begin{proof}[Proof of Proposition \ref{prop:bridge conv}] The key point is that the two sides of the bridge have a density with respect to the laws of $X$ and $X'$, in that for any $f, g$ as in the statement of the proposition, and any $\l > T_1 + T_2$, it follows from a minor modification of (\ref{eqn:RN deriv levy bridge}) that \begin{align}\label{eqn:density bridge} \begin{split} &\E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\Big)} \\ &\hspace{2cm}= \E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_{t}')_{t \in [0,T_2]}\Big) \frac{p_{\l - T_1 - T_2}(X_{T_2^-}' -X_{T_1})}{p_{\l}(0)}}, \end{split} \end{align} where $p_t(\cdot)$ here denotes the transition density of $X$. The proof then essentially just uses the fact that $m_{\l}$ and $\l - m_{\l}$ tend to infinity in probability as $\l \rightarrow \infty$, and then the fact that with high probability, $X_{T_1}$ and $X'_{T_2}$ will also not be too large. There are two main steps. We first note that the quantity \begin{align*} \E{ f\Big( (X^{\text{br},\ell}_{t \wedge m_{\l}})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{((\l-t) \vee m_{\l})^-})_{t \in [0,T_2]}\Big)} - \E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\Big)} \end{align*} is upper bounded by \begin{align*} &\ \ \ 2 ||f||_{\infty} ||g||_{\infty} \Bigg( \pr{m_1 < \frac{T_1}{\l}} + \pr{m_1 > 1 - \frac{T_2}{\l}} \Bigg), \end{align*} which converges to $0$ as $\l \rightarrow \infty$. This allows us to apply (\ref{eqn:density bridge}) as follows. First, note that it follows from the scaling relation $p_t(x) = t^{\frac{-1}{\alpha}}p_1(xt^{\frac{-1}{\alpha}})$ that \begin{align*} \frac{p_{\l - T_1 - T_2}(X_{T_2}' -X_{T_1})}{p_{\l}(0)} = \Bigg( \frac{\l}{\l - T_1 - T_2}\Bigg)^{\frac{1}{\alpha}} \frac{p_1\big( (\l - T_1 - T_2)^{\frac{-1}{\alpha}}(X_{T_2}' -X_{T_1}) \big) }{p_1(0)}. \end{align*} We denote this latter quantity by $p(\l, X, X', T_1, T_2)$, so that \begin{align*} \E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\big)} - \E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_t')_{t \in [0,T_2]}\Big)} \hspace{2cm} & \\ =\E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_{t}')_{t \in [0,T_2]}\Big) \Bigg( p(\l, X, X', T_1, T_2) - 1 \Bigg)}&. \end{align*} Taking some $0 < \epsilon \ll \frac{1}{\alpha}$, we then decompose on the event $\{ |X_{T_1}| \vee |X_{T_2}'| \leq (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}\}$ and its complement by writing the latter quantity as the sum \begin{small} \begin{align}\label{eqn:bridge exp two terms} \begin{split} &\E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_{t}')_{t \in [0,T_2]}\Big)\Bigg(p(\l, X, X', T_1, T_2) - 1 \Bigg)\mathbb{1} \{ |X_{T_1}| \vee |X_{T_2}'| \leq (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}\}} \\ &+ \E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_{t}')_{t \in [0,T_2]}\Big)\Bigg( p(\l, X, X', T_1, T_2) - 1 \Bigg) \mathbb{1} \{ |X_{T_1}| \vee |X_{T_2}'| > (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}\} }. \end{split} \end{align} \end{small} We deal with each of these two terms separately. For the first term, note that by continuity of the transition density \cite[Section VIII.1]{BertoinLevy}, \[ \sup_{|x| \leq 2(\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}} \Big\{ p_1\Big(x(\l - T_1 - T_2)^{\frac{-1}{\alpha}}\Big) \Big\} \rightarrow p_1(0) \] as $\l \rightarrow \infty$. We apply this by writing: \begin{align*} &\Big|\Big|\Bigg(p(\l, X, X', T_1, T_2) - 1 \Bigg)\mathbb{1} \{ |X_{T_1}| \vee |X_{T_2}'| \leq (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}\} \Big|\Big|_{\infty} \\ &\hspace{1.8cm} \leq \frac{1}{p_1(0)} \Bigg( \Bigg| \Big( \Big( \frac{\l}{\l - T_1 - T_2}\Big)^{\frac{1}{\alpha}} - 1 \Big) \sup_{|x| \leq 2(\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}} \Big\{ p_1\Big({x}{(\l - T_1 - T_2)^{\frac{-1}{\alpha}}}\Big) \Big\} \Bigg| \\ &\hspace{4.8cm} \ \ \ \ + \Bigg| \sup_{|x| \leq 2(\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}} \Big\{ p_1\Big({x}{(\l - T_1 - T_2)^{\frac{-1}{\alpha}}}\Big) \Big\} - p_1(0) \Bigg| \Bigg), \end{align*} from which we deduce that the first term in (\ref{eqn:bridge exp two terms}) converges to zero as $\l \rightarrow \infty$, since $f$ and $g$ are also bounded. To deal with the second term, we upper bound it by \begin{align*} ||f||_{\infty} ||g||_{\infty} \frac{1}{p_1(0)} ||p_1||_{\infty} \pr{|X_{T_1}| \vee |X'_{T_2}| > (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}}, \end{align*} which also vanishes as $\l \rightarrow \infty$. It therefore follows by an application of the triangle inequality and the bounds above that \begin{footnotesize} \begin{align*} &\E{ f\Big( (X^{\text{br},\ell}_{t \wedge m_{\l}})_{t \in [0,T_1]} \big) g\Big( (X^{\text{br},\ell}_{((\l-t) \vee m_{\l})^-})_{t \in [0,T_2]}\Big)} - \E{f\Big((X_t)_{t \in [0,T_1]}\big) g\Big((X'_{t})_{t \in [0,T_2]}\Big)}\\ &\hspace{5mm}\leq \E{ f\Big( (X^{\text{br},\ell}_{t \wedge m_{\l}})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{((\l-t) \vee m_{\l})^-})_{t \in [0,T_2]}\Big)} - \E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\Big)} \\ &\hspace{8mm} + \E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\big)} - \E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_t')_{t \in [0,T_2]}\Big)} \hspace{2cm} \\ &\hspace{5mm} \rightarrow 0 \end{align*} \end{footnotesize} as $\l \rightarrow \infty$, as claimed. We can then factorise the final term by independence of $X$ and $X'$. \end{proof} \subsection{Scaling limits of infinite discrete looptrees}\label{sctn:scaling lims} In this section, we prove that infinite stable looptrees are scaling limits of infinite discrete looptrees. We start by proving the following proposition, from which Theorem \ref{thm:main scaling lim} will follow. Note the analogy with Proposition \ref{thm:compact disc inv princ res}, and \cite[Theorem 4.1]{RSLTCurKort}. Given an infinite critical discrete tree $T_{\infty}$, we note that it can be coded by a two-sided Lukasiewicz path indexed by $\mathbb{Z}$ in the same way that an infinite critical continuum tree can be coded by a two-sided L\'{e}vy process. As introduced in Section \ref{sctn:infinite trees bckgrnd}, the infinite discrete looptrees defined by Bj\"ornberg and Stef\'ansson in \cite{BjornStef} are formed by first taking a critical offspring distribution $\xi$ in the domain of attraction of an $\alpha$-stable law, and then forming Kesten's tree $T_{\alpha}^{\infty}$ as outlined in Section \ref{sctn:infinite trees bckgrnd}. This tree has a unique infinite spine of vertices with a size-biased version of the offspring distribution. The authors define their looptree as $\textsf{Loop'} (T_{\alpha}^{\infty})$. Here $\textsf{Loop'}$ is an operation very similar to $\textsf{Loop}$, obtained as in Figure \ref{fig:BSLoop}, and $d_{GH}(\textsf{Loop} (T_{\alpha}^{\infty}), \textsf{Loop'} (T_{\alpha}^{\infty})) \leq 2$ (see \cite[Proof of Theorem 4.1]{RSLTCurKort}). We let $L_{\alpha}^{\infty, 1} = \textsf{Loop'}(T_{\alpha}^{\infty})$. \begin{figure}[h] \includegraphics[width=14cm, height=4cm]{loopprimediscretee-eps-converted-to} \centering \caption{A tree $T$ and $\textsf{Loop} ' (T)$, for the same underlying tree as in Figure \ref{fig:disc looptree intro}.}\label{fig:BSLoop} \end{figure} \begin{remark} In various places in other literature, the notation for $\textsf{Loop}$ and $\textsf{Loop'}$ is interchanged. We have used the notation of \cite{RSLTCurKort} since our paper follows on more naturally from the results there. \end{remark} We also make one further definition. Given an infinite critical tree $T_{\infty}$ and $R>0$, we define $\textsf{Loop} (T_{\infty})^R$ to be the sublooptree of $\textsf{Loop} (T_{\infty})$ obtained by letting $L$ be the first loop on the infinite loopspine that is of length greater than $4R$, and such that if we let $l_1$ and $l_2$ be the lengths of the two segments of this loop obtained by splitting the loop at the two points where it intersects its neighbouring loops in the infinite loopspine, we have that $\frac{l_1}{l_1 + l_2} \in [\frac{1}{4}, \frac{3}{4}]$. We then let $\textsf{Loop} (T_{\infty})^R$ be the subset of $\textsf{Loop} (T_{\infty})$ obtained by removing all descendants of all points in $L$ (but not removing $L$ itself). This definition is the discrete analogue to that of $\L_{\alpha}^{\infty,R}$ given in the proof of Theorem \ref{thm:LLT}, and is useful since $\mathcal{B}_R(\textsf{Loop} (T_{\infty})) \subset \textsf{Loop} (T_{\infty})^R$, but $\textsf{Loop} (T_{\infty})^R$ has the advantage of being a full looptree, whereas $\mathcal{B}_R(\textsf{Loop} (T_{\infty}))$ may contain incomplete loops. \begin{proposition}\label{prop:inf conv disc loop} Let $(\tau_n)_{n=1}^{\infty}$ be a sequence of infinite critical trees (in the sense of Kesten) with corresponding two-sided Lukasiewicz paths $(W^n)_{n = 1}^{\infty}$, and let $\d_n$ denote either the shortest-distance or effective resistance metric on $\textsf{Loop}(\tau_n)$. Additionally let $\nu_n$ be the measure that gives mass $1$ to each vertex in $\textsf{Loop}(\tau_n)$, and let $\rho_n$ be the root of ${\textsf{Loop}}(\tau_n)$, defined to be the vertex representing the edge joining the root of $\tau_n$ to its first child. Suppose that $(C_n)_{n=1}^{\infty}$ is a sequence of positive real numbers such that \begin{enumerate}[(i)] \item For any compact interval $K \subset \mathbb{R}$, $\Big( \frac{1}{C_n} W^n_{\lfloor n t \rfloor} \Big)_{t \in K} \overset{(d)}{\rightarrow} (X^{\infty}_t)_{t \in K}$ as $n \rightarrow \infty$, \item $\frac{1}{C_n} \textsf{Height}(\textsf{Tree} (\textsf{Loop} (\tau_n)^{rC_n})) \overset{\mathbb{P}}{\rightarrow} \ 0$ as $n \rightarrow \infty$, for all $r > 0$, where \textsf{Tree} \ is the inverse operation of \textsf{Loop}, and $\textsf{Loop} (\tau_n)^R$ is defined above. \end{enumerate} Then \[ \Big({\textsf{Loop}}(\tau_n), \frac{1}{C_n}\d_n, \frac{1}{n}\nu_n, \rho_n \Big) \overset{(d)}{\rightarrow} \Big( \L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty} \Big) \] as $n \rightarrow \infty$ with respect to the Gromov-Hausdorff vague topology, where $\d^{\infty}$ can denote either the shortest-distance or effective resistance metric on $\L^{\infty}_{\alpha}$, as appropriate. Moreover, the result also holds on replacing $\textsf{Loop}$ by $\textsf{Loop'}$ in all the statements above. \end{proposition} \begin{proof} We start by proving the result for \textsf{Loop}. We will prove the result with $\d=d$ and note that the corresponding result for $\d=R$ follows by the same arguments. The proof is again a consequence of Proposition \ref{thm:compact disc inv princ res}, given which, the proof is almost identical to the proof of Theorem \ref{thm:LLT} (i.e. by defining an increasing sequence of sublooptrees that exhaust the whole space, to each of which we then apply Proposition \ref{thm:compact disc inv princ res}), so we omit the details. As we did there, take $r>0$, and define two times $t_g(r)$ and $t_d(r)$ by \begin{align*} t_g(r) &= \inf \{ s \geq 0: \Delta_{-s} \geq 4r, \delta_{-s}(x_{-s}^0) \geq r \}, \\ t_d(r) &= \inf \{s \geq 0: {X}^{\infty}_s \leq {X}^{\infty}_{{-t_g(r)}^-} \}. \end{align*} It then follows by the Skorohod Representation Theorem that there exists a probability space $(\Omega, \mathcal{F}, \mathbb{P})$ upon which $(\frac{1}{C_n}W^n_{nt})_{-(t_g+1) \leq t \leq t_d+1} \rightarrow (X^{\infty})_{-(t_g+1) \leq t \leq t_d+1}$ almost surely with respect to the Skorohod-$J_1$ topology. As in the proof of Theorem \ref{thm:LLT}, for each $n \in \mathbb{N}$ let $\lambda_{n}$ be the Skorohod homeomorphism $[-t_g - 1, t_d + 1] \rightarrow [-t_g - 1, t_d + 1]$ that minimises the Skorohod-$J_1$ distance between these two functions, and set $t_d^{n} = \lambda_{n}(t_d)$, and similarly $t_g^{n} = \lambda_{n}(t_g)$. By repeating the arguments of the proof of Theorem \ref{thm:LLT}, and noting that condition $(ii)$ above ensures that condition $(ii)$ of Proposition \ref{thm:compact disc inv princ res} is satisfied, we deduce that the looptrees coded by $(\frac{1}{C_n}W^n_{nt})_{-t^n_g \leq t \leq t^n_d}$ converge to the looptree coded by $(X^{\infty})_{t \geq 0}$. The result then follows as in the proof of Theorem \ref{thm:LLT}. To prove the same result for \textsf{Loop}$'$ in place of \textsf{Loop}, note that since $d_{GH}(\textsf{Loop} (T_{\alpha}^{\infty}), \textsf{Loop'} (T^{\alpha}_\infty)) \leq 2$, the Gromov-Hausdorff convergence of Proposition \ref{thm:compact disc inv princ res} holds with $\textsf{Loop} (\tau_n)$ replaced by $\textsf{Loop'} (\tau_n)$, and the Prohorov convergence of measures of that proposition holds by the exactly the same arguments. As a consequence, we can just repeat exactly the same proof for \textsf{Loop}$'$. \end{proof} In particular, the result applies taking $\tau_n = T_{\alpha}^{\infty}$ for all $n$, and $C_n = a_n$. In this case, $\frac{1}{C_n} \textsf{Height}(\textsf{Tree} (\textsf{Loop} (\tau_n) (rC_n)))$ will be of order $r^{\alpha - 1}n^{-\frac{2-\alpha}{\alpha}}L(n)$ for some slowly-varying function $L$, so point (ii) of Proposition \ref{prop:inf conv disc loop} holds by an appplication of Markov's inequality. We therefore deduce both Theorem \ref{thm:main scaling lim}, and Theorem \ref{thm:BS looptree conv} below, as a corollary. \begin{theorem}\label{thm:BS looptree conv} Take $\textsf{Loop'}(T_{\alpha}^{\infty})$ as above, with $\nu'$ the measure on $\textsf{Loop'}(T_{\alpha}^{\infty})$ such that $\nu'(x) = 1$ for all $x \in \textsf{Loop'}(T_{\alpha}^{\infty})$. Then \[ (\textsf{Loop'}(T_{\alpha}^{\infty}), a_n^{-1} \d, n^{-1} \nu', \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff vague topology as $n \rightarrow \infty$. Here $\d$ (respectively $\d^{\infty}$) can denote either the geodesic metric $d$ (respectively $d^{\infty}$), or the effective resistance metric R (respectively $R^{\infty}$). \end{theorem} \subsubsection{Looptrees defined from two-type Galton Watson trees} In practice in the context of random planar maps, it is often convenient to define discrete looptrees from alternating two-type Galton-Watson trees. In particular, Richier in \cite[Section 3]{RichierIICUIHPT} gives the following definition, illustrated in Figure \ref{fig:RichLoop}. Given an infinite alternating two-type Galton-Watson tree $T$ (as defined in Section \ref{sctn:GW multi}), say with white vertices at even height and black vertices at odd height, draw a loop around each black vertex by connecting its $i^{\text{th}}$ white child to its $(i+1)^{\text{th}}$ white child for all $i$, and join its parent to both its first and last white child. Then delete the black vertices and their incident edges; we denote the resulting structure by $\textsf{Loop}^2(T)$. \begin{figure}[h] \includegraphics[width=13cm]{twotype-eps-converted-to} \centering \caption{A two-type tree and its looptree.}\label{fig:RichLoop} \end{figure} We now take a two-type tree $T_{\alpha}^{\infty, 2}$ with offspring distribution $(\xi_{\circ}, \xi_{\bullet})$ such that: \begin{itemize} \item $(\xi_{\circ}, \xi_{\bullet})$ is critical, i.e. $\E{\xi_{\circ}}\E{\xi_{\bullet}}=1$. \item $\xi_{\circ}$ is shifted geometric with parameter $1-p \in (0,1)$, i.e. $\xi_{\circ}(k) = (1-p)p^k$ for all $k \geq 0$. \item $\xi_{\bullet}$ is in the domain of attraction of an $\alpha$-stable law. \end{itemize} Before stating the scaling result, we briefly introduce two related concepts. One of these is the Janson-Stef\'ansson bijection of \cite{JanStefLargeFace}, which gives a bijection between alternating two-type Galton-Watson trees and one-type Galton-Watson trees. Given an alternating two-type Galton-Watson tree $T$, we denote its image under this bijection by $\Phi_{\text{JS}}(T)$. $\Phi_{\text{JS}}(T)$ has the same vertex set as $T$, but different edges, and is constructed as follows: for every white vertex that is not equal to the root, label its offspring as $u_1, \ldots, u_k$ in lexicographical order, and label its parent $u_0$. Then draw an edge joining $u_i$ to $u_{i+1}$ for each $i \in \{0, \ldots, k-1\}$, and draw an edge joining $u_k$ to $u$. See Figure \ref{fig:JS}. The bijection is such that each white vertex in $T$ is therefore mapped to a leaf in $\Phi_{\text{JS}}(T)$, and each black vertex in $T$ with $k$ offspring is mapped to a vertex in $\Phi_{\text{JS}}(T)$ with $k+1$ offspring. The second concept is a (final) related loop operation $\overline{\textsf{Loop}}$. Given a (one-type) tree $T$, $\overline{\textsf{Loop}}(T)$ is obtained by first forming $\textsf{Loop'}(T)$, and then for each vertex $u \in \textsf{Loop'}(T)$, contracting each edge joining $u$ to its rightmost child. $\overline{\textsf{Loop}}(T)$ therefore has the property that multiple loops can be grafted at the same vertex, which is not the case with $\textsf{Loop}(T)$ and $\textsf{Loop'}(T)$ (but is the case with the two-type operation $\textsf{Loop}^2$). \begin{figure}[h] \begin{subfigure}{.45\textwidth} \includegraphics[width=6cm]{janstefonly2-eps-converted-to} \centering \subcaption{$\Phi_{\text{JS}}(T)$.} \end{subfigure} \begin{subfigure}{.55\textwidth} \includegraphics[width=7cm]{barlooponly2-eps-converted-to} \centering \subcaption{$\textsf{Loop'}(\Phi_{\text{JS}}(T))$ and $\overline{\textsf{Loop}}(\Phi_{\text{JS}}(T))$.} \end{subfigure} \caption{Illustrations for the two-type tree $T$ in Figure \ref{fig:RichLoop}.}\label{fig:JS} \end{figure} The proof of the two-type scaling result then proceeds by applying the Janson-Stef\'ansson bijection to the two-type tree, and using the following facts, which we state without proof, but which should be plausible from looking at Figure \ref{fig:JS}. \begin{enumerate}[(i)] \item For any plane tree $T$ endowed with a measure giving mass $1$ to every vertex, $d_{GHP} (\textsf{Loop'}(T), \overline{\textsf{Loop}}(T)) \leq 4 \textsf{Height}(T)$ (see \cite[Equation (48)]{RichierMapBoundaryLimit} for Gromov-Hausdorff version, then the Prohorov bound on measures follows by same reasoning). \item If $T$ is an alternating two-type tree, then $\textsf{Loop}^2(T) = \overline{\textsf{Loop}}(\Phi_{\text{JS}}(T))$ ) (see \cite[Lemma 4.3]{CurKortUIPTPerc}). \item Let $T$ be an alternating two-type Galton-Watson tree with offspring distributions $\xi_{\circ}$ and $\xi_{\bullet}$ such that $\xi_{\circ}$ is shifted geometric with parameter $1-p \in (0,1)$, i.e. $\xi_{\circ}(k) = (1-p)p^k$ for all $k \geq 0$, and $\E{\xi_{\circ}}\E{\xi_{\bullet}} \leq 1$. Then $\Phi_{\text{JS}}(T)$ is a one-type Galton-Watson tree with offspring distribution $\xi$, where $\xi$ is such that $\xi(0) = 1-p$ and $\xi(k) = p \xi_{\bullet}(k-1)$ for all $k \geq 1$ (see \cite[Appendix A]{JanStefLargeFace}). Moreover, under the criticality assumption, this implies that \begin{equation}\label{eqn:dom of att 2 type} \frac{\sum_{i=1}^n \xi^{(i)} - n}{a_n} \overset{(d)}{\rightarrow} Z_{\alpha} \hspace{1cm} \text{if and only if} \hspace{1cm} \frac{\sum_{i=1}^n \xi^{(i)}_{\bullet} - \frac{1-p}{p}n}{p^{\frac{-1}{\alpha}}a_n} \overset{(d)}{\rightarrow} Z_{\alpha}. \end{equation} \end{enumerate} We are now ready to state and prove the convergence result. \begin{theorem}\label{thm:Rich looptree conv} Let $\textsf{Loop}^2(T_{\alpha}^{\infty, 2})$ be above, with $(a_n)_{n \geq 1}$ as in (\ref{eqn:dom of att 2 type}), and let $\nu^2$ be the measure on $\textsf{Loop}^2(T_{\alpha}^{\infty, 2})$ such that $\nu^2(x) = 1$ for all $x \in \textsf{Loop}^2(T_{\alpha}^{\infty, 2})$. Then \[ (\textsf{Loop}^2(T_{\alpha}^{\infty, 2}), a_n^{-1} \d, n^{-1} \nu^2, \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff vague topology as $n \rightarrow \infty$. Again, here $\d$ (respectively $\d^{\infty}$) can denote either the geodesic metric $d$ (respectively $d^{\infty}$), or the effective resistance metric R (respectively $R^{\infty}$). \end{theorem} \begin{proof}[Proof of Theorem \ref{thm:Rich looptree conv}] Using the points above, we will show that there exists a probability space on which we can define both $T_{\alpha}^{\infty, 2}$ and a one-type Galton Watson tree $\tilde{T}_{\alpha}$ satisfying the assumptions of Proposition \ref{prop:inf conv disc loop} such that, for all $r>0$, \begin{equation}\label{eqn:two type loop comp r} d_{GHP} (\mathcal{B}_r\big((\textsf{Loop}^2 (T_{\alpha}^{\infty, 2}), a_n^{-1} \d, n^{-1} \nu', \rho)\big), \mathcal{B}_r\big((\textsf{Loop'} (\tilde{T}_{\alpha}), a_n^{-1} \d, n^{-1} \nu', \rho)\big) \rightarrow 0 \end{equation} almost surely as $n \rightarrow \infty$. As a result, we deduce that these two looptrees have the same Gromov-Hausdorff-Prohorov vague limit. To do this, we first make a definition. As in the one-type case, it follows that $T_{\alpha}^{\infty, 2}$ almost surely has a unique infinite spine on which vertices instead have a size-biased offspring distribution (see \cite[Section 3.1]{StephLocalLim}). Analogously to previous definitions, for any $R>0$ we say that a loop on the corresponding loopspine is $R$-good if it has length at least $4R$ and if the two points at which it is connected to adjacent loops on the loopspine are separated by distance at least $R$. We then let $L_{\alpha}^{2}(R)$ denote the subspace obtained by taking the union of all the loops up to and including the first $R$-good loop on the loopspine, along with any sublooptrees grafted to them. The reason for this definition is that $\mathcal{B}_R(\textsf{Loop}^2 (T_{\alpha}^{\infty, 2})) \subset L_{\alpha}^{2}(R)$, and $L_{\alpha}^{2}(R)$ is a full looptree (i.e. does not contain partial loops). We also let $T_{\alpha}^{2}(R)$ denote the (two-type) tree such that $\textsf{Loop}^2(T_{\alpha}^{2}(R)) = L_{\alpha}^{2}(R)$ (this is well-defined since $\textsf{Loop}^2$ is a bijection). Set $\tilde{T}_{\alpha}^{r,n} = \Phi_{\text{JS}} (T_{\alpha}^{2}(ra_n))$. We make the following observations, based on the facts above. \begin{enumerate} \item By Fact (ii) above, $\overline{\textsf{Loop}} \Big( \tilde{T}_{\alpha}^{r,n}\Big) = L_{\alpha}^2(ra_n)$. \item By Fact (i) above, $d_{GHP} \Big(\overline{\textsf{Loop}} \Big(\tilde{T}_{\alpha}^{r,n}\Big), \textsf{Loop'} \Big( \tilde{T}_{\alpha}^{r,n}\Big) \Big) \leq 4 \textsf{Height} \Big(\tilde{T}_{\alpha}^{r,n}\Big)$. Moreover, $n^{\frac{-1}{\alpha}} \textsf{Height} \Big(\tilde{T}_{\alpha}^{r,n}\Big) \rightarrow 0$ in probability as $n \rightarrow \infty$ since: \begin{align*} \prb{\textsf{Height} \Big(\tilde{T}_{\alpha}^{r,n}\Big) \geq \epsilon n^{\frac{1}{\alpha}}+1} &\leq \prb{\textsf{Height} \Big(T_{\alpha}^{2}(rn^{\frac{1}{\alpha}})\Big) \geq \epsilon n^{\frac{1}{\alpha}}+1} \\ &= (1-p_{r,n})^{\epsilon n^{\frac{1}{\alpha}}} \\ &\leq \exp \{-Cr^{-\alpha}n^{-\frac{\alpha - 1}{\alpha}} \epsilon n^{\frac{1}{\alpha}}\}, \end{align*} where $p_{r,n} = \frac{1}{2} \pr{\hat{\xi}_{\bullet} \geq rn^{\frac{1}{\alpha}}} \sim Cr^{\alpha}n^{\frac{\alpha-1}{\alpha}}$ as $n \rightarrow \infty$ by assumption, since $\hat{\xi}_{\bullet}$ is a size-biased version of $\xi_{\bullet}$. \item By construction and Fact (iii) above, $\mathcal{B}_r \big(\textsf{Loop'} \big( \tilde{T}_{\alpha}^{r,n}\big)\big) = \mathcal{B}_r \big( \textsf{Loop'} \big( \tilde{T}_{\alpha}\big)\big)$, where $\tilde{T}_{\alpha} = \lim_{n \rightarrow \infty}\tilde{T}_{\alpha}^{r,n}$ (the Janson-Stef\'ansson bijection is such that this is well-defined). Moreover, $\tilde{T}_{\alpha}$ is distributed as Kesten's critical tree with offspring distribution $\xi$. \end{enumerate} These three points imply that (\ref{eqn:two type loop comp r}) holds with $\tilde{T}_{\alpha}$ as in Point 3 above. Then, $\tilde{T}_{\alpha}$ satisfies the conditions of Proposition \ref{prop:inf conv disc loop} (in particular, condition (ii) of the Proposition holds by similar arguments to those in Point 2 above), so $(\textsf{Loop'} (\tilde{T}_{\alpha}), a_n^{-1} \d, n^{-1} \nu', \rho) \overset{(d)}{\rightarrow} \L^{\infty}_{\alpha}$ as $n \rightarrow \infty$. Since these $T_{\alpha}^{\infty, 2}$ and $\tilde{T}_{\alpha}$ are defined on a common probability space, (\ref{eqn:two type loop comp r}) therefore implies the same distributional result for $(\textsf{Loop}^2 (T_{\alpha}^{\infty, 2}), a_n^{-1} \d, n^{-1} \nu', \rho)$. \end{proof} \begin{remark} In \cite{RichierIICUIHPT}, these two-type looptrees are coded by upward skip-free random walks in a similar way to the one-type case. It is also possible to write an analogous result to Proposition \ref{prop:inf conv disc loop} in this case, under more general assumptions on the coding functions. \end{remark} \section{Volume bounds and resistance estimates for infinite stable looptrees}\label{sctn:vol bounds and spectral dim infinite} In this section, we prove precise estimates on the volume and resistance growth properties of infinite stable looptrees. These are of interest in their own right but in Section \ref{sctn:RW consequences} we also use these to obtain bounds on the heat kernel, and use the resistance estimate to verify that the non-explosion conditions of Theorems \ref{thm:scaling lim RW resistance} and \ref{thm:scaling lim RW resistance annealed} are satisfied when we prove Theorems \ref{thm:main RW LLT conv} and \ref{thm:RW conv infinite intro}, along with their annealed counterparts. In \cite[Section 5]{ArchBMCompactLooptrees}, we conduct a much more detailed study of the volume growth properties of compact stable looptrees, including proving similar results to those in Theorem \ref{thm:vol bounds} below. For this reason we will therefore skip some technical proof details when they are the same as in \cite{ArchBMCompactLooptrees}. The full results are as follows. The result holds regardless of whether we define the balls in terms of $R^{\infty}$ or $d^{\infty}$, since the two metrics are equivalent. In particular, it is sufficient to prove the result for $d^{\infty}$ only, which is easier to handle. We do this below. \begin{theorem}(cf \cite[Theorem 1.4]{ArchBMCompactLooptrees}).\label{thm:vol bounds} $\mathbf{P}$-almost surely, we have: \begin{align*} &\limsup_{r \uparrow \infty} \Bigg( \frac{\nu^{\infty}(B^{\infty}(\rho^{\infty}, r))}{r^{\alpha} (\log \log r)^{\frac{4\alpha - 3}{{\alpha - 1}}}} \Bigg) < \infty, &&\limsup_{r \uparrow \infty} \Bigg( \frac{\nu^{\infty} (B^{\infty}(\rho^{\infty}, r))}{r^{\alpha} \log \log r} \Bigg) > 0, \\ &\liminf_{r \uparrow \infty} \Bigg( \frac{\nu^{\infty}(B^{\infty}(\rho^{\infty}, r))}{r^{\alpha}(\log \log r)^{-\alpha}} \Bigg) > 0, &&\liminf_{r \uparrow \infty} \Bigg( \frac{\nu^{\infty} (B^{\infty}(\rho^{\infty}, r))}{r^{\alpha} (\log \log r)^{-(\alpha - 1)}} \Bigg) < \infty. \end{align*} Moreover, $\mathbf{P}$-almost surely, for $\nu^{\infty}$-almost every $u \in \L^{\infty}_{\alpha}$ we have \begin{align*} &\limsup_{r \downarrow 0} \Bigg( \frac{\nu^{\infty}(B^{\infty}(u, r))}{r^{\alpha} (\log \log r^{-1})^{\frac{4\alpha - 3}{{\alpha - 1}}}} \Bigg) < \infty, &&\limsup_{r \downarrow 0} \Bigg( \frac{\nu^{\infty} (B^{\infty}(u, r))}{r^{\alpha} \log \log r^{-1}} \Bigg) > 0, \\ &\liminf_{r \downarrow 0} \Bigg( \frac{\nu^{\infty}(B^{\infty}(u, r))}{r^{\alpha}(\log \log r^{-1})^{-\alpha}} \Bigg) > 0, &&\liminf_{r \downarrow 0} \Bigg( \frac{\nu^{\infty} (B^{\infty}(u, r))}{r^{\alpha} (\log \log r^{-1})^{-(\alpha - 1)}} \Bigg) < \infty. \end{align*} \end{theorem} \begin{theorem}\label{thm:res bounds} $\mathbf{P}$-almost surely, there exists a constant $c>0$ such that for all $r>0$, \[ cr (\log \log (r \vee r^{-1}))^{\frac{-(3\alpha - 2)}{\alpha - 1}} \leq R^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, r)^c) \leq r. \] \end{theorem} These results are obtained as a consequence of the following propositions. \begin{proposition}\label{prop:vol results infinite} There exist constants $c, c', C, C' \in (0, \infty)$ such that for all $r>0$, $\lambda >1$: \begin{align*} C\exp \{-c\lambda^{\frac{1}{\alpha - 1}}\} \leq \prb{ \nu^{\infty} (B^{\infty}(\rho^{\infty}, r)) < r^{\alpha} \lambda^{-1}} &\leq C'\exp \{-c'\lambda^{\frac{1}{\alpha}}\} \\ C e^{-c \lambda} \leq \prb{ \nu^{\infty} (B^{\infty}(\rho^{\infty}, r)) \geq r^{\alpha} \lambda} &\leq C' \lambda^{\frac{\alpha - 1}{4\alpha - 3}} e^{-c'\lambda^{\frac{\alpha - 1}{4\alpha - 3}}}. \end{align*} \end{proposition} \begin{proposition}\label{prop:resistance results infinite} There exist constants $C, c \in (0, \infty)$ such that for all $r>0, \lambda > 1$: \[ \prb{R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, r)^c) \leq r\lambda^{-1}} \leq Ce^{-c\lambda^{\frac{1}{4}}}. \] \end{proposition} By applying Borel-Cantelli arguments along the sequence $r_n = 2^n$ (respectively $r_n=2^{-n}$) in Propositions \ref{prop:vol results infinite} and \ref{prop:resistance results infinite}, we obtain the results of Theorems \ref{thm:vol bounds} and \ref{thm:res bounds} for the regime $r \uparrow \infty$ (respectively $r \downarrow 0$). For any $R \in (0, \infty)$, the local results can then be extended to $\nu^{\infty}$-almost every $u \in \L_{\alpha}^{\infty,R}$ by uniform re-rooting invariance (recall that $(\L_{\alpha}^{\infty, R})_{R \geq 0}$ is a sequence of nested compact looptrees that exhaust $\L^{\infty}_{\alpha}$). Taking $R \rightarrow \infty$ then gives the result. Before outlining the proofs of Propositions \ref{prop:vol results infinite} and \ref{prop:resistance results infinite}, we briefly explain how the fractal structure of $\L^{\infty}_{\alpha}$ can be encoded using the Ulam-Harris tree. This will be useful in the proofs of both propositions. This representation is very similar to the one described for compact looptrees in \cite[Section 5.2.1]{ArchBMCompactLooptrees}, except that at the first level we will decompose along the infinite loopspine rather than the W-loopspine. \subsection{Encoding the looptree structure in a branching process} The Williams' decomposition of Section \ref{sctn:Williams Decomp} suggests a natural way to encode the fractal structure of $\L^{\infty}_{\alpha}$ in a branching process, which we will label using the Ulam-Harris numbering convention of Section \ref{sctn:trees background discrete}. Although the Williams' decomposition is defined along the maximal spine from the root of a compact tree, it follows from uniform rerooting invariance of stable trees that we can apply the same procedure from a uniform point instead, without changing the distribution of the decomposition. Specifically, we let $\emptyset$ denote the root vertex of our branching process. This will represent the whole looptree $\L^{\infty}_{\alpha}$ (in particular, $\emptyset$ should not be confused with $\rho^{\infty}$, which is the root of $\L^{\infty}_{\alpha}$). We decompose $\L^{\infty}_{\alpha}$ by removing the infinite loopspine, and denote the resulting fragments by $(\L_{\alpha}^{(i,o)})_{i=1}^{\infty}$. Moreover, we let ${\L_{\alpha}^{(i)}}$ denote the closure of $\L_{\alpha}^{(i,o)}$ in $\L^{\infty}_{\alpha}$, and remark that it follows from standard properties of the It\^o excursion measure that $\mathbf{P}$-almost surely, $\L_{\alpha}^{(i)} = \L_{\alpha}^{(i,o)} \cup \{\rho_i\}$ for each $i$. We call $\rho_i$ the root of $\L_{\alpha}(i)$ as it is the point at which $\L_{\alpha}^{(i)}$ is grafted to the infinite loopspine. It again follows from standard properties of the It\^o excursion measure that each fragment $\L_{\alpha}^{(i)}$ is an independent (unconditioned) copy of a compact stable looptree, coded by an instance of the It\^o measure. We will view the set $(\L_{\alpha}^{(i)})_{i=1}^{\infty}$ as the children of $\emptyset$ in our branching process, and we will index them by $\mathbb{N}$. Moreover, to each edge joining $\emptyset$ to one of its offspring $i$, we associate a random variable $m_i = m (\emptyset,i)$ which gives the mass of the sublooptree corresponding to index $i$. We then repeat this decomposition along each of the sublooptrees $\L_{\alpha}^{(i)}$, with the minor modification that we decompose along the W-loopspine rather than the infinite loopspine. More precisely, if $i$ is a child of $\emptyset$, we can decompose along its W-loopspine from its root to its point of maximal tree height to obtain a countable collection of fragments. By taking the appropriate closures, these fragments are sublooptrees and will form the offspring of $i$ in our branching process. We label the offspring as $(ij)_{j \geq 1}$. By repeating this procedure again and again on the resulting subsublooptrees, we can keep iterating to obtain an infinite branching process. \begin{remark} The spinal decomposition of \cite{HPWSpinPart} obtained by taking the loopspine to be from $p(U)$ (or the root) to an independent uniform point $p(V)$ is perhaps the most natural candidate to use as the basis of this iterative procedure, but when using this to bound the mass of small balls in $\L_{\alpha}$ this leads to technical difficulties in the case when $V$ is chosen so that $p(V)$ is a point too close to $p(U)$. This difficulty is avoided by instead picking the maximal spine in the underlying tree. \end{remark} We index this process using the Ulam-Harris tree \[ \mathcal{U} = \bigcup_{n=0}^{\infty}\mathbb{N}^{n} \] defined in Section \ref{sctn:trees background discrete}. Using the notation of \cite{Neveu}, an element of our branching process will be denoted by $u = u_1 u_2 u_3 \ldots u_j$, and corresponds to a sublooptree which we denote by $\L_{\alpha}^{(u)} \subset \L^{\infty}_{\alpha}$. Its offspring will all be of the form $(u i)_{i \in \mathbb{N}}$, where $ui$ here abbreviates the concatenation $u_1 u_2 u_3 \ldots u_j i$, and each will correspond to one of the further sublooptrees obtained on performing a Williams' decomposition of $\L_{\alpha}^{(u)}$. For each element $u \in \mathcal{U}$, we set \[ M_u := \nu^{\infty} (\L_{\alpha}^{(u)}), \] by viewing $\L_{\alpha}^{(u)}$ as a subset of $\L^{\infty}_{\alpha}$. In the proofs of Propositions \ref{prop:vol results infinite} and \ref{prop:resistance results infinite}, we will select subtrees $T_{\text{vol}}, T_{\text{res}} \subset \mathcal{U}$ which index sublooptrees of large mass or large diameter. We make this more precise in the box below, where we describe the procedure used to obtain $T_{\text{vol}}$. \subsection{Volume bounds} To maintain consistency with the notation of \cite{ArchBMCompactLooptrees}, we take: \begin{align*} \beta_1 = \frac{\alpha - 1}{4\alpha - 3}, \hspace{5mm} \beta_2 = \frac{\alpha - 1}{4\alpha - 3}, \hspace{5mm} \beta_3 = \frac{2\alpha - 1}{2\alpha (4\alpha - 3)}, \hspace{5mm} \beta_4 = \frac{1}{4\alpha - 3}. \end{align*} The main point to remember is that $\beta_i \in (0,1)$ for all $i$. These precise values have been chosen to optimise the final exponent on $\lambda$, but are otherwise not important. \begin{tcolorbox}[colback=white] \textbf{Iterative Algorithm}\\ Start by taking $\emptyset$ to be the root of $T_{\text{vol}}$. Recall this represents the whole looptree $\L^{\infty}_{\alpha}$. \begin{enumerate} \item Perform a decomposition of $\L^{\infty}_{\alpha}$ along its infinite loopspine. \item Consider the resulting fragments. To choose the offspring of $\emptyset$, select the fragments that have mass at least $r^{\alpha} \lambda^{1-\beta_1-\beta_2}$, and such that the roots of the corresponding sublooptrees are within distance $r$ of the root of $\emptyset$. \item Repeat this process to construct $T_{\text{vol}}$ in the usual Galton-Watson way. Given an element $u = u_1 u_2 \ldots u_j \in T_{\text{vol}}$, there is a corresponding sublooptree $\L_{\alpha}^{(u)}$ in $\L^{\infty}_{\alpha}$ with root $\rho_u$ and $M_u \geq r^{\alpha} \lambda^{1-\beta_1-\beta_2}$. Consider the fragments obtained in a Williams' decomposition of $\L_{\alpha}^{(u)}$, and select those that correspond to further sublooptrees that are within distance $r$ of $\rho_u$, and also such that $M_{u_1 u_2 \ldots u_j u_{j+1}} \geq r^{\alpha} \lambda^{1-\beta_1-\beta_2}$, to be the offspring of $u$. \item For each $u = u_1 u_2 \ldots u_j \in T_{\text{vol}}$, set \[ S_u = \sum_{i=1}^{\infty} M_{ui} \mathbb{1} \Big\{ \rho_{ui} \in B (\rho_u, r) \Big\} \mathbb{1} \Big\{ M_{ui} < r^{\alpha} \lambda^{1-\beta_1-\beta_2} \Big\}. \] \end{enumerate} \end{tcolorbox} By the discussion above, this algorithm is $\mathbf{P}$-almost surely well defined, and is very similar to the decomposition of compact stable looptrees used in \cite[Section 5.2.2]{ArchBMCompactLooptrees}. As explained there, in the event that $T_{\text{vol}}$ is finite we then have that: \begin{equation}\label{eqn:vol bound iter} \nu^{\infty}(B^{\infty}(\rho^{\infty}, r)) \leq \sum_{u \in T_{\text{vol}}} S_u. \end{equation} Using this, we can now prove Theorem \ref{thm:vol bounds}. We skip some technical details since they are quite lengthy and can be carried out exactly as in the compact case, which is explained fully in \cite[Section 5]{ArchBMCompactLooptrees}, but comment on any necessary modifications for the infinite case. \begin{proof}[Proof of Theorem \ref{thm:vol bounds}, outline only] We start by proving the volume lower bounds, since the proof strategy is simpler than for the upper bounds. We use the L\'{e}vy coding mechanism of Section \ref{sctn:looptree def} and known fluctuation results for stable L\'{e}vy processes. It is not to hard to see (perhaps with the help of a picture, though this is proved formally in \cite[Lemma 2.1(ii)]{RSLTCurKort} in the compact case), that for any $[s,t]$ in $[0,1]$, \begin{equation}\label{eqn:osc dist relation} d^{\infty}(s,t) \leq X^{\infty}_s + X^{\infty}_t -2\inf_{r \in [s,t]} X^{\infty}_r. \end{equation} Recall also from Section \ref{sctn:Useful results} that \[ \textsf{Osc}_{[a,b]} X^{\infty} := \sup_{s, t \in [a,b]} |X^{\infty}_t - X^{\infty}_s|. \] We deduce from (\ref{eqn:osc dist relation}) that if $\textsf{Osc}_{[0, r^{\alpha}\kappa]} X^{\infty} \leq \frac{1}{2}r$, then $B^{\infty}(\rho^{\infty}, r) \geq r^{\alpha}\kappa$. By applying the Vervaat transform and absolute continuity relation of (\ref{eqn:RN deriv levy bridge}), and taking either $\kappa = \lambda$, or $\kappa = \lambda^{-1}$, we are then able to use standard results for fluctuations of unconditioned L\'{e}vy processes to control the behaviour of \textsf{Osc}, and obtain the volume lower bounds. This is done rigorously in \cite[Sections 5.1 and 5.3]{ArchBMCompactLooptrees}. The only difference in the arguments used there is that in the compact place, we have to replace $X^{\infty}$ with $X^{\text{exc}}$ in (\ref{eqn:osc dist relation}). However, all the proofs of \cite{ArchBMCompactLooptrees} proceed by using the Vervaat transform and absolute continuity relation to compare $X^{\text{exc}}$ with an unconditioned L\'{e}vy process $X$. In the infinite case the proof is therefore simpler since we are already working with the unconditioned process. The L\'{e}vy process picture is not so useful for proving precise volume upper bounds since the relation (\ref{eqn:osc dist relation}) is not an equality. In fact, the upper bound it gives on the distance is quite rough since any single jump in $X^{\text{exc}}$ contributes quite heavily to \textsf{Osc}, but does not immediately contribute to distances in looptrees. In particular, an entire jump corresponds to traversing an entire loop and therefore (initially) contributes zero overall distance in the looptree. Set $p(\lambda) = \lambda^{\frac{\alpha - 1}{4\alpha - 3}} e^{-c'\lambda^{\frac{\alpha - 1}{4\alpha - 3}}}$. To obtain the volume upper bounds, or, more precisely, to show that $\prb{ \nu^{\infty} (B^{\infty}(\rho^{\infty}, r)) \geq r^{\alpha} \lambda} \leq p(\lambda)$, we therefore use the approach indicated by (\ref{eqn:vol bound iter}) above. The proof consists of two main steps: \begin{enumerate}[(i)] \item Bounding the progeny of $T_{\text{vol}}$; \item Bounding each of the terms $(S_u)_{u \in T_{\text{vol}}}$. \end{enumerate} Again, these can be broken down into smaller steps. For $(i)$, we first show that the length of loopspine (or W-loopspine) contained in $B^{\infty}(\rho_u, r)$ is upper bounded by $r\lambda^{\beta_3}$ with probability at least $1-C'p(\lambda)$ (cf \cite[Lemma 5.5]{ArchBMCompactLooptrees}). Conditional on this, using the Poisson property of successive It\^o excursions, the number of offspring of $\L_{\alpha}^{(u)}$ can essentially be stochastically dominated by a \textsf{Poisson}$(K_{\alpha}\lambda^{2\beta_3 - \frac{1}{\alpha}({1-\beta_1-\beta_2})})$ random variable, where $K_{\alpha}$ is just a constant (cf \cite[Lemma 5.6]{ArchBMCompactLooptrees}). This is a subcritical offspring distribution, and by applying the main theorem of \cite{DwassProg} we deduce that, with probability at least $1-C'p(\lambda)$, $|T_{\text{vol}}| \leq \lambda^{\beta_1}$. We now discuss a bound for a single term of the form $S_u$, as in point $(ii)$. We use the fact that the sum of the lifetimes of successive It\^o excursions (recall that these represent the volumes of successive sublooptrees arranged around the loopspine) can be represented as an $\alpha^{-1}$-stable subordinator with jump sizes corresponding to the original excursion lengths (e.g. see \cite[proof of Proposition 5.6]{GoldHaasExtinctionStable}), which we denote by $\textsf{Sub}$. In particular, since (as above) the relevant length of loopspine (or W-loopspine) contained in $B^{\infty}(\rho_u, r)$ is upper bounded by $r\lambda^{\beta_3}$, we can upper bound $S_u$ by $\textsf{Sub}_{r\lambda^{\beta_3}}$. Moreover, all jumps greater than $r\lambda^{1-\beta_1-\beta_2}$ have been removed from $S$ as a result of the construction of $T_{\text{vol}}$, which allows us to apply Lemma \ref{lem:osc} to deduce that, with probability at least $1-C'p(\lambda)$, for all $u \in T_{\text{vol}}$: \[ S_u \leq \textsf{Sub}_{r\lambda^{\beta_3}} \leq r^{\alpha}\lambda^{1-\beta_1}. \] By taking a union bound and summing up, we therefore deduce that, with probability at least $1-C'p(\lambda)$, \begin{equation*} \nu^{\infty}(B^{\infty}(\rho^{\infty}, r)) \leq \sum_{u \in T_{\text{vol}}} S_u \leq |T_{\text{vol}}| \sup_{u \in T_{\text{vol}}} S_u \leq \lambda^{\beta_1}r^{\alpha}\lambda^{1-\beta_1} = r^{\alpha}\lambda. \end{equation*} The method to obtain the infimal volume upper bound is simpler and does not require reiterating around subsequent levels. We will say that a radius $r \in (0, \infty)$ is ``short" if the length of loopspine contained within $B^{\infty}(\rho^{\infty}, r)$ is at most $3r$. By scaling invariance of $\L^{\infty}_{\alpha}$, the probability that $r$ is short is a (non-zero) constant that is independent of $r$ (or more usefully for an application of a generalised version of the second Borel-Cantelli Lemma, $\prcondb{r \text{ short}}{2r \text{ not short}}{}$ and $\prcondb{r \text{ short}}{\frac{1}{2}r \text{ not short}}{}$ are independent of $r$). On the event that $r$ is short, and using the same logic as above, we can bound the sum of the volumes of all the incident sublooptrees by $\textsf{Sub}_{3r}$, which is independent of the loopspine structure. Therefore, by repeating this argument along a subsequence $r_n \downarrow 0$ or $r_n \uparrow \infty$ of short radii, the infimal volumes will be upper bounded by the infimal behaviour of \textsf{Sub}, i.e. with fluctuations at least of order $(\log \log r^{-1})^{-(\alpha - 1)}$ as $r \downarrow 0$, and $(\log \log r)^{-(\alpha - 1)}$ as $r \uparrow \infty$. \end{proof} \subsection{Applications to volume limits in compact stable looptrees}\label{sctn:infinite looptrees unit balls} As a result of Theorem \ref{thm:LLT}, we are able to prove various volume convergence results that are exploited in \cite{ArchBMCompactLooptrees} to study Brownian motion on compact stable looptrees. The main applicable result is the following theorem. Here we let $\nu$ denote the intrinsic measure on a compact stable looptree $\L_{\alpha}$ as defined in Section \ref{sctn:looptree def}, conditioned so that $\nu(\L_{\alpha})=1$. We also let $B(\rho, r)$ denote the open ball of radius $r$ around the root in $\L_{\alpha}$, and $\bar{B}(\rho, r)$ its closure. \begin{theorem}\label{thm:main vol conv} There exists a random variable $(V_t)_{t \geq 0}: \Omega \rightarrow D([0, \infty), [0, \infty))$ such that the finite dimensional distributions of the process \begin{align*} \big( r^{-\alpha} \nu(\bar{B}(\rho, rt)) \big)_{t \geq 0} \end{align*} converge to those of $\big( V_t \big)_{t \geq 0}$ as $r \downarrow 0$, and $V_t$ denotes the volume of a closed ball of radius $t$ around the root in $\L^{\infty}_{\alpha}$. Moreover, for any $p \in [1,\infty)$, setting $V:=V_1$ we have that $\Eb{V^p} < \infty$, and that \[ r^{-\alpha p} \Eb{\nu(\bar{B}(\rho, r))^p} {\rightarrow} \Eb{V^p} \] as $r \downarrow 0$. \begin{remark} We have taken closed balls rather than open ones simply so that $V$ is c\`adl\`ag. We conjecture that the volume processes are in fact continuous, and that the convergence of the theorem can be extended to hold uniformly on compacts. However, due to the complex nature of looptrees, this is not straightforward to prove. In particular it is difficult to replicate the argument used to prove a similar result for stable trees, since looptrees do not have such a straightforward regeneration structure around the boundary of a ball of radius $r$. \end{remark} \begin{proof} By the separability of Proposition \ref{thm:GH vague separable HB}, we can work on a probability space on which $\L^{\l}_{\alpha} \rightarrow \L^{\infty}_{\alpha}$ almost surely as $\l \rightarrow \infty$. By standard results on metric space convergence, it follows that almost surely on this space, $\nu^{\l}(B^{\l}(\rho^{\l}, t)) \rightarrow \nu^{\infty}(B^{\infty}(\rho^{\infty}, t))$ for all $t$ such that $\nu^{\infty}(\partial B^{\infty}(\rho^{\infty}, t)) = 0$ (e.g. see \cite[Lemma 2.11]{GwynneMillerUIHPQscaling}), and therefore for Lebesgue almost every $t$. Moreover, by scaling invariance of $\L^{\infty}_{\alpha}$, there are no ``special" values of $t$, so we deduce that for any fixed sequence $0<t_0<t_1 < \ldots < t_n < \infty$, the convergence almost surely holds simultaneously for all of the points $t_i, 0 \leq i \leq n$. Since $(\nu^{\l}(B^{\l}(\rho, t)))_{t \geq 0} \overset{(d)}{=} ({\l} \nu B(\rho, {\l}^{\frac{-1}{\alpha}} t))_{t \geq 0}$, by writing $\l = r^{-\alpha}$ we therefore deduce the result as stated. In particular, it follows that $\nu^{\l} ({B^{\l}(\rho^{\l}, 1)}) \overset{(d)}{\rightarrow} V$ as $\l \rightarrow \infty$. We claim that $V \in (0, \infty)$ almost surely, with all moments finite. This follows immediately from the exponential upper tails of Proposition \ref{prop:vol results infinite}, namely that \begin{align}\label{eqn:V exp tails} \prb{ V \geq \lambda} \leq C \lambda^{\frac{\alpha - 1}{4\alpha - 3}} e^{-c\lambda^{\frac{\alpha - 1}{4\alpha - 3}}}. \end{align} We now prove that the moments of $r^{-\alpha} \nu_1(B(\rho_1, r))$ converge to those of $V$. To see this, we observe that the arguments used to prove (\ref{eqn:V exp tails}) and the compact analogue in \cite[Proposition 5.4]{ArchBMCompactLooptrees} can be applied uniformly along the sequence $\L^{\l}_{\alpha}$ to give constants $c, C \in (0, \infty)$ such that \begin{align*} \prbl{ \nu^{\l} (B^{\l}(\rho, r)) \geq r^{\alpha} \lambda} \leq C \lambda^{\frac{\alpha - 1}{4\alpha - 3}} e^{-c\lambda^{\frac{\alpha - 1}{4\alpha - 3}}} \end{align*} for all $\l \geq 1$. It follows that the sequence $(r^{-\alpha p} (\nu^{\l} (B^{\l}(\rho, r)))^p )_{\l \geq 1}$ is uniformly integrable for all $p \geq 1$ and so setting $C_p = \Eb{V^p}$ we deduce that \begin{align*} r^{-\alpha p} \Eb{(\nu_1(B(\rho_1, r)))^p} \rightarrow C_p \end{align*} for all $p \geq 1$. \end{proof} \end{theorem} \subsection{Resistance bounds} We now turn to proving the resistance bounds. We use a version of the iterative procedure described above, which we again index by a subcritical branching process, to count the number of sublooptrees intersecting the boundary of a ball of radius $r$. More formally, we will define another subtree $T_{\text{res}} \subset \mathcal{U}$, but this time selecting sublooptrees of large diameter, rather than of large volume, to form the offspring at each step. Since this argument is not given in \cite{ArchBMCompactLooptrees}, we write it more carefully. We first recall from Section \ref{sctn:looptree def} that the $L$-Height of a compact looptree $\tilde{\L_{\alpha}}$ is given by $\sup_{u \in \tilde{\L_{\alpha}}} d_{\tilde{\L_{\alpha}}}(\rho, u)$, and the $L^m$-Height is given by $\max \tilde{X}^{\text{exc}}$. The $L^m$-Height is $\mathbf{P}$-almost surely realised by a unique point in $\tilde{\L_{\alpha}}$, which we denote $u_m$. We refer to (the closure of) the set of loops coded by the ancestors of $u_m$ as the $m$-loopspine. As described in Section \ref{sctn:Williams Decomp}, the Poisson measure describing the loop lengths along the loopspine will have the form \begin{equation}\label{eqn:m loopspine loop measure} C_{\alpha} \mathbb{1}_{\{ [0,1] \}}(u) \mathbb{1}_{\{[0,H^m]\}}(t) l^{-\alpha} \textsf{pen}(l,H^m,t) du \ dt \ dl, \end{equation} where $C_{\alpha} = \frac{\alpha (\alpha - 1)}{\Gamma (2-\alpha)}$, as before, $H^m = T^m\text{-Height}(\tilde{\L_{\alpha}})$, and \textsf{pen} is a penalty term that is bounded above and below by a constant on the first half of the m-spine. Moreover, the sublooptrees grafted to the m-loopspine will be coded by a thinned version of the It\^o excursion measure. We now define some terminology, in keeping with that used in \cite[Section 5.2]{ArchBMCompactLooptrees} wherever possible. Firstly, given $R>0$, we say that a loop on the m-loopspine is ``good" if it has length at least $4R$, and if the associated uniform random variable (that dictates the ratio of the two segments it splits into on either side of the loopspine) is in the interval $[\frac{1}{4}, \frac{3}{4}]$. We say the a loop is ``goodish" if it just has length at least $4R$. Additionally, for any $R>0$, and any (unconditioned) compact looptree $\tilde{\L_{\alpha}}$ (respectively any infinite looptree $\L^{\infty}_{\alpha}$), we let $I^m_R$ be the closure in $\tilde{\L_{\alpha}}$ (respectively $\L^{\infty}_{\alpha}$) of the union of all the loops in the m-loopspine (respectively infinite loopspine) that intersect $\tilde{B}(\tilde{\rho}, R)$ (respectively $B^{\infty}(\rho^{\infty}, R)$). Additionally, we let $|I^m_R|$ be the sum of the lengths of these loops We start by giving a technical lemma, the proof of which may be skipped on a first reading. \begin{lemma}(cf \cite[Lemma 5.5]{ArchBMCompactLooptrees}).\label{lem:segment length bound infinite} For any $h>0, \lambda > 1, R< \lambda^{-1-\frac{h}{\alpha - 1}}$, \begin{equation*} \prcondb{|I^m_{R}| \geq 3R \lambda}{L^m\textup{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} \leq Ce^{-c\lambda^{h \wedge 1}}. \end{equation*} \end{lemma} \begin{proof} We use a similar strategy to \cite[Lemma 5.5]{ArchBMCompactLooptrees}. Indeed, we first condition on existence of a good loop in the m-loopspine. We then select the closest good loop to $\rho$. Given such a loop, the number of goodish loops between $\rho$ and the first good loop is stochastically dominated by $N-1$, where $N$ is a Geometric($\frac{1}{2}$) random variable. $|I^m_R|$ can then be upper bounded by the random variable \begin{equation}\label{eqn:loopspine length decomp} 2RN + \sum_{i=1}^{N} Q^{(i)}, \end{equation} where $Q^{(i)}$ denotes the sum of the lengths of all the smaller loops on the m-loopspine that are between the $(i-1)^{\text{th}}$ and $i^{\text{th}}$ goodish loops, and the term $2RN$ comes from selecting a segment of length at most $R$ in each direction round each of the goodish loops. Each $Q^{(i)}$ can be independently approximated by an $(\alpha - 1)$-stable subordinator run up until an exponential time and conditioned not to have any jumps greater than $4R$. Since we model the loop lengths by a subordinator indexed by the m-spine of the underlying tree, we upper bound the probability in question by: \begin{align}\label{eqn:length height decomp} \begin{split} &\prcondb{|I^m_{R}| \geq 3R \lambda, T^m\text{-Height}(\tilde{\L_{\alpha}}) \geq R^{\alpha -1}\lambda^{h}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} \\ &+ \prcondb{|I^m_{R}| \geq 3R \lambda, T^m\text{-Height}(\tilde{\L_{\alpha}}) \leq R^{\alpha -1}\lambda^{h}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{}. \end{split} \end{align} The first of these terms can be upper bounded by $Ce^{-c\lambda}$ using exactly the same arguments as in \cite[Lemma 5.5]{ArchBMCompactLooptrees}, the point being that if the m-spine in the underlying tree is long enough, then there is plenty of time for a good loop to occur in the corresponding subordinator (though note that to do this formally, we have to deal with the penalty term of (\ref{eqn:m loopspine loop measure}), but this is minor and can be treated as in \cite[Lemma 5.5]{ArchBMCompactLooptrees}). To summarise more concretely: \begin{itemize} \item The number of good loops on the m-loopspine is stochastically dominated by a \textsf{Poisson}(c$\lambda^h$) random variable, so $\prb{\nexists \text{ a good loop }} \leq e^{-c \lambda^h}$. \item $N$ is \textsf{Geometric}($\frac{1}{2}$), so $\prb{N \geq \lambda} \leq Ce^{-c\lambda}$. \item $\prb{\sum_{i=1}^{N} Q^{(i)} \geq R \lambda} \leq C e^{-c \lambda}$. Indeed, by (\ref{eqn:m loopspine loop measure}), we can (independently for each $i$) stochastically dominate each term $Q^{(i)}$ by an $(\alpha - 1)$-stable subordinator $\textsf{Sub}^{(i)}$ with all jumps greater than $4R$ removed, run up until a time $\mathcal{E}_R \sim \textsf{exp}(cR^{\frac{-1}{\alpha - 1}}$). We also let $\textsf{Sub}^{(i)'}$ denote a rescaled version of $\textsf{Sub}^{(i)}$, instead with all jumps greater than $4$ removed, and let $\mathcal{E} \sim \textsf{exp}(c)$. By rescaling $\textsf{Sub}^{(i)}$ and choosing $\theta$ so that $\Eb{e^{\theta \textsf{Sub}^{(i)'}}} < \frac{3}{2}$ (which we can do by Lemma \ref{lem:osc}), we then have that \begin{align}\label{eqn:Qi bound} \begin{split} \prb{\sum_{i=1}^{N} Q^{(i)} \geq R \lambda} &= \sum_{n=1}^{\infty}\prcondb{\sum_{i=1}^{N} \textsf{Sub}^{(i)'}_{\mathcal{E}} \geq \lambda}{N=n}{} \prb{N=n} \\ &\leq \sum_{n=1}^{\infty} \Big(\frac{3}{2}\Big)^n e^{-\theta \lambda} \Big(\frac{1}{2}\Big)^n \\ &= C_{\theta} e^{-\theta \lambda}. \end{split} \end{align} \end{itemize} This deals with the first term in (\ref{eqn:length height decomp}). If the m-spine is prohibitively short, then this logic cannot be applied, however we can remedy this by noting that if the $T^m$-Height is unusually small in relation to the $L^m$-Height, then this essentially forces the loop sizes to be large compared to what we would normally expect. More concretely, in this case, let $M'$ be the total number of goodish loops on the m-loopspine (i.e. the total number of loops of length at least $4R$). Using the subordinator representation of the loop lengths, we then have that \begin{align*} &\prcondb{M' \leq \lambda, T^m\text{-Height}(\tilde{\L_{\alpha}}) \leq R^{\alpha -1}\lambda^{h}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} \\ &\hspace{20mm}\leq c\prb{M' \leq \lambda, L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2},T^m\text{-Height}(\tilde{\L_{\alpha}}) \leq R^{\alpha -1}\lambda^{h}} \\ &\hspace{20mm}\leq c\prcondb{\textsf{Sub}_{ R^{\alpha -1}\lambda^{h}} \geq \frac{1}{2} - 4R\lambda}{\text{no jumps of size at least } 4R}{}, \end{align*} where the third line follows by removing any jumps corresponding to goodish loops from \textsf{Sub}, and \textsf{Sub} is a subordinator with (time-dependent) jump measure \[ C_{\alpha} \mathbb{1}_{\{ [0,1] \}}(u) \mathbb{1}_{\{[0,H^m]\}}(t) l^{-\alpha} \textsf{pen}(l,H^m,t) du \ dt \ dl, \] as in (\ref{eqn:m loopspine loop measure}). Note that $\textsf{Sub}$ is almost an $(\alpha - 1)$-stable subordinator, but with the extra penalty against larger jumps. We therefore let $\textsf{Sub}^{\alpha - 1}$ denote an $(\alpha - 1)$-stable subordinator. It follows that for any $k>0$, and any $t, x, y > 0$: \begin{align*} \prcondb{\textsf{Sub}_{t} \geq x}{\text{no jumps of size at least } y}{} &\leq \prcondb{\textsf{Sub}^{\alpha - 1}_{t} \geq x}{\text{no jumps of size at least } y}{} \\ &= \prcondb{\textsf{Sub}^{\alpha-1}_{k^{\alpha - 1}t} \geq kx}{\text{no jumps of size at least } ky}{}. \end{align*} Taking $k=R^{-1}\lambda^{\frac{-h}{\alpha-1}}$, we therefore see that \begin{align*} &\prcondb{M' \leq \lambda, T^m\text{-Height}(\tilde{\L_{\alpha}}) \leq R^{\alpha -1}\lambda^{h}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} \\ &\hspace{20mm}\leq \prcondb{\textsf{Sub}^{\alpha-1}_{1} \geq \frac{1}{2} R^{-1}\lambda^{\frac{-h}{\alpha-1}} - \lambda^{1 - \frac{h}{\alpha-1}} }{\text{no jumps at least } 4\lambda^{-\frac{h}{\alpha-1}}}{} \\ &\hspace{20mm}\leq \Eb{e^{\theta \textsf{Sub}^{\alpha-1}_1}} e^{-\theta \lambda} \end{align*} for sufficiently small $\theta > 0$, where the existence of the exponential moment in the last line follows from Remark \ref{rmk:osc deterministic}, and we recall that $R< \lambda^{-1-\frac{h}{\alpha - 1}}$ by assumption. We can then proceed exactly as in the second and third bullet points above to deduce that the second term in (\ref{eqn:length height decomp}) is upper bounded by $Ce^{-c\lambda}$. This completes the proof. \end{proof} \begin{proof}[Proof of Proposition \ref{prop:resistance results infinite}] By scaling invariance of $\L^{\infty}_{\alpha}$, it is sufficient to prove the result for $r=1$. Take $R=\lambda^{-2t}$, for some positive constant $t$ that will be specified later. The aim will be to bound the cardinality of a set $A \subset \L^{\infty}_{\alpha}$ such that any path from $B^{\infty}(\rho^{\infty}, R)$ to $B^{\infty}(\rho^{\infty}, 1)^c$ must pass through at least one point in $A$. Do to this, we will define a tree $T_{\text{res}} \subset \mathcal{U}$, obtained similarly to $T_{\text{vol}}$ in the box above, but with two important differences: \begin{itemize} \item Rather than decomposing along the W-loopspine in the second and subsequent steps, we decompose along the m-loopspine. \item Rather than reiterating around sublooptrees of larger mass, we reiterate around those with large $L$-Height: specifically, those that are grafted to the m-loopspine within distance $R$ of the root, and with $L$-Height at least $\frac{1}{2}$. We decompose along the m-loopspine rather than the loopspine to the point achieving the $L$-Height purely because it is more convenient to write down an expression of the form (\ref{eqn:m loopspine loop measure}) in this case. However, an expression of the form of (\ref{eqn:m loopspine loop measure}) should also be true in the case of this loopspine. \end{itemize} We will show that, with sufficiently high probability, the total progeny of $T_{\text{res}}$ is at most $\frac{1}{2}\lambda^{t}$, and that, on this event, we can pick a set $A$ of cardinality at most $\lambda^{2t}$. In this case we are done: since $A$ is a cutset, we then have that \begin{equation}\label{eqn:Reff decomp} R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, 1)^c) \geq R_{\text{eff}}^{\infty}(\rho^{\infty}, A), \end{equation} and due to the underlying tree structure this latter quantity is lower bounded by the resistance of $2|A|$ edges connected in parallel, each of resistance $\lambda^{-2t}$. More precisely: \[ R_{\text{eff}}^{\infty}(\rho^{\infty}, A) \geq (|A| \lambda^{2t})^{-1} \geq \frac{1}{2}\lambda^{-4t}. \] We will then optimise over $t$ to obtain the result. To this end, we now turn to bounding $|T_{\text{res}}|$. As commented under (\ref{eqn:m loopspine loop measure}), the sequence of sublooptrees incident to the m-loopspine at a point in $I^m_{R}$ can be stochastically dominated by those coded by the classical (unthinned) It\^o excursion measure along this segment, so the offspring distribution of a particular $u \in T_{\text{res}}$ will be \textsf{Poisson}($\tilde{C}|I^{m,u}_{R}|$), where $\tilde{C} = N(L^m \text{-Height} \geq \frac{1}{2})$, and we have added an extra superscript $u$ to denote the dependence on $u$. By applying Lemma \ref{lem:segment length bound infinite} with $h = (\alpha - 1)(2t-1)$, it then follows exactly as in \cite[Lemma 5.7]{ArchBMCompactLooptrees} that \begin{align*} \prb{|T_{\text{res}}| \geq \lambda^t} &\leq \lambda^t \prcondb{|I^m_{R}| \geq R \lambda^{t}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} + \prb{|\hat{T}| \geq \frac{1}{2}\lambda^{t}} \\ &\leq C \lambda^{t}Ce^{-c\lambda^{t(h \wedge 1)}} + Ce^{-c\lambda^t}, \end{align*} where $\hat{T}$ is a Galton-Watson tree with \textsf{Poisson}($\tilde{C}\lambda^{-t}$) offspring distribution. Assuming now that $|T_{\text{res}}| < \frac{1}{2}\lambda^{t}$, we claim that we can pick a set $A$ of cardinality at most $\lambda^{2t}$. In fact, rather than just assuming that $|T_{\text{res}}| < \frac{1}{2}\lambda^{t}$, we can assume that all of the events we conditioned on in order to construct the event $\{|T_{\text{res}}| < \frac{1}{2}\lambda^{t}\}$ do indeed occur. In particular, we can assume that: \begin{enumerate}[(i)] \item For each $u \in T_{\text{res}}$, letting $N_u$ be the number of goodish loops on the m-loopspine between $\rho_u$ and the first good loop, we have that $N_u < \lambda^{t}$. \item For each $u \in T_{\text{res}}$, letting $Q^{(i)}_u$ denote the sum of the length of the shorter loops between successive goodish loops on the m-loopspine, \[ \sum_{i=1}^{N_u} Q_u^{(i)} < R\lambda^t = \lambda^{-t}. \] \item $|T_{\text{res}}| < \frac{1}{2}\lambda^{t}$. \end{enumerate} Assuming this, we now describe how we select the set $A$. This is illustrated in Figure \ref{fig:loopspine cutset} below which represents the m-loopspine of some $u \in T_{\text{res}}$. In particular, on this m-loopspine, we can pick two points on each of the goodish loops, and two points on the first good loop, to be in $A$. Moreover, these points can be chosen so that they are within distance $R+\lambda^{-t}$ of the ``base point" of the loop (see Figure \ref{fig:loopspine cutset}). If one of the goodish loops violates the condition that the length of its shorter segment is less than $R$, we can instead treat it as the first good loop. From the assumptions above, we deduce the following: \begin{enumerate}[(i)$'$] \item For all $u \in T_{\text{res}}$, the number of points of $A$ contained in $\L_{\alpha}^{(u)}$ is at most $2N_u$ which by $(i)$ above is in turn at most $2 \lambda^{t}$. \item $|A| \leq |T_{\text{res}}|2 \lambda^{t} = \lambda^{2t}$. \item Points in $A$ that are selected as points in the looptree corresponding to $u$ are within distance $|I_R^m| + \lambda^{-t}$ of $\rho_u$, i.e. distance $2\lambda^{-t}$ of $\rho_u$. \item All points in $A$ are within distance $|T_{\text{res}}|\lambda^{-t} + \lambda^{-t}$ of $\rho^{\infty}$, which is at most $\frac{1}{2}$ by $(iii)$ above. \item Therefore, any sublooptree grafted to the m-loopspine of $\L_{\alpha}^{(u)}$ for some $u \in T_{\text{res}}$ that has $L$-Height less than $\frac{1}{2}$, will not intersect $B(\rho, 1)^c$. In other words, $A$ is really a cutset. \end{enumerate} \begin{figure}[h] \includegraphics[width=14cm]{loopspineresistancesetA.png} \centering \caption{How to select $A$. The red segment contains the portion of $B(\rho^{\infty}, R)$ intersecting the m-loopspine.}\label{fig:loopspine cutset} \end{figure} From the probabilistic bounds above, and since we set $h = (\alpha - 1)(2t-1)$, we therefore deduce that \[ \prb{R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, 1)^c) \leq \frac{1}{2}\lambda^{-4t}} \leq C \lambda^{t}Ce^{-c\lambda^{t(h \wedge 1)}} + e^{-c\lambda^t} \leq C \lambda^{t}Ce^{-c\lambda^{t(2t-1)(\alpha -1)}} + Ce^{-c\lambda^t}. \] In particular, choosing $t> \frac{\alpha}{2(\alpha - 1)}$, we obtain \[ \prb{R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, 1)^c) \leq \frac{1}{2}\lambda^{-4t}} \leq Ce^{-c\lambda^t}, \] or equivalently, \[ \prb{R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, 1)^c) \leq \lambda^{-1}} \leq Ce^{-c\lambda^{\frac{1}{4}}}. \] \end{proof} \section{Random walk limits}\label{sctn:RW consequences} \subsection{Brownian motion and spectral dimension of $\L^{\infty}_{\alpha}$} As in the case of compact looptrees, the looptree convergence results can be used to give a collection of limit results for random walks and Brownian motion on sequences of looptrees. Before we do this, we have to show that $R^{\infty}$ is in fact a resistance metric, and that the resistance form associated with the metric space $(\L^{\infty}_{\alpha}, R^{\infty})$ is regular, which implies that it is also a regular Dirichlet form on the space $L^2(\L^{\infty}_{\alpha}, \nu)$ and so is naturally associated with a stochastic process. This is done in the following two propositions. \begin{proposition}\label{prop:res metric} $\mathbf{P}$-almost surely, $R^{\infty}$ is a resistance metric in the sense of Definition \ref{def:eff resistance metric}. \end{proposition} \begin{proof} This follows from \cite[Proposition 4.4]{ArchBMCompactLooptrees}, in which we prove the same result for compact stable looptrees. In particular, any finite set of points $V$ in $\L^{\infty}_{\alpha}$ is contained in $B(\rho^{\infty}, r)$ for some $r>0$. Taking such an $r$, we then define $t_g(r)$ and $t_d(r)$ exactly as we did in the proof of Theorem \ref{thm:LLT}; that is, we set \begin{align*} t_g(r) = \inf \{ s \geq 0: \Delta_{-s} \geq 4r, \delta^{\infty}_{-s}(x^{\infty}_{-s,0}) \geq r \}, \hspace{10mm} t_d(r) = \inf \{s \geq 0: \Xi_s \leq \Xi_{{-t_g(r)}^-} \}. \end{align*} As in previous proofs, it then follows that $B(\rho_{\infty}, r) \subset p^{\infty}([-t_g(r), t_d(r)])$, and $p^{\infty}(-t_g(r)) = p^{\infty}(t_d(r))$. Moreover, $p^{\infty}([-t_g(r), t_d(r)])$ codes a compact stable looptree, which, in keeping with earlier notation, we denote by $\L_{\alpha} (r)$. We endow it with a metric and a measure by restricting $R^{\infty}$ and $\nu^{\infty}$ to $\L_{\alpha} (r)$. It then follows exactly as in \cite[Proposition 4.4]{ArchBMCompactLooptrees} that $R^{\infty}$ restricted to $\L_{\alpha}(r)$ is a resistance metric on $\L_{\alpha} (r)$, and that we can therefore construct a weighted network with vertex set $V$ with matching effective resistance. The same network will therefore work for $\L^{\infty}_{\alpha}$. \end{proof} \begin{proposition}\label{prop:regular DF} $\mathbf{P}$-almost surely, the resistance form associated with the metric space $(\L^{\infty}_{\alpha}, R^{\infty})$ is regular. \begin{proof} We let $(\EE_{\infty}, \F_{\infty})$ denote the resistance form on $\L^{\infty}_{\alpha}$ associated with the resistance metric $R^{\infty}$ as in (\ref{eqn:resistance def variational}). According to Definition \ref{def:reg res form}, we need to show that for any $f \in C_0(\L^{\infty}_{\alpha})$ and any $\epsilon > 0$, we can find $g' \in \F_{\infty} \cap C_0 (\L^{\infty}_{\alpha})$ such that $||f - g'||_{\infty} \leq \epsilon$. The key point is that by cutting off the infinite loopspine of $\L^{\infty}_{\alpha}$ at an appropriate cutpoint, any such $f$ is also a compactly supported function on a compact stable looptree, and therefore approximable on this compact looptree, since all resistance forms on compact spaces are regular. Formally, we proceed as follows. First, note that since $f$ is compactly supported, then its support must be contained in $B(\rho^{\infty}, r)$ for some $r>0$. Taking such an $r$, we then define $t_g(r)$ and $t_d(r)$ exactly as we did in the proof of Theorem \ref{thm:LLT}; that is, we set \begin{align*} t_g(r) = \inf \{ s \geq 0: \Delta_{-s} \geq 4r, \delta^{\infty}_{-s}(x^{\infty}_{-s,0}) \geq r \}, \hspace{10mm} t_d(r) = \inf \{s \geq 0: \Xi_s \leq \Xi_{{-t_g(r)}^-} \}. \end{align*} As in previous proofs, it then follows that $B(\rho_{\infty}, r) \subset p^{\infty}([-t_g(r), t_d(r)])$, and $p^{\infty}(-t_g(r)) = p^{\infty}(t_d(r))$. We denote this projected point by $v_r$. Moreover, $p^{\infty}([-t_g(r), t_d(r)])$ codes a compact stable looptree, which, in keeping with earlier notation, we denote by $\L_{\alpha} (r)$. We endow it with a metric and a measure by restricting $R^{\infty}$ and $\nu^{\infty}$ to $\L_{\alpha} (r)$, and denote the associated resistance form by $(\EE_r, \F_{r})$. The key point is the following: by \cite[Theorem 8.4]{KigamiResistanceFormsMono}, and the one-to-one correspondence given by (\ref{eqn:resistance def variational}) and its continuum extension on compact spaces, $(\EE_r, \F_{r})$ is obtained as the trace of $(\EE_{\infty}, \F_{\infty})$ on $\L_{\alpha} (r)$, and is such that for any $f \in \F_{r}$, $\EE_r (f, f) = \EE_{\infty} (h(f), h(f))$, where $h(f)$ is the unique harmonic extension of $f$ to $\L^{\infty}_{\alpha}$. Now take $f \in \F_{\infty}$. Note that, necessarily, $f(v_r)=0$, since $f$ is continuous. Moreover, $v_r$ is a point on the infinite loopspine that cuts $\rho^{\infty}$ off from $\infty$. Arbitrarily, we now choose a new point $v_r'$ on the loopspine, coded by a jump point of $X^{\infty}$, that also separates $\rho^{\infty}$ from $\infty$, but such that $R^{\infty} (\rho^{\infty}, v_r') > R^{\infty}(\rho^{\infty}, v_r)$. It follows that $v_r'$ is coded by jump point of $X^{\infty}$ at a time that we denote by $-t_{g,2}(r)$, where $t_{g,2}(r) > t_g(r)$ and $-t_{g,2}(r) \preceq 0$. For any $s$ with $-t_{g,2}(r) \preceq s \prec -t_g(r)$, set $a_s = \delta_s ( x_{s,0}^{\infty})$, and $b_s = \Delta_s - \delta_s ( x_{s,0}^{\infty})$, so that $a_s$ gives the length of the ``shorter" segment of the corresponding loop in the loopspine, and $b_s$ gives the length of the ``longer" segment (see Figure \ref{fig:regularRF}). Set \[ d_{\text{min}} = \sum_{-t_{g,2}(r) \preceq s \prec -t_g(r)} a_s, \hspace{10mm} d_{\text{max}} = \sum_{-t_{g,2}(r) \preceq s \prec -t_g(r)} b_s. \] These are defined so that $d_{\text{min}}$ gives the looptree distance between $v_r$ and $v_r'$, and $d_{\text{max}}$ gives the ``longer distance" between them, which is the length of the path between them that traverses the longer side of all the loops in the loopspine that lie between $v_r$ and $v_r'$ (see Figure \ref{fig:regularRF}). \begin{figure}[h] \includegraphics[width=14cm, height=5.3cm]{regularRF-eps-converted-to} \centering \caption{Illustration of how we cut the infinite loopspine.}\label{fig:regularRF} \end{figure} Additionally, let $t_{d,2}(r) = \inf \{s \geq 0: \Xi_s \leq \Xi_{{-t_{g,2}(r)}^-} \}$. Then $p^{\infty}([ -t_{g,2}(r), t_{d,2}(r)])$ codes another compact stable looptree which we denote by $\L_{\alpha} (r)'$, satisfying $\L_{\alpha} (r) \subset \L_{\alpha} (r)' \subset \L^{\infty}_{\alpha}$. Since $\L_{\alpha} (r)$ is compact, it follows that $(\EE_r, \F_{r})$ is regular, so there exists $g \in \F_{r} \cap C_0(\L_{\alpha}(r))$ with $||f|_{\L_{\alpha} (r)}-g||_{\infty, \L_{\alpha} (r)} \leq \epsilon$. We therefore define a function $g' \in C_0(\L^{\infty}_{\alpha})$ by setting $g' = g$ on $\L_{\alpha} (r)$, $g'=0$ on $\L^{\infty}_{\alpha} \setminus \L_{\alpha} (r)'$, and extending harmonically on $\L_{\alpha} (r)' \setminus \L_{\alpha} (r)$. Since $g$ approximates $f_{\L_{\alpha} (r)}$ in the supremum norm, it follows that $|g(v_r)| \leq \epsilon$, and moreover it then follows by the maximum principle for harmonic functions that $||g'_{\L_{\alpha} (r)' \setminus \L_{\alpha} (r)}||_{\infty} \leq \epsilon$. Consequently, $||f-g'||_{\infty} \leq \epsilon$. It therefore just remains to show that $\EE_{\infty} (g', g') < \infty$. Let $(\EE_r', \F_{r}')$ denote the restriction of $(\EE_{\infty}, \F_{\infty})$ to $\L_{\alpha}(r)'$. Since the spaces $\L_{\alpha} (r), \L_{\alpha} (r)' \setminus \L_{\alpha} (r)$ and $\L^{\infty}_{\alpha} \setminus \L_{\alpha} (r)'$ are disjoint, and $g'$ is the harmonic extension of $g'|_{\L_{\alpha} (r)'}$ to $\L^{\infty}_{\alpha}$, it follows by bilinearity and from consistency properties of resistance forms and their traces given in \cite[Section 8]{KigamiResistanceFormsMono} that \begin{equation}\label{eqn:energy decomp} \EE_{\infty} (g', g') = \EE_r' (g'|_{\L_{\alpha} (r)'}, g'|_{\L_{\alpha} (r)'}). \end{equation} However, since $\L_{\alpha}(r)'$ is simply a compact looptree, this is automatically finite. \end{proof} \end{proposition} As a result, we deduce that the resistance metric space is naturally associated with a Hunt process on $(\L^{\infty}_{\alpha}, R^{\infty})$, which we call Brownian motion on $\L^{\infty}_{\alpha}$ and denote by $B^{\infty}$. \subsection{Quenched results} We can apply Theorem \ref{thm:scaling lim RW resistance} to the results of Theorems \ref{thm:LLT} and \ref{thm:main scaling lim} to deduce convergence results for stochastic processes on the corresponding spaces. The only additional detail in the proofs of these results is that we have to check that the non-explosion condition at (\ref{eqn:nonexplosion}) is satisfied, i.e. that \begin{equation*} \lim_{r \rightarrow \infty} \liminf_{{\l} \rightarrow \infty} R^{\l} (\rho^{\l}, B^{\l} (\rho^{\l}, r)^c) = \infty \end{equation*} almost surely, where $R^{\l}$ here denotes the resistance metric on $\L^{\l}_{\alpha}$. \subsubsection{Local limits}\label{sctn:RW limit local infinite} The local limit theorem of Theorem \ref{thm:LLT} immediately allows us to apply Theorem \ref{thm:scaling lim RW resistance} to deduce that Brownian motion on $\L^{\l}_{\alpha}$ converges in distribution to Brownian motion on $\L^{\infty}_{\alpha}$ as $\l \rightarrow \infty$ on compact time intervals. Indeed, it follows from Theorem \ref{thm:GH vague separable HB} and the Skorohod Representation Theorem that there exists a probability space on which the convergence on Theorem \ref{thm:LLT} holds almost surely. Moreover, the explosion condition is satisfied as an immediate consequence of Proposition \ref{prop:resistance results infinite}. In particular, the arguments used to prove Proposition \ref{prop:resistance results infinite} are also valid for compact stable looptrees, so we deduce that the resistance bounds of Proposition \ref{prop:resistance results infinite} almost surely hold along the sequence $(\L^{\l}_{\alpha})_{\l \in \mathbb{N}}$. Theorem \ref{thm:main RW LLT conv} then follows by a direct application of Theorem \ref{thm:scaling lim RW resistance}. \subsubsection{Scaling limits} We can also deduce similar results from Theorems \ref{thm:RW conv infinite intro}, \ref{thm:BS looptree conv} and \ref{thm:Rich looptree conv}. In this case, the non-explosion condition is satisfied as a result of \cite[Lemma 3.5]{BjornStef}, which says that for $\textsf{Loop'}(T_{\alpha}^{\infty})$, there exist $q, C \in (0, \infty)$ such that \begin{equation}\label{eqn:BS nonexp} \prb{R_{\text{eff}} (\rho, B(\rho, r)^c) \leq r\lambda^{-1}} \leq C\lambda^{-q}. \end{equation} In light of Proposition \ref{prop:resistance results infinite}, we conjecture that there should in actual fact be exponential tail decay, but polynomial decay is sufficient for our purposes here. Indeed, to verify (\ref{eqn:nonexplosion}), we need to show that \[ \lim_{r \rightarrow \infty} \liminf_{n \rightarrow \infty} n^{\frac{-1}{\alpha}} R_{\text{eff}} (\rho, B(\rho, rn^{\frac{1}{\alpha}})^c) = \infty \] $\mathbf{P}$-almost surely. This follows directly from applying a Borel-Cantelli argument along a suitable subsequence using the probabilistic bound (\ref{eqn:BS nonexp}). Moreover, the same arguments apply for $\textsf{Loop}(T_{\alpha}^{\infty})$ since $R_{\text{eff}} (\rho, \mathcal{B}_r(\textsf{Loop}(T_{\alpha}^{\infty}))^c) \geq R_{\text{eff}} (\rho, B_{r-1}(\textsf{Loop'}(T_{\alpha}^{\infty}))^c)$. Similarly, the result also holds for the two-type looptree $\textsf{Loop}^2(T_{\alpha}^{\infty, 2})$, since $R_{\text{eff}} (\rho, \mathcal{B}_{r}(\overline{\textsf{Loop}}(T_{\alpha}^{\infty}))^c) \geq R_{\text{eff}} (\rho, B_{r - \textsf{Height}(\textsf{Tree}(\textsf{Loop'} (T_{\alpha}^{\infty})^r))}(\textsf{Loop'}(T_{\alpha}^{\infty}))^c)$, and $r^{-1}\textsf{Height}(\textsf{Tree}(\textsf{Loop'} (T_{\alpha}^{\infty})^r)) \rightarrow 0$ in probability, with exponential tail decay (as in Point 2 of the proof of Theorem \ref{thm:Rich looptree conv}), allowing further Borel-Cantelli arguments. In all the different versions of infinite looptrees that we have considered, the Gromov-Hausdorff-Prohorov convergence holds with the uniform measure on vertices of the looptree, and the associated stochastic process is therefore a variable speed random walk. In the case of $\textsf{Loop}(T_{\alpha}^{\infty})$, all vertices have degree $4$, so in this case the stochastic process is actually a constant speed random walk, with \textsf{exp}($4$) waiting times at each vertex. However, by applying Kolmogorov's Maximal Inequality to the time index of this stochastic process (as in the proof of \cite[Theorem 1.1]{ArchBMCompactLooptrees}) we can show that the waiting times average out sufficiently well over time so the scaling limit result will also hold for a simple random walk on $\textsf{Loop}(T_{\alpha}^{\infty})$ (although sped up deterministically by a factor of $4$). Theorem \ref{thm:RW conv infinite intro} therefore follows by an immediate application of Theorem \ref{thm:scaling lim RW resistance} to Proposition \ref{prop:inf conv disc loop}. In the case of $\textsf{Loop'}(T_{\alpha}^{\infty})$, all internal vertices have degree $4$, and all leaf vertices have degree $2$. This corresponds to the fact the the only significant difference between $\textsf{Loop}(T_{\alpha}^{\infty})$ and $\textsf{Loop'}(T_{\alpha}^{\infty})$ is that in $\textsf{Loop'}(T_{\alpha}^{\infty})$ the loops corresponding to leaves are missing, and has the effect that (on average) the random walk waits twice as long at leaf vertices compared to internal vertices. This reflects the fact that the random walks on $\textsf{Loop}(T_{\alpha}^{\infty})$ and $\textsf{Loop'}(T_{\alpha}^{\infty})$ can (almost, technically only after adding one extra vertex to the loop containing the root in $\textsf{Loop} (T_{\alpha}^{\infty})$) be coupled so that they move identically at internal vertices, but so that a random walk on $\textsf{Loop'}(T_{\alpha}^{\infty})$ remains in its present position whenever the random walk on $\textsf{Loop}(T_{\alpha}^{\infty})$ traverses a loop corresponding to a leaf vertex (note this can be traversed in either direction). It therefore makes sense that we should be taking a scaling limit of the variable speed random walk on $\textsf{Loop'}(T_{\alpha}^{\infty})$, rather than the constant speed one. We similarly have to take a variable speed random walk on $\textsf{Loop}^2(T_{\alpha}^{\infty, 2})$, although there is not such a simple coupling in this case. In the next theorem, we let $L_{\alpha}^{\infty, 1} = \textsf{Loop'}(T_{\alpha}^{\infty})$, $L_{\alpha}^{\infty, 2} = \textsf{Loop}^2(T_{\alpha}^{\infty, 2})$, $Y^{\text{var}, i}$ denote a variable speed random walk on $L_{\alpha}^{\infty, i}$, and $\nu^i$ denote the measure giving mass $1$ to each vertex. The non-explosion condition is again satisfied by the same arguments as in Section \ref{sctn:RW limit local infinite} above. We then have the following analogues of Theorem \ref{thm:RW conv infinite intro}. \begin{theorem}\label{thm:RW conv infinite BjornStef} Take $i \in \{1, 2\}$. There exists a probability space $(\Omega', \mathcal{F}', \mathbf{P}')$ on which we can almost surely define a common metric space $(M, R_M)$ in which the spaces $(L_{\alpha}^{\infty, i}, a_n^{-1} \d, n^{-1} \nu', \rho)$ and $(\L_{\alpha}^{\infty}, \d^{\infty}, \nu^{\infty}, \rho^{\infty})$ can all be isometrically embedded and such that \[ (L_{\alpha}^{\infty, i}, a_n^{-1}\d, n^{-1} \nu^i, \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff-vague topology, and the convergence specifically holds on the metric space $(M, R_M)$. Letting $Y^{\text{var},i}$ and $B^{\infty}$ be as above, we have that \[ (a_n^{-1}Y^{\text{var},i}_{\lfloor n a_n t \rfloor})_{t \geq 0} \overset{(d)}{\rightarrow} (B^{\infty}_t)_{t \geq 0} \] on the space $D(\mathbb{R}^+, M$) as $n \rightarrow \infty$. \end{theorem} \begin{remark} We could also prove other convergence results, for example by taking increasing sequences of increasingly rescaled discrete looptrees to approximate $\L^{\infty}_{\alpha}$, in some sense combining Theorems \ref{thm:LLT} and \ref{thm:compact disc inv princ res}, and deduce similar convergence results for random walks, exactly as we did in the cases above. This corresponds to the diagonal line in Figure \ref{fig:commuting diag intro}. \end{remark} \subsection{Annealed results} We can also prove similar results in the annealed setting by embedding into the Urysohn space, where we recall that if $(F, R, \mu, \rho, \phi)$ is a random element of $\mathbb{F}$ with law $\mathbf{P}$ such that $\phi: F \rightarrow U$ is a (possibly random) isometric embedding, and $(Y_t)_{t \geq 0}$ is a stochastic process on $F$, we define its annealed law by \[ \prtilnstart{\phi(Y_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} = \int \prnstart{\phi(Y_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} d\mathbf{P}, \] as introduced in Section \ref{sctn:res forms}. Again we will restrict to the subsequence of integral $\l$ in Theorem \ref{thm:RW conv local annealed} below, but the result holds along any countable subsequence diverging to infinity. \begin{theorem}\label{thm:RW conv local annealed} Let $(\L^{\l}_{\alpha}, \d^{\l}, \nu^{\l}, \rho^{\l})_{\l \geq 1}$ be as in Theorem \ref{thm:LLT}. Then there exist (random) embeddings $\phi_{\l}: (\L^{\l}_{\alpha}, \d^{\l}, \nu^{\l}, \rho^{\l}) \rightarrow U, \phi: (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \rightarrow U$ such that \[ \prtilnstart{\phi_{\l}(B^{\l}_t)_{t \geq 0} \in \cdot}{\phi_{\l}(\rho^{\l})}{\l} \rightarrow \prtilnstart{(B^{\infty}_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} \] weakly as probability measures on the space $D(\mathbb{R}^+, U)$ endowed with the Skorohod-$J_1$ topology as $n \rightarrow \infty$. \end{theorem} \begin{proof} The proof of Theorem \ref{thm:LLT} implies that there exists a probability space on which $(\L^{\l}_{\alpha}, \d^{\l}, \nu^{\l}, \rho^{\l}) \rightarrow (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty})$ almost surely in the Gromov-Hausdorff vague topology. In particular, there exists a metric space $M = \L^{\infty}_{\alpha} \sqcup \L_{\alpha}^1 \sqcup \L_{\alpha}^2 \sqcup \ldots$ defined on this probability space such that $\L^{\l}_{\alpha} \rightarrow \L^{\infty}_{\alpha}$ almost surely. Moreover, by properties of the Urysohn space discussed in Section \ref{sctn:res forms}, there exists an isometry $\psi: M \rightarrow U$ such that $\psi(\rho^{\infty}) = u_0$. For each $\l \in \mathbb{N} \cup \{\infty\}$, let $\phi_{\l}$ be the canonical isometry embedding $\L^{\l}_{\alpha}$ into $M$. It then follows that $\psi_{\l} := \psi \circ \phi_{\l}$ is an isometry from $\L^{\l}_{\alpha}$ to $U$ and moreover that almost surely, $\psi_{\l} (\L^{\l}_{\alpha}) \rightarrow \psi_{\infty} (\L^{\infty}_{\alpha})$ Gromov-Hausdorff vaguely as $\l \rightarrow \infty$. Viewing $(\phi_{\l})_{\l \geq 1}$ and $\psi_{\infty}$ as spatial embeddings, this therefore automatically implies that the spaces converge in the metric introduced at (\ref{eqn:spat U dist}). Since the topology induced by this metric is a particular instance of the spatial Gromov-Hausdorff topology used in \cite[Section 7]{DavidResForms}, we are in the right setting to apply Theorem \ref{thm:scaling lim RW resistance annealed}. Indeed, the non-explosion condition (\ref{eqn:nonexplosion annealed}) is satisfied as a direct consequence of Proposition \ref{prop:resistance results infinite}, which also uniformly holds along the sequence $(\L^{\l}_{\alpha})_{l \geq 1}$. The theorem then follows by a direct application of Theorem \ref{thm:scaling lim RW resistance annealed}. \end{proof} We can also prove a similar results for the spaces $\textsf{Loop}(T_{\alpha}^{\infty})$, $L_{\alpha}^1$ and $L_{\alpha}^2$. We omit the proofs since they are essentially identical to that of Theorem \ref{thm:RW conv local annealed} above. \begin{theorem}\label{thm:RW conv scaling annealed} Let $(\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1}\d, n^{-1} \nu^{\text{disc}}, \rho)$ be as in Theorem \ref{thm:main scaling lim}. Then there exist (random) embeddings $\phi_n: (\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1}\d, n^{-1} \nu^{\text{disc}}, \rho) \rightarrow U, \phi: (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \rightarrow U$ such that \[ \prtilnstart{\phi_n\big(a_n^{-1} Y^{(n)}_{\lfloor 4n a_n t \rfloor}\big)_{t \geq 0} \in \cdot}{\phi_n(\rho_n)}{n} \rightarrow \prtilnstart{(B^{\infty}_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} \] weakly as probability measures on the space $D(\mathbb{R}^+, U)$ endowed with the Skorohod-$J_1$ topology as $n \rightarrow \infty$. \end{theorem} \begin{theorem}\label{thm:RW conv infinite BjornStef annealed} Take $i \in \{1, 2\}$, and let $(L_{\alpha}^{\infty, i}, a_n^{-1}\d, n^{-1} \nu^i, \rho)$ be as in Theorem \ref{thm:RW conv infinite BjornStef}. Then there exist (random) embeddings $\phi_n: (L_{\alpha}^{\infty, i}, a_n^{-1}\d, n^{-1} \nu^{i}, \rho) \rightarrow U, \phi: (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \rightarrow U$ such that \[ \prtilnstart{\phi_n(a_n^{-1}Y^{\text{var},i}_{\lfloor n a_n t \rfloor})_{t \geq 0} \in \cdot}{\phi_n(\rho_n)}{n} \rightarrow \prtilnstart{(B^{\infty}_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} \] weakly as probability measures on the space $D(\mathbb{R}^+, U)$ endowed with the Skorohod-$J_1$ topology as $n \rightarrow \infty$. \end{theorem} \subsection{Heat kernel convergence and spectral dimension}\label{sctn:annealed HK from infinite looptrees} To conclude, we now show how Theorem \ref{thm:LLT} can be applied to give results on the heat kernel of Brownian motion on compact stable looptrees. First, note that it follows from the scaling invariance of Proposition \ref{prop:Lai scale inv} that the annealed heat kernel for $\L^{\infty}_{\alpha}$ satisfies the scaling relation \begin{equation}\label{eqn:HK scaling} \Eb{p_t^{\infty}(\rho, \rho)} = k^{\frac{\alpha}{\alpha + 1}} \Eb{p_{kt}^{\infty}(\rho, \rho)} \end{equation} for any $k>0$. Similarly, if we let $p_t^{\l}$ denote the transition density of Brownian motion on a looptree coded by an excursion of length $\l$, we have that \[ \Eb{{p_t^{1}(\rho, \rho)}} = k^{\frac{\alpha}{\alpha + 1}} \Eb{p_{kt}^{k^{\frac{1}{\alpha + 1}}}(\rho, \rho)}. \] Setting $k=t^{-1}$ we see that \[ t^{\frac{\alpha}{\alpha + 1}} \Eb{p_t^{1}(\rho, \rho)} {=} \Eb{ p_{1}^{t^{\frac{-1}{\alpha + 1}}}(\rho, \rho)}. \] Moreover, since we are in a resistance framework, it follows from \cite[Theorem 2 and Proposition 14]{CroyHamLLT} that \[ t^{\frac{\alpha}{\alpha + 1}} p_t^{1}(\rho, \rho) \overset{(d)}{\rightarrow} p_{1}^{\infty}(\rho, \rho) \] as $t \downarrow 0$. To deduce that the corresponding expectations also converge, we just need to show that $\Eb{p_{1}^{\infty}(\rho, \rho)}$ is finite. However, since the transition density can be bounded by bounding the volume and resistance growth (by a continuum version of \cite[Proposition 1.4]{KumMisumiHKStronglyRecurrent}, for example), the exponential tail decay of Propositions \ref{prop:vol results infinite} and \ref{prop:resistance results infinite} also give an upper exponential tail decay for the transition density. We therefore deduce that $\Eb{p_{1}^{\infty}(\rho, \rho)}$ is finite, so we can apply similar arguments to those in the previous section to deduce that \[ t^{\frac{\alpha}{\alpha + 1}} \Eb{p_t^{1}(\rho, \rho)} \rightarrow \Eb{p_{1}^{\infty}(\rho, \rho)} \] as $t \rightarrow \infty$. This is stated as \cite[Theorem 1.8]{ArchBMCompactLooptrees}, where Brownian motion on $\L_{\alpha}$ is studied more closely. Similarly, it also follows from \cite[Theorem 1.5, Part II]{KumMisumiHKStronglyRecurrent} (adapted to the continuum) that the heat kernel $p^{\infty}_t(\rho, \rho)$ almost surely experiences at most log-logarithmic fluctuations around a leading term of $t^{\frac{-\alpha}{\alpha + 1}}$ as $t \uparrow \infty$ and as $t \downarrow 0$, and therefore that the quenched spectral dimension of $\L_{\alpha}$ is almost surely equal to $\frac{2 \alpha}{\alpha + 1}$. To establish the annealed spectral dimension, we take $k=t^{-1}$ in (\ref{eqn:HK scaling}) to deduce that \[ \Eb{p_t^{\infty}(\rho, \rho)} = t^{\frac{-\alpha}{\alpha + 1}} \Eb{p_{1}^{\infty}(\rho, \rho)}. \] Since $\Eb{p_{1}^{\infty}(\rho, \rho)}$ is finite, this implies that the annealed spectral dimension is also equal to $\frac{2 \alpha}{\alpha + 1}$. This concludes the proof of Theorem \ref{thm:main spec dim annealed}. \bibliographystyle{alpha} \section{Introduction} Stable looptrees are a class of random fractal objects indexed by a parameter $\alpha \in (1,2)$ and can informally be thought of as the dual graphs of stable trees. Motivated by \cite{LeGMiermontScalingLimitsLargeFaces}, they were originally introduced by Curien and Kortchemski in \cite{RSLTCurKort}, and along with their discrete counterparts have been shown to be of increasing significance in the study of statistical mechanics models on random planar maps. For example, the same authors showed in \cite{CurKortUIPTPerc} that a stable looptree arises as the scaling limit of the boundary of a critical percolation cluster on the UIPT, and Richier showed in \cite{RichierIICUIHPT} that the incipient infinite cluster of the UIHPT has the form of an infinite discrete looptree. Further results along these lines can be found in \cite{CurKortUIPTPerc}, \cite{CurKortDuqMan}, \cite{StefStufBolzOuterplanar}, \cite{BaurRichUIPQSkew}, \cite{CurRichDualityRPMPerc} and \cite{KortRichBoundaryRPMLooptrees}, though this is a very non-exhaustive list. More generally, they also arise as the scaling limits of boundaries of stable maps \cite{RichierMapBoundaryLimit}, and are emerging as an important tool in the programme to reconcile the theories of random planar maps and Liouville quantum gravity, demonstrated for example in \cite{MillSheff}, \cite{GwynnePfefferConnectivitySLE} and \cite{BernardiHoldenSun}. \begin{figure}[h] \includegraphics[width=14cm]{loopdiscretee-eps-converted-to} \centering \caption{A tree $T$ and the looptree $\textsf{Loop} (T)$.}\label{fig:disc looptree intro} \end{figure} Given a discrete tree $T$, the corresponding discrete looptree ${\textsf{Loop}}(T)$ as defined in \cite{RSLTCurKort} is constructed by replacing each vertex $u \in T$ with a cycle of length equal to the degree of $u$ in $T$, and then gluing these cycles along the tree structure of $T$. This is illustrated in Figure \ref{fig:disc looptree intro}. This operation can also be applied in the case where $T$ is an infinite tree. If $T$ is rooted, we will take the convention that the root of $\textsf{Loop} (T)$ is the vertex of $\textsf{Loop} (T)$ corresponding to the edge of $T$ joining the root of $T$ to its first child. In this article we will mainly be interested in the case where our tree $T$ has a critical offspring distribution in the domain of attraction of an $\alpha$-stable law, by which we mean that there exists an increasing sequence $a_n \uparrow \infty$ such that, if $(\xi^{(i)})_{i=1}^{\infty}$ are i.i.d. copies of $\xi$, then \begin{equation*}\label{eqn:dom of att def} \frac{\sum_{i=1}^n \xi^{(i)} - n}{a_n} \overset{(d)}{\rightarrow} Z_{\alpha} \end{equation*} as $n \rightarrow \infty$, where $Z_{\alpha}$ is an $\alpha$-stable random variable (and can be normalised so that $\E{e^{-\lambda Z_{\alpha}}} = e^{-\lambda^{\alpha}}$ for all $\lambda > 0$). It is shown in \cite[Section 8.3.2]{BGTRegVariation} that necessarily $a_n = n^{\frac{1}{\alpha}}L(n)$ for some slowly-varying function $L$, where we recall that slowly varying means that $L(x) > 0$ for all sufficiently large $x$, and $\lim_{x \rightarrow \infty} \frac{L(tx)}{L(x)} = 1$ for all $t>0$. Equivalently, $\xi([n, \infty)) = k^{-\alpha} L(n)$. In the case where $\xi([n, \infty)) \sim cn^{-\alpha}$ as $n \rightarrow \infty$, we can take $a_n = (c |\Gamma(-\alpha)|n)^{\frac{1}{\alpha}}$. Throughout the article we will make the assumption that $\alpha \in (1,2)$. In \cite[Theorem 4.1]{RSLTCurKort}, it is shown that if $T_n$ is a Galton Watson tree conditioned to have $n$ vertices with offspring distribution $\xi$ in the domain of attraction of an $\alpha$-stable law, then we can define the $\alpha$-stable looptree (which we denote by $\L_{\alpha}$) to be the random compact metric space such that \[ a_n^{-1} {\textsf{Loop}}(T_n) \overset{(d)}{\rightarrow} \L_{\alpha} \] in the Gromov-Hausdorff topology as $n \rightarrow \infty$. A simulation is shown in Figure \ref{fig:stable looptree intro}. In the case $\alpha = 2$, the looptrees instead rescale to the Brownian Continuum Random Tree \cite[Theorem 2]{KortRichCondensationCritical}. \begin{figure}[h] \includegraphics[width=10cm]{loop.pdf} \centering \caption{Simulation of a stable looptree, by Igor Kortchemski.}\label{fig:stable looptree intro} \end{figure} The main purpose of this paper is to give a construction of infinite stable looptrees. The construction is similar in spirit to Duquesne's construction of stable sin-trees in \cite{DuqSinTree}, which is the continuum analogue of Kesten's discrete construction of an infinite critical tree. Additionally, infinite discrete looptrees have been defined by Bj\"ornberg and Stef\'ansson in \cite{BjornStef} by applying a related loop operation to Kesten's infinite critical tree $T_{\infty}$, and similarly by Richier in \cite{RichierIICUIHPT} by applying a similar operation to a two-type version of Kesten's tree. As is done for stable sin-trees in \cite{DuqSinTree}, we define the infinite stable looptree $\L^{\infty}_{\alpha}$ from two independent stable L\'{e}vy processes, each of which is used to code the looptree on one side of its singly infinite loopspine. This is the construction suggested in \cite[Section 6]{RichierIICUIHPT} and is the natural extension of the coding mechanism used to define stable looptrees from stable L\'{e}vy excursions. The construction is given in Section \ref{sctn:construction of infinite stable looptrees}. The remainder of the article is devoted to proving various limit theorems to justify the definition, and then using these to make deductions about Brownian motion on compact stable looptrees, which is explored more deeply in the companion paper \cite{ArchBMCompactLooptrees}. In particular, we prove a local limit theorem showing that $\L^{\infty}_{\alpha}$ can be characterised as the local limit of compact stable looptrees, and also as the scaling limit of infinite discrete looptrees. When combined with earlier results of Curien and Kortchemski, Bj\"ornberg and Stef\'ansson, and Richier, this shows that the diagram of Figure \ref{fig:commuting diag intro} commutes as indicated. \begin{figure}[h] \begin{center} \includegraphics[width=13cm]{commutinglooptreediagramsmalll-eps-converted-to} \caption{Commuting Diagram.}\label{fig:commuting diag intro} \end{center} \end{figure} We start by giving the local limit result. In what follows, we let $\L^{\l}_{\alpha}$ be a compact stable looptree conditioned to have total volume $\l$, and let $\L_{\alpha}^{\infty}$ be as above. We recall from \cite{RSLTCurKort} that $\L^{\l}_{\alpha}$ is endowed with a measure $\nu^{\l}$ which can be thought of as the natural analogue of uniform measure on $\L^{\l}_{\alpha}$. We will define a similar measure on $\L^{\infty}_{\alpha}$ in Section \ref{sctn:construction of infinite stable looptrees}, and denote it by $\nu^{\infty}$. We also recall from \cite{RSLTCurKort} (respectively \cite{ArchBMCompactLooptrees}) that there is a natural way to define shortest-distance metric (respectively a resistance metric) on $\L^{\l}_{\alpha}$, and we will define analogous metrics for $\L^{\infty}_{\alpha}$ in Section \ref{sctn:construction of infinite stable looptrees}. \begin{theorem}\label{thm:LLT} Let $\L^{\l}_{\alpha}$ be a compact stable looptree conditioned to have mass $\l$, and let $\L_{\alpha}^{\infty}$ be as above. Then, \begin{equation*} (\L^{\l}_{\alpha}, \d^{\l}, \nu^{\l}, \rho^{\l}) \overset{(d)}{\rightarrow} (\L_{\alpha}^{\infty}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \end{equation*} as $\l \rightarrow \infty$, with respect to the Gromov-Hausdorff-vague topology. Here $\d^{\l}$ and $\d^{\infty}$ can denote either the geodesic metrics, or the effective resistance metrics on the respective spaces. \end{theorem} Similarly, we prove the following scaling result. \begin{theorem}\label{thm:main scaling lim} Let $T_{\alpha}^{\infty}$ denote Kesten's tree with critical offspring distribution in the domain of attraction of an $\alpha$-stable law. Also let $\nu^{\text{disc}}$ denote the measure that gives mass $1$ to every vertex of \textsf{Loop}($T_{\alpha}^{\infty}$). Then \[ (\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1} \d, n^{-1} \nu^{\text{disc}}, \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff vague topology as $n \rightarrow \infty$. Here $\d$ and $\d^{\infty}$ can denote either the geodesic metrics, or the effective resistance metrics on the respective spaces. \end{theorem} We will see in Section \ref{sctn:scaling lims} that similar results hold for the infinite discrete looptrees defined in \cite{BjornStef} and \cite{RichierIICUIHPT}. Given these two theorems, we are also in the right setting to apply results of \cite{DavidResForms} regarding limits for stochastic processes on these spaces. In particular, we obtain the following results. Note that we formally define Brownian motion on stable looptrees in the article \cite{ArchBMCompactLooptrees} by defining it to be the stochastic process naturally associated with the effective resistance metric on them. In Section \ref{sctn:construction of infinite stable looptrees}, we similarly define an effective resistance metric on $\L^{\infty}_{\alpha}$ and in Section \ref{sctn:RW consequences} we define Brownian motion on $\L^{\infty}_{\alpha}$ to be the associated stochastic process. We denote it by $B^{\infty}$. For convenience, we restrict to the case where $\l$ takes integer values below, but the result holds along any countable subsequence diverging to infinity. \begin{theorem}\label{thm:main RW LLT conv} Let $(B^{\l}_t)_{t \geq 0}$ be Brownian motion on $\L^{\l}_{\alpha}$, and let $(B^{\infty}_t)_{t \geq 0}$ be Brownian motion on $\L^{\infty}_{\alpha}$. Then there exists a probability space $(\Omega', \mathcal{F}', \mathbf{P}')$ on which we can almost surely define a metric space $(M, R_M)$ in which the spaces $(\L^{\l}_{\alpha}, R^{\l}, \nu^{\l}, \rho^{\l})$ and $(\L_{\alpha}^{\infty}, R^{\infty}, \nu^{\infty}, \rho^{\infty})$ can all be embedded and such that \[ (\L^{\l}_{\alpha}, R^{\l}, \nu^{\l}, \rho^{\l}) \rightarrow (\L_{\alpha}^{\infty}, R^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff-vague topology as $\l \rightarrow \infty$, and the required Hausdorff convergence specifically holds in the metric space $(M, R_M)$. Letting $(B^{\l})_{\l \geq 1}$ and $B^{\infty}$ be as above, we have that \[ (B^{\l}_t)_{t \geq 0} \overset{(d)}{\rightarrow} (B^{\infty}_t)_{t \geq 0} \] as $\l \rightarrow \infty$, considered on the space $C(\mathbb{R}^+, M)$ endowed with the topology of uniform convergence on compact time intervals. \end{theorem} \begin{theorem}\label{thm:RW conv infinite intro} Let $(\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1}\d, n^{-1} \nu^{\text{disc}}, \rho)$ be as in Theorem \ref{thm:main scaling lim}. Then there exists a probability space $(\Omega'', \mathcal{F}'', \mathbf{P}'')$ on which we can almost surely define a metric space $(M, R_M)$ in which the spaces $(\textsf{Loop}(T_{\alpha}^{\infty}), Ca_n^{-1} \d, n^{-1} \nu^{\text{disc}}, \rho)$ and $(\L_{\alpha}^{\infty}, {\d}^{\infty}, \nu^{\infty}, \rho^{\infty})$ can all be embedded and such that \[ (\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1} \d, n^{-1} \nu^{\text{disc}}, \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff-vague topology as $n \rightarrow \infty$, and the required Hausdorff convergence specifically holds on the metric space $(M, R_M)$. Letting $Y$ be a simple random walk on $\textsf{Loop}(T_{\alpha}^{\infty})$, and $B^{\infty}$ be as above, we have that \[ (a_n^{-1} Y_{\lfloor 4n a_n t \rfloor})_{t \geq 0} \overset{(d)}{\rightarrow} (B^{\infty}_t)_{t \geq 0} \] on the space $D(\mathbb{R}^+, M$) endowed with the Skorohod-$J_1$ topology as $n \rightarrow \infty$. \end{theorem} Again, we will prove a similar result for random walks on the other infinite discrete looptrees in Section \ref{sctn:RW consequences}, along with annealed versions, but the one above is easiest to state as all vertices have degree $4$ in \textsf{Loop}($T_{\infty}$). The process $B^{\infty}$ is considered further in Section \ref{sctn:RW consequences} where we prove the following results about the spectral dimension of $\L^{\infty}_{\alpha}$. Recall that the spectral dimension of $\L^{\infty}_{\alpha}$ is defined as \begin{equation}\label{eqn:trans dens def} d_S(\L^{\infty}_{\alpha}) = \lim_{t \rightarrow \infty} \frac{-2\log( p^{\infty}_t(\rho^{\infty}, \rho^{\infty}))}{\log t}, \end{equation} where $p^{\infty}_t(\cdot, \cdot)$ is the transition density of the Brownian motion $B^{\infty}$ defined above, i.e. a symmetric $\nu^{\infty} \times \nu^{\infty}$-measurable function on $\L^{\infty}_{\alpha} \times \L^{\infty}_{\alpha}$ such that \[ \estartb{f(B_t)}{x} = \int_{\L^{\infty}_{\alpha}} f(y) p_t(x,y) \nu^{\infty} (dy) \] for all bounded, $\nu^{\infty}$-measurable functions $f$ on $\L^{\infty}_{\alpha}$ and $\nu^{\infty}$-almost every $x \in \L^{\infty}_{\alpha}$. We assume that $\L^{\infty}_{\alpha}$ is defined on the probability space $(\Omega, \mathcal{F}, \mathbf{P})$, and let $\mathbf{E}$ denote expectation on this space. \begin{theorem}\label{thm:main spec dim quenched} $\mathbf{P}$-almost surely, $d_S(\L^{\infty}_{\alpha}) = \frac{2\alpha }{\alpha + 1}$. \end{theorem} In light of Theorem \ref{thm:main spec dim quenched}, we call $d_S(\L^{\infty}_{\alpha})$ the \textit{quenched} spectral dimension. We also define the \textit{annealed} spectral dimension as \[ d^a_S(\L^{\infty}_{\alpha}) = \lim_{t \rightarrow \infty} \frac{-2\log( \Eb{p^{\infty}_t(\rho^{\infty}, \rho^{\infty})})}{\log t}. \] For a general space, the annealed heat kernel is trickier to bound than the quenched one defined above, since the expected transition density may not be finite. This is the case, for example, for the trees with heavy-tailed offspring distributions considered in \cite{CroyKumRWGWTreeInfiniteVar}. In the case of stable looptrees however we are able to bound this using the volume and resistance estimates of Section \ref{sctn:vol bounds and spectral dim infinite}, and then utilise scaling invariance of $\L^{\infty}_{\alpha}$ to prove the following (more precise) result. \begin{theorem}\label{thm:main spec dim annealed} We have that \[ d^a_S(\L^{\infty}_{\alpha}) = \frac{2\alpha }{\alpha + 1}. \] Moreover, there exists a constant $c_1 \in (0, \infty)$ such that $\Eb{p^{\infty}_t(\rho^{\infty}, \rho^{\infty})} = c_1 t^{\frac{-\alpha}{\alpha + 1}}$. \end{theorem} Both the quenched and annealed spectral dimensions match those obtained for the infinite discrete looptrees defined from offspring distributions in the domain of attraction of an $\alpha$-stable law in \cite{BjornStef}. The results of this paper and in particular Theorem \ref{thm:LLT} are applied in the paper \cite{ArchBMCompactLooptrees} to prove various limit results for volumes of small balls in compact stable looptrees, and also to obtain limiting heat kernel estimates in the regime $t \downarrow 0$. We refer the reader directly to \cite{ArchBMCompactLooptrees} for more details. Moreover, Richier showed in \cite{RichierIICUIHPT} that the incipient infinite cluster (IIC) of the Uniform Infinite Half-Planar Triangulation has the structure of an infinite discrete looptree, but where each of the loops are filled with independent critically percolated Boltzmann triangulations. The size of the loops of this looptree are given by a distribution in the domain of attraction of a $\frac{3}{2}$-stable law and Theorem \ref{thm:Rich looptree conv} will imply that the boundary of this cluster converges after rescaling to the infinite stable looptree $\L_{3/2}^{\infty}$. The question of the scaling limit of the whole cluster is more subtle but is conjectured to be the $\frac{7}{6}$-stable map \cite[Section 5.4]{BerCurMierPerconTriang}, and we hope the methods used in this article will be a good starting point for studying random walks on the IIC. In particular, we anticipate that such a random walk might fall into a framework similar to the discussions of \cite{AlRuiFreiKigSSG}, in that the looptree forming the boundary of the IIC may play a role somewhat analogous to that of the classical Sierpinski gasket in \cite{AlRuiFreiKigSSG}. If this is the case, then understanding Brownian motion on $\L_{\alpha}$ and $\L^{\infty}_{\alpha}$ is an important preliminary step to understanding the scaling limit of a random walk on the IIC. This paper is organised as follows. In Section \ref{sctn:prelim} we go over some preliminaries on L\'{e}vy processes and stochastic processes associated with resistance forms. In Section \ref{sctn:tree looptree def} we give some background on random trees and looptrees and explain how the stable versions can be coded by L\'{e}vy excursions. In Section \ref{sctn:construction of infinite stable looptrees} we give our construction of $\L^{\infty}_{\alpha}$, which essentially involves replacing the L\'{e}vy excursion used to code a compact looptree by two independent L\'{e}vy processes. In Section \ref{sctn:vol bounds and spectral dim infinite} we prove some precise volume and resistance bounds for $\L^{\infty}_{\alpha}$ by making comparisons with arguments of \cite{ArchBMCompactLooptrees}. We then proceed to prove Theorems \ref{thm:LLT} and \ref{thm:main scaling lim} in Section \ref{sctn:LLT}, and explain how these are applied to study compact stable looptrees in \cite{ArchBMCompactLooptrees}. Finally, we conclude with a study of stochastic processes in Section \ref{sctn:RW consequences}, where we use Theorems \ref{thm:LLT} and \ref{thm:main scaling lim} to prove Theorems \ref{thm:main RW LLT conv} and \ref{thm:RW conv infinite intro}, and also prove Theorems \ref{thm:main spec dim quenched} and \ref{thm:main spec dim annealed}. Throughout this paper, $C, C', c$ and $c'$ will denote constants, bounded above and below, that may change on each appearance. We will use the notation $B^{\infty} (x, r)$ to denote the open ball of radius $r$ around $x$ in $\L^{\infty}_{\alpha}$, and $\bar{B}^{\infty} (x, r)$ its closure. We will instead use the superscript $\l$ to denote the corresponding quantities on a compact looptree conditioned to have mass $\l$. \textbf{Acknowledgements.} I would like to thank my supervisor David Croydon for suggesting the problem and for useful discussions, and two anonymous referees for their helpful comments on the original version of this work. I would also like to thank the Great Britain Sasakawa Foundation for supporting a trip to Kyoto during which some of this work was completed, and Kyoto University for their hospitality during this trip. \section{Preliminaries}\label{sctn:prelim} \subsection{Gromov-Hausdorff-Prohorov topologies} In order to prove convergence results for measured metric spaces such as looptrees we will work in the pointed Gromov-Hausdorff-Prohorov topology. To define this, let $\mathbb{F}$ denote the set of quadruples $(F,R,\mu,\rho)$ such that $(F,R)$ is a boundedly finite Heine-Borel metric space, $\mu$ is a locally finite Borel measure of full support on $F$, and $\rho$ is a distinguished point of $F$, which we call the root. Let $\mathbb{F}^c \subset \mathbb{F}$ denote the subset of spaces where $(F,R)$ is compact. Suppose $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$ are elements of $\mathbb{F}^c$. Given a metric space $(M, d_M)$, and isometric embeddings $\phi, \phi'$ of $(F,R)$ and $(F', R')$ respectively into $(M, d_M)$, we define $d^{GHP}_{M}\big((F,R,\mu,\rho, \phi), (F',R',\mu',\rho', \phi')\big)$ to be equal to \begin{align*}\label{eqn:GHP def} d_M^H(\phi (F), \phi' (F')) + &d_M^P(\mu \circ \phi^{-1}, \mu' \circ {\phi'}^{-1} ) + d_M(\phi (\rho), \phi' (\rho')). \end{align*} Here $d_M^H$ denotes the Hausdorff distance between two sets in $M$, and $d_M^P$ the Prohorov distance between two measures, as defined in \cite[Chapter 1]{BillsleyConv}. The pointed Gromov-Hausdorff-Prohorov distance between $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$ is given by \begin{align} \begin{split} \dGHPp{(F,R,\mu,\rho), (F',R',\mu',\rho')} = \inf_{\phi, \phi', M} d^{GHP}_{M}\big((F,R,\mu,\rho, \phi), (F',R',\mu',\rho', \phi')\big)\end{split} \end{align} where the infimum is taken over all isometric embeddings $\phi, \phi'$ of $(F,R)$ and $(F', R')$ respectively into a common metric space $(M, d_M)$. It is well-known (for example, see \cite[Theorem 2.3]{AbDelHoschNoteGromov}) that this defines a metric on the space of equivalence classes of $\mathbb{F}^c$, where we say that two spaces $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$ are equivalent if there is a measure and root preserving isometry between them. The pointed Gromov-Hausdorff distance $d_{GH}(\cdot, \cdot)$, which is defined by removing the Prohorov term from (\ref{eqn:GHP def}) above, can also be helpfully defined in terms of \textit{correspondences}. A correspondence $\mathcal{R}$ between $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$ is a subset of $F \times F'$ such that for every $x \in F$, there exists $y \in F'$ with $(x,y) \in \mathcal{R}$, and similarly for every $y \in F'$, there exists $x \in F$ with $(x,y) \in \mathcal{R}$. We define the \textit{distortion} of a correspondence by \[ \textsf{dis} (\mathcal{R}) = \sup_{(x,x'), (y, y') \in \mathcal{R}} |R(x,y) - R(x',y')|. \] It is then straightforward to show that \begin{align*} \dGH{(F,R,\mu,\rho), (F',R',\mu',\rho')} = \frac{1}{2} \inf_{\mathcal{R}} \textsf{dis}(\mathcal{R}), \end{align*} \sloppy{where the infimum is taken over all correspondences $\mathcal{R}$ between $(F,R,\mu,\rho)$ and $(F',R',\mu',\rho')$~that contain the point $(\rho, \rho')$.} In this article, we will prove pointed Gromov-Hausdorff-Prohorov convergence by first proving pointed Gromov-Hausdorff convergence using correspondences, and then show Prohorov convergence of the measures on the resulting metric embedding. For non-compact elements of $\mathbb{F}$, we will need a generalised notion of Gromov-Hausdorff-Prohorov convergence. This is provided by the Gromov-Hausdorff vague topology of \cite{AthLohrWinGromovGap}. To define it, suppose that $(F,R,\mu,\rho)$ and $(F_n,R_n,\mu_n,\rho_n)$ for each $n \geq 0$ are elements of $\mathbb{F}\setminus \mathbb{F}^c$. For $r>0$, we let $\mathcal{B}_r(F)$ denote the quadruple $(\bar{B}_F(\rho, r),R|_{\bar{B}_F(\rho, r)},\mu|_{\bar{B}_F(\rho, r)},\rho)$, where $\bar{B}_F(\rho, r)$ denotes the closed ball of radius $r$ around the root $\rho$ in $F$; similarly for $\mathcal{B}_r(F_n)$. Recall that we are restricting to Heine-Borel metric measure spaces of full support, so that weak convergence is metrized by the Prohorov metric. Following \cite[Definition 5.8]{AthLohrWinGromovGap}, we say that $(F_n,R_n,\mu_n,\rho_n)$ converges to $(F,R,\mu,\rho)$ in the Gromov-Hausdorff-vague topology if \[ d_{GHP} \big( \mathcal{B}_r(F_n), \mathcal{B}_r(F) \big) \rightarrow 0 \] for Lebesgue almost every $r>0$. The following proposition will be useful, as it will allow us to apply the Skorohod Representation Theorem later in Sections \ref{sctn:LLT} and \ref{sctn:RW consequences}. \begin{proposition}\cite[Proposition 5.12]{AthLohrWinGromovGap}.\label{thm:GH vague separable HB} The space of Heine-Borel boundedly finite measure spaces equipped with the Gromov-Hausdorff-vague topology is a Polish space. \end{proposition} \subsection{Stochastic processes associated with resistance metrics}\label{sctn:res forms} To study Brownian motion and random walks on metric spaces we will be using the theory of resistance forms and resistance metrics, developed by Kigami in \cite{AOF} and \cite{KigamiResistanceFormsMono}. Let $G = (V,E)$ be a discrete graph equipped with non-negative symmetric edge conductances $c(x,y)_{(x,y) \in E}$ and a measure $(\mu(x))_{x \in V}$. Effective resistance on $G$ is a function $R$ on $V \times V$ defined by \begin{equation}\label{eqn:resistance def variational} R(x,y)^{-1} = \inf \{ \mathcal{E}(f,f)| f: V \rightarrow \mathbb{R}, f(x)=1, f(y)=0 \}, \end{equation} where we take the convention that $\inf \emptyset = \infty$, and $\mathcal{E}(f,f)$ is an energy functional given by \begin{equation*}\label{eqn:energy def} \mathcal{E}(f,g) = \frac{1}{2} \sum_{x, y \in V} c(x,y) (f(y)- f(x))(g(y) - g(x)). \end{equation*} $R(x,y)$ corresponds to the usual physical notion of electrical resistance between $x$ and $y$ in $G$. It can be shown (e.g. see \cite{Tetali}) that $R$ is a metric on $G$, so we call it the \textit{resistance metric} The notion of a resistance metric can be extended to the continuum as follows. \begin{definition}\label{def:eff resistance metric}\cite[Definition 2.3.2]{AOF}. Let $F$ be a set. A function $R : F \times F$ is a \textit{resistance metric} on $F$ if and only if for every finite subset $V \subset F$, there exists a weighted graph with vertex set $V$ such that $R|_{V \times V}$ is the effective resistance on $V$, i.e. is given by (\ref{eqn:resistance def variational}). \end{definition} A resistance metric on a set $F$ can be naturally associated with a stochastic process on $F$ via the theory of resistance forms. Roughly speaking, a resistance form is a pair $(\mathcal{E}, \mathcal{F})$ where $\mathcal{E}$ is an energy functional as above, and $\mathcal{F}$ is a subspace of real-valued functions on $F$ with finite energy (additionally it must satisfy the so-called Markov property, see \cite[Definition 3.1]{KigamiResistanceFormsMono}). \begin{definition}(\cite[Definition 6.2]{KigamiResistanceFormsMono}).\label{def:reg res form} A resistance form $(\mathcal{E}, \mathcal{F})$ is \textit{regular} if $\mathcal{F} \cup C_0(F)$ is dense in $C_0(F)$ with respect to the supremum norm, where $C_0(F)$ represents the space of continuous functions on $F$ with compact support. \end{definition} By \cite[Theorems 2.3.4 and 2.3.6]{AOF}, there is a one-to-one correspondence between resistance metrics and resistance forms on $F$, given analogously to (\ref{eqn:resistance def variational}). Moreover, if the corresponding resistance form is regular, then it induces a regular Dirichlet form on the space $L^2(F, \mu)$, which in turn is naturally associated with a Hunt process on $F$ as a consequence of \cite[Theorem 7.2.1]{FOT}. This is automatically the case when $(F,R)$ is a compact resistance metric space endowed with a finite Borel measure $\mu$ of full support, for example, but in the case of infinite looptrees we will have to put some extra work into proving that the resistance form associated with $\L^{\infty}_{\alpha}$ is regular. This is done in Proposition \ref{prop:regular DF}. We have tried to keep background on resistance forms and Dirichlet forms to a minimum in this article, but see \cite{KigamiResistanceFormsMono} for more on this. The key point is that, under appropriate regularity conditions on the underlying space (which will always be fulfilled in this paper), there is a one-to-one correspondence between resistance metrics and stochastic processes. The reader should feel free to skip the proof of Proposition \ref{prop:regular DF}, which proves the required regularity in our setting, and merely use this correspondence as a black box throughout the rest of this article. This correspondence allows us to use results about scaling limits of measured resistance metric spaces to prove results about scaling limits of stochastic processes as detailed in the following result of \cite{DavidResForms}. Before stating it, we note that the notion of effective resistance between points given in (\ref{eqn:resistance def variational}) can be extended to that of effective resistance between two sets $A, B \subset F$ by setting \begin{equation*} R(A,B)^{-1} = \inf \{ \mathcal{E}(f,f)| f: F \rightarrow \mathbb{R}, f(x)=1 \ \forall \ x \in A, f(y)=0 \ \forall \ y \in B \}. \end{equation*} \begin{theorem}\cite[Theorem 1.2]{DavidResForms}.\label{thm:scaling lim RW resistance} Suppose that $(F_n, R_n, \mu_n, \rho_n)_{n \geq 0}$ is a sequence in $\mathbb{F}$ such that \[ (F_n, R_n, \mu_n, \rho_n) \rightarrow (F, R, \mu, \rho) \] Gromov-Hausdorff-vaguely for some $(F, R, \mu, \rho) \in \mathbb{F}$, and $R, (R_n)_{n \geq 1}$ are resistance metrics on the respective spaces. Assume further that \begin{equation}\label{eqn:nonexplosion} \lim_{r \rightarrow \infty} \liminf_{n \rightarrow \infty} R_n (\rho_n, B_n (\rho_n, r)^c) = \infty. \end{equation} Let $(Y_t^n)_{t \geq 0}$ and $(Y_t)_{t \geq 0}$ be the stochastic processes respectively associated with $(F_n, R_n, \mu_n, \rho_n)$ and $(F, R, \mu, \rho)$ as described above. Then it is possible to isometrically embed $(F_n, R_n)_{n \geq 1}$ and $(F,R)$ into a common metric space $(M, d_M)$ so that \[ \prnstart{(Y_t^n)_{t \geq 0} \in \cdot}{\rho_n}{n} \rightarrow \prstart{(Y_t)_{t \geq 0} \in \cdot}{\rho} \] weakly as probability measures as $n \rightarrow \infty$ on the space $D(\mathbb{R}_+, M)$ equipped with the Skorohod $J_1$-topology. \end{theorem} For more on the Skorohod-$J_1$ topology, see \cite[Chapter 3]{BillsleyConv}. The intuition behind the result above is that the convergence of metrics and measures respectively give the appropriate spatial and temporal convergences of the stochastic processes. We will apply it several times in this paper to take limits of stochastic processes on looptrees. By isometrically embedding into the universal Urysohn space $(U, d_U)$, we can get similar results in the annealed setting. This is quite abstract, and we do not give a full background on the Urysohn space, but instead recall that it is a Polish space with the property that any separable metric space can be isometrically embedded into $U$. Moreover, it has a distinguished point $u_0$ and in the case of trees and looptrees we can always assume that the root is mapped to this canonical point. These are the only two properties of $U$ that we will use in this article, but its existence and further properties are discussed in \cite{HuvekUrysohn}. Suppose that $(F_n, R_n, \mu_n, \rho_n, \psi_n)_{n \geq 0}$ is a sequence such that $(F_n, R_n, \mu_n, \rho_n)_{n \geq 0} \in \mathbb{F}$ and $\psi_n$ is an isometric embedding of $(F_n, R_n, \mu_n, \rho_n)_{n \geq 0}$ into $U$ for all $n$. Similarly for $(F, R, \mu, \rho, \psi)$. For the purposes of this paper, if $(F,R,\mu,\rho,\psi)$ is compact we will say that $(F_n, R_n, \mu_n, \rho_n, \psi_n) \rightarrow (F, R, \mu, \rho, \psi)$ in the spatial Gromov-Hausdorff topology if \[ d_U^{sp} \big( (F, R, \mu, \rho, \psi), (F_n, R_n, \mu_n, \rho_n, \psi_n)\big) \rightarrow 0 \] as $n \rightarrow \infty$, where $d_U^{sp} \big( (F, R, \mu, \rho, \psi), (F_n, R_n, \mu_n, \rho_n, \psi_n)\big)$ is defined to be equal to \begin{align}\label{eqn:spat U dist} d_U^H(\psi (F), \psi_n (F_n)) + d_U^P(\mu \circ \psi^{-1}, \mu_n \circ {\psi_n}^{-1} ) + d_U(\psi (\rho), \psi_n (\rho_n)). \end{align} In the non-compact case, we will say that $(F_n, R_n, \mu_n, \rho_n, \phi_n) \rightarrow (F, R, \mu, \rho, \phi)$ in the spatial Gromov-Hausdorff vague topology if the closed balls of radius $r$ along with their appropriate restrictions converge for Lebesgue-almost every $r>0$. This definition is a special case of the spatial Gromov-Hausdorff vague topology used in \cite[Section 7]{DavidResForms}, and it follows from the results there that $d_U^{sp}$ is a metric and induces a separable topology on the space of elements of $\mathbb{F}$ isometrically embedded into $U$. The definition can be made more general (and is more meaningful) in the case when we embed non-isometrically into a space other than $U$. In fact the point of restricting to $U$ above is that, in our setting, Gromov-Hausdorff-Prohorov convergence will automatically imply existence of isometries givingconvergence in the spatial topology introduced above, and that $U$ therefore provides a metric space on which we can consider the annealed law for random walks, defined as follows. Given a sequence of random spaces $(F_n, R_n, \mu_n, \rho_n, \phi_n)_{n \geq 0}$ such that $(F_n, R_n, \mu_n, \rho_n) \in \mathbb{F}$ for all $n$ and $\phi_n: F_n \rightarrow U$ is an isometric embedding, we define the annealed law of the corresponding stochastic process by \[ \prtilnstart{\phi_n(Y_t^n)_{t \geq 0} \in \cdot}{\phi_n(\rho_n)}{n} = \int \prnstart{\phi_n(Y_t^n)_{t \geq 0} \in \cdot}{\phi_n(\rho_n)}{n} d\mathbf{P}^n, \] i.e. as the law of the stochastic process averaged over realisations of the underlying random metric space. (We define this analogously when there is no dependence on $n$). \begin{theorem}\cite[Theorem 7.2]{DavidResForms}.\label{thm:scaling lim RW resistance annealed} Suppose that $(F_n, R_n, \mu_n, \rho_n, \phi_n)_{n \geq 0}$ is a sequence such that \[ (F_n, R_n, \mu_n, \rho_n, \phi_n) \overset{(d)}{\rightarrow} (F, R, \mu, \rho, \phi) \] in the spatial Gromov-Hausdorff-vague topology, and $R, (R_n)_{n \geq 1}$ are resistance metrics on the respective spaces. Assume further that \begin{equation}\label{eqn:nonexplosion annealed} \lim_{r \rightarrow \infty} \liminf_{n \rightarrow \infty} \pr{R_n (\rho_n, B_n (\rho_n, r)^c) \geq \lambda} = 1 \end{equation} for all $\lambda > 0$. Let $(Y_t^n)_{t \geq 0}$ and $(Y_t)_{t \geq 0}$ be the stochastic processes respectively associated with $(F_n, R_n, \mu_n, \rho_n)$ and $(F, R, \mu, \rho)$ as described above. Then \[ \prtilnstart{\phi_n(Y_t^n)_{t \geq 0} \in \cdot}{\rho_n}{n} \rightarrow \prtilstart{\phi(Y_t)_{t \geq 0} \in \cdot}{\rho} \] weakly as probability measures as $n \rightarrow \infty$ on the space $D(\mathbb{R}_+, U)$ equipped with the Skorohod $J_1$-topology. \end{theorem} \subsection{Stable L\'{e}vy excursions}\label{sctn:Levy background} Following the presentations of \cite{DuqContourLimit} and \cite{RSLTCurKort}, we now introduce stable L\'{e}vy excursions, which will be used to code stable trees and looptrees in Section \ref{sctn:tree looptree def}. Given intervals $I,J \subset \mathbb{R}$, we first recall that $D(I, J)$ represents the space of c\`{a}dl\`{a}g functions from $I$ to $J$. For an interval $[0, \l] \subset \mathbb{R}$, we also define the c\`{a}dl\`{a}g excursion space $D^{\text{exc}}([0,\l], \mathbb{R}^{\geq 0})$ by \[ D^{\text{exc}}([0,\l], \mathbb{R}^{\geq 0}) = \{ e \in D([0,\l], \mathbb{R}^{\geq 0}): e(0)=e(\l)=0, e(t) > 0 \text{ for all } t \in (0, \l) \}. \] Throughout this article, we take $\alpha \in (1,2)$, and $X$ will be an $\alpha$-stable spectrally positive L\'{e}vy process as in \cite[Section VIII]{BertoinLevy}, normalised so that \[ \E{e^{-\lambda X_t}} = e^{-{\lambda}^{\alpha}t} \] for all $\lambda > 0$. $X$ takes values in the space $D([0, \infty), \mathbb{R})$ of c\`{a}dl\`{a}g functions, which we endow with the Skorohod-$J_1$ topology, and satisfies the scaling property that for any constant $c>0$, $(c^{-\frac{1}{\alpha}} X_{ct})_{t \geq 0}$ has the same law as $(X_t)_{t \geq 0}$. Moreover $X$ has L\'{e}vy measure \[ \Pi(dx) = \frac{\alpha(\alpha - 1)}{\Gamma(2-\alpha)} x^{-\alpha - 1} \mathbb{1}_{(0, \infty)}(x) dx. \] To define a normalised excursion of $X$, we follow \cite{Chaumont} and let $\underline{X}_t = \inf_{s \in [0,t]} X_s$ denote its running infimum process, and set \begin{align*} g_1 = \sup \{ s \leq 1: X_s = \underline{X}_s \}, \hspace{10mm} d_1 = \inf \{ s > 1: X_s = \underline{X}_s \}. \end{align*} Note that $X_{g_1} = X_{d_1}$ almost surely, since $X$ is spectrally positive. As in \cite[Proposition 1]{Chaumont}, we define the normalised excursion $X^{\text{exc}}$ of $X$ above its infimum at time $1$ by \[ X_s^{\text{exc}} = (d_1 - g_1)^{\frac{-1}{\alpha}} (X_{g_1 + s(d_1 - g_1)} - X_{g_1}) \] for every $s \in [0,1]$. Note that $X^{\text{exc}}$ is almost surely an $\alpha$-stable c\`{a}dl\`{a}g function on $[0,1]$ with $X^{\text{exc}}(s)>0$ for all $s \in (0,1)$, and $X_0^{\text{exc}}=X_1^{\text{exc}}=0$. \subsubsection{It\^o excursion measure}\label{sctn:Ito exc} We can alternatively define $X^{\text{exc}}$ using the {It\^o excursion measure}. For full details, see \cite[Chapter IV]{BertoinLevy}, but the measure is defined by applying excursion theory to the process $X - \underline{X}$, which is strongly Markov and for which the point $0$ is regular for itself. We normalise local time so that $-\underline{X}$ denotes the local time of $X - \underline{X}$ at its infimum, and let $(g_j, d_j)_{j \in \mathcal{I}}$ denote the excursion intervals of $X - \underline{X}$ away from zero. For each $i \in \mathcal{I}$, the process $(e^i)_{0 \leq s \leq d_i-g_i}$ defined by $e^i(s) = X_{g_i + s} - X_{g_i}$ is an element of the excursion space \[ E = \bigcup_{\l > 0} D^{\text{exc}}([0,\l], \mathbb{R}^{\geq 0}). \] We let $\zeta (e) = \sup \{s>0: e(s)>0\}$ denote the \textit{lifetime} of the excursion $e$. It was shown in \cite{ItoPP} that the measure \[ N(dt, de) = \sum_{i \in \mathcal{I}} \delta (-\underline{X}_{g_i}, e^i) \] is a Poisson point measure of intensity $dt N(de)$, where $N$ is a $\sigma$-finite measure on the set $E$ known as the \textit{It\^o excursion measure}. Moreover, the measure $N(\cdot)$ inherits a scaling property from the $\alpha$-stability of $X$. Indeed, for any $\lambda > 0$ we define a mapping $\Phi_{\lambda}: E \rightarrow E$ by $\Phi_{\lambda}(e)(t) = \lambda^{\frac{1}{\alpha}} e(\frac{t}{\lambda})$, so that $N \circ \Phi_{\lambda}^{-1} = \lambda^{\frac{1}{\alpha}} N$ (e.g. see \cite{WataIto}). It then follows from the results in \cite[Section IV.4]{BertoinLevy} that we can uniquely define a set of conditional measures $(N_{(s)}, s>0)$ on $E$ such that: \begin{enumerate}[(i)] \item For every $s > 0$, $N_{(s)}( \zeta=s)=1$. \item For every $\lambda > 0$ and every $s>0$, $\Phi_{\lambda}(N_{(s)}) = N_{(\lambda s)}$. \item For every measurable $A \subset E$ \[ N(A) = \int_0^{\infty} \frac{N_{(s)}(A)}{\alpha \Gamma(1 - \frac{1}{\alpha}) s^{\frac{1}{\alpha}+1}} ds. \] \end{enumerate} $N_{(s)}$ is therefore used to denote the law $N( \cdot | \zeta = s)$. The probability distribution $N_{(1)}$ coincides with the law of $X^{\text{exc}}$ as constructed above. \subsubsection{Relation between $X$ and $X^{\text{exc}}$} It is easier to analyse an unconditioned L\'{e}vy process rather than an excursion, so throughout this paper we will use the following two tools to compare the probability of an event defined in terms of $X^{\text{exc}}$ to that of the same event defined in terms of $X$. The first tool is the Vervaat transform of the following proposition, which allows us to compare to a stable bridge $X^{\text{br}}$ as an intermediate step. This is particularly useful as we will at times consider our looptrees to be rooted at a uniform point. \begin{theorem}\cite[Th\'eor\`eme 4]{Chaumont}. Vervaat Transform.\label{thm:Vervaat} \begin{enumerate} \item Let $X^{\text{exc}}$ be as above, and take $U \sim$ \textsf{Uniform}$([0,1])$. Then the process $(X^{\text{br}}_t)_{0 \leq t \leq 1}$ defined by \[ X^{\text{br}}_t = \begin{cases} X^{\text{exc}}_{U+t} & \text{ if } U+t \leq 1,\\ X^{\text{exc}}_{U+t-1} & \text{ if } U+t > 1. \end{cases} \] has the law of a spectrally positive stable L\'{e}vy bridge on $[0,1]$. \item Now let $X^{\text{br}}$ be a spectrally positive stable L\'{e}vy bridge on $[0,1]$, and let $m$ be the (almost surely unique) time at which it attains its minimum. Define an excursion $X^{\text{exc}}$ by \[ X^{\text{exc}}_t = \begin{cases} X^{\text{br}}_{m+t} & \text{ if } m+t \leq 1,\\ X^{\text{br}}_{m+t-1} & \text{ if } m+t > 1. \end{cases} \] Then $X^{\text{exc}}$ has the law of a spectrally positive stable L\'{e}vy excursion. \end{enumerate} \end{theorem} An event defined for the stable bridge on the interval $[0,T]$ can then be transferred to the unconditioned process using the fact that the law of the bridge is absolutely continuous with respect to the law of the process, with Radon-Nikodym derivative \begin{equation}\label{eqn:RN deriv levy bridge} \frac{p_{1-{T}}(-X_{T})}{p_{1}(0)} \end{equation} for $T \in (0,1)$ (see \cite[Section VIII.3, Equation (8)]{BertoinLevy}). Here the transition density $p_t(\cdot, \cdot)$ for the L\'{e}vy process $X$ is defined analogously to that in (\ref{eqn:trans dens def}), but with respect to Lebesgue measure on the real line. We note here that $||p_1||_{\infty} < \infty$ for all $\alpha \in (1,2)$ since $p_1(\cdot)$ is continuous and vanishes at infinity (e.g. see \cite[Section VIII.1]{BertoinLevy}). \subsubsection{Descents}\label{sctn:Useful results} Next, we introduce the notion of a descent of a L\'{e}vy process, following the presentation of \cite[Section 3.1.3]{RSLTCurKort}. Let $X^1$ and $X^2$ be two independent spectrally positive $\alpha$-stable L\'{e}vy processes as defined above, and define a two-sided process $X$ by setting \[ X_t = \begin{cases} X^1_t & \text{ if } t \geq 0 \\ -X^2_{-t^-} & \text{ if } t < 0. \end{cases} \] For every $s, t \in \mathbb{R}$, we write $s \preceq t$ if and only if $s \leq t$ and $X_{s^-} \leq \inf_{[s,t]}X$, and in this case we set \begin{align*} \Delta X_s = X_s - X_{s^-}, \hspace{2mm} x_s^t(X) = \inf_{[s,t]}X - X_{s^-}, \text{ and } u_s^t(X) = \frac{x_s^t(X)}{\Delta X_s}. \end{align*} We write $s \prec t$ if $s \preceq t$ and $s \neq t$. As in \cite{RSLTCurKort}, for any $t \in \mathbb{R}$, we will call the collection $\{x_s^t(X), u_s^t(X): s \preceq t \}$ the \textit{descent} of $t$ in $X$. The next proposition describes the law of descents from a typical point of $X$, and will be useful in the proofs of the limit theorems. We let $\overline{X}_t = \sup\{X_s: 0 \leq s \leq t\}$ denote the running supremum process of $X$. The process $\overline{X} - X$ is strong Markov and $0$ is regular for itself, allowing the use of excursion theory. Let $(L_t)_{t \geq 0}$ denote the local time of $\overline{X} - X$ at 0. Note that, by \cite[Chapter VIII, Lemma 1]{BertoinLevy}, $L^{-1}$ is a $(1 - \frac{1}{\alpha})$-stable subordinator, and $( \overline{X}_{L^{-1}(t)})_{t \geq 0}$ is an $(\alpha - 1)$-stable subordinator, so we can normalise local time so that $\E{\exp (-\lambda \overline{X}_{L^{-1}(t)}} = \exp (-t\lambda^{\alpha - 1})$ for all $\lambda > 0$. Finally, if $\overline{X}_s > \overline{X}_{s^{-}}$, set \begin{align*} x_s = \overline{X}_s - \overline{X}_{s^{-}}, \hspace{10mm} u_s = \frac{\overline{X}_s - \overline{X}_{s^{-}}}{\overline{X}_s - {X}_{s^{-}}}. \end{align*} \begin{proposition}(\cite[Proposition 3.1]{RSLTCurKort}, \cite[Corollary 1]{BertoinPitmanExt}).\label{prop:descent PP} Let $X$ be a two-sided spectrally positive $\alpha$-stable process as above. Then \begin{enumerate}[(i)] \item \begin{align*} \{(-s, x_s^0(X), u_s^0(X)): s \preceq 0 \} \overset{(d)}{=} \{s,x_s, u_s: s \geq 0 \text{ such that } \overline{X}_s > \overline{X}_{s^-} \}. \end{align*} \item The point measure \begin{align*} \sum_{\overline{X}_s > \overline{X}_{s^-}} \delta \big(L_s, \frac{x_s}{u_s}, u_s \big) \end{align*} is a Poisson point measure with intensity $dl \cdot x\Pi(dx) \cdot \mathbb{1}_{[0,1]}(u) du$. \end{enumerate} \end{proposition} We also give a technical lemma which will be used at various points in the paper. This appeared previously in \cite[Section 3.3.1]{RSLTCurKort} and uses an argument from \cite{BertoinLevy}. The final claim follows by bounded convergence. First recall that for a function $f: [0, \infty) \rightarrow \mathbb{R}$ and $[a,b] \subset [0, \infty)$, we define \[ \textsf{Osc}_{[a,b]} f := \sup_{s, t \in [a,b]} |f(t) - f(s)|. \] \begin{lemma}\label{lem:osc} Let $\mathcal{E}$ be an exponential random variable with parameter $1$, and let $X$ be a spectrally positive $\alpha$-stable L\'{e}vy process conditioned to have no jumps of size greater than $1$ on $[0, \mathcal{E}]$. Let $\tilde{\textsf{Osc}} = \textsf{Osc}_{[0, \mathcal{E}]} X$. Then there exists $\theta > 0$ such that $\E{e^{\theta \tilde{\textsf{Osc}}}} < \infty$. Moreover, $\E{e^{\theta \tilde{\textsf{Osc}}}} \downarrow 1$ as $\theta \downarrow 0$. \end{lemma} \begin{remark}\label{rmk:osc deterministic} The same results holds if $\mathcal{E}$ is set to be deterministically equal to $1$ rather than an exponential random variable. The proof is almost identical to the proof of the result above, with one minor modification \end{remark} \section{Background on stable trees and looptrees}\label{sctn:tree looptree def} \subsection{Discrete Trees}\label{sctn:trees background discrete} Before defining stable trees and looptrees, we briefly recap some notation for discrete trees, following the formalism of \cite{Neveu}. Firstly, let \[ \mathcal{U}=\bigcup_{n=0}^{\infty} {\mathbb{N}}^n \] be the Ulam-Harris tree. By convention, ${\mathbb{N}}^0=\{ \emptyset \}$. If $u=(u_1, \ldots, u_n)$ and $v=(v_1, \ldots, v_m) \in \mathcal{U}$, we let $uv= (u_1, \ldots, u_n, v_1, \ldots, v_m)$ be the concatenation of $u$ and $v$. \begin{definition} A plane tree $T$ is a finite subset of $\mathcal{U}$ such that \begin{enumerate}[(i)] \item $\emptyset \in T$, \item If $v \in T$ and $v=uj$ for some $j \in \mathbb{N}$, then $u \in T$, \item For every $u \in T$, there exists a number $k_u(T) \geq 0$ such that $uj \in T$ if and only if $1 \leq j \leq k_u(T)$. \end{enumerate} \end{definition} We let $\mathbb{T}$ denote the set of all plane trees. A plane tree $T \in \mathbb{T}$ with $n+1$ vertices labelled according to the lexicographical order as $u_0, u_1, \ldots, u_n$ can be coded by its \textit{height function}, \textit{contour function}, or \textit{Lukasiewicz path}, defined as follows. \begin{itemize} \item The height function $(H^{T}_i)_{0 \leq i \leq n}$ is defined by considering the vertices $u_0, u_1, \ldots, u_n$ in lexicographical order, and then setting $H^{T}_i$ to be the generation of vertex $u_i$. \item The contour function $(C^{T}_t)_{0 \leq t \leq 2n}$ is defined by considering a particle that starts at the root $\emptyset$ at time zero, and then continuously traverses the boundary of ${T}$ at speed one, respecting the lexicographical order where possible, until returning to the root. $C^{T}(t)$ is equal to the height of the particle at time $t$. \item The Lukasiewicz path $(W^{T}_m)_{0 \leq m \leq n}$ is defined by setting $W^{T}_0 = 0$, then by considering the vertices $u_0, u_1, \ldots, u_n$ in lexicographical order and setting $W^T_{m+1} = W^T_m + k_{u_m}(T)-1$. \end{itemize} These are illustrated in Figure \ref{fig:contourheightfns}, together with points corresponding to specific vertices in the tree, and the part of each excursion coding the subtree rooted at the red vertex, which we denote by $\theta_1(T)$. For further details, see \cite[Section 0.1]{LeGDuqMono}. \begin{figure}[h] \includegraphics[width=15cm, height=5.6cm]{contourheight1} \centering \caption{Example of contour function, height function and Lukasiewicz path for the given tree.}\label{fig:contourheightfns} \end{figure} These functions all uniquely define the tree $T$. This can be written particularly conveniently in the case of the contour function, since for any $s, t \in \{0, \ldots, 2(n-1)\}$, we can write the tree distance as a function on $\{0, \ldots, 2(n-1)\} \times \{0, \ldots, 2(n-1)\}$ by setting \[ d^T(s,t) = C^T(s) + C^T(t) - 2\inf_{s \leq r \leq t} C^T(r). \] We will work mainly with the Lukasiewicz path $(W^{T}_m)_{0 \leq m \leq n}$ in this paper. It is not too hard to see that $W^{T}_m \geq 0$ for all $0 \leq m \leq n-1$, and $W^T_n = -1$. Moreover, the height function can be defined as a function of the Lukasiewicz path (see \cite[Equation (1)]{LeGDuqMono}) by setting \begin{equation}\label{eqn:height Luk def} H^T(m) = \Big|\Big\{ k \in \{0, 1, \ldots, m-1\}: W^T_k = \inf_{k \leq l \leq m} W^T_l \Big\}\Big|. \end{equation} \subsubsection{Multi-type Galton-Watson trees}\label{sctn:GW multi} We will consider scaling limits of looptrees defined from both one and two-type Galton-Watson trees in Section \ref{sctn:LLT}. Accordingly, let $\xi, \xi_{\circ}$ and $\xi_{\bullet}$ be probability distributions on $\mathbb{Z}^{\geq 0}$. \begin{definition} A Galton-Watson tree with offspring distribution $\xi$ is a random plane tree $\mathcal{T}$ with law $\mathbb{P}_{\xi}$ satisfying the following properties. \begin{enumerate}[(i)] \item $\prstart{k_{\emptyset}=j}{\xi}=\xi(j)$ for all $j \in \mathbb{Z}^{\geq 0}$, \item For every $j \geq 1$ with $\xi(j)>0$, the shifted trees $\theta_1(\mathcal{T}), \ldots, \theta_j(\mathcal{T})$ are independent under the conditional probability $\prcond{\cdot}{k_{\emptyset}=j}{\xi}$, with law $\mathbb{P}_{\xi}$, where $\theta_i(\mathcal{T}) = \{v \in \mathcal{U}: iv \in \mathcal{T} \}$. \end{enumerate} \end{definition} We say that $\mathcal{T}$ is \textit{critical} if $\E{\xi}=1$. Additionally, we say a random plane tree is an alternating two-type Galton-Watson tree with offspring distribution $(\xi_{\circ}, \xi_{\bullet})$ if all vertices at even (respectively odd) height have offspring distribution $\xi_{\circ}$ (respectively $\xi_{\bullet}$). We say that the tree is \textit{critical} if $\E{\xi_{\circ}}\E{\xi_{\bullet}}=1$. \subsection{Stable trees} We now introduce stable trees. These are closely related to stable looptrees, and were introduced by Le Gall and Le Jan in \cite{LeGLeJanExploration} then further developed by Duquesne and Le Gall in \cite{LeGDuqMono,DuqLeGPFALT}. For $\alpha \in (1,2)$ we define the stable tree $\T_{\alpha}$ from a spectrally positive $\alpha$-stable L\'{e}vy excursion, which plays the role of the Lukasiewicz path introduced above. By analogy with (\ref{eqn:height Luk def}), given such an excursion $X^{\text{exc}}$, we define the height function $H^{\text{exc}}$ to be the continuous modification of the process satisfying \begin{equation*}\label{eqn:height def} H^{\text{exc}}(t) = \lim_{\epsilon \rightarrow 0} \frac{1}{\epsilon} \int_0^t \mathbb{1} \{X^{\text{exc}}_s < I_s^t + \epsilon \} ds, \end{equation*} where $I_s^t = \inf_{r \in [s,t]} X^{\text{exc}}_r$ for $s \leq t$, and the limit exists in probability (e.g. see \cite[Lemma 1.1.3]{LeGDuqMono}). We define a distance function on $[0,1]$ by \[ d(s,t) = H^{\text{exc}}(s) + H^{\text{exc}}(t) - 2 \inf_{s \leq r \leq t} H^{\text{exc}}(r), \] and an equivalence relation on $[0,1]$ by setting $s \sim t$ if and only if $d(s,t) = 0$. $\mathcal{T}_{\alpha}$ is the quotient space $([0,1]/ \sim, d)$, and we let $\pi$ denote the canonical projection from $[0,1]$ to $\T_{\alpha}$. If $u, v \in \T_{\alpha}$, we let $[[u,v]]$ denote the unique geodesic between $u$ and $v$ in $\T_{\alpha}$. This construction also provides a natural way to define a measure $\mu$ on $\mathcal{T}_{\alpha}$ as the image of Lebesgue measure on $[0,1]$ under the quotient operation. Stable trees arise naturally as scaling limits of discrete plane trees with appropriate offspring distributions. More specifically, let $T_n$ be a discrete tree conditioned to have $n$ vertices and with critical offspring distribution $\xi$ in the domain of attraction of an $\alpha$-stable law, and such that $\xi$ is aperiodic. It is shown in \cite[Theorem 3.1]{DuqContourLimit} that \begin{equation}\label{eqn:stable tree scaling limit def} a_n n^{-1} T_n \rightarrow \mathcal{T}_{\alpha} \end{equation} in the Gromov-Hausdorff topology as $n \rightarrow \infty$, where $a_n$ is as defined in (\ref{eqn:dom of att def}). \subsection{Random looptrees}\label{sctn:looptree def} Discrete looptrees are best described by Figure \ref{fig:disc looptree intro} in the introduction. Moreover, as outlined there, stable looptrees can be defined as scaling limits of their discrete counterparts. That is, if $T_n$ is a Galton Watson tree conditioned to have $n$ vertices with critical offspring distribution $\xi$ in the domain of attraction of an $\alpha$-stable law, then \[ a_n^{-1} {\textsf{Loop}}(T_n) \overset{(d)}{\rightarrow} \L_{\alpha} \] with respect to the Gromov-Hausdorff topology as $n \rightarrow \infty$ \cite[Theorem 4.1]{RSLTCurKort}, where again in the case that $\xi([n, \infty)) \sim cn^{-\alpha}$, we can take $a_n = (c |\Gamma(-\alpha)|n)^{\frac{1}{\alpha}}$. By comparison with (\ref{eqn:stable tree scaling limit def}), $\L_{\alpha}$ can therefore be thought of as the looptree version of the L\'{e}vy tree $\mathcal{T}_{\alpha}$. We now explain how this intuition can be used to code $\L_{\alpha}$ from a stable L\'{e}vy excursion, in such a way that $\L_{\alpha}$ can be heuristically obtained from the corresponding stable tree $\mathcal{T}_{\alpha}$ by replacing each branch point by a loop with length proportional to the size of the branch point, gluing these loops together along the tree structure of $\mathcal{T}_{\alpha}$, and then taking the closure of the resulting metric space. The following construction was introduced in \cite[Section 2.3]{RSLTCurKort}. The L\'{e}vy excursion itself plays the role of a continuum Lukasiewicz path. It was shown in \cite[Proposition 2]{MiermontSplittingNodes} that if we define the width of a branch point in $\mathcal{T}_{\alpha}$, coded by a jump at $t \in [0,1]$ of size $\Delta_t$, by \[ \lim_{\epsilon \downarrow 0} \frac{1}{\epsilon} \mu (\{v \in \T_{\alpha}, d(\pi(t), v) \leq \epsilon\}), \] then the limit almost surely exists and is equal to $\Delta_t$. It is therefore natural that a jump of size $\Delta$ in $X^{\text{exc}}$ should code a loop of length $\Delta$ in $\L_{\alpha}$. Accordingly, using the notation of Section \ref{sctn:Useful results}, for every $t \in [0,1]$ with $\Delta_t > 0$, the authors in \cite[Section 2.3]{RSLTCurKort} equip the segment $[0, \Delta_t]$ with the pseudodistance \begin{equation}\label{eqn:delta def} \delta_t(a,b) = \min \{|a-b|,(\Delta_t - |a-b|) \}, \ \ \ \ \ \ \ \ \ \text{for} \ a, b \in [0, \Delta_t], \end{equation} and define a distance function on $[0,1]$ by first setting \begin{equation*} d_0(s,t) = \sum_{s \prec u \preceq t} \delta_u(0, x_u^t) \end{equation*} whenever $s \preceq t$, and \begin{equation} \label{eqn:d} d(s,t) = \delta_{s \wedge t}(x_{s \wedge t}^s,x_{s \wedge t}^t) + d_0(s \wedge t, s) + d_0(s \wedge t, t) \end{equation} for arbitrary $s, t \in [0,1]$. They show that $d$ as defined above is almost surely a continuous pseudodistance on $[0,1]$, and define an equivalence relation $\sim$ on $[0, 1]$ by setting $s \sim t$ if $d(s,t)=0$. They then define the stable looptree $\L_{\alpha}$ as the quotient space \[ \mathcal{L}_{\alpha} = ([0,1]/ \sim, d) \] in \cite[Definition 2.3]{RSLTCurKort}. We let $p:[0,1] \rightarrow \L_{\alpha}$ denote the canonical projection under the quotient operation, and let $\nu$ denote the image of Lebesgue measure on $[0,1]$ under $p$. $\nu$ therefore denotes the natural analogue of uniform measure on $\L_{\alpha}$. In \cite{ArchBMCompactLooptrees}, we also define a resistance metric $R$ on stable looptrees. By analogy with the construction above, this is done by first replacing $\delta_t$ with the quantity $r_t$ defined by \begin{equation}\label{eqn:r def} r_t(a,b) = {\Big( \frac{1}{|a-b|}+\frac{1}{\Delta_t - |a-b|} \Big) }^{-1}= \frac{|a-b|(\Delta_t - |a-b|)}{\Delta_t}, \ \ \ \ \ \ \ \ \ \text{for} \ a, b \in [0, \Delta_t]. \end{equation} Note that this corresponds to the effective resistance across two parallel edges of lengths $|a-b|$ and $\Delta_t - |a-b|$. For $s, t \in [0,1]$ with $s \preceq t$, we then set \begin{equation}\label{eqn:R0} R_0(s,t) = \sum_{s \prec u \preceq t} r_u(0, x_u^t). \end{equation} For arbitrary $s, t \in [0,1]$, we set \begin{equation} \label{eqn:R} R(s,t) = r_{s \wedge t}(x_{s \wedge t}^s,x_{s \wedge t}^t) + R_0(s \wedge t, s) + R_0(s \wedge t, t). \end{equation} We show in \cite[Proposition 4.4]{ArchBMCompactLooptrees} that $R$ defined in this way is a resistance metric on $\L_{\alpha}$ in the sense of Definition \ref{def:eff resistance metric}. Moreover, in \cite[Lemma 4.1]{ArchBMCompactLooptrees} we show that for any $s,t \in [0,1]$, we have that $\frac{1}{2}d(s,t) \leq R(s,t) \leq d(s,t)$, and define the resistance looptree $\L_{\alpha}^R$ (which we will often denote $(\L_{\alpha}, R)$) as \[ \mathcal{L}^R_{\alpha} = ([0,1]/ \sim, R). \] As a consequence, we also show in \cite[Corollary 4.2]{ArchBMCompactLooptrees} that the looptrees $(\L_{\alpha}, d)$ and $(\L_{\alpha}, R)$ are homeomorphic. The construction above is such that a jump of size $\Delta$ corresponds naturally to a cycle of length $\Delta$ in $\L_{\alpha}$, which we will call a ``loop". A key result of \cite{RSLTCurKort} is a Gromov-Hausdorff invariance principle. We extended the result to include convergence of measures in \cite[Proposition 4.6]{ArchBMCompactLooptrees}. Moreover, the Gromov-Hausdorff convergence of \cite[Theorem 4.1]{RSLTCurKort} was originally stated with the geodesic metric $d$ in place of the resistance metric $R$, but equally holds for $R$. This results in the following proposition. \begin{proposition}(cf \cite[Theorem 4.1]{RSLTCurKort}, \cite[Proposition 4.6]{ArchBMCompactLooptrees}).\label{thm:compact disc inv princ res} Let $(\tau_n)_{n=1}^{\infty}$ be a sequence of trees with $|\tau_n| \rightarrow \infty$ and corresponding Lukasiewicz paths $(W^n)_{n = 1}^{\infty}$, and let $R_n$ denote the effective resistance metric on $\textsf{Loop}(\tau_n)$ obtained via (\ref{eqn:resistance def variational}) by letting an edge between any two adjacent vertices have conductance $1$. Additionally let $\nu_n$ be the uniform measure that gives mass $1$ to each vertex of $\textsf{Loop}(\tau_n)$, and let $\rho_n$ be the root of ${\textsf{Loop}}(\tau_n)$, defined to be the vertex representing the edge joining the root of $\tau_n$ to its first child. Suppose that $(C_n)_{n=1}^{\infty}$ is a sequence of positive real numbers such that \begin{enumerate}[(i)] \item $\Big( \frac{1}{C_n} W^n_{\lfloor |\tau_n| t \rfloor} (\tau_n) \Big)_{0 \leq t \leq 1} \overset{(d)}{\rightarrow} X^{\text{exc}}$ as $n \rightarrow \infty$, \item $\frac{1}{C_n} \textsf{Height}(\tau_n) \ \overset{\mathbb{P}}{\rightarrow} \ 0$ as $n \rightarrow \infty$. \end{enumerate} Then \[ \Big({\textsf{Loop}}(\tau_n), \frac{1}{C_n}R_n, \frac{1}{|\tau_n|} \nu_n, \rho_n \Big) \overset{(d)}{\rightarrow} \Big( \L_{\alpha}, R, \nu, \rho \Big) \] as $n \rightarrow \infty$ with respect to the Gromov-Hausdorff-Prohorov topology. \end{proposition} We now state a continuous version of this convergence. More generally, if $f$ is a function in $D^{\text{exc}}([0,\l])$ for some $\l \in (0, \infty)$, with only positive jumps, we can replace $X^{\text{exc}}$ with $f$ in the construction above to define the associated continuum looptree $\L_f$. Moreover, if $f_n$ is a sequence in $D^{\text{exc}}([0,\l])$ converging to $f$, also all with only positive jumps, then we can prove a similar invariance principle for the sequence of corresponding continuum looptrees. There are minor differences in the assumptions required for the continuum convergence. In particular, note that the second condition of Proposition \ref{thm:compact disc inv princ res} that $\frac{1}{C_n} \textsf{Height}(\tau_n) \ {\rightarrow} \ 0$ in probability as $n \rightarrow \infty$ is important there because it ensures that in the limit, distances in the rescaled discrete looptrees come from the loop structure and not from distances in the corresponding tree. More formally, in the proof of \cite[Theorem 4.1]{RSLTCurKort} it is used to make a comparison between the expressions $\frac{1}{C_n} \sum_{u_n \preceq v_n} x_{u_n}^{v_n}$ and $\sum_{u \preceq v} x_u^v$ for the discrete and continuum trees respectively, where $x_{u_n}^{v_n}$ is the discrete analogue of $x_{u}^{v}$. For a sequence of trees $\tau_n$ with $\frac{1}{C_n} W^n \rightarrow f$ in the setting of Proposition \ref{thm:compact disc inv princ res}, we have for any $v_n \in \textsf{Loop} (\tau_n)$ and $v \in \L_f$ that \begin{align}\label{eqn:height correction exp} \sum_{u_n \preceq v_n} x_{u_n}^{v_n} = \textsf{Height}(v_n) + W^n(v_n), \hspace{10mm} \sum_{u \preceq v} x_{u}^{v} = f(v). \end{align} If $v$ and $v_n$ are in correspondence with each other, after being careful with left and right limits we can essentially apply the result that $\frac{1}{C_n} W^n(v_n) \rightarrow f(v)$ to deduce that the $\frac{1}{C_n} \sum_{u_n \preceq v_n} x_{u_n}^{v_n}$ also converges to $\sum_{u \preceq v} x_u^v$ in the limit to prove the invariance. To obtain this result, it is therefore crucial that the contribution from the rescaled height function goes to zero. If, however, we replace the sequence of rescaled discrete looptrees with a sequence of continuum looptrees, say coded by the functions $(f_n)_{n=1}^{\infty}$ each with support $[0,1]$ and such that $f_n \rightarrow f$ in the Skorohod-$J_1$ topology as $n \rightarrow \infty$, then the height function won't appear in any of the new terms in (\ref{eqn:height correction exp}) and so the continuum analogue of condition $(ii)$ of Proposition \ref{thm:compact disc inv princ res} is not required for convergence of the corresponding looptrees. In this sense, condition $(ii)$ reflects the fact the looptree $\textsf{Loop} (\tau_n)$ isn't quite the same as the looptree $\L_{W^n}$. Condition $(ii)$ is precisely what is required to say that the difference between $\textsf{Loop} (\tau_n)$ and $\L_{W^n}$ becomes negligible in the limit. Hence, in the continuum, the same proof gives the following result. \begin{proposition}\label{thm:compact cont inv princ} Let $(f_n)_{n \geq 1}$ be a sequence in $D^{\text{exc}}([0,1], \mathbb{R}^{\geq 0})$, and $f \in D^{\text{exc}}([0,1], \mathbb{R}^{\geq 0})$ be such that $f_n \rightarrow f$ as $n \rightarrow \infty$ with respect to the Skorohod-$J_1$ topology. Additionally let $\nu$ and $\nu_n$ be the projections of Lebesgue measure via $p_f$ and $p_{f_n}$ onto the spaces $\L_f$ and $\L_{f_n}$ respectively. Then \[ d_{\text{GHP}} \Bigg( \Big(\L_{f_n}, \d_n, \nu_n, \rho_n \Big), \Big( \mathcal{L}_f, \d_f, \nu_f, \rho_f \Big) \Bigg) \rightarrow 0 \] as $n \rightarrow \infty$. Here $\d$ can denote either the shortest-distance metric of \cite{RSLTCurKort}, or the resistance metric of (\ref{eqn:R}), but defined using the function $f$ in place of $X^{\text{exc}}$. Similarly for $\d_n$ and $f_n$. \end{proposition} The result follows exactly as in the proof of \cite[Theorem 4.1]{RSLTCurKort} by defining a correspondence between $\L_f$ and $\L_{f_n}$ to consist of all pairs $(t, \lambda_n (t))$, where $\lambda_n$ is the Skorohod homeomorphism that minimises the Skorohod distance between $f_n$ and $f$. The extension to include convergence of measures can be obtained exactly as in \cite[Proposition 4.6]{ArchBMCompactLooptrees}. Clearly the result of the proposition will hold for functions defined on any compact time interval, not just $[0,1]$. We will use this in Section \ref{sctn:LLT} to prove Theorem \ref{thm:LLT}. Moreover, by extending the coding functions to be constant beyond endpoints where necessary, the result also holds providing the supports of the functions $f_n$ converge to that of $f$. At some points in this paper, we will refer to the ``corresponding" or ``underlying" stable tree of $\L_{\alpha}$, by which we mean the stable tree $\T_{\alpha}$ coded by the same excursion that codes $\L_{\alpha}$. We let $\L_{\alpha}$ denote a compact stable looptree conditioned on $\nu(\L_{\alpha})=1$, but at various points we will let $\tilde{\L_{\alpha}}$ denote a generic stable looptree coded by an excursion under the It\^o measure but without any conditioning on its total mass. We will also let $\L_{\alpha}^{1}$ denote a stable looptree but conditioned so that its underlying tree has height $1$. However, we will make this notation explicit at the time of writing. The height of a stable tree $\tilde{\T_{\alpha}}$ is defined as $H_{\text{max}} = \sup_{u \in \tilde{\T_{\alpha}}} d_{\tilde{\T_{\alpha}}}(\rho, u)$. As the height process is almost surely continuous, this maximum is almost surely realised by at least one $u \in \tilde{\T_{\alpha}}$. Moreover, we see from \cite[Equation (23)]{DuqWangDiameter} (and references therein) that there is almost surely a unique $u \in \tilde{\T_{\alpha}}$ that attains this maximum, which we denote by $u_H$. If $\tilde{\L_{\alpha}}$ is the corresponding stable looptree, we define two notions of its height: \begin{enumerate}[(i)] \item We define its $L^W$-Height to be the looptree distance from $\rho$ to $u_H$, \item We define its $L$-Height to be $\sup_{u \in \tilde{\L_{\alpha}}} d_{\tilde{\L_{\alpha}}}(\rho, u)$. \item We define its $L^m$-Height to be $\max \tilde{X}_s^{\text{exc}}$, where $\tilde{X}^{\text{exc}}$ is the L\'{e}vy excursion coding $\tilde{\L_{\alpha}}$. \end{enumerate} In general, these are not the same. Note however that the $L^m$-Height is at least as big as the $L$-Height, since $\tilde{X}_s^{\text{exc}}$ gives the distance to the point in $\tilde{\L_{\alpha}}$ represented by $s$ but going ``clockwise" around all loops. At times, we will also use the notation $T^W$-Height and $T^m$-Height to denote the length of the corresponding spine in the underlying tree, which we respectively denote by W-spine or m-spine. \subsubsection{Uniform re-rooting invariance for stable trees and looptrees} We will also use re-rooting invariance properties of stable trees and looptrees in our arguments. In particular, Duquesne and Le Gall proved in \cite[Proposition 4.8]{DuqLeGPFALT} that stable L\'{e}vy trees are invariant under re-rooting at a uniform point. Following on from this, they also proved the stronger result of invariance under re-rooting at a deterministic point $u \in [0,1]$ in \cite[Theorem 2.2]{DuqLeGRerooting}. In \cite{HPWSpinPart}, the authors provide an alternative proof of uniform re-rooting invariance by considering a spinal decomposition of stable trees and using exchangeability properties of the resulting mass partition. This additionally allows them to show that stable trees are the only fragmentation trees for which this property holds. As a result, we obtain a similar uniform re-rooting invariance property for stable looptrees. This is stated precisely as \cite[Remark 4.6]{RSLTCurKort}, and the principles there show that looptrees are invariant under re-rooting at a uniform leaf, which is an equivalent statement in the limiting case. We will exploit this in the proof of Theorem \ref{thm:LLT} where we will in fact prove the convergence result for compact stable looptrees rooted at a uniform point. \subsubsection{Williams' decomposition of stable looptrees}\label{sctn:Williams Decomp} The Williams' Decomposition for stable trees was given in \cite{AbDelWilliamsDecomp}. There, the authors show that if we define the W-spine of a stable L\'{e}vy tree $\tilde{\T_{\alpha}}$ to be the unique path from its root to $u_H$, then $\tilde{\T_{\alpha}}$ can be broken along this W-spine and that the resulting fragments form a collection of smaller L\'{e}vy trees. As a consequence, we immediately have a similar decomposition result for looptrees. The Williams' Decomposition for stable trees given in \cite{AbDelWilliamsDecomp} encodes this decomposition of $\tilde{\T_{\alpha}}$ along its W-spine in a Poisson process. In the Brownian case of $\alpha = 2$, this corresponds to Williams' decomposition of Brownian motion. Letting $H_{\text{max}}$ and $u_H$ be as above, we define the Williams' spine (or W-spine) of $\tilde{\T_{\alpha}}$ to be the segment $[[\rho, u_H]]$, and define the Williams' loopspine (or W-loopspine) in the corresponding looptree $\tilde{\L_{\alpha}}$ to be the closure of the set of loops coded by points in $[[\rho, u_H]]$. One of the main results of \cite{AbDelWilliamsDecomp} is a theorem which firstly gives the distribution of the loop lengths along the W-loopspine, and additionally the distribution of the fragments obtained by decomposing along it. Given the spine from $\rho$ to $u_H$, and conditional on $H_{\text{max}} = H$, the loops along the W-loopspine can be represented by a Poisson point measure $\sum_{j \in J} \delta (l_j, t_j, u_j)$ on $\mathbb{R}^+ \times [0, H] \times [0,1]$ with a certain intensity. A point $(l,t,u)$ corresponds to a loop of length $l$ in the W-loopspine, occurring on the W-spine at distance $t$ from the root in the underlying tree $\tilde{\T_{\alpha}}$, and such that a proportion $u$ of the loop is on the ``left" of the W-loopspine, and a proportion $1-u$ is on the ``right". In \cite{AbDelWilliamsDecomp}, this is written in terms of the exploration process on $\tilde{\T_{\alpha}}$, but we interpret their result below in the context of looptrees. We note that when stating this result, we are not conditioning on the total mass of $\tilde{\T_{\alpha}}$: only the maximal height. The mass of $\tilde{\T_{\alpha}}$ will depend on its height via the joint laws for these under the It\^o excursion measure. \begin{theorem}(Follows directly from \cite[Lemma 3.1 and Theorem 3.2]{AbDelWilliamsDecomp}).\label{thm:AbDel Williams Decomp} \begin{enumerate}[(i)] \item Conditionally on $H_{\text{max}}=H$, the set of loops in the W-loopspine forms a Poisson point process $\mu_{\textsf{W-loopspine}} = \sum_{j \in \mathcal{J}} \delta (l_j, t_j, u_j)$ on the W-spine in the underlying tree with intensity \[ \mathbb{1}_{\{ [0,1] \}}(u) \mathbb{1}_{\{[0,H]\}}(t) l \exp \{ -l (H-t)^{\frac{-1}{\alpha - 1}} \} du \ dt \ \Pi (dl), \] where $\Pi$ is the underlying L\'{e}vy measure, with $\Pi(dl) = \frac{1}{|\Gamma(-\alpha)|} l^{-\alpha - 1} \mathbb{1}_{(0, \infty)}(l) dl$ in the stable case. We will denote the atom $\delta (l_j, t_j, u_j)$ by $\textsf{Loop}_j$. \item Let $\delta (l, t, u)$ be an atom of the Poisson process described above. The set of sublooptrees grafted to the W-loopspine at a point on the corresponding loop can be described by a random measure $M^{(l)} = \sum_{i \in I} \delta^{(l)} (\mathcal{E}_i, D_i)$, where $\mathcal{E}_i$ is a L\'{e}vy excursion that codes a looptree in the usual way, and $D_i$ represents the distance going clockwise around the loop from the point at which this sublooptree is grafted to the loop, to the point in the loop that is closest to $\rho$. This measure has intensity \begin{align*} N( \cdot, H_{\text{max}} \leq H-t) \times \mathbb{1}_{\{[0,l]\}} dD. \end{align*} In particular, since the sublooptrees are coded by the It\^o excursion measure, they are just rescaled copies of our usual normalised compact stable looptrees, and each of these is grafted to the loop on the W-loopspine at a uniform point around the loop lengths. \end{enumerate} \end{theorem} \begin{remark} Point $(ii)$ is a slight extension of the results of \cite{AbDelWilliamsDecomp} since the authors of that paper are only concerned with stable trees, and consequently are not interested in how the sublooptrees are distributed around each loop in the W-loopspine. Instead they write that the subtrees incident to the W-spine at the node corresponding to the atom $\delta(l,t,u)$ are described by a Poisson random measure with intensity $l N( \cdot, H_{\text{max}} \leq H-t)$. In fact, in our proofs we will only be counting sublooptrees grafted to entire loops so the distribution of these around each individual loop will not matter. However, it should be clear from equation (11) and the paragraph following it in \cite{DuqLeGPFALT} that the sublooptrees are actually distributed uniformly around each loop. \end{remark} In Proposition \ref{prop:resistance results infinite}, we will have to decompose along the loopspine from the root to a point attaining the distance of the $L^m$-Height from the root. By analogy with the notation above, we will call this the $m$-loopspine, and the corresponding spine in the underlying tree the $m$-spine. We do not prove a specific distribution for the decomposition along this m-loopspine, but note that by similar principles to the Williams' case, the Poisson measure describing the loop lengths along the m-loopspine (analogous to that in Theorem \ref{thm:AbDel Williams Decomp}(i)) will have the form \begin{equation*} C_{\alpha} \mathbb{1}_{\{ [0,1] \}}(u) \mathbb{1}_{\{[0,H^m]\}}(t) l^{-\alpha} \textsf{pen}(l,H^m,t) du \ dt \ dl, \end{equation*} where $C_{\alpha} = \frac{\alpha (\alpha - 1)}{\Gamma (2-\alpha)}$, as before, $H^m = T^m\text{-Height}(\tilde{\L_{\alpha}})$, and \textsf{pen} is a lower order penalty term. In particular, by considering only loops on incident on the first half of the m-spine, it can be bounded above and below by a constant. Moreover, the sublooptrees grafted to the m-loopspine will be coded by a thinned version of the It\^o excursion measure. This can be proved rigorously by applying Proposition \ref{prop:descent PP} for an unconditioned L\'{e}vy process and transferring to the excursion via the Vervaat transform (Theorem \ref{thm:Vervaat}) and absolute continuity relation (\ref{eqn:RN deriv levy bridge}). \subsection{Infinite critical trees and looptrees}\label{sctn:infinite trees bckgrnd} In this section we introduce Kesten's tree $T_{\infty}$ for a given critical offspring distribution $\xi$. In light of Theorem \ref{thm:Kesten LLT}, it is the natural way to construct such an infinite tree. \begin{definition}\label{def:Kesten's tree}(\cite[Definition 2.9]{AbDelGWIntro}, adapted from \cite{KestenIICtree}). Let $\xi$ be a critical offspring distribution, and define its size biased version $\xi^*$ by \[ \xi^*(n) = {n \xi (n)}. \] The \textbf{Kesten's tree} $T_{\infty}$ associated to the probability distribution $\xi$ is a two-type Galton-Watson tree distributed as follows: \begin{itemize} \item Individuals are either normal or special. \item The root of $T_{\infty}$ is special. \item A normal individual produces only normal individuals according to $\xi$. \item A special individual produces individuals according to the size-biased distribution $\xi^*$. Of these, one of them is chosen uniformly at random to be special, and the rest are normal. \end{itemize} \end{definition} Almost surely, the special vertices form a unique infinite backbone of $T_{\infty}$. Note that this is one-ended. Aldous in \cite{AldousFringeSinTree} coined the term \textit{sin-trees} for such trees, since they have a single infinite spine. The following local limit theorem was originally proved by Kesten in \cite{KestenIICtree} under a second moment condition, but was proved with the stated assumptions in \cite[Theorem 7.1]{JansonSurvey}, and demonstrates that this construction is the right one to take. \begin{theorem}\label{thm:Kesten LLT}(\cite[Lemma 1.14]{KestenIICtree}, \cite[Theorem 2.1.1]{AbDelGWIntro}, \cite[Theorem 7.1]{JansonSurvey}). Let $\xi$ be a critical offspring distribution with $\xi(0) + \xi(1) < 1$ and define $T_{\infty}$ as in Definition \ref{def:Kesten's tree}. Let $T_n$ be a Galton-Watson tree with offspring distribution $\xi$ conditioned on having height at least $n$. Then \[ T_n \overset{(d)}{\rightarrow} T_{\infty} \] with respect to the Gromov-Hausdorff-vague topology as $n \rightarrow \infty$. \end{theorem} The convergence is actually stated in a stronger topology in the original literature, but we are mainly interested in Gromov-Hausdorff-vague convergence in this paper. Kesten's construction has been imitated in the continuum by Duquesne in \cite{DuqSinTree}, who constructs continuum sin-trees and shows that these arise as the appropriate local limit of compact continuum trees conditioned on being large. By analogy with the compact continuum case, Duquesne's construction involves defining two height functions from two independent L\'{e}vy processes in the same way as done with the excursion in (\ref{eqn:height def}). These respectively code the tree structure on the left and right sides of the spine in the usual way. The construction was further extended to infinite discrete looptrees in \cite{BjornStef}, where the authors define the infinite looptree associated with a critical offspring distribution $\xi$ to simply be $\textsf{Loop}'(T_{\infty})$, where $T_{\infty}$ is constructed as in Definition \ref{def:Kesten's tree}, and $\textsf{Loop}'$ is an operation very close to \textsf{Loop}, as defined in \cite[Section 4]{RSLTCurKort} and which we will introduce later in Section \ref{sctn:scaling lims}. This infinite looptree inherits the structure of having a loopspine with loop sizes determined by a size-biased version of $\xi$, to which usual compact discrete looptrees are grafted. The local limit theorem of Theorem \ref{thm:Kesten LLT} thus passes directly to the looptree case by continuity of the $\textsf{Loop}$ operation (see \cite[Corollary 2.3]{BjornStef}, the proof of which can easily be adapted to \textsf{Loop} rather than $\textsf{Loop}'$). Finally, Kesten's construction of Definition \ref{def:Kesten's tree} was extended to critical multi-type Galton Watson trees in \cite[Theorem 3.1]{StephensonLocal} along with an analogous local limit theorem. Richier in \cite{RichierIICUIHPT} then used this to define an infinite two-type looptree and showed in \cite[Lemma 5.5]{RichierMapBoundaryLimit} that this arises as a similar local limit under appropriate conditions. The concept of an infinite stable looptree has thus left a gap in the literature and the purpose of this paper is to fill that gap. The construction is the one suggested in \cite[Section 6]{RichierIICUIHPT} and extends the construction of infinite discrete looptrees in the same way that Duquesne's continuum sin-trees extend the construction of their discrete counterparts. The resulting local limit theorem allows us to prove various volume and heat kernel convergence results for compact stable looptrees in \cite{ArchBMCompactLooptrees}. \section{Construction of infinite stable looptrees}\label{sctn:construction of infinite stable looptrees} Our construction uses two stable L\'{e}vy processes to code each side of the loopspine, in place of the excursion. This is the approach suggested in \cite[Section 6]{RichierIICUIHPT} and our construction is merely the continuum version of the discrete construction of \cite[Section 3]{RichierIICUIHPT}, except that we have essentially turned this construction ``upside down" to match the original coding mechanism for compact looptrees. We start by giving an equivalent construction of compact stable looptrees. We give the construction for a looptree of mass $\l$. \begin{tcolorbox}[colback=white] \textbf{Two-sided Construction of Compact Stable Looptrees} \begin{enumerate} \item Let $X^{\text{br},\ell}$ be a spectrally positive, $\alpha$-stable L\'{e}vy bridge of lifetime $\l$. Let $m = m_{\l}$ be the (almost surely unique) time at which $X^{\text{br},\ell}$ attains its infimum. \item Let $(X^{(2, \l)}_t)_{t \geq 0}$ be the pre-infimum process, and $(X^{(1, \l)}_t)_{t \geq 0}$ be the time-reversed post-infimum process, extended to stay constant after times $m$ and $1-m$ respectively. That is, \begin{align*} X^{(2, \l)}_t = \begin{cases} X^{\text{br}}_{t} \text{ for } t \in [0,m], \\ X^{\text{br}}_{m} \text{ for } t > m; \end{cases} \hspace{10mm} X^{(1, \l)}_t = \begin{cases} X^{\text{br}}_{\l-t} \text{ for } t \in [0, 1-m], \\ X^{\text{br}}_{m} \text{ for } t > \l-m. \end{cases} \end{align*} \item Define a function ${X}^{\l}: \mathbb{R} \rightarrow \mathbb{R}$ by \[ {X}^{\l}_t = \begin{cases} X^{(2, \l)}_{t} & \text{ if } t \geq 0, \\ X^{(1, \l)}_{-t} & \text{ if } t < 0. \end{cases} \] It should be clear from the Vervaat transform that ${X}^{\l}$ is just a shifted L\'{e}vy excursion. \item For $s, t \in \mathbb{R}$, we define resistances $r^{\l}, R^{\l}_0$ and $R^{\l}$ from ${X}^{\l}$ exactly as in (\ref{eqn:r def}), (\ref{eqn:R0}) and (\ref{eqn:R}), but with the superscript $\l$ on all the quantities involved. We can similarly define distances $\delta^{\l}$, $d^{\l}_0$ and $d^{\l}$ exactly as in (\ref{eqn:d}). Analogously to the normalised case, we then set $\L^{\l}_{\alpha} = (\mathbb{R} / \sim, d^{\l})$, and ${\L^{\l}_{\alpha}}^R = (\mathbb{R} / \sim, R^{\l})$, and let $p^{\l}: \mathbb{R} \rightarrow \L^{\l}_{\alpha}$ denote the canonical projection. \end{enumerate} \end{tcolorbox} Before giving the infinite construction, we give a brief outline of the strategy for proving Theorem \ref{thm:LLT}, which exploits uniform rerooting invariance of stable looptrees. By taking a stable looptree coded by an excursion $X^{\text{exc},\l}$ of length $\l$, and taking the root to be a uniform point in $U \in [0,\l]$, it follows from the Vervaat transformation that the processes $(X^{\text{exc},\l}_t)_{0 \leq t \leq U}$ and $(X^{\text{exc},\l}_t)_{U \leq t \leq \l}$ are distributed respectively as the post- and pre-minimum parts of a stable L\'{e}vy bridge. Standard convergence results then imply that on any compact interval, these converge in distribution to stable L\'{e}vy processes as $\l \rightarrow \infty$. Moreover, if we think of the loopspine as the sequence of loops coded by jump points at times $0 \preceq t \preceq U$, then $(X^{\text{exc},\l}_t)_{0 \leq t \leq U}$ codes for the loopspine along with everything grafted to the left hand side of it, and $(X^{\text{exc},\l}_t)_{U \leq t \leq \l}$ codes for everything grafted to the right hand side of it. It is therefore natural to replace each of these by unconditioned L\'{e}vy process in the infinite volume limit. Due to the Vervaat transformation, this construction is entirely equivalent to the original construction of looptrees using the L\'{e}vy excursion, but we have now split the coding into two functions which define each side of the loopspine. To code the infinite looptree, we will take limits of each of these functions and use these to code each side of the infinite loopspine. We first give the construction, and then prove Theorem \ref{thm:LLT} in Section \ref{sctn:LLT}. \begin{tcolorbox}[colback=white] \textbf{Construction of Infinite Stable Looptrees} \begin{enumerate} \item Let $X$ be an $\alpha$-stable, spectrally positive L\'{e}vy process, and let $X'$ be an $\alpha$-stable, spectrally negative L\'{e}vy process. \item Define a function $\Xi: \mathbb{R} \rightarrow \mathbb{R}$ by \[ \Xi_t = \begin{cases} X_{t} & \text{ if } t \geq 0, \\ X'_{-t^-} & \text{ if } t<0. \end{cases} \] \item Analogously to the compact construction above, if $t$ is a jump point of $\Xi$ with jump size $\Delta_t$ and $a, b \in [0, \Delta_t]$, set \begin{align*} {\delta}^{\infty}_t(a,b) &= \text{min} \{|a-b|, \Delta_t - |a-b| \}, \\ {r}^{\infty}_t(a,b) &= {\Big( \frac{1}{|a-b|}+\frac{1}{\Delta_t - |a-b|} \Big) }^{-1}= \frac{|a-b|(\Delta_t - |a-b|)}{\Delta_t}. \end{align*} Additionally, as before, for $s, t \in \mathbb{R}$ with $s \leq t$ set ${I}^{\infty}_{s,t} = \inf_{r \in [s,t]} \Xi_r$, and ${x}^{\infty}_{s,t} = {I}^{\infty}_{s,t} - \Xi_{s^-}$. For $s, t \in \mathbb{R}$ we again write $s \prec t$ if $s \preceq t$ (meaning that ${x}^{\infty}_{s,t} \geq 0$) and $s \neq t$. Then, if $s \preceq t$ set \begin{align*} {d}^{\infty}_0(s,t) &= \sum_{s \prec u \preceq t} {\delta}^{\infty}_u(0, x_u^t), \\ {R}^{\infty}_0(s,t) &= \sum_{s \prec u \preceq t} {r}^{\infty}_u(0, x_u^t). \end{align*} Then, for general $s, t \in \mathbb{R}$, set \begin{align}\label{eqn:infinite d R def} \begin{split} {d}^{\infty}(s,t) &= {\delta}^{\infty}_{s \wedge t}(x^{\infty}_{s \wedge t,s},x^{\infty}_{s \wedge t,t}) + {d}^{\infty}_0(s \wedge t, s) + {d}^{\infty}_0(s \wedge t, t),\\ {R}^{\infty}(s,t) &= {r}^{\infty}_{s \wedge t}(x^{\infty}_{s \wedge t,s},x^{\infty}_{s \wedge t,t}) + {R}^{\infty}_0(s \wedge t, s) + {R}^{\infty}_0(s \wedge t, t). \end{split} \end{align} Finally, define an equivalence relation $\sim$ on $\mathbb{R}$ by setting $s \sim t$ if and only if ${d}^{\infty}(s,t)=0$. We define the infinite looptrees $\L^{\infty}_{\alpha}$ and $\L^{\infty, R}_{\alpha}$ by \begin{align*} \L^{\infty}_{\alpha} &= (\mathbb{R} / \sim, {d}^{\infty}), \\ \L^{\infty, R}_{\alpha} &= (\mathbb{R} / \sim, {R}^{\infty}). \end{align*} \end{enumerate} \end{tcolorbox} For ease of notation and intuition, we will focus on $\L^{\infty}_{\alpha}$ rather than $\L^{\infty, R}_{\alpha}$ in Sections \ref{sctn:vol bounds and spectral dim infinite} and \ref{sctn:LLT}, but the results will hold in the resistance setting by exactly the same arguments. As in the compact case, we can define the projection $p^{\infty}: \mathbb{R} \rightarrow \L_{\alpha}^{\infty}$, which is almost surely continuous, and endow $\L_{\alpha}^{\infty}$ with the measure $\nu^{\infty}$ which is defined to be the pushforward of Lebesgue measure on the real line to $\L_{\alpha}^{\infty}$ via $p^{\infty}$. We also have the following proposition, as a direct consequence of the scale invariance of the stable L\'{e}vy process. \begin{proposition}[Scale invariance of $\L^{\infty}_{\alpha}$]\label{prop:Lai scale inv} For any $c>0$, \[ (\L^{\infty}_{\alpha}, c\d, \rho^{\infty}, c^{\alpha} \nu^{\infty}) \overset{(d)}{=} (\L^{\infty}_{\alpha}, \d, \rho^{\infty}, \nu^{\infty}), \] where $\d$ here can be equal to either $d^{\infty}$ or $R^{\infty}$. \end{proposition} We also record the following result, which arises as a direct consequence of Theorem \ref{thm:LLT}, \cite[Corollary 4.4]{RSLTCurKort} (which gives the same result in the compact case), and \cite[Theorem 8.1.9]{Burago} (which implies that this property is preserved in the limit). \begin{corollary}\label{cor:length space} Almost surely, $\L^{\infty}_{\alpha}$ is a length space. \end{corollary} \section{Limit theorems}\label{sctn:LLT} In this Section we prove Theorems \ref{thm:LLT} and \ref{thm:main scaling lim}, and other similar results. \subsection{Proof of Theorem \ref{thm:LLT}} Theorem \ref{thm:LLT} is proved by applying Proposition \ref{thm:compact cont inv princ} to the following convergence result. The L\'{e}vy processes are all normalised as in Section \ref{sctn:Levy background}. \begin{proposition}\label{prop:bridge conv} Let $X^{\text{br},\ell}$ be a spectrally positive, $\alpha$-stable L\'{e}vy bridge of lifetime $\l$, let $X$ be an $\alpha$-stable, spectrally positive L\'{e}vy process, and let $X'$ be an independent $\alpha$-stable, spectrally negative L\'{e}vy process. Also let $m_{\l}$ be the (almost surely unique) time at which $X^{\text{br},\ell}$ attains its minimum. Then, for any $T_1, T_2>0$, letting $f$ and $g$ be any bounded continuous functions $D([0,T_i], \mathbb{R}) \rightarrow \mathbb{R}$, we have that \begin{align*} \E{ f\Big( (X^{\text{br},\ell}_{t \wedge m_{\l}})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{((\l-t) \vee m_{\l})^-})_{t \in [0,T_2]}\Big)} &\rightarrow \E{f\Big((X_t)_{t \in [0,T_1]}\big)} \E{g\Big((X_t')_{t \in [0,T_2]}\Big)} \end{align*} as $\l \rightarrow \infty$. \end{proposition} Before we prove the proposition, we show how we can apply Proposition \ref{thm:compact cont inv princ} to the functions $X$ and $X'$ on compact time intervals to prove Theorem \ref{thm:LLT}. \begin{proof}[Proof of Theorem \ref{thm:LLT}, assuming Proposition \ref{prop:bridge conv}] We need to show that for Lebesgue almost every $r>0$, \begin{equation}\label{eqn:R ball LLT} \mathcal{B}_r(\L^{\l}_{\alpha}) \overset{(d)}{\rightarrow} \mathcal{B}_r(\L_{\alpha}^{\infty}). \end{equation} To this end, take some $r>0$. We define two times $t_g(r)$ and $t_d(r)$ by \begin{align*} t_g(r) = \inf \{ s \geq 0: \Delta_{-s} \geq 4r, \delta^{\infty}_{-s}(x^{\infty}_{-s,0}) \geq r \}, \hspace{10mm} t_d(r) = \inf \{s \geq 0: \Xi_s \leq \Xi_{{-t_g(r)}^-} \}. \end{align*} The purpose of defining $t_g(r)$ and $t_d(r)$ like this is that $X^{\infty}$ codes a compact looptree on the interval $[-t_g(r), t_d(r)]$, and that $\mathcal{B}_r(\L_{\alpha}^{\infty})$ is contained in this. Note that $t_g(r)$ is $\mathbf{P}$-almost surely finite, since letting $L_s$ denote the local time spent by $(\Xi_{-t^+})_{t \geq 0}$ at its infimum by time $s$, normalised so that $\E{e^{\lambda \Xi_{L^{-1}(t)}}} = e^{-\lambda^{\alpha - 1}t}$, we have from Proposition \ref{prop:descent PP} that the measure \[ \sum_{s \in J} \delta_{(L_s, \Delta_s)} \] is a Poisson point measure of intensity $dl \cdot x \mathbb{1} \{ x^{-\alpha} \geq 4r \} dx$, where $J$ is the set $\{ s \geq 0: \Delta_{-s} \geq 4r, \delta^{\infty}_{-s}(x^{\infty}_{-s,0}) \geq r \}$. Moreover, by \cite[Chapter VIII, Lemma 1]{BertoinLevy} we know that $L^{-1}$ is a stable subordinator of parameter $1-\frac{1}{\alpha}$, and hence $L_t \rightarrow \infty$ $\mathbf{P}$-almost surely as $t \rightarrow \infty$. It follows that $t_g(r)$ is $\mathbf{P}$-almost surely finite for all $r>0$. Similarly, since $\liminf_{t \rightarrow \infty} \Xi_t = -\infty$ $\mathbf{P}$-almost surely, $t_d(r)$ is also $\mathbf{P}$-almost surely finite for all $r>0$. For notational convenience, we write $t_g = t_g(r)$ and $t_d = t_d(r)$ from now on. The compact looptree $\L^{\l}_{\alpha}$ is coded by an excursion $X^{\text{exc},\ell}$ of length $\l$. To write this as a two-sided construction as described in the previous section, choose $U_{\l}$ uniform on $[0, \l]$, and define a function $X^{\text{br},\ell}: [-U_{\l}, \l-U_{\l}]$ by \[ X^{\text{br},\ell}_t = X^{\text{exc},\ell}_{t+U_{\l}} - X^{\text{exc},\ell}_{U_{\l}} \] for all $t \in [-U_{\l}, \l-U_{\l}]$. Then $X^{\text{br},\ell}$ codes $\L^{\l}_{\alpha}$. Moreover, we can extend $X^{\text{br},\ell}$ to $\mathbb{R}$ by taking it to be constant outside of $[-U_{\l}, \l-U_{\l}]$, and by Proposition \ref{prop:bridge conv}, it is then the case that $(X^{\text{br}, \l}_t)_{t \in [-t_g - 1, t_d + 1]} \overset{(d)}{\rightarrow} (X^{\infty}_t)_{t \in [-t_g - 1, t_d + 1]}$. Since the interval $[-t_d-1, t_g+1]$ is $\mathbf{P}$-almost surely compact, and the space of c\`{a}dl\`{a}g functions with compact support endowed with the Skorohod-$J_1$ topology is separable, it follows by the Skorohod Representation Theorem and Proposition \ref{prop:bridge conv} that there exists a probability space $(\Omega, \mathcal{F}, \mathbb{P})$ on which $(X^{\text{br}, \l}_t)_{t \in [-t_g - 1, t_d + 1]} \rightarrow (X^{\infty}_t)_{t \in [-t_g - 1, t_d + 1]}$ almost surely. We henceforth work in this space. For each $\l>0$, let $\lambda_{\l}$ be the Skorohod homeomorphism (defined pointwise on $\Omega$) from $[-t_g - 1, t_d + 1] \rightarrow [-t_g - 1, t_d + 1]$ that minimises the Skorohod distance between these $X^{\text{br}, \l}$ and $X^{\infty}$ on this interval. Then set $t_d^{\l} = \lambda_{\l}(t_d)$, and similarly $t_g^{\l} = \lambda_{\l}(t_g)$. The correspondence consisting of all pairs $[t, \lambda_{\l}(t)]$ for $t \in [-t_g, t_d]$ is a subset of the correspondence used to minimise the Gromov-Hausdorff distance in the proof of Proposition \ref{thm:compact cont inv princ}, so letting $\L_{\alpha}^{\l,r} = p^{\l}((X^{\text{br}, {\l}}_t)_{t \in [-t^{\l}_g, t^{\l}_d]})$ for each $\l>0$ and $\L^{\infty, r}_{\alpha} = p^{\infty}((X_t)_{t \in [-t_g, t_d]})$, it follows from Proposition \ref{thm:compact cont inv princ} that $d_{GHP} (\L_{\alpha}^{\l,r}, \L^{\infty, r}_{\alpha}) \rightarrow 0$ as $\l \rightarrow \infty$. Since $\mathcal{B}_r(\L^{\l}_{\alpha}) \subset \L_{\alpha}^{\l,r}$ and $\mathcal{B}_r(\L_{\alpha}^{\infty}) \subset \L^{\infty, r}_{\alpha}$, it thus follows that $\mathcal{B}_r(\L^{\l}_{\alpha}) \overset{(d)}{\rightarrow} \mathcal{B}_{r'}(\L_{\alpha}^{\infty})$ for Lebesgue almost every $r'<r$. By taking a countable sequence $r_n \rightarrow \infty$ we therefore deduce the result for Lebesgue almost-every $r>0$, and the theorem follows. \end{proof} We now conclude the proof of Theorem \ref{thm:LLT} by proving Proposition \ref{prop:bridge conv}. \begin{proof}[Proof of Proposition \ref{prop:bridge conv}] The key point is that the two sides of the bridge have a density with respect to the laws of $X$ and $X'$, in that for any $f, g$ as in the statement of the proposition, and any $\l > T_1 + T_2$, it follows from a minor modification of (\ref{eqn:RN deriv levy bridge}) that \begin{align}\label{eqn:density bridge} \begin{split} &\E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\Big)} \\ &\hspace{2cm}= \E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_{t}')_{t \in [0,T_2]}\Big) \frac{p_{\l - T_1 - T_2}(X_{T_2^-}' -X_{T_1})}{p_{\l}(0)}}, \end{split} \end{align} where $p_t(\cdot)$ here denotes the transition density of $X$. The proof then essentially just uses the fact that $m_{\l}$ and $\l - m_{\l}$ tend to infinity in probability as $\l \rightarrow \infty$, and then the fact that with high probability, $X_{T_1}$ and $X'_{T_2}$ will also not be too large. There are two main steps. We first note that the quantity \begin{align*} \E{ f\Big( (X^{\text{br},\ell}_{t \wedge m_{\l}})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{((\l-t) \vee m_{\l})^-})_{t \in [0,T_2]}\Big)} - \E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\Big)} \end{align*} is upper bounded by \begin{align*} &\ \ \ 2 ||f||_{\infty} ||g||_{\infty} \Bigg( \pr{m_1 < \frac{T_1}{\l}} + \pr{m_1 > 1 - \frac{T_2}{\l}} \Bigg), \end{align*} which converges to $0$ as $\l \rightarrow \infty$. This allows us to apply (\ref{eqn:density bridge}) as follows. First, note that it follows from the scaling relation $p_t(x) = t^{\frac{-1}{\alpha}}p_1(xt^{\frac{-1}{\alpha}})$ that \begin{align*} \frac{p_{\l - T_1 - T_2}(X_{T_2}' -X_{T_1})}{p_{\l}(0)} = \Bigg( \frac{\l}{\l - T_1 - T_2}\Bigg)^{\frac{1}{\alpha}} \frac{p_1\big( (\l - T_1 - T_2)^{\frac{-1}{\alpha}}(X_{T_2}' -X_{T_1}) \big) }{p_1(0)}. \end{align*} We denote this latter quantity by $p(\l, X, X', T_1, T_2)$, so that \begin{align*} \E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\big)} - \E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_t')_{t \in [0,T_2]}\Big)} \hspace{2cm} & \\ =\E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_{t}')_{t \in [0,T_2]}\Big) \Bigg( p(\l, X, X', T_1, T_2) - 1 \Bigg)}&. \end{align*} Taking some $0 < \epsilon \ll \frac{1}{\alpha}$, we then decompose on the event $\{ |X_{T_1}| \vee |X_{T_2}'| \leq (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}\}$ and its complement by writing the latter quantity as the sum \begin{small} \begin{align}\label{eqn:bridge exp two terms} \begin{split} &\E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_{t}')_{t \in [0,T_2]}\Big)\Bigg(p(\l, X, X', T_1, T_2) - 1 \Bigg)\mathbb{1} \{ |X_{T_1}| \vee |X_{T_2}'| \leq (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}\}} \\ &+ \E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_{t}')_{t \in [0,T_2]}\Big)\Bigg( p(\l, X, X', T_1, T_2) - 1 \Bigg) \mathbb{1} \{ |X_{T_1}| \vee |X_{T_2}'| > (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}\} }. \end{split} \end{align} \end{small} We deal with each of these two terms separately. For the first term, note that by continuity of the transition density \cite[Section VIII.1]{BertoinLevy}, \[ \sup_{|x| \leq 2(\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}} \Big\{ p_1\Big(x(\l - T_1 - T_2)^{\frac{-1}{\alpha}}\Big) \Big\} \rightarrow p_1(0) \] as $\l \rightarrow \infty$. We apply this by writing: \begin{align*} &\Big|\Big|\Bigg(p(\l, X, X', T_1, T_2) - 1 \Bigg)\mathbb{1} \{ |X_{T_1}| \vee |X_{T_2}'| \leq (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}\} \Big|\Big|_{\infty} \\ &\hspace{1.8cm} \leq \frac{1}{p_1(0)} \Bigg( \Bigg| \Big( \Big( \frac{\l}{\l - T_1 - T_2}\Big)^{\frac{1}{\alpha}} - 1 \Big) \sup_{|x| \leq 2(\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}} \Big\{ p_1\Big({x}{(\l - T_1 - T_2)^{\frac{-1}{\alpha}}}\Big) \Big\} \Bigg| \\ &\hspace{4.8cm} \ \ \ \ + \Bigg| \sup_{|x| \leq 2(\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}} \Big\{ p_1\Big({x}{(\l - T_1 - T_2)^{\frac{-1}{\alpha}}}\Big) \Big\} - p_1(0) \Bigg| \Bigg), \end{align*} from which we deduce that the first term in (\ref{eqn:bridge exp two terms}) converges to zero as $\l \rightarrow \infty$, since $f$ and $g$ are also bounded. To deal with the second term, we upper bound it by \begin{align*} ||f||_{\infty} ||g||_{\infty} \frac{1}{p_1(0)} ||p_1||_{\infty} \pr{|X_{T_1}| \vee |X'_{T_2}| > (\l - T_1 - T_2)^{\frac{1}{\alpha} - \epsilon}}, \end{align*} which also vanishes as $\l \rightarrow \infty$. It therefore follows by an application of the triangle inequality and the bounds above that \begin{footnotesize} \begin{align*} &\E{ f\Big( (X^{\text{br},\ell}_{t \wedge m_{\l}})_{t \in [0,T_1]} \big) g\Big( (X^{\text{br},\ell}_{((\l-t) \vee m_{\l})^-})_{t \in [0,T_2]}\Big)} - \E{f\Big((X_t)_{t \in [0,T_1]}\big) g\Big((X'_{t})_{t \in [0,T_2]}\Big)}\\ &\hspace{5mm}\leq \E{ f\Big( (X^{\text{br},\ell}_{t \wedge m_{\l}})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{((\l-t) \vee m_{\l})^-})_{t \in [0,T_2]}\Big)} - \E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \Big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\Big)} \\ &\hspace{8mm} + \E{ f\Big( (X^{\text{br},\ell}_{t})_{t \in [0,T_1]} \big) g\Big( (X^{\text{br},\ell}_{(\l-t)^-})_{t \in [0,T_2]}\big)} - \E{f\Big((X_t)_{t \in [0,T_1]}\Big) g\Big((X_t')_{t \in [0,T_2]}\Big)} \hspace{2cm} \\ &\hspace{5mm} \rightarrow 0 \end{align*} \end{footnotesize} as $\l \rightarrow \infty$, as claimed. We can then factorise the final term by independence of $X$ and $X'$. \end{proof} \subsection{Scaling limits of infinite discrete looptrees}\label{sctn:scaling lims} In this section, we prove that infinite stable looptrees are scaling limits of infinite discrete looptrees. We start by proving the following proposition, from which Theorem \ref{thm:main scaling lim} will follow. Note the analogy with Proposition \ref{thm:compact disc inv princ res}, and \cite[Theorem 4.1]{RSLTCurKort}. Given an infinite critical discrete tree $T_{\infty}$, we note that it can be coded by a two-sided Lukasiewicz path indexed by $\mathbb{Z}$ in the same way that an infinite critical continuum tree can be coded by a two-sided L\'{e}vy process. As introduced in Section \ref{sctn:infinite trees bckgrnd}, the infinite discrete looptrees defined by Bj\"ornberg and Stef\'ansson in \cite{BjornStef} are formed by first taking a critical offspring distribution $\xi$ in the domain of attraction of an $\alpha$-stable law, and then forming Kesten's tree $T_{\alpha}^{\infty}$ as outlined in Section \ref{sctn:infinite trees bckgrnd}. This tree has a unique infinite spine of vertices with a size-biased version of the offspring distribution. The authors define their looptree as $\textsf{Loop'} (T_{\alpha}^{\infty})$. Here $\textsf{Loop'}$ is an operation very similar to $\textsf{Loop}$, obtained as in Figure \ref{fig:BSLoop}, and $d_{GH}(\textsf{Loop} (T_{\alpha}^{\infty}), \textsf{Loop'} (T_{\alpha}^{\infty})) \leq 2$ (see \cite[Proof of Theorem 4.1]{RSLTCurKort}). We let $L_{\alpha}^{\infty, 1} = \textsf{Loop'}(T_{\alpha}^{\infty})$. \begin{figure}[h] \includegraphics[width=14cm, height=4cm]{loopprimediscretee-eps-converted-to} \centering \caption{A tree $T$ and $\textsf{Loop} ' (T)$, for the same underlying tree as in Figure \ref{fig:disc looptree intro}.}\label{fig:BSLoop} \end{figure} \begin{remark} In various places in other literature, the notation for $\textsf{Loop}$ and $\textsf{Loop'}$ is interchanged. We have used the notation of \cite{RSLTCurKort} since our paper follows on more naturally from the results there. \end{remark} We also make one further definition. Given an infinite critical tree $T_{\infty}$ and $R>0$, we define $\textsf{Loop} (T_{\infty})^R$ to be the sublooptree of $\textsf{Loop} (T_{\infty})$ obtained by letting $L$ be the first loop on the infinite loopspine that is of length greater than $4R$, and such that if we let $l_1$ and $l_2$ be the lengths of the two segments of this loop obtained by splitting the loop at the two points where it intersects its neighbouring loops in the infinite loopspine, we have that $\frac{l_1}{l_1 + l_2} \in [\frac{1}{4}, \frac{3}{4}]$. We then let $\textsf{Loop} (T_{\infty})^R$ be the subset of $\textsf{Loop} (T_{\infty})$ obtained by removing all descendants of all points in $L$ (but not removing $L$ itself). This definition is the discrete analogue to that of $\L_{\alpha}^{\infty,R}$ given in the proof of Theorem \ref{thm:LLT}, and is useful since $\mathcal{B}_R(\textsf{Loop} (T_{\infty})) \subset \textsf{Loop} (T_{\infty})^R$, but $\textsf{Loop} (T_{\infty})^R$ has the advantage of being a full looptree, whereas $\mathcal{B}_R(\textsf{Loop} (T_{\infty}))$ may contain incomplete loops. \begin{proposition}\label{prop:inf conv disc loop} Let $(\tau_n)_{n=1}^{\infty}$ be a sequence of infinite critical trees (in the sense of Kesten) with corresponding two-sided Lukasiewicz paths $(W^n)_{n = 1}^{\infty}$, and let $\d_n$ denote either the shortest-distance or effective resistance metric on $\textsf{Loop}(\tau_n)$. Additionally let $\nu_n$ be the measure that gives mass $1$ to each vertex in $\textsf{Loop}(\tau_n)$, and let $\rho_n$ be the root of ${\textsf{Loop}}(\tau_n)$, defined to be the vertex representing the edge joining the root of $\tau_n$ to its first child. Suppose that $(C_n)_{n=1}^{\infty}$ is a sequence of positive real numbers such that \begin{enumerate}[(i)] \item For any compact interval $K \subset \mathbb{R}$, $\Big( \frac{1}{C_n} W^n_{\lfloor n t \rfloor} \Big)_{t \in K} \overset{(d)}{\rightarrow} (X^{\infty}_t)_{t \in K}$ as $n \rightarrow \infty$, \item $\frac{1}{C_n} \textsf{Height}(\textsf{Tree} (\textsf{Loop} (\tau_n)^{rC_n})) \overset{\mathbb{P}}{\rightarrow} \ 0$ as $n \rightarrow \infty$, for all $r > 0$, where \textsf{Tree} \ is the inverse operation of \textsf{Loop}, and $\textsf{Loop} (\tau_n)^R$ is defined above. \end{enumerate} Then \[ \Big({\textsf{Loop}}(\tau_n), \frac{1}{C_n}\d_n, \frac{1}{n}\nu_n, \rho_n \Big) \overset{(d)}{\rightarrow} \Big( \L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty} \Big) \] as $n \rightarrow \infty$ with respect to the Gromov-Hausdorff vague topology, where $\d^{\infty}$ can denote either the shortest-distance or effective resistance metric on $\L^{\infty}_{\alpha}$, as appropriate. Moreover, the result also holds on replacing $\textsf{Loop}$ by $\textsf{Loop'}$ in all the statements above. \end{proposition} \begin{proof} We start by proving the result for \textsf{Loop}. We will prove the result with $\d=d$ and note that the corresponding result for $\d=R$ follows by the same arguments. The proof is again a consequence of Proposition \ref{thm:compact disc inv princ res}, given which, the proof is almost identical to the proof of Theorem \ref{thm:LLT} (i.e. by defining an increasing sequence of sublooptrees that exhaust the whole space, to each of which we then apply Proposition \ref{thm:compact disc inv princ res}), so we omit the details. As we did there, take $r>0$, and define two times $t_g(r)$ and $t_d(r)$ by \begin{align*} t_g(r) &= \inf \{ s \geq 0: \Delta_{-s} \geq 4r, \delta_{-s}(x_{-s}^0) \geq r \}, \\ t_d(r) &= \inf \{s \geq 0: {X}^{\infty}_s \leq {X}^{\infty}_{{-t_g(r)}^-} \}. \end{align*} It then follows by the Skorohod Representation Theorem that there exists a probability space $(\Omega, \mathcal{F}, \mathbb{P})$ upon which $(\frac{1}{C_n}W^n_{nt})_{-(t_g+1) \leq t \leq t_d+1} \rightarrow (X^{\infty})_{-(t_g+1) \leq t \leq t_d+1}$ almost surely with respect to the Skorohod-$J_1$ topology. As in the proof of Theorem \ref{thm:LLT}, for each $n \in \mathbb{N}$ let $\lambda_{n}$ be the Skorohod homeomorphism $[-t_g - 1, t_d + 1] \rightarrow [-t_g - 1, t_d + 1]$ that minimises the Skorohod-$J_1$ distance between these two functions, and set $t_d^{n} = \lambda_{n}(t_d)$, and similarly $t_g^{n} = \lambda_{n}(t_g)$. By repeating the arguments of the proof of Theorem \ref{thm:LLT}, and noting that condition $(ii)$ above ensures that condition $(ii)$ of Proposition \ref{thm:compact disc inv princ res} is satisfied, we deduce that the looptrees coded by $(\frac{1}{C_n}W^n_{nt})_{-t^n_g \leq t \leq t^n_d}$ converge to the looptree coded by $(X^{\infty})_{t \geq 0}$. The result then follows as in the proof of Theorem \ref{thm:LLT}. To prove the same result for \textsf{Loop}$'$ in place of \textsf{Loop}, note that since $d_{GH}(\textsf{Loop} (T_{\alpha}^{\infty}), \textsf{Loop'} (T^{\alpha}_\infty)) \leq 2$, the Gromov-Hausdorff convergence of Proposition \ref{thm:compact disc inv princ res} holds with $\textsf{Loop} (\tau_n)$ replaced by $\textsf{Loop'} (\tau_n)$, and the Prohorov convergence of measures of that proposition holds by the exactly the same arguments. As a consequence, we can just repeat exactly the same proof for \textsf{Loop}$'$. \end{proof} In particular, the result applies taking $\tau_n = T_{\alpha}^{\infty}$ for all $n$, and $C_n = a_n$. In this case, $\frac{1}{C_n} \textsf{Height}(\textsf{Tree} (\textsf{Loop} (\tau_n) (rC_n)))$ will be of order $r^{\alpha - 1}n^{-\frac{2-\alpha}{\alpha}}L(n)$ for some slowly-varying function $L$, so point (ii) of Proposition \ref{prop:inf conv disc loop} holds by an appplication of Markov's inequality. We therefore deduce both Theorem \ref{thm:main scaling lim}, and Theorem \ref{thm:BS looptree conv} below, as a corollary. \begin{theorem}\label{thm:BS looptree conv} Take $\textsf{Loop'}(T_{\alpha}^{\infty})$ as above, with $\nu'$ the measure on $\textsf{Loop'}(T_{\alpha}^{\infty})$ such that $\nu'(x) = 1$ for all $x \in \textsf{Loop'}(T_{\alpha}^{\infty})$. Then \[ (\textsf{Loop'}(T_{\alpha}^{\infty}), a_n^{-1} \d, n^{-1} \nu', \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff vague topology as $n \rightarrow \infty$. Here $\d$ (respectively $\d^{\infty}$) can denote either the geodesic metric $d$ (respectively $d^{\infty}$), or the effective resistance metric R (respectively $R^{\infty}$). \end{theorem} \subsubsection{Looptrees defined from two-type Galton Watson trees} In practice in the context of random planar maps, it is often convenient to define discrete looptrees from alternating two-type Galton-Watson trees. In particular, Richier in \cite[Section 3]{RichierIICUIHPT} gives the following definition, illustrated in Figure \ref{fig:RichLoop}. Given an infinite alternating two-type Galton-Watson tree $T$ (as defined in Section \ref{sctn:GW multi}), say with white vertices at even height and black vertices at odd height, draw a loop around each black vertex by connecting its $i^{\text{th}}$ white child to its $(i+1)^{\text{th}}$ white child for all $i$, and join its parent to both its first and last white child. Then delete the black vertices and their incident edges; we denote the resulting structure by $\textsf{Loop}^2(T)$. \begin{figure}[h] \includegraphics[width=13cm]{twotype-eps-converted-to} \centering \caption{A two-type tree and its looptree.}\label{fig:RichLoop} \end{figure} We now take a two-type tree $T_{\alpha}^{\infty, 2}$ with offspring distribution $(\xi_{\circ}, \xi_{\bullet})$ such that: \begin{itemize} \item $(\xi_{\circ}, \xi_{\bullet})$ is critical, i.e. $\E{\xi_{\circ}}\E{\xi_{\bullet}}=1$. \item $\xi_{\circ}$ is shifted geometric with parameter $1-p \in (0,1)$, i.e. $\xi_{\circ}(k) = (1-p)p^k$ for all $k \geq 0$. \item $\xi_{\bullet}$ is in the domain of attraction of an $\alpha$-stable law. \end{itemize} Before stating the scaling result, we briefly introduce two related concepts. One of these is the Janson-Stef\'ansson bijection of \cite{JanStefLargeFace}, which gives a bijection between alternating two-type Galton-Watson trees and one-type Galton-Watson trees. Given an alternating two-type Galton-Watson tree $T$, we denote its image under this bijection by $\Phi_{\text{JS}}(T)$. $\Phi_{\text{JS}}(T)$ has the same vertex set as $T$, but different edges, and is constructed as follows: for every white vertex that is not equal to the root, label its offspring as $u_1, \ldots, u_k$ in lexicographical order, and label its parent $u_0$. Then draw an edge joining $u_i$ to $u_{i+1}$ for each $i \in \{0, \ldots, k-1\}$, and draw an edge joining $u_k$ to $u$. See Figure \ref{fig:JS}. The bijection is such that each white vertex in $T$ is therefore mapped to a leaf in $\Phi_{\text{JS}}(T)$, and each black vertex in $T$ with $k$ offspring is mapped to a vertex in $\Phi_{\text{JS}}(T)$ with $k+1$ offspring. The second concept is a (final) related loop operation $\overline{\textsf{Loop}}$. Given a (one-type) tree $T$, $\overline{\textsf{Loop}}(T)$ is obtained by first forming $\textsf{Loop'}(T)$, and then for each vertex $u \in \textsf{Loop'}(T)$, contracting each edge joining $u$ to its rightmost child. $\overline{\textsf{Loop}}(T)$ therefore has the property that multiple loops can be grafted at the same vertex, which is not the case with $\textsf{Loop}(T)$ and $\textsf{Loop'}(T)$ (but is the case with the two-type operation $\textsf{Loop}^2$). \begin{figure}[h] \begin{subfigure}{.45\textwidth} \includegraphics[width=6cm]{janstefonly2-eps-converted-to} \centering \subcaption{$\Phi_{\text{JS}}(T)$.} \end{subfigure} \begin{subfigure}{.55\textwidth} \includegraphics[width=7cm]{barlooponly2-eps-converted-to} \centering \subcaption{$\textsf{Loop'}(\Phi_{\text{JS}}(T))$ and $\overline{\textsf{Loop}}(\Phi_{\text{JS}}(T))$.} \end{subfigure} \caption{Illustrations for the two-type tree $T$ in Figure \ref{fig:RichLoop}.}\label{fig:JS} \end{figure} The proof of the two-type scaling result then proceeds by applying the Janson-Stef\'ansson bijection to the two-type tree, and using the following facts, which we state without proof, but which should be plausible from looking at Figure \ref{fig:JS}. \begin{enumerate}[(i)] \item For any plane tree $T$ endowed with a measure giving mass $1$ to every vertex, $d_{GHP} (\textsf{Loop'}(T), \overline{\textsf{Loop}}(T)) \leq 4 \textsf{Height}(T)$ (see \cite[Equation (48)]{RichierMapBoundaryLimit} for Gromov-Hausdorff version, then the Prohorov bound on measures follows by same reasoning). \item If $T$ is an alternating two-type tree, then $\textsf{Loop}^2(T) = \overline{\textsf{Loop}}(\Phi_{\text{JS}}(T))$ ) (see \cite[Lemma 4.3]{CurKortUIPTPerc}). \item Let $T$ be an alternating two-type Galton-Watson tree with offspring distributions $\xi_{\circ}$ and $\xi_{\bullet}$ such that $\xi_{\circ}$ is shifted geometric with parameter $1-p \in (0,1)$, i.e. $\xi_{\circ}(k) = (1-p)p^k$ for all $k \geq 0$, and $\E{\xi_{\circ}}\E{\xi_{\bullet}} \leq 1$. Then $\Phi_{\text{JS}}(T)$ is a one-type Galton-Watson tree with offspring distribution $\xi$, where $\xi$ is such that $\xi(0) = 1-p$ and $\xi(k) = p \xi_{\bullet}(k-1)$ for all $k \geq 1$ (see \cite[Appendix A]{JanStefLargeFace}). Moreover, under the criticality assumption, this implies that \begin{equation}\label{eqn:dom of att 2 type} \frac{\sum_{i=1}^n \xi^{(i)} - n}{a_n} \overset{(d)}{\rightarrow} Z_{\alpha} \hspace{1cm} \text{if and only if} \hspace{1cm} \frac{\sum_{i=1}^n \xi^{(i)}_{\bullet} - \frac{1-p}{p}n}{p^{\frac{-1}{\alpha}}a_n} \overset{(d)}{\rightarrow} Z_{\alpha}. \end{equation} \end{enumerate} We are now ready to state and prove the convergence result. \begin{theorem}\label{thm:Rich looptree conv} Let $\textsf{Loop}^2(T_{\alpha}^{\infty, 2})$ be above, with $(a_n)_{n \geq 1}$ as in (\ref{eqn:dom of att 2 type}), and let $\nu^2$ be the measure on $\textsf{Loop}^2(T_{\alpha}^{\infty, 2})$ such that $\nu^2(x) = 1$ for all $x \in \textsf{Loop}^2(T_{\alpha}^{\infty, 2})$. Then \[ (\textsf{Loop}^2(T_{\alpha}^{\infty, 2}), a_n^{-1} \d, n^{-1} \nu^2, \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff vague topology as $n \rightarrow \infty$. Again, here $\d$ (respectively $\d^{\infty}$) can denote either the geodesic metric $d$ (respectively $d^{\infty}$), or the effective resistance metric R (respectively $R^{\infty}$). \end{theorem} \begin{proof}[Proof of Theorem \ref{thm:Rich looptree conv}] Using the points above, we will show that there exists a probability space on which we can define both $T_{\alpha}^{\infty, 2}$ and a one-type Galton Watson tree $\tilde{T}_{\alpha}$ satisfying the assumptions of Proposition \ref{prop:inf conv disc loop} such that, for all $r>0$, \begin{equation}\label{eqn:two type loop comp r} d_{GHP} (\mathcal{B}_r\big((\textsf{Loop}^2 (T_{\alpha}^{\infty, 2}), a_n^{-1} \d, n^{-1} \nu', \rho)\big), \mathcal{B}_r\big((\textsf{Loop'} (\tilde{T}_{\alpha}), a_n^{-1} \d, n^{-1} \nu', \rho)\big) \rightarrow 0 \end{equation} almost surely as $n \rightarrow \infty$. As a result, we deduce that these two looptrees have the same Gromov-Hausdorff-Prohorov vague limit. To do this, we first make a definition. As in the one-type case, it follows that $T_{\alpha}^{\infty, 2}$ almost surely has a unique infinite spine on which vertices instead have a size-biased offspring distribution (see \cite[Section 3.1]{StephLocalLim}). Analogously to previous definitions, for any $R>0$ we say that a loop on the corresponding loopspine is $R$-good if it has length at least $4R$ and if the two points at which it is connected to adjacent loops on the loopspine are separated by distance at least $R$. We then let $L_{\alpha}^{2}(R)$ denote the subspace obtained by taking the union of all the loops up to and including the first $R$-good loop on the loopspine, along with any sublooptrees grafted to them. The reason for this definition is that $\mathcal{B}_R(\textsf{Loop}^2 (T_{\alpha}^{\infty, 2})) \subset L_{\alpha}^{2}(R)$, and $L_{\alpha}^{2}(R)$ is a full looptree (i.e. does not contain partial loops). We also let $T_{\alpha}^{2}(R)$ denote the (two-type) tree such that $\textsf{Loop}^2(T_{\alpha}^{2}(R)) = L_{\alpha}^{2}(R)$ (this is well-defined since $\textsf{Loop}^2$ is a bijection). Set $\tilde{T}_{\alpha}^{r,n} = \Phi_{\text{JS}} (T_{\alpha}^{2}(ra_n))$. We make the following observations, based on the facts above. \begin{enumerate} \item By Fact (ii) above, $\overline{\textsf{Loop}} \Big( \tilde{T}_{\alpha}^{r,n}\Big) = L_{\alpha}^2(ra_n)$. \item By Fact (i) above, $d_{GHP} \Big(\overline{\textsf{Loop}} \Big(\tilde{T}_{\alpha}^{r,n}\Big), \textsf{Loop'} \Big( \tilde{T}_{\alpha}^{r,n}\Big) \Big) \leq 4 \textsf{Height} \Big(\tilde{T}_{\alpha}^{r,n}\Big)$. Moreover, $n^{\frac{-1}{\alpha}} \textsf{Height} \Big(\tilde{T}_{\alpha}^{r,n}\Big) \rightarrow 0$ in probability as $n \rightarrow \infty$ since: \begin{align*} \prb{\textsf{Height} \Big(\tilde{T}_{\alpha}^{r,n}\Big) \geq \epsilon n^{\frac{1}{\alpha}}+1} &\leq \prb{\textsf{Height} \Big(T_{\alpha}^{2}(rn^{\frac{1}{\alpha}})\Big) \geq \epsilon n^{\frac{1}{\alpha}}+1} \\ &= (1-p_{r,n})^{\epsilon n^{\frac{1}{\alpha}}} \\ &\leq \exp \{-Cr^{-\alpha}n^{-\frac{\alpha - 1}{\alpha}} \epsilon n^{\frac{1}{\alpha}}\}, \end{align*} where $p_{r,n} = \frac{1}{2} \pr{\hat{\xi}_{\bullet} \geq rn^{\frac{1}{\alpha}}} \sim Cr^{\alpha}n^{\frac{\alpha-1}{\alpha}}$ as $n \rightarrow \infty$ by assumption, since $\hat{\xi}_{\bullet}$ is a size-biased version of $\xi_{\bullet}$. \item By construction and Fact (iii) above, $\mathcal{B}_r \big(\textsf{Loop'} \big( \tilde{T}_{\alpha}^{r,n}\big)\big) = \mathcal{B}_r \big( \textsf{Loop'} \big( \tilde{T}_{\alpha}\big)\big)$, where $\tilde{T}_{\alpha} = \lim_{n \rightarrow \infty}\tilde{T}_{\alpha}^{r,n}$ (the Janson-Stef\'ansson bijection is such that this is well-defined). Moreover, $\tilde{T}_{\alpha}$ is distributed as Kesten's critical tree with offspring distribution $\xi$. \end{enumerate} These three points imply that (\ref{eqn:two type loop comp r}) holds with $\tilde{T}_{\alpha}$ as in Point 3 above. Then, $\tilde{T}_{\alpha}$ satisfies the conditions of Proposition \ref{prop:inf conv disc loop} (in particular, condition (ii) of the Proposition holds by similar arguments to those in Point 2 above), so $(\textsf{Loop'} (\tilde{T}_{\alpha}), a_n^{-1} \d, n^{-1} \nu', \rho) \overset{(d)}{\rightarrow} \L^{\infty}_{\alpha}$ as $n \rightarrow \infty$. Since these $T_{\alpha}^{\infty, 2}$ and $\tilde{T}_{\alpha}$ are defined on a common probability space, (\ref{eqn:two type loop comp r}) therefore implies the same distributional result for $(\textsf{Loop}^2 (T_{\alpha}^{\infty, 2}), a_n^{-1} \d, n^{-1} \nu', \rho)$. \end{proof} \begin{remark} In \cite{RichierIICUIHPT}, these two-type looptrees are coded by upward skip-free random walks in a similar way to the one-type case. It is also possible to write an analogous result to Proposition \ref{prop:inf conv disc loop} in this case, under more general assumptions on the coding functions. \end{remark} \section{Volume bounds and resistance estimates for infinite stable looptrees}\label{sctn:vol bounds and spectral dim infinite} In this section, we prove precise estimates on the volume and resistance growth properties of infinite stable looptrees. These are of interest in their own right but in Section \ref{sctn:RW consequences} we also use these to obtain bounds on the heat kernel, and use the resistance estimate to verify that the non-explosion conditions of Theorems \ref{thm:scaling lim RW resistance} and \ref{thm:scaling lim RW resistance annealed} are satisfied when we prove Theorems \ref{thm:main RW LLT conv} and \ref{thm:RW conv infinite intro}, along with their annealed counterparts. In \cite[Section 5]{ArchBMCompactLooptrees}, we conduct a much more detailed study of the volume growth properties of compact stable looptrees, including proving similar results to those in Theorem \ref{thm:vol bounds} below. For this reason we will therefore skip some technical proof details when they are the same as in \cite{ArchBMCompactLooptrees}. The full results are as follows. The result holds regardless of whether we define the balls in terms of $R^{\infty}$ or $d^{\infty}$, since the two metrics are equivalent. In particular, it is sufficient to prove the result for $d^{\infty}$ only, which is easier to handle. We do this below. \begin{theorem}(cf \cite[Theorem 1.4]{ArchBMCompactLooptrees}).\label{thm:vol bounds} $\mathbf{P}$-almost surely, we have: \begin{align*} &\limsup_{r \uparrow \infty} \Bigg( \frac{\nu^{\infty}(B^{\infty}(\rho^{\infty}, r))}{r^{\alpha} (\log \log r)^{\frac{4\alpha - 3}{{\alpha - 1}}}} \Bigg) < \infty, &&\limsup_{r \uparrow \infty} \Bigg( \frac{\nu^{\infty} (B^{\infty}(\rho^{\infty}, r))}{r^{\alpha} \log \log r} \Bigg) > 0, \\ &\liminf_{r \uparrow \infty} \Bigg( \frac{\nu^{\infty}(B^{\infty}(\rho^{\infty}, r))}{r^{\alpha}(\log \log r)^{-\alpha}} \Bigg) > 0, &&\liminf_{r \uparrow \infty} \Bigg( \frac{\nu^{\infty} (B^{\infty}(\rho^{\infty}, r))}{r^{\alpha} (\log \log r)^{-(\alpha - 1)}} \Bigg) < \infty. \end{align*} Moreover, $\mathbf{P}$-almost surely, for $\nu^{\infty}$-almost every $u \in \L^{\infty}_{\alpha}$ we have \begin{align*} &\limsup_{r \downarrow 0} \Bigg( \frac{\nu^{\infty}(B^{\infty}(u, r))}{r^{\alpha} (\log \log r^{-1})^{\frac{4\alpha - 3}{{\alpha - 1}}}} \Bigg) < \infty, &&\limsup_{r \downarrow 0} \Bigg( \frac{\nu^{\infty} (B^{\infty}(u, r))}{r^{\alpha} \log \log r^{-1}} \Bigg) > 0, \\ &\liminf_{r \downarrow 0} \Bigg( \frac{\nu^{\infty}(B^{\infty}(u, r))}{r^{\alpha}(\log \log r^{-1})^{-\alpha}} \Bigg) > 0, &&\liminf_{r \downarrow 0} \Bigg( \frac{\nu^{\infty} (B^{\infty}(u, r))}{r^{\alpha} (\log \log r^{-1})^{-(\alpha - 1)}} \Bigg) < \infty. \end{align*} \end{theorem} \begin{theorem}\label{thm:res bounds} $\mathbf{P}$-almost surely, there exists a constant $c>0$ such that for all $r>0$, \[ cr (\log \log (r \vee r^{-1}))^{\frac{-(3\alpha - 2)}{\alpha - 1}} \leq R^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, r)^c) \leq r. \] \end{theorem} These results are obtained as a consequence of the following propositions. \begin{proposition}\label{prop:vol results infinite} There exist constants $c, c', C, C' \in (0, \infty)$ such that for all $r>0$, $\lambda >1$: \begin{align*} C\exp \{-c\lambda^{\frac{1}{\alpha - 1}}\} \leq \prb{ \nu^{\infty} (B^{\infty}(\rho^{\infty}, r)) < r^{\alpha} \lambda^{-1}} &\leq C'\exp \{-c'\lambda^{\frac{1}{\alpha}}\} \\ C e^{-c \lambda} \leq \prb{ \nu^{\infty} (B^{\infty}(\rho^{\infty}, r)) \geq r^{\alpha} \lambda} &\leq C' \lambda^{\frac{\alpha - 1}{4\alpha - 3}} e^{-c'\lambda^{\frac{\alpha - 1}{4\alpha - 3}}}. \end{align*} \end{proposition} \begin{proposition}\label{prop:resistance results infinite} There exist constants $C, c \in (0, \infty)$ such that for all $r>0, \lambda > 1$: \[ \prb{R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, r)^c) \leq r\lambda^{-1}} \leq Ce^{-c\lambda^{\frac{1}{4}}}. \] \end{proposition} By applying Borel-Cantelli arguments along the sequence $r_n = 2^n$ (respectively $r_n=2^{-n}$) in Propositions \ref{prop:vol results infinite} and \ref{prop:resistance results infinite}, we obtain the results of Theorems \ref{thm:vol bounds} and \ref{thm:res bounds} for the regime $r \uparrow \infty$ (respectively $r \downarrow 0$). For any $R \in (0, \infty)$, the local results can then be extended to $\nu^{\infty}$-almost every $u \in \L_{\alpha}^{\infty,R}$ by uniform re-rooting invariance (recall that $(\L_{\alpha}^{\infty, R})_{R \geq 0}$ is a sequence of nested compact looptrees that exhaust $\L^{\infty}_{\alpha}$). Taking $R \rightarrow \infty$ then gives the result. Before outlining the proofs of Propositions \ref{prop:vol results infinite} and \ref{prop:resistance results infinite}, we briefly explain how the fractal structure of $\L^{\infty}_{\alpha}$ can be encoded using the Ulam-Harris tree. This will be useful in the proofs of both propositions. This representation is very similar to the one described for compact looptrees in \cite[Section 5.2.1]{ArchBMCompactLooptrees}, except that at the first level we will decompose along the infinite loopspine rather than the W-loopspine. \subsection{Encoding the looptree structure in a branching process} The Williams' decomposition of Section \ref{sctn:Williams Decomp} suggests a natural way to encode the fractal structure of $\L^{\infty}_{\alpha}$ in a branching process, which we will label using the Ulam-Harris numbering convention of Section \ref{sctn:trees background discrete}. Although the Williams' decomposition is defined along the maximal spine from the root of a compact tree, it follows from uniform rerooting invariance of stable trees that we can apply the same procedure from a uniform point instead, without changing the distribution of the decomposition. Specifically, we let $\emptyset$ denote the root vertex of our branching process. This will represent the whole looptree $\L^{\infty}_{\alpha}$ (in particular, $\emptyset$ should not be confused with $\rho^{\infty}$, which is the root of $\L^{\infty}_{\alpha}$). We decompose $\L^{\infty}_{\alpha}$ by removing the infinite loopspine, and denote the resulting fragments by $(\L_{\alpha}^{(i,o)})_{i=1}^{\infty}$. Moreover, we let ${\L_{\alpha}^{(i)}}$ denote the closure of $\L_{\alpha}^{(i,o)}$ in $\L^{\infty}_{\alpha}$, and remark that it follows from standard properties of the It\^o excursion measure that $\mathbf{P}$-almost surely, $\L_{\alpha}^{(i)} = \L_{\alpha}^{(i,o)} \cup \{\rho_i\}$ for each $i$. We call $\rho_i$ the root of $\L_{\alpha}(i)$ as it is the point at which $\L_{\alpha}^{(i)}$ is grafted to the infinite loopspine. It again follows from standard properties of the It\^o excursion measure that each fragment $\L_{\alpha}^{(i)}$ is an independent (unconditioned) copy of a compact stable looptree, coded by an instance of the It\^o measure. We will view the set $(\L_{\alpha}^{(i)})_{i=1}^{\infty}$ as the children of $\emptyset$ in our branching process, and we will index them by $\mathbb{N}$. Moreover, to each edge joining $\emptyset$ to one of its offspring $i$, we associate a random variable $m_i = m (\emptyset,i)$ which gives the mass of the sublooptree corresponding to index $i$. We then repeat this decomposition along each of the sublooptrees $\L_{\alpha}^{(i)}$, with the minor modification that we decompose along the W-loopspine rather than the infinite loopspine. More precisely, if $i$ is a child of $\emptyset$, we can decompose along its W-loopspine from its root to its point of maximal tree height to obtain a countable collection of fragments. By taking the appropriate closures, these fragments are sublooptrees and will form the offspring of $i$ in our branching process. We label the offspring as $(ij)_{j \geq 1}$. By repeating this procedure again and again on the resulting subsublooptrees, we can keep iterating to obtain an infinite branching process. \begin{remark} The spinal decomposition of \cite{HPWSpinPart} obtained by taking the loopspine to be from $p(U)$ (or the root) to an independent uniform point $p(V)$ is perhaps the most natural candidate to use as the basis of this iterative procedure, but when using this to bound the mass of small balls in $\L_{\alpha}$ this leads to technical difficulties in the case when $V$ is chosen so that $p(V)$ is a point too close to $p(U)$. This difficulty is avoided by instead picking the maximal spine in the underlying tree. \end{remark} We index this process using the Ulam-Harris tree \[ \mathcal{U} = \bigcup_{n=0}^{\infty}\mathbb{N}^{n} \] defined in Section \ref{sctn:trees background discrete}. Using the notation of \cite{Neveu}, an element of our branching process will be denoted by $u = u_1 u_2 u_3 \ldots u_j$, and corresponds to a sublooptree which we denote by $\L_{\alpha}^{(u)} \subset \L^{\infty}_{\alpha}$. Its offspring will all be of the form $(u i)_{i \in \mathbb{N}}$, where $ui$ here abbreviates the concatenation $u_1 u_2 u_3 \ldots u_j i$, and each will correspond to one of the further sublooptrees obtained on performing a Williams' decomposition of $\L_{\alpha}^{(u)}$. For each element $u \in \mathcal{U}$, we set \[ M_u := \nu^{\infty} (\L_{\alpha}^{(u)}), \] by viewing $\L_{\alpha}^{(u)}$ as a subset of $\L^{\infty}_{\alpha}$. In the proofs of Propositions \ref{prop:vol results infinite} and \ref{prop:resistance results infinite}, we will select subtrees $T_{\text{vol}}, T_{\text{res}} \subset \mathcal{U}$ which index sublooptrees of large mass or large diameter. We make this more precise in the box below, where we describe the procedure used to obtain $T_{\text{vol}}$. \subsection{Volume bounds} To maintain consistency with the notation of \cite{ArchBMCompactLooptrees}, we take: \begin{align*} \beta_1 = \frac{\alpha - 1}{4\alpha - 3}, \hspace{5mm} \beta_2 = \frac{\alpha - 1}{4\alpha - 3}, \hspace{5mm} \beta_3 = \frac{2\alpha - 1}{2\alpha (4\alpha - 3)}, \hspace{5mm} \beta_4 = \frac{1}{4\alpha - 3}. \end{align*} The main point to remember is that $\beta_i \in (0,1)$ for all $i$. These precise values have been chosen to optimise the final exponent on $\lambda$, but are otherwise not important. \begin{tcolorbox}[colback=white] \textbf{Iterative Algorithm}\\ Start by taking $\emptyset$ to be the root of $T_{\text{vol}}$. Recall this represents the whole looptree $\L^{\infty}_{\alpha}$. \begin{enumerate} \item Perform a decomposition of $\L^{\infty}_{\alpha}$ along its infinite loopspine. \item Consider the resulting fragments. To choose the offspring of $\emptyset$, select the fragments that have mass at least $r^{\alpha} \lambda^{1-\beta_1-\beta_2}$, and such that the roots of the corresponding sublooptrees are within distance $r$ of the root of $\emptyset$. \item Repeat this process to construct $T_{\text{vol}}$ in the usual Galton-Watson way. Given an element $u = u_1 u_2 \ldots u_j \in T_{\text{vol}}$, there is a corresponding sublooptree $\L_{\alpha}^{(u)}$ in $\L^{\infty}_{\alpha}$ with root $\rho_u$ and $M_u \geq r^{\alpha} \lambda^{1-\beta_1-\beta_2}$. Consider the fragments obtained in a Williams' decomposition of $\L_{\alpha}^{(u)}$, and select those that correspond to further sublooptrees that are within distance $r$ of $\rho_u$, and also such that $M_{u_1 u_2 \ldots u_j u_{j+1}} \geq r^{\alpha} \lambda^{1-\beta_1-\beta_2}$, to be the offspring of $u$. \item For each $u = u_1 u_2 \ldots u_j \in T_{\text{vol}}$, set \[ S_u = \sum_{i=1}^{\infty} M_{ui} \mathbb{1} \Big\{ \rho_{ui} \in B (\rho_u, r) \Big\} \mathbb{1} \Big\{ M_{ui} < r^{\alpha} \lambda^{1-\beta_1-\beta_2} \Big\}. \] \end{enumerate} \end{tcolorbox} By the discussion above, this algorithm is $\mathbf{P}$-almost surely well defined, and is very similar to the decomposition of compact stable looptrees used in \cite[Section 5.2.2]{ArchBMCompactLooptrees}. As explained there, in the event that $T_{\text{vol}}$ is finite we then have that: \begin{equation}\label{eqn:vol bound iter} \nu^{\infty}(B^{\infty}(\rho^{\infty}, r)) \leq \sum_{u \in T_{\text{vol}}} S_u. \end{equation} Using this, we can now prove Theorem \ref{thm:vol bounds}. We skip some technical details since they are quite lengthy and can be carried out exactly as in the compact case, which is explained fully in \cite[Section 5]{ArchBMCompactLooptrees}, but comment on any necessary modifications for the infinite case. \begin{proof}[Proof of Theorem \ref{thm:vol bounds}, outline only] We start by proving the volume lower bounds, since the proof strategy is simpler than for the upper bounds. We use the L\'{e}vy coding mechanism of Section \ref{sctn:looptree def} and known fluctuation results for stable L\'{e}vy processes. It is not to hard to see (perhaps with the help of a picture, though this is proved formally in \cite[Lemma 2.1(ii)]{RSLTCurKort} in the compact case), that for any $[s,t]$ in $[0,1]$, \begin{equation}\label{eqn:osc dist relation} d^{\infty}(s,t) \leq X^{\infty}_s + X^{\infty}_t -2\inf_{r \in [s,t]} X^{\infty}_r. \end{equation} Recall also from Section \ref{sctn:Useful results} that \[ \textsf{Osc}_{[a,b]} X^{\infty} := \sup_{s, t \in [a,b]} |X^{\infty}_t - X^{\infty}_s|. \] We deduce from (\ref{eqn:osc dist relation}) that if $\textsf{Osc}_{[0, r^{\alpha}\kappa]} X^{\infty} \leq \frac{1}{2}r$, then $B^{\infty}(\rho^{\infty}, r) \geq r^{\alpha}\kappa$. By applying the Vervaat transform and absolute continuity relation of (\ref{eqn:RN deriv levy bridge}), and taking either $\kappa = \lambda$, or $\kappa = \lambda^{-1}$, we are then able to use standard results for fluctuations of unconditioned L\'{e}vy processes to control the behaviour of \textsf{Osc}, and obtain the volume lower bounds. This is done rigorously in \cite[Sections 5.1 and 5.3]{ArchBMCompactLooptrees}. The only difference in the arguments used there is that in the compact place, we have to replace $X^{\infty}$ with $X^{\text{exc}}$ in (\ref{eqn:osc dist relation}). However, all the proofs of \cite{ArchBMCompactLooptrees} proceed by using the Vervaat transform and absolute continuity relation to compare $X^{\text{exc}}$ with an unconditioned L\'{e}vy process $X$. In the infinite case the proof is therefore simpler since we are already working with the unconditioned process. The L\'{e}vy process picture is not so useful for proving precise volume upper bounds since the relation (\ref{eqn:osc dist relation}) is not an equality. In fact, the upper bound it gives on the distance is quite rough since any single jump in $X^{\text{exc}}$ contributes quite heavily to \textsf{Osc}, but does not immediately contribute to distances in looptrees. In particular, an entire jump corresponds to traversing an entire loop and therefore (initially) contributes zero overall distance in the looptree. Set $p(\lambda) = \lambda^{\frac{\alpha - 1}{4\alpha - 3}} e^{-c'\lambda^{\frac{\alpha - 1}{4\alpha - 3}}}$. To obtain the volume upper bounds, or, more precisely, to show that $\prb{ \nu^{\infty} (B^{\infty}(\rho^{\infty}, r)) \geq r^{\alpha} \lambda} \leq p(\lambda)$, we therefore use the approach indicated by (\ref{eqn:vol bound iter}) above. The proof consists of two main steps: \begin{enumerate}[(i)] \item Bounding the progeny of $T_{\text{vol}}$; \item Bounding each of the terms $(S_u)_{u \in T_{\text{vol}}}$. \end{enumerate} Again, these can be broken down into smaller steps. For $(i)$, we first show that the length of loopspine (or W-loopspine) contained in $B^{\infty}(\rho_u, r)$ is upper bounded by $r\lambda^{\beta_3}$ with probability at least $1-C'p(\lambda)$ (cf \cite[Lemma 5.5]{ArchBMCompactLooptrees}). Conditional on this, using the Poisson property of successive It\^o excursions, the number of offspring of $\L_{\alpha}^{(u)}$ can essentially be stochastically dominated by a \textsf{Poisson}$(K_{\alpha}\lambda^{2\beta_3 - \frac{1}{\alpha}({1-\beta_1-\beta_2})})$ random variable, where $K_{\alpha}$ is just a constant (cf \cite[Lemma 5.6]{ArchBMCompactLooptrees}). This is a subcritical offspring distribution, and by applying the main theorem of \cite{DwassProg} we deduce that, with probability at least $1-C'p(\lambda)$, $|T_{\text{vol}}| \leq \lambda^{\beta_1}$. We now discuss a bound for a single term of the form $S_u$, as in point $(ii)$. We use the fact that the sum of the lifetimes of successive It\^o excursions (recall that these represent the volumes of successive sublooptrees arranged around the loopspine) can be represented as an $\alpha^{-1}$-stable subordinator with jump sizes corresponding to the original excursion lengths (e.g. see \cite[proof of Proposition 5.6]{GoldHaasExtinctionStable}), which we denote by $\textsf{Sub}$. In particular, since (as above) the relevant length of loopspine (or W-loopspine) contained in $B^{\infty}(\rho_u, r)$ is upper bounded by $r\lambda^{\beta_3}$, we can upper bound $S_u$ by $\textsf{Sub}_{r\lambda^{\beta_3}}$. Moreover, all jumps greater than $r\lambda^{1-\beta_1-\beta_2}$ have been removed from $S$ as a result of the construction of $T_{\text{vol}}$, which allows us to apply Lemma \ref{lem:osc} to deduce that, with probability at least $1-C'p(\lambda)$, for all $u \in T_{\text{vol}}$: \[ S_u \leq \textsf{Sub}_{r\lambda^{\beta_3}} \leq r^{\alpha}\lambda^{1-\beta_1}. \] By taking a union bound and summing up, we therefore deduce that, with probability at least $1-C'p(\lambda)$, \begin{equation*} \nu^{\infty}(B^{\infty}(\rho^{\infty}, r)) \leq \sum_{u \in T_{\text{vol}}} S_u \leq |T_{\text{vol}}| \sup_{u \in T_{\text{vol}}} S_u \leq \lambda^{\beta_1}r^{\alpha}\lambda^{1-\beta_1} = r^{\alpha}\lambda. \end{equation*} The method to obtain the infimal volume upper bound is simpler and does not require reiterating around subsequent levels. We will say that a radius $r \in (0, \infty)$ is ``short" if the length of loopspine contained within $B^{\infty}(\rho^{\infty}, r)$ is at most $3r$. By scaling invariance of $\L^{\infty}_{\alpha}$, the probability that $r$ is short is a (non-zero) constant that is independent of $r$ (or more usefully for an application of a generalised version of the second Borel-Cantelli Lemma, $\prcondb{r \text{ short}}{2r \text{ not short}}{}$ and $\prcondb{r \text{ short}}{\frac{1}{2}r \text{ not short}}{}$ are independent of $r$). On the event that $r$ is short, and using the same logic as above, we can bound the sum of the volumes of all the incident sublooptrees by $\textsf{Sub}_{3r}$, which is independent of the loopspine structure. Therefore, by repeating this argument along a subsequence $r_n \downarrow 0$ or $r_n \uparrow \infty$ of short radii, the infimal volumes will be upper bounded by the infimal behaviour of \textsf{Sub}, i.e. with fluctuations at least of order $(\log \log r^{-1})^{-(\alpha - 1)}$ as $r \downarrow 0$, and $(\log \log r)^{-(\alpha - 1)}$ as $r \uparrow \infty$. \end{proof} \subsection{Applications to volume limits in compact stable looptrees}\label{sctn:infinite looptrees unit balls} As a result of Theorem \ref{thm:LLT}, we are able to prove various volume convergence results that are exploited in \cite{ArchBMCompactLooptrees} to study Brownian motion on compact stable looptrees. The main applicable result is the following theorem. Here we let $\nu$ denote the intrinsic measure on a compact stable looptree $\L_{\alpha}$ as defined in Section \ref{sctn:looptree def}, conditioned so that $\nu(\L_{\alpha})=1$. We also let $B(\rho, r)$ denote the open ball of radius $r$ around the root in $\L_{\alpha}$, and $\bar{B}(\rho, r)$ its closure. \begin{theorem}\label{thm:main vol conv} There exists a random variable $(V_t)_{t \geq 0}: \Omega \rightarrow D([0, \infty), [0, \infty))$ such that the finite dimensional distributions of the process \begin{align*} \big( r^{-\alpha} \nu(\bar{B}(\rho, rt)) \big)_{t \geq 0} \end{align*} converge to those of $\big( V_t \big)_{t \geq 0}$ as $r \downarrow 0$, and $V_t$ denotes the volume of a closed ball of radius $t$ around the root in $\L^{\infty}_{\alpha}$. Moreover, for any $p \in [1,\infty)$, setting $V:=V_1$ we have that $\Eb{V^p} < \infty$, and that \[ r^{-\alpha p} \Eb{\nu(\bar{B}(\rho, r))^p} {\rightarrow} \Eb{V^p} \] as $r \downarrow 0$. \begin{remark} We have taken closed balls rather than open ones simply so that $V$ is c\`adl\`ag. We conjecture that the volume processes are in fact continuous, and that the convergence of the theorem can be extended to hold uniformly on compacts. However, due to the complex nature of looptrees, this is not straightforward to prove. In particular it is difficult to replicate the argument used to prove a similar result for stable trees, since looptrees do not have such a straightforward regeneration structure around the boundary of a ball of radius $r$. \end{remark} \begin{proof} By the separability of Proposition \ref{thm:GH vague separable HB}, we can work on a probability space on which $\L^{\l}_{\alpha} \rightarrow \L^{\infty}_{\alpha}$ almost surely as $\l \rightarrow \infty$. By standard results on metric space convergence, it follows that almost surely on this space, $\nu^{\l}(B^{\l}(\rho^{\l}, t)) \rightarrow \nu^{\infty}(B^{\infty}(\rho^{\infty}, t))$ for all $t$ such that $\nu^{\infty}(\partial B^{\infty}(\rho^{\infty}, t)) = 0$ (e.g. see \cite[Lemma 2.11]{GwynneMillerUIHPQscaling}), and therefore for Lebesgue almost every $t$. Moreover, by scaling invariance of $\L^{\infty}_{\alpha}$, there are no ``special" values of $t$, so we deduce that for any fixed sequence $0<t_0<t_1 < \ldots < t_n < \infty$, the convergence almost surely holds simultaneously for all of the points $t_i, 0 \leq i \leq n$. Since $(\nu^{\l}(B^{\l}(\rho, t)))_{t \geq 0} \overset{(d)}{=} ({\l} \nu B(\rho, {\l}^{\frac{-1}{\alpha}} t))_{t \geq 0}$, by writing $\l = r^{-\alpha}$ we therefore deduce the result as stated. In particular, it follows that $\nu^{\l} ({B^{\l}(\rho^{\l}, 1)}) \overset{(d)}{\rightarrow} V$ as $\l \rightarrow \infty$. We claim that $V \in (0, \infty)$ almost surely, with all moments finite. This follows immediately from the exponential upper tails of Proposition \ref{prop:vol results infinite}, namely that \begin{align}\label{eqn:V exp tails} \prb{ V \geq \lambda} \leq C \lambda^{\frac{\alpha - 1}{4\alpha - 3}} e^{-c\lambda^{\frac{\alpha - 1}{4\alpha - 3}}}. \end{align} We now prove that the moments of $r^{-\alpha} \nu_1(B(\rho_1, r))$ converge to those of $V$. To see this, we observe that the arguments used to prove (\ref{eqn:V exp tails}) and the compact analogue in \cite[Proposition 5.4]{ArchBMCompactLooptrees} can be applied uniformly along the sequence $\L^{\l}_{\alpha}$ to give constants $c, C \in (0, \infty)$ such that \begin{align*} \prbl{ \nu^{\l} (B^{\l}(\rho, r)) \geq r^{\alpha} \lambda} \leq C \lambda^{\frac{\alpha - 1}{4\alpha - 3}} e^{-c\lambda^{\frac{\alpha - 1}{4\alpha - 3}}} \end{align*} for all $\l \geq 1$. It follows that the sequence $(r^{-\alpha p} (\nu^{\l} (B^{\l}(\rho, r)))^p )_{\l \geq 1}$ is uniformly integrable for all $p \geq 1$ and so setting $C_p = \Eb{V^p}$ we deduce that \begin{align*} r^{-\alpha p} \Eb{(\nu_1(B(\rho_1, r)))^p} \rightarrow C_p \end{align*} for all $p \geq 1$. \end{proof} \end{theorem} \subsection{Resistance bounds} We now turn to proving the resistance bounds. We use a version of the iterative procedure described above, which we again index by a subcritical branching process, to count the number of sublooptrees intersecting the boundary of a ball of radius $r$. More formally, we will define another subtree $T_{\text{res}} \subset \mathcal{U}$, but this time selecting sublooptrees of large diameter, rather than of large volume, to form the offspring at each step. Since this argument is not given in \cite{ArchBMCompactLooptrees}, we write it more carefully. We first recall from Section \ref{sctn:looptree def} that the $L$-Height of a compact looptree $\tilde{\L_{\alpha}}$ is given by $\sup_{u \in \tilde{\L_{\alpha}}} d_{\tilde{\L_{\alpha}}}(\rho, u)$, and the $L^m$-Height is given by $\max \tilde{X}^{\text{exc}}$. The $L^m$-Height is $\mathbf{P}$-almost surely realised by a unique point in $\tilde{\L_{\alpha}}$, which we denote $u_m$. We refer to (the closure of) the set of loops coded by the ancestors of $u_m$ as the $m$-loopspine. As described in Section \ref{sctn:Williams Decomp}, the Poisson measure describing the loop lengths along the loopspine will have the form \begin{equation}\label{eqn:m loopspine loop measure} C_{\alpha} \mathbb{1}_{\{ [0,1] \}}(u) \mathbb{1}_{\{[0,H^m]\}}(t) l^{-\alpha} \textsf{pen}(l,H^m,t) du \ dt \ dl, \end{equation} where $C_{\alpha} = \frac{\alpha (\alpha - 1)}{\Gamma (2-\alpha)}$, as before, $H^m = T^m\text{-Height}(\tilde{\L_{\alpha}})$, and \textsf{pen} is a penalty term that is bounded above and below by a constant on the first half of the m-spine. Moreover, the sublooptrees grafted to the m-loopspine will be coded by a thinned version of the It\^o excursion measure. We now define some terminology, in keeping with that used in \cite[Section 5.2]{ArchBMCompactLooptrees} wherever possible. Firstly, given $R>0$, we say that a loop on the m-loopspine is ``good" if it has length at least $4R$, and if the associated uniform random variable (that dictates the ratio of the two segments it splits into on either side of the loopspine) is in the interval $[\frac{1}{4}, \frac{3}{4}]$. We say the a loop is ``goodish" if it just has length at least $4R$. Additionally, for any $R>0$, and any (unconditioned) compact looptree $\tilde{\L_{\alpha}}$ (respectively any infinite looptree $\L^{\infty}_{\alpha}$), we let $I^m_R$ be the closure in $\tilde{\L_{\alpha}}$ (respectively $\L^{\infty}_{\alpha}$) of the union of all the loops in the m-loopspine (respectively infinite loopspine) that intersect $\tilde{B}(\tilde{\rho}, R)$ (respectively $B^{\infty}(\rho^{\infty}, R)$). Additionally, we let $|I^m_R|$ be the sum of the lengths of these loops We start by giving a technical lemma, the proof of which may be skipped on a first reading. \begin{lemma}(cf \cite[Lemma 5.5]{ArchBMCompactLooptrees}).\label{lem:segment length bound infinite} For any $h>0, \lambda > 1, R< \lambda^{-1-\frac{h}{\alpha - 1}}$, \begin{equation*} \prcondb{|I^m_{R}| \geq 3R \lambda}{L^m\textup{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} \leq Ce^{-c\lambda^{h \wedge 1}}. \end{equation*} \end{lemma} \begin{proof} We use a similar strategy to \cite[Lemma 5.5]{ArchBMCompactLooptrees}. Indeed, we first condition on existence of a good loop in the m-loopspine. We then select the closest good loop to $\rho$. Given such a loop, the number of goodish loops between $\rho$ and the first good loop is stochastically dominated by $N-1$, where $N$ is a Geometric($\frac{1}{2}$) random variable. $|I^m_R|$ can then be upper bounded by the random variable \begin{equation}\label{eqn:loopspine length decomp} 2RN + \sum_{i=1}^{N} Q^{(i)}, \end{equation} where $Q^{(i)}$ denotes the sum of the lengths of all the smaller loops on the m-loopspine that are between the $(i-1)^{\text{th}}$ and $i^{\text{th}}$ goodish loops, and the term $2RN$ comes from selecting a segment of length at most $R$ in each direction round each of the goodish loops. Each $Q^{(i)}$ can be independently approximated by an $(\alpha - 1)$-stable subordinator run up until an exponential time and conditioned not to have any jumps greater than $4R$. Since we model the loop lengths by a subordinator indexed by the m-spine of the underlying tree, we upper bound the probability in question by: \begin{align}\label{eqn:length height decomp} \begin{split} &\prcondb{|I^m_{R}| \geq 3R \lambda, T^m\text{-Height}(\tilde{\L_{\alpha}}) \geq R^{\alpha -1}\lambda^{h}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} \\ &+ \prcondb{|I^m_{R}| \geq 3R \lambda, T^m\text{-Height}(\tilde{\L_{\alpha}}) \leq R^{\alpha -1}\lambda^{h}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{}. \end{split} \end{align} The first of these terms can be upper bounded by $Ce^{-c\lambda}$ using exactly the same arguments as in \cite[Lemma 5.5]{ArchBMCompactLooptrees}, the point being that if the m-spine in the underlying tree is long enough, then there is plenty of time for a good loop to occur in the corresponding subordinator (though note that to do this formally, we have to deal with the penalty term of (\ref{eqn:m loopspine loop measure}), but this is minor and can be treated as in \cite[Lemma 5.5]{ArchBMCompactLooptrees}). To summarise more concretely: \begin{itemize} \item The number of good loops on the m-loopspine is stochastically dominated by a \textsf{Poisson}(c$\lambda^h$) random variable, so $\prb{\nexists \text{ a good loop }} \leq e^{-c \lambda^h}$. \item $N$ is \textsf{Geometric}($\frac{1}{2}$), so $\prb{N \geq \lambda} \leq Ce^{-c\lambda}$. \item $\prb{\sum_{i=1}^{N} Q^{(i)} \geq R \lambda} \leq C e^{-c \lambda}$. Indeed, by (\ref{eqn:m loopspine loop measure}), we can (independently for each $i$) stochastically dominate each term $Q^{(i)}$ by an $(\alpha - 1)$-stable subordinator $\textsf{Sub}^{(i)}$ with all jumps greater than $4R$ removed, run up until a time $\mathcal{E}_R \sim \textsf{exp}(cR^{\frac{-1}{\alpha - 1}}$). We also let $\textsf{Sub}^{(i)'}$ denote a rescaled version of $\textsf{Sub}^{(i)}$, instead with all jumps greater than $4$ removed, and let $\mathcal{E} \sim \textsf{exp}(c)$. By rescaling $\textsf{Sub}^{(i)}$ and choosing $\theta$ so that $\Eb{e^{\theta \textsf{Sub}^{(i)'}}} < \frac{3}{2}$ (which we can do by Lemma \ref{lem:osc}), we then have that \begin{align}\label{eqn:Qi bound} \begin{split} \prb{\sum_{i=1}^{N} Q^{(i)} \geq R \lambda} &= \sum_{n=1}^{\infty}\prcondb{\sum_{i=1}^{N} \textsf{Sub}^{(i)'}_{\mathcal{E}} \geq \lambda}{N=n}{} \prb{N=n} \\ &\leq \sum_{n=1}^{\infty} \Big(\frac{3}{2}\Big)^n e^{-\theta \lambda} \Big(\frac{1}{2}\Big)^n \\ &= C_{\theta} e^{-\theta \lambda}. \end{split} \end{align} \end{itemize} This deals with the first term in (\ref{eqn:length height decomp}). If the m-spine is prohibitively short, then this logic cannot be applied, however we can remedy this by noting that if the $T^m$-Height is unusually small in relation to the $L^m$-Height, then this essentially forces the loop sizes to be large compared to what we would normally expect. More concretely, in this case, let $M'$ be the total number of goodish loops on the m-loopspine (i.e. the total number of loops of length at least $4R$). Using the subordinator representation of the loop lengths, we then have that \begin{align*} &\prcondb{M' \leq \lambda, T^m\text{-Height}(\tilde{\L_{\alpha}}) \leq R^{\alpha -1}\lambda^{h}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} \\ &\hspace{20mm}\leq c\prb{M' \leq \lambda, L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2},T^m\text{-Height}(\tilde{\L_{\alpha}}) \leq R^{\alpha -1}\lambda^{h}} \\ &\hspace{20mm}\leq c\prcondb{\textsf{Sub}_{ R^{\alpha -1}\lambda^{h}} \geq \frac{1}{2} - 4R\lambda}{\text{no jumps of size at least } 4R}{}, \end{align*} where the third line follows by removing any jumps corresponding to goodish loops from \textsf{Sub}, and \textsf{Sub} is a subordinator with (time-dependent) jump measure \[ C_{\alpha} \mathbb{1}_{\{ [0,1] \}}(u) \mathbb{1}_{\{[0,H^m]\}}(t) l^{-\alpha} \textsf{pen}(l,H^m,t) du \ dt \ dl, \] as in (\ref{eqn:m loopspine loop measure}). Note that $\textsf{Sub}$ is almost an $(\alpha - 1)$-stable subordinator, but with the extra penalty against larger jumps. We therefore let $\textsf{Sub}^{\alpha - 1}$ denote an $(\alpha - 1)$-stable subordinator. It follows that for any $k>0$, and any $t, x, y > 0$: \begin{align*} \prcondb{\textsf{Sub}_{t} \geq x}{\text{no jumps of size at least } y}{} &\leq \prcondb{\textsf{Sub}^{\alpha - 1}_{t} \geq x}{\text{no jumps of size at least } y}{} \\ &= \prcondb{\textsf{Sub}^{\alpha-1}_{k^{\alpha - 1}t} \geq kx}{\text{no jumps of size at least } ky}{}. \end{align*} Taking $k=R^{-1}\lambda^{\frac{-h}{\alpha-1}}$, we therefore see that \begin{align*} &\prcondb{M' \leq \lambda, T^m\text{-Height}(\tilde{\L_{\alpha}}) \leq R^{\alpha -1}\lambda^{h}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} \\ &\hspace{20mm}\leq \prcondb{\textsf{Sub}^{\alpha-1}_{1} \geq \frac{1}{2} R^{-1}\lambda^{\frac{-h}{\alpha-1}} - \lambda^{1 - \frac{h}{\alpha-1}} }{\text{no jumps at least } 4\lambda^{-\frac{h}{\alpha-1}}}{} \\ &\hspace{20mm}\leq \Eb{e^{\theta \textsf{Sub}^{\alpha-1}_1}} e^{-\theta \lambda} \end{align*} for sufficiently small $\theta > 0$, where the existence of the exponential moment in the last line follows from Remark \ref{rmk:osc deterministic}, and we recall that $R< \lambda^{-1-\frac{h}{\alpha - 1}}$ by assumption. We can then proceed exactly as in the second and third bullet points above to deduce that the second term in (\ref{eqn:length height decomp}) is upper bounded by $Ce^{-c\lambda}$. This completes the proof. \end{proof} \begin{proof}[Proof of Proposition \ref{prop:resistance results infinite}] By scaling invariance of $\L^{\infty}_{\alpha}$, it is sufficient to prove the result for $r=1$. Take $R=\lambda^{-2t}$, for some positive constant $t$ that will be specified later. The aim will be to bound the cardinality of a set $A \subset \L^{\infty}_{\alpha}$ such that any path from $B^{\infty}(\rho^{\infty}, R)$ to $B^{\infty}(\rho^{\infty}, 1)^c$ must pass through at least one point in $A$. Do to this, we will define a tree $T_{\text{res}} \subset \mathcal{U}$, obtained similarly to $T_{\text{vol}}$ in the box above, but with two important differences: \begin{itemize} \item Rather than decomposing along the W-loopspine in the second and subsequent steps, we decompose along the m-loopspine. \item Rather than reiterating around sublooptrees of larger mass, we reiterate around those with large $L$-Height: specifically, those that are grafted to the m-loopspine within distance $R$ of the root, and with $L$-Height at least $\frac{1}{2}$. We decompose along the m-loopspine rather than the loopspine to the point achieving the $L$-Height purely because it is more convenient to write down an expression of the form (\ref{eqn:m loopspine loop measure}) in this case. However, an expression of the form of (\ref{eqn:m loopspine loop measure}) should also be true in the case of this loopspine. \end{itemize} We will show that, with sufficiently high probability, the total progeny of $T_{\text{res}}$ is at most $\frac{1}{2}\lambda^{t}$, and that, on this event, we can pick a set $A$ of cardinality at most $\lambda^{2t}$. In this case we are done: since $A$ is a cutset, we then have that \begin{equation}\label{eqn:Reff decomp} R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, 1)^c) \geq R_{\text{eff}}^{\infty}(\rho^{\infty}, A), \end{equation} and due to the underlying tree structure this latter quantity is lower bounded by the resistance of $2|A|$ edges connected in parallel, each of resistance $\lambda^{-2t}$. More precisely: \[ R_{\text{eff}}^{\infty}(\rho^{\infty}, A) \geq (|A| \lambda^{2t})^{-1} \geq \frac{1}{2}\lambda^{-4t}. \] We will then optimise over $t$ to obtain the result. To this end, we now turn to bounding $|T_{\text{res}}|$. As commented under (\ref{eqn:m loopspine loop measure}), the sequence of sublooptrees incident to the m-loopspine at a point in $I^m_{R}$ can be stochastically dominated by those coded by the classical (unthinned) It\^o excursion measure along this segment, so the offspring distribution of a particular $u \in T_{\text{res}}$ will be \textsf{Poisson}($\tilde{C}|I^{m,u}_{R}|$), where $\tilde{C} = N(L^m \text{-Height} \geq \frac{1}{2})$, and we have added an extra superscript $u$ to denote the dependence on $u$. By applying Lemma \ref{lem:segment length bound infinite} with $h = (\alpha - 1)(2t-1)$, it then follows exactly as in \cite[Lemma 5.7]{ArchBMCompactLooptrees} that \begin{align*} \prb{|T_{\text{res}}| \geq \lambda^t} &\leq \lambda^t \prcondb{|I^m_{R}| \geq R \lambda^{t}}{L^m\text{-Height}(\tilde{\L_{\alpha}}) \geq \frac{1}{2}}{} + \prb{|\hat{T}| \geq \frac{1}{2}\lambda^{t}} \\ &\leq C \lambda^{t}Ce^{-c\lambda^{t(h \wedge 1)}} + Ce^{-c\lambda^t}, \end{align*} where $\hat{T}$ is a Galton-Watson tree with \textsf{Poisson}($\tilde{C}\lambda^{-t}$) offspring distribution. Assuming now that $|T_{\text{res}}| < \frac{1}{2}\lambda^{t}$, we claim that we can pick a set $A$ of cardinality at most $\lambda^{2t}$. In fact, rather than just assuming that $|T_{\text{res}}| < \frac{1}{2}\lambda^{t}$, we can assume that all of the events we conditioned on in order to construct the event $\{|T_{\text{res}}| < \frac{1}{2}\lambda^{t}\}$ do indeed occur. In particular, we can assume that: \begin{enumerate}[(i)] \item For each $u \in T_{\text{res}}$, letting $N_u$ be the number of goodish loops on the m-loopspine between $\rho_u$ and the first good loop, we have that $N_u < \lambda^{t}$. \item For each $u \in T_{\text{res}}$, letting $Q^{(i)}_u$ denote the sum of the length of the shorter loops between successive goodish loops on the m-loopspine, \[ \sum_{i=1}^{N_u} Q_u^{(i)} < R\lambda^t = \lambda^{-t}. \] \item $|T_{\text{res}}| < \frac{1}{2}\lambda^{t}$. \end{enumerate} Assuming this, we now describe how we select the set $A$. This is illustrated in Figure \ref{fig:loopspine cutset} below which represents the m-loopspine of some $u \in T_{\text{res}}$. In particular, on this m-loopspine, we can pick two points on each of the goodish loops, and two points on the first good loop, to be in $A$. Moreover, these points can be chosen so that they are within distance $R+\lambda^{-t}$ of the ``base point" of the loop (see Figure \ref{fig:loopspine cutset}). If one of the goodish loops violates the condition that the length of its shorter segment is less than $R$, we can instead treat it as the first good loop. From the assumptions above, we deduce the following: \begin{enumerate}[(i)$'$] \item For all $u \in T_{\text{res}}$, the number of points of $A$ contained in $\L_{\alpha}^{(u)}$ is at most $2N_u$ which by $(i)$ above is in turn at most $2 \lambda^{t}$. \item $|A| \leq |T_{\text{res}}|2 \lambda^{t} = \lambda^{2t}$. \item Points in $A$ that are selected as points in the looptree corresponding to $u$ are within distance $|I_R^m| + \lambda^{-t}$ of $\rho_u$, i.e. distance $2\lambda^{-t}$ of $\rho_u$. \item All points in $A$ are within distance $|T_{\text{res}}|\lambda^{-t} + \lambda^{-t}$ of $\rho^{\infty}$, which is at most $\frac{1}{2}$ by $(iii)$ above. \item Therefore, any sublooptree grafted to the m-loopspine of $\L_{\alpha}^{(u)}$ for some $u \in T_{\text{res}}$ that has $L$-Height less than $\frac{1}{2}$, will not intersect $B(\rho, 1)^c$. In other words, $A$ is really a cutset. \end{enumerate} \begin{figure}[h] \includegraphics[width=14cm]{loopspineresistancesetA.png} \centering \caption{How to select $A$. The red segment contains the portion of $B(\rho^{\infty}, R)$ intersecting the m-loopspine.}\label{fig:loopspine cutset} \end{figure} From the probabilistic bounds above, and since we set $h = (\alpha - 1)(2t-1)$, we therefore deduce that \[ \prb{R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, 1)^c) \leq \frac{1}{2}\lambda^{-4t}} \leq C \lambda^{t}Ce^{-c\lambda^{t(h \wedge 1)}} + e^{-c\lambda^t} \leq C \lambda^{t}Ce^{-c\lambda^{t(2t-1)(\alpha -1)}} + Ce^{-c\lambda^t}. \] In particular, choosing $t> \frac{\alpha}{2(\alpha - 1)}$, we obtain \[ \prb{R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, 1)^c) \leq \frac{1}{2}\lambda^{-4t}} \leq Ce^{-c\lambda^t}, \] or equivalently, \[ \prb{R_{\text{eff}}^{\infty}(\rho^{\infty}, B^{\infty}(\rho^{\infty}, 1)^c) \leq \lambda^{-1}} \leq Ce^{-c\lambda^{\frac{1}{4}}}. \] \end{proof} \section{Random walk limits}\label{sctn:RW consequences} \subsection{Brownian motion and spectral dimension of $\L^{\infty}_{\alpha}$} As in the case of compact looptrees, the looptree convergence results can be used to give a collection of limit results for random walks and Brownian motion on sequences of looptrees. Before we do this, we have to show that $R^{\infty}$ is in fact a resistance metric, and that the resistance form associated with the metric space $(\L^{\infty}_{\alpha}, R^{\infty})$ is regular, which implies that it is also a regular Dirichlet form on the space $L^2(\L^{\infty}_{\alpha}, \nu)$ and so is naturally associated with a stochastic process. This is done in the following two propositions. \begin{proposition}\label{prop:res metric} $\mathbf{P}$-almost surely, $R^{\infty}$ is a resistance metric in the sense of Definition \ref{def:eff resistance metric}. \end{proposition} \begin{proof} This follows from \cite[Proposition 4.4]{ArchBMCompactLooptrees}, in which we prove the same result for compact stable looptrees. In particular, any finite set of points $V$ in $\L^{\infty}_{\alpha}$ is contained in $B(\rho^{\infty}, r)$ for some $r>0$. Taking such an $r$, we then define $t_g(r)$ and $t_d(r)$ exactly as we did in the proof of Theorem \ref{thm:LLT}; that is, we set \begin{align*} t_g(r) = \inf \{ s \geq 0: \Delta_{-s} \geq 4r, \delta^{\infty}_{-s}(x^{\infty}_{-s,0}) \geq r \}, \hspace{10mm} t_d(r) = \inf \{s \geq 0: \Xi_s \leq \Xi_{{-t_g(r)}^-} \}. \end{align*} As in previous proofs, it then follows that $B(\rho_{\infty}, r) \subset p^{\infty}([-t_g(r), t_d(r)])$, and $p^{\infty}(-t_g(r)) = p^{\infty}(t_d(r))$. Moreover, $p^{\infty}([-t_g(r), t_d(r)])$ codes a compact stable looptree, which, in keeping with earlier notation, we denote by $\L_{\alpha} (r)$. We endow it with a metric and a measure by restricting $R^{\infty}$ and $\nu^{\infty}$ to $\L_{\alpha} (r)$. It then follows exactly as in \cite[Proposition 4.4]{ArchBMCompactLooptrees} that $R^{\infty}$ restricted to $\L_{\alpha}(r)$ is a resistance metric on $\L_{\alpha} (r)$, and that we can therefore construct a weighted network with vertex set $V$ with matching effective resistance. The same network will therefore work for $\L^{\infty}_{\alpha}$. \end{proof} \begin{proposition}\label{prop:regular DF} $\mathbf{P}$-almost surely, the resistance form associated with the metric space $(\L^{\infty}_{\alpha}, R^{\infty})$ is regular. \begin{proof} We let $(\EE_{\infty}, \F_{\infty})$ denote the resistance form on $\L^{\infty}_{\alpha}$ associated with the resistance metric $R^{\infty}$ as in (\ref{eqn:resistance def variational}). According to Definition \ref{def:reg res form}, we need to show that for any $f \in C_0(\L^{\infty}_{\alpha})$ and any $\epsilon > 0$, we can find $g' \in \F_{\infty} \cap C_0 (\L^{\infty}_{\alpha})$ such that $||f - g'||_{\infty} \leq \epsilon$. The key point is that by cutting off the infinite loopspine of $\L^{\infty}_{\alpha}$ at an appropriate cutpoint, any such $f$ is also a compactly supported function on a compact stable looptree, and therefore approximable on this compact looptree, since all resistance forms on compact spaces are regular. Formally, we proceed as follows. First, note that since $f$ is compactly supported, then its support must be contained in $B(\rho^{\infty}, r)$ for some $r>0$. Taking such an $r$, we then define $t_g(r)$ and $t_d(r)$ exactly as we did in the proof of Theorem \ref{thm:LLT}; that is, we set \begin{align*} t_g(r) = \inf \{ s \geq 0: \Delta_{-s} \geq 4r, \delta^{\infty}_{-s}(x^{\infty}_{-s,0}) \geq r \}, \hspace{10mm} t_d(r) = \inf \{s \geq 0: \Xi_s \leq \Xi_{{-t_g(r)}^-} \}. \end{align*} As in previous proofs, it then follows that $B(\rho_{\infty}, r) \subset p^{\infty}([-t_g(r), t_d(r)])$, and $p^{\infty}(-t_g(r)) = p^{\infty}(t_d(r))$. We denote this projected point by $v_r$. Moreover, $p^{\infty}([-t_g(r), t_d(r)])$ codes a compact stable looptree, which, in keeping with earlier notation, we denote by $\L_{\alpha} (r)$. We endow it with a metric and a measure by restricting $R^{\infty}$ and $\nu^{\infty}$ to $\L_{\alpha} (r)$, and denote the associated resistance form by $(\EE_r, \F_{r})$. The key point is the following: by \cite[Theorem 8.4]{KigamiResistanceFormsMono}, and the one-to-one correspondence given by (\ref{eqn:resistance def variational}) and its continuum extension on compact spaces, $(\EE_r, \F_{r})$ is obtained as the trace of $(\EE_{\infty}, \F_{\infty})$ on $\L_{\alpha} (r)$, and is such that for any $f \in \F_{r}$, $\EE_r (f, f) = \EE_{\infty} (h(f), h(f))$, where $h(f)$ is the unique harmonic extension of $f$ to $\L^{\infty}_{\alpha}$. Now take $f \in \F_{\infty}$. Note that, necessarily, $f(v_r)=0$, since $f$ is continuous. Moreover, $v_r$ is a point on the infinite loopspine that cuts $\rho^{\infty}$ off from $\infty$. Arbitrarily, we now choose a new point $v_r'$ on the loopspine, coded by a jump point of $X^{\infty}$, that also separates $\rho^{\infty}$ from $\infty$, but such that $R^{\infty} (\rho^{\infty}, v_r') > R^{\infty}(\rho^{\infty}, v_r)$. It follows that $v_r'$ is coded by jump point of $X^{\infty}$ at a time that we denote by $-t_{g,2}(r)$, where $t_{g,2}(r) > t_g(r)$ and $-t_{g,2}(r) \preceq 0$. For any $s$ with $-t_{g,2}(r) \preceq s \prec -t_g(r)$, set $a_s = \delta_s ( x_{s,0}^{\infty})$, and $b_s = \Delta_s - \delta_s ( x_{s,0}^{\infty})$, so that $a_s$ gives the length of the ``shorter" segment of the corresponding loop in the loopspine, and $b_s$ gives the length of the ``longer" segment (see Figure \ref{fig:regularRF}). Set \[ d_{\text{min}} = \sum_{-t_{g,2}(r) \preceq s \prec -t_g(r)} a_s, \hspace{10mm} d_{\text{max}} = \sum_{-t_{g,2}(r) \preceq s \prec -t_g(r)} b_s. \] These are defined so that $d_{\text{min}}$ gives the looptree distance between $v_r$ and $v_r'$, and $d_{\text{max}}$ gives the ``longer distance" between them, which is the length of the path between them that traverses the longer side of all the loops in the loopspine that lie between $v_r$ and $v_r'$ (see Figure \ref{fig:regularRF}). \begin{figure}[h] \includegraphics[width=14cm, height=5.3cm]{regularRF-eps-converted-to} \centering \caption{Illustration of how we cut the infinite loopspine.}\label{fig:regularRF} \end{figure} Additionally, let $t_{d,2}(r) = \inf \{s \geq 0: \Xi_s \leq \Xi_{{-t_{g,2}(r)}^-} \}$. Then $p^{\infty}([ -t_{g,2}(r), t_{d,2}(r)])$ codes another compact stable looptree which we denote by $\L_{\alpha} (r)'$, satisfying $\L_{\alpha} (r) \subset \L_{\alpha} (r)' \subset \L^{\infty}_{\alpha}$. Since $\L_{\alpha} (r)$ is compact, it follows that $(\EE_r, \F_{r})$ is regular, so there exists $g \in \F_{r} \cap C_0(\L_{\alpha}(r))$ with $||f|_{\L_{\alpha} (r)}-g||_{\infty, \L_{\alpha} (r)} \leq \epsilon$. We therefore define a function $g' \in C_0(\L^{\infty}_{\alpha})$ by setting $g' = g$ on $\L_{\alpha} (r)$, $g'=0$ on $\L^{\infty}_{\alpha} \setminus \L_{\alpha} (r)'$, and extending harmonically on $\L_{\alpha} (r)' \setminus \L_{\alpha} (r)$. Since $g$ approximates $f_{\L_{\alpha} (r)}$ in the supremum norm, it follows that $|g(v_r)| \leq \epsilon$, and moreover it then follows by the maximum principle for harmonic functions that $||g'_{\L_{\alpha} (r)' \setminus \L_{\alpha} (r)}||_{\infty} \leq \epsilon$. Consequently, $||f-g'||_{\infty} \leq \epsilon$. It therefore just remains to show that $\EE_{\infty} (g', g') < \infty$. Let $(\EE_r', \F_{r}')$ denote the restriction of $(\EE_{\infty}, \F_{\infty})$ to $\L_{\alpha}(r)'$. Since the spaces $\L_{\alpha} (r), \L_{\alpha} (r)' \setminus \L_{\alpha} (r)$ and $\L^{\infty}_{\alpha} \setminus \L_{\alpha} (r)'$ are disjoint, and $g'$ is the harmonic extension of $g'|_{\L_{\alpha} (r)'}$ to $\L^{\infty}_{\alpha}$, it follows by bilinearity and from consistency properties of resistance forms and their traces given in \cite[Section 8]{KigamiResistanceFormsMono} that \begin{equation}\label{eqn:energy decomp} \EE_{\infty} (g', g') = \EE_r' (g'|_{\L_{\alpha} (r)'}, g'|_{\L_{\alpha} (r)'}). \end{equation} However, since $\L_{\alpha}(r)'$ is simply a compact looptree, this is automatically finite. \end{proof} \end{proposition} As a result, we deduce that the resistance metric space is naturally associated with a Hunt process on $(\L^{\infty}_{\alpha}, R^{\infty})$, which we call Brownian motion on $\L^{\infty}_{\alpha}$ and denote by $B^{\infty}$. \subsection{Quenched results} We can apply Theorem \ref{thm:scaling lim RW resistance} to the results of Theorems \ref{thm:LLT} and \ref{thm:main scaling lim} to deduce convergence results for stochastic processes on the corresponding spaces. The only additional detail in the proofs of these results is that we have to check that the non-explosion condition at (\ref{eqn:nonexplosion}) is satisfied, i.e. that \begin{equation*} \lim_{r \rightarrow \infty} \liminf_{{\l} \rightarrow \infty} R^{\l} (\rho^{\l}, B^{\l} (\rho^{\l}, r)^c) = \infty \end{equation*} almost surely, where $R^{\l}$ here denotes the resistance metric on $\L^{\l}_{\alpha}$. \subsubsection{Local limits}\label{sctn:RW limit local infinite} The local limit theorem of Theorem \ref{thm:LLT} immediately allows us to apply Theorem \ref{thm:scaling lim RW resistance} to deduce that Brownian motion on $\L^{\l}_{\alpha}$ converges in distribution to Brownian motion on $\L^{\infty}_{\alpha}$ as $\l \rightarrow \infty$ on compact time intervals. Indeed, it follows from Theorem \ref{thm:GH vague separable HB} and the Skorohod Representation Theorem that there exists a probability space on which the convergence on Theorem \ref{thm:LLT} holds almost surely. Moreover, the explosion condition is satisfied as an immediate consequence of Proposition \ref{prop:resistance results infinite}. In particular, the arguments used to prove Proposition \ref{prop:resistance results infinite} are also valid for compact stable looptrees, so we deduce that the resistance bounds of Proposition \ref{prop:resistance results infinite} almost surely hold along the sequence $(\L^{\l}_{\alpha})_{\l \in \mathbb{N}}$. Theorem \ref{thm:main RW LLT conv} then follows by a direct application of Theorem \ref{thm:scaling lim RW resistance}. \subsubsection{Scaling limits} We can also deduce similar results from Theorems \ref{thm:RW conv infinite intro}, \ref{thm:BS looptree conv} and \ref{thm:Rich looptree conv}. In this case, the non-explosion condition is satisfied as a result of \cite[Lemma 3.5]{BjornStef}, which says that for $\textsf{Loop'}(T_{\alpha}^{\infty})$, there exist $q, C \in (0, \infty)$ such that \begin{equation}\label{eqn:BS nonexp} \prb{R_{\text{eff}} (\rho, B(\rho, r)^c) \leq r\lambda^{-1}} \leq C\lambda^{-q}. \end{equation} In light of Proposition \ref{prop:resistance results infinite}, we conjecture that there should in actual fact be exponential tail decay, but polynomial decay is sufficient for our purposes here. Indeed, to verify (\ref{eqn:nonexplosion}), we need to show that \[ \lim_{r \rightarrow \infty} \liminf_{n \rightarrow \infty} n^{\frac{-1}{\alpha}} R_{\text{eff}} (\rho, B(\rho, rn^{\frac{1}{\alpha}})^c) = \infty \] $\mathbf{P}$-almost surely. This follows directly from applying a Borel-Cantelli argument along a suitable subsequence using the probabilistic bound (\ref{eqn:BS nonexp}). Moreover, the same arguments apply for $\textsf{Loop}(T_{\alpha}^{\infty})$ since $R_{\text{eff}} (\rho, \mathcal{B}_r(\textsf{Loop}(T_{\alpha}^{\infty}))^c) \geq R_{\text{eff}} (\rho, B_{r-1}(\textsf{Loop'}(T_{\alpha}^{\infty}))^c)$. Similarly, the result also holds for the two-type looptree $\textsf{Loop}^2(T_{\alpha}^{\infty, 2})$, since $R_{\text{eff}} (\rho, \mathcal{B}_{r}(\overline{\textsf{Loop}}(T_{\alpha}^{\infty}))^c) \geq R_{\text{eff}} (\rho, B_{r - \textsf{Height}(\textsf{Tree}(\textsf{Loop'} (T_{\alpha}^{\infty})^r))}(\textsf{Loop'}(T_{\alpha}^{\infty}))^c)$, and $r^{-1}\textsf{Height}(\textsf{Tree}(\textsf{Loop'} (T_{\alpha}^{\infty})^r)) \rightarrow 0$ in probability, with exponential tail decay (as in Point 2 of the proof of Theorem \ref{thm:Rich looptree conv}), allowing further Borel-Cantelli arguments. In all the different versions of infinite looptrees that we have considered, the Gromov-Hausdorff-Prohorov convergence holds with the uniform measure on vertices of the looptree, and the associated stochastic process is therefore a variable speed random walk. In the case of $\textsf{Loop}(T_{\alpha}^{\infty})$, all vertices have degree $4$, so in this case the stochastic process is actually a constant speed random walk, with \textsf{exp}($4$) waiting times at each vertex. However, by applying Kolmogorov's Maximal Inequality to the time index of this stochastic process (as in the proof of \cite[Theorem 1.1]{ArchBMCompactLooptrees}) we can show that the waiting times average out sufficiently well over time so the scaling limit result will also hold for a simple random walk on $\textsf{Loop}(T_{\alpha}^{\infty})$ (although sped up deterministically by a factor of $4$). Theorem \ref{thm:RW conv infinite intro} therefore follows by an immediate application of Theorem \ref{thm:scaling lim RW resistance} to Proposition \ref{prop:inf conv disc loop}. In the case of $\textsf{Loop'}(T_{\alpha}^{\infty})$, all internal vertices have degree $4$, and all leaf vertices have degree $2$. This corresponds to the fact the the only significant difference between $\textsf{Loop}(T_{\alpha}^{\infty})$ and $\textsf{Loop'}(T_{\alpha}^{\infty})$ is that in $\textsf{Loop'}(T_{\alpha}^{\infty})$ the loops corresponding to leaves are missing, and has the effect that (on average) the random walk waits twice as long at leaf vertices compared to internal vertices. This reflects the fact that the random walks on $\textsf{Loop}(T_{\alpha}^{\infty})$ and $\textsf{Loop'}(T_{\alpha}^{\infty})$ can (almost, technically only after adding one extra vertex to the loop containing the root in $\textsf{Loop} (T_{\alpha}^{\infty})$) be coupled so that they move identically at internal vertices, but so that a random walk on $\textsf{Loop'}(T_{\alpha}^{\infty})$ remains in its present position whenever the random walk on $\textsf{Loop}(T_{\alpha}^{\infty})$ traverses a loop corresponding to a leaf vertex (note this can be traversed in either direction). It therefore makes sense that we should be taking a scaling limit of the variable speed random walk on $\textsf{Loop'}(T_{\alpha}^{\infty})$, rather than the constant speed one. We similarly have to take a variable speed random walk on $\textsf{Loop}^2(T_{\alpha}^{\infty, 2})$, although there is not such a simple coupling in this case. In the next theorem, we let $L_{\alpha}^{\infty, 1} = \textsf{Loop'}(T_{\alpha}^{\infty})$, $L_{\alpha}^{\infty, 2} = \textsf{Loop}^2(T_{\alpha}^{\infty, 2})$, $Y^{\text{var}, i}$ denote a variable speed random walk on $L_{\alpha}^{\infty, i}$, and $\nu^i$ denote the measure giving mass $1$ to each vertex. The non-explosion condition is again satisfied by the same arguments as in Section \ref{sctn:RW limit local infinite} above. We then have the following analogues of Theorem \ref{thm:RW conv infinite intro}. \begin{theorem}\label{thm:RW conv infinite BjornStef} Take $i \in \{1, 2\}$. There exists a probability space $(\Omega', \mathcal{F}', \mathbf{P}')$ on which we can almost surely define a common metric space $(M, R_M)$ in which the spaces $(L_{\alpha}^{\infty, i}, a_n^{-1} \d, n^{-1} \nu', \rho)$ and $(\L_{\alpha}^{\infty}, \d^{\infty}, \nu^{\infty}, \rho^{\infty})$ can all be isometrically embedded and such that \[ (L_{\alpha}^{\infty, i}, a_n^{-1}\d, n^{-1} \nu^i, \rho) \overset{(d)}{\rightarrow} (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \] with respect to the Gromov-Hausdorff-vague topology, and the convergence specifically holds on the metric space $(M, R_M)$. Letting $Y^{\text{var},i}$ and $B^{\infty}$ be as above, we have that \[ (a_n^{-1}Y^{\text{var},i}_{\lfloor n a_n t \rfloor})_{t \geq 0} \overset{(d)}{\rightarrow} (B^{\infty}_t)_{t \geq 0} \] on the space $D(\mathbb{R}^+, M$) as $n \rightarrow \infty$. \end{theorem} \begin{remark} We could also prove other convergence results, for example by taking increasing sequences of increasingly rescaled discrete looptrees to approximate $\L^{\infty}_{\alpha}$, in some sense combining Theorems \ref{thm:LLT} and \ref{thm:compact disc inv princ res}, and deduce similar convergence results for random walks, exactly as we did in the cases above. This corresponds to the diagonal line in Figure \ref{fig:commuting diag intro}. \end{remark} \subsection{Annealed results} We can also prove similar results in the annealed setting by embedding into the Urysohn space, where we recall that if $(F, R, \mu, \rho, \phi)$ is a random element of $\mathbb{F}$ with law $\mathbf{P}$ such that $\phi: F \rightarrow U$ is a (possibly random) isometric embedding, and $(Y_t)_{t \geq 0}$ is a stochastic process on $F$, we define its annealed law by \[ \prtilnstart{\phi(Y_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} = \int \prnstart{\phi(Y_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} d\mathbf{P}, \] as introduced in Section \ref{sctn:res forms}. Again we will restrict to the subsequence of integral $\l$ in Theorem \ref{thm:RW conv local annealed} below, but the result holds along any countable subsequence diverging to infinity. \begin{theorem}\label{thm:RW conv local annealed} Let $(\L^{\l}_{\alpha}, \d^{\l}, \nu^{\l}, \rho^{\l})_{\l \geq 1}$ be as in Theorem \ref{thm:LLT}. Then there exist (random) embeddings $\phi_{\l}: (\L^{\l}_{\alpha}, \d^{\l}, \nu^{\l}, \rho^{\l}) \rightarrow U, \phi: (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \rightarrow U$ such that \[ \prtilnstart{\phi_{\l}(B^{\l}_t)_{t \geq 0} \in \cdot}{\phi_{\l}(\rho^{\l})}{\l} \rightarrow \prtilnstart{(B^{\infty}_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} \] weakly as probability measures on the space $D(\mathbb{R}^+, U)$ endowed with the Skorohod-$J_1$ topology as $n \rightarrow \infty$. \end{theorem} \begin{proof} The proof of Theorem \ref{thm:LLT} implies that there exists a probability space on which $(\L^{\l}_{\alpha}, \d^{\l}, \nu^{\l}, \rho^{\l}) \rightarrow (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty})$ almost surely in the Gromov-Hausdorff vague topology. In particular, there exists a metric space $M = \L^{\infty}_{\alpha} \sqcup \L_{\alpha}^1 \sqcup \L_{\alpha}^2 \sqcup \ldots$ defined on this probability space such that $\L^{\l}_{\alpha} \rightarrow \L^{\infty}_{\alpha}$ almost surely. Moreover, by properties of the Urysohn space discussed in Section \ref{sctn:res forms}, there exists an isometry $\psi: M \rightarrow U$ such that $\psi(\rho^{\infty}) = u_0$. For each $\l \in \mathbb{N} \cup \{\infty\}$, let $\phi_{\l}$ be the canonical isometry embedding $\L^{\l}_{\alpha}$ into $M$. It then follows that $\psi_{\l} := \psi \circ \phi_{\l}$ is an isometry from $\L^{\l}_{\alpha}$ to $U$ and moreover that almost surely, $\psi_{\l} (\L^{\l}_{\alpha}) \rightarrow \psi_{\infty} (\L^{\infty}_{\alpha})$ Gromov-Hausdorff vaguely as $\l \rightarrow \infty$. Viewing $(\phi_{\l})_{\l \geq 1}$ and $\psi_{\infty}$ as spatial embeddings, this therefore automatically implies that the spaces converge in the metric introduced at (\ref{eqn:spat U dist}). Since the topology induced by this metric is a particular instance of the spatial Gromov-Hausdorff topology used in \cite[Section 7]{DavidResForms}, we are in the right setting to apply Theorem \ref{thm:scaling lim RW resistance annealed}. Indeed, the non-explosion condition (\ref{eqn:nonexplosion annealed}) is satisfied as a direct consequence of Proposition \ref{prop:resistance results infinite}, which also uniformly holds along the sequence $(\L^{\l}_{\alpha})_{l \geq 1}$. The theorem then follows by a direct application of Theorem \ref{thm:scaling lim RW resistance annealed}. \end{proof} We can also prove a similar results for the spaces $\textsf{Loop}(T_{\alpha}^{\infty})$, $L_{\alpha}^1$ and $L_{\alpha}^2$. We omit the proofs since they are essentially identical to that of Theorem \ref{thm:RW conv local annealed} above. \begin{theorem}\label{thm:RW conv scaling annealed} Let $(\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1}\d, n^{-1} \nu^{\text{disc}}, \rho)$ be as in Theorem \ref{thm:main scaling lim}. Then there exist (random) embeddings $\phi_n: (\textsf{Loop}(T_{\alpha}^{\infty}), a_n^{-1}\d, n^{-1} \nu^{\text{disc}}, \rho) \rightarrow U, \phi: (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \rightarrow U$ such that \[ \prtilnstart{\phi_n\big(a_n^{-1} Y^{(n)}_{\lfloor 4n a_n t \rfloor}\big)_{t \geq 0} \in \cdot}{\phi_n(\rho_n)}{n} \rightarrow \prtilnstart{(B^{\infty}_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} \] weakly as probability measures on the space $D(\mathbb{R}^+, U)$ endowed with the Skorohod-$J_1$ topology as $n \rightarrow \infty$. \end{theorem} \begin{theorem}\label{thm:RW conv infinite BjornStef annealed} Take $i \in \{1, 2\}$, and let $(L_{\alpha}^{\infty, i}, a_n^{-1}\d, n^{-1} \nu^i, \rho)$ be as in Theorem \ref{thm:RW conv infinite BjornStef}. Then there exist (random) embeddings $\phi_n: (L_{\alpha}^{\infty, i}, a_n^{-1}\d, n^{-1} \nu^{i}, \rho) \rightarrow U, \phi: (\L^{\infty}_{\alpha}, \d^{\infty}, \nu^{\infty}, \rho^{\infty}) \rightarrow U$ such that \[ \prtilnstart{\phi_n(a_n^{-1}Y^{\text{var},i}_{\lfloor n a_n t \rfloor})_{t \geq 0} \in \cdot}{\phi_n(\rho_n)}{n} \rightarrow \prtilnstart{(B^{\infty}_t)_{t \geq 0} \in \cdot}{\phi(\rho)}{} \] weakly as probability measures on the space $D(\mathbb{R}^+, U)$ endowed with the Skorohod-$J_1$ topology as $n \rightarrow \infty$. \end{theorem} \subsection{Heat kernel convergence and spectral dimension}\label{sctn:annealed HK from infinite looptrees} To conclude, we now show how Theorem \ref{thm:LLT} can be applied to give results on the heat kernel of Brownian motion on compact stable looptrees. First, note that it follows from the scaling invariance of Proposition \ref{prop:Lai scale inv} that the annealed heat kernel for $\L^{\infty}_{\alpha}$ satisfies the scaling relation \begin{equation}\label{eqn:HK scaling} \Eb{p_t^{\infty}(\rho, \rho)} = k^{\frac{\alpha}{\alpha + 1}} \Eb{p_{kt}^{\infty}(\rho, \rho)} \end{equation} for any $k>0$. Similarly, if we let $p_t^{\l}$ denote the transition density of Brownian motion on a looptree coded by an excursion of length $\l$, we have that \[ \Eb{{p_t^{1}(\rho, \rho)}} = k^{\frac{\alpha}{\alpha + 1}} \Eb{p_{kt}^{k^{\frac{1}{\alpha + 1}}}(\rho, \rho)}. \] Setting $k=t^{-1}$ we see that \[ t^{\frac{\alpha}{\alpha + 1}} \Eb{p_t^{1}(\rho, \rho)} {=} \Eb{ p_{1}^{t^{\frac{-1}{\alpha + 1}}}(\rho, \rho)}. \] Moreover, since we are in a resistance framework, it follows from \cite[Theorem 2 and Proposition 14]{CroyHamLLT} that \[ t^{\frac{\alpha}{\alpha + 1}} p_t^{1}(\rho, \rho) \overset{(d)}{\rightarrow} p_{1}^{\infty}(\rho, \rho) \] as $t \downarrow 0$. To deduce that the corresponding expectations also converge, we just need to show that $\Eb{p_{1}^{\infty}(\rho, \rho)}$ is finite. However, since the transition density can be bounded by bounding the volume and resistance growth (by a continuum version of \cite[Proposition 1.4]{KumMisumiHKStronglyRecurrent}, for example), the exponential tail decay of Propositions \ref{prop:vol results infinite} and \ref{prop:resistance results infinite} also give an upper exponential tail decay for the transition density. We therefore deduce that $\Eb{p_{1}^{\infty}(\rho, \rho)}$ is finite, so we can apply similar arguments to those in the previous section to deduce that \[ t^{\frac{\alpha}{\alpha + 1}} \Eb{p_t^{1}(\rho, \rho)} \rightarrow \Eb{p_{1}^{\infty}(\rho, \rho)} \] as $t \rightarrow \infty$. This is stated as \cite[Theorem 1.8]{ArchBMCompactLooptrees}, where Brownian motion on $\L_{\alpha}$ is studied more closely. Similarly, it also follows from \cite[Theorem 1.5, Part II]{KumMisumiHKStronglyRecurrent} (adapted to the continuum) that the heat kernel $p^{\infty}_t(\rho, \rho)$ almost surely experiences at most log-logarithmic fluctuations around a leading term of $t^{\frac{-\alpha}{\alpha + 1}}$ as $t \uparrow \infty$ and as $t \downarrow 0$, and therefore that the quenched spectral dimension of $\L_{\alpha}$ is almost surely equal to $\frac{2 \alpha}{\alpha + 1}$. To establish the annealed spectral dimension, we take $k=t^{-1}$ in (\ref{eqn:HK scaling}) to deduce that \[ \Eb{p_t^{\infty}(\rho, \rho)} = t^{\frac{-\alpha}{\alpha + 1}} \Eb{p_{1}^{\infty}(\rho, \rho)}. \] Since $\Eb{p_{1}^{\infty}(\rho, \rho)}$ is finite, this implies that the annealed spectral dimension is also equal to $\frac{2 \alpha}{\alpha + 1}$. This concludes the proof of Theorem \ref{thm:main spec dim annealed}. \bibliographystyle{alpha}