\documentclass[10pt,a4paper]{article}
\usepackage{amsmath,amssymb,bm,makeidx,subfigure}
\usepackage[italian,english]{babel}
\usepackage[center,small]{caption}[2007/01/07]
\usepackage{fancyhdr}
\usepackage{color}
\usepackage{graphicx}

\definecolor{blu}{rgb}{0,0,1}
\definecolor{verde}{rgb}{0,1,0}
\definecolor{rosso}{rgb}{1,0,0}
\definecolor{viola}{rgb}{1,0,1}
\definecolor{arancio}{rgb}{1,0.5,0}
\definecolor{celeste}{rgb}{0,1,1}
\definecolor{rosa}{rgb}{1,0.3,0.5}

\oddsidemargin = 12pt
\topmargin = 0pt
\textwidth = 440pt
\textheight = 650pt

\makeindex

\begin{document}

\title{Transverse momentum resummation and matching in semi-inclusive
  deep-inelastic scattering}

\author{Valerio Bertone}

\maketitle

\printindex

\section{Expansion of the Sudakov form factor}

In this section I work out the expansion of the quark Sudakov form
factor to $\mathcal{O}(\alpha_s^2)$. The Sudakov form factor is
independent of the process and thus the same expansion can be used for
example for Drell-Yan and SIDIS.\footnote{Note that for
  gluon-initiated processes the expression will be different.} One
crucial point is that the expansion will be done in the so-called
$\zeta$-prescription introduced in Ref.~\cite{Scimemi:2017etj}.

The Sudakov form factor we are considering here is essentially the
square of the quark evolution factor deriving from the solution of the
Collins-Soper (CS) equations. As is well known, the CS equations
govern the evolution of TMD distributions in two independent
factorisation scales $\mu$ and $\zeta$. Usually, $\mu$ and $\zeta$ are
related to each other by assuming that $\mu=\sqrt{\zeta}$. This
particular choice reduces the degrees of freedom of the problem. On
the other hand, as observed in Ref.~\cite{Scimemi:2017etj}, this
choice does not help cure large logarithms that appear in the matching
functions. The mutual independence of $\mu$ and $\zeta$ can be
exploited to guarantee that such large logarithms are reabsorbed in
the definition of the scale $\zeta$ as a function of $\mu$ (or
viceversa). This is the basic observation at the base of the
$\zeta$-prescription that achieves this goal by assuming
$\zeta\equiv\zeta(\mu)$ and requiring that the total derivative of TMD
distribution $F$ with respect to $\mu$ is zero:
\begin{equation}\label{eq:zetapresc}
\mu^2\frac{dF\left(x,b;\mu,\zeta(\mu)\right)}{d\mu^2} = 0.
\end{equation}
This naturally leads to a differential equation in $\zeta(\mu)$
involving the CS anomalous dimensions and $\Gamma_{\rm cusp}$ that can
be solved order by order in $\alpha_s$. The exact form of the function
$\zeta(\mu)$ has to be taken into account when expanding the Sudakov
form factor.

The exact form of the Sudakov form factor, that we remind to be the
squared evolution factor deriving from the solution of the CS
equations and the evolves a pair of quark TMD distributions in $b$
space from the scales $(\mu_i,\zeta_i)$ to $(\mu_f,\zeta_f)$, is:
\begin{equation}\label{eq:sudakov}
\left[R(\mu_i,\zeta_i\rightarrow
  \mu_f,\zeta_f;b)\right]^2=\exp\left[\int_{\mu_i^2}^{\mu_f^2}\frac{d\mu^2}{\mu^2}\left(-\gamma_V+\Gamma_{\rm
    cusp}\ln\left(\frac{\mu^2}{\zeta_f}\right)\right)-2\mathcal{D}\ln\left(\frac{\zeta_f}{\zeta_i}\right)\right].
\end{equation}
where the following perturbative expansions hold:
\begin{equation}
\gamma_V = \sum_{n=1}a_s^n
\gamma_V^{(n)}\,\quad \Gamma_{\rm cusp} =
\sum_{n=1}a_s^n \Gamma_{\rm cusp}^{(n)}\,,
\end{equation}
and:
\begin{equation}
\mathcal{D} =
\sum_{n=1}a_s^{n}\sum_{k=0}^n d^{(n,k)}L^k\,,
\end{equation}
where I have defined:
\begin{equation}\label{eq:definitions}
  a_s(\mu) = \frac{\alpha_s(\mu)}{4\pi}\quad\mbox{and}\quad L\equiv \ln\left(\frac{b^2\mu_i^2}{4e^{-2\gamma_E}}\right)\,.
\end{equation}
The perturbative coefficients, $\gamma_V^{(n)}$,
$\Gamma_{\rm cusp}^{(n)}$, and $d^{(n,k)}$ are know up to the order
necessary to implement NNLL evolution.\footnote{In fact, with the only
  exception of $\Gamma_{\rm cusp}^{(4)}$, it would be possible to
  implement evolution up to N$^3$LL.} The final scales $\mu_f$ and
$\zeta_f$ are usually taken to be equal to
$\mu_f=\sqrt{\zeta}=\kappa Q$, where $Q$ is, for example the
virtuality of the exchanged photon in DIS and the invariant mass of
the lepton pair in Drell-Yan. In addition, using the
$\zeta$-prescription, we set:
\begin{equation}
\zeta_i \equiv \zeta(\mu_i) = \mu_i^2
\exp\left(\sum_{n=0}a_s^n\sum_{k=0}^{n+1}\ell^{(n,k)}L^k\right)
\end{equation}
where the coefficients $\ell^{(n,k)}$ are constants.

Before expanding the exponential we need to write its argument as a
polynomial in $\alpha_s$ (or better $a_s$) computed in $Q$. These
terms will in turn multiply powers of $\ln(Q)$. In view of the
integral over the impact parameter $b$ needed to obtain cross sections
differential in the transverse momentum $q_T$, we need to assign
$\mu_i$ a dependence on $b$. Despite this dependence is arbitrary and
needs only be dimensionally correct, the most natural choice is:
\begin{equation}
  \mu_i=\frac{C_0}{b}\,,\quad\mbox{with}\quad C_0=2e^{-\gamma_E}\,.
\end{equation}
This choice is such that $L$ defined in Eq.~(\ref{eq:definitions})
vanishes so that:
\begin{equation}
  \mathcal{D} =
  \sum_{n=1}a_s^{n}d^{(n,0)}
\end{equation}
and:
\begin{equation}
\zeta(\mu_i) =\frac{C_0^2}{b^2}
\exp\left(\sum_{n=0}a_s^n\ell^{(n,0)}\right)\,.
\end{equation}

This way the Sudakov form factor in Eq.~(\ref{eq:sudakov}) reads:
\begin{equation}\label{eq:expexp}
\begin{array}{rcl}
  \displaystyle \left[R(Q,b)\right]^2&=&\displaystyle \exp\bigg\{-\sum_{n=1}^2\int_{C_0^2/b^2}^{Q^2}\frac{d\mu^2}{\mu^2}a_s^n(\mu)\left[\gamma_V^{(n)}+\Gamma_{\rm
                                         cusp}^{(n)}\ln\left(\frac{Q^2}{\mu^2}\right)\right]\\
  \\
                                     &+&\displaystyle  2
                                         \sum_{n=1}^2a_s^{n}\left(\frac{C_0}{b}\right)d^{(n,0)}\left[-\ln\left(\frac{b^2Q^2}{C_0^2}\right)+\ell^{(0,0)}+a_s\left(\frac{C_0}{b}\right)\ell^{(1,0)}\right]\bigg\}\,,
\end{array}
\end{equation}
where we limited the contributions in the exponential to
$\mathcal{O}(a_s^2)$ that is the order we are interested in. Now,
using the RGE at leading order:
\begin{equation}
\mu^2\frac{da_s}{d\mu^2}=-\beta_0a_s^2(\mu)\,,
\end{equation}
whose solution is:
\begin{equation}
a_s(\mu) = \frac{a_s(Q)}{1-a_s(Q)\beta_0\ln(\mu^2/Q^2)}\simeq a_s(Q)\left[1+a_s(Q)\beta_0\ln(Q^2/\mu^2)+\mathcal{O}(a_s^2)\right]\,,
\end{equation}
we write every instance of $a_s$ appearing in Eq.~(\ref{eq:expexp}) in
terms of $a_s(Q)$ and finally retain only terms up to $a_s^2(Q)$:
\begin{equation}\label{eq:sudint}
\begin{array}{rcl}
  \displaystyle \left[R(Q,b)\right]^2&=&\displaystyle \exp\bigg\{-a_s(Q)\int_{C_0^2/b^2}^{Q^2}\frac{d\mu^2}{\mu^2}\left[\gamma_V^{(1)}+\Gamma_{\rm
                                         cusp}^{(1)}\ln\left(\frac{Q^2}{\mu^2}\right)\right]\\
  \\
  &-&\displaystyle a_s^2(Q) \int_{C_0^2/b^2}^{Q^2}\frac{d\mu^2}{\mu^2}\left[\gamma_V^{(2)}+\left(\Gamma_{\rm
                                         cusp}^{(2)}+\gamma_V^{(1)}\beta_0 \right)\ln\left(\frac{Q^2}{\mu^2}\right)+\Gamma_{\rm
                                         cusp}^{(1)}\beta_0\ln^2\left(\frac{Q^2}{\mu^2}\right)\right]\\
  \\
                                     &+&\displaystyle  2
                                         a_s(Q) \left[d^{(1,0)}\ell^{(0,0)}-d^{(1,0)}\ln\left(\frac{b^2Q^2}{C_0^2}\right)\right]\\
  \\ &+&\displaystyle  2 a_s^{2}(Q) \left[d^{(2,0)}\ell^{(0,0)} +
         d^{(1,0)}\ell^{(1,0)}+\left(-d^{(2,0)}+d^{(1,0)}\beta_0
         \ell^{(0,0)}\right)\ln\left(\frac{b^2Q^2}{C_0^2}\right)-d^{(1,0)}\beta_0
         \ln^2\left(\frac{b^2Q^2}{C_0^2}\right) \right]\bigg\}\,.
\end{array}
\end{equation}
The final step before carrying out the expansion is computing the
integrals:
\begin{equation}
\int_{C_0^2/b^2}^{Q^2}\frac{d\mu^2}{\mu^2}\ln^k\left(\frac{Q^2}{\mu^2}\right)
= \int_{\ln(C_0^2/b^2)}^{\ln
  Q^2}d\ln\mu^2\ln^k\left(\frac{Q^2}{\mu^2}\right) = \int^{\ln(b^2Q^2/C_0^2)}_{0}dx\,x^k=\frac{1}{k+1}\ln^{k+1}\left(\frac{b^2Q^2}{C_0^2}\right)\,.
\end{equation}
If we define:
\begin{equation}
\mathcal{L}\equiv \ln\left(\frac{b^2Q^2}{C_0^2}\right)\,,
\end{equation}
the Sudakov form factor in Eq.~\ref{eq:sudint} reads:
\begin{equation}
\begin{array}{rcl}
  \displaystyle \left[R(Q,\mathcal{L})\right]^2&=&\displaystyle \exp\bigg\{a_s(Q)\left[2d^{(1,0)}\ell^{(0,0)}-\left(\gamma_V^{(1)}+2d^{(1,0)}\right)\mathcal{L}-\frac{1}{2}\Gamma_{\rm
                                         cusp}^{(1)}\mathcal{L}^2\right]\\
  \\
                                     &+&\displaystyle a_s^2(Q) \bigg[2d^{(2,0)}\ell^{(0,0)} +
                                         2d^{(1,0)}\ell^{(1,0)}+\left(-2d^{(2,0)}+2d^{(1,0)}\beta_0
                                         \ell^{(0,0)}-\gamma_V^{(2)}\right)\mathcal{L}\\
  \\
                                     &-&\displaystyle \frac12\left(4d^{(1,0)}\beta_0+\Gamma_{\rm
                                         cusp}^{(2)}+\gamma_V^{(1)}\beta_0 \right) \mathcal{L}^2-\frac13\Gamma_{\rm
                                         cusp}^{(1)}\beta_0 \mathcal{L}^3\bigg]\bigg\}\,,
\end{array}
\end{equation}
that can be conveniently written as:
\begin{equation}\label{eq:SudCompact}
  \displaystyle \left[R(Q,\mathcal{L})\right]^2=\exp\left\{\sum_{n=1}^2a_s^n(Q)\sum_{k=0}^{n+1}S^{(n,k)}\mathcal{L}^k\right\}\,,
\end{equation}
with:
\begin{equation}
\begin{array}{l}
\displaystyle S^{(1,0)} =
  2d^{(1,0)}\ell^{(0,0)}=0\,,\quad\displaystyle S^{(1,1)} =
  -\left(\gamma_V^{(1)}+2d^{(1,0)}\right)=6 C_F\,,\quad\displaystyle
                                                   S^{(1,2)} =
  -\frac{1}{2}\Gamma_{\rm cusp}^{(1)}= -2C_F\,,\\
\\
\displaystyle S^{(2,0)} = 2d^{(2,0)}\ell^{(0,0)} +
  2d^{(1,0)}\ell^{(1,0)}\,,\quad\displaystyle S^{(2,1)} =
                           \left(-2d^{(2,0)}+2d^{(1,0)}\beta_0
  \ell^{(0,0)}-\gamma_V^{(2)}\right)\,,\\
\\
\displaystyle S^{(2,2)} = -\frac12\left(4d^{(1,0)}\beta_0+\Gamma_{\rm cusp}^{(2)}+\gamma_V^{(1)}\beta_0 \right)\,,\quad\displaystyle S^{(2,3)} = -\frac13\Gamma_{\rm cusp}^{(1)}\beta_0\,.
\end{array}
\end{equation}
The values of the coefficients of the anomalous dimensions and
$\beta$-function can be read from Appendix D of
Ref.~\cite{Echevarria:2016scs}. The coefficients of the expansion of
$\zeta(\mu)$ are instead reported in Eq.~(2.29) of
Ref.~\cite{Scimemi:2017etj}. For the $\mathcal{O}(a_s)$ coefficients I
reported the explicit values. This will help check the result against
those in the literature.

Eq.~(\ref{eq:SudCompact}) can be easily expanded as up to order
$a_s^2$ as:
\begin{equation}\label{eq:exp1}
\begin{array}{rcl}
  \displaystyle \left[R(Q,\mathcal{L})\right]^2&=&\displaystyle
                                         1+a_s(Q)\sum_{k=0}^{2}S^{(1,k)}\mathcal{L}^k+a_s^2(Q)\left[\sum_{k=0}^{3}S^{(2,k)}\mathcal{L}^k+\frac12\left(\sum_{k=0}^{2}S^{(1,k)}\mathcal{L}^k\right)^2\right]+\mathcal{O}(a_s^3)\\
  \\
                                     &=&\displaystyle
                                         1+a_s(Q)\sum_{k=0}^{2}S^{(1,k)}\mathcal{L}^k+a_s^2(Q)
                                         \sum_{k=0}^{4}\widetilde{S}^{(2,k)}\mathcal{L}^k
                                         +\mathcal{O}(a_s^3)\\
\\
&\equiv&\displaystyle  1+a_s(Q)R^{(1)}+a_s^2(Q)
                                         R^{(2)}+\mathcal{O}(a_s^3)\,,
\end{array}
\end{equation}
with:
\begin{equation}
\begin{array}{l}
\displaystyle  \widetilde{S}^{(2,0)}={S}^{(2,0)}+\frac12
  \left[S^{(1,0)}\right]^2\,,\\
  \\
\displaystyle    \widetilde{S}^{(2,1)}={S}^{(2,1)}+{S}^{(1,0)}{S}^{(1,1)}\\
\\
\displaystyle    \widetilde{S}^{(2,2)}={S}^{(2,2)}+\frac12 \left[S^{(1,1)}\right]^2+{S}^{(1,2)}{S}^{(1,0)}\,,\\
\\
\displaystyle   \widetilde{S}^{(2,3)}={S}^{(2,3)}+{S}^{(1,1)}{S}^{(1,2)}\\
\\
\displaystyle    \widetilde{S}^{(2,4)}=\frac12 \left[S^{(1,2)}\right]^2\,.
\end{array}
\end{equation}

\section{Hard factor and the matching functions}

Now that the expansion of the Sudakov form factor is done to
$\mathcal{O}(a_s^2)$, it can be combined to the rest of the
perturbative quantities entering the computation of the cross
section. In the following, we will concentrate on SIDIS that involves
both TMD PDFs $F$ and TMD FFs $D$. Specifically, in $b$ space the
SIDIS cross section is a combination of terms having the following
structure:
\begin{equation}
\begin{array}{rcl}
  \displaystyle B_{ij} &=& \displaystyle
                           H(Q)\,F_i(x,b;Q)\,D_j(z,b;Q)
                           =H(Q)\,\left[R(Q,\mathcal{L})\right]^2
                           \,F_i\left(x,b;\frac{C_0}{b}\right)\,D_j\left(z,b;\frac{C_0}{b}\right)\\
\\
&=& \displaystyle H(Q)\,\left[R(Q,\mathcal{L})\right]^2
                           \left[\sum_{k}
    \mathcal{C}_{ik}(x,\mathcal{L}) \mathop{\otimes}_x
    f_k\left(x;Q\right)\right]\left[\sum_{l}
    \mathbb{C}_{jl}(z,\mathcal{L}) \mathop{\otimes}_z
    d_l\left(z;Q\right)\right]\\
\\
&\equiv& \displaystyle \sum_{kl}\hat{B}_{ij,kl}(x,z;b)\mathop{\otimes}_{x}f_k \mathop{\otimes}_{z}d_l \,,
\end{array}
\end{equation}
where $f_k$ and $d_l$ are the (non-perturbative) collinear PDFs and FFs,
respectively. The other terms, including $R^2$, are perturbatively
computable as:
\begin{equation}
\begin{array}{l}
\displaystyle H(Q) = 1+a_s(Q)H^{(1)}+a_s^2(Q)H^{(2)}+\mathcal{O}(a_s^3)\,,\\
\\
\displaystyle \mathcal{C}_{ik}(x,\mathcal{L}) = \delta_{ik}\delta(1-x)+a_s(Q)
  \mathcal{C}_{ik}^{(1)}(x,\mathcal{L}) +a_s^2(Q) \mathcal{C}_{ik}^{(2)}(x,\mathcal{L})
  +\mathcal{O}(a_s^3) \,,\\
\\
\displaystyle \mathbb{C}_{jl}(z,\mathcal{L}) = \delta_{jl}\delta(1-z)+a_s(Q) \mathbb{C}_{jl}^{(1)}(z,\mathcal{L}) +a_s^2(Q) \mathbb{C}_{jl}^{(2)}(z,\mathcal{L}) +\mathcal{O}(a_s^3) \,.
\end{array}
\end{equation}
We now need to put everything together and truncate to order $a_s^2$
in such a way that:
\begin{equation}
\hat{B}_{ij,kl}(x,z;b) = \hat{B}_{ij,kl}^{(0)}(x,z;b)+a_s(Q) \hat{B}_{ij,kl}^{(1)}(x,z;b)+a_s^2(Q) \hat{B}_{ij,kl}^{(2)}(x,z;b)+\mathcal{O}(a_s^3) \,,
\end{equation}
with:
\begin{equation}\label{eq:pertcoefb}
\begin{array}{rcl}
  \displaystyle \hat{B}_{ij,kl}^{(0)} &=&\displaystyle
                                          \delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)\,,\\
  \\
  \displaystyle \hat{B}_{ij,kl}^{(1)} &=&\displaystyle
                                          (H^{(1)}+R^{(1)})\delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)\\
  \\
                                      &+& \mathcal{C}_{ik}^{(1)}(x,\mathcal{L})\delta_{jl}\delta(1-z) + \delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1)}(z,\mathcal{L})\\
  \\
  \displaystyle \hat{B}_{ij,kl}^{(2)} &=& \displaystyle
                                          (H^{(2)}+H^{(1)}R^{(1)}+R^{(2)})
                                          \delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)\\
  \\
                                      &+&\displaystyle
                                          (H^{(1)}+R^{(1)})\left[\mathcal{C}_{ik}^{(1)}(x,\mathcal{L})\delta_{jl}\delta(1-z)
                                          +
                                          \delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1)}(z,\mathcal{L})\right]\\
  \\
                                      &+& \mathcal{C}_{ik}^{(2)}(x,\mathcal{L})\delta_{jl}\delta(1-z) +
                                          \mathcal{C}_{ik}^{(1)}(x,\mathcal{L})\mathbb{C}_{jl}^{(1)}(z,\mathcal{L})
                                          +\delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(2)}(z,\mathcal{L})
\end{array}
\end{equation}

Despite we derived the expansion of the resummed cross section up to
$\mathcal{O}(a_s^2)$, these are not yet the final formulas. The reason
is that some of the terms of the expansion above do not depend on the
impact parameter $b$. This means that these terms, upon Fourier
transform needed to obtain the expression in the transverse moment
$q_T$, will give rise to terms proportional to $\delta(q_T)$. In view
of the matching procedure, since the fixed-order expression we are
going to match to does not include any $\delta(q_T)$ terms, we need to
make sure that they are not subtracted.Therefore, we need to identify
and remove any term that does not depend on $b$. In fact, by
construction, this is equivalent to leave only terms proportional to a
power of $\mathcal{L}$. In order to do so, we start observing that the
hard factor $H$ does not contain any $\mathcal{L}$. In addition, the
coefficients $R^{(n)}$ are polynomials in $\mathcal{L}$ and also
include a constant term ($\mathcal{L}^0$). Finally, the
$\zeta$-prescription, Eq.~(\ref{eq:zetapresc}), provides us with a
simple recipe to compute the logarithmic terms of the matching
functions $\mathcal{C}_{ik}^{(n)}$ and
$\mathbb{C}_{jl}^{(n)}$. Specifically, the condition of independence
of the TMD PDFs and FFs from the factorisation scale $\mu$ is such
that TMDs behave like physical observable (\textit{e.g.}
deep-inelastic-scattering inclusive structure functions) and thus obey
the standard scale variation rules derived, for example, in Eq.~(2.17)
of Ref.~\cite{vanNeerven:2000uj}. More in particular, one finds that
the matching function coefficients have the usual logarithmic
structure:
\begin{equation}
\mathcal{C}_{ij}^{(n)}(x,\mathcal{L}) =
\sum_{k=0}^{n}\mathcal{C}_{ij}^{(n,k)}(x)\mathcal{L}^k\quad\mbox{and}\quad \mathbb{C}_{ij}^{(n)}(x,\mathcal{L}) = \sum_{k=0}^{n}\mathbb{C}_{ij}^{(n,k)}(x)\mathcal{L}^k \,,
\end{equation}
where the non-logarithmic terms $\mathcal{C}_{ij}^{(n,0)}$ and
$\mathbb{C}_{ij}^{(n,0)}$ have to be computed explicitly while the
other terms proportional to a positive power of $\mathcal{L}$ can be
expressed in terms of the non-logarithmic term of the previous orders
and of the coefficients of the DGLAP splitting functions and of the
QCD $\beta$ function:
\begin{equation}
\begin{array}{rcl}
  \mathcal{C}_{ij}^{(1,1)}(x) &=& -\mathcal{P}_{ij}^{(1)}(x) \,,\\
  \\
  \mathcal{C}_{ij}^{(2,1)}(x) &=& -\left(\mathcal{P}_{ij}^{(2)}(x)+\mathcal{C}_{ik}^{(1,0)}(x)
                                  \otimes
                                  \mathcal{P}_{kj}^{(1)}(x)-\beta_0
                                  \mathcal{C}_{ij}^{(1,0)}(x) \right)\,,\\
  \\
  \mathcal{C}_{ij}^{(2,2)}(x) &=&\displaystyle
                                  \frac12\left(\mathcal{P}_{ik}^{(1)}(x)\otimes \mathcal{P}_{kj}^{(1)}(x)-\beta_0 \mathcal{P}_{ij}^{(1)}(x)\right)\,,\\
\end{array}
\end{equation}
and:
\begin{equation}
\begin{array}{rcl}
  \mathbb{C}_{ij}^{(1,1)}(x) &=& -\mathbb{P}_{ij}^{(1)}(x) \,,\\
  \\
  \mathbb{C}_{ij}^{(2,1)}(x) &=& -\left(\mathbb{P}_{ij}^{(2)}(x)+\mathbb{C}_{ik}^{(1,0)}(x)
                                  \otimes
                                  \mathbb{P}_{kj}^{(1)}(x)-\beta_0
                                  \mathbb{C}_{ij}^{(1,0)}(x) \right)\,,\\
  \\
  \mathbb{C}_{ij}^{(2,2)}(x) &=&\displaystyle
                                  \frac12\left(\mathbb{P}_{ik}^{(1)}(x)\otimes \mathbb{P}_{kj}^{(1)}(x)-\beta_0 \mathbb{P}_{ij}^{(1)}(x)\right)\,,\\
\end{array}
\end{equation}
where $\mathcal{P}_{ij}^{(n)}$ and $\mathbb{P}_{ij}^{(n)}$ are the
coefficients of the $a_s^n$ terms of the space- and time-like
splitting functions, respectively. With this information at hand,
knowing the logarithmic expansion of the coefficients $R^{(n)}$, and
keeping in mind that the hard coefficients $H^{(n)}$ do not contain
any logarithms, we can organize the coefficients
inEq.~(\ref{eq:pertcoefb}) in terms of powers of
$\mathcal{L}$. Specifically, we find that:
\begin{equation}
\hat{B}_{ij,kl}^{(n)} = \sum_{p=0}^{2n}\hat{B}_{ij,kl}^{(n,p)}\mathcal{L}^p\,,
\end{equation}
with the $\mathcal{O}(1)$ coefficient being:
\begin{equation}\label{eq:expLO}
\begin{array}{rcl}
  \hat{B}_{ij,kl}^{(0,0)} &=& \delta_{ik}\delta_{kl}\delta(1-x)
                              \delta(1-z)\,,
\end{array}
\end{equation}
the $\mathcal{O}(a_s)$ coefficients being:
\begin{equation}
\begin{array}{rcl}
  \hat{B}_{ij,kl}^{(1,0)} &=&\displaystyle
                              (H^{(1)}+S^{(1,0)})\delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)+ \mathcal{C}_{ik}^{(1,0)}(x)\delta_{jl}\delta(1-z) + \delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1,0)}(z)\,,\\
  \\
  \hat{B}_{ij,kl}^{(1,1)} &=& S^{(1,1)}\delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)+ \mathcal{C}_{ik}^{(1,1)}(x)\delta_{jl}\delta(1-z) + \delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1,1)}(z) \,,\\
  \\
  \hat{B}_{ij,kl}^{(1,2)} &=&
                              S^{(1,2)}\delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)
\end{array}
\end{equation}
and the $\mathcal{O}(a_s^2)$ coefficients being:
\begin{equation}
\begin{array}{rcl}
  \hat{B}_{ij,kl}^{(2,0)} &=&\displaystyle (H^{(2)}+H^{(1)}S^{(1,0)}+\widetilde{S}^{(2,0)})
                              \delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z) \,,\\
  \\
                          &+&\displaystyle
                              (H^{(1)}+S^{(1,0)})\left[\mathcal{C}_{ik}^{(1,0)}(x)\delta_{jl}\delta(1-z)
                              +
                              \delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1,0)}(z)\right]\\
  \\
                          &+&\displaystyle \mathcal{C}_{ik}^{(2,0)}(x)\delta_{jl}\delta(1-z) +
                              \mathcal{C}_{ik}^{(1,0)}(x)\mathbb{C}_{jl}^{(1,0)}(z)
                              +\delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(2,0)}(z)\\

  \\
  \hat{B}_{ij,kl}^{(2,1)} &=&\displaystyle (H^{(1)}S^{(1,1)}+\widetilde{S}^{(2,1)})
                              \delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)\\
  \\
                          &+& \displaystyle
                              (H^{(1)}+S^{(1,0)})\left[\mathcal{C}_{ik}^{(1,1)}(x)\delta_{jl}\delta(1-z)
                              +
                              \delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1,1)}(z)\right]\\
  \\
                          &+&
                              S^{(1,1)}\left[\mathcal{C}_{ik}^{(1,0)}(x)\delta_{jl}\delta(1-z)
                              +
                              \delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1,0)}(z)\right]\\
  \\
                          &+& \mathcal{C}_{ik}^{(2,1)}(x)\delta_{jl}\delta(1-z) +
                              \mathcal{C}_{ik}^{(1,1)}(x)\mathbb{C}_{jl}^{(1,0)}(z) +\mathcal{C}_{ik}^{(1,0)}(x)\mathbb{C}_{jl}^{(1,1)}(z)
                              +\delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(2,1)}(z)\\
  \\
  \hat{B}_{ij,kl}^{(2,2)} &=&\displaystyle (H^{(1)}S^{(1,2)}+\widetilde{S}^{(2,2)})
                              \delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)\\
  \\
                          &+&\displaystyle
                              \widetilde{S}^{(1,2)}\left[\mathcal{C}_{ik}^{(1,0)}(x)\delta_{jl}\delta(1-z)+\delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1,0)}(z)\right]\\
  \\
                          &+&\displaystyle
                              S^{(1,1)}\left[\mathcal{C}_{ik}^{(1,1)}(x)\delta_{jl}\delta(1-z)+\delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1,1)}(z)\right]\\
  \\
                          &+& \mathcal{C}_{ik}^{(2,2)}(x)\delta_{jl}\delta(1-z) +
                              \mathcal{C}_{ik}^{(1,1)}(x)\mathbb{C}_{jl}^{(1,1)}(z)
                              +\delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(2,2)}(z)\\
  \\
  \hat{B}_{ij,kl}^{(2,3)} &=&\displaystyle
                              \widetilde{S}^{(2,3)}\delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)
                              + S^{(1,2)}\left[\mathcal{C}_{ik}^{(1,1)}(x)\delta_{jl}\delta(1-z)
                              +
                              \delta_{ik}\delta(1-x)\mathbb{C}_{jl}^{(1,1)}(z)\right]
  \\
  \\
  \hat{B}_{ij,kl}^{(2,4)} &=&\displaystyle \widetilde{S}^{(2,4)}\delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)
\end{array}
\end{equation}

In order to obtain a differential cross section in $q_T$, we need to
take the Fourier transform of $\hat{B}_{ij,kl}$, that is:
\begin{equation}
 \hat{B}_{ij,kl}(x,z;q_T) \equiv \int\frac{d^2\mathbf{b}}{4\pi} e^{i \mathbf{b}\cdot
  \mathbf{q}_T} \hat{B}_{ij,kl}(x,z;b) = \sum_{n=0}^2a_s^n(Q)\sum_{p=0}^{2n}\hat{B}_{ij,kl}^{(n,p)}(x,z) I_p(q_T)\,,
\end{equation}
where I have defined:
\begin{equation}
I_p(q_T) = \int\frac{d^2\mathbf{b}}{4\pi} e^{i \mathbf{b}\cdot
  \mathbf{q}_T}\mathcal{L}^p=\int\frac{d^2\mathbf{b}}{4\pi} e^{i \mathbf{b}\cdot
  \mathbf{q}_T}\ln^p\left(\frac{b^2Q^2}{C_0^2}\right) = \frac12\int_0^\infty db\,b J_0(bq_T) \ln^p\left(\frac{b^2Q^2}{C_0^2}\right)\,.
\end{equation}
Results for $I_p$ have been computed up to $p=4$ in Eq.~(136) of
Appendix B of Ref.~\cite{Bozzi:2005wk}. Specifically, and including
the trivial tranform with $p=0$, they read:
\begin{equation}
\begin{array}{l}
\displaystyle I_0(q_T) = \delta(q_T)\,,\\
\\
\displaystyle I_1(q_T) = - \frac{1}{q_T^2}\,,\\
\\
\displaystyle I_2(q_T) = - \frac{2}{q_T^2}\ln\left(\frac{Q^2}{q_T^2}\right) \,,\\
\\
\displaystyle I_3(q_T) = - \frac{3}{q_T^2}\ln^2\left(\frac{Q^2}{q_T^2}\right) \,,\\
\\
\displaystyle I_4(q_T) = - \frac{4}{q_T^2}\left[\ln^3\left(\frac{Q^2}{q_T^2}\right)-4\zeta_3\right]\,.
\end{array}
\end{equation}
As clear from the transforms above, all terms with $p=0$ will be
proportional to $\delta(q_T)$. We do not need to consider these terms
because analogous terms are not included in the fixed-order
calculation and thus does not need to be subtracted. Therefore, we write:
\begin{equation}\label{eq:finalformula}
  \hat{B}_{ij,kl}(x,z;q_T) =
  \sum_{n=1}^2a_s^n(Q)\sum_{p=1}^{2n}\hat{B}_{ij,kl}^{(n,p)}(x,z)
  I_p(q_T)+ \left(\sum_{n=0}^2a_s^n(Q)\hat{B}_{ij,kl}^{(n,0)}(x,z)\right)\delta(q_T)+\mathcal{O}(a_s^3)\,,
\end{equation}
and we are not going to consider the term proportional to
$\delta(q_T)$, even though all terms have been derived above. As clear
from Eq.~(\ref{eq:finalformula}), removing all terms proportional to
$\delta(q_T)$ also means removing the full $\mathcal{O}(1)$ terms such
that leading-order term is now $\mathcal{O}(a_s)$.

\section{Fixed order and asymptotic limit}

In order to validate the results above, it is opportune to compare the
$\mathcal{O}(a_s)$ expressions to those present in the literature. To
this end, we write explicitly the expression for
$\hat{B}_{ij,kl}^{(1)}$ in $q_T$ space without the $\delta(q_T)$ term:
\begin{equation}
\begin{array}{rcl}
  \hat{B}_{ij,kl}^{(1)}(x,z;q_T) &=&\displaystyle
                                     -\hat{B}_{ij,kl}^{(1,1)}(x,z)\frac{1}{q_T^2}
                                     -\hat{B}_{ij,kl}^{(1,2)}(x,z)\frac{2}{q_T^2}\ln\left(\frac{Q^2}{q_T^2}\right)\\
  \\
                                 &=&\displaystyle
                                     \frac{1}{q_T^2}\bigg[4C_F\left(\ln\left(\frac{Q^2}{q_T^2}\right)-\frac{3}{2}\right)\delta_{ik}\delta_{jl}\delta(1-x)\delta(1-z)\\
  \\
                                 &+&\displaystyle \mathcal{P}_{ik}^{(1)}(x)\delta_{jl}\delta(1-z) + \delta_{ik}\delta(1-x)\mathbb{P}_{jl}^{(1)}(z)\bigg]\,,
\end{array}
\end{equation}
so that:
\begin{equation}\label{eq:asymptfromres}
\begin{array}{rcl}
B_{ij}(x,z;q_T) &=&\displaystyle a_s(Q) \sum_{kl}\hat{B}_{ij,kl}^{(1)}\mathop{\otimes}_x
  f_k(x,Q)\mathop{\otimes}_zd_l(z,Q)+\mathcal{O}(a_s^2)\\
\\
&=&\displaystyle a_s(Q) \frac{1}{q_T^2}\bigg[4C_F\left(\ln\left(\frac{Q^2}{q_T^2}\right)-\frac{3}{2}\right) f_i(x,Q)d_j(z,Q)\\
\\
 &+&\displaystyle \left(\sum_{k}\mathcal{P}_{ik}^{(1)}(x) \mathop{\otimes}_x
  f_k(x,Q)\right)d_j(z,Q) + f_i(x,Q)\left(\sum_l\mathbb{P}_{jl}^{(1)}(z) \mathop{\otimes}_zd_l(z,Q)\right) +\mathcal{O}(a_s^2)\,.
\end{array}
\end{equation}
This result, up to som pre-factor and to selecting the right flavour
combinations,\footnote{We have purposely left the flavour indices $i$
  and $j$ unspecified because they do not necessarily run over the
  quark flavours $u$, $d$, etc. In fact, it turns out to be useful to
  adopt a different basis (usual referred to as evolution basis) that
  simplifies the structure of the products between, for example,
  PDFs/FFs and splitting functions.} nicely agrees with that of,
\textit{e.g.},
Refs.~\cite{Meng:1995yn,Nadolsky:1999kb,Collins:2016hqq}.

In order to check that the matching is actually removing the double
counting terms, it is instructive to derive
Eq.~(\ref{eq:asymptfromres}) extracting the asymptote from the
fixed-order computation at $\mathcal{O}(a_s)$. We take the expressions
for the coefficient functions from Eqs.~(106)-(109) of Appendix B of
Ref.~\cite{Nadolsky:1999kb} or from Eqs.~(4.6)-(4.20) of
Ref.~\cite{Bacchetta:2008xw}.Referring to the second reference, some
simplifications apply. First, we consider cross sections with
unpolarised projectiles ($\lambda_e=0$) over unpolarised targets
($S_\perp^\mu = 0$) and integrated over the azimuthal angles $\phi_H$
and $\phi_S$. By doing so and after a simple manipulation, the cross
section simplifies greatly and can be written in terms of structure
functions as:
\begin{equation}\label{eq:xsexinsf}
  \frac{d\sigma}{dx dy dz dq_T^2} = \frac{2\pi\alpha^2}{xyQ^2}\left[Y_+ F_{UU,T}+2(1-y)F_{UU,L}\right]=\frac{2\pi\alpha^2}{xyQ^2}Y_+\left[F_{UU,2}-\frac{y^2}{Y_+}F_{UU,L}\right]\,,
\end{equation}
with:
\begin{equation}
Y_+\equiv 1+(1-y)^2\,,
\end{equation}
and where we have defined the structure function:
\begin{equation}
F_{UU,2}\equiv F_{UU,T} + F_{UU,L}\,.
\end{equation}
Notice that, as compared to Ref.~\cite{Bacchetta:2008xw}, we have
factored out from the structure functions a further factor
$1/(\pi z^2)$\footnote{Factor $z^2$ is the consequence of the fact
  that we are writing the cross section differential in $q_T^2$ that
  is the transverse momentum of the exchanged photon while in
  Ref.~\cite{Bacchetta:2008xw} the cross section is differentila in
  $p_T^2$ that is the transverse momentum of the of the outgoing
  hadrons. Since $p_T=z q_T$, the factor $z^2$ cancels.} so that they
factorize as:
\begin{equation}\label{eq:FOxsec}
\begin{array}{rcl}
  F_{UU,S}&=&\displaystyle
  a_s\frac{x}{Q^2}\sum_{i}e_i^2\int_x^1\frac{d\bar{x}}{\bar{x}}\int_z^1\frac{d\bar{z}}{\bar{z}}\delta\left(\frac{q_T^2}{Q^2}-\frac{(1-\bar{x})(1-\bar{z})}{\bar{x}\bar{z}}\right)\bigg[\hat{B}_{qq}^{S,
    \rm FO}(\bar{x},\bar{z},q_T)f_i\left(\frac{x}{\bar{x}}\right)
              d_i\left(\frac{z}{\bar{z}}\right)\\
\\
&+&\displaystyle \hat{B}_{qg}^{S,
    \rm FO}(\bar{x},\bar{z},q_T)f_g\left(\frac{x}{\bar{x}}\right)
              d_i\left(\frac{z}{\bar{z}}\right)+ \hat{B}_{gq}^{S,
    \rm FO}(\bar{x},\bar{z},q_T)f_i\left(\frac{x}{\bar{x}}\right)
              d_g\left(\frac{z}{\bar{z}}\right)\bigg]
+\mathcal{O}(a_s^2)\,.
\end{array}
\end{equation}
with $S=2,L$ and where the sum over $i$ runs over the active quark and
antiquark flavours and $e_i$ is the electric charge of the $i$-th
flavour. The expression for the coefficient functions are:
\begin{equation}\label{eq:Bacchettaetal}
\begin{array}{l}
\displaystyle \hat{B}_{qq}^{2,\rm FO}(x,z,q_T) = 2C_F\left[(1-x)(1-z)+4xz+\frac{1+x^2z^2}{xz}\frac{Q^2}{q_T^2}\right]\,,\\
\\
\displaystyle \hat{B}_{qq}^{L,\rm FO}(x,z,q_T) = 8C_Fxz\,,\\
\\
\displaystyle \hat{B}_{qg}^{2,\rm FO}(x,z,q_T) = 2T_R\left[[x^2+(1-x)^2][z^2+(1-z)^2]\frac{1-x}{xz^2}\frac{Q^2}{q_T^2} +8x(1-x)\right]\,,\\
\\
\displaystyle \hat{B}_{qg}^{L,\rm FO}(x,z,q_T) = 16T_Rx(1-x)\,.\\
\\
\displaystyle \hat{B}_{gq}^{2,\rm FO}(x,z,q_T) = 2C_F\left[(1-x)z+4x(1-z)+\frac{1+x^2(1-z)^2}{xz}\frac{1-z}{z}\frac{Q^2}{q_T^2}\right]\,,\\
\\
\displaystyle \hat{B}_{gq}^{L,\rm FO}(x,z,q_T) = 8C_Fx(1-z)\,,
\end{array}
\end{equation}
These expressions are enough to compute the SIDIS cross section at
$\mathcal{O}(a_s)$ in the region $q_T \lesssim Q$. In order to match
Eq.~(\ref{eq:asymptfromres}) one has to take the limit $q_T\ll Q$ and
retain in the coefficient functions only the terms enhanced as
$Q^2/q_T^2$. This automatically means that $F_{UU,L}$ does not
contribute in the $q_T\leftarrow 0$ limit:
\begin{equation}
F_{UU,L}\mathop{\longrightarrow}_{q_T\ll Q} 0\,.
\end{equation}
Another crucial observation is that the $\delta$-function in
Eq.~(\ref{eq:FOxsec}) can be expanded as follows\footnote{The proof of
  the relation in is given in Appendix~\ref{sec:deltaexpansion}.}:
\begin{equation}\label{eq:deltaexpansion}
  \delta\left(\frac{q_T^2}{Q^2}-\frac{(1-x)(1-z)}{xz}\right)
  \mathop{\longrightarrow}_{q_T^2/Q^2\rightarrow0}\ln\left(\frac{Q^2}{q_T^2}\right)\delta(1-x) \delta(1-z) +
  \frac{x\delta(1-z)}{(1-x)_+}+ \frac{z\delta(1-x)}{(1-z)_+}\,,
\end{equation}
so that:
\begin{equation}\label{eq:FOxsecasy}
\begin{array}{rcl}
  F_{UU,2}&\displaystyle \mathop{\longrightarrow}_{q_T\ll Q}&\displaystyle
  a_s\frac{x}{q_T^2}\sum_{i}e_i^2\int_x^1\frac{d\bar{x}}{\bar{x}}\int_z^1\frac{d\bar{z}}{\bar{z}}\bigg[\hat{B}_{qq}^{2,
    \rm asy}(\bar{x},\bar{z},q_T)f_i\left(\frac{x}{\bar{x}}\right)
              d_i\left(\frac{z}{\bar{z}}\right)\\
\\
&+&\displaystyle \hat{B}_{qg}^{2,
    \rm asy}(\bar{x},\bar{z},q_T)f_g\left(\frac{x}{\bar{x}}\right)
              d_i\left(\frac{z}{\bar{z}}\right)+ \hat{B}_{gq}^{2,
    \rm asy}(\bar{x},\bar{z},q_T)f_i\left(\frac{x}{\bar{x}}\right)
              d_g\left(\frac{z}{\bar{z}}\right)\bigg]
+\mathcal{O}(a_s^2)\,.
\end{array}
\end{equation}
with:
\begin{equation}
\begin{array}{rcl}
  \hat{B}_{qq}^{2,\rm asy}(x,z,q_T) &=& \displaystyle  2C_F\left[2
                                        \ln\left(\frac{Q^2}{q_T^2}\right)+\frac{1+x^2}{(1-x)_+}\delta(1-z) +\delta(1-x)\frac{1+z^2}{(1-z)_+} \right]\\
  \\
                                    &=&\displaystyle 2C_F\left[2\ln\left(\frac{Q^2}{q_T^2}\right) -3\right]\delta(1-x) \delta(1-z)+\mathcal{P}_{qq}^{(1)}(x)\delta(1-z)
                                        +\delta(1-x) \mathbb{P}_{qq}^{(1)}(z)\,,\\
  \\
  \hat{B}_{qg}^{2,\rm asy}(x,z,q_T) &=& \displaystyle
                                        2T_R\left[x^2+(1-x)^2\right]\delta(1-z)=\mathcal{P}_{qg}^{(1)}(x)
                                        \delta(1-z)\,,\\
\\
  \hat{B}_{gq}^{2,\rm asy}(x,z,q_T) &=& \displaystyle  \delta(1-x)2C_F\left[\frac{1+(1-z)^2}{z}\right]=\delta(1-x)\mathbb{P}_{qg}^{(1)}(z)\,.
\end{array}
\end{equation}
It is thus easy to see that we can rewrite Eq.~(\ref{eq:FOxsecasy})
as:
\begin{equation}\label{eq:FOxsecasy2}
\begin{array}{rcl}
  F_{UU,2}&\displaystyle \mathop{\longrightarrow}_{q_T\ll Q}&\displaystyle
  a_s\frac{x}{q_T^2}\sum_{i}e_i^2 \Bigg[4C_F\left(\ln\left(\frac{Q^2}{q_T^2}\right) -\frac{3}{2}\right) f_i\left(x\right)
              d_i\left(z\right)\\
\\
&+&\displaystyle
    \left(\sum_{k=q,g}\mathcal{P}^{(1)}_{qk}(x)\otimes f_k\left(x\right) \right)
              d_i\left(z\right)+ f_i\left(x\right)
              \left(\sum_{k=q,g}\mathbb{P}^{(1)}_{qk}(z) \otimes d_k\left(z\right)\right)\Bigg]
+\mathcal{O}(a_s^2)\,.
\end{array}
\end{equation}
Eq.~(\ref{eq:FOxsecasy2}) agrees with
Eq.~(\ref{eq:asymptfromres}). This confirms that this term removes the
double-counting terms when doing the matching.

In order to provide a version of Eq.~(\ref{eq:FOxsec}) that can be
readily implemented, we need to perform one of the integrals making
use of the $\delta$-function. We integrate over $\bar{x}$ so that we
write:
\begin{equation}
\delta\left(\frac{q_T^2}{Q^2}-\frac{(1-\bar{x})(1-\bar{z})}{\bar{x}\bar{z}}\right)
= \frac{\bar{z}\bar{x}_0^2}{1-\bar{z}}\delta(\bar{x} - \bar{x}_0)\,,
\end{equation}
with:
\begin{equation}\label{eq:x0bar}
  \bar{x}_0 = \frac{1-\bar{z}}{1-\bar{z}\left(1-\frac{q_T^2}{Q^2}\right)}\,.
\end{equation}
This allows us to write:
\begin{equation}\label{eq:FOxsecFin}
\begin{array}{rcl}
  F_{UU,S}&=&\displaystyle
  a_s\frac{x }{Q^2}\sum_{i}e_i^2\int_z^{z_{\rm max}} \frac{d\bar{z}}{1-\bar{z}}\bar{x}_0\bigg[\hat{B}_{qq}^{S,
    \rm FO}(\bar{x}_0,\bar{z},q_T)f_i\left(\frac{x}{\bar{x}_0}\right)
              d_i\left(\frac{z}{\bar{z}}\right)\\
\\
&+&\displaystyle \hat{B}_{qg}^{S,
    \rm FO}(\bar{x}_0,\bar{z},q_T)f_g\left(\frac{x}{\bar{x}_0}\right)
              d_i\left(\frac{z}{\bar{z}}\right)+ \hat{B}_{gq}^{S,
    \rm FO}(\bar{x}_0,\bar{z},q_T)f_i\left(\frac{x}{\bar{x}_0}\right)
              d_g\left(\frac{z}{\bar{z}}\right)\bigg]
+\mathcal{O}(a_s^2)\,,
\end{array}
\end{equation}
with:
\begin{equation}
z_{\rm max} = \frac{1-x}{1-x\left(1-\frac{q_T^2}{Q^2}\right)}\,.
\end{equation}

Now I would like to rewrite the cross section above in such a way that
it matches that at $\mathcal{O}(a_s)$ of
Ref.~\cite{Daleo:2004pn}. That would allow us to confidently use the
$\mathcal{O}(a_s^2)$ calculation presented right in that reference for
the matching to the resummed calculation. This is made a little tricky
by the different notation used in Ref.~\cite{Daleo:2004pn} and from
the fact that in that paper the cross section is differential in a
different set of variables. Specifically, we would like it to be
differential in $x$, $y$, $z$, and $q_T^2$ while in
Ref.~\cite{Daleo:2004pn} it is differential in $x$, $Q^2$, $\eta$, and
$p_T^2$, where the last two are the rapidity and the transverse
momentum of the outgoing hadron, respectively. Eq.~(13) of
Ref.~\cite{Daleo:2004pn}, can be translated into our notation by
noticing that:
\begin{equation}\label{eq:Daleoetal}
\frac{d\sigma}{dxdQ^2d p_T^2 d\eta} = \frac{x}{z Q^2}\sum_{i,j}\int_z^{z_{\rm
    max}} \frac{d\bar{z}}{1-\bar{z}} f_i\left(\frac{x}{\bar{x}_0}\right)d_j\left(\frac{z}{\bar{z}}\right) \frac{d\sigma_{ij}^{(1)}}{dxdQ^2d p_T^2 d\eta}+\mathcal{O}(a_s^2)
\end{equation}
where we have exploited the $\delta$-functions in Eqs.~(18)-(20) to
get rid of the integral over $z$.\footnote{Notice that the $z$
  variable of Ref.~\cite{Daleo:2004pn} does not coincide with our
  definition.}

The $\mathcal{O}(a_s)$ partonic cross sections in Eqs.~(18)-(20) of
Ref.~\cite{Daleo:2004pn}, setting $\varepsilon=0$, can be written as:
\begin{equation}
\frac{d\sigma_{ij}^{(1)}}{dxdQ^2d p_T^2 d\eta}=\frac{2\pi \alpha^2 a_s
  e_q^2\bar{x}_0}{x Q^4}Y_+ \left[ \underbrace{\left( F_{UU,M}^{ij}(\bar{x}_0,\bar{z})+\frac{3}{2}F_{UU,L}^{ij}(\bar{x}_0,\bar{z})\right)}_{F_{UU,2}^{ij}} - \frac{y^2}{Y_+}F_{UU,L}^{ij}(\bar{x}_0,\bar{z})\right]\,.
\end{equation}
One can verify that $F_{UU,2}^{qq}(\bar{x}_0,\bar{z})$,
$F_{UU,L}^{qq}(\bar{x}_0,\bar{z})$,
$F_{UU,M}^{qg}(\bar{x}_0,\bar{z})$,
$F_{UU,L}^{qg}(\bar{x}_0,\bar{z})$,
$F_{UU,M}^{gq}(\bar{x}_0,\bar{z})$, and
$F_{UU,L}^{gq}(\bar{x}_0,\bar{z})$ exactly correspond to
$\hat{B}^{2, \rm FO}_{qq}(\bar{x}_0,\bar{z},q_T)$,
$\hat{B}^{L, \rm FO}_{qq}(\bar{x}_0,\bar{z},q_T)$,
$\hat{B}^{M, \rm FO}_{qg}(\bar{x}_0,\bar{z},q_T)$,
$\hat{B}^{L, \rm FO}_{qg}(\bar{x}_0,\bar{z},q_T)$,
$\hat{B}^{M, \rm FO}_{gq}(\bar{x}_0,\bar{z},q_T)$, and
$\hat{B}^{L, \rm FO}_{gq}(\bar{x}_0,\bar{z},q_T)$ of
Eq.~(\ref{eq:Bacchettaetal}). It is crucial to notice that the
correspondence holds only if $\bar{x}_0$ defined in
Eq.~(\ref{eq:x0bar}) as a function of $\bar{z}$ is used. As an
example, taking into account the different factors (a factor 2 for
$F_{UU,M}$ and a factor 4 for $F_{UU,L}$) and using our notation for
the integration variables ($y\rightarrow \bar{z}$,
$\rho(z=0)\rightarrow \bar{x}_0$), we read off from Eq.~(18) of
Ref.~\cite{Daleo:2004pn}:
\begin{equation}
\begin{array}{rcl}
F_{UU,M}^{qq}(\bar{x}_0,\bar{z}) &=& \displaystyle 2C_F\left[\frac{(\bar{x}_0+\bar{z})^2+2(1-\bar{x}_0-\bar{z})}{(1-\bar{x}_0)(1-\bar{z})}\right]\,,\\
\\
F_{UU,L}^{qq}(\bar{x}_0,\bar{z}) &=& \displaystyle 8C_F\bar{x_0}\bar{z}\,,
\end{array}
\end{equation}
so that:
\begin{equation}
\begin{array}{rcl}
F_{UU,2}^{qq}(\bar{x}_0,\bar{z}) &=& F_{UU,M}^{qq}(\bar{x}_0,\bar{z})+\frac{3}{2}F_{UU,L}^{qq}(\bar{x}_0,\bar{z})\\
\\
 &=& \displaystyle 2
     C_F\left[\frac{(\bar{x}_0+\bar{z})^2+2(1-\bar{x}_0-\bar{z})}{(1-\bar{x}_0)(1-\bar{z})}
     + 3\bar{x_0}\bar{z}\right]\\
\\
&=& \displaystyle 2
     C_F\left[(1-\bar{x}_0)(1-\bar{z})+4\bar{x}_0\bar{z} +\frac{1+\bar{x}_0^2\bar{z}^2}{\bar{x}_0\bar{z}}\left(\frac{\bar{x}_0\bar{z}}{(1-\bar{x}_0)(1-\bar{z})}\right)\right]\,.
\end{array}
\end{equation}
Using Eq.~(\ref{eq:x0bar}), it is easy to see that the factor in round
brackets in the last line of the equation above is equal to
$Q^2/q_T^2$. Therefore, it reduces exactly to the first relation in
Eq.~(\ref{eq:Bacchettaetal}). The same holds also for the remaining
two partonic channels.

Putting all pieces together, Eq.~(\ref{eq:Daleoetal}) can be recast as:
\begin{equation}
\frac{d\sigma}{dxdQ^2d p_T^2 d\eta} = \frac{2\pi \alpha^2
  }{z x Q^4}Y_+ \left[F_{UU,2} - \frac{y^2}{Y_+}F_{UU,L}\right]\,,
\end{equation}
with:
\begin{equation}
\begin{array}{rcl}
  F_{UU,S}&=&\displaystyle
  a_s\frac{x }{Q^2}\sum_{i}e_i^2\int_z^{z_{\rm max}}
              \frac{d\bar{z}}{1-\bar{z}}\bar{x}_0\bigg[F^{qq}_{UU,L}(\bar{x}_0,\bar{z})f_i\left(\frac{x}{\bar{x}_0}\right)
              d_i\left(\frac{z}{\bar{z}}\right)\\
\\
&+&\displaystyle F^{qg}_{UU, L}(\bar{x}_0,\bar{z})f_g\left(\frac{x}{\bar{x}_0}\right)
              d_i\left(\frac{z}{\bar{z}}\right)+ F^{gq}_{UU, L}(\bar{x}_0,\bar{z})f_i\left(\frac{x}{\bar{x}_0}\right)
              d_g\left(\frac{z}{\bar{z}}\right)\bigg]
+\mathcal{O}(a_s^2)\,.
\end{array}
\end{equation}
Therefore, the structure of the observables is exactly the same. What
is left to work out is the Jacobian to express the cross section as
differential in the same variable as in Eq.~(\ref{eq:FOxsecFin}). What
we need is to know how the variables $Q^2$, $p_T$, and $\eta$ are
related to $y$, $z$, and $q_T$. The relevant relations are:
\begin{equation}
\left\{\begin{array}{rcl}
Q^2 &=& xyS_H\\
\\
p_T^2 &=& z^2 q_T^2\\
\\
\eta &=& \displaystyle \frac{1}{2}\ln\left(\frac{y(1-x)S_H}{q_T^2}\right)
\end{array}\right.\quad\Longrightarrow\quad dQ^2dp_T^2d\eta = \frac{zQ^2}{y} dydzdq_T^2\,.
\end{equation}
where $S_H$ is the squared center-of-mass energy of the collision, so
that:
\begin{equation}
  \frac{d\sigma}{dx dy dz dq_T^2} = \frac{zQ^2}{y}\frac{d\sigma}{dxdQ^2d p_T^2
    d\eta} = \frac{2\pi\alpha^2}{xyQ^2}Y_+\left[F_{UU,2}-\frac{y^2}{Y_+}F_{UU,L}\right]\,,
\end{equation}
exactly like in Eq.~(\ref{eq:xsexinsf}). This confirms that the
computation of Ref.~\cite{Daleo:2004pn} can be matched to the resummed
calculation provided that the correct Jacobian is taken into account.

\section{Numerical results}

In Fig.~\ref{fig:APFELvsTIMBA}, a comparison between the
$\mathcal{O}(a_s)$ computation of Ref.~\cite{Daleo:2004pn} for the
differential cross section in Eq.~(\ref{eq:Daleoetal}), implemented in
the computer code {\tt TIMBA}, and the implementation in the {\tt
  APFEL++} framework~\cite{Bertone:2017gds} of the expressions in
Eq.~(\ref{eq:FOxsecFin}) is presented. The cross section as a function
of the hadron transverse momentum $p_T$ obtained with {\tt APFEL++} is
displayed as ratios to {\tt TIMBA} for a representative values of the
kinematic variables.
\begin{figure}[t]
  \begin{centering}
    \includegraphics[width=0.6\textwidth]{../plots/APFELvsTIMBA}
    \caption{Comparison at $\mathcal{O}(\alpha_s)$ between the {\tt
        TIMBA} code, implementation of the results of
      Ref.~\cite{Daleo:2004pn}, and the implementation of the
      expressions in Eq.~(\ref{eq:FOxsecFin}) in the {\tt APFEL++}
      code~\cite{Bertone:2017gds}.\label{fig:APFELvsTIMBA}}
  \end{centering}
\end{figure}
It is clear that the agreement between the two codes is
excellent. Since we will be using {\tt TIMBA} for the NLO
(\textit{i.e.} $\mathcal{O}(a_s^2)$) cross section calculation to be
matched to the NNLL resummed computation, this provides a solid ground
to start from.

The next step is to compare the asymptotic behaviour worked out in
Eq.~(\ref{eq:FOxsecasy2}) to the fixed-order computation. This is done
Fig.~\ref{fig:FOvsAsy} where the differential cross section in both
cases is plotted as a function of the photon tranverve momentum $q_T$
for a representative set of values of the kinematic variables. As
expected, the two curves are very close to each other at small values
of $q_T$ where the logarithmically enhanced terms dominate. At larger
values of $q_T$ instead the two curves tend to depart indicating that
power corrections are important in that region.
\begin{figure}[t]
  \begin{centering}
    \includegraphics[width=0.6\textwidth]{../plots/FOvsAsy}
    \caption{Comparison at $\mathcal{O}(\alpha_s)$ between the
      asymptotic limit in Eq.~(\ref{eq:FOxsecasy2}) to the fixed-order
      computation expressions in
      Eq.~(\ref{eq:FOxsecFin}).\label{fig:FOvsAsy}}
  \end{centering}
\end{figure}

The conclusive step is the comparison between the resummed computation
and its fixed-order order expansion that, as we have shown above,
coincides with the asymptote of the full fixed-oder. This is done in
Fig.~(\ref{fig:ResVsExp}) where the resummed calculation a NLL
accuracy is compared to its fixed-order expansion to
$\mathcal{O}(\alpha_s)$, that coincides with
Eq.~(\ref{eq:FOxsecasy2}). As expected, while the two curves are far
apart at low $q_T$ they tend to converge towards larger values of
$q_T$. However, the convergence is not so ``accurate'' as in the case
of the fixed-order calculation versus its asymptotic limit. The reason
is that in this case the two computations converge up to subleading
terms that in this case are $\mathcal{O}(\alpha_s^2)$ that are
effectively NLO and thus numerically large. We will see that the
situation improves when going one order up.
\begin{figure}[t]
  \begin{centering}
    \includegraphics[width=0.6\textwidth]{../plots/ResVsExp}
    \caption{Comparison between the NLL resummed calculation and the
      expansion to $\mathcal{O}(\alpha_s)$ in
      Eq.~(\ref{eq:FOxsecasy2}).\label{fig:ResVsExp}}
  \end{centering}
\end{figure}

We can now formulate the matching procedure to consistently combine
the resummed calculation with the fixed-order one subtracting the
double counting terms. The particular way in which the matching is
implemented is defined up to subleading and power-suppressed
terms. One can then exploit this arbitrariness to adjust the matching
in such a way that the possibly large subleading terms are mitigated
by some \textit{ad-hoc} prescription. The most natural, despite not
unique, prescription is the \textit{additive} matching that reads:
\begin{equation}\label{eq:matching1}
\sigma^{\rm Match}(q_T,Q) = \sigma^{\rm FO}(q_T,Q) + \sigma^{\rm Res}(q_T,Q) - \sigma^{\rm Asy}(q_T,Q)\,.
\end{equation}
where $\sigma^{\rm Match}$ is obtained adding up the fixed-order
computation $\sigma^{\rm FO}$ to some perturbative accuracy (say
$\mathcal{O}(\alpha_s^n)$), valid for $q_T \simeq Q$, to the resummed
calculation $\sigma^{\rm Res}$ at some logarithmic accuracy, valid for
$q_T\ll Q$, and subtracting the double-counting terms
$\sigma^{\rm Asy}$. By the arguments discussed above, it is easy to
see that:
\begin{equation}
\begin{array}{rcl}
  \sigma^{\rm Match}(q_T,Q) &\displaystyle\mathop{\longrightarrow}_{q_T\simeq Q}&
                                                                                \sigma^{\rm FO}(q_T,Q) +\mathcal{O}\left[\alpha_s^{n+1}(Q)\right]\,,\\
  \\
  \sigma^{\rm Match}(q_T,Q) &\displaystyle\mathop{\longrightarrow}_{q_T\ll Q}&\displaystyle
                                                                               \sigma^{\rm Res}(q_T,Q) +\mathcal{O}\left(\frac{q_T^2}{Q^2}\right)\,.
\end{array}
\end{equation}
However, as we have seen above, for low-order computations the
$\mathcal{O}(\alpha_s^{n+1})$ residual for $q_T\simeq Q$ may be
numerically relevant. On the other hand, one would expect that when
increasing the perturbative accuracy these differences tend to
shrink. Therefore, for the moment I refrain from form introducing any
prescription for the suppression of subleading terms. I will come back
on this point in the next section where I will study the matching of
the NLO fixed-order computation to the NNLL resummed
one. Fig.~\ref{fig:FONLL} shows a summary of the computations
consideres so far, including the matched one according to
Eq.~(\ref{eq:matching1}): this provides the lowest order matching
LO+NLL. The behaviour of the red curve is the expected one. In
particular, in the low-$q_T$ region it is close to the resummed
(green) curve while in the high-$q_T$ region it tends to the
fixed-order (blue) curve. In the next section we will raise the
perturbative accuracy to NLO+NNLL.
\begin{figure}[t]
  \begin{centering}
    \includegraphics[width=0.6\textwidth]{../plots/FONLL}
    \caption{Summary of the computations: fixed order (blue curve),
      resummed (green curve), double counting (cyan curve), and
      matched according to Eq.~(\ref{eq:matching1}) (red
      curve).\label{fig:FONLL}}
  \end{centering}
\end{figure}

% Exploiting the power-suppressed residual in the $q_T \ll Q$ limit, one
% can replace the prescription in Eq.~(\ref{eq:matching1}) with:
% \begin{equation}\label{eq:matching2}
%   \sigma^{\rm Match}(q_T,Q) = \sigma^{\rm FO}(q_T,Q) + \mathcal{D}\left(\frac{q_T^2}{Q^2}\right)\left[\sigma^{\rm Res}(q_T,Q) - \sigma^{\rm Asy}(q_T,Q)]\right]\,,
% \end{equation}
% with:
% \begin{equation}
% \mathcal{D}\left(\frac{q_T^2}{Q^2}\right) = 1 + \mathcal{O}\left(\frac{q_T^2}{Q^2}\right)\,.
% \end{equation}
% Despite the exact form of the ``damping'' function $\mathcal{D}$
% remains unspecified at this level, this prescription ensures that the
% uncertainty of Eq.~(\ref{eq:matching2}) is power suppressed over the
% whole relevant spectrum. The simplest choice is:
% \begin{equation}
%   \mathcal{D}\left(\frac{q_T^2}{Q^2}\right) = 1 + \frac{q_T^2}{Q^2}\,.
% \end{equation}

\section{Integrating over $q_T$}

It is interesting to carry out the integration over $q_T$ of
Eq.~(\ref{eq:FOxsec}) analytically. The result can the be compared to
the results presented in Appendix~C of Ref.~\cite{deFlorian:1997zj}.
\begin{equation}
\begin{array}{rcl}
 \displaystyle \int_0^{\infty} dq_T^2 F_{UU,S}&=&\displaystyle
  a_sx\sum_{i}e_i^2\int_x^1\frac{d\bar{x}}{\bar{x}}\int_z^1\frac{d\bar{z}}{\bar{z}}\bigg[\hat{B}_{qq}^{S,
    \rm FO}\left(\bar{x},\bar{z},\frac{(1-\bar{x})(1-\bar{z})}{\bar{x}\bar{z}}\right)f_i\left(\frac{x}{\bar{x}}\right)
              d_i\left(\frac{z}{\bar{z}}\right)\\
\\
&+&\displaystyle \hat{B}_{qg}^{S,
    \rm FO}\left(\bar{x},\bar{z},\frac{(1-\bar{x})(1-\bar{z})}{\bar{x}\bar{z}}\right)f_g\left(\frac{x}{\bar{x}}\right)
              d_i\left(\frac{z}{\bar{z}}\right)\\
\\
&+& \displaystyle \hat{B}_{gq}^{S,
    \rm FO}\left(\bar{x},\bar{z},\frac{(1-\bar{x})(1-\bar{z})}{\bar{x}\bar{z}}\right)f_i\left(\frac{x}{\bar{x}}\right)
              d_g\left(\frac{z}{\bar{z}}\right)\bigg]
+\mathcal{O}(a_s^2)\,.
\end{array}
\end{equation}
replacing $q_T^2/Q^2$ in Eq.~(\ref{eq:Bacchettaetal}) has no effect on
the coefficient functions for $F_L$. The reason is that $F_L$ is
independent of $q_T$ and therefore integrating over $q_T$ has
essentially the effect of removing the $\delta$-function. On the other
hand, integrating $F_2$ gives:
\begin{equation}
\begin{array}{l}
\displaystyle \hat{B}_{qq}^{2,\rm FO}\left(x,z,\frac{(1-{x})(1-{z})}{{x}{z}}\right) = 2C_F\left[(1-x)(1-z)+4xz+\frac{1+x^2z^2}{(1-x)(1-z)}\right]\,,\\
\\
\displaystyle \hat{B}_{qg}^{2,\rm FO}\left
  (x,z,\frac{(1-{x})(1-{z})}{{x}{z}}\right) = 2T_R\left[[x^2+(1-x)^2]\left(\frac{1}{1-z}+\frac1{z}-2\right)+8x(1-x)\right]\,,\\
\\
\displaystyle \hat{B}_{gq}^{2,\rm FO}\left (x,z,\frac{(1-{x})(1-{z})}{{x}{z}}\right) =
  2C_F\left[(1-x)z+4x(1-z)+\frac{1+x^2(1-z)^2}{z(1-x)}\right]\,,
\end{array}
\end{equation}
Instating the plus prescription in all terms that behave as
$(1-x)^{-1}$ and $(1-z)^{-1}$, one can see that up to ``local'' terms
(\textit{i.e.} those terms proportional to the $\delta$-function) the
expressions of Appendix~C of Ref.~\cite{deFlorian:1997zj} are
reproduced. The local terms correspond to virtual corrections that
thus give contributions at $q_T=0$. As such, they should coincide with
the terms proportional to $\delta(q_T)$ generate in the expansion of
the resummed calculation. Specifically, they should be equal to the
coefficients $\hat{B}_{ij,kl}^{(n,0)}$ in the expansion in
Eq.~(\ref{eq:finalformula}). This is evidently the case of the
$\mathcal{O}(1)$ term $\hat{B}_{ij,kl}^{(0,0)}$ in
Eq.~(\ref{eq:expLO}) that gives the leading-order contribution to the
integrated cross section. Unfortunatey, this is not true at
next-to-leading order because the expressions for the local terms in
Appendix~C of Ref.~\cite{deFlorian:1997zj} (Eqs.~(C.2)-(C.4)) do not
match $\hat{B}_{ij,kl}^{(1,0)}$. However, when checking the
expressions explicitly an interesting pattern emerges such that, if
all occurrences of $\ln(1-x)$ (or $\ln(1-z)$) in Eqs.~(C.2)-(C.4) of
Ref.~\cite{deFlorian:1997zj} are replaced with $\ln(x)$ (or $\ln(z)$)
the two sets of expressions coincide. The expressions reported in
Ref.~\cite{deFlorian:1997zj} are those computed long time ago in
Ref.~\cite{Furmanski:1981cw}.

In order to understand which of the two is the correct set of
expressions, whether those computed in Ref.~\cite{Furmanski:1981cw} or
those derived here, we may try to integrate over $z$ summing over all
possible hadrons produced in the final state. By doing so, we should
obtain the expressions of the hard cross sections for inclusive
deep-inelastic scattering. This last set of expressions has also been
computed in Ref.~\cite{Furmanski:1981cw} and is very likely to be
correct. The presence of terms proportional to $\ln(1-x)$ in the
inclusive DIS hard cross sections suggests that the expressions
reported in Ref.~\cite{deFlorian:1997zj} and computed in
Ref.~\cite{Furmanski:1981cw} are the correct ones.

\appendix

\section{Expansion of the kinematic $\delta$-function}\label{sec:deltaexpansion}

In order to prove the equality in Eq.~(\ref{eq:deltaexpansion}), we
consider the following integral:
\begin{equation}\label{eq:testint}
I(\varepsilon) =\int_0^1 dx \int_0^1 dy\,\delta(xy-\varepsilon) f(x,y)\,,
\end{equation}
where $f(x,y)$ is a test function ``well-behaved'' over the
integration region. Now I split the integral as follows:
\begin{equation}
I(\varepsilon) =\left(\int_0^1 dx \int_x^1 dy+\int_0^1 dy \int_y^1 dx\right)\,\delta(xy-\varepsilon) f(x,y)\,,
\end{equation}
where the first term in the r.h.s. corresponds to the integral over
the grey region \textit{above} the blue line while the second over the
grey region \textit{below} the blue line in
Fig.~\ref{fig:deltaexpansion}.
\begin{figure}[t]
  \begin{centering}
    \includegraphics[width=0.6\textwidth]{../plots/DeltaExpansion}
    \caption{Integration region of the integral in
      Eq.~(\ref{eq:testint}). The integral is along the red curve
      defined by the $\delta$-function.\label{fig:deltaexpansion}}
  \end{centering}
\end{figure}

Now I use the following equalities:
\begin{equation}
\delta(xy-\varepsilon) = \left\{
\begin{array}{ll}
\displaystyle \frac{1}{x}\delta\left(y-\frac{\varepsilon}{x}\right)\theta(y-\sqrt{\varepsilon}) &
                                                                      \quad\mbox{integral
                                                                      over
                                                                      $y$,}\\
\\
\displaystyle \frac{1}{y}\delta\left(x-\frac{\varepsilon}{y}\right) \theta(x-\sqrt{\varepsilon}) &
                                                                      \quad\mbox{integral
                                                                      over
                                                                      $x$.}
\end{array}
\right.
\end{equation}
The $\theta$-functions arise from the fact that the first integral has
to be done along the upper branch on the red curve while the second
along the lower branch. The two branches are joint at the point
$x=y=\sqrt{\varepsilon}$ and thus the integration ranges are bounded
from below by this point. Therefore, I find:
\begin{equation}
I(\varepsilon) =\int_{\sqrt{\varepsilon}}^1
\frac{dx}{x}f\left(x,\frac{\varepsilon}{x}\right) + \int_{\sqrt{\varepsilon}}^1 \frac{dy}{y}f\left(\frac{\varepsilon}{y},y\right)\,.
\end{equation}
It is crucial to realise that in the first and the second integral the
following conditions hold: $\varepsilon < \sqrt{\varepsilon}\leq x$
and $\varepsilon < \sqrt{\varepsilon}\leq y$, respectively. Therefore,
in the limit $\varepsilon\rightarrow 0$, the arguments $\varepsilon/x$
and $\varepsilon/y$ of the function $f$ will tend to zero. I now add
and subtract a term proportional to $f(0,0)$ to both integrals, so
that:
\begin{equation}
I(\varepsilon) =\int_{\sqrt{\varepsilon}}^1
\frac{dx}{x}\left[f\left(x,\frac{\varepsilon}{x}\right)-f(0,0)\right] + \int_{\sqrt{\varepsilon}}^1 \frac{dy}{y}\left[f\left(\frac{\varepsilon}{y},y\right)-f(0,0)\right]+2f(0,0) \underbrace{\int_{\sqrt{\varepsilon}}^1 \frac{d\xi}{\xi}}_{-\ln\sqrt{\varepsilon}}\,.
\end{equation}
Finally, I take the limit for $\varepsilon\rightarrow 0$:
\begin{equation}
\lim_{\varepsilon\rightarrow 0}I(\varepsilon) =\int_0^1
\frac{dx}{x}\left[f\left(x,0\right)-f(0,0)\right] + \int_{0}^1 \frac{dy}{y}\left[f\left(0,y\right)-f(0,0)\right]-\ln\left(\varepsilon\right) f(0,0)\,,
\end{equation}
that I rewrite as:
\begin{equation}
\lim_{\varepsilon\rightarrow 0}I(\varepsilon) =\int_0^1dx \int_0^1dy\left\{\frac{\delta(y)}{[x]_+}+\frac{\delta(x)}{[y]_+}-\ln\left(\varepsilon\right)\delta(x)\delta(y)\right\}f(x,y)\,.
\end{equation}
Comparing the equation above with Eq.~(\ref{eq:testint}), one deduces that:
\begin{equation}
\delta(xy-\varepsilon)\mathop{\longrightarrow}_{\varepsilon\rightarrow 0}
\frac{\delta(y)}{[x]_+}+\frac{\delta(x)}{[y]_+}-\ln\left(\varepsilon\right)\delta(x)\delta(y)\,.
\end{equation}
Finally, substituting:
\begin{equation}
x\rightarrow \frac{1-x}{x}\,,\quad y\rightarrow \frac{1-z}{z}\,,\quad\mbox{and}\quad\varepsilon\rightarrow\frac{q_T^2}{Q^2}\,,
\end{equation}
it is easy to recover Eq.~(\ref{eq:deltaexpansion}). In particular,
one needs to use the fact that:
\begin{equation}
\delta\left(\frac{1-x}{x}\right)=\delta(1-x)\,.
\end{equation}

\newpage

\begin{thebibliography}{alp}

%\cite{Scimemi:2017etj}
\bibitem{Scimemi:2017etj}
  I.~Scimemi and A.~Vladimirov,
  %``Analysis of vector boson production within TMD factorization,''
  arXiv:1706.01473 [hep-ph].
  %%CITATION = ARXIV:1706.01473;%%
  %2 citations counted in INSPIRE as of 24 Oct 2017

%\cite{Echevarria:2016scs}
\bibitem{Echevarria:2016scs}
  M.~G.~Echevarria, I.~Scimemi and A.~Vladimirov,
  %``Unpolarized Transverse Momentum Dependent Parton Distribution and Fragmentation Functions at next-to-next-to-leading order,''
  JHEP {\bf 1609} (2016) 004
  doi:10.1007/JHEP09(2016)004
  [arXiv:1604.07869 [hep-ph]].
  %%CITATION = doi:10.1007/JHEP09(2016)004;%%
  %20 citations counted in INSPIRE as of 19 Dec 2017

%\cite{vanNeerven:2000uj}
\bibitem{vanNeerven:2000uj}
  W.~L.~van Neerven and A.~Vogt,
  %``NNLO evolution of deep inelastic structure functions: The Singlet case,''
  Nucl.\ Phys.\ B {\bf 588} (2000) 345
  doi:10.1016/S0550-3213(00)00480-6
  [hep-ph/0006154].
  %%CITATION = doi:10.1016/S0550-3213(00)00480-6;%%
  %159 citations counted in INSPIRE as of 19 Dec 2017

%\cite{Bozzi:2005wk}
\bibitem{Bozzi:2005wk}
  G.~Bozzi, S.~Catani, D.~de Florian and M.~Grazzini,
  %``Transverse-momentum resummation and the spectrum of the Higgs boson at the LHC,''
  Nucl.\ Phys.\ B {\bf 737} (2006) 73
  doi:10.1016/j.nuclphysb.2005.12.022
  [hep-ph/0508068].
  %%CITATION = doi:10.1016/j.nuclphysb.2005.12.022;%%
  %362 citations counted in INSPIRE as of 20 Dec 2017

%\cite{Meng:1995yn}
\bibitem{Meng:1995yn}
  R.~Meng, F.~I.~Olness and D.~E.~Soper,
  %``Semiinclusive deeply inelastic scattering at small q(T),''
  Phys.\ Rev.\ D {\bf 54} (1996) 1919
  doi:10.1103/PhysRevD.54.1919
  [hep-ph/9511311].
  %%CITATION = doi:10.1103/PhysRevD.54.1919;%%
  %49 citations counted in INSPIRE as of 21 Dec 2017

%\cite{Collins:2016hqq}
\bibitem{Collins:2016hqq}
  J.~Collins, L.~Gamberg, A.~Prokudin, T.~C.~Rogers, N.~Sato and B.~Wang,
  %``Relating Transverse Momentum Dependent and Collinear Factorization Theorems in a Generalized Formalism,''
  Phys.\ Rev.\ D {\bf 94} (2016) no.3,  034014
  doi:10.1103/PhysRevD.94.034014
  [arXiv:1605.00671 [hep-ph]].
  %%CITATION = doi:10.1103/PhysRevD.94.034014;%%
  %14 citations counted in INSPIRE as of 21 Dec 2017

%\cite{Nadolsky:1999kb}
\bibitem{Nadolsky:1999kb}
  P.~M.~Nadolsky, D.~R.~Stump and C.~P.~Yuan,
  %``Semiinclusive hadron production at HERA: The Effect of QCD gluon resummation,''
  Phys.\ Rev.\ D {\bf 61} (2000) 014003
   Erratum: [Phys.\ Rev.\ D {\bf 64} (2001) 059903]
  doi:10.1103/PhysRevD.64.059903, 10.1103/PhysRevD.61.014003
  [hep-ph/9906280].
  %%CITATION = doi:10.1103/PhysRevD.64.059903, 10.1103/PhysRevD.61.014003;%%
  %77 citations counted in INSPIRE as of 23 Dec 2017

%\cite{Bacchetta:2008xw}
\bibitem{Bacchetta:2008xw}
  A.~Bacchetta, D.~Boer, M.~Diehl and P.~J.~Mulders,
  %``Matches and mismatches in the descriptions of semi-inclusive processes at low and high transverse momentum,''
  JHEP {\bf 0808} (2008) 023
  doi:10.1088/1126-6708/2008/08/023
  [arXiv:0803.0227 [hep-ph]].
  %%CITATION = doi:10.1088/1126-6708/2008/08/023;%%
  %174 citations counted in INSPIRE as of 25 Dec 2017

%\cite{Daleo:2004pn}
\bibitem{Daleo:2004pn}
  A.~Daleo, D.~de Florian and R.~Sassot,
  %``O(alpha**2(s)) QCD corrections to the electroproduction of hadrons with high transverse momentum,''
  Phys.\ Rev.\ D {\bf 71} (2005) 034013
  doi:10.1103/PhysRevD.71.034013
  [hep-ph/0411212].
  %%CITATION = doi:10.1103/PhysRevD.71.034013;%%
  %45 citations counted in INSPIRE as of 25 Dec 2017

%\cite{Bertone:2017gds}
\bibitem{Bertone:2017gds}
  V.~Bertone,
  %``APFEL++: A new PDF evolution library in C++,''
  arXiv:1708.00911 [hep-ph].
  %%CITATION = ARXIV:1708.00911;%%
  %3 citations counted in INSPIRE as of 30 Dec 2017

%\cite{deFlorian:1997zj}
\bibitem{deFlorian:1997zj}
  D.~de Florian, M.~Stratmann and W.~Vogelsang,
  %``QCD analysis of unpolarized and polarized Lambda baryon production in leading and next-to-leading order,''
  Phys.\ Rev.\ D {\bf 57} (1998) 5811
  doi:10.1103/PhysRevD.57.5811
  [hep-ph/9711387].
  %%CITATION = doi:10.1103/PhysRevD.57.5811;%%
  %149 citations counted in INSPIRE as of 26 Nov 2018

%\cite{Furmanski:1981cw}
\bibitem{Furmanski:1981cw}
  W.~Furmanski and R.~Petronzio,
  %``Lepton - Hadron Processes Beyond Leading Order in Quantum Chromodynamics,''
  Z.\ Phys.\ C {\bf 11} (1982) 293.
  doi:10.1007/BF01578280
  %%CITATION = doi:10.1007/BF01578280;%%
  %493 citations counted in INSPIRE as of 27 Nov 2018

\end{thebibliography}

\end{document}


% You should title the file with a .tex extension (hw1.tex, for example)
\documentclass[11pt]{article}

\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{wrapfig}
\usepackage{fancyhdr}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\usepackage[normalem]{ulem}
\usepackage{tikz}
\usepackage{systeme}
\usepackage{graphicx}
\DeclareMathOperator*{\argmin}{argmin}
\DeclareMathOperator*{\argmax}{argmax}
\usepackage{bm}

\oddsidemargin0cm
\topmargin-2cm     %I recommend adding these three lines to increase the
\textwidth16.5cm   %amount of usable space on the page (and save trees)
\textheight23.5cm

\newcommand{\question}[2] {\vspace{.25in} \hrule\vspace{0.5em}
\noindent{\bf #1: #2} \vspace{0.5em}
\hrule \vspace{.10in}}
\renewcommand{\part}[1] {\vspace{.10in} {\bf (#1)}}

\newcommand{\myname}{Sean Bittner}
\newcommand{\myandrew}{srb2201@columbia.edu}
\newcommand{\myhwnum}{12}

\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt plus 1pt}

\DeclarePairedDelimiter\abs{\lvert}{\rvert}%
 %
\pagestyle{fancyplain}
\rhead{\fancyplain{}{\myname\\ \myandrew}}

\begin{document}

\medskip                        % Skip a "medium" amount of space
                                % (latex determines what medium is)
                                % Also try: \bigskip, \littleskip

\thispagestyle{plain}
\begin{center}                  % Center the following lines
{\Large Draft of new V1 section} \\
Sean Bittner, Agostina Palmigiano \\
November 24, 2020 \\
\end{center}

\section{Exploratory analysis of V1 with EPI produces a novel theory}\label{results_V1}
Dynamical models of excitatory (E) and inhibitory (I) populations with supralinear input-output function have succeeded in explaining a host of experimentally documented phenomena.
In a regime characterized by inhibitory stabilization of strong recurrent excitation, these models give rise to paradoxical responses \cite{tsodyks1997paradoxical}, selective amplification  \cite{goldman2009memory, murphy2009balanced}, surround suppression \cite{ozeki2009inhibitory} and normalization \cite{rubin2015stabilized}.
Despite their strong predictive power, E-I circuit models rely on the assumption that inhibition can be studied as an indivisible unit.
However, experimental evidence shows that inhibition is composed of distinct elements -- parvalbumin (P), somatostatin (S), VIP (V) --
composing 80\% of GABAergic interneurons in V1 \cite{markram2004interneurons, rudy2011three, tremblay2016}, and that these inhibitory cell types follow specific connectivity patterns (Fig. \ref{fig:Fig3}A) \cite{pfeffer2013inhibition}.
Recent theoretical advances \cite{litwin2016inhibitory, GarciaDelMolino2017, Chen2019},  have only started to address the consequences of this multiplicity in the dynamics of V1, strongly relying on linear theoretical tools.
Here, we use EPI to elucidate the mechanisms of neuron-type stability in V1 at different levels of contrast.

We considered the contrast responses of a nonlinear dynamical V1 circuit model (Fig. \ref{fig:Fig3}A) with a state comprised of each neuron-type population's rate $\mathbf{x} = \left[x_E, x_P , x_S, x_V \right]^\top$.
Each population receives recurrent input $W \mathbf{x}$ from synaptic projections of effective connectivity $W$ and an external input $\mathbf{h}$, which determine the population rate via nonlinearity $f_r = \left[\right]^2_+$ (see Section \ref{methods_V1}).
The deterministic circuit model evolves form an initial condition $\mathbf{x}(0)$ to a steady-state solution (Fig. \ref{fig:Fig3}B, solid).
When slow noise $\mathbf{\epsilon}$ is introduced, circuit activity fluctuates around this solution (Fig. \ref{fig:Fig3}B dashed), and the model is then a stochastic stabilized supralinear network (SSSN) \cite{hennequin2018dynamical}
\begin{equation}
    \tau \frac{d\mathbf{x}}{dt} = -\mathbf{x} +f_r(W\mathbf{x} + \mathbf{h})
\end{equation}
At full contrast, input to the E- and P-populations increases
\begin{equation}
\mathbf{h} = \mathbf{h}_b + c\mathbf{h}_c,
\end{equation}
changing the steady state solution (and fluctuations thereabout)  (Fig. \ref{fig:Fig3}C).
In this analysis, we fixed $W$,$\mathbf{h}_b$, and $\mathbf{h}_c$, which have been fit to contrast responses in mouse V1 using the deterministic model (TODO cite, see Section \ref{methods_V1}).
As contrast changes, so does the degree of stochastic variability of each neuron-type (Fig. \ref{fig:Fig3}D).
Moreover, the circuit transitions into an inhibition-stabilized network (ISN) ($\gamma(\mathbf{x}; \mathbf{z}) < 0$) with increasing contrast (Fig. \ref{fig:Fig3}D inset).
While the ISN-regime and its effects are understood well in E-I networks, its role in this SSSN with inhibitory multiplicity has not been explored.

To study the influence of circuit input on stabilization mechanisms in this stochastic model, we asked what changes in circuit input $d\mathbf{h}$ have little effect on the responses of each neuron-type.
\begin{equation}
\mathbf{z} = \begin{bmatrix} dh_E & dh_P & dh_S & dh_V \end{bmatrix}^{\top}.
\end{equation}
To formulate ``fluctuation constraints" for population $\alpha$  at contrast level $c$ as an emergent property in this stochastic model, we prescribed that the mean change in activity with $dh_\alpha$ is 0 and the variance over both EPI posterior and model stochasticity is a small amount
\begin{equation}\label{eq:EP}
\begin{split}
\mathcal{X}(\alpha, c) ~~:~~  \mathbb{E}_{\mathbf{z}}\begin{bmatrix} dx_\alpha(\mathbf{x}; \mathbf{z},c) \end{bmatrix}  &~~=~~  0  ~~\triangleq~~ \mu  \\
\text{Var}_{\mathbf{z}}\begin{bmatrix} dx_\alpha(\mathbf{x}; \mathbf{z},c) \end{bmatrix}  &~~=~~  \begin{bmatrix} 0.05^2 \end{bmatrix} ~~\triangleq~~ \sigma^2 .
\end{split}
\end{equation}
By conditioning on this emergent property, we constrained stochastic fluctuations of circuit models sampled from the EPI posterior to be unbiased and vary to a fixed extent from the steady state solution at $d\mathbf{h}=\mathbf{0}$.

Visualization of the resulting $q_{\bm{\theta}}(\mathbf{z} \mid \mathcal{X}(\alpha, c))$ shows that the EPI posteriors largely agree with sets of parameters obtained using ABC (Fig. \ref{fig:SX1}).
Focusing our attention on $P$-fluctuation constraints at 0\% and 100\% contrast ($\mathcal{X}(P, 0\%)$ and $\mathcal{X}(P, 100\%)$, respectively), we gain insight about how $d\mathbf{h}$ governs mechanisms of stability.
At 0\% contrast, the SSSN is not inhibition-stabilized, and only local perturbations of positive $dh_E$ and negative $dh_P$ place the circuit in the ISN regime, while $P$-population fluctuations are kept near the 0\% contrast level (Fig. \ref{fig:Fig3}E).
At 100\% contrast, where $h_E$ and $h_P$ are much greater, the SSSN is inhibition-stabilized, and $q_\theta(z \mid \mathcal{X}(P, 100\%)$ reveals distinct patterns of $d\mathbf{h}$ that obey the $P$-fluctuation constraint (Fig. \ref{fig:Fig3}F).
As $dh_V$ decreases, either $dh_P$ and $dh_S$ must increase or decrease together.  When $dh_P$ and $dh_S$ increase together, the circuit leaves the ISN regime, and when they are decreased, the strength of inhibition stabilization grows.
The pattern in $d\mathbf{h}$ producing transitions out of the ISN regime is unapparent when running traditional ABC, even when SSSN noise is reduced to a negligible order of magnitude (Fig. \ref{fig:SX2}).

\clearpage
\begin{figure}[h]
\caption{\small \textbf{A}.  Four-population model of primary visual cortex with excitatory (black), parvalbumin (blue), somatostatin (red), and VIP (green) neurons.   Some neuron-types largely do not form synaptic projections to others  (excitatory and inhibitory projections filled and unfilled, respectively).
\textbf{B}. V1 circuit model simulations at 0\% contrast without (SSN, solid) and with (SSSN, solid) slow noise.
\textbf{C}. Simulations at 100\% contrast.
\textbf{D}. Average responses of the SSSN for all contrasts.  Error bars show the standard deviation of stochastic fluctuations.
\textbf{E}. EPI posterior conditioned on P-fluctuation constraints at 0\% contrast.
Parameter samples are colored by their ISN coefficient.
Bottom-left inset is the posterior predictive distribution of $dx_P$.
\textbf{F}. Same as E. at 100\% contrast.
 }\label{fig:Fig3}
\begin{center}
\includegraphics[scale=.18]{figs/Fig3/Fig3.pdf}
\end{center}
\end{figure}
\clearpage

\section{V1 Supplemental section}\label{methods_V1}

The dynamics are driven by the rectified and squared sum of recurrent inputs $W\mathbf{x}$, external inputs $\mathbf{h}$, and external noise:

\begin{equation}
    \tau \frac{d\mathbf{x}}{dt} = -\mathbf{x} +f_r(W\mathbf{x} + \mathbf{h} + \mathbf{\epsilon})
\end{equation}
where the input is comprised of a baseline and contrast-dependent input
\begin{equation}
 \mathbf{h} =  \mathbf{h}_b +  c\mathbf{h}_c
\end{equation}
$\tau = 1 \text{ms}$, $f_r(\mathbf{x}) = \left[\mathbf{x} \right]_+^2$, and $c \in \left[0, 1\right]$.

The noise is modeled as an Ornstein-Uhlenbeck process:
\begin{equation}
\tau_{\text{noise}} d\epsilon_\alpha = -\epsilon_\alpha dt + \sqrt{2\tau_{\text{noise}}}\sigma_\alpha dB
\end{equation}

where $\tau_{\text{noise}}$ is slow at 5ms, $\sigma_\alpha =  0.01 $, and $dB$ is a standard Wiener process.

We considered the stability of this stochastic stabilized supralinear network with respect to an additive differential input $d\mathbf{h}$
\begin{equation}
    \tau \frac{d\mathbf{x}}{dt} = -\mathbf{x} +f_r(W\mathbf{x} + \mathbf{h} + d\mathbf{h}+ \epsilon).
\end{equation}

We used connectivity ($W$) and input ($\mathbf{h}_b$ and $\mathbf{h}_c$) parameters fit to the deterministic model (TODO cite)

\begin{equation}
W =  \begin{bmatrix} W_{EE} & W_{EP} & W_{ES} & W_{EV} \\
W_{PE} & W_{PP} & W_{PS} & W_{PV} \\
W_{SE} & W_{SP} & W_{SS} & W_{SV} \\
W_{VE} & W_{VP} & W_{VS} & W_{VV}  \end{bmatrix} =
 \begin{bmatrix} .785 & -.102 & -1.24 & -.306 \\
.809 & -.100 & -.620 & -.264 \\
.833 & -.000128 & -.0000483 & -.742 \\
.708 & -.306 & -.452 & -.0000605 \\
 \end{bmatrix},
\end{equation}

\begin{equation}
\mathbf{h}_b =  \begin{bmatrix} h_{b,E} \\ h_{b,P} \\ h_{b,S} \\ h_{b,V} \end{bmatrix} =
 \begin{bmatrix} .590 \\ .504 \\ .515 \\ .670 \end{bmatrix} ,
\end{equation}
and
\begin{equation}
\mathbf{h}_c = \begin{bmatrix} h_{c,E} \\ h_{c,P} \\ h_{c,S} \\ h_{c,V} \end{bmatrix} =
\begin{bmatrix} .595 \\ .396 \\ 0 \\ 0 \end{bmatrix}.
\end{equation}

The expectation and variance in the emergent property are taken over both the posterior distribution and the stochasticity of the SSSN:
\begin{equation}
= \mathbb{E}_{\mathbf{z}}\begin{bmatrix} dx_\alpha(\mathbf{x}; \mathbf{z},c) \end{bmatrix}  = \mathbb{E}_{\mathbf{z}\sim q_\theta(\mathbf{z})} \left[ \mathbb{E}_{\mathbf{x} \sim p(\mathbf{x} \mid \mathbf{z})} \begin{bmatrix} x_\alpha(\mathbf{x}; \mathbf{z},c) - x_\alpha(\mathbf{x}; \mathbf{0},c) \end{bmatrix}\right].
\end{equation}
Thus, over the EPI posterior predictive distribution, the mean and variance of the slow fluctuations about the steady state solution are constrained to $\mu = 0$ and $\sigma^2 = 0.05^2$

This ISN coefficient of the network at a given input is calculated by simulating the system to a steady state in the absence of noise
\begin{equation}
    \gamma(\mathbf{x}; \mathbf{z}) = 1 - 2 \left[u_E \right]_+ W_{EE}
\end{equation}
where
\begin{equation}
    \mathbf{u} = W\mathbf{x} + \mathbf{h} + d\mathbf{h}.
\end{equation}

When the ISN coefficient is negative, the network is inhibition-stabilized.
To get an idea of what distribution of parameters ($d\mathbf{h}$) we should expect from EPI, we can use ABC to obtain a set of parameters related to the emergent property.
We compare EPI to ABC with a rejection heuristic defined by the standard deviation of the differential responses $\sigma_{ABC}$
 \begin{equation}
 f_{ABC}(dx_\alpha; \sigma_{ABC}) = |dx_\alpha| > 2\sigma_{ABC}.
 \end{equation}
 In other words, we ran ABC accepting parameters that generate differential responses within two standard deviations $\sigma_{ABC}=0.05$ of $dx_\alpha = 0$.

\begin{figure}[h]
\caption{\small Supplemental Figure: A. Top row: EPI posteriors $q_\theta(z \mid \mathcal{X}(\alpha, c)$ for neuron-type $\alpha$, 0\% contrast, $\epsilon=0.01$ visualized as samples colored by their log probability.  Bottom-left of pairplots indicate that the posterior predictive distribution obeys the emergent property constraints.
Bottom row: Sets of parameters produced using the ABC approach.  Bottom-left of pairplots shows statistics of accepted parameters (black) and the ABC posterior predictive distribution given that set (purple).
B. Same as A at 100\% contrast.
 }\label{fig:SX1}
\begin{center}
\includegraphics[scale=.5]{figs/FigSX/Fig_SX1.pdf}
\end{center}
\end{figure}

\begin{figure}[h]
\caption{\small Supplemental Figure: Same as Figure 2 (will be supp fig) with $\sigma_{\epsilon} = 0.001$.
 }\label{fig:SX2}
\begin{center}
\includegraphics[scale=.5]{figs/FigSX/Fig_SX2.pdf}
\end{center}
\end{figure}

\bibliography{epi}
\bibliographystyle{unsrt}

\end{document}


\chapter{Distributed SVD algorithm}
\label{cha:svd-dist}

In the previous chapter we discussed the state of the art, regarding
the serial version of the SVD algorithm, on the context of the LSI
problem; such algorithm was discussed under the assumption that
the matrix and auxiliary artifacts fit into the RAM of such
computer. We also mentioned that such algorithm, could benefit from
parallel or vectorized linear algebra kernels; speciall for its most
expensive operations (like the sparse matrix-vector
multiplication). In this chapter, we will discuss a chosen distributed version
of SVD algorithm; where the calculation is spread across computing
nodes in a cluster, aiming mainly to scale in time (due the inherent
parallelization). \\

The most scalable and documented algorithm for SVD-LSI, that we found
in literature, was that of Radim \Rehurek; who published his results
into a series of articles (\cite{rehurek10a},
\cite{rehurek10b} and \cite{rehurek11b}), and culminated the effort
with his PhD thesis (\cite{rehurek11a}). All the articles are
  pretty much contained  in \Rehurek's Phd thesis, then unless stated
  explicitly, all the references to his work in this chapter will be
  from that publication. Is is
fair to emphasize though, that \Rehurek thesis covers other topics
besides those we care about in this project; thus, we focused on his
chapter of SVD/LSI only. \\

Another pertinent clarification about \Rehurek's work, is that he
offers the distributed algorithm mostly as a way of speeding up the
SVD calculation (scale in time); and not precisely for tackling bigger
problems that simply do not fit in the memory of a single computer
(scale in space). On the large scale experiments that he reports, the
resulting matrix can pretty much fit into the RAM of a modern personal computer;
actually, he uses that to compare the reduction in time on the serial
execution (single machine) vs the distributed execution (cluster).

\input{svd-dist-alg.tex}
\input{svd-dist-subtrack.tex}
\input{svd-dist-merge.tex}
\input{svd-dist-compres.tex}
\input{svd-dist-accu.tex}


\par
\section{Driver programs}
\label{section:Iter:drivers}
\par
\begin{enumerate}

%-----------------------------------------------------------------------
\item
\begin{verbatim}
test_colCopy msglvl msgFile type n1 n2 inc1 inc2 icol jcol seed
\end{verbatim}
This driver program generates a {\tt  DenseMtx} object
whose column {\tt icol} is copied to column {\tt jcol}.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt DenseMtx} object is written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
{\tt type} is the type of entries, {\tt 0} for real, {\tt 1} for complex.
\item
{\tt n1} is the row dimension of the test matrix.
\item
{\tt n2} is the column dimension of the test matrix.
\item
{\tt inc1} is the row increment.
\item
{\tt inc2} is the column increment.
\item
{\tt icol} is the column number to be copied.  $0\leq${\tt icol}$<${\tt n2}.
\item
{\tt jcol} is the column number to be replaced.  $0\leq${\tt jcol}$<${\tt n2}.
\item
{\tt seed} parameter is random number seed.
\end{itemize}

%-----------------------------------------------------------------------
\item
\begin{verbatim}
test_colDotProduct msglvl msgFile type n1 n2 inc1 inc2 icol jcol seed
\end{verbatim}
This driver program generates a {\tt DenseMtx} object
object, and  computes the dot product
of column {\tt icol} and column {\tt jcol} of the matrix.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt DenseMtx} object is written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
{\tt type} is the type of entries, {\tt 0} for real, {\tt 1} for complex.
\item
{\tt n1} is the row dimension of the test matrix.
\item
{\tt n2} is the column dimension of the test matrix.
\item
{\tt inc1} is the row increment.
\item
{\tt inc2} is the column increment.
\item
{\tt icol} is the first column number.  $0\leq${\tt icol}$<${\tt n2}.
\item
{\tt jcol} is the second column number.  $0\leq${\tt jcol}$<${\tt n2}.
\item
{\tt seed} parameter is random number seed.
\end{itemize}

%-----------------------------------------------------------------------
\item
\begin{verbatim}
test_colGenAxpy msglvl msgFile type n1 n2 inc1 inc2 icol jcol
   ralpha, ialpha, rbeta, ibeta, seed
\end{verbatim}
This driver program generates a {\tt DenseMtx} object whose
column {\tt icol} is replaced by $\alpha$ times column {\tt icol}
plus $\beta$ times column {\tt jcol}.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt DenseMtx} object is written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
{\tt type} is the type of entries, {\tt 0} for real, {\tt 1} for complex.
\item
{\tt n1} is the row dimension of the test matrix.
\item
{\tt n2} is the column dimension of the test matrix.
\item
{\tt inc1} is the row increment.
\item
{\tt inc2} is the column increment.
\item
{\tt icol} is the column number to be replaced.  $0\leq${\tt icol}$<${\tt n2}.
\item
{\tt jcol} is the column number to be added.  $0\leq${\tt jcol}$<${\tt n2}.
\item
{\tt ralpha} is the real part of the scalar $\alpha$.
\item
{\tt ialpha} is the imaginary part of the scalar $\alpha$.
\item
{\tt rbeta} is the real part of the scalar $\beta$.
\item
{\tt ibeta} is the imaginary part of the scalar $\beta$.
\item
{\tt seed} parameter is random number seed.
\end{itemize}

%-----------------------------------------------------------------------
\item
\begin{verbatim}
test_frobNorm msglvl msgFile type n1 n2 inc1 inc2 seed
\end{verbatim}
This driver program generates a {\tt DenseMtx} object and
computes the Frobenius norm of this matrix.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt DenseMtx} object is written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
{\tt type} is the type of entries, {\tt 0} for real, {\tt 1} for complex.
\item
{\tt n1} is the row dimension of the test matrix.
\item
{\tt n2} is the column dimension of the test matrix.
\item
{\tt inc1} is the row increment.
\item
{\tt inc2} is the column increment.
\item
{\tt seed} parameter is random number seed.
\end{itemize}

%-----------------------------------------------------------------------
\item
\begin{verbatim}
test_frobNorm msglvl msgFile type n1 n2 inc1 inc2 jcol seed
\end{verbatim}
This driver program generates a {\tt DenseMtx} object and computes
two norm of column {\tt jcol} of this matrix.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt DenseMtx} object is written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
{\tt type} is the type of entries, {\tt 0} for real, {\tt 1} for complex.
\item
{\tt n1} is the row dimension of the test matrix.
\item
{\tt n2} is the column dimension of the test matrix.
\item
{\tt inc1} is the row increment.
\item
{\tt inc2} is the column increment.
\item
{\tt jcol} is the column number whose two norm is required.
           $0\leq${\tt jcol}$<${\tt n2}.
\item
{\tt seed} parameter is random number seed.
\end{itemize}

%-----------------------------------------------------------------------
\item
\begin{verbatim}
test_DenseMtx_mmm msglvl msgFile type nrow nk ncol ainc1
           ainc2 binc1 binc2 cinc1 cinc2 a_opt b_opt ralpha
           ialpha rbeta ibeta seed
\end{verbatim}
This driver program tests the matrix-matrix multiply method.
The program generates {\tt DenseMtx} objects $A$,
,$B$ and $C$. It returns the matrix {\tt C} whose
elements are replaced by $\beta$ times matrix {\tt C} plus
$\alpha$ times matrix {\tt A} times matrix {\tt B}.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt DenseMtx} object is written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
{\tt type} is the type of entries, {\tt 0} for real, {\tt 1} for complex.
\item
{\tt nrow} is the row dimension of the test matrix {\tt A}.
\item
{\tt nk} is the column dimension of the test matrix {\tt A} and
the row dimension of the test matrix {\tt B}.
\item
{\tt ncol} is the column dimension of the test matrix {\tt B}.
\item
{\tt ainc1} is the row increment for the test matrix {\tt A}.
\item
{\tt ainc2} is the column increment for the test matrix {\tt A}.
\item
{\tt binc1} is the row increment for the test matrix {\tt B}.
\item
{\tt binc2} is the column increment for the test matrix {\tt B}.
\item
{\tt cinc1} is the row increment for the test matrix {\tt C}.
\item
{\tt cinc2} is the column increment for the test matrix {\tt C}.
\item
{\tt a\_opt} specifies the computation of the test matrix {\tt A}
to be performed.
{\tt "n"} or {\tt "N"} is No transpose.
{\tt "t"} or {\tt "T"} is Transpose.
{\tt "c"} or {\tt "C"} is Conjugate transpose.
\item
{\tt b\_opt} specifies the computation of the test matrix {\tt B}
to be performed.
{\tt "n"} or {\tt "N"} is No transpose.
{\tt "t"} or {\tt "T"} is Transpose.
{\tt "c"} or {\tt "C"} is Conjugate transpose.
\item
{\tt ralpha} is the real part of the scalar $\alpha$.
\item
{\tt ialpha} is the imaginary part of the scalar $\alpha$.
\item
{\tt rbeta} is the real part of the scalar $\beta$.
\item
{\tt ibeta} is the imaginary part of the scalar $\beta$.
\item
{\tt seed} parameter is random number seed.
\end{itemize}

%-----------------------------------------------------------------------
\item
\begin{verbatim}
iter inFile
\end{verbatim}
This driver program reads required parameters from the {\tt inFile}
to solve a sparse linear system $AX=B$, where $A$ is an {\tt InpMtx} object
and $X$ and $B$ are {\tt DenseMtx} objects, using selected methods with
left or right preconditioner. The preconditioner is obtained via applying
frontal method to the  matrix $A$.
In the {\tt inFile},
the required parameters are in a layout as
\begin{verbatim}
   srcMtxFormat
   srcMtxFile
   InpMtxFile
   ETreeFormat
   ETreeFile
   rhsFile
   slnFile
   msgFile
   msglvl  seed  nrhs  Ik  itermax  iterout
   symmetryflag  sparsityflag  pivotingflag
   tau  droptol  convtol
   methods
\end{verbatim}
All comment lins should start with a start ({\tt *}) and the lines
order of the required parameters should not be changed.
\par
\begin{itemize}

\item
{\tt srcMtxFormat} is the file format of source matrix $A$,
 {\tt 0} for InpMtx, {\tt 1} for HBF, and {\tt 2} for AIJ2.
\item
{\tt srcMtxFile} is the file name saved the source matrix $A$.
\item
{\tt InpMtxFile} is the file name to save InpMtx object if the
  original input matrix is in HBF or AIJ2 format.  It should be with
  extension {\tt .inpmtxb} or {\tt .inpmtxf}.  If {\tt InpMtxFile} is
  {\tt none}, the converted InpMtx object will not be written to file.
\item
{\tt ETreeFormat} is the source format for ETree object.
 {\tt 0} for reading from file, {\tt 1} for obtaining via the best of a nested
 dissection and a multisection ordering, {\tt 2} for obtaining via a multiple
 minimum degree ordering, {\tt 3} for obtaining via a multisection ordering,
 and {\tt 4} for obtaining via a nested dissection ordering.
\item
{\tt ETreeFile} is the name of file from which ETree object is read
  if {\tt ETreeFormat} is {\tt 0}.  Otherwise, it is the file name to
  save the computed ETree object.   It should be with
  extension {\tt .etreeb} or {\tt .etreef}.  If {\tt ETreeFile} is
  {\tt none}, the computed ETree object will not be written to file.
\item
{\tt rhsFile} is the name of file from which right-hand-side vectors $B$
  is read.  It should be with
  extension {\tt .densemtxb} or {\tt .densemtxf}.  If {\tt rhsFile} is
  {\tt none}, the  right-hand-side $B$ is generated by random numbers.
\item
{\tt slnFile} is the name of file from which solution vectors $X$
  is saved.  It should be with
  extension {\tt .densemtxb} or {\tt .densemtxf}.  If {\tt rhsFile} is
  {\tt none}, the solution $X$ is not saved.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means most of the objects are written
to the message file.
\item
{\tt seed} parameter is random number seed.
\item
{\tt nrhs} is the number of columns of  right-hand-side $B$.
\item
{\tt Ik} is a block parameter for MLBiCGStab method.
\item
{\tt itermax} is the maximum iterations number. (inner iterations number
for GMRES method)
\item
{\tt iterout} is the maximum outer number of iterations for GMRES method.
\item
The {\tt symmetryflag} parameter specifies the symmetry of the matrix $A$.
\begin{itemize}
\item
{\tt type = 0 (SPOOLES\_SYMMETRIC)} for $A$ real or complex symmetric,
\item
{\tt type = 1 (SPOOLES\_HERMITIAN)} for $A$ complex Hermitian,
\item
{\tt type = 2 (SPOOLES\_NONSYMMETRIC)}
\end{itemize}
for $A$ real or complex nonsymmetric.
\item
The {\tt sparsityflag} parameter signals a direct or approximate
factorization.
\begin{itemize}
\item
{\tt sparsityflag = 0 (FRONTMTX\_DENSE\_FRONTS)} implies a direct
factorization, the fronts will be stored as dense submatrices.
\item
{\tt sparsityflag = 1 (FRONTMTX\_SPARSE\_FRONTS)} implies an
approximate factorization.
The fronts will be stored as sparse submatrices, where
the entries in the triangular factors will be
subjected to a drop tolerance test --- if the magnitude of an entry
is {\tt droptol} or larger, it will be stored, otherwise it will be
dropped.
\end{itemize}
\item
The {\tt pivotingflag} parameter signals whether pivoting for
stability will be enabled or not.
\begin{itemize}
\item
If {\tt pivotingflag = 0 (SPOOLES\_NO\_PIVOTING)},
no pivoting will be done.
\item
If {\tt pivotingflag = 1 (SPOOLES\_PIVOTING)},
pivoting will be done to ensure that all
entries in $U$ and $L$ have magnitude less than {\tt tau}.
\end{itemize}
\item
The {\tt tau} parameter is an upper bound on the magnitude of the
entries in $L$ and $U$ when pivoting is enabled.
\item
The {\tt droptol} parameter is a lower bound on the magnitude of the
entries in $L$ and $U$ when the approximate factorization is enabled.
\item
{\tt convtol}  parameter is a stop criterion for iterative algorithms.
\item
{\tt methods} parameters are choices of iterative algorithms,
  {\tt 0} for BiCGStabR, {\tt 1} for BiCGStabL, {\tt 2} for MLBiCGStabR,
  {\tt 3} for MLBiCGStabL, {\tt  4} for TFQMRR, {\tt 5} for TFQMRL,
  {\tt 6} for PCGR {\tt 7}, for PCGL {\tt  8} for BGMRESR, and
  {\tt 9} for BGMRESL.

\end{itemize}

\end{enumerate}


We conclude with a brief discussion of the past, present, and future development perspectives of LazySets.

\subsection{Related libraries}

There are few publicly available libraries with a similar aim as LazySets.
%
All these libraries are used in the context of reachability analysis.
%
\href{https://github.com/hypro/hypro}{HyPro} is a C++ library for concrete representation and manipulation of sets such as convex polytopes and Taylor models and also offers a support-function representation of set operations \cite{SchuppAMK17}.
%
\href{https://github.com/TUMcps/CORA}{CORA} is an actively developed Matlab library centered around zonotopes and contains implementations of zonotope bundles, matrix zonotopes, and polynomial zonotopes~\cite{Althoff15}.
%
The \href{https://github.com/SystemAnalysisDpt-CMC-MSU/ellipsoids}{ellipsoidal toolbox} is a Matlab library for ellipsoids \cite{kurzhanskiy2006ellipsoidal}.
%
\href{http://spaceex.imag.fr/}{SpaceEx} is a C++ reachability library that established the use of the support function in reachability analysis, but it is not open source \cite{frehse2011spaceex}.

\smallskip

Finally, we mention other related Julia packages with a different aim.
%
As mentioned in Section~\ref{sec:applications}, \href{https://github.com/JuliaPolyhedra/Polyhedra.jl}{Polyhedra.jl} \cite{legat2021polyhedra} provides an interface for polyhedral computations and the double-description method; hence it complements nicely the lazy features available in our library.
%
\href{https://github.com/JuliaGeometry/GeometryBasics.jl}{GeometryBasics.jl} offers standard geometry types, creating a basis for graphics/plotting in Julia.
%
The more recent package
\href{https://github.com/JuliaGeometry/Meshes.jl}{Meshes.jl} is specialized on efficient and pure-Julia implementations of computational geometry and meshing algorithms.
%
Another Julia package for describing domains in Euclidean space is \href{https://github.com/JuliaApproximation/DomainSets.jl}{DomainSets.jl}; this package is being adopted for modeling PDE (partial differential equation) domains with \href{https://github.com/SciML/ModelingToolkit.jl}{ModelingToolkit.jl}.
%
Optimization is another scientific field where sets play a major role, with great contributions from Julia developers.
%
\href{https://github.com/jump-dev/MathOptInterface.jl}{MathOptInterface.jl}
\cite{MathOptInterface-2021} is at the core of \href{https://github.com/jump-dev/JuMP.jl}{JuMP.jl}~\cite{DunningHuchetteLubin2017}, Julia's mainstream modeling language for mathematical optimization.
%
Applications include set programming in \href{https://github.com/blegat/SetProg.jl}{SetProg.jl}
and set distances in \href{https://github.com/jump-dev/MathOptSetDistances.jl}{MathOptSetDistances.jl}.

\subsection{Origin of LazySets and current applications}

LazySets has its origins in a tool for reachability analysis of linear dynamical systems, using a compositional approach based on reducing high-dimensional lazy set representations into a sequence of low-dimensional projections that can be computed efficiently~\cite{BogomolovFFVPS18}.
%
This method presented the first approach to formally verify a $10{,}000$-dimensional benchmark from control engineering.
%
The reachability tool has since been rewritten in ReachabilityAnalysis.jl.
%
A preliminary exposition of these tools appeared in \cite{BogomolovFFPS19}.

\smallskip

We have recently applied LazySets to compute reachable states for linear wave propagation problems and heat transfer problems~\cite{forets2021combining}.
%
The scalability of the approach relies on exploiting the structure of linear systems through the support-function calculus and lazy evaluation.
%
Moreover, linear systems can be embedded in algorithms to analyze nonlinear systems \cite{forets2021reachability}.
%
Further case studies and comparison with other state-of-the-art tools can be found in \cite{ARCHCOMP20LINEAR, ARCHCOMP20NONLINEAR}.
%
LazySets has also been applied to the challenging domain of hybrid systems (systems with mixed discrete-continuous dynamics) for set propagation \cite{bogomolov2020reachability} and synthesis \cite{soto2021synthesis}.
%
Such problems require switching between different set representations and handling intersections efficiently and accurately.
%
Timed systems with non-deterministic events have been considered in \cite{forets2020efficient}; the approach is able to handle a large number of sets ($100$ million sets in zonotope representation), and it was shown to be an order of magnitude faster than competing tools~\cite{ARCHCOMP20LINEAR} such as CORA and SpaceEx.

\smallskip

Besides reachability analysis, LazySets can be used for other purposes. The tool has been adopted in a review article in the context of propagating sets through neural networks \cite{LiuALSBK21}, and new tools use LazySets for verification, e.g.,
\href{https://github.com/JuliaReach/NeuralNetworkAnalysis.jl}{NeuralNetworkAnalysis.jl}~\cite{schilling2021verification} and \href{https://github.com/sisl/OVERTVerify.jl}{OVERTVerify.jl}~\cite{sidrane2021overt}.
%
Other Julia packages using LazySets functionality include computation of invariant sets in \href{https://github.com/ueliwechsler/InvariantSets.jl}{InvariantSets.jl}, ray tracing for geometric optics in \href{https://github.com/microsoft/OpticSim.jl}{OpticSim.jl}, astronomical photometry in \href{https://github.com/JuliaAstro/Photometry.jl}{Photometry.jl}, thin film simulations in \href{https://github.com/Zitzeronion/Swalbe.jl}{Swalbe.jl}, and linear algebra with interval matrices in \href{https://github.com/JuliaIntervals/IntervalLinearAlgebra.jl}{IntervalLinearAlgebra.jl}.

\subsection{LazySets in numbers}

At the time of writing (LazySets-v1.52.1), the package consists of 125 source files with almost 26k lines of code (LOC), 66 test files with over 5k LOC, and 66 documentation files (markdown) with over 4k LOC.
%
It is maintained by the authors of this article\footnote{\texttt{@mforets} and \texttt{@schillic} handles on \href{https://github.com/}{github.com}, respectively.}.
%
The project has received contributions from 13 other people.
%
LazySets was used in 19 research articles.

\subsection{Future work}

Set computations often do not allow for typical tricks you would expect to see in a Julia package. For instance, when working with generic polyhedra, there is very little structure, so most information cannot be statically inferred and needs to be computed from the concrete values (such as whether the polyhedron is empty). That is why there are so many set types: to bring in more structure for algorithms and dispatch.
%
Another challenge in set computations is to preserve type stability: in some cases, the output set type cannot be predicted in advance.

\smallskip

While many algorithms are already optimized, some functions still use a suboptimal, generic fallback.
%
We are interested to identify and fix such cases.
%
In our experience, one can often obtain speed-ups within several orders of magnitude by adding new methods for Julia's multiple dispatch, as we exemplified in Section~\ref{sec:custom_arrays} for the intersection of an axis-aligned half-space with a hyperrectangle.

\smallskip

Another direction is the use of trait-based dispatch, which may be useful as a workaround for limitations of the Julia type system, e.g., that it does not allow for multiple inheritance.
%
Expressing properties of sets that fall outside the established LazySets type hierarchy would allow for even further flexibility.

\smallskip

Our next aimed milestone is proper support of non-convex set representations. While functionality to operate with such set representations is already available, the interoperability between convex and non-convex sets has room for improvement.

\smallskip

Finally, LazySets has a solid documentation of its API by an extensive use of docstrings and uses \href{https://github.com/JuliaDocs/Documenter.jl}{Documenter.jl} for its online documentation.
%
We plan to add more introductory examples and tutorials for first-time users.